diff --git a/java/client/src/org/openqa/selenium/build.desc b/java/client/src/org/openqa/selenium/build.desc index 0e7238799674c..26eb136ba0751 100644 --- a/java/client/src/org/openqa/selenium/build.desc +++ b/java/client/src/org/openqa/selenium/build.desc @@ -124,7 +124,6 @@ java_library(name = "client-combined", "//java/client/src/org/openqa/selenium/htmlunit", "//java/client/src/org/openqa/selenium/firefox", "//java/client/src/org/openqa/selenium/ie", - "//java/client/src/org/openqa/selenium/iphone", "//java/client/src/org/openqa/selenium/remote", "//java/client/src/org/openqa/selenium/safari", "//java/client/src/org/openqa/selenium:selenium-api", diff --git a/java/client/src/org/openqa/selenium/iphone/IPhoneDriver.java b/java/client/src/org/openqa/selenium/iphone/IPhoneDriver.java deleted file mode 100644 index 5b7bb48735023..0000000000000 --- a/java/client/src/org/openqa/selenium/iphone/IPhoneDriver.java +++ /dev/null @@ -1,192 +0,0 @@ -/* -Copyright 2012 Software Freedom Conservancy -Copyright 2007-2010 Selenium committers - -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. - */ - -package org.openqa.selenium.iphone; - -import java.net.URL; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import org.openqa.selenium.Alert; -import org.openqa.selenium.Capabilities; -import org.openqa.selenium.OutputType; -import org.openqa.selenium.TakesScreenshot; -import org.openqa.selenium.WebDriverException; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.html5.LocalStorage; -import org.openqa.selenium.html5.SessionStorage; -import org.openqa.selenium.html5.WebStorage; -import org.openqa.selenium.remote.CommandExecutor; -import org.openqa.selenium.remote.DesiredCapabilities; -import org.openqa.selenium.remote.DriverCommand; -import org.openqa.selenium.remote.FileDetector; -import org.openqa.selenium.remote.RemoteWebDriver; - -import com.google.common.collect.ImmutableMap; - -/** - * IPhoneDriver is a driver for running tests on Mobile Safari on the iPhone, iPad and iPod Touch. - * - * The driver uses WebDriver's remote REST interface to communicate with the iphone. The iphone (or - * iphone simulator) must be running the iWebDriver app. - * - * @deprecated please use ios-driver or appium instead - */ -@Deprecated -public class IPhoneDriver extends RemoteWebDriver implements TakesScreenshot, WebStorage { - - /** - * This is the default port and URL for iWebDriver. Eventually it would be nice to use DNS-SD to - * detect iWebDriver instances running non locally or on non-default ports. - */ - protected static final String DEFAULT_IWEBDRIVER_URL = - "http://localhost:3001/wd/hub"; - - public enum STORAGE_TYPE { local, session } - - /** - * Create an IPhoneDriver that will use the given {@code executor} to communicate with the - * iWebDriver app. - * - * @param executor The executor to use for communicating with the iPhone. - */ - public IPhoneDriver(CommandExecutor executor) { - super(executor, DesiredCapabilities.iphone()); - } - - /** - * Create an IPhoneDriver connected to the remote address passed in. - * - * @param remoteAddress The full URL of the remote client (device or simulator). - * @throws Exception - * @see #IPhoneDriver(String) - */ - public IPhoneDriver(URL remoteAddress) throws Exception { - super(remoteAddress, DesiredCapabilities.iphone()); - } - - /** - * Create an IPhoneDriver connected to the remote address passed in. - * - * @param remoteAddress The full URL of the remote client running iWebDriver. - * @throws Exception - * @see #IPhoneDriver(URL) - */ - public IPhoneDriver(String remoteAddress) throws Exception { - this(new URL(remoteAddress)); - } - - /** - * Create an IPhoneDriver connected to an iphone simulator running on the local machine. - * - * @throws Exception - */ - public IPhoneDriver() throws Exception { - this(DEFAULT_IWEBDRIVER_URL); - } - - public IPhoneDriver(Capabilities ignored) throws Exception { - this(); - } - - @Override - public void setFileDetector(FileDetector detector) { - throw new WebDriverException( - "Setting the file detector only works on remote webdriver instances obtained " + - "via RemoteWebDriver"); - } - - @Override - public void close() { - throw new UnsupportedOperationException("Not yet implemented"); - } - - @Override - public TargetLocator switchTo() { - return new IPhoneTargetLocator(); - } - - private class IPhoneTargetLocator extends RemoteTargetLocator { - - public WebElement activeElement() { - return (WebElement) executeScript("return document.activeElement || document.body;"); - } - - public Alert alert() { - throw new UnsupportedOperationException("alert()"); - } - } - - public X getScreenshotAs(OutputType target) { - String png = (String) execute(DriverCommand.SCREENSHOT).getValue(); - // ... and convert it. - return target.convertFromBase64Png(png); - } - - public LocalStorage getLocalStorage() { - return new IPhoneStorage(STORAGE_TYPE.local); - } - - public SessionStorage getSessionStorage() { - return new IPhoneStorage(STORAGE_TYPE.session); - } - - private class IPhoneStorage implements LocalStorage, SessionStorage { - - private STORAGE_TYPE t; - - public IPhoneStorage(STORAGE_TYPE type) { - t = type; - } - - public String getItem(String key) { - return (String) execute(t==STORAGE_TYPE.local? - DriverCommand.GET_LOCAL_STORAGE_ITEM : DriverCommand.GET_SESSION_STORAGE_ITEM, - ImmutableMap.of("key", key)).getValue(); - } - - @SuppressWarnings("unchecked") - public Set keySet() { - return new HashSet((List) execute(t==STORAGE_TYPE.local? - DriverCommand.GET_LOCAL_STORAGE_KEYS : DriverCommand.GET_SESSION_STORAGE_KEYS).getValue()); - } - - public void setItem(String key, String value) { - execute(t==STORAGE_TYPE.local? - DriverCommand.SET_LOCAL_STORAGE_ITEM : DriverCommand.SET_SESSION_STORAGE_ITEM, - ImmutableMap.of("key", key, "value", value)); - } - - public String removeItem(String key) { - return (String) execute(t==STORAGE_TYPE.local? - DriverCommand.REMOVE_LOCAL_STORAGE_ITEM : DriverCommand.REMOVE_SESSION_STORAGE_ITEM, - ImmutableMap.of("key", key)).getValue(); - } - - public void clear() { - execute(t==STORAGE_TYPE.local? - DriverCommand.CLEAR_LOCAL_STORAGE : DriverCommand.CLEAR_SESSION_STORAGE); - } - - public int size() { - return ((Number) execute(t==STORAGE_TYPE.local? - DriverCommand.GET_LOCAL_STORAGE_SIZE : DriverCommand.GET_SESSION_STORAGE_SIZE).getValue()).intValue(); - } - - } -} diff --git a/java/client/src/org/openqa/selenium/iphone/IPhoneSimulatorBinary.java b/java/client/src/org/openqa/selenium/iphone/IPhoneSimulatorBinary.java deleted file mode 100644 index d88ebeaf4e6d7..0000000000000 --- a/java/client/src/org/openqa/selenium/iphone/IPhoneSimulatorBinary.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright 2011 Software Freedom Conservancy. - * - * 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. - * - */ - -package org.openqa.selenium.iphone; - -import org.apache.commons.exec.CommandLine; -import org.apache.commons.exec.DefaultExecutor; -import org.apache.commons.exec.Executor; -import org.apache.commons.exec.PumpStreamHandler; -import org.openqa.selenium.WebDriverException; -import org.openqa.selenium.io.FileHandler; -import org.openqa.selenium.io.TemporaryFilesystem; -import org.openqa.selenium.remote.internal.CircularOutputStream; - -import com.google.common.io.Resources; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.FileWriter; -import java.io.IOException; -import java.io.OutputStream; -import java.net.URL; - -/** - * Handles launching the iWebDriver app on the iPhone Simulator in a subprocess. - * - *

- * Only one instance of the iPhone Simulator may be run at once, so all other instances will be - * killed before a new one is started. - * - *

- * The iPhone Simulator will be run against the SDK specified by the {@code webdriver.iphone.sdk} - * system property. A temporary directory will be used as the user home so the application need not - * be pre-installed. - * - * @author dawagner@gmail.com (Daniel Wagner-Hall) - * - * @deprecated use ios-driver or appium instead - */ -@Deprecated -public class IPhoneSimulatorBinary { - private static final String IPHONE_LOG_FILE_PROPERTY = "webdriver.iphone.logFile"; - - private final CommandLine commandLine; - private Integer exitCode = null; - - /** - * Creates a new IPhoneSimulatorBinary that will run the given application on the iPhone - * Simulator. The simulator will be run using the SDK specified by the - * {@code webdriver.iphone.sdk} system property. - * - * @param iWebDriverApp Path to the executable to run on the simulator. This file should specify - * the executable that is an immediate child of the {@code iwebDriver.app} directory. - * @throws IOException If an I/O error occurs. - */ - public IPhoneSimulatorBinary(File iWebDriverApp) { - System.out.println(String.format( - "%s launch %s --exit", getIphoneSimPath(), iWebDriverApp.getParentFile().getAbsoluteFile())); - this.commandLine = CommandLine.parse(String.format( - "%s launch %s --exit", getIphoneSimPath(), iWebDriverApp.getParentFile().getAbsoluteFile())); - } - - protected static String getIphoneSimPath() { - String filename = "ios-sim"; - File parentDir = TemporaryFilesystem.getDefaultTmpFS().createTempDir("webdriver", "libs"); - try { - File destination = new File(parentDir, filename); - FileOutputStream outputStream = new FileOutputStream(destination); - try { - URL resource = Resources.getResource(IPhoneSimulatorBinary.class.getPackage().getName().replace('.', '/') + '/' + filename); - Resources.copy(resource, outputStream); - FileHandler.makeExecutable(destination); - return destination.getAbsolutePath(); - } finally { - outputStream.close(); - } - } catch (IOException e) { - throw new WebDriverException(e); - } - } - - private static OutputStream createOutputStream() { - String logFileString = System.getProperty(IPHONE_LOG_FILE_PROPERTY); - File logFile = logFileString == null ? null : new File(logFileString); - return new CircularOutputStream(logFile); - } - - public void launch() { - Executor executor = new DefaultExecutor(); - executor.setStreamHandler(new PumpStreamHandler(createOutputStream())); - try { - exitCode = executor.execute(commandLine); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - public boolean isRunning() { - return exitCode != null && exitCode == 0; - } - - public void shutdown() { - try { - File scriptFile = File.createTempFile("iWebDriver.kill.", ".script"); - FileWriter writer = new FileWriter(scriptFile); - writer.write("ps ax | grep 'iPhone Simulator' | grep -v grep | awk '{print $1}' | xargs kill"); - writer.flush(); - writer.close(); - FileHandler.makeExecutable(scriptFile); - CommandLine killCommandLine = CommandLine.parse(scriptFile.getAbsolutePath()); - Executor executor = new DefaultExecutor(); - executor.setStreamHandler(new PumpStreamHandler(null, null)); - getOutputIgnoringExecutor().execute(killCommandLine); - } catch (Exception ignored) { - } - // Wait until the process really quits (nothing is bound to port 3001) - // TODO something other than Thread.sleep - // client = new HttpClientFactory().getHttpClient(); - try { - Thread.sleep(5000); - } catch (InterruptedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - exitCode = null; - } - - private static Executor getOutputIgnoringExecutor() { - Executor executor = new DefaultExecutor(); - executor.setStreamHandler(new PumpStreamHandler(null, null)); - return executor; - } -} diff --git a/java/client/src/org/openqa/selenium/iphone/IPhoneSimulatorCommandExecutor.java b/java/client/src/org/openqa/selenium/iphone/IPhoneSimulatorCommandExecutor.java deleted file mode 100644 index 7abd5b4da9f1a..0000000000000 --- a/java/client/src/org/openqa/selenium/iphone/IPhoneSimulatorCommandExecutor.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - Copyright 2007-2010 Selenium committers - - 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. - */ - -package org.openqa.selenium.iphone; - -import com.google.common.annotations.VisibleForTesting; - -import org.openqa.selenium.WebDriverException; -import org.openqa.selenium.remote.Command; -import org.openqa.selenium.remote.CommandExecutor; -import org.openqa.selenium.remote.HttpCommandExecutor; -import org.openqa.selenium.remote.Response; - -import java.io.IOException; -import java.net.ConnectException; -import java.net.HttpURLConnection; -import java.net.ProtocolException; -import java.net.URL; -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * A {@link CommandExecutor} that communicates with an iPhone Simulator running on localhost in a - * subprocess. Before executing each command, the {@link IPhoneSimulatorCommandExecutor} will verify - * that the simulator is still running and throw an {@link IPhoneSimulatorNotRunningException} if it - * is not. - * - * @author jmleyba@gmail.com (Jason Leyba) - * - * @deprecated use ios-driver or appium instead - */ -@Deprecated -public class IPhoneSimulatorCommandExecutor implements CommandExecutor { - - private static final Logger LOG = - Logger.getLogger(IPhoneSimulatorCommandExecutor.class.getName()); - - private final CommandExecutor delegate; - private final IPhoneSimulatorBinary binary; - private final URL appUrl; - - public IPhoneSimulatorCommandExecutor(URL url, IPhoneSimulatorBinary binary) throws Exception { - this.delegate = new HttpCommandExecutor(url); - this.binary = binary; - this.appUrl = url; - } - - @VisibleForTesting - IPhoneSimulatorBinary getBinary() { - return binary; - } - - public void startClient() { - binary.launch(); - waitForServerToRespond(2500); - } - - private void waitForServerToRespond(long timeoutInMilliseconds) { - long start = System.currentTimeMillis(); - boolean responding = false; - while (!responding && (System.currentTimeMillis() - start < timeoutInMilliseconds)) { - HttpURLConnection connection = null; - try { - connection = (HttpURLConnection) appUrl.openConnection(); - connection.setConnectTimeout(500); - connection.setRequestMethod("TRACE"); - connection.connect(); - responding = true; - } catch (ProtocolException e) { - responding = false; - } catch (IOException e) { - responding = false; - } finally { - if (connection != null) { - connection.disconnect(); - } - } - } - } - - public void stopClient() { - binary.shutdown(); - } - - public Response execute(Command command) throws IOException { - if (!binary.isRunning()) { - throw new IPhoneSimulatorNotRunningException(); - } - - try { - return delegate.execute(command); - } catch (ConnectException e) { - LOG.log(Level.WARNING, "Connection refused?", e); - if (!binary.isRunning()) { - throw new IPhoneSimulatorNotRunningException("The iPhone Simulator died!", e); - } - throw e; - } - } - - public static class IPhoneSimulatorNotRunningException extends WebDriverException { - public IPhoneSimulatorNotRunningException() { - super("The iPhone Simulator is not currently running!"); - } - - public IPhoneSimulatorNotRunningException(Throwable cause) { - super("The iPhone Simulator is not currently running!", cause); - } - - public IPhoneSimulatorNotRunningException(String message, Throwable cause) { - super(message, cause); - } - } -} diff --git a/java/client/src/org/openqa/selenium/iphone/IPhoneSimulatorDriver.java b/java/client/src/org/openqa/selenium/iphone/IPhoneSimulatorDriver.java deleted file mode 100644 index 6e33cad58147b..0000000000000 --- a/java/client/src/org/openqa/selenium/iphone/IPhoneSimulatorDriver.java +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2012 Selenium committers -Copyright 2012 Software Freedom Conservancy - -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. -*/ - - -package org.openqa.selenium.iphone; - -import java.net.URL; - -/** - * @author jmleyba@gmail.com (Jason Leyba) - * - * @deprecated use ios-driver or appium instead - */ -@Deprecated -public class IPhoneSimulatorDriver extends IPhoneDriver { - - public IPhoneSimulatorDriver(URL iWebDriverUrl, IPhoneSimulatorBinary iphoneSimulator) - throws Exception { - super(new IPhoneSimulatorCommandExecutor(iWebDriverUrl, iphoneSimulator)); - } - - public IPhoneSimulatorDriver(String iWebDriverUrl, IPhoneSimulatorBinary iphoneSimulator) - throws Exception { - this(new URL(iWebDriverUrl), iphoneSimulator); - } - - public IPhoneSimulatorDriver(IPhoneSimulatorBinary iphoneSimulator) throws Exception { - this(DEFAULT_IWEBDRIVER_URL, iphoneSimulator); - } - - @Override - protected void startClient() { - ((IPhoneSimulatorCommandExecutor) getCommandExecutor()).startClient(); - } - - @Override - protected void stopClient() { - ((IPhoneSimulatorCommandExecutor) getCommandExecutor()).stopClient(); - } -} diff --git a/java/client/src/org/openqa/selenium/iphone/build.desc b/java/client/src/org/openqa/selenium/iphone/build.desc deleted file mode 100644 index 701683100943a..0000000000000 --- a/java/client/src/org/openqa/selenium/iphone/build.desc +++ /dev/null @@ -1,15 +0,0 @@ - -java_library(name = "iphone", - srcs = [ "*.java" ], - deps = [ - "//java/client/src/org/openqa/selenium/remote", - "//third_party/java/commons-exec", - ], - embedded = [ - "//third_party/objc/iphonesim:iphonesim-binary", - ]) - -java_binary(name = "bin", - deps = [":iphone"], - main_class = "org.openqa.selenium.iphone.IPhoneSimulatorBinary" -) diff --git a/java/client/test/org/openqa/selenium/build.desc b/java/client/test/org/openqa/selenium/build.desc index e6e15eb3a899e..10aa56e6dfb0f 100644 --- a/java/client/test/org/openqa/selenium/build.desc +++ b/java/client/test/org/openqa/selenium/build.desc @@ -3,7 +3,6 @@ java_library(name = "selenium", ":base", "//java/client/src/org/openqa/selenium/htmlunit", "//java/client/src/org/openqa/selenium/firefox", - "//java/client/src/org/openqa/selenium/iphone", "//java/client/src/org/openqa/selenium/remote", ]) diff --git a/java/client/test/org/openqa/selenium/iphone/AlreadyRunningIPhoneDriverTests.java b/java/client/test/org/openqa/selenium/iphone/AlreadyRunningIPhoneDriverTests.java deleted file mode 100644 index 591f7a0b67238..0000000000000 --- a/java/client/test/org/openqa/selenium/iphone/AlreadyRunningIPhoneDriverTests.java +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2012 Selenium committers -Copyright 2012 Software Freedom Conservancy - -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. -*/ - -package org.openqa.selenium.iphone; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; -import org.openqa.selenium.StandardSeleniumTests; -import org.openqa.selenium.remote.DesiredCapabilities; -import org.openqa.selenium.remote.RemoteWebDriver; - -import java.net.MalformedURLException; -import java.net.URL; - -@RunWith(Suite.class) -@Suite.SuiteClasses({ - StandardSeleniumTests.class, - IPhoneSpecificTests.class -}) -public class AlreadyRunningIPhoneDriverTests { - - // TODO(simon): Hook this into the test suite - public static class AlreadyRunningIPhoneDriver extends RemoteWebDriver { - public AlreadyRunningIPhoneDriver() throws MalformedURLException { - super(new URL("http://localhost:3001/hub"), DesiredCapabilities.iphone()); - } - } - -} diff --git a/java/client/test/org/openqa/selenium/iphone/CreateIPhoneDriverTest.java b/java/client/test/org/openqa/selenium/iphone/CreateIPhoneDriverTest.java deleted file mode 100644 index df21fed82f6b1..0000000000000 --- a/java/client/test/org/openqa/selenium/iphone/CreateIPhoneDriverTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/* -Copyright 2012 Selenium committers -Copyright 2012 Software Freedom Conservancy - -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. -*/ - - -package org.openqa.selenium.iphone; - -import org.junit.Test; -import org.openqa.selenium.NoDriverAfterTest; -import org.openqa.selenium.testing.JUnit4TestBase; - -public class CreateIPhoneDriverTest extends JUnit4TestBase { - @Test - public void testCreateDriver() throws Exception { - new IPhoneDriver(); - } - - @NoDriverAfterTest - @Test - public void testDeleteSession() throws Exception { - driver.quit(); - } - - @Test - public void testCreateDriverWithTrailingSlash() throws Exception { - new IPhoneDriver(IPhoneDriver.DEFAULT_IWEBDRIVER_URL + "/"); - } -} diff --git a/java/client/test/org/openqa/selenium/iphone/IPhoneDriverRespondsToStatusTest.java b/java/client/test/org/openqa/selenium/iphone/IPhoneDriverRespondsToStatusTest.java deleted file mode 100644 index b9a135432e658..0000000000000 --- a/java/client/test/org/openqa/selenium/iphone/IPhoneDriverRespondsToStatusTest.java +++ /dev/null @@ -1,69 +0,0 @@ -/* -Copyright 2011 Software Freedom Conservancy. - -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. - */ - -package org.openqa.selenium.iphone; - -import java.io.IOException; - -import org.json.JSONException; -import org.json.JSONObject; -import org.junit.Test; -import org.openqa.selenium.remote.CapabilityType; -import org.openqa.selenium.remote.Command; -import org.openqa.selenium.remote.CommandExecutor; -import org.openqa.selenium.remote.DriverCommand; -import org.openqa.selenium.remote.RemoteWebDriver; -import org.openqa.selenium.remote.Response; -import org.openqa.selenium.testing.JUnit4TestBase; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -public class IPhoneDriverRespondsToStatusTest extends JUnit4TestBase { - - @Test - public void testCanCheckServerStatusIndependentlyOfSessions() throws IOException, JSONException { - if (!(driver instanceof IPhoneDriver)) { - System.out.println("Skipping test: driver is not a IPhoneDriver"); - return; - } - - RemoteWebDriver remote = (RemoteWebDriver) driver; - CommandExecutor executor = remote.getCommandExecutor(); - - Command command = new Command(null, DriverCommand.STATUS); - System.out.println("Executing status command."); - Response res = executor.execute(command); - assertEquals(0, res.getStatus()); - String raw = (String) res.getValue(); - System.out.println("RAW:"); - System.out.println(raw); - JSONObject response = new JSONObject(raw); - - JSONObject value = response.getJSONObject("value"); - assertHasKeys(value, "os"/*, "build"*/); - assertHasKeys(value.getJSONObject("os"), "name", "arch", CapabilityType.VERSION); - // build is not currently in response, is a TODO - //assertHasKeys(value.getJSONObject("build"), CapabilityType.VERSION, "revision", "time"); - } - - private static void assertHasKeys(JSONObject object, String... keys) { - for (String key : keys) { - assertTrue("Object does not contain expected key: " + key + " (" + object + ")", - object.has(key)); - } - } -} diff --git a/java/client/test/org/openqa/selenium/iphone/IPhoneDriverTests.java b/java/client/test/org/openqa/selenium/iphone/IPhoneDriverTests.java deleted file mode 100644 index fe77af28fb0b7..0000000000000 --- a/java/client/test/org/openqa/selenium/iphone/IPhoneDriverTests.java +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright 2007-2009 Selenium committers - -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. - */ - -package org.openqa.selenium.iphone; - -import java.io.File; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; -import org.openqa.selenium.Capabilities; -import org.openqa.selenium.StandardSeleniumTests; -import org.openqa.selenium.interactions.touch.TouchTests; -import org.openqa.selenium.testing.InProject; - -@RunWith(Suite.class) -@Suite.SuiteClasses({ - StandardSeleniumTests.class, - TouchTests.class, - IPhoneSpecificTests.class -}) -public class IPhoneDriverTests { - - // this is being magically used in ReflectionBackedDriverSupplier - public static class TestIPhoneSimulatorDriver extends IPhoneSimulatorDriver { - public TestIPhoneSimulatorDriver(Capabilities ignore) throws Exception { - super(locateSimulatorBinary()); - } - - private static IPhoneSimulatorBinary locateSimulatorBinary() throws Exception { - File iWebDriverApp = InProject.locate( - "iphone/build/Debug-iphonesimulator/iWebDriver.app/iWebDriver"); - return new IPhoneSimulatorBinary(iWebDriverApp); - } - } -} diff --git a/java/client/test/org/openqa/selenium/iphone/IPhoneSimulatorCommandExecutorTest.java b/java/client/test/org/openqa/selenium/iphone/IPhoneSimulatorCommandExecutorTest.java deleted file mode 100644 index abec50506a31e..0000000000000 --- a/java/client/test/org/openqa/selenium/iphone/IPhoneSimulatorCommandExecutorTest.java +++ /dev/null @@ -1,83 +0,0 @@ -/* -Copyright 2007-2010 Selenium committers - -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. - */ - -package org.openqa.selenium.iphone; - -import java.io.File; -import java.io.FileWriter; - -import org.apache.commons.exec.CommandLine; -import org.apache.commons.exec.DefaultExecutor; -import org.apache.commons.exec.Executor; -import org.apache.commons.exec.PumpStreamHandler; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TestName; -import org.openqa.selenium.NoDriverAfterTest; -import org.openqa.selenium.io.FileHandler; -import org.openqa.selenium.testing.JUnit4TestBase; - -import static org.junit.Assert.fail; - -/** - * @author jmleyba@gmail.com (Jason Leyba) - * @author dawagner@gmail.com (Daniel Wagner-Hall) - */ - -public class IPhoneSimulatorCommandExecutorTest extends JUnit4TestBase { - @Rule public TestName name = new TestName(); - - @NoDriverAfterTest - @Test - public void testShouldDetectThatTheIPhoneSimulatorHasUnexpectedlyShutdown() throws Exception { - if (!(driver instanceof IPhoneSimulatorDriver)) { - System.out.println(String.format( - "[%s] Skipping test; requires current driver to be a %s, but instead is a %s", - name.getMethodName(), IPhoneSimulatorDriver.class.getName(), driver.getClass().getName())); - return; - } - - killIphoneSimulatorProcesses(); - - try { - driver.get(pages.simpleTestPage); - fail("Should have thrown a " + - IPhoneSimulatorCommandExecutor.IPhoneSimulatorNotRunningException.class.getName()); - } catch (Exception expected) { - // Do nothing - } - } - - private void killIphoneSimulatorProcesses() { - try { - File scriptFile = File.createTempFile("iWebDriver.kill.", ".script"); - FileWriter writer = new FileWriter(scriptFile); - writer.write("ps ax | grep 'iPhone Simulator' | grep -v grep | awk '{print $1}' | xargs kill"); - writer.flush(); - writer.close(); - FileHandler.makeExecutable(scriptFile); - CommandLine killCommandLine = CommandLine.parse(scriptFile.getAbsolutePath()); - Executor executor = new DefaultExecutor(); - executor.setStreamHandler(new PumpStreamHandler(null, null)); - executor.execute(killCommandLine); - // need to wait for the port to free up - // TODO same as needs to be done in IPhoneSimulatorBinary - Thread.sleep(5000); - } catch (Exception e) { - throw new RuntimeException(e); - } - } -} diff --git a/java/client/test/org/openqa/selenium/iphone/IPhoneSpecificTests.java b/java/client/test/org/openqa/selenium/iphone/IPhoneSpecificTests.java deleted file mode 100644 index 945dd04ab80ed..0000000000000 --- a/java/client/test/org/openqa/selenium/iphone/IPhoneSpecificTests.java +++ /dev/null @@ -1,30 +0,0 @@ -/* -Copyright 2012 Selenium committers -Copyright 2012 Software Freedom Conservancy - -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. -*/ - -package org.openqa.selenium.iphone; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; - -@RunWith(Suite.class) -@Suite.SuiteClasses({ - CreateIPhoneDriverTest.class, - IPhoneDriverRespondsToStatusTest.class, - IPhoneSimulatorCommandExecutorTest.class -}) -public class IPhoneSpecificTests { -} diff --git a/java/client/test/org/openqa/selenium/iphone/build.desc b/java/client/test/org/openqa/selenium/iphone/build.desc deleted file mode 100644 index c497fa7466b3b..0000000000000 --- a/java/client/test/org/openqa/selenium/iphone/build.desc +++ /dev/null @@ -1,47 +0,0 @@ -java_library(name = "base", - srcs = [ - "IPhoneSpecificTests.java", - "*Test.java", - ], - deps = [ - "//java/client/src/org/openqa/selenium/iphone:iphone", - "//java/client/test/org/openqa/selenium:tests", - "//third_party/java/junit", - ]) - -java_test(name = "test", - srcs = [ - "IPhoneDriverTests.java", - ], - sysproperties = [ - { "selenium.browser" : "iphone" }, - ], - deps = [ - ":base", - ":server", - "//third_party/java/commons-exec", - "//third_party/java/junit", - ], - embedded = [ - "//third_party/objc/iphonesim:iphonesim-binary", - ]) - -java_test(name = "test_deployed", - srcs = [ - "AlreadyRunningIPhoneDriverTests.java", - ], - sysproperties = [ - { "selenium.browser" : "iphone" }, - ], - deps = [ - ":base", - "//third_party/java/junit", - ]) - -rake_task(name = "server-tests", - task_name = "test_iphone_server_tests", - out = "iphone/build/Debug-iphonesimulator/Tests.app") - -rake_task(name = "server", - task_name = "iphone_server", - out = "iphone/build/Debug-iphonesimulator/iWebDriver.app") diff --git a/java/client/test/org/openqa/selenium/testing/drivers/Browser.java b/java/client/test/org/openqa/selenium/testing/drivers/Browser.java index f7bf5632674df..9c2686fc36ccf 100644 --- a/java/client/test/org/openqa/selenium/testing/drivers/Browser.java +++ b/java/client/test/org/openqa/selenium/testing/drivers/Browser.java @@ -32,8 +32,6 @@ public boolean isJavascriptEnabled() { }, htmlunit_js, ie, - ipad, - iphone, none, // For those cases where you don't actually want a browser opera, opera_mobile, diff --git a/java/client/test/org/openqa/selenium/testing/drivers/BrowserToCapabilities.java b/java/client/test/org/openqa/selenium/testing/drivers/BrowserToCapabilities.java index aa63242894af7..fd90cd2b9320c 100644 --- a/java/client/test/org/openqa/selenium/testing/drivers/BrowserToCapabilities.java +++ b/java/client/test/org/openqa/selenium/testing/drivers/BrowserToCapabilities.java @@ -81,14 +81,6 @@ public static DesiredCapabilities of(Browser browser) { caps = DesiredCapabilities.safari(); break; - case ipad: - caps = DesiredCapabilities.ipad(); - break; - - case iphone: - caps = DesiredCapabilities.iphone(); - break; - default: throw new RuntimeException("Cannot determine browser config to use"); } diff --git a/java/client/test/org/openqa/selenium/testing/drivers/ReflectionBackedDriverSupplier.java b/java/client/test/org/openqa/selenium/testing/drivers/ReflectionBackedDriverSupplier.java index 5ae6ede66e891..03f2d0cfec6a6 100644 --- a/java/client/test/org/openqa/selenium/testing/drivers/ReflectionBackedDriverSupplier.java +++ b/java/client/test/org/openqa/selenium/testing/drivers/ReflectionBackedDriverSupplier.java @@ -108,11 +108,6 @@ private Class mapToClass(Capabilities caps) { } } else if (DesiredCapabilities.internetExplorer().getBrowserName().equals(name)) { className = "org.openqa.selenium.ie.InternetExplorerDriver"; - } else if (DesiredCapabilities.ipad().getBrowserName().equals(name)) { - // for now using the iphone sim... TODO need to make the sim launch in ipad mode - className = "org.openqa.selenium.iphone.IPhoneDriverTests$TestIPhoneSimulatorDriver"; - } else if (DesiredCapabilities.iphone().getBrowserName().equals(name)) { - className = "org.openqa.selenium.iphone.IPhoneDriverTests$TestIPhoneSimulatorDriver"; } else if (DesiredCapabilities.safari().getBrowserName().equals(name)) { className = "org.openqa.selenium.safari.SafariDriver"; } else { diff --git a/java/client/test/org/openqa/selenium/testing/drivers/TestIgnorance.java b/java/client/test/org/openqa/selenium/testing/drivers/TestIgnorance.java index a4c76e8089dbd..238e4f412597d 100644 --- a/java/client/test/org/openqa/selenium/testing/drivers/TestIgnorance.java +++ b/java/client/test/org/openqa/selenium/testing/drivers/TestIgnorance.java @@ -25,7 +25,6 @@ import static org.openqa.selenium.testing.Ignore.Driver.FIREFOX; import static org.openqa.selenium.testing.Ignore.Driver.HTMLUNIT; import static org.openqa.selenium.testing.Ignore.Driver.IE; -import static org.openqa.selenium.testing.Ignore.Driver.IPHONE; import static org.openqa.selenium.testing.Ignore.Driver.MARIONETTE; import static org.openqa.selenium.testing.Ignore.Driver.OPERA; import static org.openqa.selenium.testing.Ignore.Driver.OPERA_MOBILE; @@ -36,8 +35,6 @@ import static org.openqa.selenium.testing.drivers.Browser.htmlunit; import static org.openqa.selenium.testing.drivers.Browser.htmlunit_js; import static org.openqa.selenium.testing.drivers.Browser.ie; -import static org.openqa.selenium.testing.drivers.Browser.ipad; -import static org.openqa.selenium.testing.drivers.Browser.iphone; import static org.openqa.selenium.testing.drivers.Browser.opera; import static org.openqa.selenium.testing.drivers.Browser.phantomjs; @@ -62,7 +59,7 @@ public class TestIgnorance { private Set alwaysNativeEvents = ImmutableSet.of(chrome, ie, opera); private Set neverNativeEvents = ImmutableSet.of( - htmlunit, htmlunit_js, ipad, iphone, phantomjs); + htmlunit, htmlunit_js, phantomjs); private IgnoreComparator ignoreComparator = new IgnoreComparator(); private Set methods = Sets.newHashSet(); private Set only = Sets.newHashSet(); @@ -187,11 +184,6 @@ private void addIgnoresForBrowser(Browser browser, IgnoreComparator comparator) comparator.addDriver(IE); break; - case ipad: - case iphone: - comparator.addDriver(IPHONE); - break; - case none: comparator.addDriver(ALL); break; diff --git a/java/server/src/org/openqa/selenium/remote/server/DefaultDriverSessions.java b/java/server/src/org/openqa/selenium/remote/server/DefaultDriverSessions.java index 74daa22174bf6..9c55e77f4e52c 100644 --- a/java/server/src/org/openqa/selenium/remote/server/DefaultDriverSessions.java +++ b/java/server/src/org/openqa/selenium/remote/server/DefaultDriverSessions.java @@ -47,8 +47,6 @@ public class DefaultDriverSessions implements DriverSessions { put(DesiredCapabilities.internetExplorer(), "org.openqa.selenium.ie.InternetExplorerDriver"); put(DesiredCapabilities.opera(), "com.opera.core.systems.OperaDriver"); put(DesiredCapabilities.safari(), "org.openqa.selenium.safari.SafariDriver"); - put(DesiredCapabilities.iphone(), "org.openqa.selenium.iphone.IPhoneDriver"); - put(DesiredCapabilities.ipad(), "org.openqa.selenium.iphone.IPhoneDriver"); put(DesiredCapabilities.phantomjs(), "org.openqa.selenium.phantomjs.PhantomJSDriver"); }}; diff --git a/maven/iphone-driver/pom.xml b/maven/iphone-driver/pom.xml deleted file mode 100644 index 21b45fb40532c..0000000000000 --- a/maven/iphone-driver/pom.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - 4.0.0 - - - org.seleniumhq.selenium - selenium-parent - 2.0-SNAPSHOT - - selenium-iphone-driver - selenium-iphone-driver - - - - org.seleniumhq.selenium - selenium-remote-driver - ${project.version} - - - - - - - - maven-antrun-plugin - - - copy_java_files - generate-sources - - - - - - - - - - - - run - - - - - - - - diff --git a/maven/java/pom.xml b/maven/java/pom.xml index ca3f96178b575..b5bf3c1d16bc7 100644 --- a/maven/java/pom.xml +++ b/maven/java/pom.xml @@ -32,11 +32,6 @@ selenium-ie-driver ${project.version} - - org.seleniumhq.selenium - selenium-iphone-driver - ${project.version} - org.seleniumhq.selenium selenium-safari-driver diff --git a/maven/pom.xml b/maven/pom.xml index e82bf706ad275..bdd858353dfae 100644 --- a/maven/pom.xml +++ b/maven/pom.xml @@ -122,7 +122,6 @@ firefox-driver htmlunit-driver ie-driver - iphone-driver java remote-driver safari-driver diff --git a/rake-tasks/checks.rb b/rake-tasks/checks.rb index 27537e184f2c9..f1078c62b4289 100644 --- a/rake-tasks/checks.rb +++ b/rake-tasks/checks.rb @@ -90,49 +90,6 @@ def msbuild_installed? windows? && present?("msbuild.exe") end -def xcode? - return mac? && present?('xcodebuild') -end - -def iPhoneSDKPresent? - return false unless xcode? - sdks = `xcodebuild -showsdks 2>&1` - return false unless $?.success? - !!(sdks =~ /iphonesimulator/) -end - -def iPhoneSDK? - return nil unless iPhoneSDKPresent? - if $iPhoneSDK == nil then - cmd = open("|xcodebuild -showsdks | grep iphonesimulator | awk '{print $NF}'") - sdks = cmd.readlines.map {|x| x.gsub(/\b(.*)\b.*/m, '\1').chomp} - cmd.close - - if ENV['IPHONE_SDK_VERSION'] != nil then - $iPhoneSDK = "iphonesimulator#{ENV['IPHONE_SDK_VERSION']}" - puts "Testing for SDK #{$iPhoneSDK}" - unless sdks.include?($iPhoneSDK) then - puts "...#{$iPhoneSDK} not found." - $iPhoneSDK = nil - end - end - - if $iPhoneSDK == nil then - $iPhoneSDK = sdks.last - end - - puts "Using iPhoneSDK: '#{$iPhoneSDK}'" - end - $iPhoneSDK -end - -def iPhoneSDKVersion? - sdk = iPhoneSDK? - if sdk != nil then - sdk.gsub(/iphonesimulator(.*)/, '\1') - end -end - def vcs_revision @vcs_revision ||= `git rev-parse --short HEAD` end diff --git a/rake-tasks/iphone.rb b/rake-tasks/iphone.rb deleted file mode 100644 index aab2f248c13a6..0000000000000 --- a/rake-tasks/iphone.rb +++ /dev/null @@ -1,13 +0,0 @@ -def iphone_test(args) - if iPhoneSDK? then - system_properties = args[:system_properties] - if !system_properties then - system_properties = [] - args[:system_properties] = system_properties - end - system_properties.push("webdriver.iphone.sdk=#{iPhoneSDKVersion?}") - java_test(args) - else - task args[:name] - end -end diff --git a/third_party/cpp/iphonesim/README b/third_party/cpp/iphonesim/README deleted file mode 100644 index f48f4b7ae1750..0000000000000 --- a/third_party/cpp/iphonesim/README +++ /dev/null @@ -1,58 +0,0 @@ - iPhone Simulator - ---------------- - - The iPhone Simulator is a simple command line utility for - launching an iphone application in the simulator. This allows - for nice things like automated testing of unit tests, etc without - having to open XCode. - - The original code was written by Landon Fuller (with license - below). Minor modifications made by Jeff Haynie (Appcelerator). - - - You can run the application by first building your application in - xcode using the xcodebuild command from the command line. You can - then run it in the simulator using the following as an example: - - ./iphonesim launch ~/tmp/yourproject/build/Debug.simulator/yourproject.app - - You need to point to either Debug.simulator or Release.simulator based - on which build type you built with. - - - Cheers! - - Jeff Haynie - jhaynie@appcelerator.com - - - - Author: Landon Fuller - Copyright (c) 2008 Plausible Labs Cooperative, Inc. - All rights reserved. - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation - files (the "Software"), to deal in the Software without - restriction, including without limitation the rights to use, - copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following - conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - OTHER DEALINGS IN THE SOFTWARE. - - - Modifications made by Appcelerator, Inc. relicensed under - the same license as above. - diff --git a/third_party/cpp/iphonesim/README.selenium b/third_party/cpp/iphonesim/README.selenium deleted file mode 100644 index ab01d345e898f..0000000000000 --- a/third_party/cpp/iphonesim/README.selenium +++ /dev/null @@ -1,4 +0,0 @@ -Source control: git -URL: https://github.com/jhaynie/iphonesim.git -Version: d9304447b527f7e5aa791b684c1dd76a14beda44 - diff --git a/third_party/cpp/iphonesim/build.desc b/third_party/cpp/iphonesim/build.desc deleted file mode 100644 index 2aa110e544d64..0000000000000 --- a/third_party/cpp/iphonesim/build.desc +++ /dev/null @@ -1,4 +0,0 @@ - -rake_file(name = "iphonesim", - src = "iphonesim") - diff --git a/third_party/cpp/iphonesim/iphonesim b/third_party/cpp/iphonesim/iphonesim deleted file mode 100755 index b373abc81cc8a..0000000000000 Binary files a/third_party/cpp/iphonesim/iphonesim and /dev/null differ diff --git a/third_party/objc/CocoaHTTPServer/.gitignore b/third_party/objc/CocoaHTTPServer/.gitignore deleted file mode 100644 index 2723efa9113b8..0000000000000 --- a/third_party/objc/CocoaHTTPServer/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -*.pbxuser -*.mode1v3 -*.mode2v3 -xcuserdata diff --git a/third_party/objc/CocoaHTTPServer/.hgignore b/third_party/objc/CocoaHTTPServer/.hgignore deleted file mode 100644 index 210ab6aec1014..0000000000000 --- a/third_party/objc/CocoaHTTPServer/.hgignore +++ /dev/null @@ -1,6 +0,0 @@ -syntax: glob - -Samples/*/build -*.pbxuser -*.mode1v3 -*.xcuserdatad diff --git a/third_party/objc/CocoaHTTPServer/Core/Categories/DDData.h b/third_party/objc/CocoaHTTPServer/Core/Categories/DDData.h deleted file mode 100644 index 23f3d1cd1929d..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Core/Categories/DDData.h +++ /dev/null @@ -1,14 +0,0 @@ -#import - -@interface NSData (DDData) - -- (NSData *)md5Digest; - -- (NSData *)sha1Digest; - -- (NSString *)hexStringValue; - -- (NSString *)base64Encoded; -- (NSData *)base64Decoded; - -@end diff --git a/third_party/objc/CocoaHTTPServer/Core/Categories/DDData.m b/third_party/objc/CocoaHTTPServer/Core/Categories/DDData.m deleted file mode 100644 index 43b5b420d1f56..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Core/Categories/DDData.m +++ /dev/null @@ -1,157 +0,0 @@ -#import "DDData.h" -#import - - -@implementation NSData (DDData) - -static char encodingTable[64] = { -'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P', -'Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f', -'g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v', -'w','x','y','z','0','1','2','3','4','5','6','7','8','9','+','/' }; - -- (NSData *)md5Digest -{ - unsigned char result[CC_MD5_DIGEST_LENGTH]; - - CC_MD5([self bytes], (CC_LONG)[self length], result); - return [NSData dataWithBytes:result length:CC_MD5_DIGEST_LENGTH]; -} - -- (NSData *)sha1Digest -{ - unsigned char result[CC_SHA1_DIGEST_LENGTH]; - - CC_SHA1([self bytes], (CC_LONG)[self length], result); - return [NSData dataWithBytes:result length:CC_SHA1_DIGEST_LENGTH]; -} - -- (NSString *)hexStringValue -{ - NSMutableString *stringBuffer = [NSMutableString stringWithCapacity:([self length] * 2)]; - - const unsigned char *dataBuffer = [self bytes]; - int i; - - for (i = 0; i < [self length]; ++i) - { - [stringBuffer appendFormat:@"%02x", (unsigned long)dataBuffer[i]]; - } - - return [[stringBuffer copy] autorelease]; -} - -- (NSString *)base64Encoded -{ - const unsigned char *bytes = [self bytes]; - NSMutableString *result = [NSMutableString stringWithCapacity:[self length]]; - unsigned long ixtext = 0; - unsigned long lentext = [self length]; - long ctremaining = 0; - unsigned char inbuf[3], outbuf[4]; - unsigned short i = 0; - unsigned short charsonline = 0, ctcopy = 0; - unsigned long ix = 0; - - while( YES ) - { - ctremaining = lentext - ixtext; - if( ctremaining <= 0 ) break; - - for( i = 0; i < 3; i++ ) { - ix = ixtext + i; - if( ix < lentext ) inbuf[i] = bytes[ix]; - else inbuf [i] = 0; - } - - outbuf [0] = (inbuf [0] & 0xFC) >> 2; - outbuf [1] = ((inbuf [0] & 0x03) << 4) | ((inbuf [1] & 0xF0) >> 4); - outbuf [2] = ((inbuf [1] & 0x0F) << 2) | ((inbuf [2] & 0xC0) >> 6); - outbuf [3] = inbuf [2] & 0x3F; - ctcopy = 4; - - switch( ctremaining ) - { - case 1: - ctcopy = 2; - break; - case 2: - ctcopy = 3; - break; - } - - for( i = 0; i < ctcopy; i++ ) - [result appendFormat:@"%c", encodingTable[outbuf[i]]]; - - for( i = ctcopy; i < 4; i++ ) - [result appendString:@"="]; - - ixtext += 3; - charsonline += 4; - } - - return [NSString stringWithString:result]; -} - -- (NSData *)base64Decoded -{ - const unsigned char *bytes = [self bytes]; - NSMutableData *result = [NSMutableData dataWithCapacity:[self length]]; - - unsigned long ixtext = 0; - unsigned long lentext = [self length]; - unsigned char ch = 0; - unsigned char inbuf[4], outbuf[3]; - short i = 0, ixinbuf = 0; - BOOL flignore = NO; - BOOL flendtext = NO; - - while( YES ) - { - if( ixtext >= lentext ) break; - ch = bytes[ixtext++]; - flignore = NO; - - if( ( ch >= 'A' ) && ( ch <= 'Z' ) ) ch = ch - 'A'; - else if( ( ch >= 'a' ) && ( ch <= 'z' ) ) ch = ch - 'a' + 26; - else if( ( ch >= '0' ) && ( ch <= '9' ) ) ch = ch - '0' + 52; - else if( ch == '+' ) ch = 62; - else if( ch == '=' ) flendtext = YES; - else if( ch == '/' ) ch = 63; - else flignore = YES; - - if( ! flignore ) - { - short ctcharsinbuf = 3; - BOOL flbreak = NO; - - if( flendtext ) - { - if( ! ixinbuf ) break; - if( ( ixinbuf == 1 ) || ( ixinbuf == 2 ) ) ctcharsinbuf = 1; - else ctcharsinbuf = 2; - ixinbuf = 3; - flbreak = YES; - } - - inbuf [ixinbuf++] = ch; - - if( ixinbuf == 4 ) - { - ixinbuf = 0; - outbuf [0] = ( inbuf[0] << 2 ) | ( ( inbuf[1] & 0x30) >> 4 ); - outbuf [1] = ( ( inbuf[1] & 0x0F ) << 4 ) | ( ( inbuf[2] & 0x3C ) >> 2 ); - outbuf [2] = ( ( inbuf[2] & 0x03 ) << 6 ) | ( inbuf[3] & 0x3F ); - - for( i = 0; i < ctcharsinbuf; i++ ) - [result appendBytes:&outbuf[i] length:1]; - } - - if( flbreak ) break; - } - } - - return [NSData dataWithData:result]; -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Core/Categories/DDNumber.h b/third_party/objc/CocoaHTTPServer/Core/Categories/DDNumber.h deleted file mode 100644 index 26436103ea550..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Core/Categories/DDNumber.h +++ /dev/null @@ -1,12 +0,0 @@ -#import - - -@interface NSNumber (DDNumber) - -+ (BOOL)parseString:(NSString *)str intoSInt64:(SInt64 *)pNum; -+ (BOOL)parseString:(NSString *)str intoUInt64:(UInt64 *)pNum; - -+ (BOOL)parseString:(NSString *)str intoNSInteger:(NSInteger *)pNum; -+ (BOOL)parseString:(NSString *)str intoNSUInteger:(NSUInteger *)pNum; - -@end diff --git a/third_party/objc/CocoaHTTPServer/Core/Categories/DDNumber.m b/third_party/objc/CocoaHTTPServer/Core/Categories/DDNumber.m deleted file mode 100644 index d384d39c59cf5..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Core/Categories/DDNumber.m +++ /dev/null @@ -1,88 +0,0 @@ -#import "DDNumber.h" - - -@implementation NSNumber (DDNumber) - -+ (BOOL)parseString:(NSString *)str intoSInt64:(SInt64 *)pNum -{ - if(str == nil) - { - *pNum = 0; - return NO; - } - - errno = 0; - - // On both 32-bit and 64-bit machines, long long = 64 bit - - *pNum = strtoll([str UTF8String], NULL, 10); - - if(errno != 0) - return NO; - else - return YES; -} - -+ (BOOL)parseString:(NSString *)str intoUInt64:(UInt64 *)pNum -{ - if(str == nil) - { - *pNum = 0; - return NO; - } - - errno = 0; - - // On both 32-bit and 64-bit machines, unsigned long long = 64 bit - - *pNum = strtoull([str UTF8String], NULL, 10); - - if(errno != 0) - return NO; - else - return YES; -} - -+ (BOOL)parseString:(NSString *)str intoNSInteger:(NSInteger *)pNum -{ - if(str == nil) - { - *pNum = 0; - return NO; - } - - errno = 0; - - // On LP64, NSInteger = long = 64 bit - // Otherwise, NSInteger = int = long = 32 bit - - *pNum = strtol([str UTF8String], NULL, 10); - - if(errno != 0) - return NO; - else - return YES; -} - -+ (BOOL)parseString:(NSString *)str intoNSUInteger:(NSUInteger *)pNum -{ - if(str == nil) - { - *pNum = 0; - return NO; - } - - errno = 0; - - // On LP64, NSUInteger = unsigned long = 64 bit - // Otherwise, NSUInteger = unsigned int = unsigned long = 32 bit - - *pNum = strtoul([str UTF8String], NULL, 10); - - if(errno != 0) - return NO; - else - return YES; -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Core/Categories/DDRange.h b/third_party/objc/CocoaHTTPServer/Core/Categories/DDRange.h deleted file mode 100644 index e95974a716922..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Core/Categories/DDRange.h +++ /dev/null @@ -1,56 +0,0 @@ -/** - * DDRange is the functional equivalent of a 64 bit NSRange. - * The HTTP Server is designed to support very large files. - * On 32 bit architectures (ppc, i386) NSRange uses unsigned 32 bit integers. - * This only supports a range of up to 4 gigabytes. - * By defining our own variant, we can support a range up to 16 exabytes. - * - * All effort is given such that DDRange functions EXACTLY the same as NSRange. -**/ - -#import -#import - -@class NSString; - -typedef struct _DDRange { - UInt64 location; - UInt64 length; -} DDRange; - -typedef DDRange *DDRangePointer; - -NS_INLINE DDRange DDMakeRange(UInt64 loc, UInt64 len) { - DDRange r; - r.location = loc; - r.length = len; - return r; -} - -NS_INLINE UInt64 DDMaxRange(DDRange range) { - return (range.location + range.length); -} - -NS_INLINE BOOL DDLocationInRange(UInt64 loc, DDRange range) { - return (loc - range.location < range.length); -} - -NS_INLINE BOOL DDEqualRanges(DDRange range1, DDRange range2) { - return ((range1.location == range2.location) && (range1.length == range2.length)); -} - -FOUNDATION_EXPORT DDRange DDUnionRange(DDRange range1, DDRange range2); -FOUNDATION_EXPORT DDRange DDIntersectionRange(DDRange range1, DDRange range2); -FOUNDATION_EXPORT NSString *DDStringFromRange(DDRange range); -FOUNDATION_EXPORT DDRange DDRangeFromString(NSString *aString); - -NSInteger DDRangeCompare(DDRangePointer pDDRange1, DDRangePointer pDDRange2); - -@interface NSValue (NSValueDDRangeExtensions) - -+ (NSValue *)valueWithDDRange:(DDRange)range; -- (DDRange)ddrangeValue; - -- (NSInteger)ddrangeCompare:(NSValue *)ddrangeValue; - -@end diff --git a/third_party/objc/CocoaHTTPServer/Core/Categories/DDRange.m b/third_party/objc/CocoaHTTPServer/Core/Categories/DDRange.m deleted file mode 100644 index 379e7cf38f3d4..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Core/Categories/DDRange.m +++ /dev/null @@ -1,104 +0,0 @@ -#import "DDRange.h" -#import "DDNumber.h" - -DDRange DDUnionRange(DDRange range1, DDRange range2) -{ - DDRange result; - - result.location = MIN(range1.location, range2.location); - result.length = MAX(DDMaxRange(range1), DDMaxRange(range2)) - result.location; - - return result; -} - -DDRange DDIntersectionRange(DDRange range1, DDRange range2) -{ - DDRange result; - - if((DDMaxRange(range1) < range2.location) || (DDMaxRange(range2) < range1.location)) - { - return DDMakeRange(0, 0); - } - - result.location = MAX(range1.location, range2.location); - result.length = MIN(DDMaxRange(range1), DDMaxRange(range2)) - result.location; - - return result; -} - -NSString *DDStringFromRange(DDRange range) -{ - return [NSString stringWithFormat:@"{%qu, %qu}", range.location, range.length]; -} - -DDRange DDRangeFromString(NSString *aString) -{ - DDRange result = DDMakeRange(0, 0); - - // NSRange will ignore '-' characters, but not '+' characters - NSCharacterSet *cset = [NSCharacterSet characterSetWithCharactersInString:@"+0123456789"]; - - NSScanner *scanner = [NSScanner scannerWithString:aString]; - [scanner setCharactersToBeSkipped:[cset invertedSet]]; - - NSString *str1 = nil; - NSString *str2 = nil; - - BOOL found1 = [scanner scanCharactersFromSet:cset intoString:&str1]; - BOOL found2 = [scanner scanCharactersFromSet:cset intoString:&str2]; - - if(found1) [NSNumber parseString:str1 intoUInt64:&result.location]; - if(found2) [NSNumber parseString:str2 intoUInt64:&result.length]; - - return result; -} - -NSInteger DDRangeCompare(DDRangePointer pDDRange1, DDRangePointer pDDRange2) -{ - // Comparison basis: - // Which range would you encouter first if you started at zero, and began walking towards infinity. - // If you encouter both ranges at the same time, which range would end first. - - if(pDDRange1->location < pDDRange2->location) - { - return NSOrderedAscending; - } - if(pDDRange1->location > pDDRange2->location) - { - return NSOrderedDescending; - } - if(pDDRange1->length < pDDRange2->length) - { - return NSOrderedAscending; - } - if(pDDRange1->length > pDDRange2->length) - { - return NSOrderedDescending; - } - - return NSOrderedSame; -} - -@implementation NSValue (NSValueDDRangeExtensions) - -+ (NSValue *)valueWithDDRange:(DDRange)range -{ - return [NSValue valueWithBytes:&range objCType:@encode(DDRange)]; -} - -- (DDRange)ddrangeValue -{ - DDRange result; - [self getValue:&result]; - return result; -} - -- (NSInteger)ddrangeCompare:(NSValue *)other -{ - DDRange r1 = [self ddrangeValue]; - DDRange r2 = [other ddrangeValue]; - - return DDRangeCompare(&r1, &r2); -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Core/HTTPAuthenticationRequest.h b/third_party/objc/CocoaHTTPServer/Core/HTTPAuthenticationRequest.h deleted file mode 100644 index 4d64236d0abd4..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Core/HTTPAuthenticationRequest.h +++ /dev/null @@ -1,45 +0,0 @@ -#import - -#if TARGET_OS_IPHONE - // Note: You may need to add the CFNetwork Framework to your project - #import -#endif - -@class HTTPMessage; - - -@interface HTTPAuthenticationRequest : NSObject -{ - BOOL isBasic; - BOOL isDigest; - - NSString *base64Credentials; - - NSString *username; - NSString *realm; - NSString *nonce; - NSString *uri; - NSString *qop; - NSString *nc; - NSString *cnonce; - NSString *response; -} -- (id)initWithRequest:(HTTPMessage *)request; - -- (BOOL)isBasic; -- (BOOL)isDigest; - -// Basic -- (NSString *)base64Credentials; - -// Digest -- (NSString *)username; -- (NSString *)realm; -- (NSString *)nonce; -- (NSString *)uri; -- (NSString *)qop; -- (NSString *)nc; -- (NSString *)cnonce; -- (NSString *)response; - -@end diff --git a/third_party/objc/CocoaHTTPServer/Core/HTTPAuthenticationRequest.m b/third_party/objc/CocoaHTTPServer/Core/HTTPAuthenticationRequest.m deleted file mode 100644 index 66b772fc1ec8e..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Core/HTTPAuthenticationRequest.m +++ /dev/null @@ -1,205 +0,0 @@ -#import "HTTPAuthenticationRequest.h" -#import "HTTPMessage.h" - -@interface HTTPAuthenticationRequest (PrivateAPI) -- (NSString *)quotedSubHeaderFieldValue:(NSString *)param fromHeaderFieldValue:(NSString *)header; -- (NSString *)nonquotedSubHeaderFieldValue:(NSString *)param fromHeaderFieldValue:(NSString *)header; -@end - - -@implementation HTTPAuthenticationRequest - -- (id)initWithRequest:(HTTPMessage *)request -{ - if ((self = [super init])) - { - NSString *authInfo = [request headerField:@"Authorization"]; - - isBasic = NO; - if ([authInfo length] >= 6) - { - isBasic = [[authInfo substringToIndex:6] caseInsensitiveCompare:@"Basic "] == NSOrderedSame; - } - - isDigest = NO; - if ([authInfo length] >= 7) - { - isDigest = [[authInfo substringToIndex:7] caseInsensitiveCompare:@"Digest "] == NSOrderedSame; - } - - if (isBasic) - { - NSMutableString *temp = [[[authInfo substringFromIndex:6] mutableCopy] autorelease]; - CFStringTrimWhitespace((CFMutableStringRef)temp); - - base64Credentials = [temp copy]; - } - - if (isDigest) - { - username = [[self quotedSubHeaderFieldValue:@"username" fromHeaderFieldValue:authInfo] retain]; - realm = [[self quotedSubHeaderFieldValue:@"realm" fromHeaderFieldValue:authInfo] retain]; - nonce = [[self quotedSubHeaderFieldValue:@"nonce" fromHeaderFieldValue:authInfo] retain]; - uri = [[self quotedSubHeaderFieldValue:@"uri" fromHeaderFieldValue:authInfo] retain]; - - // It appears from RFC 2617 that the qop is to be given unquoted - // Tests show that Firefox performs this way, but Safari does not - // Thus we'll attempt to retrieve the value as nonquoted, but we'll verify it doesn't start with a quote - qop = [self nonquotedSubHeaderFieldValue:@"qop" fromHeaderFieldValue:authInfo]; - if(qop && ([qop characterAtIndex:0] == '"')) - { - qop = [self quotedSubHeaderFieldValue:@"qop" fromHeaderFieldValue:authInfo]; - } - [qop retain]; - - nc = [[self nonquotedSubHeaderFieldValue:@"nc" fromHeaderFieldValue:authInfo] retain]; - cnonce = [[self quotedSubHeaderFieldValue:@"cnonce" fromHeaderFieldValue:authInfo] retain]; - response = [[self quotedSubHeaderFieldValue:@"response" fromHeaderFieldValue:authInfo] retain]; - } - } - return self; -} - -- (void)dealloc -{ - [base64Credentials release]; - [username release]; - [realm release]; - [nonce release]; - [uri release]; - [qop release]; - [nc release]; - [cnonce release]; - [response release]; - [super dealloc]; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Accessors: -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (BOOL)isBasic { - return isBasic; -} - -- (BOOL)isDigest { - return isDigest; -} - -- (NSString *)base64Credentials { - return base64Credentials; -} - -- (NSString *)username { - return username; -} - -- (NSString *)realm { - return realm; -} - -- (NSString *)nonce { - return nonce; -} - -- (NSString *)uri { - return uri; -} - -- (NSString *)qop { - return qop; -} - -- (NSString *)nc { - return nc; -} - -- (NSString *)cnonce { - return cnonce; -} - -- (NSString *)response { - return response; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Private API: -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * Retrieves a "Sub Header Field Value" from a given header field value. - * The sub header field is expected to be quoted. - * - * In the following header field: - * Authorization: Digest username="Mufasa", qop=auth, response="6629fae4939" - * The sub header field titled 'username' is quoted, and this method would return the value @"Mufasa". -**/ -- (NSString *)quotedSubHeaderFieldValue:(NSString *)param fromHeaderFieldValue:(NSString *)header -{ - NSRange startRange = [header rangeOfString:[NSString stringWithFormat:@"%@=\"", param]]; - if(startRange.location == NSNotFound) - { - // The param was not found anywhere in the header - return nil; - } - - NSUInteger postStartRangeLocation = startRange.location + startRange.length; - NSUInteger postStartRangeLength = [header length] - postStartRangeLocation; - NSRange postStartRange = NSMakeRange(postStartRangeLocation, postStartRangeLength); - - NSRange endRange = [header rangeOfString:@"\"" options:0 range:postStartRange]; - if(endRange.location == NSNotFound) - { - // The ending double-quote was not found anywhere in the header - return nil; - } - - NSRange subHeaderRange = NSMakeRange(postStartRangeLocation, endRange.location - postStartRangeLocation); - return [header substringWithRange:subHeaderRange]; -} - -/** - * Retrieves a "Sub Header Field Value" from a given header field value. - * The sub header field is expected to not be quoted. - * - * In the following header field: - * Authorization: Digest username="Mufasa", qop=auth, response="6629fae4939" - * The sub header field titled 'qop' is nonquoted, and this method would return the value @"auth". -**/ -- (NSString *)nonquotedSubHeaderFieldValue:(NSString *)param fromHeaderFieldValue:(NSString *)header -{ - NSRange startRange = [header rangeOfString:[NSString stringWithFormat:@"%@=", param]]; - if(startRange.location == NSNotFound) - { - // The param was not found anywhere in the header - return nil; - } - - NSUInteger postStartRangeLocation = startRange.location + startRange.length; - NSUInteger postStartRangeLength = [header length] - postStartRangeLocation; - NSRange postStartRange = NSMakeRange(postStartRangeLocation, postStartRangeLength); - - NSRange endRange = [header rangeOfString:@"," options:0 range:postStartRange]; - if(endRange.location == NSNotFound) - { - // The ending comma was not found anywhere in the header - // However, if the nonquoted param is at the end of the string, there would be no comma - // This is only possible if there are no spaces anywhere - NSRange endRange2 = [header rangeOfString:@" " options:0 range:postStartRange]; - if(endRange2.location != NSNotFound) - { - return nil; - } - else - { - return [header substringWithRange:postStartRange]; - } - } - else - { - NSRange subHeaderRange = NSMakeRange(postStartRangeLocation, endRange.location - postStartRangeLocation); - return [header substringWithRange:subHeaderRange]; - } -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Core/HTTPConnection.h b/third_party/objc/CocoaHTTPServer/Core/HTTPConnection.h deleted file mode 100644 index eab4735eefc13..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Core/HTTPConnection.h +++ /dev/null @@ -1,119 +0,0 @@ -#import - -@class GCDAsyncSocket; -@class HTTPMessage; -@class HTTPServer; -@class WebSocket; -@protocol HTTPResponse; - - -#define HTTPConnectionDidDieNotification @"HTTPConnectionDidDie" - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -@interface HTTPConfig : NSObject -{ - HTTPServer *server; - NSString *documentRoot; - dispatch_queue_t queue; -} - -- (id)initWithServer:(HTTPServer *)server documentRoot:(NSString *)documentRoot; -- (id)initWithServer:(HTTPServer *)server documentRoot:(NSString *)documentRoot queue:(dispatch_queue_t)q; - -@property (nonatomic, readonly) HTTPServer *server; -@property (nonatomic, readonly) NSString *documentRoot; -@property (nonatomic, readonly) dispatch_queue_t queue; - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -@interface HTTPConnection : NSObject -{ - dispatch_queue_t connectionQueue; - GCDAsyncSocket *asyncSocket; - HTTPConfig *config; - - BOOL started; - - HTTPMessage *request; - unsigned int numHeaderLines; - - BOOL sentResponseHeaders; - - NSString *nonce; - long lastNC; - - NSObject *httpResponse; - - NSMutableArray *ranges; - NSMutableArray *ranges_headers; - NSString *ranges_boundry; - int rangeIndex; - - UInt64 requestContentLength; - UInt64 requestContentLengthReceived; - UInt64 requestChunkSize; - UInt64 requestChunkSizeReceived; - - NSMutableArray *responseDataSizes; -} - -- (id)initWithAsyncSocket:(GCDAsyncSocket *)newSocket configuration:(HTTPConfig *)aConfig; - -- (void)start; -- (void)stop; - -- (void)startConnection; - -- (BOOL)supportsMethod:(NSString *)method atPath:(NSString *)path; -- (BOOL)expectsRequestBodyFromMethod:(NSString *)method atPath:(NSString *)path; - -- (BOOL)isSecureServer; -- (NSArray *)sslIdentityAndCertificates; - -- (BOOL)isPasswordProtected:(NSString *)path; -- (BOOL)useDigestAccessAuthentication; -- (NSString *)realm; -- (NSString *)passwordForUser:(NSString *)username; - -- (NSDictionary *)parseParams:(NSString *)query; -- (NSDictionary *)parseGetParams; - -- (NSString *)requestURI; - -- (NSArray *)directoryIndexFileNames; -- (NSString *)filePathForURI:(NSString *)path; -- (NSString *)filePathForURI:(NSString *)path allowDirectory:(BOOL)allowDirectory; -- (NSObject *)httpResponseForMethod:(NSString *)method URI:(NSString *)path; -- (WebSocket *)webSocketForURI:(NSString *)path; - -- (void)prepareForBodyWithSize:(UInt64)contentLength; -- (void)processBodyData:(NSData *)postDataChunk; -- (void)finishBody; - -- (void)handleVersionNotSupported:(NSString *)version; -- (void)handleAuthenticationFailed; -- (void)handleResourceNotFound; -- (void)handleInvalidRequest:(NSData *)data; -- (void)handleUnknownMethod:(NSString *)method; - -- (NSData *)preprocessResponse:(HTTPMessage *)response; -- (NSData *)preprocessErrorResponse:(HTTPMessage *)response; - -- (void)finishResponse; - -- (BOOL)shouldDie; -- (void)die; - -@end - -@interface HTTPConnection (AsynchronousHTTPResponse) -- (void)responseHasAvailableData:(NSObject *)sender; -- (void)responseDidAbort:(NSObject *)sender; -@end diff --git a/third_party/objc/CocoaHTTPServer/Core/HTTPConnection.m b/third_party/objc/CocoaHTTPServer/Core/HTTPConnection.m deleted file mode 100644 index d6abd82038f52..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Core/HTTPConnection.m +++ /dev/null @@ -1,2735 +0,0 @@ -#import "GCDAsyncSocket.h" -#import "HTTPServer.h" -#import "HTTPConnection.h" -#import "HTTPMessage.h" -#import "HTTPResponse.h" -#import "HTTPAuthenticationRequest.h" -#import "DDNumber.h" -#import "DDRange.h" -#import "DDData.h" -#import "HTTPFileResponse.h" -#import "HTTPAsyncFileResponse.h" -#import "WebSocket.h" -#import "HTTPLogging.h" - -// Log levels: off, error, warn, info, verbose -// Other flags: trace -static const int httpLogLevel = HTTP_LOG_LEVEL_WARN; // | HTTP_LOG_FLAG_TRACE; - -// Define chunk size used to read in data for responses -// This is how much data will be read from disk into RAM at a time -#if TARGET_OS_IPHONE - #define READ_CHUNKSIZE (1024 * 128) -#else - #define READ_CHUNKSIZE (1024 * 512) -#endif - -// Define chunk size used to read in POST upload data -#if TARGET_OS_IPHONE - #define POST_CHUNKSIZE (1024 * 32) -#else - #define POST_CHUNKSIZE (1024 * 128) -#endif - -// Define the various timeouts (in seconds) for various parts of the HTTP process -#define TIMEOUT_READ_FIRST_HEADER_LINE 30 -#define TIMEOUT_READ_SUBSEQUENT_HEADER_LINE 30 -#define TIMEOUT_READ_BODY -1 -#define TIMEOUT_WRITE_HEAD 30 -#define TIMEOUT_WRITE_BODY -1 -#define TIMEOUT_WRITE_ERROR 30 -#define TIMEOUT_NONCE 300 - -// Define the various limits -// MAX_HEADER_LINE_LENGTH: Max length (in bytes) of any single line in a header (including \r\n) -// MAX_HEADER_LINES : Max number of lines in a single header (including first GET line) -#define MAX_HEADER_LINE_LENGTH 8190 -#define MAX_HEADER_LINES 100 -// MAX_CHUNK_LINE_LENGTH : For accepting chunked transfer uploads, max length of chunk size line (including \r\n) -#define MAX_CHUNK_LINE_LENGTH 200 - -// Define the various tags we'll use to differentiate what it is we're currently doing -#define HTTP_REQUEST_HEADER 10 -#define HTTP_REQUEST_BODY 11 -#define HTTP_REQUEST_CHUNK_SIZE 12 -#define HTTP_REQUEST_CHUNK_DATA 13 -#define HTTP_REQUEST_CHUNK_TRAILER 14 -#define HTTP_REQUEST_CHUNK_FOOTER 15 -#define HTTP_PARTIAL_RESPONSE 20 -#define HTTP_PARTIAL_RESPONSE_HEADER 21 -#define HTTP_PARTIAL_RESPONSE_BODY 22 -#define HTTP_CHUNKED_RESPONSE_HEADER 30 -#define HTTP_CHUNKED_RESPONSE_BODY 31 -#define HTTP_CHUNKED_RESPONSE_FOOTER 32 -#define HTTP_PARTIAL_RANGE_RESPONSE_BODY 40 -#define HTTP_PARTIAL_RANGES_RESPONSE_BODY 50 -#define HTTP_RESPONSE 90 -#define HTTP_FINAL_RESPONSE 91 - -// A quick note about the tags: -// -// The HTTP_RESPONSE and HTTP_FINAL_RESPONSE are designated tags signalling that the response is completely sent. -// That is, in the onSocket:didWriteDataWithTag: method, if the tag is HTTP_RESPONSE or HTTP_FINAL_RESPONSE, -// it is assumed that the response is now completely sent. -// Use HTTP_RESPONSE if it's the end of a response, and you want to start reading more requests afterwards. -// Use HTTP_FINAL_RESPONSE if you wish to terminate the connection after sending the response. -// -// If you are sending multiple data segments in a custom response, make sure that only the last segment has -// the HTTP_RESPONSE tag. For all other segments prior to the last segment use HTTP_PARTIAL_RESPONSE, or some other -// tag of your own invention. - -@interface HTTPConnection (PrivateAPI) -- (void)startReadingRequest; -- (void)sendResponseHeadersAndBody; -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -@implementation HTTPConnection - -static NSMutableArray *recentNonces; - -/** - * This method is automatically called (courtesy of Cocoa) before the first instantiation of this class. - * We use it to initialize any static variables. -**/ -+ (void)initialize -{ - static BOOL initialized = NO; - if(!initialized) - { - // Initialize class variables - recentNonces = [[NSMutableArray alloc] initWithCapacity:5]; - - initialized = YES; - } -} - -/** - * This method is designed to be called by a scheduled timer, and will remove a nonce from the recent nonce list. - * The nonce to remove should be set as the timer's userInfo. -**/ -+ (void)removeRecentNonce:(NSTimer *)aTimer -{ - [recentNonces removeObject:[aTimer userInfo]]; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Init, Dealloc: -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * Sole Constructor. - * Associates this new HTTP connection with the given AsyncSocket. - * This HTTP connection object will become the socket's delegate and take over responsibility for the socket. -**/ -- (id)initWithAsyncSocket:(GCDAsyncSocket *)newSocket configuration:(HTTPConfig *)aConfig -{ - if ((self = [super init])) - { - HTTPLogTrace(); - - if (aConfig.queue) - { - connectionQueue = aConfig.queue; - dispatch_retain(connectionQueue); - } - else - { - connectionQueue = dispatch_queue_create("HTTPConnection", NULL); - } - - // Take over ownership of the socket - asyncSocket = [newSocket retain]; - [asyncSocket setDelegate:self delegateQueue:connectionQueue]; - - // Store configuration - config = [aConfig retain]; - - // Initialize lastNC (last nonce count). - // Used with digest access authentication. - // These must increment for each request from the client. - lastNC = 0; - - // Create a new HTTP message - request = [[HTTPMessage alloc] initEmptyRequest]; - - numHeaderLines = 0; - - responseDataSizes = [[NSMutableArray alloc] initWithCapacity:5]; - } - return self; -} - -/** - * Standard Deconstructor. -**/ -- (void)dealloc -{ - HTTPLogTrace(); - - dispatch_release(connectionQueue); - - [asyncSocket setDelegate:nil delegateQueue:NULL]; - [asyncSocket disconnect]; - [asyncSocket release]; - - [config release]; - - [request release]; - - [nonce release]; - - if ([httpResponse respondsToSelector:@selector(connectionDidClose)]) - { - [httpResponse connectionDidClose]; - } - [httpResponse release]; - - [ranges release]; - [ranges_headers release]; - [ranges_boundry release]; - - [responseDataSizes release]; - - [super dealloc]; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Method Support -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * Returns whether or not the server will accept messages of a given method - * at a particular URI. -**/ -- (BOOL)supportsMethod:(NSString *)method atPath:(NSString *)path -{ - HTTPLogTrace(); - - // Override me to support methods such as POST. - // - // Things you may want to consider: - // - Does the given path represent a resource that is designed to accept this method? - // - If accepting an upload, is the size of the data being uploaded too big? - // To do this you can check the requestContentLength variable. - // - // For more information, you can always access the HTTPMessage request variable. - // - // You should fall through with a call to [super supportsMethod:method atPath:path] - // - // See also: expectsRequestBodyFromMethod:atPath: - - if ([method isEqualToString:@"GET"]) - return YES; - - if ([method isEqualToString:@"HEAD"]) - return YES; - - return NO; -} - -/** - * Returns whether or not the server expects a body from the given method. - * - * In other words, should the server expect a content-length header and associated body from this method. - * This would be true in the case of a POST, where the client is sending data, - * or for something like PUT where the client is supposed to be uploading a file. -**/ -- (BOOL)expectsRequestBodyFromMethod:(NSString *)method atPath:(NSString *)path -{ - HTTPLogTrace(); - - // Override me to add support for other methods that expect the client - // to send a body along with the request header. - // - // You should fall through with a call to [super expectsRequestBodyFromMethod:method atPath:path] - // - // See also: supportsMethod:atPath: - - if ([method isEqualToString:@"POST"]) - return YES; - - if ([method isEqualToString:@"PUT"]) - return YES; - - return NO; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark HTTPS -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * Returns whether or not the server is configured to be a secure server. - * In other words, all connections to this server are immediately secured, thus only secure connections are allowed. - * This is the equivalent of having an https server, where it is assumed that all connections must be secure. - * If this is the case, then unsecure connections will not be allowed on this server, and a separate unsecure server - * would need to be run on a separate port in order to support unsecure connections. - * - * Note: In order to support secure connections, the sslIdentityAndCertificates method must be implemented. -**/ -- (BOOL)isSecureServer -{ - HTTPLogTrace(); - - // Override me to create an https server... - - return NO; -} - -/** - * This method is expected to returns an array appropriate for use in kCFStreamSSLCertificates SSL Settings. - * It should be an array of SecCertificateRefs except for the first element in the array, which is a SecIdentityRef. -**/ -- (NSArray *)sslIdentityAndCertificates -{ - HTTPLogTrace(); - - // Override me to provide the proper required SSL identity. - - return nil; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Password Protection -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * Returns whether or not the requested resource is password protected. - * In this generic implementation, nothing is password protected. -**/ -- (BOOL)isPasswordProtected:(NSString *)path -{ - HTTPLogTrace(); - - // Override me to provide password protection... - // You can configure it for the entire server, or based on the current request - - return NO; -} - -/** - * Returns whether or not the authentication challenge should use digest access authentication. - * The alternative is basic authentication. - * - * If at all possible, digest access authentication should be used because it's more secure. - * Basic authentication sends passwords in the clear and should be avoided unless using SSL/TLS. -**/ -- (BOOL)useDigestAccessAuthentication -{ - HTTPLogTrace(); - - // Override me to customize the authentication scheme - // Make sure you understand the security risks of using the weaker basic authentication - - return YES; -} - -/** - * Returns the authentication realm. - * In this generic implmentation, a default realm is used for the entire server. -**/ -- (NSString *)realm -{ - HTTPLogTrace(); - - // Override me to provide a custom realm... - // You can configure it for the entire server, or based on the current request - - return @"defaultRealm@host.com"; -} - -/** - * Returns the password for the given username. -**/ -- (NSString *)passwordForUser:(NSString *)username -{ - HTTPLogTrace(); - - // Override me to provide proper password authentication - // You can configure a password for the entire server, or custom passwords for users and/or resources - - // Security Note: - // A nil password means no access at all. (Such as for user doesn't exist) - // An empty string password is allowed, and will be treated as any other password. (To support anonymous access) - - return nil; -} - -/** - * Generates and returns an authentication nonce. - * A nonce is a server-specified string uniquely generated for each 401 response. - * The default implementation uses a single nonce for each session. -**/ -- (NSString *)generateNonce -{ - HTTPLogTrace(); - - // We use the Core Foundation UUID class to generate a nonce value for us - // UUIDs (Universally Unique Identifiers) are 128-bit values guaranteed to be unique. - CFUUIDRef theUUID = CFUUIDCreate(NULL); - NSString *newNonce = [NSMakeCollectable(CFUUIDCreateString(NULL, theUUID)) autorelease]; - CFRelease(theUUID); - - // We have to remember that the HTTP protocol is stateless. - // Even though with version 1.1 persistent connections are the norm, they are not guaranteed. - // Thus if we generate a nonce for this connection, - // it should be honored for other connections in the near future. - // - // In fact, this is absolutely necessary in order to support QuickTime. - // When QuickTime makes it's initial connection, it will be unauthorized, and will receive a nonce. - // It then disconnects, and creates a new connection with the nonce, and proper authentication. - // If we don't honor the nonce for the second connection, QuickTime will repeat the process and never connect. - - [recentNonces addObject:newNonce]; - - [NSTimer scheduledTimerWithTimeInterval:TIMEOUT_NONCE - target:[HTTPConnection class] - selector:@selector(removeRecentNonce:) - userInfo:newNonce - repeats:NO]; - return newNonce; -} - -/** - * Returns whether or not the user is properly authenticated. -**/ -- (BOOL)isAuthenticated -{ - HTTPLogTrace(); - - // Extract the authentication information from the Authorization header - HTTPAuthenticationRequest *auth = [[[HTTPAuthenticationRequest alloc] initWithRequest:request] autorelease]; - - if ([self useDigestAccessAuthentication]) - { - // Digest Access Authentication (RFC 2617) - - if(![auth isDigest]) - { - // User didn't send proper digest access authentication credentials - return NO; - } - - if ([auth username] == nil) - { - // The client didn't provide a username - // Most likely they didn't provide any authentication at all - return NO; - } - - NSString *password = [self passwordForUser:[auth username]]; - if (password == nil) - { - // No access allowed (username doesn't exist in system) - return NO; - } - - NSString *url = [[request url] relativeString]; - - if (![url isEqualToString:[auth uri]]) - { - // Requested URL and Authorization URI do not match - // This could be a replay attack - // IE - attacker provides same authentication information, but requests a different resource - return NO; - } - - // The nonce the client provided will most commonly be stored in our local (cached) nonce variable - if (![nonce isEqualToString:[auth nonce]]) - { - // The given nonce may be from another connection - // We need to search our list of recent nonce strings that have been recently distributed - if ([recentNonces containsObject:[auth nonce]]) - { - // Store nonce in local (cached) nonce variable to prevent array searches in the future - [nonce release]; - nonce = [[auth nonce] copy]; - - // The client has switched to using a different nonce value - // This may happen if the client tries to get a file in a directory with different credentials. - // The previous credentials wouldn't work, and the client would receive a 401 error - // along with a new nonce value. The client then uses this new nonce value and requests the file again. - // Whatever the case may be, we need to reset lastNC, since that variable is on a per nonce basis. - lastNC = 0; - } - else - { - // We have no knowledge of ever distributing such a nonce. - // This could be a replay attack from a previous connection in the past. - return NO; - } - } - - long authNC = strtol([[auth nc] UTF8String], NULL, 16); - - if (authNC <= lastNC) - { - // The nc value (nonce count) hasn't been incremented since the last request. - // This could be a replay attack. - return NO; - } - lastNC = authNC; - - NSString *HA1str = [NSString stringWithFormat:@"%@:%@:%@", [auth username], [auth realm], password]; - NSString *HA2str = [NSString stringWithFormat:@"%@:%@", [request method], [auth uri]]; - - NSString *HA1 = [[[HA1str dataUsingEncoding:NSUTF8StringEncoding] md5Digest] hexStringValue]; - - NSString *HA2 = [[[HA2str dataUsingEncoding:NSUTF8StringEncoding] md5Digest] hexStringValue]; - - NSString *responseStr = [NSString stringWithFormat:@"%@:%@:%@:%@:%@:%@", - HA1, [auth nonce], [auth nc], [auth cnonce], [auth qop], HA2]; - - NSString *response = [[[responseStr dataUsingEncoding:NSUTF8StringEncoding] md5Digest] hexStringValue]; - - return [response isEqualToString:[auth response]]; - } - else - { - // Basic Authentication - - if (![auth isBasic]) - { - // User didn't send proper base authentication credentials - return NO; - } - - // Decode the base 64 encoded credentials - NSString *base64Credentials = [auth base64Credentials]; - - NSData *temp = [[base64Credentials dataUsingEncoding:NSUTF8StringEncoding] base64Decoded]; - - NSString *credentials = [[[NSString alloc] initWithData:temp encoding:NSUTF8StringEncoding] autorelease]; - - // The credentials should be of the form "username:password" - // The username is not allowed to contain a colon - - NSRange colonRange = [credentials rangeOfString:@":"]; - - if (colonRange.length == 0) - { - // Malformed credentials - return NO; - } - - NSString *credUsername = [credentials substringToIndex:colonRange.location]; - NSString *credPassword = [credentials substringFromIndex:(colonRange.location + colonRange.length)]; - - NSString *password = [self passwordForUser:credUsername]; - if (password == nil) - { - // No access allowed (username doesn't exist in system) - return NO; - } - - return [password isEqualToString:credPassword]; - } -} - -/** - * Adds a digest access authentication challenge to the given response. -**/ -- (void)addDigestAuthChallenge:(HTTPMessage *)response -{ - HTTPLogTrace(); - - NSString *authFormat = @"Digest realm=\"%@\", qop=\"auth\", nonce=\"%@\""; - NSString *authInfo = [NSString stringWithFormat:authFormat, [self realm], [self generateNonce]]; - - [response setHeaderField:@"WWW-Authenticate" value:authInfo]; -} - -/** - * Adds a basic authentication challenge to the given response. -**/ -- (void)addBasicAuthChallenge:(HTTPMessage *)response -{ - HTTPLogTrace(); - - NSString *authFormat = @"Basic realm=\"%@\""; - NSString *authInfo = [NSString stringWithFormat:authFormat, [self realm]]; - - [response setHeaderField:@"WWW-Authenticate" value:authInfo]; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Core -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * Starting point for the HTTP connection after it has been fully initialized (including subclasses). - * This method is called by the HTTP server. -**/ -- (void)start -{ - dispatch_async(connectionQueue, ^{ - - if (started) return; - started = YES; - - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - [self startConnection]; - - [pool drain]; - }); -} - -/** - * This method is called by the HTTPServer if it is asked to stop. - * The server, in turn, invokes stop on each HTTPConnection instance. -**/ -- (void)stop -{ - dispatch_async(connectionQueue, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - // Disconnect the socket. - // The socketDidDisconnect delegate method will handle everything else. - [asyncSocket disconnect]; - - [pool drain]; - }); -} - -/** - * Starting point for the HTTP connection. -**/ -- (void)startConnection -{ - // Override me to do any custom work before the connection starts. - // - // Be sure to invoke [super startConnection] when you're done. - - HTTPLogTrace(); - - if ([self isSecureServer]) - { - // We are configured to be an HTTPS server. - // That is, we secure via SSL/TLS the connection prior to any communication. - - NSArray *certificates = [self sslIdentityAndCertificates]; - - if ([certificates count] > 0) - { - // All connections are assumed to be secure. Only secure connections are allowed on this server. - NSMutableDictionary *settings = [NSMutableDictionary dictionaryWithCapacity:3]; - - // Configure this connection as the server - [settings setObject:[NSNumber numberWithBool:YES] - forKey:(NSString *)kCFStreamSSLIsServer]; - - [settings setObject:certificates - forKey:(NSString *)kCFStreamSSLCertificates]; - - // Configure this connection to use the highest possible SSL level - [settings setObject:(NSString *)kCFStreamSocketSecurityLevelNegotiatedSSL - forKey:(NSString *)kCFStreamSSLLevel]; - - [asyncSocket startTLS:settings]; - } - } - - [self startReadingRequest]; -} - -/** - * Starts reading an HTTP request. -**/ -- (void)startReadingRequest -{ - HTTPLogTrace(); - - [asyncSocket readDataToData:[GCDAsyncSocket CRLFData] - withTimeout:TIMEOUT_READ_FIRST_HEADER_LINE - maxLength:MAX_HEADER_LINE_LENGTH - tag:HTTP_REQUEST_HEADER]; -} - -/** - * Parses the given query string. - * - * For example, if the query is "q=John%20Mayer%20Trio&num=50" - * then this method would return the following dictionary: - * { - * q = "John Mayer Trio" - * num = "50" - * } -**/ -- (NSDictionary *)parseParams:(NSString *)query -{ - NSArray *components = [query componentsSeparatedByString:@"&"]; - NSMutableDictionary *result = [NSMutableDictionary dictionaryWithCapacity:[components count]]; - - NSUInteger i; - for (i = 0; i < [components count]; i++) - { - NSString *component = [components objectAtIndex:i]; - if ([component length] > 0) - { - NSRange range = [component rangeOfString:@"="]; - if (range.location != NSNotFound) - { - NSString *escapedKey = [component substringToIndex:(range.location + 0)]; - NSString *escapedValue = [component substringFromIndex:(range.location + 1)]; - - if ([escapedKey length] > 0) - { - CFStringRef k, v; - - k = CFURLCreateStringByReplacingPercentEscapes(NULL, (CFStringRef)escapedKey, CFSTR("")); - v = CFURLCreateStringByReplacingPercentEscapes(NULL, (CFStringRef)escapedValue, CFSTR("")); - - NSString *key, *value; - - key = [NSMakeCollectable(k) autorelease]; - value = [NSMakeCollectable(v) autorelease]; - - if (key) - { - if (value) - [result setObject:value forKey:key]; - else - [result setObject:[NSNull null] forKey:key]; - } - } - } - } - } - - return result; -} - -/** - * Parses the query variables in the request URI. - * - * For example, if the request URI was "/search.html?q=John%20Mayer%20Trio&num=50" - * then this method would return the following dictionary: - * { - * q = "John Mayer Trio" - * num = "50" - * } -**/ -- (NSDictionary *)parseGetParams -{ - if(![request isHeaderComplete]) return nil; - - NSDictionary *result = nil; - - NSURL *url = [request url]; - if(url) - { - NSString *query = [url query]; - if (query) - { - result = [self parseParams:query]; - } - } - - return result; -} - -/** - * Attempts to parse the given range header into a series of sequential non-overlapping ranges. - * If successfull, the variables 'ranges' and 'rangeIndex' will be updated, and YES will be returned. - * Otherwise, NO is returned, and the range request should be ignored. - **/ -- (BOOL)parseRangeRequest:(NSString *)rangeHeader withContentLength:(UInt64)contentLength -{ - HTTPLogTrace(); - - // Examples of byte-ranges-specifier values (assuming an entity-body of length 10000): - // - // - The first 500 bytes (byte offsets 0-499, inclusive): bytes=0-499 - // - // - The second 500 bytes (byte offsets 500-999, inclusive): bytes=500-999 - // - // - The final 500 bytes (byte offsets 9500-9999, inclusive): bytes=-500 - // - // - Or bytes=9500- - // - // - The first and last bytes only (bytes 0 and 9999): bytes=0-0,-1 - // - // - Several legal but not canonical specifications of the second 500 bytes (byte offsets 500-999, inclusive): - // bytes=500-600,601-999 - // bytes=500-700,601-999 - // - - NSRange eqsignRange = [rangeHeader rangeOfString:@"="]; - - if(eqsignRange.location == NSNotFound) return NO; - - NSUInteger tIndex = eqsignRange.location; - NSUInteger fIndex = eqsignRange.location + eqsignRange.length; - - NSString *rangeType = [[[rangeHeader substringToIndex:tIndex] mutableCopy] autorelease]; - NSString *rangeValue = [[[rangeHeader substringFromIndex:fIndex] mutableCopy] autorelease]; - - CFStringTrimWhitespace((CFMutableStringRef)rangeType); - CFStringTrimWhitespace((CFMutableStringRef)rangeValue); - - if([rangeType caseInsensitiveCompare:@"bytes"] != NSOrderedSame) return NO; - - NSArray *rangeComponents = [rangeValue componentsSeparatedByString:@","]; - - if([rangeComponents count] == 0) return NO; - - [ranges release]; - ranges = [[NSMutableArray alloc] initWithCapacity:[rangeComponents count]]; - - rangeIndex = 0; - - // Note: We store all range values in the form of DDRange structs, wrapped in NSValue objects. - // Since DDRange consists of UInt64 values, the range extends up to 16 exabytes. - - NSUInteger i; - for (i = 0; i < [rangeComponents count]; i++) - { - NSString *rangeComponent = [rangeComponents objectAtIndex:i]; - - NSRange dashRange = [rangeComponent rangeOfString:@"-"]; - - if (dashRange.location == NSNotFound) - { - // We're dealing with an individual byte number - - UInt64 byteIndex; - if(![NSNumber parseString:rangeComponent intoUInt64:&byteIndex]) return NO; - - if(byteIndex >= contentLength) return NO; - - [ranges addObject:[NSValue valueWithDDRange:DDMakeRange(byteIndex, 1)]]; - } - else - { - // We're dealing with a range of bytes - - tIndex = dashRange.location; - fIndex = dashRange.location + dashRange.length; - - NSString *r1str = [rangeComponent substringToIndex:tIndex]; - NSString *r2str = [rangeComponent substringFromIndex:fIndex]; - - UInt64 r1, r2; - - BOOL hasR1 = [NSNumber parseString:r1str intoUInt64:&r1]; - BOOL hasR2 = [NSNumber parseString:r2str intoUInt64:&r2]; - - if (!hasR1) - { - // We're dealing with a "-[#]" range - // - // r2 is the number of ending bytes to include in the range - - if(!hasR2) return NO; - if(r2 > contentLength) return NO; - - UInt64 startIndex = contentLength - r2; - - [ranges addObject:[NSValue valueWithDDRange:DDMakeRange(startIndex, r2)]]; - } - else if (!hasR2) - { - // We're dealing with a "[#]-" range - // - // r1 is the starting index of the range, which goes all the way to the end - - if(r1 >= contentLength) return NO; - - [ranges addObject:[NSValue valueWithDDRange:DDMakeRange(r1, contentLength - r1)]]; - } - else - { - // We're dealing with a normal "[#]-[#]" range - // - // Note: The range is inclusive. So 0-1 has a length of 2 bytes. - - if(r1 > r2) return NO; - if(r2 >= contentLength) return NO; - - [ranges addObject:[NSValue valueWithDDRange:DDMakeRange(r1, r2 - r1 + 1)]]; - } - } - } - - if([ranges count] == 0) return NO; - - // Now make sure none of the ranges overlap - - for (i = 0; i < [ranges count] - 1; i++) - { - DDRange range1 = [[ranges objectAtIndex:i] ddrangeValue]; - - NSUInteger j; - for (j = i+1; j < [ranges count]; j++) - { - DDRange range2 = [[ranges objectAtIndex:j] ddrangeValue]; - - DDRange iRange = DDIntersectionRange(range1, range2); - - if(iRange.length != 0) - { - return NO; - } - } - } - - // Sort the ranges - - [ranges sortUsingSelector:@selector(ddrangeCompare:)]; - - return YES; -} - -- (NSString *)requestURI -{ - if(request == nil) return nil; - - return [[request url] relativeString]; -} - -/** - * This method is called after a full HTTP request has been received. - * The current request is in the HTTPMessage request variable. -**/ -- (void)replyToHTTPRequest -{ - HTTPLogTrace(); - - if (HTTP_LOG_VERBOSE) - { - NSData *tempData = [request messageData]; - - NSString *tempStr = [[NSString alloc] initWithData:tempData encoding:NSUTF8StringEncoding]; - HTTPLogVerbose(@"%@[%p]: Received HTTP request:\n%@", THIS_FILE, self, tempStr); - [tempStr release]; - } - - // Check the HTTP version - // We only support version 1.0 and 1.1 - - NSString *version = [request version]; - if (![version isEqualToString:HTTPVersion1_1] && ![version isEqualToString:HTTPVersion1_0]) - { - [self handleVersionNotSupported:version]; - return; - } - - // Extract requested URI - NSString *uri = [self requestURI]; - - // Check for WebSocket request - if ([WebSocket isWebSocketRequest:request]) - { - HTTPLogVerbose(@"isWebSocket"); - - WebSocket *ws = [self webSocketForURI:uri]; - - if (ws == nil) - { - [self handleResourceNotFound]; - } - else - { - [ws start]; - - [[config server] addWebSocket:ws]; - - // The WebSocket should now be the delegate of the underlying socket. - // But gracefully handle the situation if it forgot. - if ([asyncSocket delegate] == self) - { - HTTPLogWarn(@"%@[%p]: WebSocket forgot to set itself as socket delegate", THIS_FILE, self); - - // Disconnect the socket. - // The socketDidDisconnect delegate method will handle everything else. - [asyncSocket disconnect]; - } - else - { - // The WebSocket is using the socket, - // so make sure we don't disconnect it in the dealloc method. - [asyncSocket release]; - asyncSocket = nil; - - [self die]; - - // Note: There is a timing issue here that should be pointed out. - // - // A bug that existed in previous versions happend like so: - // - We invoked [self die] - // - This caused us to get released, and our dealloc method to start executing - // - Meanwhile, AsyncSocket noticed a disconnect, and began to dispatch a socketDidDisconnect at us - // - The dealloc method finishes execution, and our instance gets freed - // - The socketDidDisconnect gets run, and a crash occurs - // - // So the issue we want to avoid is releasing ourself when there is a possibility - // that AsyncSocket might be gearing up to queue a socketDidDisconnect for us. - // - // In this particular situation notice that we invoke [asyncSocket delegate]. - // This method is synchronous concerning AsyncSocket's internal socketQueue. - // Which means we can be sure, when it returns, that AsyncSocket has already - // queued any delegate methods for us if it was going to. - // And if the delegate methods are queued, then we've been properly retained. - // Meaning we won't get released / dealloc'd until the delegate method has finished executing. - // - // In this rare situation, the die method will get invoked twice. - } - } - - return; - } - - // Check Authentication (if needed) - // If not properly authenticated for resource, issue Unauthorized response - if ([self isPasswordProtected:uri] && ![self isAuthenticated]) - { - [self handleAuthenticationFailed]; - return; - } - - // Extract the method - NSString *method = [request method]; - - // Note: We already checked to ensure the method was supported in onSocket:didReadData:withTag: - - // Respond properly to HTTP 'GET' and 'HEAD' commands - httpResponse = [[self httpResponseForMethod:method URI:uri] retain]; - - if (httpResponse == nil) - { - [self handleResourceNotFound]; - return; - } - - [self sendResponseHeadersAndBody]; -} - -/** - * Prepares a single-range response. - * - * Note: The returned HTTPMessage is owned by the sender, who is responsible for releasing it. -**/ -- (HTTPMessage *)newUniRangeResponse:(UInt64)contentLength -{ - HTTPLogTrace(); - - // Status Code 206 - Partial Content - HTTPMessage *response = [[HTTPMessage alloc] initResponseWithStatusCode:206 description:nil version:HTTPVersion1_1]; - - DDRange range = [[ranges objectAtIndex:0] ddrangeValue]; - - NSString *contentLengthStr = [NSString stringWithFormat:@"%qu", range.length]; - [response setHeaderField:@"Content-Length" value:contentLengthStr]; - - NSString *rangeStr = [NSString stringWithFormat:@"%qu-%qu", range.location, DDMaxRange(range) - 1]; - NSString *contentRangeStr = [NSString stringWithFormat:@"bytes %@/%qu", rangeStr, contentLength]; - [response setHeaderField:@"Content-Range" value:contentRangeStr]; - - return response; -} - -/** - * Prepares a multi-range response. - * - * Note: The returned HTTPMessage is owned by the sender, who is responsible for releasing it. -**/ -- (HTTPMessage *)newMultiRangeResponse:(UInt64)contentLength -{ - HTTPLogTrace(); - - // Status Code 206 - Partial Content - HTTPMessage *response = [[HTTPMessage alloc] initResponseWithStatusCode:206 description:nil version:HTTPVersion1_1]; - - // We have to send each range using multipart/byteranges - // So each byterange has to be prefix'd and suffix'd with the boundry - // Example: - // - // HTTP/1.1 206 Partial Content - // Content-Length: 220 - // Content-Type: multipart/byteranges; boundary=4554d24e986f76dd6 - // - // - // --4554d24e986f76dd6 - // Content-Range: bytes 0-25/4025 - // - // [...] - // --4554d24e986f76dd6 - // Content-Range: bytes 3975-4024/4025 - // - // [...] - // --4554d24e986f76dd6-- - - ranges_headers = [[NSMutableArray alloc] initWithCapacity:[ranges count]]; - - CFUUIDRef theUUID = CFUUIDCreate(NULL); - ranges_boundry = NSMakeCollectable(CFUUIDCreateString(NULL, theUUID)); - CFRelease(theUUID); - - NSString *startingBoundryStr = [NSString stringWithFormat:@"\r\n--%@\r\n", ranges_boundry]; - NSString *endingBoundryStr = [NSString stringWithFormat:@"\r\n--%@--\r\n", ranges_boundry]; - - UInt64 actualContentLength = 0; - - NSUInteger i; - for (i = 0; i < [ranges count]; i++) - { - DDRange range = [[ranges objectAtIndex:i] ddrangeValue]; - - NSString *rangeStr = [NSString stringWithFormat:@"%qu-%qu", range.location, DDMaxRange(range) - 1]; - NSString *contentRangeVal = [NSString stringWithFormat:@"bytes %@/%qu", rangeStr, contentLength]; - NSString *contentRangeStr = [NSString stringWithFormat:@"Content-Range: %@\r\n\r\n", contentRangeVal]; - - NSString *fullHeader = [startingBoundryStr stringByAppendingString:contentRangeStr]; - NSData *fullHeaderData = [fullHeader dataUsingEncoding:NSUTF8StringEncoding]; - - [ranges_headers addObject:fullHeaderData]; - - actualContentLength += [fullHeaderData length]; - actualContentLength += range.length; - } - - NSData *endingBoundryData = [endingBoundryStr dataUsingEncoding:NSUTF8StringEncoding]; - - actualContentLength += [endingBoundryData length]; - - NSString *contentLengthStr = [NSString stringWithFormat:@"%qu", actualContentLength]; - [response setHeaderField:@"Content-Length" value:contentLengthStr]; - - NSString *contentTypeStr = [NSString stringWithFormat:@"multipart/byteranges; boundary=%@", ranges_boundry]; - [response setHeaderField:@"Content-Type" value:contentTypeStr]; - - return response; -} - -/** - * Returns the chunk size line that must precede each chunk of data when using chunked transfer encoding. - * This consists of the size of the data, in hexadecimal, followed by a CRLF. -**/ -- (NSData *)chunkedTransferSizeLineForLength:(NSUInteger)length -{ - return [[NSString stringWithFormat:@"%lx\r\n", (unsigned long)length] dataUsingEncoding:NSUTF8StringEncoding]; -} - -/** - * Returns the data that signals the end of a chunked transfer. -**/ -- (NSData *)chunkedTransferFooter -{ - // Each data chunk is preceded by a size line (in hex and including a CRLF), - // followed by the data itself, followed by another CRLF. - // After every data chunk has been sent, a zero size line is sent, - // followed by optional footer (which are just more headers), - // and followed by a CRLF on a line by itself. - - return [@"\r\n0\r\n\r\n" dataUsingEncoding:NSUTF8StringEncoding]; -} - -- (void)sendResponseHeadersAndBody -{ - if ([httpResponse respondsToSelector:@selector(delayResponeHeaders)]) - { - if ([httpResponse delayResponeHeaders]) - { - return; - } - } - - BOOL isChunked = NO; - - if ([httpResponse respondsToSelector:@selector(isChunked)]) - { - isChunked = [httpResponse isChunked]; - } - - // If a response is "chunked", this simply means the HTTPResponse object - // doesn't know the content-length in advance. - - UInt64 contentLength = 0; - - if (!isChunked) - { - contentLength = [httpResponse contentLength]; - } - - // Check for specific range request - NSString *rangeHeader = [request headerField:@"Range"]; - - BOOL isRangeRequest = NO; - - // If the response is "chunked" then we don't know the exact content-length. - // This means we'll be unable to process any range requests. - // This is because range requests might include a range like "give me the last 100 bytes" - - if (!isChunked && rangeHeader) - { - if ([self parseRangeRequest:rangeHeader withContentLength:contentLength]) - { - isRangeRequest = YES; - } - } - - HTTPMessage *response; - - if (!isRangeRequest) - { - // Create response - // Default status code: 200 - OK - NSInteger status = 200; - - if ([httpResponse respondsToSelector:@selector(status)]) - { - status = [httpResponse status]; - } - response = [[HTTPMessage alloc] initResponseWithStatusCode:status description:nil version:HTTPVersion1_1]; - - if (isChunked) - { - [response setHeaderField:@"Transfer-Encoding" value:@"chunked"]; - } - else - { - NSString *contentLengthStr = [NSString stringWithFormat:@"%qu", contentLength]; - [response setHeaderField:@"Content-Length" value:contentLengthStr]; - } - } - else - { - if ([ranges count] == 1) - { - response = [self newUniRangeResponse:contentLength]; - } - else - { - response = [self newMultiRangeResponse:contentLength]; - } - } - - BOOL isZeroLengthResponse = !isChunked && (contentLength == 0); - - // If they issue a 'HEAD' command, we don't have to include the file - // If they issue a 'GET' command, we need to include the file - - if ([[request method] isEqualToString:@"HEAD"] || isZeroLengthResponse) - { - NSData *responseData = [self preprocessResponse:response]; - [asyncSocket writeData:responseData withTimeout:TIMEOUT_WRITE_HEAD tag:HTTP_RESPONSE]; - - sentResponseHeaders = YES; - } - else - { - // Write the header response - NSData *responseData = [self preprocessResponse:response]; - [asyncSocket writeData:responseData withTimeout:TIMEOUT_WRITE_HEAD tag:HTTP_PARTIAL_RESPONSE_HEADER]; - - sentResponseHeaders = YES; - - // Now we need to send the body of the response - if (!isRangeRequest) - { - // Regular request - NSData *data = [httpResponse readDataOfLength:READ_CHUNKSIZE]; - - if ([data length] > 0) - { - [responseDataSizes addObject:[NSNumber numberWithUnsignedInteger:[data length]]]; - - if (isChunked) - { - NSData *chunkSize = [self chunkedTransferSizeLineForLength:[data length]]; - [asyncSocket writeData:chunkSize withTimeout:TIMEOUT_WRITE_HEAD tag:HTTP_CHUNKED_RESPONSE_HEADER]; - - [asyncSocket writeData:data withTimeout:TIMEOUT_WRITE_BODY tag:HTTP_CHUNKED_RESPONSE_BODY]; - - if ([httpResponse isDone]) - { - NSData *footer = [self chunkedTransferFooter]; - [asyncSocket writeData:footer withTimeout:TIMEOUT_WRITE_HEAD tag:HTTP_RESPONSE]; - } - else - { - NSData *footer = [GCDAsyncSocket CRLFData]; - [asyncSocket writeData:footer withTimeout:TIMEOUT_WRITE_HEAD tag:HTTP_CHUNKED_RESPONSE_FOOTER]; - } - } - else - { - long tag = [httpResponse isDone] ? HTTP_RESPONSE : HTTP_PARTIAL_RESPONSE_BODY; - [asyncSocket writeData:data withTimeout:TIMEOUT_WRITE_BODY tag:tag]; - } - } - } - else - { - // Client specified a byte range in request - - if ([ranges count] == 1) - { - // Client is requesting a single range - DDRange range = [[ranges objectAtIndex:0] ddrangeValue]; - - [httpResponse setOffset:range.location]; - - NSUInteger bytesToRead = range.length < READ_CHUNKSIZE ? (NSUInteger)range.length : READ_CHUNKSIZE; - - NSData *data = [httpResponse readDataOfLength:bytesToRead]; - - if ([data length] > 0) - { - [responseDataSizes addObject:[NSNumber numberWithUnsignedInteger:[data length]]]; - - long tag = [data length] == range.length ? HTTP_RESPONSE : HTTP_PARTIAL_RANGE_RESPONSE_BODY; - [asyncSocket writeData:data withTimeout:TIMEOUT_WRITE_BODY tag:tag]; - } - } - else - { - // Client is requesting multiple ranges - // We have to send each range using multipart/byteranges - - // Write range header - NSData *rangeHeaderData = [ranges_headers objectAtIndex:0]; - [asyncSocket writeData:rangeHeaderData withTimeout:TIMEOUT_WRITE_HEAD tag:HTTP_PARTIAL_RESPONSE_HEADER]; - - // Start writing range body - DDRange range = [[ranges objectAtIndex:0] ddrangeValue]; - - [httpResponse setOffset:range.location]; - - NSUInteger bytesToRead = range.length < READ_CHUNKSIZE ? (NSUInteger)range.length : READ_CHUNKSIZE; - - NSData *data = [httpResponse readDataOfLength:bytesToRead]; - - if ([data length] > 0) - { - [responseDataSizes addObject:[NSNumber numberWithUnsignedInteger:[data length]]]; - - [asyncSocket writeData:data withTimeout:TIMEOUT_WRITE_BODY tag:HTTP_PARTIAL_RANGES_RESPONSE_BODY]; - } - } - } - } - - [response release]; -} - -/** - * Returns the number of bytes of the http response body that are sitting in asyncSocket's write queue. - * - * We keep track of this information in order to keep our memory footprint low while - * working with asynchronous HTTPResponse objects. -**/ -- (NSUInteger)writeQueueSize -{ - NSUInteger result = 0; - - NSUInteger i; - for(i = 0; i < [responseDataSizes count]; i++) - { - result += [[responseDataSizes objectAtIndex:i] unsignedIntegerValue]; - } - - return result; -} - -/** - * Sends more data, if needed, without growing the write queue over its approximate size limit. - * The last chunk of the response body will be sent with a tag of HTTP_RESPONSE. - * - * This method should only be called for standard (non-range) responses. -**/ -- (void)continueSendingStandardResponseBody -{ - HTTPLogTrace(); - - // This method is called when either asyncSocket has finished writing one of the response data chunks, - // or when an asynchronous HTTPResponse object informs us that it has more available data for us to send. - // In the case of the asynchronous HTTPResponse, we don't want to blindly grab the new data, - // and shove it onto asyncSocket's write queue. - // Doing so could negatively affect the memory footprint of the application. - // Instead, we always ensure that we place no more than READ_CHUNKSIZE bytes onto the write queue. - // - // Note that this does not affect the rate at which the HTTPResponse object may generate data. - // The HTTPResponse is free to do as it pleases, and this is up to the application's developer. - // If the memory footprint is a concern, the developer creating the custom HTTPResponse object may freely - // use the calls to readDataOfLength as an indication to start generating more data. - // This provides an easy way for the HTTPResponse object to throttle its data allocation in step with the rate - // at which the socket is able to send it. - - NSUInteger writeQueueSize = [self writeQueueSize]; - - if(writeQueueSize >= READ_CHUNKSIZE) return; - - NSUInteger available = READ_CHUNKSIZE - writeQueueSize; - NSData *data = [httpResponse readDataOfLength:available]; - - if ([data length] > 0) - { - [responseDataSizes addObject:[NSNumber numberWithUnsignedInteger:[data length]]]; - - BOOL isChunked = NO; - - if ([httpResponse respondsToSelector:@selector(isChunked)]) - { - isChunked = [httpResponse isChunked]; - } - - if (isChunked) - { - NSData *chunkSize = [self chunkedTransferSizeLineForLength:[data length]]; - [asyncSocket writeData:chunkSize withTimeout:TIMEOUT_WRITE_HEAD tag:HTTP_CHUNKED_RESPONSE_HEADER]; - - [asyncSocket writeData:data withTimeout:TIMEOUT_WRITE_BODY tag:HTTP_CHUNKED_RESPONSE_BODY]; - - if([httpResponse isDone]) - { - NSData *footer = [self chunkedTransferFooter]; - [asyncSocket writeData:footer withTimeout:TIMEOUT_WRITE_HEAD tag:HTTP_RESPONSE]; - } - else - { - NSData *footer = [GCDAsyncSocket CRLFData]; - [asyncSocket writeData:footer withTimeout:TIMEOUT_WRITE_HEAD tag:HTTP_CHUNKED_RESPONSE_FOOTER]; - } - } - else - { - long tag = [httpResponse isDone] ? HTTP_RESPONSE : HTTP_PARTIAL_RESPONSE_BODY; - [asyncSocket writeData:data withTimeout:TIMEOUT_WRITE_BODY tag:tag]; - } - } -} - -/** - * Sends more data, if needed, without growing the write queue over its approximate size limit. - * The last chunk of the response body will be sent with a tag of HTTP_RESPONSE. - * - * This method should only be called for single-range responses. -**/ -- (void)continueSendingSingleRangeResponseBody -{ - HTTPLogTrace(); - - // This method is called when either asyncSocket has finished writing one of the response data chunks, - // or when an asynchronous response informs us that is has more available data for us to send. - // In the case of the asynchronous response, we don't want to blindly grab the new data, - // and shove it onto asyncSocket's write queue. - // Doing so could negatively affect the memory footprint of the application. - // Instead, we always ensure that we place no more than READ_CHUNKSIZE bytes onto the write queue. - // - // Note that this does not affect the rate at which the HTTPResponse object may generate data. - // The HTTPResponse is free to do as it pleases, and this is up to the application's developer. - // If the memory footprint is a concern, the developer creating the custom HTTPResponse object may freely - // use the calls to readDataOfLength as an indication to start generating more data. - // This provides an easy way for the HTTPResponse object to throttle its data allocation in step with the rate - // at which the socket is able to send it. - - NSUInteger writeQueueSize = [self writeQueueSize]; - - if(writeQueueSize >= READ_CHUNKSIZE) return; - - DDRange range = [[ranges objectAtIndex:0] ddrangeValue]; - - UInt64 offset = [httpResponse offset]; - UInt64 bytesRead = offset - range.location; - UInt64 bytesLeft = range.length - bytesRead; - - if (bytesLeft > 0) - { - NSUInteger available = READ_CHUNKSIZE - writeQueueSize; - NSUInteger bytesToRead = bytesLeft < available ? (NSUInteger)bytesLeft : available; - - NSData *data = [httpResponse readDataOfLength:bytesToRead]; - - if ([data length] > 0) - { - [responseDataSizes addObject:[NSNumber numberWithUnsignedInteger:[data length]]]; - - long tag = [data length] == bytesLeft ? HTTP_RESPONSE : HTTP_PARTIAL_RANGE_RESPONSE_BODY; - [asyncSocket writeData:data withTimeout:TIMEOUT_WRITE_BODY tag:tag]; - } - } -} - -/** - * Sends more data, if needed, without growing the write queue over its approximate size limit. - * The last chunk of the response body will be sent with a tag of HTTP_RESPONSE. - * - * This method should only be called for multi-range responses. -**/ -- (void)continueSendingMultiRangeResponseBody -{ - HTTPLogTrace(); - - // This method is called when either asyncSocket has finished writing one of the response data chunks, - // or when an asynchronous HTTPResponse object informs us that is has more available data for us to send. - // In the case of the asynchronous HTTPResponse, we don't want to blindly grab the new data, - // and shove it onto asyncSocket's write queue. - // Doing so could negatively affect the memory footprint of the application. - // Instead, we always ensure that we place no more than READ_CHUNKSIZE bytes onto the write queue. - // - // Note that this does not affect the rate at which the HTTPResponse object may generate data. - // The HTTPResponse is free to do as it pleases, and this is up to the application's developer. - // If the memory footprint is a concern, the developer creating the custom HTTPResponse object may freely - // use the calls to readDataOfLength as an indication to start generating more data. - // This provides an easy way for the HTTPResponse object to throttle its data allocation in step with the rate - // at which the socket is able to send it. - - NSUInteger writeQueueSize = [self writeQueueSize]; - - if(writeQueueSize >= READ_CHUNKSIZE) return; - - DDRange range = [[ranges objectAtIndex:rangeIndex] ddrangeValue]; - - UInt64 offset = [httpResponse offset]; - UInt64 bytesRead = offset - range.location; - UInt64 bytesLeft = range.length - bytesRead; - - if (bytesLeft > 0) - { - NSUInteger available = READ_CHUNKSIZE - writeQueueSize; - NSUInteger bytesToRead = bytesLeft < available ? (NSUInteger)bytesLeft : available; - - NSData *data = [httpResponse readDataOfLength:bytesToRead]; - - if ([data length] > 0) - { - [responseDataSizes addObject:[NSNumber numberWithUnsignedInteger:[data length]]]; - - [asyncSocket writeData:data withTimeout:TIMEOUT_WRITE_BODY tag:HTTP_PARTIAL_RANGES_RESPONSE_BODY]; - } - } - else - { - if (++rangeIndex < [ranges count]) - { - // Write range header - NSData *rangeHeader = [ranges_headers objectAtIndex:rangeIndex]; - [asyncSocket writeData:rangeHeader withTimeout:TIMEOUT_WRITE_HEAD tag:HTTP_PARTIAL_RESPONSE_HEADER]; - - // Start writing range body - range = [[ranges objectAtIndex:rangeIndex] ddrangeValue]; - - [httpResponse setOffset:range.location]; - - NSUInteger available = READ_CHUNKSIZE - writeQueueSize; - NSUInteger bytesToRead = range.length < available ? (NSUInteger)range.length : available; - - NSData *data = [httpResponse readDataOfLength:bytesToRead]; - - if ([data length] > 0) - { - [responseDataSizes addObject:[NSNumber numberWithUnsignedInteger:[data length]]]; - - [asyncSocket writeData:data withTimeout:TIMEOUT_WRITE_BODY tag:HTTP_PARTIAL_RANGES_RESPONSE_BODY]; - } - } - else - { - // We're not done yet - we still have to send the closing boundry tag - NSString *endingBoundryStr = [NSString stringWithFormat:@"\r\n--%@--\r\n", ranges_boundry]; - NSData *endingBoundryData = [endingBoundryStr dataUsingEncoding:NSUTF8StringEncoding]; - - [asyncSocket writeData:endingBoundryData withTimeout:TIMEOUT_WRITE_HEAD tag:HTTP_RESPONSE]; - } - } -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Responses -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * Returns an array of possible index pages. - * For example: {"index.html", "index.htm"} -**/ -- (NSArray *)directoryIndexFileNames -{ - HTTPLogTrace(); - - // Override me to support other index pages. - - return [NSArray arrayWithObjects:@"index.html", @"index.htm", nil]; -} - -- (NSString *)filePathForURI:(NSString *)path -{ - return [self filePathForURI:path allowDirectory:NO]; -} - -/** - * Converts relative URI path into full file-system path. -**/ -- (NSString *)filePathForURI:(NSString *)path allowDirectory:(BOOL)allowDirectory -{ - HTTPLogTrace(); - - // Override me to perform custom path mapping. - // For example you may want to use a default file other than index.html, or perhaps support multiple types. - - NSString *documentRoot = [config documentRoot]; - - // Part 0: Validate document root setting. - // - // If there is no configured documentRoot, - // then it makes no sense to try to return anything. - - if (documentRoot == nil) - { - HTTPLogWarn(@"%@[%p]: No configured document root", THIS_FILE, self); - return nil; - } - - // Part 1: Strip parameters from the url - // - // E.g.: /page.html?q=22&var=abc -> /page.html - - NSURL *docRoot = [NSURL fileURLWithPath:documentRoot isDirectory:YES]; - if (docRoot == nil) - { - HTTPLogWarn(@"%@[%p]: Document root is invalid file path", THIS_FILE, self); - return nil; - } - - NSString *relativePath = [[NSURL URLWithString:path relativeToURL:docRoot] relativePath]; - - // Part 2: Append relative path to document root (base path) - // - // E.g.: relativePath="/images/icon.png" - // documentRoot="/Users/robbie/Sites" - // fullPath="/Users/robbie/Sites/images/icon.png" - // - // We also standardize the path. - // - // E.g.: "Users/robbie/Sites/images/../index.html" -> "/Users/robbie/Sites/index.html" - - NSString *fullPath = [[documentRoot stringByAppendingPathComponent:relativePath] stringByStandardizingPath]; - - if ([relativePath isEqualToString:@"/"]) - { - fullPath = [fullPath stringByAppendingString:@"/"]; - } - - // Part 3: Prevent serving files outside the document root. - // - // Sneaky requests may include ".." in the path. - // - // E.g.: relativePath="../Documents/TopSecret.doc" - // documentRoot="/Users/robbie/Sites" - // fullPath="/Users/robbie/Documents/TopSecret.doc" - // - // E.g.: relativePath="../Sites_Secret/TopSecret.doc" - // documentRoot="/Users/robbie/Sites" - // fullPath="/Users/robbie/Sites_Secret/TopSecret" - - if (![documentRoot hasSuffix:@"/"]) - { - documentRoot = [documentRoot stringByAppendingString:@"/"]; - } - - if (![fullPath hasPrefix:documentRoot]) - { - HTTPLogWarn(@"%@[%p]: Request for file outside document root", THIS_FILE, self); - return nil; - } - - // Part 4: Search for index page if path is pointing to a directory - if (!allowDirectory) - { - BOOL isDir = NO; - if ([[NSFileManager defaultManager] fileExistsAtPath:fullPath isDirectory:&isDir] && isDir) - { - NSArray *indexFileNames = [self directoryIndexFileNames]; - - for (NSString *indexFileName in indexFileNames) - { - NSString *indexFilePath = [fullPath stringByAppendingPathComponent:indexFileName]; - - if ([[NSFileManager defaultManager] fileExistsAtPath:indexFilePath isDirectory:&isDir] && !isDir) - { - return indexFilePath; - } - } - - // No matching index files found in directory - return nil; - } - } - - return fullPath; -} - -/** - * This method is called to get a response for a request. - * You may return any object that adopts the HTTPResponse protocol. - * The HTTPServer comes with two such classes: HTTPFileResponse and HTTPDataResponse. - * HTTPFileResponse is a wrapper for an NSFileHandle object, and is the preferred way to send a file response. - * HTTPDataResponse is a wrapper for an NSData object, and may be used to send a custom response. -**/ -- (NSObject *)httpResponseForMethod:(NSString *)method URI:(NSString *)path -{ - HTTPLogTrace(); - - // Override me to provide custom responses. - - NSString *filePath = [self filePathForURI:path allowDirectory:NO]; - - BOOL isDir = NO; - - if (filePath && [[NSFileManager defaultManager] fileExistsAtPath:filePath isDirectory:&isDir] && !isDir) - { - return [[[HTTPFileResponse alloc] initWithFilePath:filePath forConnection:self] autorelease]; - - // Use me instead for asynchronous file IO. - // Generally better for larger files. - - // return [[[HTTPAsyncFileResponse alloc] initWithFilePath:filePath forConnection:self] autorelease]; - } - - return nil; -} - -- (WebSocket *)webSocketForURI:(NSString *)path -{ - HTTPLogTrace(); - - // Override me to provide custom WebSocket responses. - // To do so, simply override the base WebSocket implementation, and add your custom functionality. - // Then return an instance of your custom WebSocket here. - // - // For example: - // - // if ([path isEqualToString:@"/myAwesomeWebSocketStream"]) - // { - // return [[[MyWebSocket alloc] initWithRequest:request socket:asyncSocket] autorelease]; - // } - // - // return [super webSocketForURI:path]; - - return nil; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Uploads -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * This method is called after receiving all HTTP headers, but before reading any of the request body. -**/ -- (void)prepareForBodyWithSize:(UInt64)contentLength -{ - // Override me to allocate buffers, file handles, etc. -} - -/** - * This method is called to handle data read from a POST / PUT. - * The given data is part of the request body. -**/ -- (void)processBodyData:(NSData *)postDataChunk -{ - // Override me to do something useful with a POST / PUT. - // If the post is small, such as a simple form, you may want to simply append the data to the request. - // If the post is big, such as a file upload, you may want to store the file to disk. - // - // Remember: In order to support LARGE POST uploads, the data is read in chunks. - // This prevents a 50 MB upload from being stored in RAM. - // The size of the chunks are limited by the POST_CHUNKSIZE definition. - // Therefore, this method may be called multiple times for the same POST request. -} - -/** - * This method is called after the request body has been fully read but before the HTTP request is processed. -**/ -- (void)finishBody -{ - // Override me to perform any final operations on an upload. - // For example, if you were saving the upload to disk this would be - // the hook to flush any pending data to disk and maybe close the file. -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Errors -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * Called if the HTML version is other than what is supported -**/ -- (void)handleVersionNotSupported:(NSString *)version -{ - // Override me for custom error handling of unsupported http version responses - // If you simply want to add a few extra header fields, see the preprocessErrorResponse: method. - // You can also use preprocessErrorResponse: to add an optional HTML body. - - HTTPLogWarn(@"HTTP Server: Error 505 - Version Not Supported: %@ (%@)", version, [self requestURI]); - - HTTPMessage *response = [[HTTPMessage alloc] initResponseWithStatusCode:505 description:nil version:HTTPVersion1_1]; - [response setHeaderField:@"Content-Length" value:@"0"]; - - NSData *responseData = [self preprocessErrorResponse:response]; - [asyncSocket writeData:responseData withTimeout:TIMEOUT_WRITE_ERROR tag:HTTP_RESPONSE]; - - [response release]; -} - -/** - * Called if the authentication information was required and absent, or if authentication failed. -**/ -- (void)handleAuthenticationFailed -{ - // Override me for custom handling of authentication challenges - // If you simply want to add a few extra header fields, see the preprocessErrorResponse: method. - // You can also use preprocessErrorResponse: to add an optional HTML body. - - HTTPLogInfo(@"HTTP Server: Error 401 - Unauthorized (%@)", [self requestURI]); - - // Status Code 401 - Unauthorized - HTTPMessage *response = [[HTTPMessage alloc] initResponseWithStatusCode:401 description:nil version:HTTPVersion1_1]; - [response setHeaderField:@"Content-Length" value:@"0"]; - - if ([self useDigestAccessAuthentication]) - { - [self addDigestAuthChallenge:response]; - } - else - { - [self addBasicAuthChallenge:response]; - } - - NSData *responseData = [self preprocessErrorResponse:response]; - [asyncSocket writeData:responseData withTimeout:TIMEOUT_WRITE_ERROR tag:HTTP_RESPONSE]; - - [response release]; -} - -/** - * Called if we receive some sort of malformed HTTP request. - * The data parameter is the invalid HTTP header line, including CRLF, as read from GCDAsyncSocket. - * The data parameter may also be nil if the request as a whole was invalid, such as a POST with no Content-Length. -**/ -- (void)handleInvalidRequest:(NSData *)data -{ - // Override me for custom error handling of invalid HTTP requests - // If you simply want to add a few extra header fields, see the preprocessErrorResponse: method. - // You can also use preprocessErrorResponse: to add an optional HTML body. - - HTTPLogWarn(@"HTTP Server: Error 400 - Bad Request (%@)", [self requestURI]); - - // Status Code 400 - Bad Request - HTTPMessage *response = [[HTTPMessage alloc] initResponseWithStatusCode:400 description:nil version:HTTPVersion1_1]; - [response setHeaderField:@"Content-Length" value:@"0"]; - [response setHeaderField:@"Connection" value:@"close"]; - - NSData *responseData = [self preprocessErrorResponse:response]; - [asyncSocket writeData:responseData withTimeout:TIMEOUT_WRITE_ERROR tag:HTTP_FINAL_RESPONSE]; - - [response release]; - - // Note: We used the HTTP_FINAL_RESPONSE tag to disconnect after the response is sent. - // We do this because we couldn't parse the request, - // so we won't be able to recover and move on to another request afterwards. - // In other words, we wouldn't know where the first request ends and the second request begins. -} - -/** - * Called if we receive a HTTP request with a method other than GET or HEAD. -**/ -- (void)handleUnknownMethod:(NSString *)method -{ - // Override me for custom error handling of 405 method not allowed responses. - // If you simply want to add a few extra header fields, see the preprocessErrorResponse: method. - // You can also use preprocessErrorResponse: to add an optional HTML body. - // - // See also: supportsMethod:atPath: - - HTTPLogWarn(@"HTTP Server: Error 405 - Method Not Allowed: %@ (%@)", method, [self requestURI]); - - // Status code 405 - Method Not Allowed - HTTPMessage *response = [[HTTPMessage alloc] initResponseWithStatusCode:405 description:nil version:HTTPVersion1_1]; - [response setHeaderField:@"Content-Length" value:@"0"]; - [response setHeaderField:@"Connection" value:@"close"]; - - NSData *responseData = [self preprocessErrorResponse:response]; - [asyncSocket writeData:responseData withTimeout:TIMEOUT_WRITE_ERROR tag:HTTP_FINAL_RESPONSE]; - - [response release]; - - // Note: We used the HTTP_FINAL_RESPONSE tag to disconnect after the response is sent. - // We do this because the method may include an http body. - // Since we can't be sure, we should close the connection. -} - -/** - * Called if we're unable to find the requested resource. -**/ -- (void)handleResourceNotFound -{ - // Override me for custom error handling of 404 not found responses - // If you simply want to add a few extra header fields, see the preprocessErrorResponse: method. - // You can also use preprocessErrorResponse: to add an optional HTML body. - - HTTPLogInfo(@"HTTP Server: Error 404 - Not Found (%@)", [self requestURI]); - - // Status Code 404 - Not Found - HTTPMessage *response = [[HTTPMessage alloc] initResponseWithStatusCode:404 description:nil version:HTTPVersion1_1]; - [response setHeaderField:@"Content-Length" value:@"0"]; - - NSData *responseData = [self preprocessErrorResponse:response]; - [asyncSocket writeData:responseData withTimeout:TIMEOUT_WRITE_ERROR tag:HTTP_RESPONSE]; - - [response release]; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Headers -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * Gets the current date and time, formatted properly (according to RFC) for insertion into an HTTP header. -**/ -- (NSString *)dateAsString:(NSDate *)date -{ - // From Apple's Documentation (Data Formatting Guide -> Date Formatters -> Cache Formatters for Efficiency): - // - // "Creating a date formatter is not a cheap operation. If you are likely to use a formatter frequently, - // it is typically more efficient to cache a single instance than to create and dispose of multiple instances. - // One approach is to use a static variable." - // - // This was discovered to be true in massive form via issue #46: - // - // "Was doing some performance benchmarking using instruments and httperf. Using this single optimization - // I got a 26% speed improvement - from 1000req/sec to 3800req/sec. Not insignificant. - // The culprit? Why, NSDateFormatter, of course!" - // - // Thus, we are using a static NSDateFormatter here. - - static NSDateFormatter *df; - - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - - // Example: Sun, 06 Nov 1994 08:49:37 GMT - - df = [[NSDateFormatter alloc] init]; - [df setFormatterBehavior:NSDateFormatterBehavior10_4]; - [df setTimeZone:[NSTimeZone timeZoneWithAbbreviation:@"GMT"]]; - [df setDateFormat:@"EEE, dd MMM y HH:mm:ss 'GMT'"]; - [df setLocale:[[[NSLocale alloc] initWithLocaleIdentifier:@"en_US"] autorelease]]; - - // For some reason, using zzz in the format string produces GMT+00:00 - }); - - return [df stringFromDate:date]; -} - -/** - * This method is called immediately prior to sending the response headers. - * This method adds standard header fields, and then converts the response to an NSData object. -**/ -- (NSData *)preprocessResponse:(HTTPMessage *)response -{ - HTTPLogTrace(); - - // Override me to customize the response headers - // You'll likely want to add your own custom headers, and then return [super preprocessResponse:response] - - // Add standard headers - NSString *now = [self dateAsString:[NSDate date]]; - [response setHeaderField:@"Date" value:now]; - - // Add server capability headers - [response setHeaderField:@"Accept-Ranges" value:@"bytes"]; - - // Add optional response headers - if ([httpResponse respondsToSelector:@selector(httpHeaders)]) - { - NSDictionary *responseHeaders = [httpResponse httpHeaders]; - - NSEnumerator *keyEnumerator = [responseHeaders keyEnumerator]; - NSString *key; - - while ((key = [keyEnumerator nextObject])) - { - NSString *value = [responseHeaders objectForKey:key]; - - [response setHeaderField:key value:value]; - } - } - - return [response messageData]; -} - -/** - * This method is called immediately prior to sending the response headers (for an error). - * This method adds standard header fields, and then converts the response to an NSData object. -**/ -- (NSData *)preprocessErrorResponse:(HTTPMessage *)response; -{ - HTTPLogTrace(); - - // Override me to customize the error response headers - // You'll likely want to add your own custom headers, and then return [super preprocessErrorResponse:response] - // - // Notes: - // You can use [response statusCode] to get the type of error. - // You can use [response setBody:data] to add an optional HTML body. - // If you add a body, don't forget to update the Content-Length. - // - // if ([response statusCode] == 404) - // { - // NSString *msg = @"Error 404 - Not Found"; - // NSData *msgData = [msg dataUsingEncoding:NSUTF8StringEncoding]; - // - // [response setBody:msgData]; - // - // NSString *contentLengthStr = [NSString stringWithFormat:@"%lu", (unsigned long)[msgData length]]; - // [response setHeaderField:@"Content-Length" value:contentLengthStr]; - // } - - // Add standard headers - NSString *now = [self dateAsString:[NSDate date]]; - [response setHeaderField:@"Date" value:now]; - - // Add server capability headers - [response setHeaderField:@"Accept-Ranges" value:@"bytes"]; - - // Add optional response headers - if ([httpResponse respondsToSelector:@selector(httpHeaders)]) - { - NSDictionary *responseHeaders = [httpResponse httpHeaders]; - - NSEnumerator *keyEnumerator = [responseHeaders keyEnumerator]; - NSString *key; - - while((key = [keyEnumerator nextObject])) - { - NSString *value = [responseHeaders objectForKey:key]; - - [response setHeaderField:key value:value]; - } - } - - return [response messageData]; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark GCDAsyncSocket Delegate -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * This method is called after the socket has successfully read data from the stream. - * Remember that this method will only be called after the socket reaches a CRLF, or after it's read the proper length. -**/ -- (void)socket:(GCDAsyncSocket *)sock didReadData:(NSData*)data withTag:(long)tag -{ - if (tag == HTTP_REQUEST_HEADER) - { - // Append the header line to the http message - BOOL result = [request appendData:data]; - if (!result) - { - HTTPLogWarn(@"%@[%p]: Malformed request", THIS_FILE, self); - - [self handleInvalidRequest:data]; - } - else if (![request isHeaderComplete]) - { - // We don't have a complete header yet - // That is, we haven't yet received a CRLF on a line by itself, indicating the end of the header - if (++numHeaderLines > MAX_HEADER_LINES) - { - // Reached the maximum amount of header lines in a single HTTP request - // This could be an attempted DOS attack - [asyncSocket disconnect]; - - // Explictly return to ensure we don't do anything after the socket disconnect - return; - } - else - { - [asyncSocket readDataToData:[GCDAsyncSocket CRLFData] - withTimeout:TIMEOUT_READ_SUBSEQUENT_HEADER_LINE - maxLength:MAX_HEADER_LINE_LENGTH - tag:HTTP_REQUEST_HEADER]; - } - } - else - { - // We have an entire HTTP request header from the client - - // Extract the method (such as GET, HEAD, POST, etc) - NSString *method = [request method]; - - // Extract the uri (such as "/index.html") - NSString *uri = [self requestURI]; - - // Check for a Transfer-Encoding field - NSString *transferEncoding = [request headerField:@"Transfer-Encoding"]; - - // Check for a Content-Length field - NSString *contentLength = [request headerField:@"Content-Length"]; - - // Content-Length MUST be present for upload methods (such as POST or PUT) - // and MUST NOT be present for other methods. - BOOL expectsUpload = [self expectsRequestBodyFromMethod:method atPath:uri]; - - if (expectsUpload) - { - if (transferEncoding && ![transferEncoding caseInsensitiveCompare:@"Chunked"]) - { - requestContentLength = -1; - } - else - { - if (contentLength == nil) - { - HTTPLogWarn(@"%@[%p]: Method expects request body, but had no specified Content-Length", - THIS_FILE, self); - - [self handleInvalidRequest:nil]; - return; - } - - if (![NSNumber parseString:(NSString *)contentLength intoUInt64:&requestContentLength]) - { - HTTPLogWarn(@"%@[%p]: Unable to parse Content-Length header into a valid number", - THIS_FILE, self); - - [self handleInvalidRequest:nil]; - return; - } - } - } - else - { - if (contentLength != nil) - { - // Received Content-Length header for method not expecting an upload. - // This better be zero... - - if (![NSNumber parseString:(NSString *)contentLength intoUInt64:&requestContentLength]) - { - HTTPLogWarn(@"%@[%p]: Unable to parse Content-Length header into a valid number", - THIS_FILE, self); - - [self handleInvalidRequest:nil]; - return; - } - - if (requestContentLength > 0) - { - HTTPLogWarn(@"%@[%p]: Method not expecting request body had non-zero Content-Length", - THIS_FILE, self); - - [self handleInvalidRequest:nil]; - return; - } - } - - requestContentLength = 0; - requestContentLengthReceived = 0; - } - - // Check to make sure the given method is supported - if (![self supportsMethod:method atPath:uri]) - { - // The method is unsupported - either in general, or for this specific request - // Send a 405 - Method not allowed response - [self handleUnknownMethod:method]; - return; - } - - if (expectsUpload) - { - // Reset the total amount of data received for the upload - requestContentLengthReceived = 0; - - // Prepare for the upload - [self prepareForBodyWithSize:requestContentLength]; - - if (requestContentLength > 0) - { - // Start reading the request body - if (requestContentLength == -1) - { - // Chunked transfer - - [asyncSocket readDataToData:[GCDAsyncSocket CRLFData] - withTimeout:TIMEOUT_READ_BODY - maxLength:MAX_CHUNK_LINE_LENGTH - tag:HTTP_REQUEST_CHUNK_SIZE]; - } - else - { - NSUInteger bytesToRead; - if (requestContentLength < POST_CHUNKSIZE) - bytesToRead = (NSUInteger)requestContentLength; - else - bytesToRead = POST_CHUNKSIZE; - - [asyncSocket readDataToLength:bytesToRead - withTimeout:TIMEOUT_READ_BODY - tag:HTTP_REQUEST_BODY]; - } - } - else - { - // Empty upload - [self finishBody]; - [self replyToHTTPRequest]; - } - } - else - { - // Now we need to reply to the request - [self replyToHTTPRequest]; - } - } - } - else - { - BOOL doneReadingRequest = NO; - - // A chunked message body contains a series of chunks, - // followed by a line with "0" (zero), - // followed by optional footers (just like headers), - // and a blank line. - // - // Each chunk consists of two parts: - // - // 1. A line with the size of the chunk data, in hex, - // possibly followed by a semicolon and extra parameters you can ignore (none are currently standard), - // and ending with CRLF. - // 2. The data itself, followed by CRLF. - // - // Part 1 is represented by HTTP_REQUEST_CHUNK_SIZE - // Part 2 is represented by HTTP_REQUEST_CHUNK_DATA and HTTP_REQUEST_CHUNK_TRAILER - // where the trailer is the CRLF that follows the data. - // - // The optional footers and blank line are represented by HTTP_REQUEST_CHUNK_FOOTER. - - if (tag == HTTP_REQUEST_CHUNK_SIZE) - { - // We have just read in a line with the size of the chunk data, in hex, - // possibly followed by a semicolon and extra parameters that can be ignored, - // and ending with CRLF. - - NSString *sizeLine = [[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] autorelease]; - - requestChunkSize = (UInt64)strtoull([sizeLine UTF8String], NULL, 16); - requestChunkSizeReceived = 0; - - if (errno != 0) - { - HTTPLogWarn(@"%@[%p]: Method expects chunk size, but received something else", THIS_FILE, self); - - [self handleInvalidRequest:nil]; - return; - } - - if (requestChunkSize > 0) - { - NSUInteger bytesToRead; - bytesToRead = (requestChunkSize < POST_CHUNKSIZE) ? (NSUInteger)requestChunkSize : POST_CHUNKSIZE; - - [asyncSocket readDataToLength:bytesToRead - withTimeout:TIMEOUT_READ_BODY - tag:HTTP_REQUEST_CHUNK_DATA]; - } - else - { - // This is the "0" (zero) line, - // which is to be followed by optional footers (just like headers) and finally a blank line. - - [asyncSocket readDataToData:[GCDAsyncSocket CRLFData] - withTimeout:TIMEOUT_READ_BODY - maxLength:MAX_HEADER_LINE_LENGTH - tag:HTTP_REQUEST_CHUNK_FOOTER]; - } - - return; - } - else if (tag == HTTP_REQUEST_CHUNK_DATA) - { - // We just read part of the actual data. - - requestContentLengthReceived += [data length]; - requestChunkSizeReceived += [data length]; - - [self processBodyData:data]; - - UInt64 bytesLeft = requestChunkSize - requestChunkSizeReceived; - if (bytesLeft > 0) - { - NSUInteger bytesToRead = (bytesLeft < POST_CHUNKSIZE) ? (NSUInteger)bytesLeft : POST_CHUNKSIZE; - - [asyncSocket readDataToLength:bytesToRead - withTimeout:TIMEOUT_READ_BODY - tag:HTTP_REQUEST_CHUNK_DATA]; - } - else - { - // We've read in all the data for this chunk. - // The data is followed by a CRLF, which we need to read (and basically ignore) - - [asyncSocket readDataToLength:2 - withTimeout:TIMEOUT_READ_BODY - tag:HTTP_REQUEST_CHUNK_TRAILER]; - } - - return; - } - else if (tag == HTTP_REQUEST_CHUNK_TRAILER) - { - // This should be the CRLF following the data. - // Just ensure it's a CRLF. - - if (![data isEqualToData:[GCDAsyncSocket CRLFData]]) - { - HTTPLogWarn(@"%@[%p]: Method expects chunk trailer, but is missing", THIS_FILE, self); - - [self handleInvalidRequest:nil]; - return; - } - - // Now continue with the next chunk - - [asyncSocket readDataToData:[GCDAsyncSocket CRLFData] - withTimeout:TIMEOUT_READ_BODY - maxLength:MAX_CHUNK_LINE_LENGTH - tag:HTTP_REQUEST_CHUNK_SIZE]; - - } - else if (tag == HTTP_REQUEST_CHUNK_FOOTER) - { - if (++numHeaderLines > MAX_HEADER_LINES) - { - // Reached the maximum amount of header lines in a single HTTP request - // This could be an attempted DOS attack - [asyncSocket disconnect]; - - // Explictly return to ensure we don't do anything after the socket disconnect - return; - } - - if ([data length] > 2) - { - // We read in a footer. - // In the future we may want to append these to the request. - // For now we ignore, and continue reading the footers, waiting for the final blank line. - - [asyncSocket readDataToData:[GCDAsyncSocket CRLFData] - withTimeout:TIMEOUT_READ_BODY - maxLength:MAX_HEADER_LINE_LENGTH - tag:HTTP_REQUEST_CHUNK_FOOTER]; - } - else - { - doneReadingRequest = YES; - } - } - else // HTTP_REQUEST_BODY - { - // Handle a chunk of data from the POST body - - requestContentLengthReceived += [data length]; - [self processBodyData:data]; - - if (requestContentLengthReceived < requestContentLength) - { - // We're not done reading the post body yet... - - UInt64 bytesLeft = requestContentLength - requestContentLengthReceived; - - NSUInteger bytesToRead = bytesLeft < POST_CHUNKSIZE ? (NSUInteger)bytesLeft : POST_CHUNKSIZE; - - [asyncSocket readDataToLength:bytesToRead - withTimeout:TIMEOUT_READ_BODY - tag:HTTP_REQUEST_BODY]; - } - else - { - doneReadingRequest = YES; - } - } - - // Now that the entire body has been received, we need to reply to the request - - if (doneReadingRequest) - { - [self finishBody]; - [self replyToHTTPRequest]; - } - } -} - -/** - * This method is called after the socket has successfully written data to the stream. -**/ -- (void)socket:(GCDAsyncSocket *)sock didWriteDataWithTag:(long)tag -{ - BOOL doneSendingResponse = NO; - - if (tag == HTTP_PARTIAL_RESPONSE_BODY) - { - // Update the amount of data we have in asyncSocket's write queue - [responseDataSizes removeObjectAtIndex:0]; - - // We only wrote a part of the response - there may be more - [self continueSendingStandardResponseBody]; - } - else if (tag == HTTP_CHUNKED_RESPONSE_BODY) - { - // Update the amount of data we have in asyncSocket's write queue. - // This will allow asynchronous responses to continue sending more data. - [responseDataSizes removeObjectAtIndex:0]; - - // Don't continue sending the response yet. - // The chunked footer that was sent after the body will tell us if we have more data to send. - } - else if (tag == HTTP_CHUNKED_RESPONSE_FOOTER) - { - // Normal chunked footer indicating we have more data to send (non final footer). - [self continueSendingStandardResponseBody]; - } - else if (tag == HTTP_PARTIAL_RANGE_RESPONSE_BODY) - { - // Update the amount of data we have in asyncSocket's write queue - [responseDataSizes removeObjectAtIndex:0]; - - // We only wrote a part of the range - there may be more - [self continueSendingSingleRangeResponseBody]; - } - else if (tag == HTTP_PARTIAL_RANGES_RESPONSE_BODY) - { - // Update the amount of data we have in asyncSocket's write queue - [responseDataSizes removeObjectAtIndex:0]; - - // We only wrote part of the range - there may be more, or there may be more ranges - [self continueSendingMultiRangeResponseBody]; - } - else if (tag == HTTP_RESPONSE || tag == HTTP_FINAL_RESPONSE) - { - // Update the amount of data we have in asyncSocket's write queue - if ([responseDataSizes count] > 0) - { - [responseDataSizes removeObjectAtIndex:0]; - } - - doneSendingResponse = YES; - } - - if (doneSendingResponse) - { - // Inform the http response that we're done - if ([httpResponse respondsToSelector:@selector(connectionDidClose)]) - { - [httpResponse connectionDidClose]; - } - - - if (tag == HTTP_FINAL_RESPONSE) - { - // Cleanup after the last request - [self finishResponse]; - - // Terminate the connection - [asyncSocket disconnect]; - - // Explictly return to ensure we don't do anything after the socket disconnects - return; - } - else - { - if ([self shouldDie]) - { - // Cleanup after the last request - // Note: Don't do this before calling shouldDie, as it needs the request object still. - [self finishResponse]; - - // The only time we should invoke [self die] is from socketDidDisconnect, - // or if the socket gets taken over by someone else like a WebSocket. - - [asyncSocket disconnect]; - } - else - { - // Cleanup after the last request - [self finishResponse]; - - // Prepare for the next request - - // If this assertion fails, it likely means you overrode the - // finishBody method and forgot to call [super finishBody]. - NSAssert(request == nil, @"Request not properly released in finishBody"); - - request = [[HTTPMessage alloc] initEmptyRequest]; - - numHeaderLines = 0; - sentResponseHeaders = NO; - - // And start listening for more requests - [self startReadingRequest]; - } - } - } -} - -/** - * Sent after the socket has been disconnected. -**/ -- (void)socketDidDisconnect:(GCDAsyncSocket *)sock withError:(NSError *)err; -{ - HTTPLogTrace(); - - [asyncSocket release]; - asyncSocket = nil; - - [self die]; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark HTTPResponse Notifications -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * This method may be called by asynchronous HTTPResponse objects. - * That is, HTTPResponse objects that return YES in their "- (BOOL)isAsynchronous" method. - * - * This informs us that the response object has generated more data that we may be able to send. -**/ -- (void)responseHasAvailableData:(NSObject *)sender -{ - HTTPLogTrace(); - - // We always dispatch this asynchronously onto our connectionQueue, - // even if the connectionQueue is the current queue. - // - // We do this to give the HTTPResponse classes the flexibility to call - // this method whenever they want, even from within a readDataOfLength method. - - dispatch_async(connectionQueue, ^{ - - if (sender != httpResponse) - { - HTTPLogWarn(@"%@[%p]: %@ - Sender is not current httpResponse", THIS_FILE, self, THIS_METHOD); - return; - } - - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - if (!sentResponseHeaders) - { - [self sendResponseHeadersAndBody]; - } - else - { - if (ranges == nil) - { - [self continueSendingStandardResponseBody]; - } - else - { - if ([ranges count] == 1) - [self continueSendingSingleRangeResponseBody]; - else - [self continueSendingMultiRangeResponseBody]; - } - } - - [pool drain]; - }); -} - -/** - * This method is called if the response encounters some critical error, - * and it will be unable to fullfill the request. -**/ -- (void)responseDidAbort:(NSObject *)sender -{ - HTTPLogTrace(); - - // We always dispatch this asynchronously onto our connectionQueue, - // even if the connectionQueue is the current queue. - // - // We do this to give the HTTPResponse classes the flexibility to call - // this method whenever they want, even from within a readDataOfLength method. - - dispatch_async(connectionQueue, ^{ - - if (sender != httpResponse) - { - HTTPLogWarn(@"%@[%p]: %@ - Sender is not current httpResponse", THIS_FILE, self, THIS_METHOD); - return; - } - - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - [asyncSocket disconnectAfterWriting]; - - [pool drain]; - }); -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Post Request -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * This method is called after each response has been fully sent. - * Since a single connection may handle multiple request/responses, this method may be called multiple times. - * That is, it will be called after completion of each response. -**/ -- (void)finishResponse -{ - HTTPLogTrace(); - - // Override me if you want to perform any custom actions after a response has been fully sent. - // This is the place to release memory or resources associated with the last request. - // - // If you override this method, you should take care to invoke [super finishResponse] at some point. - - [request release]; - request = nil; - - [httpResponse release]; - httpResponse = nil; - - [ranges release]; - [ranges_headers release]; - [ranges_boundry release]; - ranges = nil; - ranges_headers = nil; - ranges_boundry = nil; -} - -/** - * This method is called after each successful response has been fully sent. - * It determines whether the connection should stay open and handle another request. -**/ -- (BOOL)shouldDie -{ - HTTPLogTrace(); - - // Override me if you have any need to force close the connection. - // You may do so by simply returning YES. - // - // If you override this method, you should take care to fall through with [super shouldDie] - // instead of returning NO. - - - BOOL shouldDie = NO; - - NSString *version = [request version]; - if ([version isEqualToString:HTTPVersion1_1]) - { - // HTTP version 1.1 - // Connection should only be closed if request included "Connection: close" header - - NSString *connection = [request headerField:@"Connection"]; - - shouldDie = (connection && ([connection caseInsensitiveCompare:@"close"] == NSOrderedSame)); - } - else if ([version isEqualToString:HTTPVersion1_0]) - { - // HTTP version 1.0 - // Connection should be closed unless request included "Connection: Keep-Alive" header - - NSString *connection = [request headerField:@"Connection"]; - - if (connection == nil) - shouldDie = YES; - else - shouldDie = [connection caseInsensitiveCompare:@"Keep-Alive"] != NSOrderedSame; - } - - return shouldDie; -} - -- (void)die -{ - HTTPLogTrace(); - - // Override me if you want to perform any custom actions when a connection is closed. - // Then call [super die] when you're done. - // - // See also the finishResponse method. - // - // Important: There is a rare timing condition where this method might get invoked twice. - // If you override this method, you should be prepared for this situation. - - // Inform the http response that we're done - if ([httpResponse respondsToSelector:@selector(connectionDidClose)]) - { - [httpResponse connectionDidClose]; - } - - // Release the http response so we don't call it's connectionDidClose method again in our dealloc method - [httpResponse release]; - httpResponse = nil; - - // Post notification of dead connection - // This will allow our server to release us from its array of connections - [[NSNotificationCenter defaultCenter] postNotificationName:HTTPConnectionDidDieNotification object:self]; -} - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -@implementation HTTPConfig - -@synthesize server; -@synthesize documentRoot; -@synthesize queue; - -- (id)initWithServer:(HTTPServer *)aServer documentRoot:(NSString *)aDocumentRoot -{ - if ((self = [super init])) - { - server = [aServer retain]; - documentRoot = [aDocumentRoot retain]; - } - return self; -} - -- (id)initWithServer:(HTTPServer *)aServer documentRoot:(NSString *)aDocumentRoot queue:(dispatch_queue_t)q -{ - if ((self = [super init])) - { - server = [aServer retain]; - - documentRoot = [aDocumentRoot stringByStandardizingPath]; - if ([documentRoot hasSuffix:@"/"]) - { - documentRoot = [documentRoot stringByAppendingString:@"/"]; - } - [documentRoot retain]; - - if (q) - { - dispatch_retain(q); - queue = q; - } - } - return self; -} - -- (void)dealloc -{ - [server release]; - [documentRoot release]; - - if (queue) - dispatch_release(queue); - - [super dealloc]; -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Core/HTTPLogging.h b/third_party/objc/CocoaHTTPServer/Core/HTTPLogging.h deleted file mode 100644 index fd1703ec04d1d..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Core/HTTPLogging.h +++ /dev/null @@ -1,136 +0,0 @@ -/** - * In order to provide fast and flexible logging, this project uses Cocoa Lumberjack. - * - * The Google Code page has a wealth of documentation if you have any questions. - * http://code.google.com/p/cocoalumberjack/ - * - * Here's what you need to know concerning how logging is setup for CocoaHTTPServer: - * - * There are 4 log levels: - * - Error - * - Warning - * - Info - * - Verbose - * - * In addition to this, there is a Trace flag that can be enabled. - * When tracing is enabled, it spits out the methods that are being called. - * - * Please note that tracing is separate from the log levels. - * For example, one could set the log level to warning, and enable tracing. - * - * All logging is asynchronous, except errors. - * To use logging within your own custom files, follow the steps below. - * - * Step 1: - * Import this header in your implementation file: - * - * #import "HTTPLogging.h" - * - * Step 2: - * Define your logging level in your implementation file: - * - * // Log levels: off, error, warn, info, verbose - * static const int httpLogLevel = HTTP_LOG_LEVEL_VERBOSE; - * - * If you wish to enable tracing, you could do something like this: - * - * // Debug levels: off, error, warn, info, verbose - * static const int httpLogLevel = HTTP_LOG_LEVEL_INFO | HTTP_LOG_FLAG_TRACE; - * - * Step 3: - * Replace your NSLog statements with HTTPLog statements according to the severity of the message. - * - * NSLog(@"Fatal error, no dohickey found!"); -> HTTPLogError(@"Fatal error, no dohickey found!"); - * - * HTTPLog works exactly the same as NSLog. - * This means you can pass it multiple variables just like NSLog. -**/ - -#import "DDLog.h" - -// Define logging context for every log message coming from the HTTP server. -// The logging context can be extracted from the DDLogMessage from within the logging framework, -// which gives loggers, formatters, and filters the ability to optionally process them differently. - -#define HTTP_LOG_CONTEXT 80 - -// Configure log levels. - -#define HTTP_LOG_FLAG_ERROR (1 << 0) // 0...00001 -#define HTTP_LOG_FLAG_WARN (1 << 1) // 0...00010 -#define HTTP_LOG_FLAG_INFO (1 << 2) // 0...00100 -#define HTTP_LOG_FLAG_VERBOSE (1 << 3) // 0...01000 - -#define HTTP_LOG_LEVEL_OFF 0 // 0...00000 -#define HTTP_LOG_LEVEL_ERROR (HTTP_LOG_LEVEL_OFF | HTTP_LOG_FLAG_ERROR) // 0...00001 -#define HTTP_LOG_LEVEL_WARN (HTTP_LOG_LEVEL_ERROR | HTTP_LOG_FLAG_WARN) // 0...00011 -#define HTTP_LOG_LEVEL_INFO (HTTP_LOG_LEVEL_WARN | HTTP_LOG_FLAG_INFO) // 0...00111 -#define HTTP_LOG_LEVEL_VERBOSE (HTTP_LOG_LEVEL_INFO | HTTP_LOG_FLAG_VERBOSE) // 0...01111 - -// Setup fine grained logging. -// The first 4 bits are being used by the standard log levels (0 - 3) -// -// We're going to add tracing, but NOT as a log level. -// Tracing can be turned on and off independently of log level. - -#define HTTP_LOG_FLAG_TRACE (1 << 4) // 0...10000 - -// Setup the usual boolean macros. - -#define HTTP_LOG_ERROR (httpLogLevel & HTTP_LOG_FLAG_ERROR) -#define HTTP_LOG_WARN (httpLogLevel & HTTP_LOG_FLAG_WARN) -#define HTTP_LOG_INFO (httpLogLevel & HTTP_LOG_FLAG_INFO) -#define HTTP_LOG_VERBOSE (httpLogLevel & HTTP_LOG_FLAG_VERBOSE) -#define HTTP_LOG_TRACE (httpLogLevel & HTTP_LOG_FLAG_TRACE) - -// Configure asynchronous logging. -// We follow the default configuration, -// but we reserve a special macro to easily disable asynchronous logging for debugging purposes. - -#define HTTP_LOG_ASYNC_ENABLED YES - -#define HTTP_LOG_ASYNC_ERROR ( NO && HTTP_LOG_ASYNC_ENABLED) -#define HTTP_LOG_ASYNC_WARN (YES && HTTP_LOG_ASYNC_ENABLED) -#define HTTP_LOG_ASYNC_INFO (YES && HTTP_LOG_ASYNC_ENABLED) -#define HTTP_LOG_ASYNC_VERBOSE (YES && HTTP_LOG_ASYNC_ENABLED) -#define HTTP_LOG_ASYNC_TRACE (YES && HTTP_LOG_ASYNC_ENABLED) - -// Define logging primitives. - -#define HTTPLogError(frmt, ...) LOG_OBJC_MAYBE(HTTP_LOG_ASYNC_ERROR, httpLogLevel, HTTP_LOG_FLAG_ERROR, \ - HTTP_LOG_CONTEXT, frmt, ##__VA_ARGS__) - -#define HTTPLogWarn(frmt, ...) LOG_OBJC_MAYBE(HTTP_LOG_ASYNC_WARN, httpLogLevel, HTTP_LOG_FLAG_WARN, \ - HTTP_LOG_CONTEXT, frmt, ##__VA_ARGS__) - -#define HTTPLogInfo(frmt, ...) LOG_OBJC_MAYBE(HTTP_LOG_ASYNC_INFO, httpLogLevel, HTTP_LOG_FLAG_INFO, \ - HTTP_LOG_CONTEXT, frmt, ##__VA_ARGS__) - -#define HTTPLogVerbose(frmt, ...) LOG_OBJC_MAYBE(HTTP_LOG_ASYNC_VERBOSE, httpLogLevel, HTTP_LOG_FLAG_VERBOSE, \ - HTTP_LOG_CONTEXT, frmt, ##__VA_ARGS__) - -#define HTTPLogTrace() LOG_OBJC_MAYBE(HTTP_LOG_ASYNC_TRACE, httpLogLevel, HTTP_LOG_FLAG_TRACE, \ - HTTP_LOG_CONTEXT, @"%@[%p]: %@", THIS_FILE, self, THIS_METHOD) - -#define HTTPLogTrace2(frmt, ...) LOG_OBJC_MAYBE(HTTP_LOG_ASYNC_TRACE, httpLogLevel, HTTP_LOG_FLAG_TRACE, \ - HTTP_LOG_CONTEXT, frmt, ##__VA_ARGS__) - - -#define HTTPLogCError(frmt, ...) LOG_C_MAYBE(HTTP_LOG_ASYNC_ERROR, httpLogLevel, HTTP_LOG_FLAG_ERROR, \ - HTTP_LOG_CONTEXT, frmt, ##__VA_ARGS__) - -#define HTTPLogCWarn(frmt, ...) LOG_C_MAYBE(HTTP_LOG_ASYNC_WARN, httpLogLevel, HTTP_LOG_FLAG_WARN, \ - HTTP_LOG_CONTEXT, frmt, ##__VA_ARGS__) - -#define HTTPLogCInfo(frmt, ...) LOG_C_MAYBE(HTTP_LOG_ASYNC_INFO, httpLogLevel, HTTP_LOG_FLAG_INFO, \ - HTTP_LOG_CONTEXT, frmt, ##__VA_ARGS__) - -#define HTTPLogCVerbose(frmt, ...) LOG_C_MAYBE(HTTP_LOG_ASYNC_VERBOSE, httpLogLevel, HTTP_LOG_FLAG_VERBOSE, \ - HTTP_LOG_CONTEXT, frmt, ##__VA_ARGS__) - -#define HTTPLogCTrace() LOG_C_MAYBE(HTTP_LOG_ASYNC_TRACE, httpLogLevel, HTTP_LOG_FLAG_TRACE, \ - HTTP_LOG_CONTEXT, @"%@[%p]: %@", THIS_FILE, self, __FUNCTION__) - -#define HTTPLogCTrace2(frmt, ...) LOG_C_MAYBE(HTTP_LOG_ASYNC_TRACE, httpLogLevel, HTTP_LOG_FLAG_TRACE, \ - HTTP_LOG_CONTEXT, frmt, ##__VA_ARGS__) - diff --git a/third_party/objc/CocoaHTTPServer/Core/HTTPMessage.h b/third_party/objc/CocoaHTTPServer/Core/HTTPMessage.h deleted file mode 100644 index 20ea921c3b2b8..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Core/HTTPMessage.h +++ /dev/null @@ -1,48 +0,0 @@ -/** - * The HTTPMessage class is a simple Objective-C wrapper around Apple's CFHTTPMessage class. -**/ - -#import - -#if TARGET_OS_IPHONE - // Note: You may need to add the CFNetwork Framework to your project - #import -#endif - -#define HTTPVersion1_0 ((NSString *)kCFHTTPVersion1_0) -#define HTTPVersion1_1 ((NSString *)kCFHTTPVersion1_1) - - -@interface HTTPMessage : NSObject -{ - CFHTTPMessageRef message; -} - -- (id)initEmptyRequest; - -- (id)initRequestWithMethod:(NSString *)method URL:(NSURL *)url version:(NSString *)version; - -- (id)initResponseWithStatusCode:(NSInteger)code description:(NSString *)description version:(NSString *)version; - -- (BOOL)appendData:(NSData *)data; - -- (BOOL)isHeaderComplete; - -- (NSString *)version; - -- (NSString *)method; -- (NSURL *)url; - -- (NSInteger)statusCode; - -- (NSDictionary *)allHeaderFields; -- (NSString *)headerField:(NSString *)headerField; - -- (void)setHeaderField:(NSString *)headerField value:(NSString *)headerFieldValue; - -- (NSData *)messageData; - -- (NSData *)body; -- (void)setBody:(NSData *)body; - -@end diff --git a/third_party/objc/CocoaHTTPServer/Core/HTTPMessage.m b/third_party/objc/CocoaHTTPServer/Core/HTTPMessage.m deleted file mode 100644 index 79a51f1456af7..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Core/HTTPMessage.m +++ /dev/null @@ -1,102 +0,0 @@ -#import "HTTPMessage.h" - - -@implementation HTTPMessage - -- (id)initEmptyRequest -{ - if ((self = [super init])) - { - message = CFHTTPMessageCreateEmpty(NULL, YES); - } - return self; -} - -- (id)initRequestWithMethod:(NSString *)method URL:(NSURL *)url version:(NSString *)version -{ - if ((self = [super init])) - { - message = CFHTTPMessageCreateRequest(NULL, (CFStringRef)method, (CFURLRef)url, (CFStringRef)version); - } - return self; -} - -- (id)initResponseWithStatusCode:(NSInteger)code description:(NSString *)description version:(NSString *)version -{ - if ((self = [super init])) - { - message = CFHTTPMessageCreateResponse(NULL, (CFIndex)code, (CFStringRef)description, (CFStringRef)version); - } - return self; -} - -- (void)dealloc -{ - if (message) - { - CFRelease(message); - } - [super dealloc]; -} - -- (BOOL)appendData:(NSData *)data -{ - return CFHTTPMessageAppendBytes(message, [data bytes], [data length]); -} - -- (BOOL)isHeaderComplete -{ - return CFHTTPMessageIsHeaderComplete(message); -} - -- (NSString *)version -{ - return [NSMakeCollectable(CFHTTPMessageCopyVersion(message)) autorelease]; -} - -- (NSString *)method -{ - return [NSMakeCollectable(CFHTTPMessageCopyRequestMethod(message)) autorelease]; -} - -- (NSURL *)url -{ - return [NSMakeCollectable(CFHTTPMessageCopyRequestURL(message)) autorelease]; -} - -- (NSInteger)statusCode -{ - return (NSInteger)CFHTTPMessageGetResponseStatusCode(message); -} - -- (NSDictionary *)allHeaderFields -{ - return [NSMakeCollectable(CFHTTPMessageCopyAllHeaderFields(message)) autorelease]; -} - -- (NSString *)headerField:(NSString *)headerField -{ - return [NSMakeCollectable(CFHTTPMessageCopyHeaderFieldValue(message, (CFStringRef)headerField)) autorelease]; -} - -- (void)setHeaderField:(NSString *)headerField value:(NSString *)headerFieldValue -{ - CFHTTPMessageSetHeaderFieldValue(message, (CFStringRef)headerField, (CFStringRef)headerFieldValue); -} - -- (NSData *)messageData -{ - return [NSMakeCollectable(CFHTTPMessageCopySerializedMessage(message)) autorelease]; -} - -- (NSData *)body -{ - return [NSMakeCollectable(CFHTTPMessageCopyBody(message)) autorelease]; -} - -- (void)setBody:(NSData *)body -{ - CFHTTPMessageSetBody(message, (CFDataRef)body); -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Core/HTTPResponse.h b/third_party/objc/CocoaHTTPServer/Core/HTTPResponse.h deleted file mode 100644 index c057a8c47738d..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Core/HTTPResponse.h +++ /dev/null @@ -1,149 +0,0 @@ -#import - - -@protocol HTTPResponse - -/** - * Returns the length of the data in bytes. - * If you don't know the length in advance, implement the isChunked method and have it return YES. -**/ -- (UInt64)contentLength; - -/** - * The HTTP server supports range requests in order to allow things like - * file download resumption and optimized streaming on mobile devices. -**/ -- (UInt64)offset; -- (void)setOffset:(UInt64)offset; - -/** - * Returns the data for the response. - * You do not have to return data of the exact length that is given. - * You may optionally return data of a lesser length. - * However, you must never return data of a greater length than requested. - * Doing so could disrupt proper support for range requests. - * - * To support asynchronous responses, read the discussion at the bottom of this header. -**/ -- (NSData *)readDataOfLength:(NSUInteger)length; - -/** - * Should only return YES after the HTTPConnection has read all available data. - * That is, all data for the response has been returned to the HTTPConnection via the readDataOfLength method. -**/ -- (BOOL)isDone; - -@optional - -/** - * If you need time to calculate any part of the HTTP response headers (status code or header fields), - * this method allows you to delay sending the headers so that you may asynchronously execute the calculations. - * Simply implement this method and return YES until you have everything you need concerning the headers. - * - * This method ties into the asynchronous response architecture of the HTTPConnection. - * You should read the full discussion at the bottom of this header. - * - * If you return YES from this method, - * the HTTPConnection will wait for you to invoke the responseHasAvailableData method. - * After you do, the HTTPConnection will again invoke this method to see if the response is ready to send the headers. - * - * You should only delay sending the headers until you have everything you need concerning just the headers. - * Asynchronously generating the body of the response is not an excuse to delay sending the headers. - * Instead you should tie into the asynchronous response architecture, and use techniques such as the isChunked method. - * - * Important: You should read the discussion at the bottom of this header. -**/ -- (BOOL)delayResponeHeaders; - -/** - * Status code for response. - * Allows for responses such as redirect (301), etc. -**/ -- (NSInteger)status; - -/** - * If you want to add any extra HTTP headers to the response, - * simply return them in a dictionary in this method. -**/ -- (NSDictionary *)httpHeaders; - -/** - * If you don't know the content-length in advance, - * implement this method in your custom response class and return YES. - * - * Important: You should read the discussion at the bottom of this header. -**/ -- (BOOL)isChunked; - -/** - * This method is called from the HTTPConnection class when the connection is closed, - * or when the connection is finished with the response. - * If your response is asynchronous, you should implement this method so you know not to - * invoke any methods on the HTTPConnection after this method is called (as the connection may be deallocated). -**/ -- (void)connectionDidClose; - -@end - - -/** - * Important notice to those implementing custom asynchronous and/or chunked responses: - * - * HTTPConnection supports asynchronous responses. All you have to do in your custom response class is - * asynchronously generate the response, and invoke HTTPConnection's responseHasAvailableData method. - * You don't have to wait until you have all of the response ready to invoke this method. For example, if you - * generate the response in incremental chunks, you could call responseHasAvailableData after generating - * each chunk. Please see the HTTPAsyncFileResponse class for an example of how to do this. - * - * The normal flow of events for an HTTPConnection while responding to a request is like this: - * - Send http resopnse headers - * - Get data from response via readDataOfLength method. - * - Add data to asyncSocket's write queue. - * - Wait for asyncSocket to notify it that the data has been sent. - * - Get more data from response via readDataOfLength method. - * - ... continue this cycle until the entire response has been sent. - * - * With an asynchronous response, the flow is a little different. - * - * First the HTTPResponse is given the opportunity to postpone sending the HTTP response headers. - * This allows the response to asynchronously execute any code needed to calculate a part of the header. - * An example might be the response needs to generate some custom header fields, - * or perhaps the response needs to look for a resource on network-attached storage. - * Since the network-attached storage may be slow, the response doesn't know whether to send a 200 or 404 yet. - * In situations such as this, the HTTPResponse simply implements the delayResponseHeaders method and returns YES. - * After returning YES from this method, the HTTPConnection will wait until the response invokes its - * responseHasAvailableData method. After this occurs, the HTTPConnection will again query the delayResponseHeaders - * method to see if the response is ready to send the headers. - * This cycle will continue until the delayResponseHeaders method returns NO. - * - * You should only delay sending the response headers until you have everything you need concerning just the headers. - * Asynchronously generating the body of the response is not an excuse to delay sending the headers. - * - * After the response headers have been sent, the HTTPConnection calls your readDataOfLength method. - * You may or may not have any available data at this point. If you don't, then simply return nil. - * You should later invoke HTTPConnection's responseHasAvailableData when you have data to send. - * - * You don't have to keep track of when you return nil in the readDataOfLength method, or how many times you've invoked - * responseHasAvailableData. Just simply call responseHasAvailableData whenever you've generated new data, and - * return nil in your readDataOfLength whenever you don't have any available data in the requested range. - * HTTPConnection will automatically detect when it should be requesting new data and will act appropriately. - * - * It's important that you also keep in mind that the HTTP server supports range requests. - * The setOffset method is mandatory, and should not be ignored. - * Make sure you take into account the offset within the readDataOfLength method. - * You should also be aware that the HTTPConnection automatically sorts any range requests. - * So if your setOffset method is called with a value of 100, then you can safely release bytes 0-99. - * - * HTTPConnection can also help you keep your memory footprint small. - * Imagine you're dynamically generating a 10 MB response. You probably don't want to load all this data into - * RAM, and sit around waiting for HTTPConnection to slowly send it out over the network. All you need to do - * is pay attention to when HTTPConnection requests more data via readDataOfLength. This is because HTTPConnection - * will never allow asyncSocket's write queue to get much bigger than READ_CHUNKSIZE bytes. You should - * consider how you might be able to take advantage of this fact to generate your asynchronous response on demand, - * while at the same time keeping your memory footprint small, and your application lightning fast. - * - * If you don't know the content-length in advanced, you should also implement the isChunked method. - * This means the response will not include a Content-Length header, and will instead use "Transfer-Encoding: chunked". - * There's a good chance that if your response is asynchronous and dynamic, it's also chunked. - * If your response is chunked, you don't need to worry about range requests. -**/ diff --git a/third_party/objc/CocoaHTTPServer/Core/HTTPServer.h b/third_party/objc/CocoaHTTPServer/Core/HTTPServer.h deleted file mode 100644 index 848d391bf23bc..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Core/HTTPServer.h +++ /dev/null @@ -1,201 +0,0 @@ -#import - -@class GCDAsyncSocket; -@class WebSocket; - -#if TARGET_OS_IPHONE - #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 40000 // iPhone 4.0 - #define IMPLEMENTED_PROTOCOLS - #else - #define IMPLEMENTED_PROTOCOLS - #endif -#else - #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 // Mac OS X 10.6 - #define IMPLEMENTED_PROTOCOLS - #else - #define IMPLEMENTED_PROTOCOLS - #endif -#endif - - -@interface HTTPServer : NSObject IMPLEMENTED_PROTOCOLS -{ - // Underlying asynchronous TCP/IP socket - dispatch_queue_t serverQueue; - dispatch_queue_t connectionQueue; - GCDAsyncSocket *asyncSocket; - - // HTTP server configuration - NSString *documentRoot; - Class connectionClass; - NSString *interface; - UInt16 port; - - // NSNetService and related variables - NSNetService *netService; - NSString *domain; - NSString *type; - NSString *name; - NSString *publishedName; - NSDictionary *txtRecordDictionary; - - // Connection management - NSMutableArray *connections; - NSMutableArray *webSockets; - NSLock *connectionsLock; - NSLock *webSocketsLock; - - BOOL isRunning; -} - -/** - * Specifies the document root to serve files from. - * For example, if you set this to "/Users//Sites", - * then it will serve files out of the local Sites directory (including subdirectories). - * - * The default value is nil. - * The default server configuration will not serve any files until this is set. - * - * If you change the documentRoot while the server is running, - * the change will affect future incoming http connections. -**/ -- (NSString *)documentRoot; -- (void)setDocumentRoot:(NSString *)value; - -/** - * The connection class is the class used to handle incoming HTTP connections. - * - * The default value is [HTTPConnection class]. - * You can override HTTPConnection, and then set this to [MyHTTPConnection class]. - * - * If you change the connectionClass while the server is running, - * the change will affect future incoming http connections. -**/ -- (Class)connectionClass; -- (void)setConnectionClass:(Class)value; - -/** - * Set what interface you'd like the server to listen on. - * By default this is nil, which causes the server to listen on all available interfaces like en1, wifi etc. - * - * The interface may be specified by name (e.g. "en1" or "lo0") or by IP address (e.g. "192.168.4.34"). - * You may also use the special strings "localhost" or "loopback" to specify that - * the socket only accept connections from the local machine. -**/ -- (NSString *)interface; -- (void)setInterface:(NSString *)value; - -/** - * The port number to run the HTTP server on. - * - * The default port number is zero, meaning the server will automatically use any available port. - * This is the recommended port value, as it avoids possible port conflicts with other applications. - * Technologies such as Bonjour can be used to allow other applications to automatically discover the port number. - * - * Note: As is common on most OS's, you need root privledges to bind to port numbers below 1024. - * - * You can change the port property while the server is running, but it won't affect the running server. - * To actually change the port the server is listening for connections on you'll need to restart the server. - * - * The listeningPort method will always return the port number the running server is listening for connections on. - * If the server is not running this method returns 0. -**/ -- (UInt16)port; -- (UInt16)listeningPort; -- (void)setPort:(UInt16)value; - -/** - * Bonjour domain for publishing the service. - * The default value is "local.". - * - * Note: Bonjour publishing requires you set a type. - * - * If you change the domain property after the bonjour service has already been published (server already started), - * you'll need to invoke the republishBonjour method to update the broadcasted bonjour service. -**/ -- (NSString *)domain; -- (void)setDomain:(NSString *)value; - -/** - * Bonjour name for publishing the service. - * The default value is "". - * - * If using an empty string ("") for the service name when registering, - * the system will automatically use the "Computer Name". - * Using an empty string will also handle name conflicts - * by automatically appending a digit to the end of the name. - * - * Note: Bonjour publishing requires you set a type. - * - * If you change the name after the bonjour service has already been published (server already started), - * you'll need to invoke the republishBonjour method to update the broadcasted bonjour service. - * - * The publishedName method will always return the actual name that was published via the bonjour service. - * If the service is not running this method returns nil. -**/ -- (NSString *)name; -- (NSString *)publishedName; -- (void)setName:(NSString *)value; - -/** - * Bonjour type for publishing the service. - * The default value is nil. - * The service will not be published via bonjour unless the type is set. - * - * If you wish to publish the service as a traditional HTTP server, you should set the type to be "_http._tcp.". - * - * If you change the type after the bonjour service has already been published (server already started), - * you'll need to invoke the republishBonjour method to update the broadcasted bonjour service. -**/ -- (NSString *)type; -- (void)setType:(NSString *)value; - -/** - * Republishes the service via bonjour if the server is running. - * If the service was not previously published, this method will publish it (if the server is running). -**/ -- (void)republishBonjour; - -/** - * -**/ -- (NSDictionary *)TXTRecordDictionary; -- (void)setTXTRecordDictionary:(NSDictionary *)dict; - -/** - * Attempts to starts the server on the configured port, interface, etc. - * - * If an error occurs, this method returns NO and sets the errPtr (if given). - * Otherwise returns YES on success. - * - * Some examples of errors that might occur: - * - You specified the server listen on a port which is already in use by another application. - * - You specified the server listen on a port number below 1024, which requires root priviledges. - * - * Code Example: - * - * NSError *err = nil; - * if (![httpServer start:&err]) - * { - * NSLog(@"Error starting http server: %@", err); - * } -**/ -- (BOOL)start:(NSError **)errPtr; - -/** - * Stops the server, preventing it from accepting any new connections. - * You may specify whether or not you want to close the existing client connections. - * - * The default stop method (with no arguments) will close any existing connections. (It invokes [self stop:NO]) -**/ -- (void)stop; -- (void)stop:(BOOL)keepExistingConnections; - -- (BOOL)isRunning; - -- (void)addWebSocket:(WebSocket *)ws; - -- (NSUInteger)numberOfHTTPConnections; -- (NSUInteger)numberOfWebSocketConnections; - -@end diff --git a/third_party/objc/CocoaHTTPServer/Core/HTTPServer.m b/third_party/objc/CocoaHTTPServer/Core/HTTPServer.m deleted file mode 100644 index 20c39a4734e4c..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Core/HTTPServer.m +++ /dev/null @@ -1,789 +0,0 @@ -#import "HTTPServer.h" -#import "GCDAsyncSocket.h" -#import "HTTPConnection.h" -#import "WebSocket.h" -#import "HTTPLogging.h" - -// Log levels: off, error, warn, info, verbose -// Other flags: trace -static const int httpLogLevel = HTTP_LOG_LEVEL_INFO; // | HTTP_LOG_FLAG_TRACE; - -@interface HTTPServer (PrivateAPI) - -- (void)unpublishBonjour; -- (void)publishBonjour; - -+ (void)startBonjourThreadIfNeeded; -+ (void)performBonjourBlock:(dispatch_block_t)block; - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -@implementation HTTPServer - -/** - * Standard Constructor. - * Instantiates an HTTP server, but does not start it. -**/ -- (id)init -{ - if ((self = [super init])) - { - HTTPLogTrace(); - - // Initialize underlying dispatch queue and GCD based tcp socket - serverQueue = dispatch_queue_create("HTTPServer", NULL); - asyncSocket = [[GCDAsyncSocket alloc] initWithDelegate:self delegateQueue:serverQueue]; - - // Use default connection class of HTTPConnection - connectionQueue = dispatch_queue_create("HTTPConnection", NULL); - connectionClass = [HTTPConnection self]; - - // By default bind on all available interfaces, en1, wifi etc - interface = nil; - - // Use a default port of 0 - // This will allow the kernel to automatically pick an open port for us - port = 0; - - // Configure default values for bonjour service - - // Bonjour domain. Use the local domain by default - domain = @"local."; - - // If using an empty string ("") for the service name when registering, - // the system will automatically use the "Computer Name". - // Passing in an empty string will also handle name conflicts - // by automatically appending a digit to the end of the name. - name = @""; - - // Initialize arrays to hold all the HTTP and webSocket connections - connections = [[NSMutableArray alloc] init]; - webSockets = [[NSMutableArray alloc] init]; - - connectionsLock = [[NSLock alloc] init]; - webSocketsLock = [[NSLock alloc] init]; - - // Register for notifications of closed connections - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(connectionDidDie:) - name:HTTPConnectionDidDieNotification - object:nil]; - - // Register for notifications of closed websocket connections - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(webSocketDidDie:) - name:WebSocketDidDieNotification - object:nil]; - - isRunning = NO; - } - return self; -} - -/** - * Standard Deconstructor. - * Stops the server, and clients, and releases any resources connected with this instance. -**/ -- (void)dealloc -{ - HTTPLogTrace(); - - // Remove notification observer - [[NSNotificationCenter defaultCenter] removeObserver:self]; - - // Stop the server if it's running - [self stop]; - - // Release all instance variables - - dispatch_release(serverQueue); - dispatch_release(connectionQueue); - - [asyncSocket setDelegate:nil delegateQueue:NULL]; - [asyncSocket release]; - - [documentRoot release]; - [interface release]; - - [netService release]; - [domain release]; - [name release]; - [type release]; - [txtRecordDictionary release]; - - [connections release]; - [webSockets release]; - [connectionsLock release]; - [webSocketsLock release]; - - [super dealloc]; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Server Configuration -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * The document root is filesystem root for the webserver. - * Thus requests for /index.html will be referencing the index.html file within the document root directory. - * All file requests are relative to this document root. -**/ -- (NSString *)documentRoot -{ - __block NSString *result; - - dispatch_sync(serverQueue, ^{ - result = [documentRoot retain]; - }); - - return [result autorelease]; -} - -- (void)setDocumentRoot:(NSString *)value -{ - HTTPLogTrace(); - - // Document root used to be of type NSURL. - // Add type checking for early warning to developers upgrading from older versions. - - if (value && ![value isKindOfClass:[NSString class]]) - { - HTTPLogWarn(@"%@: %@ - Expecting NSString parameter, received %@ parameter", - THIS_FILE, THIS_METHOD, NSStringFromClass([value class])); - return; - } - - NSString *valueCopy = [value copy]; - - dispatch_async(serverQueue, ^{ - [documentRoot release]; - documentRoot = [valueCopy retain]; - }); - - [valueCopy release]; -} - -/** - * The connection class is the class that will be used to handle connections. - * That is, when a new connection is created, an instance of this class will be intialized. - * The default connection class is HTTPConnection. - * If you use a different connection class, it is assumed that the class extends HTTPConnection -**/ -- (Class)connectionClass -{ - __block Class result; - - dispatch_sync(serverQueue, ^{ - result = connectionClass; - }); - - return result; -} - -- (void)setConnectionClass:(Class)value -{ - HTTPLogTrace(); - - dispatch_async(serverQueue, ^{ - connectionClass = value; - }); -} - -/** - * What interface to bind the listening socket to. -**/ -- (NSString *)interface -{ - __block NSString *result; - - dispatch_sync(serverQueue, ^{ - result = [interface retain]; - }); - - return [result autorelease]; -} - -- (void)setInterface:(NSString *)value -{ - NSString *valueCopy = [value copy]; - - dispatch_async(serverQueue, ^{ - [interface release]; - interface = [valueCopy retain]; - }); - - [valueCopy release]; -} - -/** - * The port to listen for connections on. - * By default this port is initially set to zero, which allows the kernel to pick an available port for us. - * After the HTTP server has started, the port being used may be obtained by this method. -**/ -- (UInt16)port -{ - __block UInt16 result; - - dispatch_sync(serverQueue, ^{ - result = port; - }); - - return result; -} - -- (UInt16)listeningPort -{ - __block UInt16 result; - - dispatch_sync(serverQueue, ^{ - if (isRunning) - result = [asyncSocket localPort]; - else - result = 0; - }); - - return result; -} - -- (void)setPort:(UInt16)value -{ - HTTPLogTrace(); - - dispatch_async(serverQueue, ^{ - port = value; - }); -} - -/** - * Domain on which to broadcast this service via Bonjour. - * The default domain is @"local". -**/ -- (NSString *)domain -{ - __block NSString *result; - - dispatch_sync(serverQueue, ^{ - result = [domain retain]; - }); - - return [domain autorelease]; -} - -- (void)setDomain:(NSString *)value -{ - HTTPLogTrace(); - - NSString *valueCopy = [value copy]; - - dispatch_async(serverQueue, ^{ - [domain release]; - domain = [valueCopy retain]; - }); - - [valueCopy release]; -} - -/** - * The name to use for this service via Bonjour. - * The default name is an empty string, - * which should result in the published name being the host name of the computer. -**/ -- (NSString *)name -{ - __block NSString *result; - - dispatch_sync(serverQueue, ^{ - result = [name retain]; - }); - - return [name autorelease]; -} - -- (NSString *)publishedName -{ - __block NSString *result; - - dispatch_sync(serverQueue, ^{ - - if (netService == nil) - { - result = nil; - } - else - { - - dispatch_block_t bonjourBlock = ^{ - result = [[netService name] copy]; - }; - - [[self class] performBonjourBlock:bonjourBlock]; - } - }); - - return [result autorelease]; -} - -- (void)setName:(NSString *)value -{ - NSString *valueCopy = [value copy]; - - dispatch_async(serverQueue, ^{ - [name release]; - name = [valueCopy retain]; - }); - - [valueCopy release]; -} - -/** - * The type of service to publish via Bonjour. - * No type is set by default, and one must be set in order for the service to be published. -**/ -- (NSString *)type -{ - __block NSString *result; - - dispatch_sync(serverQueue, ^{ - result = [type retain]; - }); - - return [result autorelease]; -} - -- (void)setType:(NSString *)value -{ - NSString *valueCopy = [value copy]; - - dispatch_async(serverQueue, ^{ - [type release]; - type = [valueCopy retain]; - }); - - [valueCopy release]; -} - -/** - * The extra data to use for this service via Bonjour. -**/ -- (NSDictionary *)TXTRecordDictionary -{ - __block NSDictionary *result; - - dispatch_sync(serverQueue, ^{ - result = [txtRecordDictionary retain]; - }); - - return [result autorelease]; -} -- (void)setTXTRecordDictionary:(NSDictionary *)value -{ - HTTPLogTrace(); - - NSDictionary *valueCopy = [value copy]; - - dispatch_async(serverQueue, ^{ - - [txtRecordDictionary release]; - txtRecordDictionary = [valueCopy retain]; - - // Update the txtRecord of the netService if it has already been published - if (netService) - { - NSNetService *theNetService = netService; - NSData *txtRecordData = nil; - if (txtRecordDictionary) - txtRecordData = [NSNetService dataFromTXTRecordDictionary:txtRecordDictionary]; - - dispatch_block_t bonjourBlock = ^{ - [theNetService setTXTRecordData:txtRecordData]; - }; - - [[self class] performBonjourBlock:bonjourBlock]; - } - }); - - [valueCopy release]; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Server Control -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (BOOL)start:(NSError **)errPtr -{ - HTTPLogTrace(); - - __block BOOL success = YES; - __block NSError *err = nil; - - dispatch_sync(serverQueue, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - success = [asyncSocket acceptOnInterface:interface port:port error:&err]; - if (success) - { - HTTPLogInfo(@"%@: Started HTTP server on port %hu", THIS_FILE, [asyncSocket localPort]); - - isRunning = YES; - [self publishBonjour]; - } - else - { - HTTPLogError(@"%@: Failed to start HTTP Server: %@", THIS_FILE, err); - [err retain]; - } - - [pool drain]; - }); - - if (errPtr) - *errPtr = [err autorelease]; - else - [err release]; - - return success; -} - -- (void)stop -{ - [self stop:NO]; -} - -- (void)stop:(BOOL)keepExistingConnections -{ - HTTPLogTrace(); - - dispatch_sync(serverQueue, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - // First stop publishing the service via bonjour - [self unpublishBonjour]; - - // Stop listening / accepting incoming connections - [asyncSocket disconnect]; - isRunning = NO; - - if (!keepExistingConnections) - { - // Stop all HTTP connections the server owns - [connectionsLock lock]; - for (HTTPConnection *connection in connections) - { - [connection stop]; - } - [connections removeAllObjects]; - [connectionsLock unlock]; - - // Stop all WebSocket connections the server owns - [webSocketsLock lock]; - for (WebSocket *webSocket in webSockets) - { - [webSocket stop]; - } - [webSockets removeAllObjects]; - [webSocketsLock unlock]; - } - - [pool drain]; - }); -} - -- (BOOL)isRunning -{ - __block BOOL result; - - dispatch_sync(serverQueue, ^{ - result = isRunning; - }); - - return result; -} - -- (void)addWebSocket:(WebSocket *)ws -{ - [webSocketsLock lock]; - - HTTPLogTrace(); - [webSockets addObject:ws]; - - [webSocketsLock unlock]; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Server Status -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * Returns the number of http client connections that are currently connected to the server. -**/ -- (NSUInteger)numberOfHTTPConnections -{ - NSUInteger result = 0; - - [connectionsLock lock]; - result = [connections count]; - [connectionsLock unlock]; - - return result; -} - -/** - * Returns the number of websocket client connections that are currently connected to the server. -**/ -- (NSUInteger)numberOfWebSocketConnections -{ - NSUInteger result = 0; - - [webSocketsLock lock]; - result = [webSockets count]; - [webSocketsLock unlock]; - - return result; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Incoming Connections -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (HTTPConfig *)config -{ - // Override me if you want to provide a custom config to the new connection. - // - // Generally this involves overriding the HTTPConfig class to include any custom settings, - // and then having this method return an instance of 'MyHTTPConfig'. - - // Note: Think you can make the server faster by putting each connection on its own queue? - // Then benchmark it before and after and discover for yourself the shocking truth! - // - // Try the apache benchmark tool (already installed on your Mac): - // $ ab -n 1000 -c 1 http://localhost:/some_path.html - - return [[[HTTPConfig alloc] initWithServer:self documentRoot:documentRoot queue:connectionQueue] autorelease]; -} - -- (void)socket:(GCDAsyncSocket *)sock didAcceptNewSocket:(GCDAsyncSocket *)newSocket -{ - HTTPConnection *newConnection = (HTTPConnection *)[[connectionClass alloc] initWithAsyncSocket:newSocket - configuration:[self config]]; - [connectionsLock lock]; - [connections addObject:newConnection]; - [connectionsLock unlock]; - - [newConnection start]; - [newConnection release]; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Bonjour -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (void)publishBonjour -{ - HTTPLogTrace(); - - NSAssert(dispatch_get_current_queue() == serverQueue, @"Invalid queue"); - - if (type) - { - netService = [[NSNetService alloc] initWithDomain:domain type:type name:name port:[asyncSocket localPort]]; - [netService setDelegate:self]; - - NSNetService *theNetService = netService; - NSData *txtRecordData = nil; - if (txtRecordDictionary) - txtRecordData = [NSNetService dataFromTXTRecordDictionary:txtRecordDictionary]; - - dispatch_block_t bonjourBlock = ^{ - - [theNetService removeFromRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes]; - [theNetService scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes]; - [theNetService publish]; - - // Do not set the txtRecordDictionary prior to publishing!!! - // This will cause the OS to crash!!! - if (txtRecordData) - { - [theNetService setTXTRecordData:txtRecordData]; - } - }; - - [[self class] startBonjourThreadIfNeeded]; - [[self class] performBonjourBlock:bonjourBlock]; - } -} - -- (void)unpublishBonjour -{ - HTTPLogTrace(); - - NSAssert(dispatch_get_current_queue() == serverQueue, @"Invalid queue"); - - if (netService) - { - NSNetService *theNetService = netService; - - dispatch_block_t bonjourBlock = ^{ - - [theNetService stop]; - [theNetService release]; - }; - - [[self class] performBonjourBlock:bonjourBlock]; - - netService = nil; - } -} - -/** - * Republishes the service via bonjour if the server is running. - * If the service was not previously published, this method will publish it (if the server is running). -**/ -- (void)republishBonjour -{ - HTTPLogTrace(); - - dispatch_async(serverQueue, ^{ - - [self unpublishBonjour]; - [self publishBonjour]; - }); -} - -/** - * Called when our bonjour service has been successfully published. - * This method does nothing but output a log message telling us about the published service. -**/ -- (void)netServiceDidPublish:(NSNetService *)ns -{ - // Override me to do something here... - // - // Note: This method is invoked on our bonjour thread. - - HTTPLogInfo(@"Bonjour Service Published: domain(%@) type(%@) name(%@)", [ns domain], [ns type], [ns name]); -} - -/** - * Called if our bonjour service failed to publish itself. - * This method does nothing but output a log message telling us about the published service. -**/ -- (void)netService:(NSNetService *)ns didNotPublish:(NSDictionary *)errorDict -{ - // Override me to do something here... - // - // Note: This method in invoked on our bonjour thread. - - HTTPLogWarn(@"Failed to Publish Service: domain(%@) type(%@) name(%@) - %@", - [ns domain], [ns type], [ns name], errorDict); -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Notifications -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * This method is automatically called when a notification of type HTTPConnectionDidDieNotification is posted. - * It allows us to remove the connection from our array. -**/ -- (void)connectionDidDie:(NSNotification *)notification -{ - // Note: This method is called on the connection queue that posted the notification - - [connectionsLock lock]; - - HTTPLogTrace(); - [connections removeObject:[notification object]]; - - [connectionsLock unlock]; -} - -/** - * This method is automatically called when a notification of type WebSocketDidDieNotification is posted. - * It allows us to remove the websocket from our array. -**/ -- (void)webSocketDidDie:(NSNotification *)notification -{ - // Note: This method is called on the connection queue that posted the notification - - [webSocketsLock lock]; - - HTTPLogTrace(); - [webSockets removeObject:[notification object]]; - - [webSocketsLock unlock]; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Bonjour Thread -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * NSNetService is runloop based, so it requires a thread with a runloop. - * This gives us two options: - * - * - Use the main thread - * - Setup our own dedicated thread - * - * Since we have various blocks of code that need to synchronously access the netservice objects, - * using the main thread becomes troublesome and a potential for deadlock. -**/ - -static NSThread *bonjourThread; - -+ (void)startBonjourThreadIfNeeded -{ - HTTPLogTrace(); - - static dispatch_once_t predicate; - dispatch_once(&predicate, ^{ - - HTTPLogVerbose(@"%@: Starting bonjour thread...", THIS_FILE); - - bonjourThread = [[NSThread alloc] initWithTarget:self - selector:@selector(bonjourThread) - object:nil]; - [bonjourThread start]; - }); -} - -+ (void)bonjourThread -{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - HTTPLogVerbose(@"%@: BonjourThread: Started", THIS_FILE); - - // We can't run the run loop unless it has an associated input source or a timer. - // So we'll just create a timer that will never fire - unless the server runs for 10,000 years. - - [NSTimer scheduledTimerWithTimeInterval:DBL_MAX target:self selector:@selector(ignore:) userInfo:nil repeats:YES]; - - [[NSRunLoop currentRunLoop] run]; - - HTTPLogVerbose(@"%@: BonjourThread: Aborted", THIS_FILE); - - [pool drain]; -} - -+ (void)executeBonjourBlock:(dispatch_block_t)block -{ - HTTPLogTrace(); - - NSAssert([NSThread currentThread] == bonjourThread, @"Executed on incorrect thread"); - - block(); -} - -+ (void)performBonjourBlock:(dispatch_block_t)block -{ - HTTPLogTrace(); - - [self performSelector:@selector(executeBonjourBlock:) - onThread:bonjourThread - withObject:block - waitUntilDone:YES]; -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Core/Responses/HTTPAsyncFileResponse.h b/third_party/objc/CocoaHTTPServer/Core/Responses/HTTPAsyncFileResponse.h deleted file mode 100644 index 93e33828bd02d..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Core/Responses/HTTPAsyncFileResponse.h +++ /dev/null @@ -1,75 +0,0 @@ -#import -#import "HTTPResponse.h" - -@class HTTPConnection; - -/** - * This is an asynchronous version of HTTPFileResponse. - * It reads data from the given file asynchronously via GCD. - * - * It may be overriden to allow custom post-processing of the data that has been read from the file. - * An example of this is the HTTPDynamicFileResponse class. -**/ - -@interface HTTPAsyncFileResponse : NSObject -{ - HTTPConnection *connection; - - NSString *filePath; - UInt64 fileLength; - UInt64 fileOffset; // File offset as pertains to data given to connection - UInt64 readOffset; // File offset as pertains to data read from file (but maybe not returned to connection) - - BOOL aborted; - - NSData *data; - - int fileFD; - void *readBuffer; - NSUInteger readBufferSize; // Malloced size of readBuffer - NSUInteger readBufferOffset; // Offset within readBuffer where the end of existing data is - NSUInteger readRequestLength; - dispatch_queue_t readQueue; - dispatch_source_t readSource; - BOOL readSourceSuspended; -} - -- (id)initWithFilePath:(NSString *)filePath forConnection:(HTTPConnection *)connection; -- (NSString *)filePath; - -@end - -/** - * Explanation of Variables (excluding those that are obvious) - * - * fileOffset - * This is the number of bytes that have been returned to the connection via the readDataOfLength method. - * If 1KB of data has been read from the file, but none of that data has yet been returned to the connection, - * then the fileOffset variable remains at zero. - * This variable is used in the calculation of the isDone method. - * Only after all data has been returned to the connection are we actually done. - * - * readOffset - * Represents the offset of the file descriptor. - * In other words, the file position indidcator for our read stream. - * It might be easy to think of it as the total number of bytes that have been read from the file. - * However, this isn't entirely accurate, as the setOffset: method may have caused us to - * jump ahead in the file (lseek). - * - * readBuffer - * Malloc'd buffer to hold data read from the file. - * - * readBufferSize - * Total allocation size of malloc'd buffer. - * - * readBufferOffset - * Represents the position in the readBuffer where we should store new bytes. - * - * readRequestLength - * The total number of bytes that were requested from the connection. - * It's OK if we return a lesser number of bytes to the connection. - * It's NOT OK if we return a greater number of bytes to the connection. - * Doing so would disrupt proper support for range requests. - * If, however, the response is chunked then we don't need to worry about this. - * Chunked responses inheritly don't support range requests. -**/ \ No newline at end of file diff --git a/third_party/objc/CocoaHTTPServer/Core/Responses/HTTPAsyncFileResponse.m b/third_party/objc/CocoaHTTPServer/Core/Responses/HTTPAsyncFileResponse.m deleted file mode 100644 index d03aa77050e8b..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Core/Responses/HTTPAsyncFileResponse.m +++ /dev/null @@ -1,403 +0,0 @@ -#import "HTTPAsyncFileResponse.h" -#import "HTTPConnection.h" -#import "HTTPLogging.h" - -#import -#import - -// Log levels : off, error, warn, info, verbose -// Other flags: trace -static const int httpLogLevel = HTTP_LOG_LEVEL_WARN; // | HTTP_LOG_FLAG_TRACE; - -#define NULL_FD -1 - -/** - * Architecure overview: - * - * HTTPConnection will invoke our readDataOfLength: method to fetch data. - * We will return nil, and then proceed to read the data via our readSource on our readQueue. - * Once the requested amount of data has been read, we then pause our readSource, - * and inform the connection of the available data. - * - * While our read is in progress, we don't have to worry about the connection calling any other methods, - * except the connectionDidClose method, which would be invoked if the remote end closed the socket connection. - * To safely handle this, we do a synchronous dispatch on the readQueue, - * and nilify the connection as well as cancel our readSource. - * - * In order to minimize resource consumption during a HEAD request, - * we don't open the file until we have to (until the connection starts requesting data). -**/ - -@implementation HTTPAsyncFileResponse - -- (id)initWithFilePath:(NSString *)fpath forConnection:(HTTPConnection *)parent -{ - if ((self = [super init])) - { - HTTPLogTrace(); - - connection = parent; // Parents retain children, children do NOT retain parents - - fileFD = NULL_FD; - filePath = [fpath copy]; - if (filePath == nil) - { - HTTPLogWarn(@"%@: Init failed - Nil filePath", THIS_FILE); - - [self release]; - return nil; - } - - NSDictionary *fileAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:filePath error:NULL]; - if (fileAttributes == nil) - { - HTTPLogWarn(@"%@: Init failed - Unable to get file attributes. filePath: %@", THIS_FILE, filePath); - - [self release]; - return nil; - } - - fileLength = (UInt64)[[fileAttributes objectForKey:NSFileSize] unsignedLongLongValue]; - fileOffset = 0; - - aborted = NO; - - // We don't bother opening the file here. - // If this is a HEAD request we only need to know the fileLength. - } - return self; -} - -- (void)abort -{ - HTTPLogTrace(); - - [connection responseDidAbort:self]; - aborted = YES; -} - -- (void)processReadBuffer -{ - // This method is here to allow superclasses to perform post-processing of the data. - // For an example, see the HTTPDynamicFileResponse class. - // - // At this point, the readBuffer has readBufferOffset bytes available. - // This method is in charge of updating the readBufferOffset. - // Failure to do so will cause the readBuffer to grow to fileLength. (Imagine a 1 GB file...) - - // Copy the data out of the temporary readBuffer. - data = [[NSData alloc] initWithBytes:readBuffer length:readBufferOffset]; - - // Reset the read buffer. - readBufferOffset = 0; - - // Notify the connection that we have data available for it. - [connection responseHasAvailableData:self]; -} - -- (void)pauseReadSource -{ - if (!readSourceSuspended) - { - HTTPLogVerbose(@"%@[%p]: Suspending readSource", THIS_FILE, self); - - readSourceSuspended = YES; - dispatch_suspend(readSource); - } -} - -- (void)resumeReadSource -{ - if (readSourceSuspended) - { - HTTPLogVerbose(@"%@[%p]: Resuming readSource", THIS_FILE, self); - - readSourceSuspended = NO; - dispatch_resume(readSource); - } -} - -- (void)cancelReadSource -{ - HTTPLogVerbose(@"%@[%p]: Canceling readSource", THIS_FILE, self); - - dispatch_source_cancel(readSource); - - // Cancelling a dispatch source doesn't - // invoke the cancel handler if the dispatch source is paused. - - if (readSourceSuspended) - { - readSourceSuspended = NO; - dispatch_resume(readSource); - } -} - -- (BOOL)openFileAndSetupReadSource -{ - HTTPLogTrace(); - - fileFD = open([filePath UTF8String], (O_RDONLY | O_NONBLOCK)); - if (fileFD == NULL_FD) - { - HTTPLogError(@"%@: Unable to open file. filePath: %@", THIS_FILE, filePath); - - return NO; - } - - HTTPLogVerbose(@"%@[%p]: Open fd[%i] -> %@", THIS_FILE, self, fileFD, filePath); - - readQueue = dispatch_queue_create("HTTPAsyncFileResponse", NULL); - readSource = dispatch_source_create(DISPATCH_SOURCE_TYPE_READ, fileFD, 0, readQueue); - - - dispatch_source_set_event_handler(readSource, ^{ - - HTTPLogTrace2(@"%@: eventBlock - fd[%i]", THIS_FILE, fileFD); - - // Determine how much data we should read. - // - // It is OK if we ask to read more bytes than exist in the file. - // It is NOT OK to over-allocate the buffer. - - unsigned long long _bytesAvailableOnFD = dispatch_source_get_data(readSource); - - UInt64 _bytesLeftInFile = fileLength - readOffset; - - NSUInteger bytesAvailableOnFD; - NSUInteger bytesLeftInFile; - - bytesAvailableOnFD = (_bytesAvailableOnFD > NSUIntegerMax) ? NSUIntegerMax : (NSUInteger)_bytesAvailableOnFD; - bytesLeftInFile = (_bytesLeftInFile > NSUIntegerMax) ? NSUIntegerMax : (NSUInteger)_bytesLeftInFile; - - NSUInteger bytesLeftInRequest = readRequestLength - readBufferOffset; - - NSUInteger bytesLeft = MIN(bytesLeftInRequest, bytesLeftInFile); - - NSUInteger bytesToRead = MIN(bytesAvailableOnFD, bytesLeft); - - // Make sure buffer is big enough for read request. - // Do not over-allocate. - - if (readBuffer == NULL || bytesToRead > (readBufferSize - readBufferOffset)) - { - readBufferSize = bytesToRead; - readBuffer = reallocf(readBuffer, (size_t)bytesToRead); - - if (readBuffer == NULL) - { - HTTPLogError(@"%@[%p]: Unable to allocate buffer", THIS_FILE, self); - - [self pauseReadSource]; - [self abort]; - - return; - } - } - - // Perform the read - - HTTPLogVerbose(@"%@[%p]: Attempting to read %lu bytes from file", THIS_FILE, self, bytesToRead); - - ssize_t result = read(fileFD, readBuffer + readBufferOffset, (size_t)bytesToRead); - - // Check the results - if (result < 0) - { - HTTPLogError(@"%@: Error(%i) reading file(%@)", THIS_FILE, errno, filePath); - - [self pauseReadSource]; - [self abort]; - } - else if (result == 0) - { - HTTPLogError(@"%@: Read EOF on file(%@)", THIS_FILE, filePath); - - [self pauseReadSource]; - [self abort]; - } - else // (result > 0) - { - HTTPLogVerbose(@"%@[%p]: Read %d bytes from file", THIS_FILE, self, result); - - readOffset += result; - readBufferOffset += result; - - [self pauseReadSource]; - [self processReadBuffer]; - } - - }); - - int theFileFD = fileFD; - dispatch_source_t theReadSource = readSource; - - dispatch_source_set_cancel_handler(readSource, ^{ - - // Do not access self from within this block in any way, shape or form. - // - // Note: You access self if you reference an iVar. - - HTTPLogTrace2(@"%@: cancelBlock - Close fd[%i]", THIS_FILE, theFileFD); - - dispatch_release(theReadSource); - close(theFileFD); - }); - - readSourceSuspended = YES; - - return YES; -} - -- (BOOL)openFileIfNeeded -{ - if (aborted) - { - // The file operation has been aborted. - // This could be because we failed to open the file, - // or the reading process failed. - return NO; - } - - if (fileFD != NULL_FD) - { - // File has already been opened. - return YES; - } - - return [self openFileAndSetupReadSource]; -} - -- (UInt64)contentLength -{ - HTTPLogTrace2(@"%@[%p]: contentLength - %llu", THIS_FILE, self, fileLength); - - return fileLength; -} - -- (UInt64)offset -{ - HTTPLogTrace(); - - return fileOffset; -} - -- (void)setOffset:(UInt64)offset -{ - HTTPLogTrace2(@"%@[%p]: setOffset:%llu", THIS_FILE, self, offset); - - if (![self openFileIfNeeded]) - { - // File opening failed, - // or response has been aborted due to another error. - return; - } - - fileOffset = offset; - readOffset = offset; - - off_t result = lseek(fileFD, (off_t)offset, SEEK_SET); - if (result == -1) - { - HTTPLogError(@"%@[%p]: lseek failed - errno(%i) filePath(%@)", THIS_FILE, self, errno, filePath); - - [self abort]; - } -} - -- (NSData *)readDataOfLength:(NSUInteger)length -{ - HTTPLogTrace2(@"%@[%p]: readDataOfLength:%lu", THIS_FILE, self, (unsigned long)length); - - if (data) - { - NSUInteger dataLength = [data length]; - - HTTPLogVerbose(@"%@[%p]: Returning data of length %lu", THIS_FILE, self, dataLength); - - fileOffset += dataLength; - - NSData *result = data; - data = nil; - - return [result autorelease]; - } - else - { - if (![self openFileIfNeeded]) - { - // File opening failed, - // or response has been aborted due to another error. - return nil; - } - - dispatch_sync(readQueue, ^{ - - NSAssert(readSourceSuspended, @"Invalid logic - perhaps HTTPConnection has changed."); - - readRequestLength = length; - [self resumeReadSource]; - }); - - return nil; - } -} - -- (BOOL)isDone -{ - BOOL result = (fileOffset == fileLength); - - HTTPLogTrace2(@"%@[%p]: isDone - %@", THIS_FILE, self, (result ? @"YES" : @"NO")); - - return result; -} - -- (NSString *)filePath -{ - return filePath; -} - -- (BOOL)isAsynchronous -{ - HTTPLogTrace(); - - return YES; -} - -- (void)connectionDidClose -{ - HTTPLogTrace(); - - if (fileFD != NULL_FD) - { - dispatch_sync(readQueue, ^{ - - // Prevent any further calls to the connection - connection = nil; - - // Cancel the readSource. - // We do this here because the readSource's eventBlock has retained self. - // In other words, if we don't cancel the readSource, we will never get deallocated. - - [self cancelReadSource]; - }); - } -} - -- (void)dealloc -{ - HTTPLogTrace(); - - if (readQueue) - dispatch_release(readQueue); - - if (readBuffer) - free(readBuffer); - - [filePath release]; - [data release]; - - [super dealloc]; -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Core/Responses/HTTPDataResponse.h b/third_party/objc/CocoaHTTPServer/Core/Responses/HTTPDataResponse.h deleted file mode 100644 index 66c5e401aff90..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Core/Responses/HTTPDataResponse.h +++ /dev/null @@ -1,13 +0,0 @@ -#import -#import "HTTPResponse.h" - - -@interface HTTPDataResponse : NSObject -{ - NSUInteger offset; - NSData *data; -} - -- (id)initWithData:(NSData *)data; - -@end diff --git a/third_party/objc/CocoaHTTPServer/Core/Responses/HTTPDataResponse.m b/third_party/objc/CocoaHTTPServer/Core/Responses/HTTPDataResponse.m deleted file mode 100644 index a2bb3a5a05b6a..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Core/Responses/HTTPDataResponse.m +++ /dev/null @@ -1,77 +0,0 @@ -#import "HTTPDataResponse.h" -#import "HTTPLogging.h" - -// Log levels : off, error, warn, info, verbose -// Other flags: trace -static const int httpLogLevel = HTTP_LOG_LEVEL_OFF; // | HTTP_LOG_FLAG_TRACE; - - -@implementation HTTPDataResponse - -- (id)initWithData:(NSData *)dataParam -{ - if((self = [super init])) - { - HTTPLogTrace(); - - offset = 0; - data = [dataParam retain]; - } - return self; -} - -- (void)dealloc -{ - HTTPLogTrace(); - - [data release]; - [super dealloc]; -} - -- (UInt64)contentLength -{ - UInt64 result = (UInt64)[data length]; - - HTTPLogTrace2(@"%@[%p]: contentLength - %llu", THIS_FILE, self, result); - - return result; -} - -- (UInt64)offset -{ - HTTPLogTrace(); - - return offset; -} - -- (void)setOffset:(UInt64)offsetParam -{ - HTTPLogTrace2(@"%@[%p]: setOffset:%llu", THIS_FILE, self, offset); - - offset = (NSUInteger)offsetParam; -} - -- (NSData *)readDataOfLength:(NSUInteger)lengthParameter -{ - HTTPLogTrace2(@"%@[%p]: readDataOfLength:%lu", THIS_FILE, self, (unsigned long)lengthParameter); - - NSUInteger remaining = [data length] - offset; - NSUInteger length = lengthParameter < remaining ? lengthParameter : remaining; - - void *bytes = (void *)([data bytes] + offset); - - offset += length; - - return [NSData dataWithBytesNoCopy:bytes length:length freeWhenDone:NO]; -} - -- (BOOL)isDone -{ - BOOL result = (offset == [data length]); - - HTTPLogTrace2(@"%@[%p]: isDone - %@", THIS_FILE, self, (result ? @"YES" : @"NO")); - - return result; -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Core/Responses/HTTPDynamicFileResponse.h b/third_party/objc/CocoaHTTPServer/Core/Responses/HTTPDynamicFileResponse.h deleted file mode 100644 index d2763192fb51f..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Core/Responses/HTTPDynamicFileResponse.h +++ /dev/null @@ -1,52 +0,0 @@ -#import -#import "HTTPResponse.h" -#import "HTTPAsyncFileResponse.h" - -/** - * This class is designed to assist with dynamic content. - * Imagine you have a file that you want to make dynamic: - * - * - * - *

ComputerName Control Panel

- * ... - *
  • System Time: SysTime
  • - * - * - * - * Now you could generate the entire file in Objective-C, - * but this would be a horribly tedious process. - * Beside, you want to design the file with professional tools to make it look pretty. - * - * So all you have to do is escape your dynamic content like this: - * - * ... - *

    %%ComputerName%% Control Panel

    - * ... - *
  • System Time: %%SysTime%%
  • - * - * And then you create an instance of this class with: - * - * - separator = @"%%" - * - replacementDictionary = { "ComputerName"="Black MacBook", "SysTime"="2010-04-30 03:18:24" } - * - * This class will then perform the replacements for you, on the fly, as it reads the file data. - * This class is also asynchronous, so it will perform the file IO using its own GCD queue. - * - * All keys for the replacementDictionary must be NSString's. - * Values for the replacementDictionary may be NSString's, or any object that - * returns what you want when its description method is invoked. -**/ - -@interface HTTPDynamicFileResponse : HTTPAsyncFileResponse -{ - NSData *separator; - NSDictionary *replacementDict; -} - -- (id)initWithFilePath:(NSString *)filePath - forConnection:(HTTPConnection *)connection - separator:(NSString *)separatorStr - replacementDictionary:(NSDictionary *)dictionary; - -@end diff --git a/third_party/objc/CocoaHTTPServer/Core/Responses/HTTPDynamicFileResponse.m b/third_party/objc/CocoaHTTPServer/Core/Responses/HTTPDynamicFileResponse.m deleted file mode 100644 index be42933b8ff9e..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Core/Responses/HTTPDynamicFileResponse.m +++ /dev/null @@ -1,292 +0,0 @@ -#import "HTTPDynamicFileResponse.h" -#import "HTTPConnection.h" -#import "HTTPLogging.h" - -// Log levels : off, error, warn, info, verbose -// Other flags: trace -static const int httpLogLevel = HTTP_LOG_LEVEL_WARN; // | HTTP_LOG_FLAG_TRACE; - -#define NULL_FD -1 - - -@implementation HTTPDynamicFileResponse - -- (id)initWithFilePath:(NSString *)fpath - forConnection:(HTTPConnection *)parent - separator:(NSString *)separatorStr - replacementDictionary:(NSDictionary *)dict -{ - if ((self = [super initWithFilePath:fpath forConnection:parent])) - { - HTTPLogTrace(); - - separator = [[separatorStr dataUsingEncoding:NSUTF8StringEncoding] retain]; - replacementDict = [dict retain]; - } - return self; -} - -- (BOOL)isChunked -{ - HTTPLogTrace(); - - return YES; -} - -- (UInt64)contentLength -{ - // This method shouldn't be called since we're using a chunked response. - // We override it just to be safe. - - HTTPLogTrace(); - - return 0; -} - -- (void)setOffset:(UInt64)offset -{ - // This method shouldn't be called since we're using a chunked response. - // We override it just to be safe. - - HTTPLogTrace(); -} - -- (BOOL)isDone -{ - BOOL result = (readOffset == fileLength) && (readBufferOffset == 0); - - HTTPLogTrace2(@"%@[%p]: isDone - %@", THIS_FILE, self, (result ? @"YES" : @"NO")); - - return result; -} - -- (void)processReadBuffer -{ - HTTPLogTrace(); - - // At this point, the readBuffer has readBufferOffset bytes available. - // This method is in charge of updating the readBufferOffset. - - NSUInteger bufLen = readBufferOffset; - NSUInteger sepLen = [separator length]; - - // We're going to start looking for the separator at the beginning of the buffer, - // and stop when we get to the point where the separator would no longer fit in the buffer. - - NSUInteger offset = 0; - NSUInteger stopOffset = (bufLen > sepLen) ? bufLen - sepLen + 1 : 0; - - // In order to do the replacement, we need to find the starting and ending separator. - // For example: - // - // %%USER_NAME%% - // - // Where "%%" is the separator. - - BOOL found1 = NO; - BOOL found2 = NO; - - NSUInteger s1 = 0; - NSUInteger s2 = 0; - - const void *sep = [separator bytes]; - - while (offset < stopOffset) - { - const void *subBuffer = readBuffer + offset; - - if (memcmp(subBuffer, sep, sepLen) == 0) - { - if (!found1) - { - // Found the first separator - - found1 = YES; - s1 = offset; - offset += sepLen; - - HTTPLogVerbose(@"%@[%p]: Found s1 at %lu", THIS_FILE, self, (unsigned long)s1); - } - else - { - // Found the second separator - - found2 = YES; - s2 = offset; - offset += sepLen; - - HTTPLogVerbose(@"%@[%p]: Found s2 at %lu", THIS_FILE, self, (unsigned long)s2); - } - - if (found1 && found2) - { - // We found our separators. - // Now extract the string between the two separators. - - NSRange fullRange = NSMakeRange(s1, (s2 - s1 + sepLen)); - NSRange strRange = NSMakeRange(s1 + sepLen, (s2 - s1 - sepLen)); - - // Wish we could use the simple subdataWithRange method. - // But that method copies the bytes... - // So for performance reasons, we need to use the methods that don't copy the bytes. - - void *strBuf = readBuffer + strRange.location; - NSUInteger strLen = strRange.length; - - NSString *key = [[NSString alloc] initWithBytes:strBuf length:strLen encoding:NSUTF8StringEncoding]; - if (key) - { - // Is there a given replacement for this key? - - id value = [replacementDict objectForKey:key]; - if (value) - { - // Found the replacement value. - // Now perform the replacement in the buffer. - - HTTPLogVerbose(@"%@[%p]: key(%@) -> value(%@)", THIS_FILE, self, key, value); - - NSData *v = [[value description] dataUsingEncoding:NSUTF8StringEncoding]; - NSUInteger vLength = [v length]; - - if (fullRange.length == vLength) - { - // Replacement is exactly the same size as what it is replacing - - // memcpy(void *restrict dst, const void *restrict src, size_t n); - - memcpy(readBuffer + fullRange.location, [v bytes], vLength); - } - else // (fullRange.length != vLength) - { - NSInteger diff = (NSInteger)vLength - (NSInteger)fullRange.length; - - if (diff > 0) - { - // Replacement is bigger than what it is replacing. - // Make sure there is room in the buffer for the replacement. - - if (diff > (readBufferSize - bufLen)) - { - NSUInteger inc = MAX(diff, 256); - - readBufferSize += inc; - readBuffer = reallocf(readBuffer, readBufferSize); - } - } - - // Move the data that comes after the replacement. - // - // If replacement is smaller than what it is replacing, - // then we are shifting the data toward the beginning of the buffer. - // - // If replacement is bigger than what it is replacing, - // then we are shifting the data toward the end of the buffer. - // - // memmove(void *dst, const void *src, size_t n); - // - // The memmove() function copies n bytes from src to dst. - // The two areas may overlap; the copy is always done in a non-destructive manner. - - void *src = readBuffer + fullRange.location + fullRange.length; - void *dst = readBuffer + fullRange.location + vLength; - - NSUInteger remaining = bufLen - (fullRange.location + fullRange.length); - - memmove(dst, src, remaining); - - // Now copy the replacement into its location. - // - // memcpy(void *restrict dst, const void *restrict src, size_t n) - // - // The memcpy() function copies n bytes from src to dst. - // If the two areas overlap, behavior is undefined. - - memcpy(readBuffer + fullRange.location, [v bytes], vLength); - - // And don't forget to update our indices. - - bufLen += diff; - offset += diff; - stopOffset += diff; - } - } - - [key release]; - } - - found1 = found2 = NO; - } - } - else - { - offset++; - } - } - - // We've gone through our buffer now, and performed all the replacements that we could. - // It's now time to update the amount of available data we have. - - if (readOffset == fileLength) - { - // We've read in the entire file. - // So there can be no more replacements. - - data = [[NSData alloc] initWithBytes:readBuffer length:bufLen]; - readBufferOffset = 0; - } - else - { - // There are a couple different situations that we need to take into account here. - // - // Imagine the following file: - // My name is %%USER_NAME%% - // - // Situation 1: - // The first chunk of data we read was "My name is %%". - // So we found the first separator, but not the second. - // In this case we can only return the data that precedes the first separator. - // - // Situation 2: - // The first chunk of data we read was "My name is %". - // So we didn't find any separators, but part of a separator may be included in our buffer. - - NSUInteger available; - if (found1) - { - // Situation 1 - available = s1; - } - else - { - // Situation 2 - available = stopOffset; - } - - // Copy available data - - data = [[NSData alloc] initWithBytes:readBuffer length:available]; - - // Remove the copied data from the buffer. - // We do this by shifting the remaining data toward the beginning of the buffer. - - NSUInteger remaining = bufLen - available; - - memmove(readBuffer, readBuffer + available, remaining); - readBufferOffset = remaining; - } - - [connection responseHasAvailableData:self]; -} - -- (void)dealloc -{ - HTTPLogTrace(); - - [separator release]; - [replacementDict release]; - - [super dealloc]; -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Core/Responses/HTTPFileResponse.h b/third_party/objc/CocoaHTTPServer/Core/Responses/HTTPFileResponse.h deleted file mode 100644 index e334f4f9b9919..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Core/Responses/HTTPFileResponse.h +++ /dev/null @@ -1,25 +0,0 @@ -#import -#import "HTTPResponse.h" - -@class HTTPConnection; - - -@interface HTTPFileResponse : NSObject -{ - HTTPConnection *connection; - - NSString *filePath; - UInt64 fileLength; - UInt64 fileOffset; - - BOOL aborted; - - int fileFD; - void *buffer; - NSUInteger bufferSize; -} - -- (id)initWithFilePath:(NSString *)filePath forConnection:(HTTPConnection *)connection; -- (NSString *)filePath; - -@end diff --git a/third_party/objc/CocoaHTTPServer/Core/Responses/HTTPFileResponse.m b/third_party/objc/CocoaHTTPServer/Core/Responses/HTTPFileResponse.m deleted file mode 100644 index e8785ab71f73b..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Core/Responses/HTTPFileResponse.m +++ /dev/null @@ -1,237 +0,0 @@ -#import "HTTPFileResponse.h" -#import "HTTPConnection.h" -#import "HTTPLogging.h" - -#import -#import - -// Log levels : off, error, warn, info, verbose -// Other flags: trace -static const int httpLogLevel = HTTP_LOG_LEVEL_WARN; // | HTTP_LOG_FLAG_TRACE; - -#define NULL_FD -1 - - -@implementation HTTPFileResponse - -- (id)initWithFilePath:(NSString *)fpath forConnection:(HTTPConnection *)parent -{ - if((self = [super init])) - { - HTTPLogTrace(); - - connection = parent; // Parents retain children, children do NOT retain parents - - fileFD = NULL_FD; - filePath = [fpath copy]; - if (filePath == nil) - { - HTTPLogWarn(@"%@: Init failed - Nil filePath", THIS_FILE); - - [self release]; - return nil; - } - - NSDictionary *fileAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:filePath error:nil]; - if (fileAttributes == nil) - { - HTTPLogWarn(@"%@: Init failed - Unable to get file attributes. filePath: %@", THIS_FILE, filePath); - - [self release]; - return nil; - } - - fileLength = (UInt64)[[fileAttributes objectForKey:NSFileSize] unsignedLongLongValue]; - fileOffset = 0; - - aborted = NO; - - // We don't bother opening the file here. - // If this is a HEAD request we only need to know the fileLength. - } - return self; -} - -- (void)abort -{ - HTTPLogTrace(); - - [connection responseDidAbort:self]; - aborted = YES; -} - -- (BOOL)openFile -{ - HTTPLogTrace(); - - fileFD = open([filePath UTF8String], O_RDONLY); - if (fileFD == NULL_FD) - { - HTTPLogError(@"%@[%p]: Unable to open file. filePath: %@", THIS_FILE, self, filePath); - - [self abort]; - return NO; - } - - HTTPLogVerbose(@"%@[%p]: Open fd[%i] -> %@", THIS_FILE, self, fileFD, filePath); - - return YES; -} - -- (BOOL)openFileIfNeeded -{ - if (aborted) - { - // The file operation has been aborted. - // This could be because we failed to open the file, - // or the reading process failed. - return NO; - } - - if (fileFD != NULL_FD) - { - // File has already been opened. - return YES; - } - - return [self openFile]; -} - -- (UInt64)contentLength -{ - HTTPLogTrace(); - - return fileLength; -} - -- (UInt64)offset -{ - HTTPLogTrace(); - - return fileOffset; -} - -- (void)setOffset:(UInt64)offset -{ - HTTPLogTrace2(@"%@[%p]: setOffset:%llu", THIS_FILE, self, offset); - - if (![self openFileIfNeeded]) - { - // File opening failed, - // or response has been aborted due to another error. - return; - } - - fileOffset = offset; - - off_t result = lseek(fileFD, (off_t)offset, SEEK_SET); - if (result == -1) - { - HTTPLogError(@"%@[%p]: lseek failed - errno(%i) filePath(%@)", THIS_FILE, self, errno, filePath); - - [self abort]; - } -} - -- (NSData *)readDataOfLength:(NSUInteger)length -{ - HTTPLogTrace2(@"%@[%p]: readDataOfLength:%lu", THIS_FILE, self, (unsigned long)length); - - if (![self openFileIfNeeded]) - { - // File opening failed, - // or response has been aborted due to another error. - return nil; - } - - // Determine how much data we should read. - // - // It is OK if we ask to read more bytes than exist in the file. - // It is NOT OK to over-allocate the buffer. - - UInt64 bytesLeftInFile = fileLength - fileOffset; - - NSUInteger bytesToRead = (NSUInteger)MIN(length, bytesLeftInFile); - - // Make sure buffer is big enough for read request. - // Do not over-allocate. - - if (buffer == NULL || bufferSize < bytesToRead) - { - bufferSize = bytesToRead; - buffer = reallocf(buffer, (size_t)bufferSize); - - if (buffer == NULL) - { - HTTPLogError(@"%@[%p]: Unable to allocate buffer", THIS_FILE, self); - - [self abort]; - return nil; - } - } - - // Perform the read - - HTTPLogVerbose(@"%@[%p]: Attempting to read %lu bytes from file", THIS_FILE, self, bytesToRead); - - ssize_t result = read(fileFD, buffer, bytesToRead); - - // Check the results - - if (result < 0) - { - HTTPLogError(@"%@: Error(%i) reading file(%@)", THIS_FILE, errno, filePath); - - [self abort]; - return nil; - } - else if (result == 0) - { - HTTPLogError(@"%@: Read EOF on file(%@)", THIS_FILE, filePath); - - [self abort]; - return nil; - } - else // (result > 0) - { - HTTPLogVerbose(@"%@[%p]: Read %d bytes from file", THIS_FILE, self, result); - - fileOffset += result; - - return [NSData dataWithBytes:buffer length:result]; - } -} - -- (BOOL)isDone -{ - BOOL result = (fileOffset == fileLength); - - HTTPLogTrace2(@"%@[%p]: isDone - %@", THIS_FILE, self, (result ? @"YES" : @"NO")); - - return result; -} - -- (NSString *)filePath -{ - return filePath; -} - -- (void)dealloc -{ - HTTPLogTrace(); - - if (fileFD != NULL_FD) - { - HTTPLogVerbose(@"%@[%p]: Close fd[%i]", THIS_FILE, self, fileFD); - - close(fileFD); - } - - if (buffer) - free(buffer); - - [filePath release]; - [super dealloc]; -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Core/Responses/HTTPRedirectResponse.h b/third_party/objc/CocoaHTTPServer/Core/Responses/HTTPRedirectResponse.h deleted file mode 100644 index 1e90123ed2491..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Core/Responses/HTTPRedirectResponse.h +++ /dev/null @@ -1,12 +0,0 @@ -#import -#import "HTTPResponse.h" - - -@interface HTTPRedirectResponse : NSObject -{ - NSString *redirectPath; -} - -- (id)initWithPath:(NSString *)redirectPath; - -@end diff --git a/third_party/objc/CocoaHTTPServer/Core/Responses/HTTPRedirectResponse.m b/third_party/objc/CocoaHTTPServer/Core/Responses/HTTPRedirectResponse.m deleted file mode 100644 index 157787bbb1b59..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Core/Responses/HTTPRedirectResponse.m +++ /dev/null @@ -1,71 +0,0 @@ -#import "HTTPRedirectResponse.h" -#import "HTTPLogging.h" - -// Log levels : off, error, warn, info, verbose -// Other flags: trace -static const int httpLogLevel = HTTP_LOG_LEVEL_OFF; // | HTTP_LOG_FLAG_TRACE; - - -@implementation HTTPRedirectResponse - -- (id)initWithPath:(NSString *)path -{ - if ((self = [super init])) - { - HTTPLogTrace(); - - redirectPath = [path copy]; - } - return self; -} - -- (UInt64)contentLength -{ - return 0; -} - -- (UInt64)offset -{ - return 0; -} - -- (void)setOffset:(UInt64)offset -{ - // Nothing to do -} - -- (NSData *)readDataOfLength:(NSUInteger)length -{ - HTTPLogTrace(); - - return nil; -} - -- (BOOL)isDone -{ - return YES; -} - -- (NSDictionary *)httpHeaders -{ - HTTPLogTrace(); - - return [NSDictionary dictionaryWithObject:redirectPath forKey:@"Location"]; -} - -- (NSInteger)status -{ - HTTPLogTrace(); - - return 302; -} - -- (void)dealloc -{ - HTTPLogTrace(); - - [redirectPath release]; - [super dealloc]; -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Core/WebSocket.h b/third_party/objc/CocoaHTTPServer/Core/WebSocket.h deleted file mode 100644 index efb17c825b494..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Core/WebSocket.h +++ /dev/null @@ -1,97 +0,0 @@ -#import - -@class HTTPMessage; -@class GCDAsyncSocket; - - -#define WebSocketDidDieNotification @"WebSocketDidDie" - -@interface WebSocket : NSObject -{ - dispatch_queue_t websocketQueue; - - HTTPMessage *request; - GCDAsyncSocket *asyncSocket; - - NSData *term; - - BOOL isStarted; - BOOL isOpen; - BOOL isVersion76; - - id delegate; -} - -+ (BOOL)isWebSocketRequest:(HTTPMessage *)request; - -- (id)initWithRequest:(HTTPMessage *)request socket:(GCDAsyncSocket *)socket; - -/** - * Delegate option. - * - * In most cases it will be easier to subclass WebSocket, - * but some circumstances may lead one to prefer standard delegate callbacks instead. -**/ -@property (/* atomic */ assign) id delegate; - -/** - * The WebSocket class is thread-safe, generally via it's GCD queue. - * All public API methods are thread-safe, - * and the subclass API methods are thread-safe as they are all invoked on the same GCD queue. -**/ -@property (nonatomic, readonly) dispatch_queue_t websocketQueue; - -/** - * Public API - * - * These methods are automatically called by the HTTPServer. - * You may invoke the stop method yourself to close the WebSocket manually. -**/ -- (void)start; -- (void)stop; - -/** - * Public API - * - * Sends a message over the WebSocket. - * This method is thread-safe. -**/ -- (void)sendMessage:(NSString *)msg; - -/** - * Subclass API - * - * These methods are designed to be overriden by subclasses. -**/ -- (void)didOpen; -- (void)didReceiveMessage:(NSString *)msg; -- (void)didClose; - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * There are two ways to create your own custom WebSocket: - * - * - Subclass it and override the methods you're interested in. - * - Use traditional delegate paradigm along with your own custom class. - * - * They both exist to allow for maximum flexibility. - * In most cases it will be easier to subclass WebSocket. - * However some circumstances may lead one to prefer standard delegate callbacks instead. - * One such example, you're already subclassing another class, so subclassing WebSocket isn't an option. -**/ - -@protocol WebSocketDelegate -@optional - -- (void)webSocketDidOpen:(WebSocket *)ws; - -- (void)webSocket:(WebSocket *)ws didReceiveMessage:(NSString *)msg; - -- (void)webSocketDidClose:(WebSocket *)ws; - -@end \ No newline at end of file diff --git a/third_party/objc/CocoaHTTPServer/Core/WebSocket.m b/third_party/objc/CocoaHTTPServer/Core/WebSocket.m deleted file mode 100644 index 4c5c4531ab13c..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Core/WebSocket.m +++ /dev/null @@ -1,598 +0,0 @@ -#import "WebSocket.h" -#import "HTTPMessage.h" -#import "GCDAsyncSocket.h" -#import "DDNumber.h" -#import "DDData.h" -#import "HTTPLogging.h" - -// Log levels: off, error, warn, info, verbose -// Other flags : trace -static const int httpLogLevel = HTTP_LOG_LEVEL_WARN; // | HTTP_LOG_FLAG_TRACE; - -#define TIMEOUT_NONE -1 -#define TIMEOUT_REQUEST_BODY 10 - -#define TAG_HTTP_REQUEST_BODY 100 -#define TAG_HTTP_RESPONSE_HEADERS 200 -#define TAG_HTTP_RESPONSE_BODY 201 - -#define TAG_PREFIX 300 -#define TAG_MSG_PLUS_SUFFIX 301 - - -@interface WebSocket (PrivateAPI) - -- (void)readRequestBody; -- (void)sendResponseBody; -- (void)sendResponseHeaders; - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -@implementation WebSocket - -+ (BOOL)isWebSocketRequest:(HTTPMessage *)request -{ - // Request (Draft 75): - // - // GET /demo HTTP/1.1 - // Upgrade: WebSocket - // Connection: Upgrade - // Host: example.com - // Origin: http://example.com - // WebSocket-Protocol: sample - // - // - // Request (Draft 76): - // - // GET /demo HTTP/1.1 - // Upgrade: WebSocket - // Connection: Upgrade - // Host: example.com - // Origin: http://example.com - // Sec-WebSocket-Protocol: sample - // Sec-WebSocket-Key1: 4 @1 46546xW%0l 1 5 - // Sec-WebSocket-Key2: 12998 5 Y3 1 .P00 - // - // ^n:ds[4U - - // Look for Upgrade: and Connection: headers. - // If we find them, and they have the proper value, - // we can safely assume this is a websocket request. - - NSString *upgradeHeaderValue = [request headerField:@"Upgrade"]; - NSString *connectionHeaderValue = [request headerField:@"Connection"]; - - BOOL isWebSocket = YES; - - if (!upgradeHeaderValue || !connectionHeaderValue) { - isWebSocket = NO; - } - else if (![upgradeHeaderValue caseInsensitiveCompare:@"WebSocket"] == NSOrderedSame) { - isWebSocket = NO; - } - else if (![connectionHeaderValue caseInsensitiveCompare:@"Upgrade"] == NSOrderedSame) { - isWebSocket = NO; - } - - HTTPLogTrace2(@"%@: %@ - %@", THIS_FILE, THIS_METHOD, (isWebSocket ? @"YES" : @"NO")); - - return isWebSocket; -} - -+ (BOOL)isVersion76Request:(HTTPMessage *)request -{ - NSString *key1 = [request headerField:@"Sec-WebSocket-Key1"]; - NSString *key2 = [request headerField:@"Sec-WebSocket-Key2"]; - - BOOL isVersion76; - - if (!key1 || !key2) { - isVersion76 = NO; - } - else { - isVersion76 = YES; - } - - HTTPLogTrace2(@"%@: %@ - %@", THIS_FILE, THIS_METHOD, (isVersion76 ? @"YES" : @"NO")); - - return isVersion76; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Setup and Teardown -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -@synthesize websocketQueue; - -- (id)initWithRequest:(HTTPMessage *)aRequest socket:(GCDAsyncSocket *)socket -{ - HTTPLogTrace(); - - if (aRequest == nil) - { - [self release]; - return nil; - } - - if ((self = [super init])) - { - if (HTTP_LOG_VERBOSE) - { - NSData *requestHeaders = [aRequest messageData]; - - NSString *temp = [[NSString alloc] initWithData:requestHeaders encoding:NSUTF8StringEncoding]; - HTTPLogVerbose(@"%@[%p] Request Headers:\n%@", THIS_FILE, self, temp); - [temp release]; - } - - websocketQueue = dispatch_queue_create("WebSocket", NULL); - request = [aRequest retain]; - - asyncSocket = [socket retain]; - [asyncSocket setDelegate:self delegateQueue:websocketQueue]; - - isOpen = NO; - isVersion76 = [[self class] isVersion76Request:request]; - - term = [[NSData alloc] initWithBytes:"\xFF" length:1]; - } - return self; -} - -- (void)dealloc -{ - HTTPLogTrace(); - - dispatch_release(websocketQueue); - - [request release]; - - [asyncSocket setDelegate:nil delegateQueue:NULL]; - [asyncSocket disconnect]; - [asyncSocket release]; - - [super dealloc]; -} - -- (id)delegate -{ - __block id result = nil; - - dispatch_sync(websocketQueue, ^{ - result = delegate; - }); - - return result; -} - -- (void)setDelegate:(id)newDelegate -{ - dispatch_async(websocketQueue, ^{ - delegate = newDelegate; - }); -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Start and Stop -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * Starting point for the WebSocket after it has been fully initialized (including subclasses). - * This method is called by the HTTPConnection it is spawned from. -**/ -- (void)start -{ - // This method is not exactly designed to be overriden. - // Subclasses are encouraged to override the didOpen method instead. - - dispatch_async(websocketQueue, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - if (isStarted) return; - isStarted = YES; - - if (isVersion76) - { - [self readRequestBody]; - } - else - { - [self sendResponseHeaders]; - [self didOpen]; - } - - [pool drain]; - }); -} - -/** - * This method is called by the HTTPServer if it is asked to stop. - * The server, in turn, invokes stop on each WebSocket instance. -**/ -- (void)stop -{ - // This method is not exactly designed to be overriden. - // Subclasses are encouraged to override the didClose method instead. - - dispatch_async(websocketQueue, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - [asyncSocket disconnect]; - - [pool drain]; - }); -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark HTTP Response -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (void)readRequestBody -{ - HTTPLogTrace(); - - NSAssert(isVersion76, @"WebSocket version 75 doesn't contain a request body"); - - [asyncSocket readDataToLength:8 withTimeout:TIMEOUT_NONE tag:TAG_HTTP_REQUEST_BODY]; -} - -- (NSString *)originResponseHeaderValue -{ - HTTPLogTrace(); - - NSString *origin = [request headerField:@"Origin"]; - - if (origin == nil) - { - NSString *port = [NSString stringWithFormat:@"%hu", [asyncSocket localPort]]; - - return [NSString stringWithFormat:@"http://localhost:%@", port]; - } - else - { - return origin; - } -} - -- (NSString *)locationResponseHeaderValue -{ - HTTPLogTrace(); - - NSString *location; - - NSString *scheme = [asyncSocket isSecure] ? @"wss" : @"ws"; - NSString *host = [request headerField:@"Host"]; - - NSString *requestUri = [[request url] relativeString]; - - if (host == nil) - { - NSString *port = [NSString stringWithFormat:@"%hu", [asyncSocket localPort]]; - - location = [NSString stringWithFormat:@"%@://localhost:%@%@", scheme, port, requestUri]; - } - else - { - location = [NSString stringWithFormat:@"%@://%@%@", scheme, host, requestUri]; - } - - return location; -} - -- (void)sendResponseHeaders -{ - HTTPLogTrace(); - - // Request (Draft 75): - // - // GET /demo HTTP/1.1 - // Upgrade: WebSocket - // Connection: Upgrade - // Host: example.com - // Origin: http://example.com - // WebSocket-Protocol: sample - // - // - // Request (Draft 76): - // - // GET /demo HTTP/1.1 - // Upgrade: WebSocket - // Connection: Upgrade - // Host: example.com - // Origin: http://example.com - // Sec-WebSocket-Protocol: sample - // Sec-WebSocket-Key2: 12998 5 Y3 1 .P00 - // Sec-WebSocket-Key1: 4 @1 46546xW%0l 1 5 - // - // ^n:ds[4U - - - // Response (Draft 75): - // - // HTTP/1.1 101 Web Socket Protocol Handshake - // Upgrade: WebSocket - // Connection: Upgrade - // WebSocket-Origin: http://example.com - // WebSocket-Location: ws://example.com/demo - // WebSocket-Protocol: sample - // - // - // Response (Draft 76): - // - // HTTP/1.1 101 WebSocket Protocol Handshake - // Upgrade: WebSocket - // Connection: Upgrade - // Sec-WebSocket-Origin: http://example.com - // Sec-WebSocket-Location: ws://example.com/demo - // Sec-WebSocket-Protocol: sample - // - // 8jKS'y:G*Co,Wxa- - - - HTTPMessage *wsResponse = [[HTTPMessage alloc] initResponseWithStatusCode:101 - description:@"Web Socket Protocol Handshake" - version:HTTPVersion1_1]; - - [wsResponse setHeaderField:@"Upgrade" value:@"WebSocket"]; - [wsResponse setHeaderField:@"Connection" value:@"Upgrade"]; - - // Note: It appears that WebSocket-Origin and WebSocket-Location - // are required for Google's Chrome implementation to work properly. - // - // If we don't send either header, Chrome will never report the WebSocket as open. - // If we only send one of the two, Chrome will immediately close the WebSocket. - // - // In addition to this it appears that Chrome's implementation is very picky of the values of the headers. - // They have to match exactly with what Chrome sent us or it will close the WebSocket. - - NSString *originValue = [self originResponseHeaderValue]; - NSString *locationValue = [self locationResponseHeaderValue]; - - NSString *originField = isVersion76 ? @"Sec-WebSocket-Origin" : @"WebSocket-Origin"; - NSString *locationField = isVersion76 ? @"Sec-WebSocket-Location" : @"WebSocket-Location"; - - [wsResponse setHeaderField:originField value:originValue]; - [wsResponse setHeaderField:locationField value:locationValue]; - - NSData *responseHeaders = [wsResponse messageData]; - - [wsResponse release]; - - if (HTTP_LOG_VERBOSE) - { - NSString *temp = [[NSString alloc] initWithData:responseHeaders encoding:NSUTF8StringEncoding]; - HTTPLogVerbose(@"%@[%p] Response Headers:\n%@", THIS_FILE, self, temp); - [temp release]; - } - - [asyncSocket writeData:responseHeaders withTimeout:TIMEOUT_NONE tag:TAG_HTTP_RESPONSE_HEADERS]; -} - -- (NSData *)processKey:(NSString *)key -{ - HTTPLogTrace(); - - unichar c; - NSUInteger i; - NSUInteger length = [key length]; - - // Concatenate the digits into a string, - // and count the number of spaces. - - NSMutableString *numStr = [NSMutableString stringWithCapacity:10]; - long long numSpaces = 0; - - for (i = 0; i < length; i++) - { - c = [key characterAtIndex:i]; - - if (c >= '0' && c <= '9') - { - [numStr appendFormat:@"%C", c]; - } - else if (c == ' ') - { - numSpaces++; - } - } - - long long num = strtoll([numStr UTF8String], NULL, 10); - - long long resultHostNum; - - if (numSpaces == 0) - resultHostNum = 0; - else - resultHostNum = num / numSpaces; - - HTTPLogVerbose(@"key(%@) -> %qi / %qi = %qi", key, num, numSpaces, resultHostNum); - - // Convert result to 4 byte big-endian (network byte order) - // and then convert to raw data. - - UInt32 result = OSSwapHostToBigInt32((uint32_t)resultHostNum); - - return [NSData dataWithBytes:&result length:4]; -} - -- (void)sendResponseBody:(NSData *)d3 -{ - HTTPLogTrace(); - - NSAssert(isVersion76, @"WebSocket version 75 doesn't contain a response body"); - NSAssert([d3 length] == 8, @"Invalid requestBody length"); - - NSString *key1 = [request headerField:@"Sec-WebSocket-Key1"]; - NSString *key2 = [request headerField:@"Sec-WebSocket-Key2"]; - - NSData *d1 = [self processKey:key1]; - NSData *d2 = [self processKey:key2]; - - // Concatenated d1, d2 & d3 - - NSMutableData *d0 = [NSMutableData dataWithCapacity:(4+4+8)]; - [d0 appendData:d1]; - [d0 appendData:d2]; - [d0 appendData:d3]; - - // Hash the data using MD5 - - NSData *responseBody = [d0 md5Digest]; - - [asyncSocket writeData:responseBody withTimeout:TIMEOUT_NONE tag:TAG_HTTP_RESPONSE_BODY]; - - if (HTTP_LOG_VERBOSE) - { - NSString *s1 = [[NSString alloc] initWithData:d1 encoding:NSASCIIStringEncoding]; - NSString *s2 = [[NSString alloc] initWithData:d2 encoding:NSASCIIStringEncoding]; - NSString *s3 = [[NSString alloc] initWithData:d3 encoding:NSASCIIStringEncoding]; - - NSString *s0 = [[NSString alloc] initWithData:d0 encoding:NSASCIIStringEncoding]; - - NSString *sH = [[NSString alloc] initWithData:responseBody encoding:NSASCIIStringEncoding]; - - HTTPLogVerbose(@"key1 result : raw(%@) str(%@)", d1, s1); - HTTPLogVerbose(@"key2 result : raw(%@) str(%@)", d2, s2); - HTTPLogVerbose(@"key3 passed : raw(%@) str(%@)", d3, s3); - HTTPLogVerbose(@"key0 concat : raw(%@) str(%@)", d0, s0); - HTTPLogVerbose(@"responseBody: raw(%@) str(%@)", responseBody, sH); - - [s1 release]; - [s2 release]; - [s3 release]; - [s0 release]; - [sH release]; - } -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Core Functionality -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (void)didOpen -{ - HTTPLogTrace(); - - // Override me to perform any custom actions once the WebSocket has been opened. - // This method is invoked on the websocketQueue. - // - // Don't forget to invoke [super didOpen] in your method. - - // Start reading for messages - [asyncSocket readDataToLength:1 withTimeout:TIMEOUT_NONE tag:TAG_PREFIX]; - - // Notify delegate - if ([delegate respondsToSelector:@selector(webSocketDidOpen:)]) - { - [delegate webSocketDidOpen:self]; - } -} - -- (void)sendMessage:(NSString *)msg -{ - HTTPLogTrace(); - - NSData *msgData = [msg dataUsingEncoding:NSUTF8StringEncoding]; - - NSMutableData *data = [NSMutableData dataWithCapacity:([msgData length] + 2)]; - - [data appendBytes:"\x00" length:1]; - [data appendData:msgData]; - [data appendBytes:"\xFF" length:1]; - - // Remember: GCDAsyncSocket is thread-safe - - [asyncSocket writeData:data withTimeout:TIMEOUT_NONE tag:0]; -} - -- (void)didReceiveMessage:(NSString *)msg -{ - HTTPLogTrace(); - - // Override me to process incoming messages. - // This method is invoked on the websocketQueue. - // - // For completeness, you should invoke [super didReceiveMessage:msg] in your method. - - // Notify delegate - if ([delegate respondsToSelector:@selector(webSocket:didReceiveMessage:)]) - { - [delegate webSocket:self didReceiveMessage:msg]; - } -} - -- (void)didClose -{ - HTTPLogTrace(); - - // Override me to perform any cleanup when the socket is closed - // This method is invoked on the websocketQueue. - // - // Don't forget to invoke [super didClose] at the end of your method. - - // Notify delegate - if ([delegate respondsToSelector:@selector(webSocketDidClose:)]) - { - [delegate webSocketDidClose:self]; - } - - // Notify HTTPServer - [[NSNotificationCenter defaultCenter] postNotificationName:WebSocketDidDieNotification object:self]; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark AsyncSocket Delegate -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (void)socket:(GCDAsyncSocket *)sock didReadData:(NSData *)data withTag:(long)tag -{ - HTTPLogTrace(); - - if (tag == TAG_HTTP_REQUEST_BODY) - { - [self sendResponseHeaders]; - [self sendResponseBody:data]; - [self didOpen]; - } - else if (tag == TAG_PREFIX) - { - UInt8 *pFrame = (UInt8 *)[data bytes]; - UInt8 frame = *pFrame; - - if (frame <= 0x7F) - { - [asyncSocket readDataToData:term withTimeout:TIMEOUT_NONE tag:TAG_MSG_PLUS_SUFFIX]; - } - else - { - // Unsupported frame type - [self didClose]; - } - } - else - { - NSUInteger msgLength = [data length] - 1; // Excluding ending 0xFF frame - - NSString *msg = [[NSString alloc] initWithBytes:[data bytes] length:msgLength encoding:NSUTF8StringEncoding]; - - [self didReceiveMessage:msg]; - - [msg release]; - - // Read next message - [asyncSocket readDataToLength:1 withTimeout:TIMEOUT_NONE tag:TAG_PREFIX]; - } -} - -- (void)socketDidDisconnect:(GCDAsyncSocket *)sock withError:(NSError *)error -{ - HTTPLogTrace2(@"%@[%p]: socketDidDisconnect:withError: %@", THIS_FILE, self, error); - - [self didClose]; -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Extensions/WebDAV/DAVConnection.h b/third_party/objc/CocoaHTTPServer/Extensions/WebDAV/DAVConnection.h deleted file mode 100644 index ebafb0c71f8f3..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Extensions/WebDAV/DAVConnection.h +++ /dev/null @@ -1,7 +0,0 @@ -#import "HTTPConnection.h" - -@interface DAVConnection : HTTPConnection { - id requestContentBody; - NSOutputStream* requestContentStream; -} -@end diff --git a/third_party/objc/CocoaHTTPServer/Extensions/WebDAV/DAVConnection.m b/third_party/objc/CocoaHTTPServer/Extensions/WebDAV/DAVConnection.m deleted file mode 100644 index 3c40a5250bb29..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Extensions/WebDAV/DAVConnection.m +++ /dev/null @@ -1,165 +0,0 @@ -#import "DAVConnection.h" -#import "HTTPMessage.h" -#import "HTTPFileResponse.h" -#import "HTTPAsyncFileResponse.h" -#import "PUTResponse.h" -#import "DELETEResponse.h" -#import "DAVResponse.h" -#import "HTTPLogging.h" - -#define HTTP_BODY_MAX_MEMORY_SIZE (1024 * 1024) -#define HTTP_ASYNC_FILE_RESPONSE_THRESHOLD (16 * 1024 * 1024) - -static const int httpLogLevel = HTTP_LOG_LEVEL_WARN; - -@implementation DAVConnection - -- (void) dealloc { - [requestContentStream close]; - [requestContentStream release]; - [requestContentBody release]; - - [super dealloc]; -} - -- (BOOL) supportsMethod:(NSString*)method atPath:(NSString*)path { - // HTTPFileResponse & HTTPAsyncFileResponse - if ([method isEqualToString:@"GET"]) return YES; - if ([method isEqualToString:@"HEAD"]) return YES; - - // PUTResponse - if ([method isEqualToString:@"PUT"]) return YES; - - // DELETEResponse - if ([method isEqualToString:@"DELETE"]) return YES; - - // DAVResponse - if ([method isEqualToString:@"OPTIONS"]) return YES; - if ([method isEqualToString:@"PROPFIND"]) return YES; - if ([method isEqualToString:@"MKCOL"]) return YES; - if ([method isEqualToString:@"MOVE"]) return YES; - if ([method isEqualToString:@"COPY"]) return YES; - if ([method isEqualToString:@"LOCK"]) return YES; - if ([method isEqualToString:@"UNLOCK"]) return YES; - - return NO; -} - -- (BOOL) expectsRequestBodyFromMethod:(NSString*)method atPath:(NSString*)path { - // PUTResponse - if ([method isEqualToString:@"PUT"]) { - return YES; - } - - // DAVResponse - if ([method isEqual:@"PROPFIND"] || [method isEqual:@"MKCOL"]) { - return [request headerField:@"Content-Length"] ? YES : NO; - } - if ([method isEqual:@"LOCK"]) { - return YES; - } - - return NO; -} - -- (void) prepareForBodyWithSize:(UInt64)contentLength { - NSAssert(requestContentStream == nil, @"requestContentStream should be nil"); - NSAssert(requestContentBody == nil, @"requestContentBody should be nil"); - - if (contentLength > HTTP_BODY_MAX_MEMORY_SIZE) { - requestContentBody = [[NSTemporaryDirectory() stringByAppendingString:[[NSProcessInfo processInfo] globallyUniqueString]] copy]; - requestContentStream = [[NSOutputStream alloc] initToFileAtPath:requestContentBody append:NO]; - [requestContentStream open]; - } else { - requestContentBody = [[NSMutableData alloc] initWithCapacity:(NSUInteger)contentLength]; - requestContentStream = nil; - } -} - -- (void) processBodyData:(NSData*)postDataChunk { - NSAssert(requestContentBody != nil, @"requestContentBody should not be nil"); - if (requestContentStream) { - [requestContentStream write:[postDataChunk bytes] maxLength:[postDataChunk length]]; - } else { - [(NSMutableData*)requestContentBody appendData:postDataChunk]; - } -} - -- (void) finishBody { - NSAssert(requestContentBody != nil, @"requestContentBody should not be nil"); - if (requestContentStream) { - [requestContentStream close]; - [requestContentStream release]; - requestContentStream = nil; - } -} - -- (void)finishResponse { - NSAssert(requestContentStream == nil, @"requestContentStream should be nil"); - [requestContentBody release]; - requestContentBody = nil; - - [super finishResponse]; -} - -- (NSObject*) httpResponseForMethod:(NSString*)method URI:(NSString*)path { - if ([method isEqualToString:@"HEAD"] || [method isEqualToString:@"GET"]) { - NSString* filePath = [self filePathForURI:path allowDirectory:NO]; - if (filePath) { - NSDictionary* fileAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:filePath error:NULL]; - if (fileAttributes) { - if ([[fileAttributes objectForKey:NSFileSize] unsignedLongLongValue] > HTTP_ASYNC_FILE_RESPONSE_THRESHOLD) { - return [[[HTTPAsyncFileResponse alloc] initWithFilePath:filePath forConnection:self] autorelease]; - } else { - return [[[HTTPFileResponse alloc] initWithFilePath:filePath forConnection:self] autorelease]; - } - } - } - } - - if ([method isEqualToString:@"PUT"]) { - NSString* filePath = [self filePathForURI:path allowDirectory:YES]; - if (filePath) { - if ([requestContentBody isKindOfClass:[NSString class]]) { - return [[[PUTResponse alloc] initWithFilePath:filePath headers:[request allHeaderFields] bodyFile:requestContentBody] autorelease]; - } else if ([requestContentBody isKindOfClass:[NSData class]]) { - return [[[PUTResponse alloc] initWithFilePath:filePath headers:[request allHeaderFields] bodyData:requestContentBody] autorelease]; - } else { - HTTPLogError(@"Internal error"); - } - } - } - - if ([method isEqualToString:@"DELETE"]) { - NSString* filePath = [self filePathForURI:path allowDirectory:YES]; - if (filePath) { - return [[[DELETEResponse alloc] initWithFilePath:filePath] autorelease]; - } - } - - if ([method isEqualToString:@"OPTIONS"] || [method isEqualToString:@"PROPFIND"] || [method isEqualToString:@"MKCOL"] || - [method isEqualToString:@"MOVE"] || [method isEqualToString:@"COPY"] || [method isEqualToString:@"LOCK"] || [method isEqualToString:@"UNLOCK"]) { - NSString* filePath = [self filePathForURI:path allowDirectory:YES]; - if (filePath) { - NSString* rootPath = [config documentRoot]; - NSString* resourcePath = [filePath substringFromIndex:([rootPath length] + 1)]; - if (requestContentBody) { - if ([requestContentBody isKindOfClass:[NSString class]]) { - requestContentBody = [NSData dataWithContentsOfFile:requestContentBody]; - } else if (![requestContentBody isKindOfClass:[NSData class]]) { - HTTPLogError(@"Internal error"); - return nil; - } - } - return [[[DAVResponse alloc] initWithMethod:method - headers:[request allHeaderFields] - bodyData:requestContentBody - resourcePath:resourcePath - rootPath:rootPath] autorelease]; - } - } - - return nil; -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Extensions/WebDAV/DAVResponse.h b/third_party/objc/CocoaHTTPServer/Extensions/WebDAV/DAVResponse.h deleted file mode 100644 index d76817701416a..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Extensions/WebDAV/DAVResponse.h +++ /dev/null @@ -1,11 +0,0 @@ -#import "HTTPResponse.h" - -@interface DAVResponse : NSObject { -@private - UInt64 _offset; - NSMutableDictionary* _headers; - NSData* _data; - NSInteger _status; -} -- (id) initWithMethod:(NSString*)method headers:(NSDictionary*)headers bodyData:(NSData*)body resourcePath:(NSString*)resourcePath rootPath:(NSString*)rootPath; -@end diff --git a/third_party/objc/CocoaHTTPServer/Extensions/WebDAV/DAVResponse.m b/third_party/objc/CocoaHTTPServer/Extensions/WebDAV/DAVResponse.m deleted file mode 100644 index e68393db9fa47..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Extensions/WebDAV/DAVResponse.m +++ /dev/null @@ -1,375 +0,0 @@ -#import - -#import "DAVResponse.h" -#import "HTTPLogging.h" - -// WebDAV specifications: http://webdav.org/specs/rfc4918.html - -typedef enum { - kDAVProperty_ResourceType = (1 << 0), - kDAVProperty_CreationDate = (1 << 1), - kDAVProperty_LastModified = (1 << 2), - kDAVProperty_ContentLength = (1 << 3), - kDAVAllProperties = kDAVProperty_ResourceType | kDAVProperty_CreationDate | kDAVProperty_LastModified | kDAVProperty_ContentLength -} DAVProperties; - -#define kXMLParseOptions (XML_PARSE_NONET | XML_PARSE_RECOVER | XML_PARSE_NOBLANKS | XML_PARSE_COMPACT | XML_PARSE_NOWARNING | XML_PARSE_NOERROR) - -static const int httpLogLevel = HTTP_LOG_LEVEL_WARN; - -@implementation DAVResponse - -static void _AddPropertyResponse(NSString* itemPath, NSString* resourcePath, DAVProperties properties, NSMutableString* xmlString) { - CFStringRef escapedPath = CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)resourcePath, NULL, - CFSTR("<&>?+"), kCFStringEncodingUTF8); - if (escapedPath) { - NSDictionary* attributes = [[NSFileManager defaultManager] attributesOfItemAtPath:itemPath error:NULL]; - BOOL isDirectory = [[attributes fileType] isEqualToString:NSFileTypeDirectory]; - [xmlString appendString:@""]; - [xmlString appendFormat:@"%@", escapedPath]; - [xmlString appendString:@""]; - [xmlString appendString:@""]; - - if (properties & kDAVProperty_ResourceType) { - if (isDirectory) { - [xmlString appendString:@""]; - } else { - [xmlString appendString:@""]; - } - } - - if ((properties & kDAVProperty_CreationDate) && [attributes objectForKey:NSFileCreationDate]) { - NSDateFormatter* formatter = [[NSDateFormatter alloc] init]; - formatter.locale = [[[NSLocale alloc] initWithLocaleIdentifier:@"en_US"] autorelease]; - formatter.timeZone = [NSTimeZone timeZoneWithName:@"GMT"]; - formatter.dateFormat = @"yyyy-MM-dd'T'HH:mm:ss'+00:00'"; - [xmlString appendFormat:@"%@", [formatter stringFromDate:[attributes fileCreationDate]]]; - [formatter release]; - } - - if ((properties & kDAVProperty_LastModified) && [attributes objectForKey:NSFileModificationDate]) { - NSDateFormatter* formatter = [[NSDateFormatter alloc] init]; - formatter.locale = [[[NSLocale alloc] initWithLocaleIdentifier:@"en_US"] autorelease]; - formatter.timeZone = [NSTimeZone timeZoneWithName:@"GMT"]; - formatter.dateFormat = @"EEE', 'd' 'MMM' 'yyyy' 'HH:mm:ss' GMT'"; - [xmlString appendFormat:@"%@", [formatter stringFromDate:[attributes fileModificationDate]]]; - [formatter release]; - } - - if ((properties & kDAVProperty_ContentLength) && !isDirectory && [attributes objectForKey:NSFileSize]) { - [xmlString appendFormat:@"%qu", [attributes fileSize]]; - } - - [xmlString appendString:@""]; - [xmlString appendString:@"HTTP/1.1 200 OK"]; - [xmlString appendString:@""]; - [xmlString appendString:@"\n"]; - CFRelease(escapedPath); - } -} - -static xmlNodePtr _XMLChildWithName(xmlNodePtr child, const xmlChar* name) { - while (child) { - if ((child->type == XML_ELEMENT_NODE) && !xmlStrcmp(child->name, name)) { - return child; - } - child = child->next; - } - return NULL; -} - -- (id) initWithMethod:(NSString*)method headers:(NSDictionary*)headers bodyData:(NSData*)body resourcePath:(NSString*)resourcePath rootPath:(NSString*)rootPath { - if ((self = [super init])) { - _status = 200; - _headers = [[NSMutableDictionary alloc] init]; - - // 10.1 DAV Header - if ([method isEqualToString:@"OPTIONS"]) { - if ([[headers objectForKey:@"User-Agent"] hasPrefix:@"WebDAVFS/"]) { // Mac OS X WebDAV support - [_headers setObject:@"1, 2" forKey:@"DAV"]; - } else { - [_headers setObject:@"1" forKey:@"DAV"]; - } - } - - // 9.1 PROPFIND Method - if ([method isEqualToString:@"PROPFIND"]) { - NSInteger depth; - NSString* depthHeader = [headers objectForKey:@"Depth"]; - if ([depthHeader isEqualToString:@"0"]) { - depth = 0; - } else if ([depthHeader isEqualToString:@"1"]) { - depth = 1; - } else { - HTTPLogError(@"Unsupported DAV depth \"%@\"", depthHeader); - [self release]; - return nil; - } - - DAVProperties properties = 0; - xmlDocPtr document = xmlReadMemory(body.bytes, (int)body.length, NULL, NULL, kXMLParseOptions); - if (document) { - xmlNodePtr node = _XMLChildWithName(document->children, (const xmlChar*)"propfind"); - if (node) { - node = _XMLChildWithName(node->children, (const xmlChar*)"prop"); - } - if (node) { - node = node->children; - while (node) { - if (!xmlStrcmp(node->name, (const xmlChar*)"resourcetype")) { - properties |= kDAVProperty_ResourceType; - } else if (!xmlStrcmp(node->name, (const xmlChar*)"creationdate")) { - properties |= kDAVProperty_CreationDate; - } else if (!xmlStrcmp(node->name, (const xmlChar*)"getlastmodified")) { - properties |= kDAVProperty_LastModified; - } else if (!xmlStrcmp(node->name, (const xmlChar*)"getcontentlength")) { - properties |= kDAVProperty_ContentLength; - } else { - HTTPLogWarn(@"Unknown DAV property requested \"%s\"", node->name); - } - node = node->next; - } - } else { - HTTPLogWarn(@"HTTP Server: Invalid DAV properties\n%@", [[[NSString alloc] initWithData:body encoding:NSUTF8StringEncoding] autorelease]); - } - xmlFreeDoc(document); - } - if (!properties) { - properties = kDAVAllProperties; - } - - NSString* basePath = [rootPath stringByAppendingPathComponent:resourcePath]; - if (![basePath hasPrefix:rootPath] || ![[NSFileManager defaultManager] fileExistsAtPath:basePath]) { - [self release]; - return nil; - } - - NSMutableString* xmlString = [NSMutableString stringWithString:@""]; - [xmlString appendString:@"\n"]; - if (![resourcePath hasPrefix:@"/"]) { - resourcePath = [@"/" stringByAppendingString:resourcePath]; - } - _AddPropertyResponse(basePath, resourcePath, properties, xmlString); - if (depth == 1) { - if (![resourcePath hasSuffix:@"/"]) { - resourcePath = [resourcePath stringByAppendingString:@"/"]; - } - NSDirectoryEnumerator* enumerator = [[NSFileManager defaultManager] enumeratorAtPath:basePath]; - NSString* path; - while ((path = [enumerator nextObject])) { - _AddPropertyResponse([basePath stringByAppendingPathComponent:path], [resourcePath stringByAppendingString:path], properties, xmlString); - [enumerator skipDescendents]; - } - } - [xmlString appendString:@""]; - - [_headers setObject:@"application/xml; charset=\"utf-8\"" forKey:@"Content-Type"]; - _data = [[xmlString dataUsingEncoding:NSUTF8StringEncoding] retain]; - _status = 207; - } - - // 9.3 MKCOL Method - if ([method isEqualToString:@"MKCOL"]) { - NSString* path = [rootPath stringByAppendingPathComponent:resourcePath]; - if (![path hasPrefix:rootPath]) { - [self release]; - return nil; - } - - if (![[NSFileManager defaultManager] fileExistsAtPath:[path stringByDeletingLastPathComponent]]) { - HTTPLogError(@"Missing intermediate collection(s) at \"%@\"", path); - _status = 409; - } else if (![[NSFileManager defaultManager] createDirectoryAtPath:path withIntermediateDirectories:NO attributes:nil error:NULL]) { - HTTPLogError(@"Failed creating collection at \"%@\"", path); - _status = 405; - } - } - - // 9.8 COPY Method - // 9.9 MOVE Method - if ([method isEqualToString:@"MOVE"] || [method isEqualToString:@"COPY"]) { - if ([method isEqualToString:@"COPY"] && ![[headers objectForKey:@"Depth"] isEqualToString:@"infinity"]) { - HTTPLogError(@"Unsupported DAV depth \"%@\"", [headers objectForKey:@"Depth"]); - [self release]; - return nil; - } - - NSString* sourcePath = [rootPath stringByAppendingPathComponent:resourcePath]; - if (![sourcePath hasPrefix:rootPath] || ![[NSFileManager defaultManager] fileExistsAtPath:sourcePath]) { - [self release]; - return nil; - } - - NSString* destination = [headers objectForKey:@"Destination"]; - NSRange range = [destination rangeOfString:[headers objectForKey:@"Host"]]; - if (range.location == NSNotFound) { - [self release]; - return nil; - } - NSString* destinationPath = [rootPath stringByAppendingPathComponent: - [[destination substringFromIndex:(range.location + range.length)] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; - if (![destinationPath hasPrefix:rootPath] || [[NSFileManager defaultManager] fileExistsAtPath:destinationPath]) { - [self release]; - return nil; - } - - BOOL isDirectory; - if (![[NSFileManager defaultManager] fileExistsAtPath:[destinationPath stringByDeletingLastPathComponent] isDirectory:&isDirectory] || !isDirectory) { - HTTPLogError(@"Invalid destination path \"%@\"", destinationPath); - _status = 409; - } else { - BOOL existing = [[NSFileManager defaultManager] fileExistsAtPath:destinationPath]; - if (existing && [[headers objectForKey:@"Overwrite"] isEqualToString:@"F"]) { - HTTPLogError(@"Pre-existing destination path \"%@\"", destinationPath); - _status = 412; - } else { - if ([method isEqualToString:@"COPY"]) { - if ([[NSFileManager defaultManager] copyItemAtPath:sourcePath toPath:destinationPath error:NULL]) { - _status = existing ? 204 : 201; - } else { - HTTPLogError(@"Failed copying \"%@\" to \"%@\"", sourcePath, destinationPath); - _status = 403; - } - } else { - if ([[NSFileManager defaultManager] moveItemAtPath:sourcePath toPath:destinationPath error:NULL]) { - _status = existing ? 204 : 201; - } else { - HTTPLogError(@"Failed moving \"%@\" to \"%@\"", sourcePath, destinationPath); - _status = 403; - } - } - } - } - } - - // 9.10 LOCK Method - TODO: Actually lock the resource - if ([method isEqualToString:@"LOCK"]) { - NSString* path = [rootPath stringByAppendingPathComponent:resourcePath]; - if (![path hasPrefix:rootPath]) { - [self release]; - return nil; - } - - NSString* depth = [headers objectForKey:@"Depth"]; - NSString* scope = nil; - NSString* type = nil; - NSString* owner = nil; - xmlDocPtr document = xmlReadMemory(body.bytes, (int)body.length, NULL, NULL, kXMLParseOptions); - if (document) { - xmlNodePtr node = _XMLChildWithName(document->children, (const xmlChar*)"lockinfo"); - if (node) { - xmlNodePtr scopeNode = _XMLChildWithName(node->children, (const xmlChar*)"lockscope"); - if (scopeNode && scopeNode->children && scopeNode->children->name) { - scope = [NSString stringWithUTF8String:(const char*)scopeNode->children->name]; - } - xmlNodePtr typeNode = _XMLChildWithName(node->children, (const xmlChar*)"locktype"); - if (typeNode && typeNode->children && typeNode->children->name) { - type = [NSString stringWithUTF8String:(const char*)typeNode->children->name]; - } - xmlNodePtr ownerNode = _XMLChildWithName(node->children, (const xmlChar*)"owner"); - if (ownerNode) { - ownerNode = _XMLChildWithName(ownerNode->children, (const xmlChar*)"href"); - if (ownerNode && ownerNode->children && ownerNode->children->content) { - owner = [NSString stringWithUTF8String:(const char*)ownerNode->children->content]; - } - } - } else { - HTTPLogWarn(@"HTTP Server: Invalid DAV properties\n%@", [[[NSString alloc] initWithData:body encoding:NSUTF8StringEncoding] autorelease]); - } - xmlFreeDoc(document); - } - if ([scope isEqualToString:@"exclusive"] && [type isEqualToString:@"write"] && [depth isEqualToString:@"0"] && - ([[NSFileManager defaultManager] fileExistsAtPath:path] || [[NSData data] writeToFile:path atomically:YES])) { - NSString* timeout = [headers objectForKey:@"Timeout"]; - - CFUUIDRef uuid = CFUUIDCreate(kCFAllocatorDefault); - NSString* token = [NSString stringWithFormat:@"urn:uuid:%@", [(id)CFUUIDCreateString(kCFAllocatorDefault, uuid) autorelease]]; - CFRelease(uuid); - - NSMutableString* xmlString = [NSMutableString stringWithString:@""]; - [xmlString appendString:@"\n"]; - [xmlString appendString:@"\n\n"]; - [xmlString appendFormat:@"\n", type]; - [xmlString appendFormat:@"\n", scope]; - [xmlString appendFormat:@"%@\n", depth]; - if (owner) { - [xmlString appendFormat:@"%@\n", owner]; - } - if (timeout) { - [xmlString appendFormat:@"%@\n", timeout]; - } - [xmlString appendFormat:@"%@\n", token]; - // [xmlString appendFormat:@"%@\n", root]; - [xmlString appendString:@"\n\n"]; - [xmlString appendString:@""]; - - [_headers setObject:@"application/xml; charset=\"utf-8\"" forKey:@"Content-Type"]; - _data = [[xmlString dataUsingEncoding:NSUTF8StringEncoding] retain]; - _status = 200; - HTTPLogVerbose(@"Pretending to lock \"%@\"", resourcePath); - } else { - HTTPLogError(@"Locking request \"%@/%@/%@\" for \"%@\" is not allowed", scope, type, depth, resourcePath); - _status = 403; - } - } - - // 9.11 UNLOCK Method - TODO: Actually unlock the resource - if ([method isEqualToString:@"UNLOCK"]) { - NSString* path = [rootPath stringByAppendingPathComponent:resourcePath]; - if (![path hasPrefix:rootPath] || ![[NSFileManager defaultManager] fileExistsAtPath:path]) { - [self release]; - return nil; - } - - NSString* token = [headers objectForKey:@"Lock-Token"]; - _status = token ? 204 : 400; - HTTPLogVerbose(@"Pretending to unlock \"%@\"", resourcePath); - } - - } - return self; -} - -- (void) dealloc { - [_headers release]; - [_data release]; - - [super dealloc]; -} - -- (UInt64) contentLength { - return _data ? _data.length : 0; -} - -- (UInt64) offset { - return _offset; -} - -- (void) setOffset:(UInt64)offset { - _offset = offset; -} - -- (NSData*) readDataOfLength:(NSUInteger)lengthParameter { - if (_data) { - NSUInteger remaining = _data.length - (NSUInteger)_offset; - NSUInteger length = lengthParameter < remaining ? lengthParameter : remaining; - void* bytes = (void*)(_data.bytes + _offset); - _offset += length; - return [NSData dataWithBytesNoCopy:bytes length:length freeWhenDone:NO]; - } - return nil; -} - -- (BOOL) isDone { - return _data ? _offset == _data.length : YES; -} - -- (NSInteger) status { - return _status; -} - -- (NSDictionary*) httpHeaders { - return _headers; -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Extensions/WebDAV/DELETEResponse.h b/third_party/objc/CocoaHTTPServer/Extensions/WebDAV/DELETEResponse.h deleted file mode 100644 index 0395327c133cd..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Extensions/WebDAV/DELETEResponse.h +++ /dev/null @@ -1,7 +0,0 @@ -#import "HTTPResponse.h" - -@interface DELETEResponse : NSObject { - NSInteger _status; -} -- (id) initWithFilePath:(NSString*)path; -@end diff --git a/third_party/objc/CocoaHTTPServer/Extensions/WebDAV/DELETEResponse.m b/third_party/objc/CocoaHTTPServer/Extensions/WebDAV/DELETEResponse.m deleted file mode 100644 index d3d1d68fdeac6..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Extensions/WebDAV/DELETEResponse.m +++ /dev/null @@ -1,49 +0,0 @@ -#import "DELETEResponse.h" -#import "HTTPLogging.h" - -// HTTP methods: http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html -// HTTP headers: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html -// HTTP status codes: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html - -static const int httpLogLevel = HTTP_LOG_LEVEL_WARN; - -@implementation DELETEResponse - -- (id) initWithFilePath:(NSString*)path { - if ((self = [super init])) { - BOOL exists = [[NSFileManager defaultManager] fileExistsAtPath:path]; - if ([[NSFileManager defaultManager] removeItemAtPath:path error:NULL]) { - _status = exists ? 200 : 204; - } else { - HTTPLogError(@"Failed deleting \"%@\"", path); - _status = 404; - } - } - return self; -} - -- (UInt64) contentLength { - return 0; -} - -- (UInt64) offset { - return 0; -} - -- (void)setOffset:(UInt64)offset { - ; -} - -- (NSData*) readDataOfLength:(NSUInteger)length { - return nil; -} - -- (BOOL) isDone { - return YES; -} - -- (NSInteger) status { - return _status; -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Extensions/WebDAV/PUTResponse.h b/third_party/objc/CocoaHTTPServer/Extensions/WebDAV/PUTResponse.h deleted file mode 100644 index 7d93a8f7d7f74..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Extensions/WebDAV/PUTResponse.h +++ /dev/null @@ -1,8 +0,0 @@ -#import "HTTPResponse.h" - -@interface PUTResponse : NSObject { - NSInteger _status; -} -- (id) initWithFilePath:(NSString*)path headers:(NSDictionary*)headers bodyData:(NSData*)body; -- (id) initWithFilePath:(NSString*)path headers:(NSDictionary*)headers bodyFile:(NSString*)body; -@end diff --git a/third_party/objc/CocoaHTTPServer/Extensions/WebDAV/PUTResponse.m b/third_party/objc/CocoaHTTPServer/Extensions/WebDAV/PUTResponse.m deleted file mode 100644 index 811d1a147edf2..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Extensions/WebDAV/PUTResponse.m +++ /dev/null @@ -1,69 +0,0 @@ -#import "PUTResponse.h" -#import "HTTPLogging.h" - -// HTTP methods: http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html -// HTTP headers: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html -// HTTP status codes: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html - -static const int httpLogLevel = HTTP_LOG_LEVEL_WARN; - -@implementation PUTResponse - -- (id) initWithFilePath:(NSString*)path headers:(NSDictionary*)headers body:(id)body { - if ((self = [super init])) { - if ([headers objectForKey:@"Content-Range"]) { - HTTPLogError(@"Content-Range not supported for upload to \"%@\"", path); - _status = 400; - } else { - BOOL overwrite = [[NSFileManager defaultManager] fileExistsAtPath:path]; - BOOL success; - if ([body isKindOfClass:[NSString class]]) { - [[NSFileManager defaultManager] removeItemAtPath:path error:NULL]; - success = [[NSFileManager defaultManager] moveItemAtPath:body toPath:path error:NULL]; - } else { - success = [body writeToFile:path atomically:YES]; - } - if (success) { - _status = overwrite ? 200 : 201; - } else { - HTTPLogError(@"Failed writing upload to \"%@\"", path); - _status = 403; - } - } - } - return self; -} - -- (id) initWithFilePath:(NSString*)path headers:(NSDictionary*)headers bodyData:(NSData*)body { - return [self initWithFilePath:path headers:headers body:body]; -} - -- (id) initWithFilePath:(NSString*)path headers:(NSDictionary*)headers bodyFile:(NSString*)body { - return [self initWithFilePath:path headers:headers body:body]; -} - -- (UInt64) contentLength { - return 0; -} - -- (UInt64) offset { - return 0; -} - -- (void) setOffset:(UInt64)offset { - ; -} - -- (NSData*) readDataOfLength:(NSUInteger)length { - return nil; -} - -- (BOOL) isDone { - return YES; -} - -- (NSInteger) status { - return _status; -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/LICENSE.txt b/third_party/objc/CocoaHTTPServer/LICENSE.txt deleted file mode 100644 index 64c3c902bf609..0000000000000 --- a/third_party/objc/CocoaHTTPServer/LICENSE.txt +++ /dev/null @@ -1,18 +0,0 @@ -Software License Agreement (BSD License) - -Copyright (c) 2011, Deusty, LLC -All rights reserved. - -Redistribution and use of this software in source and binary forms, -with or without modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above - copyright notice, this list of conditions and the - following disclaimer. - -* Neither the name of Deusty nor the names of its - contributors may be used to endorse or promote products - derived from this software without specific prior - written permission of Deusty, LLC. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/third_party/objc/CocoaHTTPServer/README.markdown b/third_party/objc/CocoaHTTPServer/README.markdown deleted file mode 100644 index e7827e00f08c5..0000000000000 --- a/third_party/objc/CocoaHTTPServer/README.markdown +++ /dev/null @@ -1,20 +0,0 @@ -CocoaHTTPServer is a small, lightweight, embeddable HTTP server for Mac OS X or iOS applications. - -Sometimes developers need an embedded HTTP server in their app. Perhaps it's a server application with remote monitoring. Or perhaps it's a desktop application using HTTP for the communication backend. Or perhaps it's an iOS app providing over-the-air access to documents. Whatever your reason, CocoaHTTPServer can get the job done. It provides: - -- Built in support for bonjour broadcasting -- IPv4 and IPv6 support -- Asynchronous networking using GCD and standard sockets -- Password protection support -- SSL/TLS encryption support -- Extremely FAST and memory efficient -- Extremely scalable (built entirely upon GCD) -- Heavily commented code -- Very easily extensible -- WebDAV is supported too! - -
    -Can't find the answer to your question in any of the [wiki](https://github.com/robbiehanson/CocoaHTTPServer/wiki) articles? Try the **[mailing list](http://groups.google.com/group/cocoahttpserver)**. -
    -
    -Love the project? Wanna buy me a coffee? (or a beer :D) [![donation](http://www.paypal.com/en_US/i/btn/btn_donate_SM.gif)](https://www.paypal.com/us/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9404262) diff --git a/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/DynamicServer-Info.plist b/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/DynamicServer-Info.plist deleted file mode 100644 index f696cb233ef28..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/DynamicServer-Info.plist +++ /dev/null @@ -1,32 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSMinimumSystemVersion - ${MACOSX_DEPLOYMENT_TARGET} - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/DynamicServer.xcodeproj/project.pbxproj b/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/DynamicServer.xcodeproj/project.pbxproj deleted file mode 100644 index 5b289803d589a..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/DynamicServer.xcodeproj/project.pbxproj +++ /dev/null @@ -1,458 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; }; - 256AC3DA0F4B6AC300CF3369 /* DynamicServerAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 256AC3D90F4B6AC300CF3369 /* DynamicServerAppDelegate.m */; }; - 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; - 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; - DC2E2DF91298BE36009F096E /* DDASLLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = DC2E2DF21298BE36009F096E /* DDASLLogger.m */; }; - DC2E2DFA1298BE36009F096E /* DDFileLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = DC2E2DF41298BE36009F096E /* DDFileLogger.m */; }; - DC2E2DFB1298BE36009F096E /* DDLog.m in Sources */ = {isa = PBXBuildFile; fileRef = DC2E2DF61298BE36009F096E /* DDLog.m */; }; - DC2E2DFC1298BE36009F096E /* DDTTYLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = DC2E2DF81298BE36009F096E /* DDTTYLogger.m */; }; - DC2E2E021298BE76009F096E /* GCDAsyncSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = DC2E2E011298BE76009F096E /* GCDAsyncSocket.m */; }; - DC2E2E7A1298C0F8009F096E /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC2E2E791298C0F8009F096E /* Security.framework */; }; - DC2E2ED31298C540009F096E /* Web in Resources */ = {isa = PBXBuildFile; fileRef = DC2E2ED01298C540009F096E /* Web */; }; - DC2E2EE21298C60A009F096E /* MyHTTPConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = DC2E2EE11298C60A009F096E /* MyHTTPConnection.m */; }; - DC3303BD12B0967000AEF314 /* HTTPResponseTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DC3303BC12B0967000AEF314 /* HTTPResponseTest.m */; }; - DC372ECA139DC2AC00A8407D /* DDData.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372EAE139DC2AC00A8407D /* DDData.m */; }; - DC372ECB139DC2AC00A8407D /* DDNumber.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372EB0139DC2AC00A8407D /* DDNumber.m */; }; - DC372ECC139DC2AC00A8407D /* DDRange.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372EB2139DC2AC00A8407D /* DDRange.m */; }; - DC372ECD139DC2AC00A8407D /* HTTPAuthenticationRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372EB4139DC2AC00A8407D /* HTTPAuthenticationRequest.m */; }; - DC372ECE139DC2AC00A8407D /* HTTPConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372EB6139DC2AC00A8407D /* HTTPConnection.m */; }; - DC372ECF139DC2AC00A8407D /* HTTPMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372EB9139DC2AC00A8407D /* HTTPMessage.m */; }; - DC372ED0139DC2AC00A8407D /* HTTPServer.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372EBC139DC2AC00A8407D /* HTTPServer.m */; }; - DC372ED1139DC2AC00A8407D /* HTTPAsyncFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372EBF139DC2AC00A8407D /* HTTPAsyncFileResponse.m */; }; - DC372ED2139DC2AC00A8407D /* HTTPDataResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372EC1139DC2AC00A8407D /* HTTPDataResponse.m */; }; - DC372ED3139DC2AC00A8407D /* HTTPDynamicFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372EC3139DC2AC00A8407D /* HTTPDynamicFileResponse.m */; }; - DC372ED4139DC2AC00A8407D /* HTTPFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372EC5139DC2AC00A8407D /* HTTPFileResponse.m */; }; - DC372ED5139DC2AC00A8407D /* HTTPRedirectResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372EC7139DC2AC00A8407D /* HTTPRedirectResponse.m */; }; - DC372ED6139DC2AC00A8407D /* WebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372EC9139DC2AC00A8407D /* WebSocket.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; - 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; - 1DDD58150DA1D0A300B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; - 256AC3D80F4B6AC300CF3369 /* DynamicServerAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DynamicServerAppDelegate.h; sourceTree = ""; }; - 256AC3D90F4B6AC300CF3369 /* DynamicServerAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DynamicServerAppDelegate.m; sourceTree = ""; }; - 256AC3F00F4B6AF500CF3369 /* DynamicServer_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DynamicServer_Prefix.pch; sourceTree = ""; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; - 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; - 8D1107310486CEB800E47090 /* DynamicServer-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "DynamicServer-Info.plist"; sourceTree = ""; }; - 8D1107320486CEB800E47090 /* DynamicServer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DynamicServer.app; sourceTree = BUILT_PRODUCTS_DIR; }; - DC2E2DF11298BE36009F096E /* DDASLLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDASLLogger.h; path = ../../Vendor/CocoaLumberjack/DDASLLogger.h; sourceTree = SOURCE_ROOT; }; - DC2E2DF21298BE36009F096E /* DDASLLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDASLLogger.m; path = ../../Vendor/CocoaLumberjack/DDASLLogger.m; sourceTree = SOURCE_ROOT; }; - DC2E2DF31298BE36009F096E /* DDFileLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDFileLogger.h; path = ../../Vendor/CocoaLumberjack/DDFileLogger.h; sourceTree = SOURCE_ROOT; }; - DC2E2DF41298BE36009F096E /* DDFileLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDFileLogger.m; path = ../../Vendor/CocoaLumberjack/DDFileLogger.m; sourceTree = SOURCE_ROOT; }; - DC2E2DF51298BE36009F096E /* DDLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDLog.h; path = ../../Vendor/CocoaLumberjack/DDLog.h; sourceTree = SOURCE_ROOT; }; - DC2E2DF61298BE36009F096E /* DDLog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDLog.m; path = ../../Vendor/CocoaLumberjack/DDLog.m; sourceTree = SOURCE_ROOT; }; - DC2E2DF71298BE36009F096E /* DDTTYLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDTTYLogger.h; path = ../../Vendor/CocoaLumberjack/DDTTYLogger.h; sourceTree = SOURCE_ROOT; }; - DC2E2DF81298BE36009F096E /* DDTTYLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDTTYLogger.m; path = ../../Vendor/CocoaLumberjack/DDTTYLogger.m; sourceTree = SOURCE_ROOT; }; - DC2E2E001298BE76009F096E /* GCDAsyncSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GCDAsyncSocket.h; path = ../../Vendor/CocoaAsyncSocket/GCDAsyncSocket.h; sourceTree = SOURCE_ROOT; }; - DC2E2E011298BE76009F096E /* GCDAsyncSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GCDAsyncSocket.m; path = ../../Vendor/CocoaAsyncSocket/GCDAsyncSocket.m; sourceTree = SOURCE_ROOT; }; - DC2E2E791298C0F8009F096E /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; - DC2E2ED01298C540009F096E /* Web */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Web; sourceTree = ""; }; - DC2E2EE01298C60A009F096E /* MyHTTPConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyHTTPConnection.h; sourceTree = ""; }; - DC2E2EE11298C60A009F096E /* MyHTTPConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyHTTPConnection.m; sourceTree = ""; }; - DC3303BB12B0967000AEF314 /* HTTPResponseTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPResponseTest.h; sourceTree = ""; }; - DC3303BC12B0967000AEF314 /* HTTPResponseTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPResponseTest.m; sourceTree = ""; }; - DC372E3A139D37A500A8407D /* Base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = ""; }; - DC372E3B139D37A500A8407D /* Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; - DC372E3D139D37A500A8407D /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; - DC372EAD139DC2AC00A8407D /* DDData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDData.h; sourceTree = ""; }; - DC372EAE139DC2AC00A8407D /* DDData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDData.m; sourceTree = ""; }; - DC372EAF139DC2AC00A8407D /* DDNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDNumber.h; sourceTree = ""; }; - DC372EB0139DC2AC00A8407D /* DDNumber.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDNumber.m; sourceTree = ""; }; - DC372EB1139DC2AC00A8407D /* DDRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDRange.h; sourceTree = ""; }; - DC372EB2139DC2AC00A8407D /* DDRange.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDRange.m; sourceTree = ""; }; - DC372EB3139DC2AC00A8407D /* HTTPAuthenticationRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPAuthenticationRequest.h; path = ../../Core/HTTPAuthenticationRequest.h; sourceTree = ""; }; - DC372EB4139DC2AC00A8407D /* HTTPAuthenticationRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPAuthenticationRequest.m; path = ../../Core/HTTPAuthenticationRequest.m; sourceTree = ""; }; - DC372EB5139DC2AC00A8407D /* HTTPConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPConnection.h; path = ../../Core/HTTPConnection.h; sourceTree = ""; }; - DC372EB6139DC2AC00A8407D /* HTTPConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPConnection.m; path = ../../Core/HTTPConnection.m; sourceTree = ""; }; - DC372EB7139DC2AC00A8407D /* HTTPLogging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPLogging.h; path = ../../Core/HTTPLogging.h; sourceTree = ""; }; - DC372EB8139DC2AC00A8407D /* HTTPMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPMessage.h; path = ../../Core/HTTPMessage.h; sourceTree = ""; }; - DC372EB9139DC2AC00A8407D /* HTTPMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPMessage.m; path = ../../Core/HTTPMessage.m; sourceTree = ""; }; - DC372EBA139DC2AC00A8407D /* HTTPResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPResponse.h; path = ../../Core/HTTPResponse.h; sourceTree = ""; }; - DC372EBB139DC2AC00A8407D /* HTTPServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPServer.h; path = ../../Core/HTTPServer.h; sourceTree = ""; }; - DC372EBC139DC2AC00A8407D /* HTTPServer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPServer.m; path = ../../Core/HTTPServer.m; sourceTree = ""; }; - DC372EBE139DC2AC00A8407D /* HTTPAsyncFileResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPAsyncFileResponse.h; sourceTree = ""; }; - DC372EBF139DC2AC00A8407D /* HTTPAsyncFileResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPAsyncFileResponse.m; sourceTree = ""; }; - DC372EC0139DC2AC00A8407D /* HTTPDataResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPDataResponse.h; sourceTree = ""; }; - DC372EC1139DC2AC00A8407D /* HTTPDataResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPDataResponse.m; sourceTree = ""; }; - DC372EC2139DC2AC00A8407D /* HTTPDynamicFileResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPDynamicFileResponse.h; sourceTree = ""; }; - DC372EC3139DC2AC00A8407D /* HTTPDynamicFileResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPDynamicFileResponse.m; sourceTree = ""; }; - DC372EC4139DC2AC00A8407D /* HTTPFileResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPFileResponse.h; sourceTree = ""; }; - DC372EC5139DC2AC00A8407D /* HTTPFileResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPFileResponse.m; sourceTree = ""; }; - DC372EC6139DC2AC00A8407D /* HTTPRedirectResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPRedirectResponse.h; sourceTree = ""; }; - DC372EC7139DC2AC00A8407D /* HTTPRedirectResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPRedirectResponse.m; sourceTree = ""; }; - DC372EC8139DC2AC00A8407D /* WebSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebSocket.h; path = ../../Core/WebSocket.h; sourceTree = ""; }; - DC372EC9139DC2AC00A8407D /* WebSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WebSocket.m; path = ../../Core/WebSocket.m; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8D11072E0486CEB800E47090 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, - DC2E2E7A1298C0F8009F096E /* Security.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Classes */ = { - isa = PBXGroup; - children = ( - 256AC3D80F4B6AC300CF3369 /* DynamicServerAppDelegate.h */, - 256AC3D90F4B6AC300CF3369 /* DynamicServerAppDelegate.m */, - DC2E2EE01298C60A009F096E /* MyHTTPConnection.h */, - DC2E2EE11298C60A009F096E /* MyHTTPConnection.m */, - DC3303BB12B0967000AEF314 /* HTTPResponseTest.h */, - DC3303BC12B0967000AEF314 /* HTTPResponseTest.m */, - ); - name = Classes; - sourceTree = ""; - }; - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { - isa = PBXGroup; - children = ( - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, - DC2E2E791298C0F8009F096E /* Security.framework */, - ); - name = "Linked Frameworks"; - sourceTree = ""; - }; - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - 29B97324FDCFA39411CA2CEA /* AppKit.framework */, - 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */, - 29B97325FDCFA39411CA2CEA /* Foundation.framework */, - ); - name = "Other Frameworks"; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 8D1107320486CEB800E47090 /* DynamicServer.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* DynamicServer */ = { - isa = PBXGroup; - children = ( - DC2E2DEB1298BDFB009F096E /* Logging */, - DC2E2DEC1298BE02009F096E /* TCP */, - DC2E2DED1298BE0A009F096E /* HTTP */, - 080E96DDFE201D6D7F000001 /* Classes */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = DynamicServer; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - DC372E39139D37A500A8407D /* Xcode-Configurations */, - 256AC3F00F4B6AF500CF3369 /* DynamicServer_Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.m */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - 8D1107310486CEB800E47090 /* DynamicServer-Info.plist */, - 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, - 1DDD58140DA1D0A300B32029 /* MainMenu.xib */, - DC2E2ED01298C540009F096E /* Web */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, - ); - name = Frameworks; - sourceTree = ""; - }; - DC2E2DEB1298BDFB009F096E /* Logging */ = { - isa = PBXGroup; - children = ( - DC2E2DF51298BE36009F096E /* DDLog.h */, - DC2E2DF61298BE36009F096E /* DDLog.m */, - DC2E2DF71298BE36009F096E /* DDTTYLogger.h */, - DC2E2DF81298BE36009F096E /* DDTTYLogger.m */, - DC2E2DF11298BE36009F096E /* DDASLLogger.h */, - DC2E2DF21298BE36009F096E /* DDASLLogger.m */, - DC2E2DF31298BE36009F096E /* DDFileLogger.h */, - DC2E2DF41298BE36009F096E /* DDFileLogger.m */, - ); - name = Logging; - sourceTree = ""; - }; - DC2E2DEC1298BE02009F096E /* TCP */ = { - isa = PBXGroup; - children = ( - DC2E2E001298BE76009F096E /* GCDAsyncSocket.h */, - DC2E2E011298BE76009F096E /* GCDAsyncSocket.m */, - ); - name = TCP; - sourceTree = ""; - }; - DC2E2DED1298BE0A009F096E /* HTTP */ = { - isa = PBXGroup; - children = ( - DC372EB7139DC2AC00A8407D /* HTTPLogging.h */, - DC372EB3139DC2AC00A8407D /* HTTPAuthenticationRequest.h */, - DC372EB4139DC2AC00A8407D /* HTTPAuthenticationRequest.m */, - DC372EBB139DC2AC00A8407D /* HTTPServer.h */, - DC372EBC139DC2AC00A8407D /* HTTPServer.m */, - DC372EB5139DC2AC00A8407D /* HTTPConnection.h */, - DC372EB6139DC2AC00A8407D /* HTTPConnection.m */, - DC372EB8139DC2AC00A8407D /* HTTPMessage.h */, - DC372EB9139DC2AC00A8407D /* HTTPMessage.m */, - DC372EBA139DC2AC00A8407D /* HTTPResponse.h */, - DC372EC8139DC2AC00A8407D /* WebSocket.h */, - DC372EC9139DC2AC00A8407D /* WebSocket.m */, - DC372EBD139DC2AC00A8407D /* Responses */, - DC372EAC139DC2AC00A8407D /* Categories */, - ); - name = HTTP; - sourceTree = ""; - }; - DC372E39139D37A500A8407D /* Xcode-Configurations */ = { - isa = PBXGroup; - children = ( - DC372E3A139D37A500A8407D /* Base.xcconfig */, - DC372E3B139D37A500A8407D /* Debug.xcconfig */, - DC372E3D139D37A500A8407D /* Release.xcconfig */, - ); - name = "Xcode-Configurations"; - path = "../Xcode-Configurations"; - sourceTree = ""; - }; - DC372EAC139DC2AC00A8407D /* Categories */ = { - isa = PBXGroup; - children = ( - DC372EAD139DC2AC00A8407D /* DDData.h */, - DC372EAE139DC2AC00A8407D /* DDData.m */, - DC372EAF139DC2AC00A8407D /* DDNumber.h */, - DC372EB0139DC2AC00A8407D /* DDNumber.m */, - DC372EB1139DC2AC00A8407D /* DDRange.h */, - DC372EB2139DC2AC00A8407D /* DDRange.m */, - ); - name = Categories; - path = ../../Core/Categories; - sourceTree = ""; - }; - DC372EBD139DC2AC00A8407D /* Responses */ = { - isa = PBXGroup; - children = ( - DC372EBE139DC2AC00A8407D /* HTTPAsyncFileResponse.h */, - DC372EBF139DC2AC00A8407D /* HTTPAsyncFileResponse.m */, - DC372EC0139DC2AC00A8407D /* HTTPDataResponse.h */, - DC372EC1139DC2AC00A8407D /* HTTPDataResponse.m */, - DC372EC2139DC2AC00A8407D /* HTTPDynamicFileResponse.h */, - DC372EC3139DC2AC00A8407D /* HTTPDynamicFileResponse.m */, - DC372EC4139DC2AC00A8407D /* HTTPFileResponse.h */, - DC372EC5139DC2AC00A8407D /* HTTPFileResponse.m */, - DC372EC6139DC2AC00A8407D /* HTTPRedirectResponse.h */, - DC372EC7139DC2AC00A8407D /* HTTPRedirectResponse.m */, - ); - name = Responses; - path = ../../Core/Responses; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 8D1107260486CEB800E47090 /* DynamicServer */ = { - isa = PBXNativeTarget; - buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "DynamicServer" */; - buildPhases = ( - 8D1107290486CEB800E47090 /* Resources */, - 8D11072C0486CEB800E47090 /* Sources */, - 8D11072E0486CEB800E47090 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = DynamicServer; - productInstallPath = "$(HOME)/Applications"; - productName = DynamicServer; - productReference = 8D1107320486CEB800E47090 /* DynamicServer.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0410; - }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "DynamicServer" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* DynamicServer */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 8D1107260486CEB800E47090 /* DynamicServer */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 8D1107290486CEB800E47090 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, - 1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */, - DC2E2ED31298C540009F096E /* Web in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 8D11072C0486CEB800E47090 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D11072D0486CEB800E47090 /* main.m in Sources */, - 256AC3DA0F4B6AC300CF3369 /* DynamicServerAppDelegate.m in Sources */, - DC2E2DF91298BE36009F096E /* DDASLLogger.m in Sources */, - DC2E2DFA1298BE36009F096E /* DDFileLogger.m in Sources */, - DC2E2DFB1298BE36009F096E /* DDLog.m in Sources */, - DC2E2DFC1298BE36009F096E /* DDTTYLogger.m in Sources */, - DC2E2E021298BE76009F096E /* GCDAsyncSocket.m in Sources */, - DC2E2EE21298C60A009F096E /* MyHTTPConnection.m in Sources */, - DC3303BD12B0967000AEF314 /* HTTPResponseTest.m in Sources */, - DC372ECA139DC2AC00A8407D /* DDData.m in Sources */, - DC372ECB139DC2AC00A8407D /* DDNumber.m in Sources */, - DC372ECC139DC2AC00A8407D /* DDRange.m in Sources */, - DC372ECD139DC2AC00A8407D /* HTTPAuthenticationRequest.m in Sources */, - DC372ECE139DC2AC00A8407D /* HTTPConnection.m in Sources */, - DC372ECF139DC2AC00A8407D /* HTTPMessage.m in Sources */, - DC372ED0139DC2AC00A8407D /* HTTPServer.m in Sources */, - DC372ED1139DC2AC00A8407D /* HTTPAsyncFileResponse.m in Sources */, - DC372ED2139DC2AC00A8407D /* HTTPDataResponse.m in Sources */, - DC372ED3139DC2AC00A8407D /* HTTPDynamicFileResponse.m in Sources */, - DC372ED4139DC2AC00A8407D /* HTTPFileResponse.m in Sources */, - DC372ED5139DC2AC00A8407D /* HTTPRedirectResponse.m in Sources */, - DC372ED6139DC2AC00A8407D /* WebSocket.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 089C165DFE840E0CC02AAC07 /* English */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - 1DDD58140DA1D0A300B32029 /* MainMenu.xib */ = { - isa = PBXVariantGroup; - children = ( - 1DDD58150DA1D0A300B32029 /* English */, - ); - name = MainMenu.xib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - C01FCF4B08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PREFIX_HEADER = DynamicServer_Prefix.pch; - INFOPLIST_FILE = "DynamicServer-Info.plist"; - PRODUCT_NAME = DynamicServer; - }; - name = Debug; - }; - C01FCF4C08A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PREFIX_HEADER = DynamicServer_Prefix.pch; - INFOPLIST_FILE = "DynamicServer-Info.plist"; - PRODUCT_NAME = DynamicServer; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DC372E3B139D37A500A8407D /* Debug.xcconfig */; - buildSettings = { - SDKROOT = macosx; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DC372E3D139D37A500A8407D /* Release.xcconfig */; - buildSettings = { - SDKROOT = macosx; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "DynamicServer" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4B08A954540054247B /* Debug */, - C01FCF4C08A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "DynamicServer" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/DynamicServer.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/DynamicServer.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 17994864879e4..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/DynamicServer.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/DynamicServerAppDelegate.h b/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/DynamicServerAppDelegate.h deleted file mode 100644 index 53c057c4ebf33..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/DynamicServerAppDelegate.h +++ /dev/null @@ -1,15 +0,0 @@ -#import - -@class HTTPServer; - - -@interface DynamicServerAppDelegate : NSObject -{ - HTTPServer *httpServer; - - NSWindow *window; -} - -@property (assign) IBOutlet NSWindow *window; - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/DynamicServerAppDelegate.m b/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/DynamicServerAppDelegate.m deleted file mode 100644 index 52efc16e63d15..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/DynamicServerAppDelegate.m +++ /dev/null @@ -1,53 +0,0 @@ -#import "DynamicServerAppDelegate.h" -#import "HTTPServer.h" -#import "MyHTTPConnection.h" -#import "DDLog.h" -#import "DDTTYLogger.h" - -// Log levels: off, error, warn, info, verbose -static const int ddLogLevel = LOG_LEVEL_VERBOSE; - - -@implementation DynamicServerAppDelegate - -@synthesize window; - -- (void)applicationDidFinishLaunching:(NSNotification *)aNotification -{ - // Configure our logging framework. - // To keep things simple and fast, we're just going to log to the Xcode console. - [DDLog addLogger:[DDTTYLogger sharedInstance]]; - - // Initalize our http server - httpServer = [[HTTPServer alloc] init]; - - // Tell server to use our custom MyHTTPConnection class. - [httpServer setConnectionClass:[MyHTTPConnection class]]; - - // Tell the server to broadcast its presence via Bonjour. - // This allows browsers such as Safari to automatically discover our service. - [httpServer setType:@"_http._tcp."]; - - // Normally there's no need to run our server on any specific port. - // Technologies like Bonjour allow clients to dynamically discover the server's port at runtime. - // However, for easy testing you may want force a certain port so you can just hit the refresh button. -// [httpServer setPort:12345]; - - // Serve files from our embedded Web folder - NSString *webPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"Web"]; - DDLogVerbose(@"Setting document root: %@", webPath); - - [httpServer setDocumentRoot:webPath]; - - // Start the server (and check for problems) - - NSError *error; - BOOL success = [httpServer start:&error]; - - if(!success) - { - DDLogError(@"Error starting HTTP Server: %@", error); - } -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/DynamicServer_Prefix.pch b/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/DynamicServer_Prefix.pch deleted file mode 100644 index aa53224d29387..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/DynamicServer_Prefix.pch +++ /dev/null @@ -1,7 +0,0 @@ -// -// Prefix header for all source files of the 'DynamicServer' target in the 'DynamicServer' project -// - -#ifdef __OBJC__ - #import -#endif diff --git a/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/English.lproj/InfoPlist.strings b/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/English.lproj/InfoPlist.strings deleted file mode 100644 index 477b28ff8f86a..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/English.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/English.lproj/MainMenu.xib b/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/English.lproj/MainMenu.xib deleted file mode 100644 index 20faef954f32c..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/English.lproj/MainMenu.xib +++ /dev/null @@ -1,4119 +0,0 @@ - - - - 1060 - 10A324 - 719 - 1015 - 418.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 719 - - - YES - - - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - YES - - - YES - - - - YES - - NSApplication - - - FirstResponder - - - NSApplication - - - AMainMenu - - YES - - - DynamicServer - - 1048576 - 2147483647 - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - submenuAction: - - DynamicServer - - YES - - - About DynamicServer - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Preferences… - , - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Services - - 1048576 - 2147483647 - - - submenuAction: - - Services - - YES - - _NSServicesMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Hide DynamicServer - h - 1048576 - 2147483647 - - - - - - Hide Others - h - 1572864 - 2147483647 - - - - - - Show All - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Quit DynamicServer - q - 1048576 - 2147483647 - - - - - _NSAppleMenu - - - - - File - - 1048576 - 2147483647 - - - submenuAction: - - File - - YES - - - New - n - 1048576 - 2147483647 - - - - - - Open… - o - 1048576 - 2147483647 - - - - - - Open Recent - - 1048576 - 2147483647 - - - submenuAction: - - Open Recent - - YES - - - Clear Menu - - 1048576 - 2147483647 - - - - - _NSRecentDocumentsMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Close - w - 1048576 - 2147483647 - - - - - - Save - s - 1048576 - 2147483647 - - - - - - Save As… - S - 1179648 - 2147483647 - - - - - - Revert to Saved - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Page Setup... - P - 1179648 - 2147483647 - - - - - - - Print… - p - 1048576 - 2147483647 - - - - - - - - - Edit - - 1048576 - 2147483647 - - - submenuAction: - - Edit - - YES - - - Undo - z - 1048576 - 2147483647 - - - - - - Redo - Z - 1179648 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Cut - x - 1048576 - 2147483647 - - - - - - Copy - c - 1048576 - 2147483647 - - - - - - Paste - v - 1048576 - 2147483647 - - - - - - Paste and Match Style - V - 1572864 - 2147483647 - - - - - - Delete - - 1048576 - 2147483647 - - - - - - Select All - a - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Find - - 1048576 - 2147483647 - - - submenuAction: - - Find - - YES - - - Find… - f - 1048576 - 2147483647 - - - 1 - - - - Find Next - g - 1048576 - 2147483647 - - - 2 - - - - Find Previous - G - 1179648 - 2147483647 - - - 3 - - - - Use Selection for Find - e - 1048576 - 2147483647 - - - 7 - - - - Jump to Selection - j - 1048576 - 2147483647 - - - - - - - - - Spelling and Grammar - - 1048576 - 2147483647 - - - submenuAction: - - Spelling and Grammar - - YES - - - Show Spelling and Grammar - : - 1048576 - 2147483647 - - - - - - Check Document Now - ; - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Check Spelling While Typing - - 1048576 - 2147483647 - - - - - - Check Grammar With Spelling - - 1048576 - 2147483647 - - - - - - Correct Spelling Automatically - - 2147483647 - - - - - - - - - Substitutions - - 1048576 - 2147483647 - - - submenuAction: - - Substitutions - - YES - - - Show Substitutions - - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Smart Copy/Paste - f - 1048576 - 2147483647 - - - 1 - - - - Smart Quotes - g - 1048576 - 2147483647 - - - 2 - - - - Smart Dashes - - 2147483647 - - - - - - Smart Links - G - 1179648 - 2147483647 - - - 3 - - - - Text Replacement - - 2147483647 - - - - - - - - - Transformations - - 2147483647 - - - submenuAction: - - Transformations - - YES - - - Make Upper Case - - 2147483647 - - - - - - Make Lower Case - - 2147483647 - - - - - - Capitalize - - 2147483647 - - - - - - - - - Speech - - 1048576 - 2147483647 - - - submenuAction: - - Speech - - YES - - - Start Speaking - - 1048576 - 2147483647 - - - - - - Stop Speaking - - 1048576 - 2147483647 - - - - - - - - - - - - Format - - 2147483647 - - - submenuAction: - - Format - - YES - - - Font - - 2147483647 - - - submenuAction: - - Font - - YES - - - Show Fonts - t - 1048576 - 2147483647 - - - - - - Bold - b - 1048576 - 2147483647 - - - 2 - - - - Italic - i - 1048576 - 2147483647 - - - 1 - - - - Underline - u - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Bigger - + - 1048576 - 2147483647 - - - 3 - - - - Smaller - - - 1048576 - 2147483647 - - - 4 - - - - YES - YES - - - 2147483647 - - - - - - Kern - - 2147483647 - - - submenuAction: - - Kern - - YES - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Tighten - - 2147483647 - - - - - - Loosen - - 2147483647 - - - - - - - - - Ligature - - 2147483647 - - - submenuAction: - - Ligature - - YES - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Use All - - 2147483647 - - - - - - - - - Baseline - - 2147483647 - - - submenuAction: - - Baseline - - YES - - - Use Default - - 2147483647 - - - - - - Superscript - - 2147483647 - - - - - - Subscript - - 2147483647 - - - - - - Raise - - 2147483647 - - - - - - Lower - - 2147483647 - - - - - - - - - YES - YES - - - 2147483647 - - - - - - Show Colors - C - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Copy Style - c - 1572864 - 2147483647 - - - - - - Paste Style - v - 1572864 - 2147483647 - - - - - _NSFontMenu - - - - - Text - - 2147483647 - - - submenuAction: - - Text - - YES - - - Align Left - { - 1048576 - 2147483647 - - - - - - Center - | - 1048576 - 2147483647 - - - - - - Justify - - 2147483647 - - - - - - Align Right - } - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Writing Direction - - 2147483647 - - - submenuAction: - - Writing Direction - - YES - - - YES - Paragraph - - 2147483647 - - - - - - CURlZmF1bHQ - - 2147483647 - - - - - - CUxlZnQgdG8gUmlnaHQ - - 2147483647 - - - - - - CVJpZ2h0IHRvIExlZnQ - - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - YES - Selection - - 2147483647 - - - - - - CURlZmF1bHQ - - 2147483647 - - - - - - CUxlZnQgdG8gUmlnaHQ - - 2147483647 - - - - - - CVJpZ2h0IHRvIExlZnQ - - 2147483647 - - - - - - - - - YES - YES - - - 2147483647 - - - - - - Show Ruler - - 2147483647 - - - - - - Copy Ruler - c - 1310720 - 2147483647 - - - - - - Paste Ruler - v - 1310720 - 2147483647 - - - - - - - - - - - - View - - 1048576 - 2147483647 - - - submenuAction: - - View - - YES - - - Show Toolbar - t - 1572864 - 2147483647 - - - - - - Customize Toolbar… - - 1048576 - 2147483647 - - - - - - - - - Window - - 1048576 - 2147483647 - - - submenuAction: - - Window - - YES - - - Minimize - m - 1048576 - 2147483647 - - - - - - Zoom - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Bring All to Front - - 1048576 - 2147483647 - - - - - _NSWindowsMenu - - - - - Help - - 2147483647 - - - submenuAction: - - Help - - YES - - - DynamicServer Help - ? - 1048576 - 2147483647 - - - - - _NSHelpMenu - - - - _NSMainMenu - - - 15 - 2 - {{335, 390}, {480, 360}} - 1954021376 - DynamicServer - NSWindow - - {1.79769e+308, 1.79769e+308} - - - 256 - {480, 360} - - - {{0, 0}, {1920, 1178}} - {1.79769e+308, 1.79769e+308} - - - DynamicServerAppDelegate - - - NSFontManager - - - - - YES - - - performMiniaturize: - - - - 37 - - - - arrangeInFront: - - - - 39 - - - - print: - - - - 86 - - - - runPageLayout: - - - - 87 - - - - clearRecentDocuments: - - - - 127 - - - - orderFrontStandardAboutPanel: - - - - 142 - - - - performClose: - - - - 193 - - - - toggleContinuousSpellChecking: - - - - 222 - - - - undo: - - - - 223 - - - - copy: - - - - 224 - - - - checkSpelling: - - - - 225 - - - - paste: - - - - 226 - - - - stopSpeaking: - - - - 227 - - - - cut: - - - - 228 - - - - showGuessPanel: - - - - 230 - - - - redo: - - - - 231 - - - - selectAll: - - - - 232 - - - - startSpeaking: - - - - 233 - - - - delete: - - - - 235 - - - - performZoom: - - - - 240 - - - - performFindPanelAction: - - - - 241 - - - - centerSelectionInVisibleArea: - - - - 245 - - - - toggleGrammarChecking: - - - - 347 - - - - toggleSmartInsertDelete: - - - - 355 - - - - toggleAutomaticQuoteSubstitution: - - - - 356 - - - - toggleAutomaticLinkDetection: - - - - 357 - - - - saveDocument: - - - - 362 - - - - saveDocumentAs: - - - - 363 - - - - revertDocumentToSaved: - - - - 364 - - - - runToolbarCustomizationPalette: - - - - 365 - - - - toggleToolbarShown: - - - - 366 - - - - hide: - - - - 367 - - - - hideOtherApplications: - - - - 368 - - - - unhideAllApplications: - - - - 370 - - - - newDocument: - - - - 373 - - - - openDocument: - - - - 374 - - - - addFontTrait: - - - - 421 - - - - addFontTrait: - - - - 422 - - - - modifyFont: - - - - 423 - - - - orderFrontFontPanel: - - - - 424 - - - - modifyFont: - - - - 425 - - - - raiseBaseline: - - - - 426 - - - - lowerBaseline: - - - - 427 - - - - copyFont: - - - - 428 - - - - subscript: - - - - 429 - - - - superscript: - - - - 430 - - - - tightenKerning: - - - - 431 - - - - underline: - - - - 432 - - - - orderFrontColorPanel: - - - - 433 - - - - useAllLigatures: - - - - 434 - - - - loosenKerning: - - - - 435 - - - - pasteFont: - - - - 436 - - - - unscript: - - - - 437 - - - - useStandardKerning: - - - - 438 - - - - useStandardLigatures: - - - - 439 - - - - turnOffLigatures: - - - - 440 - - - - turnOffKerning: - - - - 441 - - - - terminate: - - - - 449 - - - - toggleAutomaticSpellingCorrection: - - - - 456 - - - - orderFrontSubstitutionsPanel: - - - - 458 - - - - toggleAutomaticDashSubstitution: - - - - 461 - - - - toggleAutomaticTextReplacement: - - - - 463 - - - - uppercaseWord: - - - - 464 - - - - capitalizeWord: - - - - 467 - - - - lowercaseWord: - - - - 468 - - - - pasteAsPlainText: - - - - 486 - - - - performFindPanelAction: - - - - 487 - - - - performFindPanelAction: - - - - 488 - - - - performFindPanelAction: - - - - 489 - - - - showHelp: - - - - 493 - - - - delegate - - - - 495 - - - - alignCenter: - - - - 518 - - - - pasteRuler: - - - - 519 - - - - toggleRuler: - - - - 520 - - - - alignRight: - - - - 521 - - - - copyRuler: - - - - 522 - - - - alignJustified: - - - - 523 - - - - alignLeft: - - - - 524 - - - - makeBaseWritingDirectionNatural: - - - - 525 - - - - makeBaseWritingDirectionLeftToRight: - - - - 526 - - - - makeBaseWritingDirectionRightToLeft: - - - - 527 - - - - makeTextWritingDirectionNatural: - - - - 528 - - - - makeTextWritingDirectionLeftToRight: - - - - 529 - - - - makeTextWritingDirectionRightToLeft: - - - - 530 - - - - window - - - - 532 - - - - - YES - - 0 - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - -3 - - - Application - - - 29 - - - YES - - - - - - - - - - - - 19 - - - YES - - - - - - 56 - - - YES - - - - - - 217 - - - YES - - - - - - 83 - - - YES - - - - - - 81 - - - YES - - - - - - - - - - - - - - - - 75 - - - - - 80 - - - - - 78 - - - - - 72 - - - - - 82 - - - - - 124 - - - YES - - - - - - 77 - - - - - 73 - - - - - 79 - - - - - 112 - - - - - 74 - - - - - 125 - - - YES - - - - - - 126 - - - - - 205 - - - YES - - - - - - - - - - - - - - - - - - - - 202 - - - - - 198 - - - - - 207 - - - - - 214 - - - - - 199 - - - - - 203 - - - - - 197 - - - - - 206 - - - - - 215 - - - - - 218 - - - YES - - - - - - 216 - - - YES - - - - - - 200 - - - YES - - - - - - - - - - - 219 - - - - - 201 - - - - - 204 - - - - - 220 - - - YES - - - - - - - - - - 213 - - - - - 210 - - - - - 221 - - - - - 208 - - - - - 209 - - - - - 57 - - - YES - - - - - - - - - - - - - - - - 58 - - - - - 134 - - - - - 150 - - - - - 136 - - - - - 144 - - - - - 129 - - - - - 143 - - - - - 236 - - - - - 131 - - - YES - - - - - - 149 - - - - - 145 - - - - - 130 - - - - - 24 - - - YES - - - - - - - - - 92 - - - - - 5 - - - - - 239 - - - - - 23 - - - - - 295 - - - YES - - - - - - 296 - - - YES - - - - - - - 297 - - - - - 298 - - - - - 211 - - - YES - - - - - - 212 - - - YES - - - - - - - 195 - - - - - 196 - - - - - 346 - - - - - 348 - - - YES - - - - - - 349 - - - YES - - - - - - - - - - - - 350 - - - - - 351 - - - - - 354 - - - - - 371 - - - YES - - - - - - 372 - - - - - 375 - - - YES - - - - - - 376 - - - YES - - - - - - - 377 - - - YES - - - - - - 388 - - - YES - - - - - - - - - - - - - - - - - - - - - 389 - - - - - 390 - - - - - 391 - - - - - 392 - - - - - 393 - - - - - 394 - - - - - 395 - - - - - 396 - - - - - 397 - - - YES - - - - - - 398 - - - YES - - - - - - 399 - - - YES - - - - - - 400 - - - - - 401 - - - - - 402 - - - - - 403 - - - - - 404 - - - - - 405 - - - YES - - - - - - - - - - 406 - - - - - 407 - - - - - 408 - - - - - 409 - - - - - 410 - - - - - 411 - - - YES - - - - - - - - 412 - - - - - 413 - - - - - 414 - - - - - 415 - - - YES - - - - - - - - - 416 - - - - - 417 - - - - - 418 - - - - - 419 - - - - - 420 - - - - - 450 - - - YES - - - - - - 451 - - - YES - - - - - - - - 452 - - - - - 453 - - - - - 454 - - - - - 457 - - - - - 459 - - - - - 460 - - - - - 462 - - - - - 465 - - - - - 466 - - - - - 485 - - - - - 490 - - - YES - - - - - - 491 - - - YES - - - - - - 492 - - - - - 494 - - - - - 496 - - - YES - - - - - - 497 - - - YES - - - - - - - - - - - - - - - 498 - - - - - 499 - - - - - 500 - - - - - 501 - - - - - 502 - - - - - 503 - - - YES - - - - - - 504 - - - - - 505 - - - - - 506 - - - - - 507 - - - - - 508 - - - YES - - - - - - - - - - - - - - 509 - - - - - 510 - - - - - 511 - - - - - 512 - - - - - 513 - - - - - 514 - - - - - 515 - - - - - 516 - - - - - 517 - - - - - - - YES - - YES - -3.IBPluginDependency - 112.IBPluginDependency - 112.ImportedFromIB2 - 124.IBPluginDependency - 124.ImportedFromIB2 - 125.IBPluginDependency - 125.ImportedFromIB2 - 125.editorWindowContentRectSynchronizationRect - 126.IBPluginDependency - 126.ImportedFromIB2 - 129.IBPluginDependency - 129.ImportedFromIB2 - 130.IBPluginDependency - 130.ImportedFromIB2 - 130.editorWindowContentRectSynchronizationRect - 131.IBPluginDependency - 131.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 - 136.IBPluginDependency - 136.ImportedFromIB2 - 143.IBPluginDependency - 143.ImportedFromIB2 - 144.IBPluginDependency - 144.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 - 19.IBPluginDependency - 19.ImportedFromIB2 - 195.IBPluginDependency - 195.ImportedFromIB2 - 196.IBPluginDependency - 196.ImportedFromIB2 - 197.IBPluginDependency - 197.ImportedFromIB2 - 198.IBPluginDependency - 198.ImportedFromIB2 - 199.IBPluginDependency - 199.ImportedFromIB2 - 200.IBEditorWindowLastContentRect - 200.IBPluginDependency - 200.ImportedFromIB2 - 200.editorWindowContentRectSynchronizationRect - 201.IBPluginDependency - 201.ImportedFromIB2 - 202.IBPluginDependency - 202.ImportedFromIB2 - 203.IBPluginDependency - 203.ImportedFromIB2 - 204.IBPluginDependency - 204.ImportedFromIB2 - 205.IBEditorWindowLastContentRect - 205.IBPluginDependency - 205.ImportedFromIB2 - 205.editorWindowContentRectSynchronizationRect - 206.IBPluginDependency - 206.ImportedFromIB2 - 207.IBPluginDependency - 207.ImportedFromIB2 - 208.IBPluginDependency - 208.ImportedFromIB2 - 209.IBPluginDependency - 209.ImportedFromIB2 - 210.IBPluginDependency - 210.ImportedFromIB2 - 211.IBPluginDependency - 211.ImportedFromIB2 - 212.IBPluginDependency - 212.ImportedFromIB2 - 212.editorWindowContentRectSynchronizationRect - 213.IBPluginDependency - 213.ImportedFromIB2 - 214.IBPluginDependency - 214.ImportedFromIB2 - 215.IBPluginDependency - 215.ImportedFromIB2 - 216.IBPluginDependency - 216.ImportedFromIB2 - 217.IBPluginDependency - 217.ImportedFromIB2 - 218.IBPluginDependency - 218.ImportedFromIB2 - 219.IBPluginDependency - 219.ImportedFromIB2 - 220.IBEditorWindowLastContentRect - 220.IBPluginDependency - 220.ImportedFromIB2 - 220.editorWindowContentRectSynchronizationRect - 221.IBPluginDependency - 221.ImportedFromIB2 - 23.IBPluginDependency - 23.ImportedFromIB2 - 236.IBPluginDependency - 236.ImportedFromIB2 - 239.IBPluginDependency - 239.ImportedFromIB2 - 24.IBEditorWindowLastContentRect - 24.IBPluginDependency - 24.ImportedFromIB2 - 24.editorWindowContentRectSynchronizationRect - 29.IBEditorWindowLastContentRect - 29.IBPluginDependency - 29.ImportedFromIB2 - 29.WindowOrigin - 29.editorWindowContentRectSynchronizationRect - 295.IBPluginDependency - 296.IBEditorWindowLastContentRect - 296.IBPluginDependency - 296.editorWindowContentRectSynchronizationRect - 297.IBPluginDependency - 298.IBPluginDependency - 346.IBPluginDependency - 346.ImportedFromIB2 - 348.IBPluginDependency - 348.ImportedFromIB2 - 349.IBEditorWindowLastContentRect - 349.IBPluginDependency - 349.ImportedFromIB2 - 349.editorWindowContentRectSynchronizationRect - 350.IBPluginDependency - 350.ImportedFromIB2 - 351.IBPluginDependency - 351.ImportedFromIB2 - 354.IBPluginDependency - 354.ImportedFromIB2 - 371.IBEditorWindowLastContentRect - 371.IBPluginDependency - 371.IBWindowTemplateEditedContentRect - 371.NSWindowTemplate.visibleAtLaunch - 371.editorWindowContentRectSynchronizationRect - 371.windowTemplate.maxSize - 372.IBPluginDependency - 375.IBPluginDependency - 376.IBEditorWindowLastContentRect - 376.IBPluginDependency - 377.IBPluginDependency - 388.IBEditorWindowLastContentRect - 388.IBPluginDependency - 389.IBPluginDependency - 390.IBPluginDependency - 391.IBPluginDependency - 392.IBPluginDependency - 393.IBPluginDependency - 394.IBPluginDependency - 395.IBPluginDependency - 396.IBPluginDependency - 397.IBPluginDependency - 398.IBPluginDependency - 399.IBPluginDependency - 400.IBPluginDependency - 401.IBPluginDependency - 402.IBPluginDependency - 403.IBPluginDependency - 404.IBPluginDependency - 405.IBPluginDependency - 406.IBPluginDependency - 407.IBPluginDependency - 408.IBPluginDependency - 409.IBPluginDependency - 410.IBPluginDependency - 411.IBPluginDependency - 412.IBPluginDependency - 413.IBPluginDependency - 414.IBPluginDependency - 415.IBPluginDependency - 416.IBPluginDependency - 417.IBPluginDependency - 418.IBPluginDependency - 419.IBPluginDependency - 450.IBPluginDependency - 451.IBEditorWindowLastContentRect - 451.IBPluginDependency - 452.IBPluginDependency - 453.IBPluginDependency - 454.IBPluginDependency - 457.IBPluginDependency - 459.IBPluginDependency - 460.IBPluginDependency - 462.IBPluginDependency - 465.IBPluginDependency - 466.IBPluginDependency - 485.IBPluginDependency - 490.IBPluginDependency - 491.IBEditorWindowLastContentRect - 491.IBPluginDependency - 492.IBPluginDependency - 496.IBPluginDependency - 497.IBEditorWindowLastContentRect - 497.IBPluginDependency - 498.IBPluginDependency - 499.IBPluginDependency - 5.IBPluginDependency - 5.ImportedFromIB2 - 500.IBPluginDependency - 501.IBPluginDependency - 502.IBPluginDependency - 503.IBPluginDependency - 504.IBPluginDependency - 505.IBPluginDependency - 506.IBPluginDependency - 507.IBPluginDependency - 508.IBEditorWindowLastContentRect - 508.IBPluginDependency - 509.IBPluginDependency - 510.IBPluginDependency - 511.IBPluginDependency - 512.IBPluginDependency - 513.IBPluginDependency - 514.IBPluginDependency - 515.IBPluginDependency - 516.IBPluginDependency - 517.IBPluginDependency - 56.IBPluginDependency - 56.ImportedFromIB2 - 57.IBEditorWindowLastContentRect - 57.IBPluginDependency - 57.ImportedFromIB2 - 57.editorWindowContentRectSynchronizationRect - 58.IBPluginDependency - 58.ImportedFromIB2 - 72.IBPluginDependency - 72.ImportedFromIB2 - 73.IBPluginDependency - 73.ImportedFromIB2 - 74.IBPluginDependency - 74.ImportedFromIB2 - 75.IBPluginDependency - 75.ImportedFromIB2 - 77.IBPluginDependency - 77.ImportedFromIB2 - 78.IBPluginDependency - 78.ImportedFromIB2 - 79.IBPluginDependency - 79.ImportedFromIB2 - 80.IBPluginDependency - 80.ImportedFromIB2 - 81.IBEditorWindowLastContentRect - 81.IBPluginDependency - 81.ImportedFromIB2 - 81.editorWindowContentRectSynchronizationRect - 82.IBPluginDependency - 82.ImportedFromIB2 - 83.IBPluginDependency - 83.ImportedFromIB2 - 92.IBPluginDependency - 92.ImportedFromIB2 - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{522, 812}, {146, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{436, 809}, {64, 6}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{753, 187}, {275, 113}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {275, 83}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{547, 180}, {254, 283}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{187, 434}, {243, 243}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {167, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{753, 217}, {238, 103}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {241, 103}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{654, 239}, {194, 73}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{525, 802}, {197, 73}} - {{380, 836}, {512, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - {74, 862} - {{6, 978}, {478, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - {{604, 269}, {231, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - {{475, 832}, {234, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{746, 287}, {220, 133}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {215, 63}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{380, 496}, {480, 360}} - com.apple.InterfaceBuilder.CocoaPlugin - {{380, 496}, {480, 360}} - - {{33, 99}, {480, 360}} - {3.40282e+38, 3.40282e+38} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{591, 420}, {83, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{523, 2}, {178, 283}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{753, 197}, {170, 63}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{725, 289}, {246, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{674, 260}, {204, 183}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{878, 180}, {164, 173}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - {{286, 129}, {275, 183}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{23, 794}, {245, 183}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{452, 109}, {196, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{145, 474}, {199, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - YES - - - YES - - - - - YES - - - YES - - - - 532 - - - - YES - - DynamicServerAppDelegate - NSObject - - window - NSWindow - - - IBProjectSource - DynamicServerAppDelegate.h - - - - - YES - - NSApplication - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSApplication.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSApplicationScripting.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSColorPanel.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSHelpManager.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSPageLayout.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSUserInterfaceItemSearching.h - - - - NSBrowser - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSBrowser.h - - - - NSControl - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSControl.h - - - - NSDocument - NSObject - - YES - - YES - printDocument: - revertDocumentToSaved: - runPageLayout: - saveDocument: - saveDocumentAs: - saveDocumentTo: - - - YES - id - id - id - id - id - id - - - - IBFrameworkSource - AppKit.framework/Headers/NSDocument.h - - - - NSDocument - - IBFrameworkSource - AppKit.framework/Headers/NSDocumentScripting.h - - - - NSDocumentController - NSObject - - YES - - YES - clearRecentDocuments: - newDocument: - openDocument: - saveAllDocuments: - - - YES - id - id - id - id - - - - IBFrameworkSource - AppKit.framework/Headers/NSDocumentController.h - - - - NSFontManager - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSFontManager.h - - - - NSFormatter - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFormatter.h - - - - NSMatrix - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSMatrix.h - - - - NSMenu - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSMenu.h - - - - NSMenuItem - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSMenuItem.h - - - - NSMovieView - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSMovieView.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSAccessibility.h - - - - NSObject - - - - NSObject - - - - NSObject - - - - NSObject - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSDictionaryController.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSDragging.h - - - - NSObject - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSFontPanel.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSKeyValueBinding.h - - - - NSObject - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSNibLoading.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSOutlineView.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSPasteboard.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSSavePanel.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSTableView.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSToolbarItem.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSView.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSClassDescription.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObjectScripting.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSPortCoder.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptClassDescription.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptObjectSpecifiers.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptWhoseTests.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLDownload.h - - - - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSInterfaceStyle.h - - - - NSResponder - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSResponder.h - - - - NSTableView - NSControl - - - - NSText - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSText.h - - - - NSTextView - NSText - - IBFrameworkSource - AppKit.framework/Headers/NSTextView.h - - - - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSClipView.h - - - - NSView - - - - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSRulerView.h - - - - NSView - NSResponder - - - - NSWindow - - IBFrameworkSource - AppKit.framework/Headers/NSDrawer.h - - - - NSWindow - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSWindow.h - - - - NSWindow - - IBFrameworkSource - AppKit.framework/Headers/NSWindowScripting.h - - - - - 0 - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - - - YES - ../DynamicServer.xcodeproj - 3 - - diff --git a/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/HTTPResponseTest.h b/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/HTTPResponseTest.h deleted file mode 100644 index 45186c5f0363b..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/HTTPResponseTest.h +++ /dev/null @@ -1,20 +0,0 @@ -#import -#import "HTTPResponse.h" - -@class HTTPConnection; - -// -// This class is a UnitTest for the delayResponeHeaders capability of HTTPConnection -// - -@interface HTTPResponseTest : NSObject -{ - HTTPConnection *connection; - dispatch_queue_t connectionQueue; - - BOOL readyToSendResponseHeaders; -} - -- (id)initWithConnection:(HTTPConnection *)connection; - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/HTTPResponseTest.m b/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/HTTPResponseTest.m deleted file mode 100644 index 7ac2430d84e05..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/HTTPResponseTest.m +++ /dev/null @@ -1,128 +0,0 @@ -#import "HTTPResponseTest.h" -#import "HTTPConnection.h" -#import "HTTPLogging.h" - -// Log levels: off, error, warn, info, verbose -// Other flags: trace -static const int httpLogLevel = HTTP_LOG_LEVEL_OFF; // | HTTP_LOG_FLAG_TRACE; - -// -// This class is a UnitTest for the delayResponeHeaders capability of HTTPConnection -// - -@interface HTTPResponseTest (PrivateAPI) -- (void)doAsyncStuff; -- (void)asyncStuffFinished; -@end - - -@implementation HTTPResponseTest - -- (id)initWithConnection:(HTTPConnection *)parent -{ - if ((self = [super init])) - { - HTTPLogTrace(); - - connection = parent; // Parents retain children, children do NOT retain parents - - connectionQueue = dispatch_get_current_queue(); - dispatch_retain(connectionQueue); - - readyToSendResponseHeaders = NO; - - dispatch_queue_t concurrentQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0); - dispatch_async(concurrentQueue, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - [self doAsyncStuff]; - [pool release]; - }); - } - return self; -} - -- (void)doAsyncStuff -{ - // This method is executed on a global concurrent queue - - HTTPLogTrace(); - - [NSThread sleepForTimeInterval:5.0]; - - dispatch_async(connectionQueue, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - [self asyncStuffFinished]; - [pool release]; - }); -} - -- (void)asyncStuffFinished -{ - // This method is executed on the connectionQueue - - HTTPLogTrace(); - - readyToSendResponseHeaders = YES; - [connection responseHasAvailableData:self]; -} - -- (BOOL)delayResponeHeaders -{ - HTTPLogTrace2(@"%@[%p] %@ -> %@", THIS_FILE, self, THIS_METHOD, (readyToSendResponseHeaders ? @"NO" : @"YES")); - - return !readyToSendResponseHeaders; -} - -- (void)connectionDidClose -{ - // This method is executed on the connectionQueue - - HTTPLogTrace(); - - connection = nil; -} - -- (UInt64)contentLength -{ - HTTPLogTrace(); - - return 0; -} - -- (UInt64)offset -{ - HTTPLogTrace(); - - return 0; -} - -- (void)setOffset:(UInt64)offset -{ - HTTPLogTrace(); - - // Ignored -} - -- (NSData *)readDataOfLength:(NSUInteger)length -{ - HTTPLogTrace(); - - return nil; -} - -- (BOOL)isDone -{ - HTTPLogTrace(); - - return YES; -} - -- (void)dealloc -{ - HTTPLogTrace(); - - dispatch_release(connectionQueue); - [super dealloc]; -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/Instructions.txt b/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/Instructions.txt deleted file mode 100644 index 771dfb235c4b5..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/Instructions.txt +++ /dev/null @@ -1,19 +0,0 @@ -INFO: - -This example project demonstrates the ability of the HTTPDynamicFileResponse to easily create dynamic content. - -Take a look at the Web/index.html file. You'll notice a bunch of "%%PLACEHOLDERS%%" meant to be replaced dynamically. With only a few lines of code, the HTTPDynamicFileResponse will replace these automatically, and asynchronously, as the file gets uploaded to the client! - -INSTRUCTIONS: - -Open the Xcode project, and build and go. - -On the Xcode console you'll see a message saying: -"Started HTTP server on port 59123" - -Now open your browser and type in the URL: -http://localhost:59123 - -(Replace 59123 with whatever port the server is actually running on.) - -Enjoy. \ No newline at end of file diff --git a/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/MyHTTPConnection.h b/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/MyHTTPConnection.h deleted file mode 100644 index 5d1a770aed68e..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/MyHTTPConnection.h +++ /dev/null @@ -1,8 +0,0 @@ -#import -#import "HTTPConnection.h" - - -@interface MyHTTPConnection : HTTPConnection - - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/MyHTTPConnection.m b/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/MyHTTPConnection.m deleted file mode 100644 index 87f9696063ed6..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/MyHTTPConnection.m +++ /dev/null @@ -1,87 +0,0 @@ -#import "MyHTTPConnection.h" -#import "HTTPDynamicFileResponse.h" -#import "HTTPResponseTest.h" -#import "HTTPLogging.h" - -// Log levels: off, error, warn, info, verbose -// Other flags: trace -static const int httpLogLevel = HTTP_LOG_LEVEL_WARN; // | HTTP_LOG_FLAG_TRACE; - - -@implementation MyHTTPConnection - -- (NSObject *)httpResponseForMethod:(NSString *)method URI:(NSString *)path -{ - // Use HTTPConnection's filePathForURI method. - // This method takes the given path (which comes directly from the HTTP request), - // and converts it to a full path by combining it with the configured document root. - // - // It also does cool things for us like support for converting "/" to "/index.html", - // and security restrictions (ensuring we don't serve documents outside configured document root folder). - - NSString *filePath = [self filePathForURI:path]; - - // Convert to relative path - - NSString *documentRoot = [config documentRoot]; - - if (![filePath hasPrefix:documentRoot]) - { - // Uh oh. - // HTTPConnection's filePathForURI was supposed to take care of this for us. - return nil; - } - - NSString *relativePath = [filePath substringFromIndex:[documentRoot length]]; - - if ([relativePath isEqualToString:@"/index.html"]) - { - HTTPLogVerbose(@"%@[%p]: Serving up dynamic content", THIS_FILE, self); - - // The index.html file contains several dynamic fields that need to be completed. - // For example: - // - // Computer name: %%COMPUTER_NAME%% - // - // We need to replace "%%COMPUTER_NAME%%" with whatever the computer name is. - // We can accomplish this easily with the HTTPDynamicFileResponse class, - // which takes a dictionary of replacement key-value pairs, - // and performs replacements on the fly as it uploads the file. - - NSString *computerName = [[NSHost currentHost] localizedName]; - NSString *currentTime = [[NSDate date] description]; - - NSString *story = @"

    " - "I'll tell you a story
    " \ - "About Jack a Nory;
    " \ - "And now my story's begun;
    " \ - "I'll tell you another
    " \ - "Of Jack and his brother,
    " \ - "And now my story is done.
    "; - - NSMutableDictionary *replacementDict = [NSMutableDictionary dictionaryWithCapacity:5]; - - [replacementDict setObject:computerName forKey:@"COMPUTER_NAME"]; - [replacementDict setObject:currentTime forKey:@"TIME"]; - [replacementDict setObject:story forKey:@"STORY"]; - [replacementDict setObject:@"A" forKey:@"ALPHABET"]; - [replacementDict setObject:@" QUACK " forKey:@"QUACK"]; - - HTTPLogVerbose(@"%@[%p]: replacementDict = \n%@", THIS_FILE, self, replacementDict); - - return [[[HTTPDynamicFileResponse alloc] initWithFilePath:[self filePathForURI:path] - forConnection:self - separator:@"%%" - replacementDictionary:replacementDict] autorelease]; - } - else if ([relativePath isEqualToString:@"/unittest.html"]) - { - HTTPLogVerbose(@"%@[%p]: Serving up HTTPResponseTest (unit testing)", THIS_FILE, self); - - return [[[HTTPResponseTest alloc] initWithConnection:self] autorelease]; - } - - return [super httpResponseForMethod:method URI:path]; -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/Web/index.html b/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/Web/index.html deleted file mode 100644 index 2498491ed9dbe..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/Web/index.html +++ /dev/null @@ -1,39 +0,0 @@ - - - Dynamic Server Example - - -

    - Welcome to CocoaHTTPServer! -

    - -

    - Parts of this file are generated dynamically.
    - This is done via the HTTPDynamicFileResponse class.
    - It uses a replacement dictionary to automatically replace
    - tagged strings in the included Web/index.html file.
    -

    - -

    - Computer name: %%COMPUTER_NAME%%
    -
    - - - The current time is: %%TIME%%
    -
    - Tell me a story: %%STORY%%
    -
    - - - The first letter of the english alphabet: %%ALPHABET%%
    -
    - - - The sound a duck makes: %%QUACK%%
    -
    -
    - Thank you. Come again. -

    - - - \ No newline at end of file diff --git a/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/main.m b/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/main.m deleted file mode 100644 index 59044f66bd6a6..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/DynamicServer/main.m +++ /dev/null @@ -1,14 +0,0 @@ -// -// main.m -// DynamicServer -// -// Created by Robbie Hanson on 11/20/10. -// Copyright 2010 Voalte. All rights reserved. -// - -#import - -int main(int argc, char *argv[]) -{ - return NSApplicationMain(argc, (const char **) argv); -} diff --git a/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/AppDelegate.h b/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/AppDelegate.h deleted file mode 100644 index b92cb92635008..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/AppDelegate.h +++ /dev/null @@ -1,11 +0,0 @@ -#import - -@class HTTPServer; - - -@interface AppDelegate : NSObject -{ - HTTPServer *httpServer; -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/AppDelegate.m b/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/AppDelegate.m deleted file mode 100644 index 1b4b4a33eb55d..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/AppDelegate.m +++ /dev/null @@ -1,48 +0,0 @@ -#import "AppDelegate.h" -#import "HTTPServer.h" -#import "MyHTTPConnection.h" -#import "DDLog.h" -#import "DDTTYLogger.h" - -// Log levels: off, error, warn, info, verbose -static const int ddLogLevel = LOG_LEVEL_VERBOSE; - - -@implementation AppDelegate - -- (void)applicationDidFinishLaunching:(NSNotification *)aNotification -{ - // Configure our logging framework. - // To keep things simple and fast, we're just going to log to the Xcode console. - [DDLog addLogger:[DDTTYLogger sharedInstance]]; - - // Initalize our http server - httpServer = [[HTTPServer alloc] init]; - - // Tell the server to broadcast its presence via Bonjour. - // This allows browsers such as Safari to automatically discover our service. - [httpServer setType:@"_http._tcp."]; - - // Normally there's no need to run our server on any specific port. - // Technologies like Bonjour allow clients to dynamically discover the server's port at runtime. - // However, for easy testing you may want force a certain port so you can just hit the refresh button. -// [httpServer setPort:12345]; - - // We're going to extend the base HTTPConnection class with our MyHTTPConnection class. - // This allows us to do custom password protection on our sensitive directories. - [httpServer setConnectionClass:[MyHTTPConnection class]]; - - // Serve files from the standard Sites folder - NSString *docRoot = [@"~/Sites" stringByExpandingTildeInPath]; - DDLogInfo(@"Setting document root: %@", docRoot); - - [httpServer setDocumentRoot:docRoot]; - - NSError *error = nil; - if(![httpServer start:&error]) - { - DDLogError(@"Error starting HTTP Server: %@", error); - } -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/English.lproj/InfoPlist.strings b/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/English.lproj/InfoPlist.strings deleted file mode 100644 index 5e45963c382ba..0000000000000 Binary files a/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/English.lproj/InfoPlist.strings and /dev/null differ diff --git a/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/English.lproj/MainMenu.xib b/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/English.lproj/MainMenu.xib deleted file mode 100644 index 2346050efb0dc..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/English.lproj/MainMenu.xib +++ /dev/null @@ -1,3072 +0,0 @@ - - - - 1050 - 9J61 - 677 - 949.46 - 353.00 - - YES - - - - - YES - com.apple.InterfaceBuilderKit - com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - YES - - - YES - - - - YES - - NSApplication - - - FirstResponder - - - NSApplication - - - AMainMenu - - YES - - - NewApplication - - 1048576 - 2147483647 - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - submenuAction: - - NewApplication - - YES - - - About NewApplication - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - UHJlZmVyZW5jZXPigKY - , - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Services - - 1048576 - 2147483647 - - - submenuAction: - - Services - - YES - - _NSServicesMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Hide NewApplication - h - 1048576 - 2147483647 - - - - - - Hide Others - h - 1572864 - 2147483647 - - - - - - Show All - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Quit NewApplication - q - 1048576 - 2147483647 - - - - - _NSAppleMenu - - - - - File - - 1048576 - 2147483647 - - - submenuAction: - - File - - YES - - - New - n - 1048576 - 2147483647 - - - - - - T3BlbuKApg - o - 1048576 - 2147483647 - - - - - - Open Recent - - 1048576 - 2147483647 - - - submenuAction: - - Open Recent - - YES - - - Clear Menu - - 1048576 - 2147483647 - - - - - _NSRecentDocumentsMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Close - w - 1048576 - 2147483647 - - - - - - Save - s - 1048576 - 2147483647 - - - - - - U2F2ZSBBc+KApg - S - 1179648 - 2147483647 - - - - - - Revert to Saved - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Page Setup... - P - 1179648 - 2147483647 - - - - - - - UHJpbnTigKY - p - 1048576 - 2147483647 - - - - - - - - - Edit - - 1048576 - 2147483647 - - - submenuAction: - - Edit - - YES - - - Undo - z - 1048576 - 2147483647 - - - - - - Redo - Z - 1179648 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Cut - x - 1048576 - 2147483647 - - - - - - Copy - c - 1048576 - 2147483647 - - - - - - Paste - v - 1048576 - 2147483647 - - - - - - Delete - - 1048576 - 2147483647 - - - - - - Select All - a - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Find - - 1048576 - 2147483647 - - - submenuAction: - - Find - - YES - - - RmluZOKApg - f - 1048576 - 2147483647 - - - 1 - - - - Find Next - g - 1048576 - 2147483647 - - - 2 - - - - Find Previous - G - 1179648 - 2147483647 - - - 3 - - - - Use Selection for Find - e - 1048576 - 2147483647 - - - 7 - - - - Jump to Selection - j - 1048576 - 2147483647 - - - - - - - - - Spelling and Grammar - - 1048576 - 2147483647 - - - submenuAction: - - Spelling and Grammar - - YES - - - U2hvdyBTcGVsbGluZ+KApg - : - 1048576 - 2147483647 - - - - - - Check Spelling - ; - 1048576 - 2147483647 - - - - - - Check Spelling While Typing - - 1048576 - 2147483647 - - - - - - Check Grammar With Spelling - - 1048576 - 2147483647 - - - - - - - - - Substitutions - - 1048576 - 2147483647 - - - submenuAction: - - Substitutions - - YES - - - Smart Copy/Paste - f - 1048576 - 2147483647 - - - 1 - - - - Smart Quotes - g - 1048576 - 2147483647 - - - 2 - - - - Smart Links - G - 1179648 - 2147483647 - - - 3 - - - - - - - Speech - - 1048576 - 2147483647 - - - submenuAction: - - Speech - - YES - - - Start Speaking - - 1048576 - 2147483647 - - - - - - Stop Speaking - - 1048576 - 2147483647 - - - - - - - - - - - - Format - - 2147483647 - - - submenuAction: - - Format - - YES - - - Font - - 2147483647 - - - submenuAction: - - Font - - YES - - - Show Fonts - t - 1048576 - 2147483647 - - - - - - Bold - b - 1048576 - 2147483647 - - - 2 - - - - Italic - i - 1048576 - 2147483647 - - - 1 - - - - Underline - u - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Bigger - + - 1048576 - 2147483647 - - - 3 - - - - Smaller - - - 1048576 - 2147483647 - - - 4 - - - - YES - YES - - - 2147483647 - - - - - - Kern - - 2147483647 - - - submenuAction: - - Kern - - YES - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Tighten - - 2147483647 - - - - - - Loosen - - 2147483647 - - - - - - - - - Ligature - - 2147483647 - - - submenuAction: - - Ligature - - YES - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Use All - - 2147483647 - - - - - - - - - Baseline - - 2147483647 - - - submenuAction: - - Baseline - - YES - - - Use Default - - 2147483647 - - - - - - Superscript - - 2147483647 - - - - - - Subscript - - 2147483647 - - - - - - Raise - - 2147483647 - - - - - - Lower - - 2147483647 - - - - - - - - - YES - YES - - - 2147483647 - - - - - - Show Colors - C - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Copy Style - c - 1572864 - 2147483647 - - - - - - Paste Style - v - 1572864 - 2147483647 - - - - - _NSFontMenu - - - - - Text - - 2147483647 - - - submenuAction: - - Text - - YES - - - Align Left - { - 1048576 - 2147483647 - - - - - - Center - | - 1048576 - 2147483647 - - - - - - Justify - - 2147483647 - - - - - - Align Right - } - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Show Ruler - - 2147483647 - - - - - - Copy Ruler - c - 1310720 - 2147483647 - - - - - - Paste Ruler - v - 1310720 - 2147483647 - - - - - - - - - - - - View - - 1048576 - 2147483647 - - - submenuAction: - - View - - YES - - - Show Toolbar - t - 1572864 - 2147483647 - - - - - - Q3VzdG9taXplIFRvb2xiYXLigKY - - 1048576 - 2147483647 - - - - - - - - - Window - - 1048576 - 2147483647 - - - submenuAction: - - Window - - YES - - - Minimize - m - 1048576 - 2147483647 - - - - - - Zoom - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Bring All to Front - - 1048576 - 2147483647 - - - - - _NSWindowsMenu - - - - - Help - - 1048576 - 2147483647 - - - submenuAction: - - Help - - YES - - - NewApplication Help - ? - 1048576 - 2147483647 - - - - - - - - _NSMainMenu - - - 15 - 2 - {{335, 390}, {480, 360}} - 1946157056 - Window - NSWindow - - {3.40282e+38, 3.40282e+38} - - - 256 - {480, 360} - - - {{0, 0}, {1440, 878}} - {3.40282e+38, 3.40282e+38} - - - NSFontManager - - - AppDelegate - - - - - YES - - - performMiniaturize: - - - - 37 - - - - arrangeInFront: - - - - 39 - - - - print: - - - - 86 - - - - runPageLayout: - - - - 87 - - - - clearRecentDocuments: - - - - 127 - - - - orderFrontStandardAboutPanel: - - - - 142 - - - - performClose: - - - - 193 - - - - toggleContinuousSpellChecking: - - - - 222 - - - - undo: - - - - 223 - - - - copy: - - - - 224 - - - - checkSpelling: - - - - 225 - - - - paste: - - - - 226 - - - - stopSpeaking: - - - - 227 - - - - cut: - - - - 228 - - - - showGuessPanel: - - - - 230 - - - - redo: - - - - 231 - - - - selectAll: - - - - 232 - - - - startSpeaking: - - - - 233 - - - - delete: - - - - 235 - - - - performZoom: - - - - 240 - - - - performFindPanelAction: - - - - 241 - - - - centerSelectionInVisibleArea: - - - - 245 - - - - toggleGrammarChecking: - - - - 347 - - - - toggleSmartInsertDelete: - - - - 355 - - - - toggleAutomaticQuoteSubstitution: - - - - 356 - - - - toggleAutomaticLinkDetection: - - - - 357 - - - - showHelp: - - - - 360 - - - - saveDocument: - - - - 362 - - - - saveDocumentAs: - - - - 363 - - - - revertDocumentToSaved: - - - - 364 - - - - runToolbarCustomizationPalette: - - - - 365 - - - - toggleToolbarShown: - - - - 366 - - - - hide: - - - - 367 - - - - hideOtherApplications: - - - - 368 - - - - unhideAllApplications: - - - - 370 - - - - newDocument: - - - - 373 - - - - openDocument: - - - - 374 - - - - addFontTrait: - - - - 421 - - - - addFontTrait: - - - - 422 - - - - modifyFont: - - - - 423 - - - - orderFrontFontPanel: - - - - 424 - - - - modifyFont: - - - - 425 - - - - raiseBaseline: - - - - 426 - - - - lowerBaseline: - - - - 427 - - - - copyFont: - - - - 428 - - - - subscript: - - - - 429 - - - - superscript: - - - - 430 - - - - tightenKerning: - - - - 431 - - - - underline: - - - - 432 - - - - orderFrontColorPanel: - - - - 433 - - - - useAllLigatures: - - - - 434 - - - - loosenKerning: - - - - 435 - - - - pasteFont: - - - - 436 - - - - unscript: - - - - 437 - - - - useStandardKerning: - - - - 438 - - - - useStandardLigatures: - - - - 439 - - - - turnOffLigatures: - - - - 440 - - - - turnOffKerning: - - - - 441 - - - - alignLeft: - - - - 442 - - - - alignJustified: - - - - 443 - - - - copyRuler: - - - - 444 - - - - alignCenter: - - - - 445 - - - - toggleRuler: - - - - 446 - - - - alignRight: - - - - 447 - - - - pasteRuler: - - - - 448 - - - - terminate: - - - - 449 - - - - delegate - - - - 451 - - - - - YES - - 0 - - YES - - - - - - -2 - - - RmlsZSdzIE93bmVyA - - - -1 - - - First Responder - - - -3 - - - Application - - - 29 - - - YES - - - - - - - - - - MainMenu - - - 19 - - - YES - - - - - - 56 - - - YES - - - - - - 103 - - - YES - - - - 1 - - - 217 - - - YES - - - - - - 83 - - - YES - - - - - - 81 - - - YES - - - - - - - - - - - - - - - - 75 - - - 3 - - - 80 - - - 8 - - - 78 - - - 6 - - - 72 - - - - - 82 - - - 9 - - - 124 - - - YES - - - - - - 77 - - - 5 - - - 73 - - - 1 - - - 79 - - - 7 - - - 112 - - - 10 - - - 74 - - - 2 - - - 125 - - - YES - - - - - - 126 - - - - - 205 - - - YES - - - - - - - - - - - - - - - - - - 202 - - - - - 198 - - - - - 207 - - - - - 214 - - - - - 199 - - - - - 203 - - - - - 197 - - - - - 206 - - - - - 215 - - - - - 218 - - - YES - - - - - - 216 - - - YES - - - - - - 200 - - - YES - - - - - - - - - 219 - - - - - 201 - - - - - 204 - - - - - 220 - - - YES - - - - - - - - - - 213 - - - - - 210 - - - - - 221 - - - - - 208 - - - - - 209 - - - - - 106 - - - YES - - - - 2 - - - 111 - - - - - 57 - - - YES - - - - - - - - - - - - - - - - 58 - - - - - 134 - - - - - 150 - - - - - 136 - - - 1111 - - - 144 - - - - - 129 - - - 121 - - - 143 - - - - - 236 - - - - - 131 - - - YES - - - - - - 149 - - - - - 145 - - - - - 130 - - - - - 24 - - - YES - - - - - - - - - 92 - - - - - 5 - - - - - 239 - - - - - 23 - - - - - 295 - - - YES - - - - - - 296 - - - YES - - - - - - - 297 - - - - - 298 - - - - - 211 - - - YES - - - - - - 212 - - - YES - - - - - - - 195 - - - - - 196 - - - - - 346 - - - - - 348 - - - YES - - - - - - 349 - - - YES - - - - - - - - 350 - - - - - 351 - - - - - 354 - - - - - 371 - - - YES - - - - - - 372 - - - - - 375 - - - YES - - - - - - 376 - - - YES - - - - - - - 377 - - - YES - - - - - - 378 - - - YES - - - - - - 379 - - - YES - - - - - - - - - - - - - 380 - - - - - 381 - - - - - 382 - - - - - 383 - - - - - 384 - - - - - 385 - - - - - 386 - - - - - 387 - - - - - 388 - - - YES - - - - - - - - - - - - - - - - - - - - - 389 - - - - - 390 - - - - - 391 - - - - - 392 - - - - - 393 - - - - - 394 - - - - - 395 - - - - - 396 - - - - - 397 - - - YES - - - - - - 398 - - - YES - - - - - - 399 - - - YES - - - - - - 400 - - - - - 401 - - - - - 402 - - - - - 403 - - - - - 404 - - - - - 405 - - - YES - - - - - - - - - - 406 - - - - - 407 - - - - - 408 - - - - - 409 - - - - - 410 - - - - - 411 - - - YES - - - - - - - - 412 - - - - - 413 - - - - - 414 - - - - - 415 - - - YES - - - - - - - - - 416 - - - - - 417 - - - - - 418 - - - - - 419 - - - - - 420 - - - - - 450 - - - - - - - YES - - YES - -1.IBPluginDependency - -2.IBPluginDependency - -3.IBPluginDependency - 103.IBPluginDependency - 103.ImportedFromIB2 - 106.IBPluginDependency - 106.ImportedFromIB2 - 106.editorWindowContentRectSynchronizationRect - 111.IBPluginDependency - 111.ImportedFromIB2 - 112.IBPluginDependency - 112.ImportedFromIB2 - 124.IBPluginDependency - 124.ImportedFromIB2 - 125.IBPluginDependency - 125.ImportedFromIB2 - 125.editorWindowContentRectSynchronizationRect - 126.IBPluginDependency - 126.ImportedFromIB2 - 129.IBPluginDependency - 129.ImportedFromIB2 - 130.IBPluginDependency - 130.ImportedFromIB2 - 130.editorWindowContentRectSynchronizationRect - 131.IBPluginDependency - 131.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 - 136.IBPluginDependency - 136.ImportedFromIB2 - 143.IBPluginDependency - 143.ImportedFromIB2 - 144.IBPluginDependency - 144.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 - 19.IBPluginDependency - 19.ImportedFromIB2 - 195.IBPluginDependency - 195.ImportedFromIB2 - 196.IBPluginDependency - 196.ImportedFromIB2 - 197.IBPluginDependency - 197.ImportedFromIB2 - 198.IBPluginDependency - 198.ImportedFromIB2 - 199.IBPluginDependency - 199.ImportedFromIB2 - 200.IBPluginDependency - 200.ImportedFromIB2 - 200.editorWindowContentRectSynchronizationRect - 201.IBPluginDependency - 201.ImportedFromIB2 - 202.IBPluginDependency - 202.ImportedFromIB2 - 203.IBPluginDependency - 203.ImportedFromIB2 - 204.IBPluginDependency - 204.ImportedFromIB2 - 205.IBPluginDependency - 205.ImportedFromIB2 - 205.editorWindowContentRectSynchronizationRect - 206.IBPluginDependency - 206.ImportedFromIB2 - 207.IBPluginDependency - 207.ImportedFromIB2 - 208.IBPluginDependency - 208.ImportedFromIB2 - 209.IBPluginDependency - 209.ImportedFromIB2 - 210.IBPluginDependency - 210.ImportedFromIB2 - 211.IBPluginDependency - 211.ImportedFromIB2 - 212.IBPluginDependency - 212.ImportedFromIB2 - 212.editorWindowContentRectSynchronizationRect - 213.IBPluginDependency - 213.ImportedFromIB2 - 214.IBPluginDependency - 214.ImportedFromIB2 - 215.IBPluginDependency - 215.ImportedFromIB2 - 216.IBPluginDependency - 216.ImportedFromIB2 - 217.IBPluginDependency - 217.ImportedFromIB2 - 218.IBPluginDependency - 218.ImportedFromIB2 - 219.IBPluginDependency - 219.ImportedFromIB2 - 220.IBPluginDependency - 220.ImportedFromIB2 - 220.editorWindowContentRectSynchronizationRect - 221.IBPluginDependency - 221.ImportedFromIB2 - 23.IBPluginDependency - 23.ImportedFromIB2 - 236.IBPluginDependency - 236.ImportedFromIB2 - 239.IBPluginDependency - 239.ImportedFromIB2 - 24.IBPluginDependency - 24.ImportedFromIB2 - 24.editorWindowContentRectSynchronizationRect - 29.IBEditorWindowLastContentRect - 29.IBPluginDependency - 29.ImportedFromIB2 - 29.WindowOrigin - 29.editorWindowContentRectSynchronizationRect - 295.IBPluginDependency - 296.IBPluginDependency - 296.editorWindowContentRectSynchronizationRect - 297.IBPluginDependency - 298.IBPluginDependency - 346.IBPluginDependency - 346.ImportedFromIB2 - 348.IBPluginDependency - 348.ImportedFromIB2 - 349.IBPluginDependency - 349.ImportedFromIB2 - 349.editorWindowContentRectSynchronizationRect - 350.IBPluginDependency - 350.ImportedFromIB2 - 351.IBPluginDependency - 351.ImportedFromIB2 - 354.IBPluginDependency - 354.ImportedFromIB2 - 371.IBEditorWindowLastContentRect - 371.IBWindowTemplateEditedContentRect - 371.NSWindowTemplate.visibleAtLaunch - 371.editorWindowContentRectSynchronizationRect - 371.windowTemplate.maxSize - 372.IBPluginDependency - 375.IBPluginDependency - 376.IBEditorWindowLastContentRect - 376.IBPluginDependency - 377.IBPluginDependency - 378.IBPluginDependency - 379.IBPluginDependency - 380.IBPluginDependency - 381.IBPluginDependency - 382.IBPluginDependency - 383.IBPluginDependency - 384.IBPluginDependency - 385.IBPluginDependency - 386.IBPluginDependency - 387.IBPluginDependency - 388.IBEditorWindowLastContentRect - 388.IBPluginDependency - 389.IBPluginDependency - 390.IBPluginDependency - 391.IBPluginDependency - 392.IBPluginDependency - 393.IBPluginDependency - 394.IBPluginDependency - 395.IBPluginDependency - 396.IBPluginDependency - 397.IBPluginDependency - 398.IBPluginDependency - 399.IBPluginDependency - 400.IBPluginDependency - 401.IBPluginDependency - 402.IBPluginDependency - 403.IBPluginDependency - 404.IBPluginDependency - 405.IBPluginDependency - 406.IBPluginDependency - 407.IBPluginDependency - 408.IBPluginDependency - 409.IBPluginDependency - 410.IBPluginDependency - 411.IBPluginDependency - 412.IBPluginDependency - 413.IBPluginDependency - 414.IBPluginDependency - 415.IBPluginDependency - 416.IBPluginDependency - 417.IBPluginDependency - 418.IBPluginDependency - 419.IBPluginDependency - 420.IBPluginDependency - 450.IBPluginDependency - 5.IBPluginDependency - 5.ImportedFromIB2 - 56.IBPluginDependency - 56.ImportedFromIB2 - 57.IBEditorWindowLastContentRect - 57.IBPluginDependency - 57.ImportedFromIB2 - 57.editorWindowContentRectSynchronizationRect - 58.IBPluginDependency - 58.ImportedFromIB2 - 72.IBPluginDependency - 72.ImportedFromIB2 - 73.IBPluginDependency - 73.ImportedFromIB2 - 74.IBPluginDependency - 74.ImportedFromIB2 - 75.IBPluginDependency - 75.ImportedFromIB2 - 77.IBPluginDependency - 77.ImportedFromIB2 - 78.IBPluginDependency - 78.ImportedFromIB2 - 79.IBPluginDependency - 79.ImportedFromIB2 - 80.IBPluginDependency - 80.ImportedFromIB2 - 81.IBPluginDependency - 81.ImportedFromIB2 - 81.editorWindowContentRectSynchronizationRect - 82.IBPluginDependency - 82.ImportedFromIB2 - 83.IBPluginDependency - 83.ImportedFromIB2 - 92.IBPluginDependency - 92.ImportedFromIB2 - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilderKit - com.apple.InterfaceBuilderKit - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{596, 852}, {216, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{522, 812}, {146, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{436, 809}, {64, 6}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {275, 83}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{187, 434}, {243, 243}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {167, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {241, 103}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{525, 802}, {197, 73}} - {{43, 961}, {478, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - {74, 862} - {{6, 978}, {478, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{475, 832}, {234, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {215, 63}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{342, 496}, {480, 360}} - {{342, 496}, {480, 360}} - - {{33, 99}, {480, 360}} - {3.40282e+38, 3.40282e+38} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{437, 242}, {86, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{523, 2}, {178, 283}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{55, 778}, {245, 183}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{23, 794}, {245, 183}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{145, 474}, {199, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - YES - - YES - - - YES - - - - - YES - - YES - - - YES - - - - 451 - - - - YES - - NSObject - - IBProjectSource - AsyncSocket.h - - - - - 0 - ../PasswdHTTPServer.xcodeproj - 3 - - diff --git a/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/Info.plist b/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/Info.plist deleted file mode 100644 index 612b7da52f2b8..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/Instructions.txt b/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/Instructions.txt deleted file mode 100644 index 1ab0705aecb49..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/Instructions.txt +++ /dev/null @@ -1,32 +0,0 @@ -INFO: - -This project demonstrates password protecting a specific resource. More specifically, the project allows unrestricted access to the ~/Sites folder, but requires a password for anything in the ~/Sites/secret/ subfolder. - -INSTRUCTIONS: - -Create the following folder: -~/Sites/secret - -And then add a file to it. For example: -~/Sites/secret/doc.txt - -Open the Xcode project, and build and go. - -On the Xcode console you'll see a message saying: -"Started HTTP server on port 59123" - -Now open your browser and type the URL: -http://localhost:59123 - -Notice that it displays your file without password prompt: -~/Sites/index.html - -Now type the URL: -http://localhost:59123/secret/doc.txt - -Notice that it prompts you for a username/password. -The sample code accepts any username, and the password is "secret". - -(Replace 59123 with whatever port the server is actually running on.) - -Enjoy. \ No newline at end of file diff --git a/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/MyHTTPConnection.h b/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/MyHTTPConnection.h deleted file mode 100644 index b960f587c07ff..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/MyHTTPConnection.h +++ /dev/null @@ -1,10 +0,0 @@ -#import -#import "HTTPConnection.h" - - -@interface MyHTTPConnection : HTTPConnection -{ - -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/MyHTTPConnection.m b/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/MyHTTPConnection.m deleted file mode 100644 index bb2ef94fc90a4..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/MyHTTPConnection.m +++ /dev/null @@ -1,48 +0,0 @@ -#import "MyHTTPConnection.h" -#import "HTTPLogging.h" - -// Log levels : off, error, warn, info, verbose -// Other flags: trace -static const int httpLogLevel = HTTP_LOG_LEVEL_VERBOSE | HTTP_LOG_FLAG_TRACE; - - -@implementation MyHTTPConnection - -- (BOOL)isPasswordProtected:(NSString *)path -{ - // We're only going to password protect the "secret" directory. - - BOOL result = [path hasPrefix:@"/secret"]; - - HTTPLogTrace2(@"%@[%p]: isPasswordProtected(%@) - %@", THIS_FILE, self, path, (result ? @"YES" : @"NO")); - - return result; -} - -- (BOOL)useDigestAccessAuthentication -{ - HTTPLogTrace(); - - // Digest access authentication is the default setting. - // Notice in Safari that when you're prompted for your password, - // Safari tells you "Your login information will be sent securely." - // - // If you return NO in this method, the HTTP server will use - // basic authentication. Try it and you'll see that Safari - // will tell you "Your password will be sent unencrypted", - // which is strongly discouraged. - - return YES; -} - -- (NSString *)passwordForUser:(NSString *)username -{ - HTTPLogTrace(); - - // You can do all kinds of cool stuff here. - // For simplicity, we're not going to check the username, only the password. - - return @"secret"; -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/PasswdHTTPServer.xcodeproj/TemplateIcon.icns b/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/PasswdHTTPServer.xcodeproj/TemplateIcon.icns deleted file mode 100644 index 62cb7015e09d6..0000000000000 Binary files a/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/PasswdHTTPServer.xcodeproj/TemplateIcon.icns and /dev/null differ diff --git a/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/PasswdHTTPServer.xcodeproj/project.pbxproj b/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/PasswdHTTPServer.xcodeproj/project.pbxproj deleted file mode 100644 index aac3e6c45032e..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/PasswdHTTPServer.xcodeproj/project.pbxproj +++ /dev/null @@ -1,446 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; }; - 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; - 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; - DC2E300B1298EEB1009F096E /* GCDAsyncSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = DC2E300A1298EEB1009F096E /* GCDAsyncSocket.m */; }; - DC2E30281298EF01009F096E /* DDASLLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = DC2E30211298EF00009F096E /* DDASLLogger.m */; }; - DC2E30291298EF01009F096E /* DDFileLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = DC2E30231298EF00009F096E /* DDFileLogger.m */; }; - DC2E302A1298EF01009F096E /* DDLog.m in Sources */ = {isa = PBXBuildFile; fileRef = DC2E30251298EF00009F096E /* DDLog.m */; }; - DC2E302B1298EF01009F096E /* DDTTYLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = DC2E30271298EF01009F096E /* DDTTYLogger.m */; }; - DC2E302F1298EF89009F096E /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC2E302E1298EF89009F096E /* Security.framework */; }; - DC372F32139DC36800A8407D /* DDData.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F16139DC36800A8407D /* DDData.m */; }; - DC372F33139DC36800A8407D /* DDNumber.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F18139DC36800A8407D /* DDNumber.m */; }; - DC372F34139DC36800A8407D /* DDRange.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F1A139DC36800A8407D /* DDRange.m */; }; - DC372F35139DC36800A8407D /* HTTPAuthenticationRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F1C139DC36800A8407D /* HTTPAuthenticationRequest.m */; }; - DC372F36139DC36800A8407D /* HTTPConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F1E139DC36800A8407D /* HTTPConnection.m */; }; - DC372F37139DC36800A8407D /* HTTPMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F21139DC36800A8407D /* HTTPMessage.m */; }; - DC372F38139DC36800A8407D /* HTTPServer.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F24139DC36800A8407D /* HTTPServer.m */; }; - DC372F39139DC36800A8407D /* HTTPAsyncFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F27139DC36800A8407D /* HTTPAsyncFileResponse.m */; }; - DC372F3A139DC36800A8407D /* HTTPDataResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F29139DC36800A8407D /* HTTPDataResponse.m */; }; - DC372F3B139DC36800A8407D /* HTTPDynamicFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F2B139DC36800A8407D /* HTTPDynamicFileResponse.m */; }; - DC372F3C139DC36800A8407D /* HTTPFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F2D139DC36800A8407D /* HTTPFileResponse.m */; }; - DC372F3D139DC36800A8407D /* HTTPRedirectResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F2F139DC36800A8407D /* HTTPRedirectResponse.m */; }; - DC372F3E139DC36800A8407D /* WebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F31139DC36800A8407D /* WebSocket.m */; }; - DC5BD6520FC333F400DA9B03 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DC5BD6510FC333F400DA9B03 /* AppDelegate.m */; }; - DC5BD6550FC3345600DA9B03 /* MyHTTPConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = DC5BD6540FC3345600DA9B03 /* MyHTTPConnection.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; - 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; - 1DDD58150DA1D0A300B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; - 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; - 32CA4F630368D1EE00C91783 /* PasswdHTTPServer_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PasswdHTTPServer_Prefix.pch; sourceTree = ""; }; - 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 8D1107320486CEB800E47090 /* PasswdHTTPServer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PasswdHTTPServer.app; sourceTree = BUILT_PRODUCTS_DIR; }; - DC2E30091298EEB1009F096E /* GCDAsyncSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GCDAsyncSocket.h; path = ../../Vendor/CocoaAsyncSocket/GCDAsyncSocket.h; sourceTree = SOURCE_ROOT; }; - DC2E300A1298EEB1009F096E /* GCDAsyncSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GCDAsyncSocket.m; path = ../../Vendor/CocoaAsyncSocket/GCDAsyncSocket.m; sourceTree = SOURCE_ROOT; }; - DC2E30201298EF00009F096E /* DDASLLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDASLLogger.h; path = ../../Vendor/CocoaLumberjack/DDASLLogger.h; sourceTree = SOURCE_ROOT; }; - DC2E30211298EF00009F096E /* DDASLLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDASLLogger.m; path = ../../Vendor/CocoaLumberjack/DDASLLogger.m; sourceTree = SOURCE_ROOT; }; - DC2E30221298EF00009F096E /* DDFileLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDFileLogger.h; path = ../../Vendor/CocoaLumberjack/DDFileLogger.h; sourceTree = SOURCE_ROOT; }; - DC2E30231298EF00009F096E /* DDFileLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDFileLogger.m; path = ../../Vendor/CocoaLumberjack/DDFileLogger.m; sourceTree = SOURCE_ROOT; }; - DC2E30241298EF00009F096E /* DDLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDLog.h; path = ../../Vendor/CocoaLumberjack/DDLog.h; sourceTree = SOURCE_ROOT; }; - DC2E30251298EF00009F096E /* DDLog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDLog.m; path = ../../Vendor/CocoaLumberjack/DDLog.m; sourceTree = SOURCE_ROOT; }; - DC2E30261298EF00009F096E /* DDTTYLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDTTYLogger.h; path = ../../Vendor/CocoaLumberjack/DDTTYLogger.h; sourceTree = SOURCE_ROOT; }; - DC2E30271298EF01009F096E /* DDTTYLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDTTYLogger.m; path = ../../Vendor/CocoaLumberjack/DDTTYLogger.m; sourceTree = SOURCE_ROOT; }; - DC2E302E1298EF89009F096E /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; - DC372E56139D47B100A8407D /* Base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = ""; }; - DC372E57139D47B100A8407D /* Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; - DC372E59139D47B100A8407D /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; - DC372F15139DC36800A8407D /* DDData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDData.h; sourceTree = ""; }; - DC372F16139DC36800A8407D /* DDData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDData.m; sourceTree = ""; }; - DC372F17139DC36800A8407D /* DDNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDNumber.h; sourceTree = ""; }; - DC372F18139DC36800A8407D /* DDNumber.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDNumber.m; sourceTree = ""; }; - DC372F19139DC36800A8407D /* DDRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDRange.h; sourceTree = ""; }; - DC372F1A139DC36800A8407D /* DDRange.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDRange.m; sourceTree = ""; }; - DC372F1B139DC36800A8407D /* HTTPAuthenticationRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPAuthenticationRequest.h; path = ../../Core/HTTPAuthenticationRequest.h; sourceTree = ""; }; - DC372F1C139DC36800A8407D /* HTTPAuthenticationRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPAuthenticationRequest.m; path = ../../Core/HTTPAuthenticationRequest.m; sourceTree = ""; }; - DC372F1D139DC36800A8407D /* HTTPConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPConnection.h; path = ../../Core/HTTPConnection.h; sourceTree = ""; }; - DC372F1E139DC36800A8407D /* HTTPConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPConnection.m; path = ../../Core/HTTPConnection.m; sourceTree = ""; }; - DC372F1F139DC36800A8407D /* HTTPLogging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPLogging.h; path = ../../Core/HTTPLogging.h; sourceTree = ""; }; - DC372F20139DC36800A8407D /* HTTPMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPMessage.h; path = ../../Core/HTTPMessage.h; sourceTree = ""; }; - DC372F21139DC36800A8407D /* HTTPMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPMessage.m; path = ../../Core/HTTPMessage.m; sourceTree = ""; }; - DC372F22139DC36800A8407D /* HTTPResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPResponse.h; path = ../../Core/HTTPResponse.h; sourceTree = ""; }; - DC372F23139DC36800A8407D /* HTTPServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPServer.h; path = ../../Core/HTTPServer.h; sourceTree = ""; }; - DC372F24139DC36800A8407D /* HTTPServer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPServer.m; path = ../../Core/HTTPServer.m; sourceTree = ""; }; - DC372F26139DC36800A8407D /* HTTPAsyncFileResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPAsyncFileResponse.h; sourceTree = ""; }; - DC372F27139DC36800A8407D /* HTTPAsyncFileResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPAsyncFileResponse.m; sourceTree = ""; }; - DC372F28139DC36800A8407D /* HTTPDataResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPDataResponse.h; sourceTree = ""; }; - DC372F29139DC36800A8407D /* HTTPDataResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPDataResponse.m; sourceTree = ""; }; - DC372F2A139DC36800A8407D /* HTTPDynamicFileResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPDynamicFileResponse.h; sourceTree = ""; }; - DC372F2B139DC36800A8407D /* HTTPDynamicFileResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPDynamicFileResponse.m; sourceTree = ""; }; - DC372F2C139DC36800A8407D /* HTTPFileResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPFileResponse.h; sourceTree = ""; }; - DC372F2D139DC36800A8407D /* HTTPFileResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPFileResponse.m; sourceTree = ""; }; - DC372F2E139DC36800A8407D /* HTTPRedirectResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPRedirectResponse.h; sourceTree = ""; }; - DC372F2F139DC36800A8407D /* HTTPRedirectResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPRedirectResponse.m; sourceTree = ""; }; - DC372F30139DC36800A8407D /* WebSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebSocket.h; path = ../../Core/WebSocket.h; sourceTree = ""; }; - DC372F31139DC36800A8407D /* WebSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WebSocket.m; path = ../../Core/WebSocket.m; sourceTree = ""; }; - DC5BD6500FC333F400DA9B03 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - DC5BD6510FC333F400DA9B03 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - DC5BD6530FC3345600DA9B03 /* MyHTTPConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyHTTPConnection.h; sourceTree = ""; }; - DC5BD6540FC3345600DA9B03 /* MyHTTPConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyHTTPConnection.m; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8D11072E0486CEB800E47090 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, - DC2E302F1298EF89009F096E /* Security.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Classes */ = { - isa = PBXGroup; - children = ( - DC5BD6500FC333F400DA9B03 /* AppDelegate.h */, - DC5BD6510FC333F400DA9B03 /* AppDelegate.m */, - DC5BD6530FC3345600DA9B03 /* MyHTTPConnection.h */, - DC5BD6540FC3345600DA9B03 /* MyHTTPConnection.m */, - ); - name = Classes; - sourceTree = ""; - }; - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { - isa = PBXGroup; - children = ( - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, - DC2E302E1298EF89009F096E /* Security.framework */, - ); - name = "Linked Frameworks"; - sourceTree = ""; - }; - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - 29B97324FDCFA39411CA2CEA /* AppKit.framework */, - 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */, - 29B97325FDCFA39411CA2CEA /* Foundation.framework */, - ); - name = "Other Frameworks"; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 8D1107320486CEB800E47090 /* PasswdHTTPServer.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* PasswdHTTPServer */ = { - isa = PBXGroup; - children = ( - DC2E301F1298EEEC009F096E /* Logging */, - DC5BD62F0FC3333F00DA9B03 /* TCP */, - DC5BD6330FC3335A00DA9B03 /* HTTP */, - 080E96DDFE201D6D7F000001 /* Classes */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = PasswdHTTPServer; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - DC372E55139D47B100A8407D /* Xcode-Configurations */, - 32CA4F630368D1EE00C91783 /* PasswdHTTPServer_Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.m */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - 8D1107310486CEB800E47090 /* Info.plist */, - 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, - 1DDD58140DA1D0A300B32029 /* MainMenu.xib */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, - ); - name = Frameworks; - sourceTree = ""; - }; - DC2E301F1298EEEC009F096E /* Logging */ = { - isa = PBXGroup; - children = ( - DC2E30241298EF00009F096E /* DDLog.h */, - DC2E30251298EF00009F096E /* DDLog.m */, - DC2E30261298EF00009F096E /* DDTTYLogger.h */, - DC2E30271298EF01009F096E /* DDTTYLogger.m */, - DC2E30201298EF00009F096E /* DDASLLogger.h */, - DC2E30211298EF00009F096E /* DDASLLogger.m */, - DC2E30221298EF00009F096E /* DDFileLogger.h */, - DC2E30231298EF00009F096E /* DDFileLogger.m */, - ); - name = Logging; - sourceTree = ""; - }; - DC372E55139D47B100A8407D /* Xcode-Configurations */ = { - isa = PBXGroup; - children = ( - DC372E56139D47B100A8407D /* Base.xcconfig */, - DC372E57139D47B100A8407D /* Debug.xcconfig */, - DC372E59139D47B100A8407D /* Release.xcconfig */, - ); - name = "Xcode-Configurations"; - path = "../Xcode-Configurations"; - sourceTree = ""; - }; - DC372F14139DC36800A8407D /* Categories */ = { - isa = PBXGroup; - children = ( - DC372F15139DC36800A8407D /* DDData.h */, - DC372F16139DC36800A8407D /* DDData.m */, - DC372F17139DC36800A8407D /* DDNumber.h */, - DC372F18139DC36800A8407D /* DDNumber.m */, - DC372F19139DC36800A8407D /* DDRange.h */, - DC372F1A139DC36800A8407D /* DDRange.m */, - ); - name = Categories; - path = ../../Core/Categories; - sourceTree = ""; - }; - DC372F25139DC36800A8407D /* Responses */ = { - isa = PBXGroup; - children = ( - DC372F26139DC36800A8407D /* HTTPAsyncFileResponse.h */, - DC372F27139DC36800A8407D /* HTTPAsyncFileResponse.m */, - DC372F28139DC36800A8407D /* HTTPDataResponse.h */, - DC372F29139DC36800A8407D /* HTTPDataResponse.m */, - DC372F2A139DC36800A8407D /* HTTPDynamicFileResponse.h */, - DC372F2B139DC36800A8407D /* HTTPDynamicFileResponse.m */, - DC372F2C139DC36800A8407D /* HTTPFileResponse.h */, - DC372F2D139DC36800A8407D /* HTTPFileResponse.m */, - DC372F2E139DC36800A8407D /* HTTPRedirectResponse.h */, - DC372F2F139DC36800A8407D /* HTTPRedirectResponse.m */, - ); - name = Responses; - path = ../../Core/Responses; - sourceTree = ""; - }; - DC5BD62F0FC3333F00DA9B03 /* TCP */ = { - isa = PBXGroup; - children = ( - DC2E30091298EEB1009F096E /* GCDAsyncSocket.h */, - DC2E300A1298EEB1009F096E /* GCDAsyncSocket.m */, - ); - name = TCP; - sourceTree = ""; - }; - DC5BD6330FC3335A00DA9B03 /* HTTP */ = { - isa = PBXGroup; - children = ( - DC372F1F139DC36800A8407D /* HTTPLogging.h */, - DC372F1B139DC36800A8407D /* HTTPAuthenticationRequest.h */, - DC372F1C139DC36800A8407D /* HTTPAuthenticationRequest.m */, - DC372F23139DC36800A8407D /* HTTPServer.h */, - DC372F24139DC36800A8407D /* HTTPServer.m */, - DC372F1D139DC36800A8407D /* HTTPConnection.h */, - DC372F1E139DC36800A8407D /* HTTPConnection.m */, - DC372F20139DC36800A8407D /* HTTPMessage.h */, - DC372F21139DC36800A8407D /* HTTPMessage.m */, - DC372F22139DC36800A8407D /* HTTPResponse.h */, - DC372F30139DC36800A8407D /* WebSocket.h */, - DC372F31139DC36800A8407D /* WebSocket.m */, - DC372F25139DC36800A8407D /* Responses */, - DC372F14139DC36800A8407D /* Categories */, - ); - name = HTTP; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 8D1107260486CEB800E47090 /* PasswdHTTPServer */ = { - isa = PBXNativeTarget; - buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "PasswdHTTPServer" */; - buildPhases = ( - 8D1107290486CEB800E47090 /* Resources */, - 8D11072C0486CEB800E47090 /* Sources */, - 8D11072E0486CEB800E47090 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PasswdHTTPServer; - productInstallPath = "$(HOME)/Applications"; - productName = PasswdHTTPServer; - productReference = 8D1107320486CEB800E47090 /* PasswdHTTPServer.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "PasswdHTTPServer" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* PasswdHTTPServer */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 8D1107260486CEB800E47090 /* PasswdHTTPServer */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 8D1107290486CEB800E47090 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, - 1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 8D11072C0486CEB800E47090 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D11072D0486CEB800E47090 /* main.m in Sources */, - DC5BD6520FC333F400DA9B03 /* AppDelegate.m in Sources */, - DC5BD6550FC3345600DA9B03 /* MyHTTPConnection.m in Sources */, - DC2E300B1298EEB1009F096E /* GCDAsyncSocket.m in Sources */, - DC2E30281298EF01009F096E /* DDASLLogger.m in Sources */, - DC2E30291298EF01009F096E /* DDFileLogger.m in Sources */, - DC2E302A1298EF01009F096E /* DDLog.m in Sources */, - DC2E302B1298EF01009F096E /* DDTTYLogger.m in Sources */, - DC372F32139DC36800A8407D /* DDData.m in Sources */, - DC372F33139DC36800A8407D /* DDNumber.m in Sources */, - DC372F34139DC36800A8407D /* DDRange.m in Sources */, - DC372F35139DC36800A8407D /* HTTPAuthenticationRequest.m in Sources */, - DC372F36139DC36800A8407D /* HTTPConnection.m in Sources */, - DC372F37139DC36800A8407D /* HTTPMessage.m in Sources */, - DC372F38139DC36800A8407D /* HTTPServer.m in Sources */, - DC372F39139DC36800A8407D /* HTTPAsyncFileResponse.m in Sources */, - DC372F3A139DC36800A8407D /* HTTPDataResponse.m in Sources */, - DC372F3B139DC36800A8407D /* HTTPDynamicFileResponse.m in Sources */, - DC372F3C139DC36800A8407D /* HTTPFileResponse.m in Sources */, - DC372F3D139DC36800A8407D /* HTTPRedirectResponse.m in Sources */, - DC372F3E139DC36800A8407D /* WebSocket.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 089C165DFE840E0CC02AAC07 /* English */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - 1DDD58140DA1D0A300B32029 /* MainMenu.xib */ = { - isa = PBXVariantGroup; - children = ( - 1DDD58150DA1D0A300B32029 /* English */, - ); - name = MainMenu.xib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - C01FCF4B08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_PREFIX_HEADER = PasswdHTTPServer_Prefix.pch; - INFOPLIST_FILE = Info.plist; - PRODUCT_NAME = PasswdHTTPServer; - }; - name = Debug; - }; - C01FCF4C08A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PREFIX_HEADER = PasswdHTTPServer_Prefix.pch; - INFOPLIST_FILE = Info.plist; - PRODUCT_NAME = PasswdHTTPServer; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DC372E57139D47B100A8407D /* Debug.xcconfig */; - buildSettings = { - SDKROOT = macosx10.6; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DC372E59139D47B100A8407D /* Release.xcconfig */; - buildSettings = { - SDKROOT = macosx10.6; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "PasswdHTTPServer" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4B08A954540054247B /* Debug */, - C01FCF4C08A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "PasswdHTTPServer" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/PasswdHTTPServer.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/PasswdHTTPServer.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 08d387b87f2c4..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/PasswdHTTPServer.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/PasswdHTTPServer_Prefix.pch b/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/PasswdHTTPServer_Prefix.pch deleted file mode 100644 index 8af033cb4c478..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/PasswdHTTPServer_Prefix.pch +++ /dev/null @@ -1,7 +0,0 @@ -// -// Prefix header for all source files of the 'PasswdHTTPServer' target in the 'PasswdHTTPServer' project -// - -#ifdef __OBJC__ - #import -#endif diff --git a/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/main.m b/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/main.m deleted file mode 100644 index f6eaed1505f7c..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/PasswdHTTPServer/main.m +++ /dev/null @@ -1,14 +0,0 @@ -// -// main.m -// PasswdHTTPServer -// -// Created by Robbie Hanson on 5/19/09. -// Copyright Deusty Designs, LLC. 2009. All rights reserved. -// - -#import - -int main(int argc, char *argv[]) -{ - return NSApplicationMain(argc, (const char **) argv); -} diff --git a/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/AppDelegate.h b/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/AppDelegate.h deleted file mode 100644 index b92cb92635008..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/AppDelegate.h +++ /dev/null @@ -1,11 +0,0 @@ -#import - -@class HTTPServer; - - -@interface AppDelegate : NSObject -{ - HTTPServer *httpServer; -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/AppDelegate.m b/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/AppDelegate.m deleted file mode 100644 index 0c3329168f067..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/AppDelegate.m +++ /dev/null @@ -1,49 +0,0 @@ -#import "AppDelegate.h" -#import "HTTPServer.h" -#import "MyHTTPConnection.h" -#import "DDLog.h" -#import "DDTTYLogger.h" - -// Log levels: off, error, warn, info, verbose -static const int ddLogLevel = LOG_LEVEL_VERBOSE; - - -@implementation AppDelegate - -- (void)applicationDidFinishLaunching:(NSNotification *)aNotification -{ - // Configure our logging framework. - // To keep things simple and fast, we're just going to log to the Xcode console. - [DDLog addLogger:[DDTTYLogger sharedInstance]]; - - // Initalize our http server - httpServer = [[HTTPServer alloc] init]; - - // Tell the server to broadcast its presence via Bonjour. - // This allows browsers such as Safari to automatically discover our service. - [httpServer setType:@"_http._tcp."]; - - // Normally there's no need to run our server on any specific port. - // Technologies like Bonjour allow clients to dynamically discover the server's port at runtime. - // However, for easy testing you may want force a certain port so you can just hit the refresh button. -// [httpServer setPort:12345]; - - // We're going to extend the base HTTPConnection class with our MyHTTPConnection class. - // This allows us to do all kinds of customizations. - [httpServer setConnectionClass:[MyHTTPConnection class]]; - - // Serve files from our embedded Web folder - NSString *webPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"Web"]; - DDLogInfo(@"Setting document root: %@", webPath); - - [httpServer setDocumentRoot:webPath]; - - - NSError *error = nil; - if(![httpServer start:&error]) - { - DDLogError(@"Error starting HTTP Server: %@", error); - } -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/English.lproj/InfoPlist.strings b/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/English.lproj/InfoPlist.strings deleted file mode 100644 index 5e45963c382ba..0000000000000 Binary files a/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/English.lproj/InfoPlist.strings and /dev/null differ diff --git a/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/English.lproj/MainMenu.xib b/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/English.lproj/MainMenu.xib deleted file mode 100644 index 59d0acc5d8e36..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/English.lproj/MainMenu.xib +++ /dev/null @@ -1,3072 +0,0 @@ - - - - 1050 - 9F33 - 670 - 949.34 - 352.00 - - YES - - - - - YES - com.apple.InterfaceBuilderKit - com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - NSApplication - - - FirstResponder - - - NSApplication - - - AMainMenu - - YES - - - NewApplication - - 1048576 - 2147483647 - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - submenuAction: - - NewApplication - - YES - - - About NewApplication - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - UHJlZmVyZW5jZXPigKY - , - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Services - - 1048576 - 2147483647 - - - submenuAction: - - Services - - YES - - _NSServicesMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Hide NewApplication - h - 1048576 - 2147483647 - - - - - - Hide Others - h - 1572864 - 2147483647 - - - - - - Show All - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Quit NewApplication - q - 1048576 - 2147483647 - - - - - _NSAppleMenu - - - - - File - - 1048576 - 2147483647 - - - submenuAction: - - File - - YES - - - New - n - 1048576 - 2147483647 - - - - - - T3BlbuKApg - o - 1048576 - 2147483647 - - - - - - Open Recent - - 1048576 - 2147483647 - - - submenuAction: - - Open Recent - - YES - - - Clear Menu - - 1048576 - 2147483647 - - - - - _NSRecentDocumentsMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Close - w - 1048576 - 2147483647 - - - - - - Save - s - 1048576 - 2147483647 - - - - - - U2F2ZSBBc+KApg - S - 1179648 - 2147483647 - - - - - - Revert to Saved - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Page Setup... - P - 1179648 - 2147483647 - - - - - - - UHJpbnTigKY - p - 1048576 - 2147483647 - - - - - - - - - Edit - - 1048576 - 2147483647 - - - submenuAction: - - Edit - - YES - - - Undo - z - 1048576 - 2147483647 - - - - - - Redo - Z - 1179648 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Cut - x - 1048576 - 2147483647 - - - - - - Copy - c - 1048576 - 2147483647 - - - - - - Paste - v - 1048576 - 2147483647 - - - - - - Delete - - 1048576 - 2147483647 - - - - - - Select All - a - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Find - - 1048576 - 2147483647 - - - submenuAction: - - Find - - YES - - - RmluZOKApg - f - 1048576 - 2147483647 - - - 1 - - - - Find Next - g - 1048576 - 2147483647 - - - 2 - - - - Find Previous - G - 1179648 - 2147483647 - - - 3 - - - - Use Selection for Find - e - 1048576 - 2147483647 - - - 7 - - - - Jump to Selection - j - 1048576 - 2147483647 - - - - - - - - - Spelling and Grammar - - 1048576 - 2147483647 - - - submenuAction: - - Spelling and Grammar - - YES - - - U2hvdyBTcGVsbGluZ+KApg - : - 1048576 - 2147483647 - - - - - - Check Spelling - ; - 1048576 - 2147483647 - - - - - - Check Spelling While Typing - - 1048576 - 2147483647 - - - - - - Check Grammar With Spelling - - 1048576 - 2147483647 - - - - - - - - - Substitutions - - 1048576 - 2147483647 - - - submenuAction: - - Substitutions - - YES - - - Smart Copy/Paste - f - 1048576 - 2147483647 - - - 1 - - - - Smart Quotes - g - 1048576 - 2147483647 - - - 2 - - - - Smart Links - G - 1179648 - 2147483647 - - - 3 - - - - - - - Speech - - 1048576 - 2147483647 - - - submenuAction: - - Speech - - YES - - - Start Speaking - - 1048576 - 2147483647 - - - - - - Stop Speaking - - 1048576 - 2147483647 - - - - - - - - - - - - Format - - 2147483647 - - - submenuAction: - - Format - - YES - - - Font - - 2147483647 - - - submenuAction: - - Font - - YES - - - Show Fonts - t - 1048576 - 2147483647 - - - - - - Bold - b - 1048576 - 2147483647 - - - 2 - - - - Italic - i - 1048576 - 2147483647 - - - 1 - - - - Underline - u - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Bigger - + - 1048576 - 2147483647 - - - 3 - - - - Smaller - - - 1048576 - 2147483647 - - - 4 - - - - YES - YES - - - 2147483647 - - - - - - Kern - - 2147483647 - - - submenuAction: - - Kern - - YES - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Tighten - - 2147483647 - - - - - - Loosen - - 2147483647 - - - - - - - - - Ligature - - 2147483647 - - - submenuAction: - - Ligature - - YES - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Use All - - 2147483647 - - - - - - - - - Baseline - - 2147483647 - - - submenuAction: - - Baseline - - YES - - - Use Default - - 2147483647 - - - - - - Superscript - - 2147483647 - - - - - - Subscript - - 2147483647 - - - - - - Raise - - 2147483647 - - - - - - Lower - - 2147483647 - - - - - - - - - YES - YES - - - 2147483647 - - - - - - Show Colors - C - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Copy Style - c - 1572864 - 2147483647 - - - - - - Paste Style - v - 1572864 - 2147483647 - - - - - _NSFontMenu - - - - - Text - - 2147483647 - - - submenuAction: - - Text - - YES - - - Align Left - { - 1048576 - 2147483647 - - - - - - Center - | - 1048576 - 2147483647 - - - - - - Justify - - 2147483647 - - - - - - Align Right - } - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Show Ruler - - 2147483647 - - - - - - Copy Ruler - c - 1310720 - 2147483647 - - - - - - Paste Ruler - v - 1310720 - 2147483647 - - - - - - - - - - - - View - - 1048576 - 2147483647 - - - submenuAction: - - View - - YES - - - Show Toolbar - t - 1572864 - 2147483647 - - - - - - Q3VzdG9taXplIFRvb2xiYXLigKY - - 1048576 - 2147483647 - - - - - - - - - Window - - 1048576 - 2147483647 - - - submenuAction: - - Window - - YES - - - Minimize - m - 1048576 - 2147483647 - - - - - - Zoom - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Bring All to Front - - 1048576 - 2147483647 - - - - - _NSWindowsMenu - - - - - Help - - 1048576 - 2147483647 - - - submenuAction: - - Help - - YES - - - NewApplication Help - ? - 1048576 - 2147483647 - - - - - - - - _NSMainMenu - - - 15 - 2 - {{335, 390}, {480, 360}} - 1946157056 - Window - NSWindow - - {3.40282e+38, 3.40282e+38} - - - 256 - {480, 360} - - - {{0, 0}, {1440, 878}} - {3.40282e+38, 3.40282e+38} - MainWindow - - - NSFontManager - - - AppDelegate - - - - - YES - - - performMiniaturize: - - - - 37 - - - - arrangeInFront: - - - - 39 - - - - print: - - - - 86 - - - - runPageLayout: - - - - 87 - - - - clearRecentDocuments: - - - - 127 - - - - orderFrontStandardAboutPanel: - - - - 142 - - - - performClose: - - - - 193 - - - - toggleContinuousSpellChecking: - - - - 222 - - - - undo: - - - - 223 - - - - copy: - - - - 224 - - - - checkSpelling: - - - - 225 - - - - paste: - - - - 226 - - - - stopSpeaking: - - - - 227 - - - - cut: - - - - 228 - - - - showGuessPanel: - - - - 230 - - - - redo: - - - - 231 - - - - selectAll: - - - - 232 - - - - startSpeaking: - - - - 233 - - - - delete: - - - - 235 - - - - performZoom: - - - - 240 - - - - performFindPanelAction: - - - - 241 - - - - centerSelectionInVisibleArea: - - - - 245 - - - - toggleGrammarChecking: - - - - 347 - - - - toggleSmartInsertDelete: - - - - 355 - - - - toggleAutomaticQuoteSubstitution: - - - - 356 - - - - toggleAutomaticLinkDetection: - - - - 357 - - - - showHelp: - - - - 360 - - - - saveDocument: - - - - 362 - - - - saveDocumentAs: - - - - 363 - - - - revertDocumentToSaved: - - - - 364 - - - - runToolbarCustomizationPalette: - - - - 365 - - - - toggleToolbarShown: - - - - 366 - - - - hide: - - - - 367 - - - - hideOtherApplications: - - - - 368 - - - - unhideAllApplications: - - - - 370 - - - - newDocument: - - - - 373 - - - - openDocument: - - - - 374 - - - - addFontTrait: - - - - 421 - - - - addFontTrait: - - - - 422 - - - - modifyFont: - - - - 423 - - - - orderFrontFontPanel: - - - - 424 - - - - modifyFont: - - - - 425 - - - - raiseBaseline: - - - - 426 - - - - lowerBaseline: - - - - 427 - - - - copyFont: - - - - 428 - - - - subscript: - - - - 429 - - - - superscript: - - - - 430 - - - - tightenKerning: - - - - 431 - - - - underline: - - - - 432 - - - - orderFrontColorPanel: - - - - 433 - - - - useAllLigatures: - - - - 434 - - - - loosenKerning: - - - - 435 - - - - pasteFont: - - - - 436 - - - - unscript: - - - - 437 - - - - useStandardKerning: - - - - 438 - - - - useStandardLigatures: - - - - 439 - - - - turnOffLigatures: - - - - 440 - - - - turnOffKerning: - - - - 441 - - - - alignLeft: - - - - 442 - - - - alignJustified: - - - - 443 - - - - copyRuler: - - - - 444 - - - - alignCenter: - - - - 445 - - - - toggleRuler: - - - - 446 - - - - alignRight: - - - - 447 - - - - pasteRuler: - - - - 448 - - - - terminate: - - - - 449 - - - - delegate - - - - 451 - - - - - YES - - 0 - - YES - - - - - - -2 - - - RmlsZSdzIE93bmVyA - - - -1 - - - First Responder - - - -3 - - - Application - - - 29 - - - YES - - - - - - - - - - MainMenu - - - 19 - - - YES - - - - - - 56 - - - YES - - - - - - 103 - - - YES - - - - 1 - - - 217 - - - YES - - - - - - 83 - - - YES - - - - - - 81 - - - YES - - - - - - - - - - - - - - - - 75 - - - 3 - - - 80 - - - 8 - - - 78 - - - 6 - - - 72 - - - - - 82 - - - 9 - - - 124 - - - YES - - - - - - 77 - - - 5 - - - 73 - - - 1 - - - 79 - - - 7 - - - 112 - - - 10 - - - 74 - - - 2 - - - 125 - - - YES - - - - - - 126 - - - - - 205 - - - YES - - - - - - - - - - - - - - - - - - 202 - - - - - 198 - - - - - 207 - - - - - 214 - - - - - 199 - - - - - 203 - - - - - 197 - - - - - 206 - - - - - 215 - - - - - 218 - - - YES - - - - - - 216 - - - YES - - - - - - 200 - - - YES - - - - - - - - - 219 - - - - - 201 - - - - - 204 - - - - - 220 - - - YES - - - - - - - - - - 213 - - - - - 210 - - - - - 221 - - - - - 208 - - - - - 209 - - - - - 106 - - - YES - - - - 2 - - - 111 - - - - - 57 - - - YES - - - - - - - - - - - - - - - - 58 - - - - - 134 - - - - - 150 - - - - - 136 - - - 1111 - - - 144 - - - - - 129 - - - 121 - - - 143 - - - - - 236 - - - - - 131 - - - YES - - - - - - 149 - - - - - 145 - - - - - 130 - - - - - 24 - - - YES - - - - - - - - - 92 - - - - - 5 - - - - - 239 - - - - - 23 - - - - - 295 - - - YES - - - - - - 296 - - - YES - - - - - - - 297 - - - - - 298 - - - - - 211 - - - YES - - - - - - 212 - - - YES - - - - - - - 195 - - - - - 196 - - - - - 346 - - - - - 348 - - - YES - - - - - - 349 - - - YES - - - - - - - - 350 - - - - - 351 - - - - - 354 - - - - - 371 - - - YES - - - - - - 372 - - - - - 375 - - - YES - - - - - - 376 - - - YES - - - - - - - 377 - - - YES - - - - - - 378 - - - YES - - - - - - 379 - - - YES - - - - - - - - - - - - - 380 - - - - - 381 - - - - - 382 - - - - - 383 - - - - - 384 - - - - - 385 - - - - - 386 - - - - - 387 - - - - - 388 - - - YES - - - - - - - - - - - - - - - - - - - - - 389 - - - - - 390 - - - - - 391 - - - - - 392 - - - - - 393 - - - - - 394 - - - - - 395 - - - - - 396 - - - - - 397 - - - YES - - - - - - 398 - - - YES - - - - - - 399 - - - YES - - - - - - 400 - - - - - 401 - - - - - 402 - - - - - 403 - - - - - 404 - - - - - 405 - - - YES - - - - - - - - - - 406 - - - - - 407 - - - - - 408 - - - - - 409 - - - - - 410 - - - - - 411 - - - YES - - - - - - - - 412 - - - - - 413 - - - - - 414 - - - - - 415 - - - YES - - - - - - - - - 416 - - - - - 417 - - - - - 418 - - - - - 419 - - - - - 420 - - - - - 450 - - - - - - - YES - - YES - -1.IBPluginDependency - -2.IBPluginDependency - -3.IBPluginDependency - 103.IBPluginDependency - 103.ImportedFromIB2 - 106.IBPluginDependency - 106.ImportedFromIB2 - 106.editorWindowContentRectSynchronizationRect - 111.IBPluginDependency - 111.ImportedFromIB2 - 112.IBPluginDependency - 112.ImportedFromIB2 - 124.IBPluginDependency - 124.ImportedFromIB2 - 125.IBPluginDependency - 125.ImportedFromIB2 - 125.editorWindowContentRectSynchronizationRect - 126.IBPluginDependency - 126.ImportedFromIB2 - 129.IBPluginDependency - 129.ImportedFromIB2 - 130.IBPluginDependency - 130.ImportedFromIB2 - 130.editorWindowContentRectSynchronizationRect - 131.IBPluginDependency - 131.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 - 136.IBPluginDependency - 136.ImportedFromIB2 - 143.IBPluginDependency - 143.ImportedFromIB2 - 144.IBPluginDependency - 144.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 - 19.IBPluginDependency - 19.ImportedFromIB2 - 195.IBPluginDependency - 195.ImportedFromIB2 - 196.IBPluginDependency - 196.ImportedFromIB2 - 197.IBPluginDependency - 197.ImportedFromIB2 - 198.IBPluginDependency - 198.ImportedFromIB2 - 199.IBPluginDependency - 199.ImportedFromIB2 - 200.IBPluginDependency - 200.ImportedFromIB2 - 200.editorWindowContentRectSynchronizationRect - 201.IBPluginDependency - 201.ImportedFromIB2 - 202.IBPluginDependency - 202.ImportedFromIB2 - 203.IBPluginDependency - 203.ImportedFromIB2 - 204.IBPluginDependency - 204.ImportedFromIB2 - 205.IBPluginDependency - 205.ImportedFromIB2 - 205.editorWindowContentRectSynchronizationRect - 206.IBPluginDependency - 206.ImportedFromIB2 - 207.IBPluginDependency - 207.ImportedFromIB2 - 208.IBPluginDependency - 208.ImportedFromIB2 - 209.IBPluginDependency - 209.ImportedFromIB2 - 210.IBPluginDependency - 210.ImportedFromIB2 - 211.IBPluginDependency - 211.ImportedFromIB2 - 212.IBPluginDependency - 212.ImportedFromIB2 - 212.editorWindowContentRectSynchronizationRect - 213.IBPluginDependency - 213.ImportedFromIB2 - 214.IBPluginDependency - 214.ImportedFromIB2 - 215.IBPluginDependency - 215.ImportedFromIB2 - 216.IBPluginDependency - 216.ImportedFromIB2 - 217.IBPluginDependency - 217.ImportedFromIB2 - 218.IBPluginDependency - 218.ImportedFromIB2 - 219.IBPluginDependency - 219.ImportedFromIB2 - 220.IBPluginDependency - 220.ImportedFromIB2 - 220.editorWindowContentRectSynchronizationRect - 221.IBPluginDependency - 221.ImportedFromIB2 - 23.IBPluginDependency - 23.ImportedFromIB2 - 236.IBPluginDependency - 236.ImportedFromIB2 - 239.IBPluginDependency - 239.ImportedFromIB2 - 24.IBPluginDependency - 24.ImportedFromIB2 - 24.editorWindowContentRectSynchronizationRect - 29.IBEditorWindowLastContentRect - 29.IBPluginDependency - 29.ImportedFromIB2 - 29.WindowOrigin - 29.editorWindowContentRectSynchronizationRect - 295.IBPluginDependency - 296.IBPluginDependency - 296.editorWindowContentRectSynchronizationRect - 297.IBPluginDependency - 298.IBPluginDependency - 346.IBPluginDependency - 346.ImportedFromIB2 - 348.IBPluginDependency - 348.ImportedFromIB2 - 349.IBPluginDependency - 349.ImportedFromIB2 - 349.editorWindowContentRectSynchronizationRect - 350.IBPluginDependency - 350.ImportedFromIB2 - 351.IBPluginDependency - 351.ImportedFromIB2 - 354.IBPluginDependency - 354.ImportedFromIB2 - 371.IBEditorWindowLastContentRect - 371.IBPluginDependency - 371.IBWindowTemplateEditedContentRect - 371.NSWindowTemplate.visibleAtLaunch - 371.editorWindowContentRectSynchronizationRect - 371.windowTemplate.maxSize - 372.IBPluginDependency - 375.IBPluginDependency - 376.IBEditorWindowLastContentRect - 376.IBPluginDependency - 377.IBPluginDependency - 378.IBPluginDependency - 379.IBPluginDependency - 380.IBPluginDependency - 381.IBPluginDependency - 382.IBPluginDependency - 383.IBPluginDependency - 384.IBPluginDependency - 385.IBPluginDependency - 386.IBPluginDependency - 387.IBPluginDependency - 388.IBEditorWindowLastContentRect - 388.IBPluginDependency - 389.IBPluginDependency - 390.IBPluginDependency - 391.IBPluginDependency - 392.IBPluginDependency - 393.IBPluginDependency - 394.IBPluginDependency - 395.IBPluginDependency - 396.IBPluginDependency - 397.IBPluginDependency - 398.IBPluginDependency - 399.IBPluginDependency - 400.IBPluginDependency - 401.IBPluginDependency - 402.IBPluginDependency - 403.IBPluginDependency - 404.IBPluginDependency - 405.IBPluginDependency - 406.IBPluginDependency - 407.IBPluginDependency - 408.IBPluginDependency - 409.IBPluginDependency - 410.IBPluginDependency - 411.IBPluginDependency - 412.IBPluginDependency - 413.IBPluginDependency - 414.IBPluginDependency - 415.IBPluginDependency - 416.IBPluginDependency - 417.IBPluginDependency - 418.IBPluginDependency - 419.IBPluginDependency - 450.IBPluginDependency - 5.IBPluginDependency - 5.ImportedFromIB2 - 56.IBPluginDependency - 56.ImportedFromIB2 - 57.IBEditorWindowLastContentRect - 57.IBPluginDependency - 57.ImportedFromIB2 - 57.editorWindowContentRectSynchronizationRect - 58.IBPluginDependency - 58.ImportedFromIB2 - 72.IBPluginDependency - 72.ImportedFromIB2 - 73.IBPluginDependency - 73.ImportedFromIB2 - 74.IBPluginDependency - 74.ImportedFromIB2 - 75.IBPluginDependency - 75.ImportedFromIB2 - 77.IBPluginDependency - 77.ImportedFromIB2 - 78.IBPluginDependency - 78.ImportedFromIB2 - 79.IBPluginDependency - 79.ImportedFromIB2 - 80.IBPluginDependency - 80.ImportedFromIB2 - 81.IBPluginDependency - 81.ImportedFromIB2 - 81.editorWindowContentRectSynchronizationRect - 82.IBPluginDependency - 82.ImportedFromIB2 - 83.IBPluginDependency - 83.ImportedFromIB2 - 92.IBPluginDependency - 92.ImportedFromIB2 - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilderKit - com.apple.InterfaceBuilderKit - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{596, 852}, {216, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{522, 812}, {146, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{436, 809}, {64, 6}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {275, 83}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{187, 434}, {243, 243}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {167, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {241, 103}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{525, 802}, {197, 73}} - {{53, 955}, {478, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - {74, 862} - {{6, 978}, {478, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{475, 832}, {234, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {215, 63}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{354, 412}, {480, 360}} - com.apple.InterfaceBuilder.CocoaPlugin - {{354, 412}, {480, 360}} - - {{33, 99}, {480, 360}} - {3.40282e+38, 3.40282e+38} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{437, 242}, {86, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{523, 2}, {178, 283}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{65, 772}, {245, 183}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{23, 794}, {245, 183}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{145, 474}, {199, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - YES - - YES - - - YES - - - - - YES - - YES - - - YES - - - - 451 - - - - YES - - AppDelegate - NSObject - - IBProjectSource - AppDelegate.h - - - - NSObject - - IBProjectSource - AsyncSocket.h - - - - - 0 - ../PostHTTPServer.xcodeproj - 3 - - diff --git a/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/Info.plist b/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/Info.plist deleted file mode 100644 index 612b7da52f2b8..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/Instructions.txt b/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/Instructions.txt deleted file mode 100644 index 735fd1d33f639..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/Instructions.txt +++ /dev/null @@ -1,21 +0,0 @@ -INFO: - -This is an extremely simplified example of accepting a POST. - -The included Web folder is added to the project, copied into the applications resource bundle, and set as the document root of the http server. It only has a single index.html file which prompts you to answer a simple math question. Your answer is submitted as a post. - -The MyHTTPConnection class reads your response, and dynamically generates the response. - -INSTRUCTIONS: - -Open the Xcode project, and build and go. - -On the Xcode console you'll see a message saying: -"Started HTTP server on port 59123" - -Now open your browser and type in the URL: -http://localhost:59123 - -(Replace 59123 with whatever port the server is actually running on.) - -Enjoy. \ No newline at end of file diff --git a/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/MyHTTPConnection.h b/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/MyHTTPConnection.h deleted file mode 100644 index 7ec2eaf6559f1..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/MyHTTPConnection.h +++ /dev/null @@ -1,7 +0,0 @@ -#import -#import "HTTPConnection.h" - - -@interface MyHTTPConnection : HTTPConnection - -@end \ No newline at end of file diff --git a/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/MyHTTPConnection.m b/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/MyHTTPConnection.m deleted file mode 100644 index 73ff499cdcf98..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/MyHTTPConnection.m +++ /dev/null @@ -1,111 +0,0 @@ -#import "MyHTTPConnection.h" -#import "HTTPMessage.h" -#import "HTTPDataResponse.h" -#import "DDNumber.h" -#import "HTTPLogging.h" - -// Log levels : off, error, warn, info, verbose -// Other flags: trace -static const int httpLogLevel = HTTP_LOG_LEVEL_WARN; // | HTTP_LOG_FLAG_TRACE; - - -/** - * All we have to do is override appropriate methods in HTTPConnection. -**/ - -@implementation MyHTTPConnection - -- (BOOL)supportsMethod:(NSString *)method atPath:(NSString *)path -{ - HTTPLogTrace(); - - // Add support for POST - - if ([method isEqualToString:@"POST"]) - { - if ([path isEqualToString:@"/post.html"]) - { - // Let's be extra cautious, and make sure the upload isn't 5 gigs - - return requestContentLength < 50; - } - } - - return [super supportsMethod:method atPath:path]; -} - -- (BOOL)expectsRequestBodyFromMethod:(NSString *)method atPath:(NSString *)path -{ - HTTPLogTrace(); - - // Inform HTTP server that we expect a body to accompany a POST request - - if([method isEqualToString:@"POST"]) - return YES; - - return [super expectsRequestBodyFromMethod:method atPath:path]; -} - -- (NSObject *)httpResponseForMethod:(NSString *)method URI:(NSString *)path -{ - HTTPLogTrace(); - - if ([method isEqualToString:@"POST"] && [path isEqualToString:@"/post.html"]) - { - HTTPLogVerbose(@"%@[%p]: postContentLength: %qu", THIS_FILE, self, requestContentLength); - - NSString *postStr = nil; - - NSData *postData = [request body]; - if (postData) - { - postStr = [[[NSString alloc] initWithData:postData encoding:NSUTF8StringEncoding] autorelease]; - } - - HTTPLogVerbose(@"%@[%p]: postStr: %@", THIS_FILE, self, postStr); - - // Result will be of the form "answer=..." - - int answer = [[postStr substringFromIndex:7] intValue]; - - NSData *response = nil; - if(answer == 10) - { - response = [@"Correct" dataUsingEncoding:NSUTF8StringEncoding]; - } - else - { - response = [@"Sorry - Try Again" dataUsingEncoding:NSUTF8StringEncoding]; - } - - return [[[HTTPDataResponse alloc] initWithData:response] autorelease]; - } - - return [super httpResponseForMethod:method URI:path]; -} - -- (void)prepareForBodyWithSize:(UInt64)contentLength -{ - HTTPLogTrace(); - - // If we supported large uploads, - // we might use this method to create/open files, allocate memory, etc. -} - -- (void)processBodyData:(NSData *)postDataChunk -{ - HTTPLogTrace(); - - // Remember: In order to support LARGE POST uploads, the data is read in chunks. - // This prevents a 50 MB upload from being stored in RAM. - // The size of the chunks are limited by the POST_CHUNKSIZE definition. - // Therefore, this method may be called multiple times for the same POST request. - - BOOL result = [request appendData:postDataChunk]; - if (!result) - { - HTTPLogError(@"%@[%p]: %@ - Couldn't append bytes!", THIS_FILE, self, THIS_METHOD); - } -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/PostHTTPServer.xcodeproj/TemplateIcon.icns b/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/PostHTTPServer.xcodeproj/TemplateIcon.icns deleted file mode 100644 index 62cb7015e09d6..0000000000000 Binary files a/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/PostHTTPServer.xcodeproj/TemplateIcon.icns and /dev/null differ diff --git a/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/PostHTTPServer.xcodeproj/project.pbxproj b/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/PostHTTPServer.xcodeproj/project.pbxproj deleted file mode 100644 index fee52cd176fb2..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/PostHTTPServer.xcodeproj/project.pbxproj +++ /dev/null @@ -1,464 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; }; - 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; - 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; - DC11284B0ED6116D00FA818C /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DC11284A0ED6116D00FA818C /* AppDelegate.m */; }; - DC1128750ED6127E00FA818C /* MyHTTPConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = DC1128740ED6127E00FA818C /* MyHTTPConnection.m */; }; - DC1128CA0ED61D2B00FA818C /* Web in CopyFiles */ = {isa = PBXBuildFile; fileRef = DC1128C50ED61C4600FA818C /* Web */; }; - DC2E31841298FCAE009F096E /* GCDAsyncSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = DC2E31831298FCAE009F096E /* GCDAsyncSocket.m */; }; - DC2E318E1298FCE5009F096E /* DDASLLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = DC2E31871298FCE5009F096E /* DDASLLogger.m */; }; - DC2E318F1298FCE5009F096E /* DDFileLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = DC2E31891298FCE5009F096E /* DDFileLogger.m */; }; - DC2E31901298FCE5009F096E /* DDLog.m in Sources */ = {isa = PBXBuildFile; fileRef = DC2E318B1298FCE5009F096E /* DDLog.m */; }; - DC2E31911298FCE5009F096E /* DDTTYLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = DC2E318D1298FCE5009F096E /* DDTTYLogger.m */; }; - DC2E31C51298FF52009F096E /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC2E31C41298FF52009F096E /* Security.framework */; }; - DC372F66139DC40000A8407D /* DDData.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F4A139DC40000A8407D /* DDData.m */; }; - DC372F67139DC40000A8407D /* DDNumber.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F4C139DC40000A8407D /* DDNumber.m */; }; - DC372F68139DC40000A8407D /* DDRange.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F4E139DC40000A8407D /* DDRange.m */; }; - DC372F69139DC40000A8407D /* HTTPAuthenticationRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F50139DC40000A8407D /* HTTPAuthenticationRequest.m */; }; - DC372F6A139DC40000A8407D /* HTTPConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F52139DC40000A8407D /* HTTPConnection.m */; }; - DC372F6B139DC40000A8407D /* HTTPMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F55139DC40000A8407D /* HTTPMessage.m */; }; - DC372F6C139DC40000A8407D /* HTTPServer.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F58139DC40000A8407D /* HTTPServer.m */; }; - DC372F6D139DC40000A8407D /* HTTPAsyncFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F5B139DC40000A8407D /* HTTPAsyncFileResponse.m */; }; - DC372F6E139DC40000A8407D /* HTTPDataResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F5D139DC40000A8407D /* HTTPDataResponse.m */; }; - DC372F6F139DC40000A8407D /* HTTPDynamicFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F5F139DC40000A8407D /* HTTPDynamicFileResponse.m */; }; - DC372F70139DC40000A8407D /* HTTPFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F61139DC40000A8407D /* HTTPFileResponse.m */; }; - DC372F71139DC40000A8407D /* HTTPRedirectResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F63139DC40000A8407D /* HTTPRedirectResponse.m */; }; - DC372F72139DC40000A8407D /* WebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F65139DC40000A8407D /* WebSocket.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - DC1128CE0ED61D3D00FA818C /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - comments = "This build phase exists because simply putting the folder reference in the \"Copy Bundle Resources\" phase has problems. Specifically, if you change a file, the changes aren't copied to the built product."; - dstPath = ""; - dstSubfolderSpec = 7; - files = ( - DC1128CA0ED61D2B00FA818C /* Web in CopyFiles */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; - 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; - 1DDD58150DA1D0A300B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; - 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; - 32CA4F630368D1EE00C91783 /* PostHTTPServer_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PostHTTPServer_Prefix.pch; sourceTree = ""; }; - 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 8D1107320486CEB800E47090 /* PostHTTPServer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PostHTTPServer.app; sourceTree = BUILT_PRODUCTS_DIR; }; - DC1128490ED6116D00FA818C /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - DC11284A0ED6116D00FA818C /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - DC1128730ED6127E00FA818C /* MyHTTPConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyHTTPConnection.h; sourceTree = ""; }; - DC1128740ED6127E00FA818C /* MyHTTPConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyHTTPConnection.m; sourceTree = ""; }; - DC1128C50ED61C4600FA818C /* Web */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Web; sourceTree = ""; }; - DC2E31821298FCAE009F096E /* GCDAsyncSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GCDAsyncSocket.h; path = ../../Vendor/CocoaAsyncSocket/GCDAsyncSocket.h; sourceTree = SOURCE_ROOT; }; - DC2E31831298FCAE009F096E /* GCDAsyncSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GCDAsyncSocket.m; path = ../../Vendor/CocoaAsyncSocket/GCDAsyncSocket.m; sourceTree = SOURCE_ROOT; }; - DC2E31861298FCE5009F096E /* DDASLLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDASLLogger.h; path = ../../Vendor/CocoaLumberjack/DDASLLogger.h; sourceTree = SOURCE_ROOT; }; - DC2E31871298FCE5009F096E /* DDASLLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDASLLogger.m; path = ../../Vendor/CocoaLumberjack/DDASLLogger.m; sourceTree = SOURCE_ROOT; }; - DC2E31881298FCE5009F096E /* DDFileLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDFileLogger.h; path = ../../Vendor/CocoaLumberjack/DDFileLogger.h; sourceTree = SOURCE_ROOT; }; - DC2E31891298FCE5009F096E /* DDFileLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDFileLogger.m; path = ../../Vendor/CocoaLumberjack/DDFileLogger.m; sourceTree = SOURCE_ROOT; }; - DC2E318A1298FCE5009F096E /* DDLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDLog.h; path = ../../Vendor/CocoaLumberjack/DDLog.h; sourceTree = SOURCE_ROOT; }; - DC2E318B1298FCE5009F096E /* DDLog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDLog.m; path = ../../Vendor/CocoaLumberjack/DDLog.m; sourceTree = SOURCE_ROOT; }; - DC2E318C1298FCE5009F096E /* DDTTYLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDTTYLogger.h; path = ../../Vendor/CocoaLumberjack/DDTTYLogger.h; sourceTree = SOURCE_ROOT; }; - DC2E318D1298FCE5009F096E /* DDTTYLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDTTYLogger.m; path = ../../Vendor/CocoaLumberjack/DDTTYLogger.m; sourceTree = SOURCE_ROOT; }; - DC2E31C41298FF52009F096E /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; - DC372E64139D4ABA00A8407D /* Base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = ""; }; - DC372E65139D4ABA00A8407D /* Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; - DC372E67139D4ABA00A8407D /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; - DC372F49139DC40000A8407D /* DDData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDData.h; sourceTree = ""; }; - DC372F4A139DC40000A8407D /* DDData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDData.m; sourceTree = ""; }; - DC372F4B139DC40000A8407D /* DDNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDNumber.h; sourceTree = ""; }; - DC372F4C139DC40000A8407D /* DDNumber.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDNumber.m; sourceTree = ""; }; - DC372F4D139DC40000A8407D /* DDRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDRange.h; sourceTree = ""; }; - DC372F4E139DC40000A8407D /* DDRange.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDRange.m; sourceTree = ""; }; - DC372F4F139DC40000A8407D /* HTTPAuthenticationRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPAuthenticationRequest.h; path = ../../Core/HTTPAuthenticationRequest.h; sourceTree = ""; }; - DC372F50139DC40000A8407D /* HTTPAuthenticationRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPAuthenticationRequest.m; path = ../../Core/HTTPAuthenticationRequest.m; sourceTree = ""; }; - DC372F51139DC40000A8407D /* HTTPConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPConnection.h; path = ../../Core/HTTPConnection.h; sourceTree = ""; }; - DC372F52139DC40000A8407D /* HTTPConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPConnection.m; path = ../../Core/HTTPConnection.m; sourceTree = ""; }; - DC372F53139DC40000A8407D /* HTTPLogging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPLogging.h; path = ../../Core/HTTPLogging.h; sourceTree = ""; }; - DC372F54139DC40000A8407D /* HTTPMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPMessage.h; path = ../../Core/HTTPMessage.h; sourceTree = ""; }; - DC372F55139DC40000A8407D /* HTTPMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPMessage.m; path = ../../Core/HTTPMessage.m; sourceTree = ""; }; - DC372F56139DC40000A8407D /* HTTPResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPResponse.h; path = ../../Core/HTTPResponse.h; sourceTree = ""; }; - DC372F57139DC40000A8407D /* HTTPServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPServer.h; path = ../../Core/HTTPServer.h; sourceTree = ""; }; - DC372F58139DC40000A8407D /* HTTPServer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPServer.m; path = ../../Core/HTTPServer.m; sourceTree = ""; }; - DC372F5A139DC40000A8407D /* HTTPAsyncFileResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPAsyncFileResponse.h; sourceTree = ""; }; - DC372F5B139DC40000A8407D /* HTTPAsyncFileResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPAsyncFileResponse.m; sourceTree = ""; }; - DC372F5C139DC40000A8407D /* HTTPDataResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPDataResponse.h; sourceTree = ""; }; - DC372F5D139DC40000A8407D /* HTTPDataResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPDataResponse.m; sourceTree = ""; }; - DC372F5E139DC40000A8407D /* HTTPDynamicFileResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPDynamicFileResponse.h; sourceTree = ""; }; - DC372F5F139DC40000A8407D /* HTTPDynamicFileResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPDynamicFileResponse.m; sourceTree = ""; }; - DC372F60139DC40000A8407D /* HTTPFileResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPFileResponse.h; sourceTree = ""; }; - DC372F61139DC40000A8407D /* HTTPFileResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPFileResponse.m; sourceTree = ""; }; - DC372F62139DC40000A8407D /* HTTPRedirectResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPRedirectResponse.h; sourceTree = ""; }; - DC372F63139DC40000A8407D /* HTTPRedirectResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPRedirectResponse.m; sourceTree = ""; }; - DC372F64139DC40000A8407D /* WebSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebSocket.h; path = ../../Core/WebSocket.h; sourceTree = ""; }; - DC372F65139DC40000A8407D /* WebSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WebSocket.m; path = ../../Core/WebSocket.m; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8D11072E0486CEB800E47090 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, - DC2E31C51298FF52009F096E /* Security.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Classes */ = { - isa = PBXGroup; - children = ( - DC1128490ED6116D00FA818C /* AppDelegate.h */, - DC11284A0ED6116D00FA818C /* AppDelegate.m */, - DC1128730ED6127E00FA818C /* MyHTTPConnection.h */, - DC1128740ED6127E00FA818C /* MyHTTPConnection.m */, - ); - name = Classes; - sourceTree = ""; - }; - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { - isa = PBXGroup; - children = ( - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, - DC2E31C41298FF52009F096E /* Security.framework */, - ); - name = "Linked Frameworks"; - sourceTree = ""; - }; - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - 29B97324FDCFA39411CA2CEA /* AppKit.framework */, - 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */, - 29B97325FDCFA39411CA2CEA /* Foundation.framework */, - ); - name = "Other Frameworks"; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 8D1107320486CEB800E47090 /* PostHTTPServer.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* PostHTTPServer */ = { - isa = PBXGroup; - children = ( - DC2E31851298FCB3009F096E /* Logging */, - DC1128420ED6112100FA818C /* TCP */, - DC11283F0ED6111800FA818C /* HTTP */, - 080E96DDFE201D6D7F000001 /* Classes */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = PostHTTPServer; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - DC372E63139D4ABA00A8407D /* Xcode-Configurations */, - 32CA4F630368D1EE00C91783 /* PostHTTPServer_Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.m */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - DC1128C50ED61C4600FA818C /* Web */, - 8D1107310486CEB800E47090 /* Info.plist */, - 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, - 1DDD58140DA1D0A300B32029 /* MainMenu.xib */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, - ); - name = Frameworks; - sourceTree = ""; - }; - DC11283F0ED6111800FA818C /* HTTP */ = { - isa = PBXGroup; - children = ( - DC372F53139DC40000A8407D /* HTTPLogging.h */, - DC372F4F139DC40000A8407D /* HTTPAuthenticationRequest.h */, - DC372F50139DC40000A8407D /* HTTPAuthenticationRequest.m */, - DC372F57139DC40000A8407D /* HTTPServer.h */, - DC372F58139DC40000A8407D /* HTTPServer.m */, - DC372F51139DC40000A8407D /* HTTPConnection.h */, - DC372F52139DC40000A8407D /* HTTPConnection.m */, - DC372F54139DC40000A8407D /* HTTPMessage.h */, - DC372F55139DC40000A8407D /* HTTPMessage.m */, - DC372F56139DC40000A8407D /* HTTPResponse.h */, - DC372F64139DC40000A8407D /* WebSocket.h */, - DC372F65139DC40000A8407D /* WebSocket.m */, - DC372F59139DC40000A8407D /* Responses */, - DC372F48139DC40000A8407D /* Categories */, - ); - name = HTTP; - sourceTree = ""; - }; - DC1128420ED6112100FA818C /* TCP */ = { - isa = PBXGroup; - children = ( - DC2E31821298FCAE009F096E /* GCDAsyncSocket.h */, - DC2E31831298FCAE009F096E /* GCDAsyncSocket.m */, - ); - name = TCP; - sourceTree = ""; - }; - DC2E31851298FCB3009F096E /* Logging */ = { - isa = PBXGroup; - children = ( - DC2E318A1298FCE5009F096E /* DDLog.h */, - DC2E318B1298FCE5009F096E /* DDLog.m */, - DC2E318C1298FCE5009F096E /* DDTTYLogger.h */, - DC2E318D1298FCE5009F096E /* DDTTYLogger.m */, - DC2E31861298FCE5009F096E /* DDASLLogger.h */, - DC2E31871298FCE5009F096E /* DDASLLogger.m */, - DC2E31881298FCE5009F096E /* DDFileLogger.h */, - DC2E31891298FCE5009F096E /* DDFileLogger.m */, - ); - name = Logging; - sourceTree = ""; - }; - DC372E63139D4ABA00A8407D /* Xcode-Configurations */ = { - isa = PBXGroup; - children = ( - DC372E64139D4ABA00A8407D /* Base.xcconfig */, - DC372E65139D4ABA00A8407D /* Debug.xcconfig */, - DC372E67139D4ABA00A8407D /* Release.xcconfig */, - ); - name = "Xcode-Configurations"; - path = "../Xcode-Configurations"; - sourceTree = ""; - }; - DC372F48139DC40000A8407D /* Categories */ = { - isa = PBXGroup; - children = ( - DC372F49139DC40000A8407D /* DDData.h */, - DC372F4A139DC40000A8407D /* DDData.m */, - DC372F4B139DC40000A8407D /* DDNumber.h */, - DC372F4C139DC40000A8407D /* DDNumber.m */, - DC372F4D139DC40000A8407D /* DDRange.h */, - DC372F4E139DC40000A8407D /* DDRange.m */, - ); - name = Categories; - path = ../../Core/Categories; - sourceTree = ""; - }; - DC372F59139DC40000A8407D /* Responses */ = { - isa = PBXGroup; - children = ( - DC372F5A139DC40000A8407D /* HTTPAsyncFileResponse.h */, - DC372F5B139DC40000A8407D /* HTTPAsyncFileResponse.m */, - DC372F5C139DC40000A8407D /* HTTPDataResponse.h */, - DC372F5D139DC40000A8407D /* HTTPDataResponse.m */, - DC372F5E139DC40000A8407D /* HTTPDynamicFileResponse.h */, - DC372F5F139DC40000A8407D /* HTTPDynamicFileResponse.m */, - DC372F60139DC40000A8407D /* HTTPFileResponse.h */, - DC372F61139DC40000A8407D /* HTTPFileResponse.m */, - DC372F62139DC40000A8407D /* HTTPRedirectResponse.h */, - DC372F63139DC40000A8407D /* HTTPRedirectResponse.m */, - ); - name = Responses; - path = ../../Core/Responses; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 8D1107260486CEB800E47090 /* PostHTTPServer */ = { - isa = PBXNativeTarget; - buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "PostHTTPServer" */; - buildPhases = ( - 8D1107290486CEB800E47090 /* Resources */, - 8D11072C0486CEB800E47090 /* Sources */, - 8D11072E0486CEB800E47090 /* Frameworks */, - DC1128CE0ED61D3D00FA818C /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PostHTTPServer; - productInstallPath = "$(HOME)/Applications"; - productName = PostHTTPServer; - productReference = 8D1107320486CEB800E47090 /* PostHTTPServer.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "PostHTTPServer" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* PostHTTPServer */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 8D1107260486CEB800E47090 /* PostHTTPServer */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 8D1107290486CEB800E47090 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, - 1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 8D11072C0486CEB800E47090 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D11072D0486CEB800E47090 /* main.m in Sources */, - DC11284B0ED6116D00FA818C /* AppDelegate.m in Sources */, - DC1128750ED6127E00FA818C /* MyHTTPConnection.m in Sources */, - DC2E31841298FCAE009F096E /* GCDAsyncSocket.m in Sources */, - DC2E318E1298FCE5009F096E /* DDASLLogger.m in Sources */, - DC2E318F1298FCE5009F096E /* DDFileLogger.m in Sources */, - DC2E31901298FCE5009F096E /* DDLog.m in Sources */, - DC2E31911298FCE5009F096E /* DDTTYLogger.m in Sources */, - DC372F66139DC40000A8407D /* DDData.m in Sources */, - DC372F67139DC40000A8407D /* DDNumber.m in Sources */, - DC372F68139DC40000A8407D /* DDRange.m in Sources */, - DC372F69139DC40000A8407D /* HTTPAuthenticationRequest.m in Sources */, - DC372F6A139DC40000A8407D /* HTTPConnection.m in Sources */, - DC372F6B139DC40000A8407D /* HTTPMessage.m in Sources */, - DC372F6C139DC40000A8407D /* HTTPServer.m in Sources */, - DC372F6D139DC40000A8407D /* HTTPAsyncFileResponse.m in Sources */, - DC372F6E139DC40000A8407D /* HTTPDataResponse.m in Sources */, - DC372F6F139DC40000A8407D /* HTTPDynamicFileResponse.m in Sources */, - DC372F70139DC40000A8407D /* HTTPFileResponse.m in Sources */, - DC372F71139DC40000A8407D /* HTTPRedirectResponse.m in Sources */, - DC372F72139DC40000A8407D /* WebSocket.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 089C165DFE840E0CC02AAC07 /* English */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - 1DDD58140DA1D0A300B32029 /* MainMenu.xib */ = { - isa = PBXVariantGroup; - children = ( - 1DDD58150DA1D0A300B32029 /* English */, - ); - name = MainMenu.xib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - C01FCF4B08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_PREFIX_HEADER = PostHTTPServer_Prefix.pch; - INFOPLIST_FILE = Info.plist; - PRODUCT_NAME = PostHTTPServer; - }; - name = Debug; - }; - C01FCF4C08A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PREFIX_HEADER = PostHTTPServer_Prefix.pch; - INFOPLIST_FILE = Info.plist; - PRODUCT_NAME = PostHTTPServer; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DC372E65139D4ABA00A8407D /* Debug.xcconfig */; - buildSettings = { - SDKROOT = macosx10.6; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DC372E67139D4ABA00A8407D /* Release.xcconfig */; - buildSettings = { - SDKROOT = macosx10.6; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "PostHTTPServer" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4B08A954540054247B /* Debug */, - C01FCF4C08A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "PostHTTPServer" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/PostHTTPServer.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/PostHTTPServer.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 79b2c770fcb47..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/PostHTTPServer.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/PostHTTPServer_Prefix.pch b/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/PostHTTPServer_Prefix.pch deleted file mode 100644 index 593a05a71f293..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/PostHTTPServer_Prefix.pch +++ /dev/null @@ -1,7 +0,0 @@ -// -// Prefix header for all source files of the 'PostHTTPServer' target in the 'PostHTTPServer' project -// - -#ifdef __OBJC__ - #import -#endif diff --git a/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/Web/index.html b/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/Web/index.html deleted file mode 100644 index 484aebc74e93c..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/Web/index.html +++ /dev/null @@ -1,8 +0,0 @@ - - -
    - What is 5 + 5 ? :
    - -
    - - \ No newline at end of file diff --git a/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/main.m b/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/main.m deleted file mode 100644 index f9408f1baac51..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/PostHTTPServer/main.m +++ /dev/null @@ -1,14 +0,0 @@ -// -// main.m -// PostHTTPServer -// -// Created by Robbie Hanson on 11/20/08. -// Copyright Deusty Designs, LLC. 2008. All rights reserved. -// - -#import - -int main(int argc, char *argv[]) -{ - return NSApplicationMain(argc, (const char **) argv); -} diff --git a/third_party/objc/CocoaHTTPServer/Samples/ReadMe.txt b/third_party/objc/CocoaHTTPServer/Samples/ReadMe.txt deleted file mode 100644 index 2d04ef46fb8bf..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/ReadMe.txt +++ /dev/null @@ -1,31 +0,0 @@ -Welcome to CocoaHTTPServer! - -This project provides you (the developer) with an embedded HTTP server. It was built using standard networking sockets and streams, and offers a wealth of features for your app: - -- Built in support for bonjour broadcasting -- IPv4 and IPv6 support automatically -- Asynchronous networking -- Multithreading support -- Password protection using either digest access or basic authentication -- TLS/SSL encryption support -- Range request support for partial downloads and pause/resume -- Support for LARGE files (up to 16 exabytes) -- Heavily commented code - -As is the nature of embedded servers, you probably want to do something cool with it. Perhaps you simply want to serve up files, but maybe you want to provide dynamic content or allow user uploads. No problem - you can use this code to do any/all of these tasks. - -The suggested way to implement your custom server is by extending the HTTPServer and/or HTTPConnection classes. You'll find several methods in these classes with documentation that says "override me to add support for..." For example, if you wanted to add password protection to various resources, simply override the "isPasswordProtected" and "passwordForUser" methods. - -If you have questions, you may email the mailing list: -http://groups.google.com/group/cocoahttpserver - -PLEASE NOTE: - -All sample xcode projects are simple examples of how to accomplish some task using CocoaHTTPServer. - -Don't forget to use source control to stay up-to-date with the latest version of the code. - -If you've implemented your custom server by extending the HTTPServer and HTTPConnection classes, it should be relatively easy to merge the latest improvements from subversion into your project. - -If you would like to receive email notifications when changes are committed, you may subscribe to the commit mailing list: -http://groups.google.com/group/cocoahttpserver-commit \ No newline at end of file diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/AppDelegate.h b/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/AppDelegate.h deleted file mode 100644 index b92cb92635008..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/AppDelegate.h +++ /dev/null @@ -1,11 +0,0 @@ -#import - -@class HTTPServer; - - -@interface AppDelegate : NSObject -{ - HTTPServer *httpServer; -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/AppDelegate.m b/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/AppDelegate.m deleted file mode 100644 index dd6e9a605150b..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/AppDelegate.m +++ /dev/null @@ -1,51 +0,0 @@ -#import "AppDelegate.h" -#import "HTTPServer.h" -#import "MyHTTPConnection.h" -#import "DDLog.h" -#import "DDTTYLogger.h" - -// Log levels: off, error, warn, info, verbose -static const int ddLogLevel = LOG_LEVEL_VERBOSE; - - -@implementation AppDelegate - -- (void)applicationDidFinishLaunching:(NSNotification *)aNotification -{ - // Configure our logging framework. - // To keep things simple and fast, we're just going to log to the Xcode console. - [DDLog addLogger:[DDTTYLogger sharedInstance]]; - - // Initalize our http server - httpServer = [[HTTPServer alloc] init]; - - // Tell the server to broadcast its presence via Bonjour. - // This allows browsers such as Safari to automatically discover our service. -// [httpServer setType:@"_http._tcp."]; - - // Note: Clicking the bonjour service in Safari won't work because Safari will use http and not https. - // Just change the url to https for proper access. - - // Normally there's no need to run our server on any specific port. - // Technologies like Bonjour allow clients to dynamically discover the server's port at runtime. - // However, for easy testing you may want force a certain port so you can just hit the refresh button. - [httpServer setPort:12345]; - - // We're going to extend the base HTTPConnection class with our MyHTTPConnection class. - // This allows us to customize the server for things such as SSL and password-protection. - [httpServer setConnectionClass:[MyHTTPConnection class]]; - - // Serve files from the standard Sites folder - NSString *docRoot = [@"~/Sites" stringByExpandingTildeInPath]; - DDLogInfo(@"Setting document root: %@", docRoot); - - [httpServer setDocumentRoot:docRoot]; - - NSError *error = nil; - if(![httpServer start:&error]) - { - DDLogError(@"Error starting HTTP Server: %@", error); - } -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/DDKeychain.h b/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/DDKeychain.h deleted file mode 100644 index 85c8ccd7027c1..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/DDKeychain.h +++ /dev/null @@ -1,20 +0,0 @@ -#import -#import - -@interface DDKeychain : NSObject -{ - -} - -+ (NSString *)passwordForHTTPServer; -+ (BOOL)setPasswordForHTTPServer:(NSString *)password; - -+ (void)createNewIdentity; -+ (NSArray *)SSLIdentityAndCertificates; - -+ (NSString *)applicationTemporaryDirectory; -+ (NSString *)stringForSecExternalFormat:(SecExternalFormat)extFormat; -+ (NSString *)stringForSecExternalItemType:(SecExternalItemType)itemType; -+ (NSString *)stringForSecKeychainAttrType:(SecKeychainAttrType)attrType; - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/DDKeychain.m b/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/DDKeychain.m deleted file mode 100644 index dd077b79c752e..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/DDKeychain.m +++ /dev/null @@ -1,603 +0,0 @@ -#import "DDKeychain.h" - - -@implementation DDKeychain - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Server: -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * Retrieves the password stored in the keychain for the HTTP server. -**/ -+ (NSString *)passwordForHTTPServer -{ - NSString *password = nil; - - const char *service = [@"HTTP Server" UTF8String]; - const char *account = [@"Deusty" UTF8String]; - - UInt32 passwordLength = 0; - void *passwordBytes = nil; - - OSStatus status; - status = SecKeychainFindGenericPassword(NULL, // default keychain - (UInt32)strlen(service), // length of service name - service, // service name - (UInt32)strlen(account), // length of account name - account, // account name - &passwordLength, // length of password - &passwordBytes, // pointer to password data - NULL); // keychain item reference (NULL if unneeded) - - if(status == noErr) - { - NSData *passwordData = [NSData dataWithBytesNoCopy:passwordBytes length:passwordLength freeWhenDone:NO]; - password = [[[NSString alloc] initWithData:passwordData encoding:NSUTF8StringEncoding] autorelease]; - } - - // SecKeychainItemFreeContent(attrList, data) - // attrList - previously returned attributes - // data - previously returned password - - if(passwordBytes) SecKeychainItemFreeContent(NULL, passwordBytes); - - return password; -} - - -/** - * This method sets the password for the HTTP server. -**/ -+ (BOOL)setPasswordForHTTPServer:(NSString *)password -{ - const char *service = [@"HTTP Server" UTF8String]; - const char *account = [@"Deusty" UTF8String]; - const char *kind = [@"Deusty password" UTF8String]; - const char *passwd = [password UTF8String]; - - SecKeychainItemRef itemRef = NULL; - - // The first thing we need to do is check to see a password for the library already exists in the keychain - OSStatus status; - status = SecKeychainFindGenericPassword(NULL, // default keychain - (UInt32)strlen(service), // length of service name - service, // service name - (UInt32)strlen(account), // length of account name - account, // account name - NULL, // length of password (NULL if unneeded) - NULL, // pointer to password data (NULL if unneeded) - &itemRef); // the keychain item reference - - if(status == errSecItemNotFound) - { - // Setup the attributes the for the keychain item - SecKeychainAttribute attrs[] = { - { kSecServiceItemAttr, (UInt32)strlen(service), (char *)service }, - { kSecAccountItemAttr, (UInt32)strlen(account), (char *)account }, - { kSecDescriptionItemAttr, (UInt32)strlen(kind), (char *)kind } - }; - SecKeychainAttributeList attributes = { sizeof(attrs) / sizeof(attrs[0]), attrs }; - - status = SecKeychainItemCreateFromContent(kSecGenericPasswordItemClass, // class of item to create - &attributes, // pointer to the list of attributes - (UInt32)strlen(passwd), // length of password - passwd, // pointer to password data - NULL, // default keychain - NULL, // access list (NULL if this app only) - &itemRef); // the keychain item reference - } - else if(status == noErr) - { - // A keychain item for the library already exists - // All we need to do is update it with the new password - status = SecKeychainItemModifyAttributesAndData(itemRef, // the keychain item reference - NULL, // no change to attributes - (UInt32)strlen(passwd), // length of password - passwd); // pointer to password data - } - - // Don't forget to release anything we create - if(itemRef) CFRelease(itemRef); - - return (status == noErr); -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Identity: -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * This method creates a new identity, and adds it to the keychain. - * An identity is simply a certificate (public key and public information) along with a matching private key. - * This method generates a new private key, and then uses the private key to generate a new self-signed certificate. -**/ -+ (void)createNewIdentity -{ - // Declare any Carbon variables we may create - // We do this here so it's easier to compare to the bottom of this method where we release them all - SecKeychainRef keychain = NULL; - CFArrayRef outItems = NULL; - - // Configure the paths where we'll create all of our identity files - NSString *basePath = [DDKeychain applicationTemporaryDirectory]; - - NSString *privateKeyPath = [basePath stringByAppendingPathComponent:@"private.pem"]; - NSString *reqConfPath = [basePath stringByAppendingPathComponent:@"req.conf"]; - NSString *certificatePath = [basePath stringByAppendingPathComponent:@"certificate.crt"]; - NSString *certWrapperPath = [basePath stringByAppendingPathComponent:@"certificate.p12"]; - - // You can generate your own private key by running the following command in the terminal: - // openssl genrsa -out private.pem 1024 - // - // Where 1024 is the size of the private key. - // You may used a bigger number. - // It is probably a good recommendation to use at least 1024... - - NSArray *privateKeyArgs = [NSArray arrayWithObjects:@"genrsa", @"-out", privateKeyPath, @"1024", nil]; - - NSTask *genPrivateKeyTask = [[[NSTask alloc] init] autorelease]; - - [genPrivateKeyTask setLaunchPath:@"/usr/bin/openssl"]; - [genPrivateKeyTask setArguments:privateKeyArgs]; - [genPrivateKeyTask launch]; - - // Don't use waitUntilExit - I've had too many problems with it in the past - do { - [NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.05]]; - } while([genPrivateKeyTask isRunning]); - - // Now we want to create a configuration file for our certificate - // This is an optional step, but we do it so people who are browsing their keychain - // know exactly where the certificate came from, and don't delete it. - - NSMutableString *mStr = [NSMutableString stringWithCapacity:500]; - [mStr appendFormat:@"%@\n", @"[ req ]"]; - [mStr appendFormat:@"%@\n", @"distinguished_name = req_distinguished_name"]; - [mStr appendFormat:@"%@\n", @"prompt = no"]; - [mStr appendFormat:@"%@\n", @""]; - [mStr appendFormat:@"%@\n", @"[ req_distinguished_name ]"]; - [mStr appendFormat:@"%@\n", @"C = US"]; - [mStr appendFormat:@"%@\n", @"ST = Missouri"]; - [mStr appendFormat:@"%@\n", @"L = Springfield"]; - [mStr appendFormat:@"%@\n", @"O = Deusty Designs, LLC"]; - [mStr appendFormat:@"%@\n", @"OU = Open Source"]; - [mStr appendFormat:@"%@\n", @"CN = SecureHTTPServer"]; - [mStr appendFormat:@"%@\n", @"emailAddress = robbiehanson@deusty.com"]; - - [mStr writeToFile:reqConfPath atomically:NO encoding:NSUTF8StringEncoding error:nil]; - - // You can generate your own certificate by running the following command in the terminal: - // openssl req -new -x509 -key private.pem -out certificate.crt -text -days 365 -batch - // - // You can optionally create a configuration file, and pass an extra command to use it: - // -config req.conf - - NSArray *certificateArgs = [NSArray arrayWithObjects:@"req", @"-new", @"-x509", - @"-key", privateKeyPath, - @"-config", reqConfPath, - @"-out", certificatePath, - @"-text", @"-days", @"365", @"-batch", nil]; - - NSTask *genCertificateTask = [[[NSTask alloc] init] autorelease]; - - [genCertificateTask setLaunchPath:@"/usr/bin/openssl"]; - [genCertificateTask setArguments:certificateArgs]; - [genCertificateTask launch]; - - // Don't use waitUntilExit - I've had too many problems with it in the past - do { - [NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.05]]; - } while([genCertificateTask isRunning]); - - // Mac OS X has problems importing private keys, so we wrap everything in PKCS#12 format - // You can create a p12 wrapper by running the following command in the terminal: - // openssl pkcs12 -export -in certificate.crt -inkey private.pem - // -passout pass:password -out certificate.p12 -name "Open Source" - - NSArray *certWrapperArgs = [NSArray arrayWithObjects:@"pkcs12", @"-export", @"-export", - @"-in", certificatePath, - @"-inkey", privateKeyPath, - @"-passout", @"pass:password", - @"-out", certWrapperPath, - @"-name", @"SecureHTTPServer", nil]; - - NSTask *genCertWrapperTask = [[[NSTask alloc] init] autorelease]; - - [genCertWrapperTask setLaunchPath:@"/usr/bin/openssl"]; - [genCertWrapperTask setArguments:certWrapperArgs]; - [genCertWrapperTask launch]; - - // Don't use waitUntilExit - I've had too many problems with it in the past - do { - [NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.05]]; - } while([genCertWrapperTask isRunning]); - - // At this point we've created all the identity files that we need - // Our next step is to import the identity into the keychain - // We can do this by using the SecKeychainItemImport() method. - // But of course this method is "Frozen in Carbonite"... - // So it's going to take us 100 lines of code to build up the parameters needed to make the method call - NSData *certData = [NSData dataWithContentsOfFile:certWrapperPath]; - - /* SecKeyImportExportFlags - typedef uint32_t - * Defines values for the flags field of the import/export parameters. - * - * enum - * { - * kSecKeyImportOnlyOne = 0x00000001, - * kSecKeySecurePassphrase = 0x00000002, - * kSecKeyNoAccessControl = 0x00000004 - * }; - * - * kSecKeyImportOnlyOne - * Prevents the importing of more than one private key by the SecKeychainItemImport function. - * If the importKeychain parameter is NULL, this bit is ignored. Otherwise, if this bit is set and there is - * more than one key in the incoming external representation, - * no items are imported to the specified keychain and the error errSecMultipleKeys is returned. - * kSecKeySecurePassphrase - * When set, the password for import or export is obtained by user prompt. Otherwise, you must provide the - * password in the passphrase field of the SecKeyImportExportParameters structure. - * A user-supplied password is preferred, because it avoids having the cleartext password appear in the - * applicationÕs address space at any time. - * kSecKeyNoAccessControl - * When set, imported private keys have no access object attached to them. In the absence of both this bit and - * the accessRef field in SecKeyImportExportParameters, imported private keys are given default access controls - **/ - - SecKeyImportExportFlags importFlags = kSecKeyImportOnlyOne; - - /* SecKeyImportExportParameters - typedef struct - * - * FOR IMPORT AND EXPORT: - * uint32_t version - * The version of this structure; the current value is SEC_KEY_IMPORT_EXPORT_PARAMS_VERSION. - * SecKeyImportExportFlags flags - * A set of flag bits, defined in "Keychain Item Import/Export Parameter Flags". - * CFTypeRef passphrase - * A password, used for kSecFormatPKCS12 and kSecFormatWrapped formats only... - * IE - kSecFormatWrappedOpenSSL, kSecFormatWrappedSSH, or kSecFormatWrappedPKCS8 - * CFStringRef alertTitle - * Title of secure password alert panel. - * When importing or exporting a key, if you set the kSecKeySecurePassphrase flag bit, - * you can optionally use this field to specify a string for the password panelÕs title bar. - * CFStringRef alertPrompt - * Prompt in secure password alert panel. - * When importing or exporting a key, if you set the kSecKeySecurePassphrase flag bit, - * you can optionally use this field to specify a string for the prompt that appears in the password panel. - * - * FOR IMPORT ONLY: - * SecAccessRef accessRef - * Specifies the initial access controls of imported private keys. - * If more than one private key is being imported, all private keys get the same initial access controls. - * If this field is NULL when private keys are being imported, then the access object for the keychain item - * for an imported private key depends on the kSecKeyNoAccessControl bit in the flags parameter. - * If this bit is 0 (or keyParams is NULL), the default access control is used. - * If this bit is 1, no access object is attached to the keychain item for imported private keys. - * CSSM_KEYUSE keyUsage - * A word of bits constituting the low-level use flags for imported keys as defined in cssmtype.h. - * If this field is 0 or keyParams is NULL, the default value is CSSM_KEYUSE_ANY. - * CSSM_KEYATTR_FLAGS keyAttributes - * The following are valid values for these flags: - * CSSM_KEYATTR_PERMANENT, CSSM_KEYATTR_SENSITIVE, and CSSM_KEYATTR_EXTRACTABLE. - * The default value is CSSM_KEYATTR_SENSITIVE | CSSM_KEYATTR_EXTRACTABLE - * The CSSM_KEYATTR_SENSITIVE bit indicates that the key can only be extracted in wrapped form. - * Important: If you do not set the CSSM_KEYATTR_EXTRACTABLE bit, - * you cannot extract the imported key from the keychain in any form, including in wrapped form. - **/ - - SecKeyImportExportParameters importParameters; - importParameters.version = SEC_KEY_IMPORT_EXPORT_PARAMS_VERSION; - importParameters.flags = importFlags; - importParameters.passphrase = CFSTR("password"); - importParameters.accessRef = NULL; - importParameters.keyUsage = CSSM_KEYUSE_ANY; - importParameters.keyAttributes = CSSM_KEYATTR_SENSITIVE | CSSM_KEYATTR_EXTRACTABLE; - - /* SecKeychainItemImport - Imports one or more certificates, keys, or identities and adds them to a keychain. - * - * Parameters: - * CFDataRef importedData - * The external representation of the items to import. - * CFStringRef fileNameOrExtension - * The name or extension of the file from which the external representation was obtained. - * Pass NULL if you donÕt know the name or extension. - * SecExternalFormat *inputFormat - * On input, points to the format of the external representation. - * Pass kSecFormatUnknown if you do not know the exact format. - * On output, points to the format that the function has determined the external representation to be in. - * Pass NULL if you donÕt know the format and donÕt want the format returned to you. - * SecExternalItemType *itemType - * On input, points to the item type of the item or items contained in the external representation. - * Pass kSecItemTypeUnknown if you do not know the item type. - * On output, points to the item type that the function has determined the external representation to contain. - * Pass NULL if you donÕt know the item type and donÕt want the type returned to you. - * SecItemImportExportFlags flags - * Unused; pass in 0. - * const SecKeyImportExportParameters *keyParams - * A pointer to a structure containing a set of input parameters for the function. - * If no key items are being imported, these parameters are optional - * and you can set the keyParams parameter to NULL. - * SecKeychainRef importKeychain - * A keychain object indicating the keychain to which the key or certificate should be imported. - * If you pass NULL, the item is not imported. - * Use the SecKeychainCopyDefault function to get a reference to the default keychain. - * If the kSecKeyImportOnlyOne bit is set and there is more than one key in the - * incoming external representation, no items are imported to the specified keychain and the - * error errSecMultiplePrivKeys is returned. - * CFArrayRef *outItems - * On output, points to an array of SecKeychainItemRef objects for the imported items. - * You must provide a valid pointer to a CFArrayRef object to receive this information. - * If you pass NULL for this parameter, the function does not return the imported items. - * Release this object by calling the CFRelease function when you no longer need it. - **/ - - SecExternalFormat inputFormat = kSecFormatPKCS12; - SecExternalItemType itemType = kSecItemTypeUnknown; - - SecKeychainCopyDefault(&keychain); - - OSStatus err = 0; - err = SecKeychainItemImport((CFDataRef)certData, // CFDataRef importedData - NULL, // CFStringRef fileNameOrExtension - &inputFormat, // SecExternalFormat *inputFormat - &itemType, // SecExternalItemType *itemType - 0, // SecItemImportExportFlags flags (Unused) - &importParameters, // const SecKeyImportExportParameters *keyParams - keychain, // SecKeychainRef importKeychain - &outItems); // CFArrayRef *outItems - - NSLog(@"OSStatus: %i", err); - - NSLog(@"SecExternalFormat: %@", [DDKeychain stringForSecExternalFormat:inputFormat]); - NSLog(@"SecExternalItemType: %@", [DDKeychain stringForSecExternalItemType:itemType]); - - NSLog(@"outItems: %@", (NSArray *)outItems); - - // Don't forget to delete the temporary files - [[NSFileManager defaultManager] removeItemAtPath:privateKeyPath error:nil]; - [[NSFileManager defaultManager] removeItemAtPath:reqConfPath error:nil]; - [[NSFileManager defaultManager] removeItemAtPath:certificatePath error:nil]; - [[NSFileManager defaultManager] removeItemAtPath:certWrapperPath error:nil]; - - // Don't forget to release anything we may have created - if(keychain) CFRelease(keychain); - if(outItems) CFRelease(outItems); -} - -/** - * Returns an array of SecCertificateRefs except for the first element in the array, which is a SecIdentityRef. - * Currently this method is designed to return the identity created in the method above. - * You will most likely alter this method to return a proper identity based on what it is you're trying to do. -**/ -+ (NSArray *)SSLIdentityAndCertificates -{ - // Declare any Carbon variables we may create - // We do this here so it's easier to compare to the bottom of this method where we release them all - SecKeychainRef keychain = NULL; - SecIdentitySearchRef searchRef = NULL; - - // Create array to hold the results - NSMutableArray *result = [NSMutableArray array]; - - /* SecKeychainAttribute - typedef struct - * Contains keychain attributes. - * - * struct SecKeychainAttribute - * { - * SecKeychainAttrType tag; - * UInt32 length; - * void *data; - * }; - * - * Fields: - * tag - * A 4-byte attribute tag. See ÒKeychain Item Attribute ConstantsÓ for valid attribute types. - * length - * The length of the buffer pointed to by data. - * data - * A pointer to the attribute data. - **/ - - /* SecKeychainAttributeList - typedef struct - * Represents a list of keychain attributes. - * - * struct SecKeychainAttributeList - * { - * UInt32 count; - * SecKeychainAttribute *attr; - * }; - * - * Fields: - * count - * An unsigned 32-bit integer that represents the number of keychain attributes in the array. - * attr - * A pointer to the first keychain attribute in the array. - **/ - - SecKeychainCopyDefault(&keychain); - - SecIdentitySearchCreate(keychain, CSSM_KEYUSE_ANY, &searchRef); - - SecIdentityRef currentIdentityRef = NULL; - while(searchRef && (SecIdentitySearchCopyNext(searchRef, ¤tIdentityRef) != errSecItemNotFound)) - { - // Extract the private key from the identity, and examine it to see if it will work for us - SecKeyRef privateKeyRef = NULL; - SecIdentityCopyPrivateKey(currentIdentityRef, &privateKeyRef); - - if(privateKeyRef) - { - // Get the name attribute of the private key - // We're looking for a private key with the name of "Mojo User" - - SecItemAttr itemAttributes[] = {kSecKeyPrintName}; - - SecExternalFormat externalFormats[] = {kSecFormatUnknown}; - - int itemAttributesSize = sizeof(itemAttributes) / sizeof(*itemAttributes); - int externalFormatsSize = sizeof(externalFormats) / sizeof(*externalFormats); - NSAssert(itemAttributesSize == externalFormatsSize, @"Arrays must have identical counts!"); - - SecKeychainAttributeInfo info = {itemAttributesSize, (void *)&itemAttributes, (void *)&externalFormats}; - - SecKeychainAttributeList *privateKeyAttributeList = NULL; - SecKeychainItemCopyAttributesAndData((SecKeychainItemRef)privateKeyRef, - &info, NULL, &privateKeyAttributeList, NULL, NULL); - - if(privateKeyAttributeList) - { - SecKeychainAttribute nameAttribute = privateKeyAttributeList->attr[0]; - - NSString *name = [[[NSString alloc] initWithBytes:nameAttribute.data - length:(nameAttribute.length) - encoding:NSUTF8StringEncoding] autorelease]; - - // Ugly Hack - // For some reason, name sometimes contains odd characters at the end of it - // I'm not sure why, and I don't know of a proper fix, thus the use of the hasPrefix: method - if([name hasPrefix:@"SecureHTTPServer"]) - { - // It's possible for there to be more than one private key with the above prefix - // But we're only allowed to have one identity, so we make sure to only add one to the array - if([result count] == 0) - { - [result addObject:(id)currentIdentityRef]; - } - } - - SecKeychainItemFreeAttributesAndData(privateKeyAttributeList, NULL); - } - - CFRelease(privateKeyRef); - } - - CFRelease(currentIdentityRef); - } - - if(keychain) CFRelease(keychain); - if(searchRef) CFRelease(searchRef); - - return result; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Utilities: -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * Creates (if necessary) and returns a temporary directory for the application. - * - * A general temporary directory is provided for each user by the OS. - * This prevents conflicts between the same application running on multiple user accounts. - * We take this a step further by putting everything inside another subfolder, identified by our application name. -**/ -+ (NSString *)applicationTemporaryDirectory -{ - NSString *userTempDir = NSTemporaryDirectory(); - NSString *appTempDir = [userTempDir stringByAppendingPathComponent:@"SecureHTTPServer"]; - - NSFileManager *fileManager = [NSFileManager defaultManager]; - if([fileManager fileExistsAtPath:appTempDir] == NO) - { - [fileManager createDirectoryAtPath:appTempDir withIntermediateDirectories:YES attributes:nil error:nil]; - } - - return appTempDir; -} - -/** - * Simple utility class to convert a SecExternalFormat into a string suitable for printing/logging. -**/ -+ (NSString *)stringForSecExternalFormat:(SecExternalFormat)extFormat -{ - switch(extFormat) - { - case kSecFormatUnknown : return @"kSecFormatUnknown"; - - /* Asymmetric Key Formats */ - case kSecFormatOpenSSL : return @"kSecFormatOpenSSL"; - case kSecFormatSSH : return @"kSecFormatSSH - Not Supported"; - case kSecFormatBSAFE : return @"kSecFormatBSAFE"; - - /* Symmetric Key Formats */ - case kSecFormatRawKey : return @"kSecFormatRawKey"; - - /* Formats for wrapped symmetric and private keys */ - case kSecFormatWrappedPKCS8 : return @"kSecFormatWrappedPKCS8"; - case kSecFormatWrappedOpenSSL : return @"kSecFormatWrappedOpenSSL"; - case kSecFormatWrappedSSH : return @"kSecFormatWrappedSSH - Not Supported"; - case kSecFormatWrappedLSH : return @"kSecFormatWrappedLSH - Not Supported"; - - /* Formats for certificates */ - case kSecFormatX509Cert : return @"kSecFormatX509Cert"; - - /* Aggregate Types */ - case kSecFormatPEMSequence : return @"kSecFormatPEMSequence"; - case kSecFormatPKCS7 : return @"kSecFormatPKCS7"; - case kSecFormatPKCS12 : return @"kSecFormatPKCS12"; - case kSecFormatNetscapeCertSequence : return @"kSecFormatNetscapeCertSequence"; - - default : return @"Unknown"; - } -} - -/** - * Simple utility class to convert a SecExternalItemType into a string suitable for printing/logging. -**/ -+ (NSString *)stringForSecExternalItemType:(SecExternalItemType)itemType -{ - switch(itemType) - { - case kSecItemTypeUnknown : return @"kSecItemTypeUnknown"; - - case kSecItemTypePrivateKey : return @"kSecItemTypePrivateKey"; - case kSecItemTypePublicKey : return @"kSecItemTypePublicKey"; - case kSecItemTypeSessionKey : return @"kSecItemTypeSessionKey"; - case kSecItemTypeCertificate : return @"kSecItemTypeCertificate"; - case kSecItemTypeAggregate : return @"kSecItemTypeAggregate"; - - default : return @"Unknown"; - } -} - -/** - * Simple utility class to convert a SecKeychainAttrType into a string suitable for printing/logging. -**/ -+ (NSString *)stringForSecKeychainAttrType:(SecKeychainAttrType)attrType -{ - switch(attrType) - { - case kSecCreationDateItemAttr : return @"kSecCreationDateItemAttr"; - case kSecModDateItemAttr : return @"kSecModDateItemAttr"; - case kSecDescriptionItemAttr : return @"kSecDescriptionItemAttr"; - case kSecCommentItemAttr : return @"kSecCommentItemAttr"; - case kSecCreatorItemAttr : return @"kSecCreatorItemAttr"; - case kSecTypeItemAttr : return @"kSecTypeItemAttr"; - case kSecScriptCodeItemAttr : return @"kSecScriptCodeItemAttr"; - case kSecLabelItemAttr : return @"kSecLabelItemAttr"; - case kSecInvisibleItemAttr : return @"kSecInvisibleItemAttr"; - case kSecNegativeItemAttr : return @"kSecNegativeItemAttr"; - case kSecCustomIconItemAttr : return @"kSecCustomIconItemAttr"; - case kSecAccountItemAttr : return @"kSecAccountItemAttr"; - case kSecServiceItemAttr : return @"kSecServiceItemAttr"; - case kSecGenericItemAttr : return @"kSecGenericItemAttr"; - case kSecSecurityDomainItemAttr : return @"kSecSecurityDomainItemAttr"; - case kSecServerItemAttr : return @"kSecServerItemAttr"; - case kSecAuthenticationTypeItemAttr : return @"kSecAuthenticationTypeItemAttr"; - case kSecPortItemAttr : return @"kSecPortItemAttr"; - case kSecPathItemAttr : return @"kSecPathItemAttr"; - case kSecVolumeItemAttr : return @"kSecVolumeItemAttr"; - case kSecAddressItemAttr : return @"kSecAddressItemAttr"; - case kSecSignatureItemAttr : return @"kSecSignatureItemAttr"; - case kSecProtocolItemAttr : return @"kSecProtocolItemAttr"; - case kSecCertificateType : return @"kSecCertificateType"; - case kSecCertificateEncoding : return @"kSecCertificateEncoding"; - case kSecCrlType : return @"kSecCrlType"; - case kSecCrlEncoding : return @"kSecCrlEncoding"; - case kSecAlias : return @"kSecAlias"; - default : return @"Unknown"; - } -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/English.lproj/InfoPlist.strings b/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/English.lproj/InfoPlist.strings deleted file mode 100644 index 5e45963c382ba..0000000000000 Binary files a/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/English.lproj/InfoPlist.strings and /dev/null differ diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/English.lproj/MainMenu.xib b/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/English.lproj/MainMenu.xib deleted file mode 100644 index 2f834281172c6..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/English.lproj/MainMenu.xib +++ /dev/null @@ -1,3072 +0,0 @@ - - - - 1050 - 9J61 - 677 - 949.46 - 353.00 - - YES - - - - - YES - com.apple.InterfaceBuilderKit - com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - YES - - - YES - - - - YES - - NSApplication - - - FirstResponder - - - NSApplication - - - AMainMenu - - YES - - - NewApplication - - 1048576 - 2147483647 - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - submenuAction: - - NewApplication - - YES - - - About NewApplication - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - UHJlZmVyZW5jZXPigKY - , - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Services - - 1048576 - 2147483647 - - - submenuAction: - - Services - - YES - - _NSServicesMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Hide NewApplication - h - 1048576 - 2147483647 - - - - - - Hide Others - h - 1572864 - 2147483647 - - - - - - Show All - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Quit NewApplication - q - 1048576 - 2147483647 - - - - - _NSAppleMenu - - - - - File - - 1048576 - 2147483647 - - - submenuAction: - - File - - YES - - - New - n - 1048576 - 2147483647 - - - - - - T3BlbuKApg - o - 1048576 - 2147483647 - - - - - - Open Recent - - 1048576 - 2147483647 - - - submenuAction: - - Open Recent - - YES - - - Clear Menu - - 1048576 - 2147483647 - - - - - _NSRecentDocumentsMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Close - w - 1048576 - 2147483647 - - - - - - Save - s - 1048576 - 2147483647 - - - - - - U2F2ZSBBc+KApg - S - 1179648 - 2147483647 - - - - - - Revert to Saved - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Page Setup... - P - 1179648 - 2147483647 - - - - - - - UHJpbnTigKY - p - 1048576 - 2147483647 - - - - - - - - - Edit - - 1048576 - 2147483647 - - - submenuAction: - - Edit - - YES - - - Undo - z - 1048576 - 2147483647 - - - - - - Redo - Z - 1179648 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Cut - x - 1048576 - 2147483647 - - - - - - Copy - c - 1048576 - 2147483647 - - - - - - Paste - v - 1048576 - 2147483647 - - - - - - Delete - - 1048576 - 2147483647 - - - - - - Select All - a - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Find - - 1048576 - 2147483647 - - - submenuAction: - - Find - - YES - - - RmluZOKApg - f - 1048576 - 2147483647 - - - 1 - - - - Find Next - g - 1048576 - 2147483647 - - - 2 - - - - Find Previous - G - 1179648 - 2147483647 - - - 3 - - - - Use Selection for Find - e - 1048576 - 2147483647 - - - 7 - - - - Jump to Selection - j - 1048576 - 2147483647 - - - - - - - - - Spelling and Grammar - - 1048576 - 2147483647 - - - submenuAction: - - Spelling and Grammar - - YES - - - U2hvdyBTcGVsbGluZ+KApg - : - 1048576 - 2147483647 - - - - - - Check Spelling - ; - 1048576 - 2147483647 - - - - - - Check Spelling While Typing - - 1048576 - 2147483647 - - - - - - Check Grammar With Spelling - - 1048576 - 2147483647 - - - - - - - - - Substitutions - - 1048576 - 2147483647 - - - submenuAction: - - Substitutions - - YES - - - Smart Copy/Paste - f - 1048576 - 2147483647 - - - 1 - - - - Smart Quotes - g - 1048576 - 2147483647 - - - 2 - - - - Smart Links - G - 1179648 - 2147483647 - - - 3 - - - - - - - Speech - - 1048576 - 2147483647 - - - submenuAction: - - Speech - - YES - - - Start Speaking - - 1048576 - 2147483647 - - - - - - Stop Speaking - - 1048576 - 2147483647 - - - - - - - - - - - - Format - - 2147483647 - - - submenuAction: - - Format - - YES - - - Font - - 2147483647 - - - submenuAction: - - Font - - YES - - - Show Fonts - t - 1048576 - 2147483647 - - - - - - Bold - b - 1048576 - 2147483647 - - - 2 - - - - Italic - i - 1048576 - 2147483647 - - - 1 - - - - Underline - u - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Bigger - + - 1048576 - 2147483647 - - - 3 - - - - Smaller - - - 1048576 - 2147483647 - - - 4 - - - - YES - YES - - - 2147483647 - - - - - - Kern - - 2147483647 - - - submenuAction: - - Kern - - YES - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Tighten - - 2147483647 - - - - - - Loosen - - 2147483647 - - - - - - - - - Ligature - - 2147483647 - - - submenuAction: - - Ligature - - YES - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Use All - - 2147483647 - - - - - - - - - Baseline - - 2147483647 - - - submenuAction: - - Baseline - - YES - - - Use Default - - 2147483647 - - - - - - Superscript - - 2147483647 - - - - - - Subscript - - 2147483647 - - - - - - Raise - - 2147483647 - - - - - - Lower - - 2147483647 - - - - - - - - - YES - YES - - - 2147483647 - - - - - - Show Colors - C - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Copy Style - c - 1572864 - 2147483647 - - - - - - Paste Style - v - 1572864 - 2147483647 - - - - - _NSFontMenu - - - - - Text - - 2147483647 - - - submenuAction: - - Text - - YES - - - Align Left - { - 1048576 - 2147483647 - - - - - - Center - | - 1048576 - 2147483647 - - - - - - Justify - - 2147483647 - - - - - - Align Right - } - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Show Ruler - - 2147483647 - - - - - - Copy Ruler - c - 1310720 - 2147483647 - - - - - - Paste Ruler - v - 1310720 - 2147483647 - - - - - - - - - - - - View - - 1048576 - 2147483647 - - - submenuAction: - - View - - YES - - - Show Toolbar - t - 1572864 - 2147483647 - - - - - - Q3VzdG9taXplIFRvb2xiYXLigKY - - 1048576 - 2147483647 - - - - - - - - - Window - - 1048576 - 2147483647 - - - submenuAction: - - Window - - YES - - - Minimize - m - 1048576 - 2147483647 - - - - - - Zoom - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Bring All to Front - - 1048576 - 2147483647 - - - - - _NSWindowsMenu - - - - - Help - - 1048576 - 2147483647 - - - submenuAction: - - Help - - YES - - - NewApplication Help - ? - 1048576 - 2147483647 - - - - - - - - _NSMainMenu - - - 15 - 2 - {{335, 390}, {480, 360}} - 1946157056 - Window - NSWindow - - {3.40282e+38, 3.40282e+38} - - - 256 - {480, 360} - - - {{0, 0}, {1440, 878}} - {3.40282e+38, 3.40282e+38} - - - NSFontManager - - - AppDelegate - - - - - YES - - - performMiniaturize: - - - - 37 - - - - arrangeInFront: - - - - 39 - - - - print: - - - - 86 - - - - runPageLayout: - - - - 87 - - - - clearRecentDocuments: - - - - 127 - - - - orderFrontStandardAboutPanel: - - - - 142 - - - - performClose: - - - - 193 - - - - toggleContinuousSpellChecking: - - - - 222 - - - - undo: - - - - 223 - - - - copy: - - - - 224 - - - - checkSpelling: - - - - 225 - - - - paste: - - - - 226 - - - - stopSpeaking: - - - - 227 - - - - cut: - - - - 228 - - - - showGuessPanel: - - - - 230 - - - - redo: - - - - 231 - - - - selectAll: - - - - 232 - - - - startSpeaking: - - - - 233 - - - - delete: - - - - 235 - - - - performZoom: - - - - 240 - - - - performFindPanelAction: - - - - 241 - - - - centerSelectionInVisibleArea: - - - - 245 - - - - toggleGrammarChecking: - - - - 347 - - - - toggleSmartInsertDelete: - - - - 355 - - - - toggleAutomaticQuoteSubstitution: - - - - 356 - - - - toggleAutomaticLinkDetection: - - - - 357 - - - - showHelp: - - - - 360 - - - - saveDocument: - - - - 362 - - - - saveDocumentAs: - - - - 363 - - - - revertDocumentToSaved: - - - - 364 - - - - runToolbarCustomizationPalette: - - - - 365 - - - - toggleToolbarShown: - - - - 366 - - - - hide: - - - - 367 - - - - hideOtherApplications: - - - - 368 - - - - unhideAllApplications: - - - - 370 - - - - newDocument: - - - - 373 - - - - openDocument: - - - - 374 - - - - addFontTrait: - - - - 421 - - - - addFontTrait: - - - - 422 - - - - modifyFont: - - - - 423 - - - - orderFrontFontPanel: - - - - 424 - - - - modifyFont: - - - - 425 - - - - raiseBaseline: - - - - 426 - - - - lowerBaseline: - - - - 427 - - - - copyFont: - - - - 428 - - - - subscript: - - - - 429 - - - - superscript: - - - - 430 - - - - tightenKerning: - - - - 431 - - - - underline: - - - - 432 - - - - orderFrontColorPanel: - - - - 433 - - - - useAllLigatures: - - - - 434 - - - - loosenKerning: - - - - 435 - - - - pasteFont: - - - - 436 - - - - unscript: - - - - 437 - - - - useStandardKerning: - - - - 438 - - - - useStandardLigatures: - - - - 439 - - - - turnOffLigatures: - - - - 440 - - - - turnOffKerning: - - - - 441 - - - - alignLeft: - - - - 442 - - - - alignJustified: - - - - 443 - - - - copyRuler: - - - - 444 - - - - alignCenter: - - - - 445 - - - - toggleRuler: - - - - 446 - - - - alignRight: - - - - 447 - - - - pasteRuler: - - - - 448 - - - - terminate: - - - - 449 - - - - delegate - - - - 451 - - - - - YES - - 0 - - YES - - - - - - -2 - - - RmlsZSdzIE93bmVyA - - - -1 - - - First Responder - - - -3 - - - Application - - - 29 - - - YES - - - - - - - - - - MainMenu - - - 19 - - - YES - - - - - - 56 - - - YES - - - - - - 103 - - - YES - - - - 1 - - - 217 - - - YES - - - - - - 83 - - - YES - - - - - - 81 - - - YES - - - - - - - - - - - - - - - - 75 - - - 3 - - - 80 - - - 8 - - - 78 - - - 6 - - - 72 - - - - - 82 - - - 9 - - - 124 - - - YES - - - - - - 77 - - - 5 - - - 73 - - - 1 - - - 79 - - - 7 - - - 112 - - - 10 - - - 74 - - - 2 - - - 125 - - - YES - - - - - - 126 - - - - - 205 - - - YES - - - - - - - - - - - - - - - - - - 202 - - - - - 198 - - - - - 207 - - - - - 214 - - - - - 199 - - - - - 203 - - - - - 197 - - - - - 206 - - - - - 215 - - - - - 218 - - - YES - - - - - - 216 - - - YES - - - - - - 200 - - - YES - - - - - - - - - 219 - - - - - 201 - - - - - 204 - - - - - 220 - - - YES - - - - - - - - - - 213 - - - - - 210 - - - - - 221 - - - - - 208 - - - - - 209 - - - - - 106 - - - YES - - - - 2 - - - 111 - - - - - 57 - - - YES - - - - - - - - - - - - - - - - 58 - - - - - 134 - - - - - 150 - - - - - 136 - - - 1111 - - - 144 - - - - - 129 - - - 121 - - - 143 - - - - - 236 - - - - - 131 - - - YES - - - - - - 149 - - - - - 145 - - - - - 130 - - - - - 24 - - - YES - - - - - - - - - 92 - - - - - 5 - - - - - 239 - - - - - 23 - - - - - 295 - - - YES - - - - - - 296 - - - YES - - - - - - - 297 - - - - - 298 - - - - - 211 - - - YES - - - - - - 212 - - - YES - - - - - - - 195 - - - - - 196 - - - - - 346 - - - - - 348 - - - YES - - - - - - 349 - - - YES - - - - - - - - 350 - - - - - 351 - - - - - 354 - - - - - 371 - - - YES - - - - - - 372 - - - - - 375 - - - YES - - - - - - 376 - - - YES - - - - - - - 377 - - - YES - - - - - - 378 - - - YES - - - - - - 379 - - - YES - - - - - - - - - - - - - 380 - - - - - 381 - - - - - 382 - - - - - 383 - - - - - 384 - - - - - 385 - - - - - 386 - - - - - 387 - - - - - 388 - - - YES - - - - - - - - - - - - - - - - - - - - - 389 - - - - - 390 - - - - - 391 - - - - - 392 - - - - - 393 - - - - - 394 - - - - - 395 - - - - - 396 - - - - - 397 - - - YES - - - - - - 398 - - - YES - - - - - - 399 - - - YES - - - - - - 400 - - - - - 401 - - - - - 402 - - - - - 403 - - - - - 404 - - - - - 405 - - - YES - - - - - - - - - - 406 - - - - - 407 - - - - - 408 - - - - - 409 - - - - - 410 - - - - - 411 - - - YES - - - - - - - - 412 - - - - - 413 - - - - - 414 - - - - - 415 - - - YES - - - - - - - - - 416 - - - - - 417 - - - - - 418 - - - - - 419 - - - - - 420 - - - - - 450 - - - - - - - YES - - YES - -1.IBPluginDependency - -2.IBPluginDependency - -3.IBPluginDependency - 103.IBPluginDependency - 103.ImportedFromIB2 - 106.IBPluginDependency - 106.ImportedFromIB2 - 106.editorWindowContentRectSynchronizationRect - 111.IBPluginDependency - 111.ImportedFromIB2 - 112.IBPluginDependency - 112.ImportedFromIB2 - 124.IBPluginDependency - 124.ImportedFromIB2 - 125.IBPluginDependency - 125.ImportedFromIB2 - 125.editorWindowContentRectSynchronizationRect - 126.IBPluginDependency - 126.ImportedFromIB2 - 129.IBPluginDependency - 129.ImportedFromIB2 - 130.IBPluginDependency - 130.ImportedFromIB2 - 130.editorWindowContentRectSynchronizationRect - 131.IBPluginDependency - 131.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 - 136.IBPluginDependency - 136.ImportedFromIB2 - 143.IBPluginDependency - 143.ImportedFromIB2 - 144.IBPluginDependency - 144.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 - 19.IBPluginDependency - 19.ImportedFromIB2 - 195.IBPluginDependency - 195.ImportedFromIB2 - 196.IBPluginDependency - 196.ImportedFromIB2 - 197.IBPluginDependency - 197.ImportedFromIB2 - 198.IBPluginDependency - 198.ImportedFromIB2 - 199.IBPluginDependency - 199.ImportedFromIB2 - 200.IBPluginDependency - 200.ImportedFromIB2 - 200.editorWindowContentRectSynchronizationRect - 201.IBPluginDependency - 201.ImportedFromIB2 - 202.IBPluginDependency - 202.ImportedFromIB2 - 203.IBPluginDependency - 203.ImportedFromIB2 - 204.IBPluginDependency - 204.ImportedFromIB2 - 205.IBPluginDependency - 205.ImportedFromIB2 - 205.editorWindowContentRectSynchronizationRect - 206.IBPluginDependency - 206.ImportedFromIB2 - 207.IBPluginDependency - 207.ImportedFromIB2 - 208.IBPluginDependency - 208.ImportedFromIB2 - 209.IBPluginDependency - 209.ImportedFromIB2 - 210.IBPluginDependency - 210.ImportedFromIB2 - 211.IBPluginDependency - 211.ImportedFromIB2 - 212.IBPluginDependency - 212.ImportedFromIB2 - 212.editorWindowContentRectSynchronizationRect - 213.IBPluginDependency - 213.ImportedFromIB2 - 214.IBPluginDependency - 214.ImportedFromIB2 - 215.IBPluginDependency - 215.ImportedFromIB2 - 216.IBPluginDependency - 216.ImportedFromIB2 - 217.IBPluginDependency - 217.ImportedFromIB2 - 218.IBPluginDependency - 218.ImportedFromIB2 - 219.IBPluginDependency - 219.ImportedFromIB2 - 220.IBPluginDependency - 220.ImportedFromIB2 - 220.editorWindowContentRectSynchronizationRect - 221.IBPluginDependency - 221.ImportedFromIB2 - 23.IBPluginDependency - 23.ImportedFromIB2 - 236.IBPluginDependency - 236.ImportedFromIB2 - 239.IBPluginDependency - 239.ImportedFromIB2 - 24.IBPluginDependency - 24.ImportedFromIB2 - 24.editorWindowContentRectSynchronizationRect - 29.IBEditorWindowLastContentRect - 29.IBPluginDependency - 29.ImportedFromIB2 - 29.WindowOrigin - 29.editorWindowContentRectSynchronizationRect - 295.IBPluginDependency - 296.IBPluginDependency - 296.editorWindowContentRectSynchronizationRect - 297.IBPluginDependency - 298.IBPluginDependency - 346.IBPluginDependency - 346.ImportedFromIB2 - 348.IBPluginDependency - 348.ImportedFromIB2 - 349.IBPluginDependency - 349.ImportedFromIB2 - 349.editorWindowContentRectSynchronizationRect - 350.IBPluginDependency - 350.ImportedFromIB2 - 351.IBPluginDependency - 351.ImportedFromIB2 - 354.IBPluginDependency - 354.ImportedFromIB2 - 371.IBEditorWindowLastContentRect - 371.IBWindowTemplateEditedContentRect - 371.NSWindowTemplate.visibleAtLaunch - 371.editorWindowContentRectSynchronizationRect - 371.windowTemplate.maxSize - 372.IBPluginDependency - 375.IBPluginDependency - 376.IBEditorWindowLastContentRect - 376.IBPluginDependency - 377.IBPluginDependency - 378.IBPluginDependency - 379.IBPluginDependency - 380.IBPluginDependency - 381.IBPluginDependency - 382.IBPluginDependency - 383.IBPluginDependency - 384.IBPluginDependency - 385.IBPluginDependency - 386.IBPluginDependency - 387.IBPluginDependency - 388.IBEditorWindowLastContentRect - 388.IBPluginDependency - 389.IBPluginDependency - 390.IBPluginDependency - 391.IBPluginDependency - 392.IBPluginDependency - 393.IBPluginDependency - 394.IBPluginDependency - 395.IBPluginDependency - 396.IBPluginDependency - 397.IBPluginDependency - 398.IBPluginDependency - 399.IBPluginDependency - 400.IBPluginDependency - 401.IBPluginDependency - 402.IBPluginDependency - 403.IBPluginDependency - 404.IBPluginDependency - 405.IBPluginDependency - 406.IBPluginDependency - 407.IBPluginDependency - 408.IBPluginDependency - 409.IBPluginDependency - 410.IBPluginDependency - 411.IBPluginDependency - 412.IBPluginDependency - 413.IBPluginDependency - 414.IBPluginDependency - 415.IBPluginDependency - 416.IBPluginDependency - 417.IBPluginDependency - 418.IBPluginDependency - 419.IBPluginDependency - 420.IBPluginDependency - 450.IBPluginDependency - 5.IBPluginDependency - 5.ImportedFromIB2 - 56.IBPluginDependency - 56.ImportedFromIB2 - 57.IBEditorWindowLastContentRect - 57.IBPluginDependency - 57.ImportedFromIB2 - 57.editorWindowContentRectSynchronizationRect - 58.IBPluginDependency - 58.ImportedFromIB2 - 72.IBPluginDependency - 72.ImportedFromIB2 - 73.IBPluginDependency - 73.ImportedFromIB2 - 74.IBPluginDependency - 74.ImportedFromIB2 - 75.IBPluginDependency - 75.ImportedFromIB2 - 77.IBPluginDependency - 77.ImportedFromIB2 - 78.IBPluginDependency - 78.ImportedFromIB2 - 79.IBPluginDependency - 79.ImportedFromIB2 - 80.IBPluginDependency - 80.ImportedFromIB2 - 81.IBPluginDependency - 81.ImportedFromIB2 - 81.editorWindowContentRectSynchronizationRect - 82.IBPluginDependency - 82.ImportedFromIB2 - 83.IBPluginDependency - 83.ImportedFromIB2 - 92.IBPluginDependency - 92.ImportedFromIB2 - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilderKit - com.apple.InterfaceBuilderKit - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{596, 852}, {216, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{522, 812}, {146, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{436, 809}, {64, 6}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {275, 83}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{187, 434}, {243, 243}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {167, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {241, 103}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{525, 802}, {197, 73}} - {{52, 968}, {478, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - {74, 862} - {{6, 978}, {478, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{475, 832}, {234, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {215, 63}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{342, 475}, {480, 360}} - {{342, 475}, {480, 360}} - - {{33, 99}, {480, 360}} - {3.40282e+38, 3.40282e+38} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{437, 242}, {86, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{523, 2}, {178, 283}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{64, 785}, {245, 183}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{23, 794}, {245, 183}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{145, 474}, {199, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - YES - - YES - - - YES - - - - - YES - - YES - - - YES - - - - 451 - - - - YES - - NSObject - - IBProjectSource - AsyncSocket.h - - - - - 0 - ../SecureHTTPServer.xcodeproj - 3 - - diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/Info.plist b/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/Info.plist deleted file mode 100644 index 612b7da52f2b8..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/Instructions.txt b/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/Instructions.txt deleted file mode 100644 index 1774438d5853e..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/Instructions.txt +++ /dev/null @@ -1,29 +0,0 @@ -INFO: - -The SecureHTTPServer examples demonstrates creating a HTTPS server. - -In order to do this, all connections must be secured using SSL/TLS. -And in order to do that, you need to have a X509 certificate. -Normally you PAY MONEY for these. -For example, you purchase them via Verisign. -However, for our example we're going to create a self-signed certificate. - -This means that when you browse the server in Safari, it may present a warning saying the certificate is untrusted. (Which makes sense since you didn't pay money to a trusted 3rd party certificate agency.) To make things easier for testing, when Safari presents this warning, click the "show certificate" button. And then click the "always trust this certificate" button. - -Also, the first time you run the server, it will automatically create a self-signed certificate and add it to your keychain (under the name SecureHTTPServer). Now the SecureHTTPServer is authorized to access this keychain item - unless of course the binary changes. So if you make changes, or simply switch between debug/release builds, you'll keep getting prompted by the Keychain utility. To solve this problem, open the Keychain Access application. Find the "SecureHTTPServer" private key, and change it's Access Control to "Allow all applications to access this item". - -INSTRUCTIONS: - -Open the Xcode project, and build and go. - -On the Xcode console you'll see a message saying: -"Started HTTP server on port 59123" - -Now open your browser and type in the URL: -https://localhost:59123 - -Notice that you're using "https" and not "http". - -(Replace 59123 with whatever port the server is actually running on.) - -Enjoy. \ No newline at end of file diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/MyHTTPConnection.h b/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/MyHTTPConnection.h deleted file mode 100644 index b960f587c07ff..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/MyHTTPConnection.h +++ /dev/null @@ -1,10 +0,0 @@ -#import -#import "HTTPConnection.h" - - -@interface MyHTTPConnection : HTTPConnection -{ - -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/MyHTTPConnection.m b/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/MyHTTPConnection.m deleted file mode 100644 index 3e3bb94a90c13..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/MyHTTPConnection.m +++ /dev/null @@ -1,42 +0,0 @@ -#import "MyHTTPConnection.h" -#import "HTTPLogging.h" -#import "DDKeychain.h" - -// Log levels: off, error, warn, info, verbose -// Other flags: trace -static const int httpLogLevel = HTTP_LOG_LEVEL_WARN; // | HTTP_LOG_FLAG_TRACE; - - -@implementation MyHTTPConnection - -/** - * Overrides HTTPConnection's method -**/ -- (BOOL)isSecureServer -{ - HTTPLogTrace(); - - // Create an HTTPS server (all connections will be secured via SSL/TLS) - return YES; -} - -/** - * Overrides HTTPConnection's method - * - * This method is expected to returns an array appropriate for use in kCFStreamSSLCertificates SSL Settings. - * It should be an array of SecCertificateRefs except for the first element in the array, which is a SecIdentityRef. -**/ -- (NSArray *)sslIdentityAndCertificates -{ - HTTPLogTrace(); - - NSArray *result = [DDKeychain SSLIdentityAndCertificates]; - if([result count] == 0) - { - [DDKeychain createNewIdentity]; - return [DDKeychain SSLIdentityAndCertificates]; - } - return result; -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/SecureHTTPServer.xcodeproj/TemplateIcon.icns b/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/SecureHTTPServer.xcodeproj/TemplateIcon.icns deleted file mode 100644 index 62cb7015e09d6..0000000000000 Binary files a/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/SecureHTTPServer.xcodeproj/TemplateIcon.icns and /dev/null differ diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/SecureHTTPServer.xcodeproj/project.pbxproj b/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/SecureHTTPServer.xcodeproj/project.pbxproj deleted file mode 100644 index d18022f2e9fc3..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/SecureHTTPServer.xcodeproj/project.pbxproj +++ /dev/null @@ -1,464 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; }; - 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; - 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; - DC2E322D1299A395009F096E /* DDASLLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = DC2E32261299A395009F096E /* DDASLLogger.m */; }; - DC2E322E1299A395009F096E /* DDFileLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = DC2E32281299A395009F096E /* DDFileLogger.m */; }; - DC2E322F1299A395009F096E /* DDLog.m in Sources */ = {isa = PBXBuildFile; fileRef = DC2E322A1299A395009F096E /* DDLog.m */; }; - DC2E32301299A395009F096E /* DDTTYLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = DC2E322C1299A395009F096E /* DDTTYLogger.m */; }; - DC2E323E1299A3C1009F096E /* GCDAsyncSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = DC2E323D1299A3C1009F096E /* GCDAsyncSocket.m */; }; - DC372F9A139DC42C00A8407D /* DDData.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F7E139DC42C00A8407D /* DDData.m */; }; - DC372F9B139DC42C00A8407D /* DDNumber.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F80139DC42C00A8407D /* DDNumber.m */; }; - DC372F9C139DC42C00A8407D /* DDRange.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F82139DC42C00A8407D /* DDRange.m */; }; - DC372F9D139DC42C00A8407D /* HTTPAuthenticationRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F84139DC42C00A8407D /* HTTPAuthenticationRequest.m */; }; - DC372F9E139DC42C00A8407D /* HTTPConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F86139DC42C00A8407D /* HTTPConnection.m */; }; - DC372F9F139DC42C00A8407D /* HTTPMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F89139DC42C00A8407D /* HTTPMessage.m */; }; - DC372FA0139DC42C00A8407D /* HTTPServer.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F8C139DC42C00A8407D /* HTTPServer.m */; }; - DC372FA1139DC42C00A8407D /* HTTPAsyncFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F8F139DC42C00A8407D /* HTTPAsyncFileResponse.m */; }; - DC372FA2139DC42C00A8407D /* HTTPDataResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F91139DC42C00A8407D /* HTTPDataResponse.m */; }; - DC372FA3139DC42C00A8407D /* HTTPDynamicFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F93139DC42C00A8407D /* HTTPDynamicFileResponse.m */; }; - DC372FA4139DC42C00A8407D /* HTTPFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F95139DC42C00A8407D /* HTTPFileResponse.m */; }; - DC372FA5139DC42C00A8407D /* HTTPRedirectResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F97139DC42C00A8407D /* HTTPRedirectResponse.m */; }; - DC372FA6139DC42C00A8407D /* WebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372F99139DC42C00A8407D /* WebSocket.m */; }; - DC5BD69A0FC33F5900DA9B03 /* libcrypto.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = DC5BD6990FC33F5900DA9B03 /* libcrypto.dylib */; }; - DC5BD6C20FC3410300DA9B03 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DC5BD6C10FC3410300DA9B03 /* AppDelegate.m */; }; - DC5BD6DE0FC3418200DA9B03 /* MyHTTPConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = DC5BD6DD0FC3418200DA9B03 /* MyHTTPConnection.m */; }; - DC5BD70C0FC3443900DA9B03 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC5BD70B0FC3443900DA9B03 /* Security.framework */; }; - DCD065F9123C83C8006BC411 /* DDKeychain.m in Sources */ = {isa = PBXBuildFile; fileRef = DCD065F8123C83C8006BC411 /* DDKeychain.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; - 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; - 1DDD58150DA1D0A300B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; - 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; - 32CA4F630368D1EE00C91783 /* SecureHTTPServer_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SecureHTTPServer_Prefix.pch; sourceTree = ""; }; - 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 8D1107320486CEB800E47090 /* SecureHTTPServer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SecureHTTPServer.app; sourceTree = BUILT_PRODUCTS_DIR; }; - DC2E32251299A395009F096E /* DDASLLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDASLLogger.h; path = ../../Vendor/CocoaLumberjack/DDASLLogger.h; sourceTree = SOURCE_ROOT; }; - DC2E32261299A395009F096E /* DDASLLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDASLLogger.m; path = ../../Vendor/CocoaLumberjack/DDASLLogger.m; sourceTree = SOURCE_ROOT; }; - DC2E32271299A395009F096E /* DDFileLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDFileLogger.h; path = ../../Vendor/CocoaLumberjack/DDFileLogger.h; sourceTree = SOURCE_ROOT; }; - DC2E32281299A395009F096E /* DDFileLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDFileLogger.m; path = ../../Vendor/CocoaLumberjack/DDFileLogger.m; sourceTree = SOURCE_ROOT; }; - DC2E32291299A395009F096E /* DDLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDLog.h; path = ../../Vendor/CocoaLumberjack/DDLog.h; sourceTree = SOURCE_ROOT; }; - DC2E322A1299A395009F096E /* DDLog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDLog.m; path = ../../Vendor/CocoaLumberjack/DDLog.m; sourceTree = SOURCE_ROOT; }; - DC2E322B1299A395009F096E /* DDTTYLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDTTYLogger.h; path = ../../Vendor/CocoaLumberjack/DDTTYLogger.h; sourceTree = SOURCE_ROOT; }; - DC2E322C1299A395009F096E /* DDTTYLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDTTYLogger.m; path = ../../Vendor/CocoaLumberjack/DDTTYLogger.m; sourceTree = SOURCE_ROOT; }; - DC2E323C1299A3C1009F096E /* GCDAsyncSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GCDAsyncSocket.h; path = ../../Vendor/CocoaAsyncSocket/GCDAsyncSocket.h; sourceTree = SOURCE_ROOT; }; - DC2E323D1299A3C1009F096E /* GCDAsyncSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GCDAsyncSocket.m; path = ../../Vendor/CocoaAsyncSocket/GCDAsyncSocket.m; sourceTree = SOURCE_ROOT; }; - DC372E72139D4D4600A8407D /* Base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = ""; }; - DC372E73139D4D4600A8407D /* Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; - DC372E75139D4D4600A8407D /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; - DC372F7D139DC42C00A8407D /* DDData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDData.h; sourceTree = ""; }; - DC372F7E139DC42C00A8407D /* DDData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDData.m; sourceTree = ""; }; - DC372F7F139DC42C00A8407D /* DDNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDNumber.h; sourceTree = ""; }; - DC372F80139DC42C00A8407D /* DDNumber.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDNumber.m; sourceTree = ""; }; - DC372F81139DC42C00A8407D /* DDRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDRange.h; sourceTree = ""; }; - DC372F82139DC42C00A8407D /* DDRange.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDRange.m; sourceTree = ""; }; - DC372F83139DC42C00A8407D /* HTTPAuthenticationRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPAuthenticationRequest.h; path = ../../Core/HTTPAuthenticationRequest.h; sourceTree = ""; }; - DC372F84139DC42C00A8407D /* HTTPAuthenticationRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPAuthenticationRequest.m; path = ../../Core/HTTPAuthenticationRequest.m; sourceTree = ""; }; - DC372F85139DC42C00A8407D /* HTTPConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPConnection.h; path = ../../Core/HTTPConnection.h; sourceTree = ""; }; - DC372F86139DC42C00A8407D /* HTTPConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPConnection.m; path = ../../Core/HTTPConnection.m; sourceTree = ""; }; - DC372F87139DC42C00A8407D /* HTTPLogging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPLogging.h; path = ../../Core/HTTPLogging.h; sourceTree = ""; }; - DC372F88139DC42C00A8407D /* HTTPMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPMessage.h; path = ../../Core/HTTPMessage.h; sourceTree = ""; }; - DC372F89139DC42C00A8407D /* HTTPMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPMessage.m; path = ../../Core/HTTPMessage.m; sourceTree = ""; }; - DC372F8A139DC42C00A8407D /* HTTPResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPResponse.h; path = ../../Core/HTTPResponse.h; sourceTree = ""; }; - DC372F8B139DC42C00A8407D /* HTTPServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPServer.h; path = ../../Core/HTTPServer.h; sourceTree = ""; }; - DC372F8C139DC42C00A8407D /* HTTPServer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPServer.m; path = ../../Core/HTTPServer.m; sourceTree = ""; }; - DC372F8E139DC42C00A8407D /* HTTPAsyncFileResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPAsyncFileResponse.h; sourceTree = ""; }; - DC372F8F139DC42C00A8407D /* HTTPAsyncFileResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPAsyncFileResponse.m; sourceTree = ""; }; - DC372F90139DC42C00A8407D /* HTTPDataResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPDataResponse.h; sourceTree = ""; }; - DC372F91139DC42C00A8407D /* HTTPDataResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPDataResponse.m; sourceTree = ""; }; - DC372F92139DC42C00A8407D /* HTTPDynamicFileResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPDynamicFileResponse.h; sourceTree = ""; }; - DC372F93139DC42C00A8407D /* HTTPDynamicFileResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPDynamicFileResponse.m; sourceTree = ""; }; - DC372F94139DC42C00A8407D /* HTTPFileResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPFileResponse.h; sourceTree = ""; }; - DC372F95139DC42C00A8407D /* HTTPFileResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPFileResponse.m; sourceTree = ""; }; - DC372F96139DC42C00A8407D /* HTTPRedirectResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPRedirectResponse.h; sourceTree = ""; }; - DC372F97139DC42C00A8407D /* HTTPRedirectResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPRedirectResponse.m; sourceTree = ""; }; - DC372F98139DC42C00A8407D /* WebSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebSocket.h; path = ../../Core/WebSocket.h; sourceTree = ""; }; - DC372F99139DC42C00A8407D /* WebSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WebSocket.m; path = ../../Core/WebSocket.m; sourceTree = ""; }; - DC5BD6990FC33F5900DA9B03 /* libcrypto.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcrypto.dylib; path = /usr/lib/libcrypto.dylib; sourceTree = ""; }; - DC5BD6C00FC3410300DA9B03 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - DC5BD6C10FC3410300DA9B03 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - DC5BD6DC0FC3418200DA9B03 /* MyHTTPConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyHTTPConnection.h; sourceTree = ""; }; - DC5BD6DD0FC3418200DA9B03 /* MyHTTPConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyHTTPConnection.m; sourceTree = ""; }; - DC5BD70B0FC3443900DA9B03 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = /System/Library/Frameworks/Security.framework; sourceTree = ""; }; - DCD065F7123C83C8006BC411 /* DDKeychain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDKeychain.h; sourceTree = ""; }; - DCD065F8123C83C8006BC411 /* DDKeychain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDKeychain.m; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8D11072E0486CEB800E47090 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, - DC5BD69A0FC33F5900DA9B03 /* libcrypto.dylib in Frameworks */, - DC5BD70C0FC3443900DA9B03 /* Security.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Classes */ = { - isa = PBXGroup; - children = ( - DC5BD6C00FC3410300DA9B03 /* AppDelegate.h */, - DC5BD6C10FC3410300DA9B03 /* AppDelegate.m */, - DC5BD6DC0FC3418200DA9B03 /* MyHTTPConnection.h */, - DC5BD6DD0FC3418200DA9B03 /* MyHTTPConnection.m */, - ); - name = Classes; - sourceTree = ""; - }; - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { - isa = PBXGroup; - children = ( - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, - DC5BD70B0FC3443900DA9B03 /* Security.framework */, - DC5BD6990FC33F5900DA9B03 /* libcrypto.dylib */, - ); - name = "Linked Frameworks"; - sourceTree = ""; - }; - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - 29B97324FDCFA39411CA2CEA /* AppKit.framework */, - 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */, - 29B97325FDCFA39411CA2CEA /* Foundation.framework */, - ); - name = "Other Frameworks"; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 8D1107320486CEB800E47090 /* SecureHTTPServer.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* SecureHTTPServer */ = { - isa = PBXGroup; - children = ( - DC2E323B1299A399009F096E /* Logging */, - DC5BD6960FC33F0800DA9B03 /* TCP */, - DC5BD6970FC33F0D00DA9B03 /* HTTP */, - DC5BD6E70FC3433100DA9B03 /* Keychain */, - 080E96DDFE201D6D7F000001 /* Classes */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = SecureHTTPServer; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - DC372E71139D4D4600A8407D /* Xcode-Configurations */, - 32CA4F630368D1EE00C91783 /* SecureHTTPServer_Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.m */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - 8D1107310486CEB800E47090 /* Info.plist */, - 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, - 1DDD58140DA1D0A300B32029 /* MainMenu.xib */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, - ); - name = Frameworks; - sourceTree = ""; - }; - DC2E323B1299A399009F096E /* Logging */ = { - isa = PBXGroup; - children = ( - DC2E32291299A395009F096E /* DDLog.h */, - DC2E322A1299A395009F096E /* DDLog.m */, - DC2E322B1299A395009F096E /* DDTTYLogger.h */, - DC2E322C1299A395009F096E /* DDTTYLogger.m */, - DC2E32251299A395009F096E /* DDASLLogger.h */, - DC2E32261299A395009F096E /* DDASLLogger.m */, - DC2E32271299A395009F096E /* DDFileLogger.h */, - DC2E32281299A395009F096E /* DDFileLogger.m */, - ); - name = Logging; - sourceTree = ""; - }; - DC372E71139D4D4600A8407D /* Xcode-Configurations */ = { - isa = PBXGroup; - children = ( - DC372E72139D4D4600A8407D /* Base.xcconfig */, - DC372E73139D4D4600A8407D /* Debug.xcconfig */, - DC372E75139D4D4600A8407D /* Release.xcconfig */, - ); - name = "Xcode-Configurations"; - path = "../Xcode-Configurations"; - sourceTree = ""; - }; - DC372F7C139DC42C00A8407D /* Categories */ = { - isa = PBXGroup; - children = ( - DC372F7D139DC42C00A8407D /* DDData.h */, - DC372F7E139DC42C00A8407D /* DDData.m */, - DC372F7F139DC42C00A8407D /* DDNumber.h */, - DC372F80139DC42C00A8407D /* DDNumber.m */, - DC372F81139DC42C00A8407D /* DDRange.h */, - DC372F82139DC42C00A8407D /* DDRange.m */, - ); - name = Categories; - path = ../../Core/Categories; - sourceTree = ""; - }; - DC372F8D139DC42C00A8407D /* Responses */ = { - isa = PBXGroup; - children = ( - DC372F90139DC42C00A8407D /* HTTPDataResponse.h */, - DC372F91139DC42C00A8407D /* HTTPDataResponse.m */, - DC372F94139DC42C00A8407D /* HTTPFileResponse.h */, - DC372F95139DC42C00A8407D /* HTTPFileResponse.m */, - DC372F96139DC42C00A8407D /* HTTPRedirectResponse.h */, - DC372F97139DC42C00A8407D /* HTTPRedirectResponse.m */, - DC372F8E139DC42C00A8407D /* HTTPAsyncFileResponse.h */, - DC372F8F139DC42C00A8407D /* HTTPAsyncFileResponse.m */, - DC372F92139DC42C00A8407D /* HTTPDynamicFileResponse.h */, - DC372F93139DC42C00A8407D /* HTTPDynamicFileResponse.m */, - ); - name = Responses; - path = ../../Core/Responses; - sourceTree = ""; - }; - DC5BD6960FC33F0800DA9B03 /* TCP */ = { - isa = PBXGroup; - children = ( - DC2E323C1299A3C1009F096E /* GCDAsyncSocket.h */, - DC2E323D1299A3C1009F096E /* GCDAsyncSocket.m */, - ); - name = TCP; - sourceTree = ""; - }; - DC5BD6970FC33F0D00DA9B03 /* HTTP */ = { - isa = PBXGroup; - children = ( - DC372F83139DC42C00A8407D /* HTTPAuthenticationRequest.h */, - DC372F84139DC42C00A8407D /* HTTPAuthenticationRequest.m */, - DC372F85139DC42C00A8407D /* HTTPConnection.h */, - DC372F86139DC42C00A8407D /* HTTPConnection.m */, - DC372F87139DC42C00A8407D /* HTTPLogging.h */, - DC372F88139DC42C00A8407D /* HTTPMessage.h */, - DC372F89139DC42C00A8407D /* HTTPMessage.m */, - DC372F8A139DC42C00A8407D /* HTTPResponse.h */, - DC372F8B139DC42C00A8407D /* HTTPServer.h */, - DC372F8C139DC42C00A8407D /* HTTPServer.m */, - DC372F98139DC42C00A8407D /* WebSocket.h */, - DC372F99139DC42C00A8407D /* WebSocket.m */, - DC372F8D139DC42C00A8407D /* Responses */, - DC372F7C139DC42C00A8407D /* Categories */, - ); - name = HTTP; - sourceTree = ""; - }; - DC5BD6E70FC3433100DA9B03 /* Keychain */ = { - isa = PBXGroup; - children = ( - DCD065F7123C83C8006BC411 /* DDKeychain.h */, - DCD065F8123C83C8006BC411 /* DDKeychain.m */, - ); - name = Keychain; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 8D1107260486CEB800E47090 /* SecureHTTPServer */ = { - isa = PBXNativeTarget; - buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "SecureHTTPServer" */; - buildPhases = ( - 8D1107290486CEB800E47090 /* Resources */, - 8D11072C0486CEB800E47090 /* Sources */, - 8D11072E0486CEB800E47090 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SecureHTTPServer; - productInstallPath = "$(HOME)/Applications"; - productName = SecureHTTPServer; - productReference = 8D1107320486CEB800E47090 /* SecureHTTPServer.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SecureHTTPServer" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* SecureHTTPServer */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 8D1107260486CEB800E47090 /* SecureHTTPServer */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 8D1107290486CEB800E47090 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, - 1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 8D11072C0486CEB800E47090 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D11072D0486CEB800E47090 /* main.m in Sources */, - DC5BD6C20FC3410300DA9B03 /* AppDelegate.m in Sources */, - DC5BD6DE0FC3418200DA9B03 /* MyHTTPConnection.m in Sources */, - DCD065F9123C83C8006BC411 /* DDKeychain.m in Sources */, - DC2E322D1299A395009F096E /* DDASLLogger.m in Sources */, - DC2E322E1299A395009F096E /* DDFileLogger.m in Sources */, - DC2E322F1299A395009F096E /* DDLog.m in Sources */, - DC2E32301299A395009F096E /* DDTTYLogger.m in Sources */, - DC2E323E1299A3C1009F096E /* GCDAsyncSocket.m in Sources */, - DC372F9A139DC42C00A8407D /* DDData.m in Sources */, - DC372F9B139DC42C00A8407D /* DDNumber.m in Sources */, - DC372F9C139DC42C00A8407D /* DDRange.m in Sources */, - DC372F9D139DC42C00A8407D /* HTTPAuthenticationRequest.m in Sources */, - DC372F9E139DC42C00A8407D /* HTTPConnection.m in Sources */, - DC372F9F139DC42C00A8407D /* HTTPMessage.m in Sources */, - DC372FA0139DC42C00A8407D /* HTTPServer.m in Sources */, - DC372FA1139DC42C00A8407D /* HTTPAsyncFileResponse.m in Sources */, - DC372FA2139DC42C00A8407D /* HTTPDataResponse.m in Sources */, - DC372FA3139DC42C00A8407D /* HTTPDynamicFileResponse.m in Sources */, - DC372FA4139DC42C00A8407D /* HTTPFileResponse.m in Sources */, - DC372FA5139DC42C00A8407D /* HTTPRedirectResponse.m in Sources */, - DC372FA6139DC42C00A8407D /* WebSocket.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 089C165DFE840E0CC02AAC07 /* English */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - 1DDD58140DA1D0A300B32029 /* MainMenu.xib */ = { - isa = PBXVariantGroup; - children = ( - 1DDD58150DA1D0A300B32029 /* English */, - ); - name = MainMenu.xib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - C01FCF4B08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_PREFIX_HEADER = SecureHTTPServer_Prefix.pch; - INFOPLIST_FILE = Info.plist; - PRODUCT_NAME = SecureHTTPServer; - }; - name = Debug; - }; - C01FCF4C08A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PREFIX_HEADER = SecureHTTPServer_Prefix.pch; - INFOPLIST_FILE = Info.plist; - PRODUCT_NAME = SecureHTTPServer; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DC372E73139D4D4600A8407D /* Debug.xcconfig */; - buildSettings = { - SDKROOT = macosx10.6; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DC372E75139D4D4600A8407D /* Release.xcconfig */; - buildSettings = { - SDKROOT = macosx10.6; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "SecureHTTPServer" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4B08A954540054247B /* Debug */, - C01FCF4C08A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SecureHTTPServer" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/SecureHTTPServer.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/SecureHTTPServer.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index bfb631d91225c..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/SecureHTTPServer.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/SecureHTTPServer_Prefix.pch b/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/SecureHTTPServer_Prefix.pch deleted file mode 100644 index ea17c1bf2fe72..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/SecureHTTPServer_Prefix.pch +++ /dev/null @@ -1,7 +0,0 @@ -// -// Prefix header for all source files of the 'SecureHTTPServer' target in the 'SecureHTTPServer' project -// - -#ifdef __OBJC__ - #import -#endif diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/main.m b/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/main.m deleted file mode 100644 index 14b50a5f3d246..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureHTTPServer/main.m +++ /dev/null @@ -1,14 +0,0 @@ -// -// main.m -// SecureHTTPServer -// -// Created by Robbie Hanson on 5/19/09. -// Copyright Deusty Designs, LLC. 2009. All rights reserved. -// - -#import - -int main(int argc, char *argv[]) -{ - return NSApplicationMain(argc, (const char **) argv); -} diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/Instructions.txt b/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/Instructions.txt deleted file mode 100644 index 9512ed511135d..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/Instructions.txt +++ /dev/null @@ -1,38 +0,0 @@ -INFO: - -The SecureWebSocketServer examples demonstrates two technologies: -- Creating a HTTPS server -- WebSockets - -To create a secure HTTPS server, all connections must be secured using SSL/TLS. -And in order to do that, you need to have a X509 certificate. -Normally you PAY MONEY for these. -For example, you purchase them via Verisign. -However, for our example we're going to create a self-signed certificate. - -This means that when you browse the server in Safari, it may present a warning saying the certificate is untrusted. (Which makes sense since you didn't pay money to a trusted 3rd party certificate agency.) To make things easier for testing, when Safari presents this warning, click the "show certificate" button. And then click the "always trust this certificate" button. - -Also, the first time you run the server, it will automatically create a self-signed certificate and add it to your keychain (under the name SecureHTTPServer). Now the SecureHTTPServer is authorized to access this keychain item - unless of course the binary changes. So if you make changes, or simply switch between debug/release builds, you'll keep getting prompted by the Keychain utility. To solve this problem, open the Keychain Access application. Find the "SecureHTTPServer" private key, and change it's Access Control to "Allow all applications to access this item". - -The sample includes a Web folder which is added to the project, copied into the application's resources folder, and is set as the document root of the http server. It contains a simple index.html file and the client-side code (run in the web browser) for the websocket stuff. - -It is fairly straight-forward. It will query the server for the time every second, and present the result on the page. - -Take a look at the MyWebSocket class to see the related server code. - -INSTRUCTIONS: - -Open the Xcode project, and build and go. - -On the Xcode console you'll see a message saying: -"Started HTTP server on port 59123" - -Now open a browser that supports WebSockets (e.g. Google Chrome or Safari) -and type in the URL: -https://localhost:59123 - -Notice that you're using "https" and not "http". - -(Replace 59123 with whatever port the server is actually running on.) - -Enjoy. \ No newline at end of file diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer.xcodeproj/project.pbxproj b/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer.xcodeproj/project.pbxproj deleted file mode 100644 index 9ec5fe610ba76..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer.xcodeproj/project.pbxproj +++ /dev/null @@ -1,465 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - DC372DA8139969B600A8407D /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC372DA7139969B600A8407D /* Cocoa.framework */; }; - DC372DB2139969B600A8407D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = DC372DB0139969B600A8407D /* InfoPlist.strings */; }; - DC372DB5139969B600A8407D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372DB4139969B600A8407D /* main.m */; }; - DC372DB8139969B600A8407D /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = DC372DB6139969B600A8407D /* Credits.rtf */; }; - DC372DBB139969B600A8407D /* SecureWebSocketServerAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372DBA139969B600A8407D /* SecureWebSocketServerAppDelegate.m */; }; - DC372DBE139969B700A8407D /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = DC372DBC139969B700A8407D /* MainMenu.xib */; }; - DC372DD7139969FD00A8407D /* DDAbstractDatabaseLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372DCE139969FD00A8407D /* DDAbstractDatabaseLogger.m */; }; - DC372DD8139969FD00A8407D /* DDASLLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372DD0139969FD00A8407D /* DDASLLogger.m */; }; - DC372DD9139969FD00A8407D /* DDFileLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372DD2139969FD00A8407D /* DDFileLogger.m */; }; - DC372DDA139969FD00A8407D /* DDLog.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372DD4139969FD00A8407D /* DDLog.m */; }; - DC372DDB139969FD00A8407D /* DDTTYLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372DD6139969FD00A8407D /* DDTTYLogger.m */; }; - DC372DDF13996A1B00A8407D /* GCDAsyncSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372DDE13996A1B00A8407D /* GCDAsyncSocket.m */; }; - DC372E1013996D3400A8407D /* MyHTTPConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372E0D13996D3400A8407D /* MyHTTPConnection.m */; }; - DC372E1113996D3400A8407D /* MyWebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372E0F13996D3400A8407D /* MyWebSocket.m */; }; - DC372E14139990C800A8407D /* DDKeychain.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372E13139990C800A8407D /* DDKeychain.m */; }; - DC372E161399931000A8407D /* Web in Resources */ = {isa = PBXBuildFile; fileRef = DC372E151399931000A8407D /* Web */; }; - DC372E181399943C00A8407D /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC372E171399943C00A8407D /* Security.framework */; }; - DC372FCE139DC50F00A8407D /* DDData.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372FB2139DC50F00A8407D /* DDData.m */; }; - DC372FCF139DC50F00A8407D /* DDNumber.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372FB4139DC50F00A8407D /* DDNumber.m */; }; - DC372FD0139DC50F00A8407D /* DDRange.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372FB6139DC50F00A8407D /* DDRange.m */; }; - DC372FD1139DC50F00A8407D /* HTTPAuthenticationRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372FB8139DC50F00A8407D /* HTTPAuthenticationRequest.m */; }; - DC372FD2139DC50F00A8407D /* HTTPConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372FBA139DC50F00A8407D /* HTTPConnection.m */; }; - DC372FD3139DC50F00A8407D /* HTTPMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372FBD139DC50F00A8407D /* HTTPMessage.m */; }; - DC372FD4139DC50F00A8407D /* HTTPServer.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372FC0139DC50F00A8407D /* HTTPServer.m */; }; - DC372FD5139DC50F00A8407D /* HTTPAsyncFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372FC3139DC50F00A8407D /* HTTPAsyncFileResponse.m */; }; - DC372FD6139DC50F00A8407D /* HTTPDataResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372FC5139DC50F00A8407D /* HTTPDataResponse.m */; }; - DC372FD7139DC50F00A8407D /* HTTPDynamicFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372FC7139DC50F00A8407D /* HTTPDynamicFileResponse.m */; }; - DC372FD8139DC50F00A8407D /* HTTPFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372FC9139DC50F00A8407D /* HTTPFileResponse.m */; }; - DC372FD9139DC50F00A8407D /* HTTPRedirectResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372FCB139DC50F00A8407D /* HTTPRedirectResponse.m */; }; - DC372FDA139DC50F00A8407D /* WebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372FCD139DC50F00A8407D /* WebSocket.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - DC372DA3139969B600A8407D /* SecureWebSocketServer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SecureWebSocketServer.app; sourceTree = BUILT_PRODUCTS_DIR; }; - DC372DA7139969B600A8407D /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; - DC372DAA139969B600A8407D /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; - DC372DAB139969B600A8407D /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; - DC372DAC139969B600A8407D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - DC372DAF139969B600A8407D /* SecureWebSocketServer-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SecureWebSocketServer-Info.plist"; sourceTree = ""; }; - DC372DB1139969B600A8407D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - DC372DB3139969B600A8407D /* SecureWebSocketServer-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SecureWebSocketServer-Prefix.pch"; sourceTree = ""; }; - DC372DB4139969B600A8407D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - DC372DB7139969B600A8407D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; }; - DC372DB9139969B600A8407D /* SecureWebSocketServerAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SecureWebSocketServerAppDelegate.h; sourceTree = ""; }; - DC372DBA139969B600A8407D /* SecureWebSocketServerAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SecureWebSocketServerAppDelegate.m; sourceTree = ""; }; - DC372DBD139969B700A8407D /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = ""; }; - DC372DCD139969FD00A8407D /* DDAbstractDatabaseLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDAbstractDatabaseLogger.h; path = ../../Vendor/CocoaLumberjack/DDAbstractDatabaseLogger.h; sourceTree = ""; }; - DC372DCE139969FD00A8407D /* DDAbstractDatabaseLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDAbstractDatabaseLogger.m; path = ../../Vendor/CocoaLumberjack/DDAbstractDatabaseLogger.m; sourceTree = ""; }; - DC372DCF139969FD00A8407D /* DDASLLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDASLLogger.h; path = ../../Vendor/CocoaLumberjack/DDASLLogger.h; sourceTree = ""; }; - DC372DD0139969FD00A8407D /* DDASLLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDASLLogger.m; path = ../../Vendor/CocoaLumberjack/DDASLLogger.m; sourceTree = ""; }; - DC372DD1139969FD00A8407D /* DDFileLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDFileLogger.h; path = ../../Vendor/CocoaLumberjack/DDFileLogger.h; sourceTree = ""; }; - DC372DD2139969FD00A8407D /* DDFileLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDFileLogger.m; path = ../../Vendor/CocoaLumberjack/DDFileLogger.m; sourceTree = ""; }; - DC372DD3139969FD00A8407D /* DDLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDLog.h; path = ../../Vendor/CocoaLumberjack/DDLog.h; sourceTree = ""; }; - DC372DD4139969FD00A8407D /* DDLog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDLog.m; path = ../../Vendor/CocoaLumberjack/DDLog.m; sourceTree = ""; }; - DC372DD5139969FD00A8407D /* DDTTYLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDTTYLogger.h; path = ../../Vendor/CocoaLumberjack/DDTTYLogger.h; sourceTree = ""; }; - DC372DD6139969FD00A8407D /* DDTTYLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDTTYLogger.m; path = ../../Vendor/CocoaLumberjack/DDTTYLogger.m; sourceTree = ""; }; - DC372DDD13996A1B00A8407D /* GCDAsyncSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GCDAsyncSocket.h; path = ../../Vendor/CocoaAsyncSocket/GCDAsyncSocket.h; sourceTree = ""; }; - DC372DDE13996A1B00A8407D /* GCDAsyncSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GCDAsyncSocket.m; path = ../../Vendor/CocoaAsyncSocket/GCDAsyncSocket.m; sourceTree = ""; }; - DC372E0C13996D3400A8407D /* MyHTTPConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyHTTPConnection.h; sourceTree = ""; }; - DC372E0D13996D3400A8407D /* MyHTTPConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyHTTPConnection.m; sourceTree = ""; }; - DC372E0E13996D3400A8407D /* MyWebSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyWebSocket.h; sourceTree = ""; }; - DC372E0F13996D3400A8407D /* MyWebSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyWebSocket.m; sourceTree = ""; }; - DC372E12139990C800A8407D /* DDKeychain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDKeychain.h; sourceTree = ""; }; - DC372E13139990C800A8407D /* DDKeychain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDKeychain.m; sourceTree = ""; }; - DC372E151399931000A8407D /* Web */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Web; sourceTree = ""; }; - DC372E171399943C00A8407D /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; - DC372E80139D50DA00A8407D /* Base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = ""; }; - DC372E81139D50DA00A8407D /* Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; - DC372E83139D50DA00A8407D /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; - DC372FB1139DC50F00A8407D /* DDData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDData.h; sourceTree = ""; }; - DC372FB2139DC50F00A8407D /* DDData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDData.m; sourceTree = ""; }; - DC372FB3139DC50F00A8407D /* DDNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDNumber.h; sourceTree = ""; }; - DC372FB4139DC50F00A8407D /* DDNumber.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDNumber.m; sourceTree = ""; }; - DC372FB5139DC50F00A8407D /* DDRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDRange.h; sourceTree = ""; }; - DC372FB6139DC50F00A8407D /* DDRange.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDRange.m; sourceTree = ""; }; - DC372FB7139DC50F00A8407D /* HTTPAuthenticationRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPAuthenticationRequest.h; path = ../../Core/HTTPAuthenticationRequest.h; sourceTree = ""; }; - DC372FB8139DC50F00A8407D /* HTTPAuthenticationRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPAuthenticationRequest.m; path = ../../Core/HTTPAuthenticationRequest.m; sourceTree = ""; }; - DC372FB9139DC50F00A8407D /* HTTPConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPConnection.h; path = ../../Core/HTTPConnection.h; sourceTree = ""; }; - DC372FBA139DC50F00A8407D /* HTTPConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPConnection.m; path = ../../Core/HTTPConnection.m; sourceTree = ""; }; - DC372FBB139DC50F00A8407D /* HTTPLogging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPLogging.h; path = ../../Core/HTTPLogging.h; sourceTree = ""; }; - DC372FBC139DC50F00A8407D /* HTTPMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPMessage.h; path = ../../Core/HTTPMessage.h; sourceTree = ""; }; - DC372FBD139DC50F00A8407D /* HTTPMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPMessage.m; path = ../../Core/HTTPMessage.m; sourceTree = ""; }; - DC372FBE139DC50F00A8407D /* HTTPResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPResponse.h; path = ../../Core/HTTPResponse.h; sourceTree = ""; }; - DC372FBF139DC50F00A8407D /* HTTPServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPServer.h; path = ../../Core/HTTPServer.h; sourceTree = ""; }; - DC372FC0139DC50F00A8407D /* HTTPServer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPServer.m; path = ../../Core/HTTPServer.m; sourceTree = ""; }; - DC372FC2139DC50F00A8407D /* HTTPAsyncFileResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPAsyncFileResponse.h; sourceTree = ""; }; - DC372FC3139DC50F00A8407D /* HTTPAsyncFileResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPAsyncFileResponse.m; sourceTree = ""; }; - DC372FC4139DC50F00A8407D /* HTTPDataResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPDataResponse.h; sourceTree = ""; }; - DC372FC5139DC50F00A8407D /* HTTPDataResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPDataResponse.m; sourceTree = ""; }; - DC372FC6139DC50F00A8407D /* HTTPDynamicFileResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPDynamicFileResponse.h; sourceTree = ""; }; - DC372FC7139DC50F00A8407D /* HTTPDynamicFileResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPDynamicFileResponse.m; sourceTree = ""; }; - DC372FC8139DC50F00A8407D /* HTTPFileResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPFileResponse.h; sourceTree = ""; }; - DC372FC9139DC50F00A8407D /* HTTPFileResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPFileResponse.m; sourceTree = ""; }; - DC372FCA139DC50F00A8407D /* HTTPRedirectResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPRedirectResponse.h; sourceTree = ""; }; - DC372FCB139DC50F00A8407D /* HTTPRedirectResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPRedirectResponse.m; sourceTree = ""; }; - DC372FCC139DC50F00A8407D /* WebSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebSocket.h; path = ../../Core/WebSocket.h; sourceTree = ""; }; - DC372FCD139DC50F00A8407D /* WebSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WebSocket.m; path = ../../Core/WebSocket.m; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - DC372DA0139969B600A8407D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - DC372E181399943C00A8407D /* Security.framework in Frameworks */, - DC372DA8139969B600A8407D /* Cocoa.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - DC372D98139969B600A8407D = { - isa = PBXGroup; - children = ( - DC372E171399943C00A8407D /* Security.framework */, - DC372DC4139969C000A8407D /* Logging */, - DC372DDC13996A0A00A8407D /* TCP */, - DC372DE013996A2B00A8407D /* HTTP */, - DC372DAD139969B600A8407D /* SecureWebSocketServer */, - DC372DA6139969B600A8407D /* Frameworks */, - DC372DA4139969B600A8407D /* Products */, - ); - sourceTree = ""; - }; - DC372DA4139969B600A8407D /* Products */ = { - isa = PBXGroup; - children = ( - DC372DA3139969B600A8407D /* SecureWebSocketServer.app */, - ); - name = Products; - sourceTree = ""; - }; - DC372DA6139969B600A8407D /* Frameworks */ = { - isa = PBXGroup; - children = ( - DC372DA7139969B600A8407D /* Cocoa.framework */, - DC372DA9139969B600A8407D /* Other Frameworks */, - ); - name = Frameworks; - sourceTree = ""; - }; - DC372DA9139969B600A8407D /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - DC372DAA139969B600A8407D /* AppKit.framework */, - DC372DAB139969B600A8407D /* CoreData.framework */, - DC372DAC139969B600A8407D /* Foundation.framework */, - ); - name = "Other Frameworks"; - sourceTree = ""; - }; - DC372DAD139969B600A8407D /* SecureWebSocketServer */ = { - isa = PBXGroup; - children = ( - DC372DB9139969B600A8407D /* SecureWebSocketServerAppDelegate.h */, - DC372DBA139969B600A8407D /* SecureWebSocketServerAppDelegate.m */, - DC372E0C13996D3400A8407D /* MyHTTPConnection.h */, - DC372E0D13996D3400A8407D /* MyHTTPConnection.m */, - DC372E0E13996D3400A8407D /* MyWebSocket.h */, - DC372E0F13996D3400A8407D /* MyWebSocket.m */, - DC372E12139990C800A8407D /* DDKeychain.h */, - DC372E13139990C800A8407D /* DDKeychain.m */, - DC372DBC139969B700A8407D /* MainMenu.xib */, - DC372E151399931000A8407D /* Web */, - DC372DAE139969B600A8407D /* Supporting Files */, - ); - path = SecureWebSocketServer; - sourceTree = ""; - }; - DC372DAE139969B600A8407D /* Supporting Files */ = { - isa = PBXGroup; - children = ( - DC372E7F139D50DA00A8407D /* Xcode-Configurations */, - DC372DAF139969B600A8407D /* SecureWebSocketServer-Info.plist */, - DC372DB0139969B600A8407D /* InfoPlist.strings */, - DC372DB3139969B600A8407D /* SecureWebSocketServer-Prefix.pch */, - DC372DB4139969B600A8407D /* main.m */, - DC372DB6139969B600A8407D /* Credits.rtf */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - DC372DC4139969C000A8407D /* Logging */ = { - isa = PBXGroup; - children = ( - DC372DD3139969FD00A8407D /* DDLog.h */, - DC372DD4139969FD00A8407D /* DDLog.m */, - DC372DD5139969FD00A8407D /* DDTTYLogger.h */, - DC372DD6139969FD00A8407D /* DDTTYLogger.m */, - DC372DCF139969FD00A8407D /* DDASLLogger.h */, - DC372DD0139969FD00A8407D /* DDASLLogger.m */, - DC372DD1139969FD00A8407D /* DDFileLogger.h */, - DC372DD2139969FD00A8407D /* DDFileLogger.m */, - DC372DCD139969FD00A8407D /* DDAbstractDatabaseLogger.h */, - DC372DCE139969FD00A8407D /* DDAbstractDatabaseLogger.m */, - ); - name = Logging; - sourceTree = ""; - }; - DC372DDC13996A0A00A8407D /* TCP */ = { - isa = PBXGroup; - children = ( - DC372DDD13996A1B00A8407D /* GCDAsyncSocket.h */, - DC372DDE13996A1B00A8407D /* GCDAsyncSocket.m */, - ); - name = TCP; - sourceTree = ""; - }; - DC372DE013996A2B00A8407D /* HTTP */ = { - isa = PBXGroup; - children = ( - DC372FBB139DC50F00A8407D /* HTTPLogging.h */, - DC372FB7139DC50F00A8407D /* HTTPAuthenticationRequest.h */, - DC372FB8139DC50F00A8407D /* HTTPAuthenticationRequest.m */, - DC372FBF139DC50F00A8407D /* HTTPServer.h */, - DC372FC0139DC50F00A8407D /* HTTPServer.m */, - DC372FB9139DC50F00A8407D /* HTTPConnection.h */, - DC372FBA139DC50F00A8407D /* HTTPConnection.m */, - DC372FBC139DC50F00A8407D /* HTTPMessage.h */, - DC372FBD139DC50F00A8407D /* HTTPMessage.m */, - DC372FBE139DC50F00A8407D /* HTTPResponse.h */, - DC372FCC139DC50F00A8407D /* WebSocket.h */, - DC372FCD139DC50F00A8407D /* WebSocket.m */, - DC372FC1139DC50F00A8407D /* Responses */, - DC372FB0139DC50F00A8407D /* Categories */, - ); - name = HTTP; - sourceTree = ""; - }; - DC372E7F139D50DA00A8407D /* Xcode-Configurations */ = { - isa = PBXGroup; - children = ( - DC372E80139D50DA00A8407D /* Base.xcconfig */, - DC372E81139D50DA00A8407D /* Debug.xcconfig */, - DC372E83139D50DA00A8407D /* Release.xcconfig */, - ); - name = "Xcode-Configurations"; - path = "../../Xcode-Configurations"; - sourceTree = ""; - }; - DC372FB0139DC50F00A8407D /* Categories */ = { - isa = PBXGroup; - children = ( - DC372FB1139DC50F00A8407D /* DDData.h */, - DC372FB2139DC50F00A8407D /* DDData.m */, - DC372FB3139DC50F00A8407D /* DDNumber.h */, - DC372FB4139DC50F00A8407D /* DDNumber.m */, - DC372FB5139DC50F00A8407D /* DDRange.h */, - DC372FB6139DC50F00A8407D /* DDRange.m */, - ); - name = Categories; - path = ../../Core/Categories; - sourceTree = ""; - }; - DC372FC1139DC50F00A8407D /* Responses */ = { - isa = PBXGroup; - children = ( - DC372FC4139DC50F00A8407D /* HTTPDataResponse.h */, - DC372FC5139DC50F00A8407D /* HTTPDataResponse.m */, - DC372FC8139DC50F00A8407D /* HTTPFileResponse.h */, - DC372FC9139DC50F00A8407D /* HTTPFileResponse.m */, - DC372FCA139DC50F00A8407D /* HTTPRedirectResponse.h */, - DC372FCB139DC50F00A8407D /* HTTPRedirectResponse.m */, - DC372FC2139DC50F00A8407D /* HTTPAsyncFileResponse.h */, - DC372FC3139DC50F00A8407D /* HTTPAsyncFileResponse.m */, - DC372FC6139DC50F00A8407D /* HTTPDynamicFileResponse.h */, - DC372FC7139DC50F00A8407D /* HTTPDynamicFileResponse.m */, - ); - name = Responses; - path = ../../Core/Responses; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - DC372DA2139969B600A8407D /* SecureWebSocketServer */ = { - isa = PBXNativeTarget; - buildConfigurationList = DC372DC1139969B700A8407D /* Build configuration list for PBXNativeTarget "SecureWebSocketServer" */; - buildPhases = ( - DC372D9F139969B600A8407D /* Sources */, - DC372DA0139969B600A8407D /* Frameworks */, - DC372DA1139969B600A8407D /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SecureWebSocketServer; - productName = SecureWebSocketServer; - productReference = DC372DA3139969B600A8407D /* SecureWebSocketServer.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - DC372D9A139969B600A8407D /* Project object */ = { - isa = PBXProject; - attributes = { - ORGANIZATIONNAME = Voalte; - }; - buildConfigurationList = DC372D9D139969B600A8407D /* Build configuration list for PBXProject "SecureWebSocketServer" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = DC372D98139969B600A8407D; - productRefGroup = DC372DA4139969B600A8407D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - DC372DA2139969B600A8407D /* SecureWebSocketServer */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - DC372DA1139969B600A8407D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - DC372DB2139969B600A8407D /* InfoPlist.strings in Resources */, - DC372DB8139969B600A8407D /* Credits.rtf in Resources */, - DC372DBE139969B700A8407D /* MainMenu.xib in Resources */, - DC372E161399931000A8407D /* Web in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - DC372D9F139969B600A8407D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - DC372DB5139969B600A8407D /* main.m in Sources */, - DC372DBB139969B600A8407D /* SecureWebSocketServerAppDelegate.m in Sources */, - DC372DD7139969FD00A8407D /* DDAbstractDatabaseLogger.m in Sources */, - DC372DD8139969FD00A8407D /* DDASLLogger.m in Sources */, - DC372DD9139969FD00A8407D /* DDFileLogger.m in Sources */, - DC372DDA139969FD00A8407D /* DDLog.m in Sources */, - DC372DDB139969FD00A8407D /* DDTTYLogger.m in Sources */, - DC372DDF13996A1B00A8407D /* GCDAsyncSocket.m in Sources */, - DC372E1013996D3400A8407D /* MyHTTPConnection.m in Sources */, - DC372E1113996D3400A8407D /* MyWebSocket.m in Sources */, - DC372E14139990C800A8407D /* DDKeychain.m in Sources */, - DC372FCE139DC50F00A8407D /* DDData.m in Sources */, - DC372FCF139DC50F00A8407D /* DDNumber.m in Sources */, - DC372FD0139DC50F00A8407D /* DDRange.m in Sources */, - DC372FD1139DC50F00A8407D /* HTTPAuthenticationRequest.m in Sources */, - DC372FD2139DC50F00A8407D /* HTTPConnection.m in Sources */, - DC372FD3139DC50F00A8407D /* HTTPMessage.m in Sources */, - DC372FD4139DC50F00A8407D /* HTTPServer.m in Sources */, - DC372FD5139DC50F00A8407D /* HTTPAsyncFileResponse.m in Sources */, - DC372FD6139DC50F00A8407D /* HTTPDataResponse.m in Sources */, - DC372FD7139DC50F00A8407D /* HTTPDynamicFileResponse.m in Sources */, - DC372FD8139DC50F00A8407D /* HTTPFileResponse.m in Sources */, - DC372FD9139DC50F00A8407D /* HTTPRedirectResponse.m in Sources */, - DC372FDA139DC50F00A8407D /* WebSocket.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - DC372DB0139969B600A8407D /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - DC372DB1139969B600A8407D /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - DC372DB6139969B600A8407D /* Credits.rtf */ = { - isa = PBXVariantGroup; - children = ( - DC372DB7139969B600A8407D /* en */, - ); - name = Credits.rtf; - sourceTree = ""; - }; - DC372DBC139969B700A8407D /* MainMenu.xib */ = { - isa = PBXVariantGroup; - children = ( - DC372DBD139969B700A8407D /* en */, - ); - name = MainMenu.xib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - DC372DBF139969B700A8407D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DC372E81139D50DA00A8407D /* Debug.xcconfig */; - buildSettings = { - SDKROOT = macosx; - }; - name = Debug; - }; - DC372DC0139969B700A8407D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DC372E83139D50DA00A8407D /* Release.xcconfig */; - buildSettings = { - SDKROOT = macosx; - }; - name = Release; - }; - DC372DC2139969B700A8407D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_DYNAMIC_NO_PIC = NO; - GCC_PREFIX_HEADER = "SecureWebSocketServer/SecureWebSocketServer-Prefix.pch"; - INFOPLIST_FILE = "SecureWebSocketServer/SecureWebSocketServer-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - DC372DC3139969B700A8407D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PREFIX_HEADER = "SecureWebSocketServer/SecureWebSocketServer-Prefix.pch"; - INFOPLIST_FILE = "SecureWebSocketServer/SecureWebSocketServer-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - DC372D9D139969B600A8407D /* Build configuration list for PBXProject "SecureWebSocketServer" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DC372DBF139969B700A8407D /* Debug */, - DC372DC0139969B700A8407D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - DC372DC1139969B700A8407D /* Build configuration list for PBXNativeTarget "SecureWebSocketServer" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DC372DC2139969B700A8407D /* Debug */, - DC372DC3139969B700A8407D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = DC372D9A139969B600A8407D /* Project object */; -} diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 6d5b8c10284ce..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/DDKeychain.h b/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/DDKeychain.h deleted file mode 100644 index 85c8ccd7027c1..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/DDKeychain.h +++ /dev/null @@ -1,20 +0,0 @@ -#import -#import - -@interface DDKeychain : NSObject -{ - -} - -+ (NSString *)passwordForHTTPServer; -+ (BOOL)setPasswordForHTTPServer:(NSString *)password; - -+ (void)createNewIdentity; -+ (NSArray *)SSLIdentityAndCertificates; - -+ (NSString *)applicationTemporaryDirectory; -+ (NSString *)stringForSecExternalFormat:(SecExternalFormat)extFormat; -+ (NSString *)stringForSecExternalItemType:(SecExternalItemType)itemType; -+ (NSString *)stringForSecKeychainAttrType:(SecKeychainAttrType)attrType; - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/DDKeychain.m b/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/DDKeychain.m deleted file mode 100644 index b6013798182a4..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/DDKeychain.m +++ /dev/null @@ -1,603 +0,0 @@ -#import "DDKeychain.h" - - -@implementation DDKeychain - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Server: -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * Retrieves the password stored in the keychain for the HTTP server. -**/ -+ (NSString *)passwordForHTTPServer -{ - NSString *password = nil; - - const char *service = [@"HTTP Server" UTF8String]; - const char *account = [@"Deusty" UTF8String]; - - UInt32 passwordLength = 0; - void *passwordBytes = nil; - - OSStatus status; - status = SecKeychainFindGenericPassword(NULL, // default keychain - (UInt32)strlen(service), // length of service name - service, // service name - (UInt32)strlen(account), // length of account name - account, // account name - &passwordLength, // length of password - &passwordBytes, // pointer to password data - NULL); // keychain item reference (NULL if unneeded) - - if(status == noErr) - { - NSData *passwordData = [NSData dataWithBytesNoCopy:passwordBytes length:passwordLength freeWhenDone:NO]; - password = [[[NSString alloc] initWithData:passwordData encoding:NSUTF8StringEncoding] autorelease]; - } - - // SecKeychainItemFreeContent(attrList, data) - // attrList - previously returned attributes - // data - previously returned password - - if(passwordBytes) SecKeychainItemFreeContent(NULL, passwordBytes); - - return password; -} - - -/** - * This method sets the password for the HTTP server. -**/ -+ (BOOL)setPasswordForHTTPServer:(NSString *)password -{ - const char *service = [@"HTTP Server" UTF8String]; - const char *account = [@"Deusty" UTF8String]; - const char *kind = [@"Deusty password" UTF8String]; - const char *passwd = [password UTF8String]; - - SecKeychainItemRef itemRef = NULL; - - // The first thing we need to do is check to see a password for the library already exists in the keychain - OSStatus status; - status = SecKeychainFindGenericPassword(NULL, // default keychain - (UInt32)strlen(service), // length of service name - service, // service name - (UInt32)strlen(account), // length of account name - account, // account name - NULL, // length of password (NULL if unneeded) - NULL, // pointer to password data (NULL if unneeded) - &itemRef); // the keychain item reference - - if(status == errSecItemNotFound) - { - // Setup the attributes the for the keychain item - SecKeychainAttribute attrs[] = { - { kSecServiceItemAttr, (UInt32)strlen(service), (char *)service }, - { kSecAccountItemAttr, (UInt32)strlen(account), (char *)account }, - { kSecDescriptionItemAttr, (UInt32)strlen(kind), (char *)kind } - }; - SecKeychainAttributeList attributes = { sizeof(attrs) / sizeof(attrs[0]), attrs }; - - status = SecKeychainItemCreateFromContent(kSecGenericPasswordItemClass, // class of item to create - &attributes, // pointer to the list of attributes - (UInt32)strlen(passwd), // length of password - passwd, // pointer to password data - NULL, // default keychain - NULL, // access list (NULL if this app only) - &itemRef); // the keychain item reference - } - else if(status == noErr) - { - // A keychain item for the library already exists - // All we need to do is update it with the new password - status = SecKeychainItemModifyAttributesAndData(itemRef, // the keychain item reference - NULL, // no change to attributes - (UInt32)strlen(passwd), // length of password - passwd); // pointer to password data - } - - // Don't forget to release anything we create - if(itemRef) CFRelease(itemRef); - - return (status == noErr); -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Identity: -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * This method creates a new identity, and adds it to the keychain. - * An identity is simply a certificate (public key and public information) along with a matching private key. - * This method generates a new private key, and then uses the private key to generate a new self-signed certificate. -**/ -+ (void)createNewIdentity -{ - // Declare any Carbon variables we may create - // We do this here so it's easier to compare to the bottom of this method where we release them all - SecKeychainRef keychain = NULL; - CFArrayRef outItems = NULL; - - // Configure the paths where we'll create all of our identity files - NSString *basePath = [DDKeychain applicationTemporaryDirectory]; - - NSString *privateKeyPath = [basePath stringByAppendingPathComponent:@"private.pem"]; - NSString *reqConfPath = [basePath stringByAppendingPathComponent:@"req.conf"]; - NSString *certificatePath = [basePath stringByAppendingPathComponent:@"certificate.crt"]; - NSString *certWrapperPath = [basePath stringByAppendingPathComponent:@"certificate.p12"]; - - // You can generate your own private key by running the following command in the terminal: - // openssl genrsa -out private.pem 1024 - // - // Where 1024 is the size of the private key. - // You may used a bigger number. - // It is probably a good recommendation to use at least 1024... - - NSArray *privateKeyArgs = [NSArray arrayWithObjects:@"genrsa", @"-out", privateKeyPath, @"1024", nil]; - - NSTask *genPrivateKeyTask = [[[NSTask alloc] init] autorelease]; - - [genPrivateKeyTask setLaunchPath:@"/usr/bin/openssl"]; - [genPrivateKeyTask setArguments:privateKeyArgs]; - [genPrivateKeyTask launch]; - - // Don't use waitUntilExit - I've had too many problems with it in the past - do { - [NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.05]]; - } while([genPrivateKeyTask isRunning]); - - // Now we want to create a configuration file for our certificate - // This is an optional step, but we do it so people who are browsing their keychain - // know exactly where the certificate came from, and don't delete it. - - NSMutableString *mStr = [NSMutableString stringWithCapacity:500]; - [mStr appendFormat:@"%@\n", @"[ req ]"]; - [mStr appendFormat:@"%@\n", @"distinguished_name = req_distinguished_name"]; - [mStr appendFormat:@"%@\n", @"prompt = no"]; - [mStr appendFormat:@"%@\n", @""]; - [mStr appendFormat:@"%@\n", @"[ req_distinguished_name ]"]; - [mStr appendFormat:@"%@\n", @"C = US"]; - [mStr appendFormat:@"%@\n", @"ST = Missouri"]; - [mStr appendFormat:@"%@\n", @"L = Springfield"]; - [mStr appendFormat:@"%@\n", @"O = Deusty Designs, LLC"]; - [mStr appendFormat:@"%@\n", @"OU = Open Source"]; - [mStr appendFormat:@"%@\n", @"CN = SecureHTTPServer"]; - [mStr appendFormat:@"%@\n", @"emailAddress = robbiehanson@deusty.com"]; - - [mStr writeToFile:reqConfPath atomically:NO encoding:NSUTF8StringEncoding error:nil]; - - // You can generate your own certificate by running the following command in the terminal: - // openssl req -new -x509 -key private.pem -out certificate.crt -text -days 365 -batch - // - // You can optionally create a configuration file, and pass an extra command to use it: - // -config req.conf - - NSArray *certificateArgs = [NSArray arrayWithObjects:@"req", @"-new", @"-x509", - @"-key", privateKeyPath, - @"-config", reqConfPath, - @"-out", certificatePath, - @"-text", @"-days", @"365", @"-batch", nil]; - - NSTask *genCertificateTask = [[[NSTask alloc] init] autorelease]; - - [genCertificateTask setLaunchPath:@"/usr/bin/openssl"]; - [genCertificateTask setArguments:certificateArgs]; - [genCertificateTask launch]; - - // Don't use waitUntilExit - I've had too many problems with it in the past - do { - [NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.05]]; - } while([genCertificateTask isRunning]); - - // Mac OS X has problems importing private keys, so we wrap everything in PKCS#12 format - // You can create a p12 wrapper by running the following command in the terminal: - // openssl pkcs12 -export -in certificate.crt -inkey private.pem - // -passout pass:password -out certificate.p12 -name "Open Source" - - NSArray *certWrapperArgs = [NSArray arrayWithObjects:@"pkcs12", @"-export", @"-export", - @"-in", certificatePath, - @"-inkey", privateKeyPath, - @"-passout", @"pass:password", - @"-out", certWrapperPath, - @"-name", @"SecureHTTPServer", nil]; - - NSTask *genCertWrapperTask = [[[NSTask alloc] init] autorelease]; - - [genCertWrapperTask setLaunchPath:@"/usr/bin/openssl"]; - [genCertWrapperTask setArguments:certWrapperArgs]; - [genCertWrapperTask launch]; - - // Don't use waitUntilExit - I've had too many problems with it in the past - do { - [NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.05]]; - } while([genCertWrapperTask isRunning]); - - // At this point we've created all the identity files that we need - // Our next step is to import the identity into the keychain - // We can do this by using the SecKeychainItemImport() method. - // But of course this method is "Frozen in Carbonite"... - // So it's going to take us 100 lines of code to build up the parameters needed to make the method call - NSData *certData = [NSData dataWithContentsOfFile:certWrapperPath]; - - /* SecKeyImportExportFlags - typedef uint32_t - * Defines values for the flags field of the import/export parameters. - * - * enum - * { - * kSecKeyImportOnlyOne = 0x00000001, - * kSecKeySecurePassphrase = 0x00000002, - * kSecKeyNoAccessControl = 0x00000004 - * }; - * - * kSecKeyImportOnlyOne - * Prevents the importing of more than one private key by the SecKeychainItemImport function. - * If the importKeychain parameter is NULL, this bit is ignored. Otherwise, if this bit is set and there is - * more than one key in the incoming external representation, - * no items are imported to the specified keychain and the error errSecMultipleKeys is returned. - * kSecKeySecurePassphrase - * When set, the password for import or export is obtained by user prompt. Otherwise, you must provide the - * password in the passphrase field of the SecKeyImportExportParameters structure. - * A user-supplied password is preferred, because it avoids having the cleartext password appear in the - * application’s address space at any time. - * kSecKeyNoAccessControl - * When set, imported private keys have no access object attached to them. In the absence of both this bit and - * the accessRef field in SecKeyImportExportParameters, imported private keys are given default access controls - **/ - - SecKeyImportExportFlags importFlags = kSecKeyImportOnlyOne; - - /* SecKeyImportExportParameters - typedef struct - * - * FOR IMPORT AND EXPORT: - * uint32_t version - * The version of this structure; the current value is SEC_KEY_IMPORT_EXPORT_PARAMS_VERSION. - * SecKeyImportExportFlags flags - * A set of flag bits, defined in "Keychain Item Import/Export Parameter Flags". - * CFTypeRef passphrase - * A password, used for kSecFormatPKCS12 and kSecFormatWrapped formats only... - * IE - kSecFormatWrappedOpenSSL, kSecFormatWrappedSSH, or kSecFormatWrappedPKCS8 - * CFStringRef alertTitle - * Title of secure password alert panel. - * When importing or exporting a key, if you set the kSecKeySecurePassphrase flag bit, - * you can optionally use this field to specify a string for the password panel’s title bar. - * CFStringRef alertPrompt - * Prompt in secure password alert panel. - * When importing or exporting a key, if you set the kSecKeySecurePassphrase flag bit, - * you can optionally use this field to specify a string for the prompt that appears in the password panel. - * - * FOR IMPORT ONLY: - * SecAccessRef accessRef - * Specifies the initial access controls of imported private keys. - * If more than one private key is being imported, all private keys get the same initial access controls. - * If this field is NULL when private keys are being imported, then the access object for the keychain item - * for an imported private key depends on the kSecKeyNoAccessControl bit in the flags parameter. - * If this bit is 0 (or keyParams is NULL), the default access control is used. - * If this bit is 1, no access object is attached to the keychain item for imported private keys. - * CSSM_KEYUSE keyUsage - * A word of bits constituting the low-level use flags for imported keys as defined in cssmtype.h. - * If this field is 0 or keyParams is NULL, the default value is CSSM_KEYUSE_ANY. - * CSSM_KEYATTR_FLAGS keyAttributes - * The following are valid values for these flags: - * CSSM_KEYATTR_PERMANENT, CSSM_KEYATTR_SENSITIVE, and CSSM_KEYATTR_EXTRACTABLE. - * The default value is CSSM_KEYATTR_SENSITIVE | CSSM_KEYATTR_EXTRACTABLE - * The CSSM_KEYATTR_SENSITIVE bit indicates that the key can only be extracted in wrapped form. - * Important: If you do not set the CSSM_KEYATTR_EXTRACTABLE bit, - * you cannot extract the imported key from the keychain in any form, including in wrapped form. - **/ - - SecKeyImportExportParameters importParameters; - importParameters.version = SEC_KEY_IMPORT_EXPORT_PARAMS_VERSION; - importParameters.flags = importFlags; - importParameters.passphrase = CFSTR("password"); - importParameters.accessRef = NULL; - importParameters.keyUsage = CSSM_KEYUSE_ANY; - importParameters.keyAttributes = CSSM_KEYATTR_SENSITIVE | CSSM_KEYATTR_EXTRACTABLE; - - /* SecKeychainItemImport - Imports one or more certificates, keys, or identities and adds them to a keychain. - * - * Parameters: - * CFDataRef importedData - * The external representation of the items to import. - * CFStringRef fileNameOrExtension - * The name or extension of the file from which the external representation was obtained. - * Pass NULL if you don’t know the name or extension. - * SecExternalFormat *inputFormat - * On input, points to the format of the external representation. - * Pass kSecFormatUnknown if you do not know the exact format. - * On output, points to the format that the function has determined the external representation to be in. - * Pass NULL if you don’t know the format and don’t want the format returned to you. - * SecExternalItemType *itemType - * On input, points to the item type of the item or items contained in the external representation. - * Pass kSecItemTypeUnknown if you do not know the item type. - * On output, points to the item type that the function has determined the external representation to contain. - * Pass NULL if you don’t know the item type and don’t want the type returned to you. - * SecItemImportExportFlags flags - * Unused; pass in 0. - * const SecKeyImportExportParameters *keyParams - * A pointer to a structure containing a set of input parameters for the function. - * If no key items are being imported, these parameters are optional - * and you can set the keyParams parameter to NULL. - * SecKeychainRef importKeychain - * A keychain object indicating the keychain to which the key or certificate should be imported. - * If you pass NULL, the item is not imported. - * Use the SecKeychainCopyDefault function to get a reference to the default keychain. - * If the kSecKeyImportOnlyOne bit is set and there is more than one key in the - * incoming external representation, no items are imported to the specified keychain and the - * error errSecMultiplePrivKeys is returned. - * CFArrayRef *outItems - * On output, points to an array of SecKeychainItemRef objects for the imported items. - * You must provide a valid pointer to a CFArrayRef object to receive this information. - * If you pass NULL for this parameter, the function does not return the imported items. - * Release this object by calling the CFRelease function when you no longer need it. - **/ - - SecExternalFormat inputFormat = kSecFormatPKCS12; - SecExternalItemType itemType = kSecItemTypeUnknown; - - SecKeychainCopyDefault(&keychain); - - OSStatus err = 0; - err = SecKeychainItemImport((CFDataRef)certData, // CFDataRef importedData - NULL, // CFStringRef fileNameOrExtension - &inputFormat, // SecExternalFormat *inputFormat - &itemType, // SecExternalItemType *itemType - 0, // SecItemImportExportFlags flags (Unused) - &importParameters, // const SecKeyImportExportParameters *keyParams - keychain, // SecKeychainRef importKeychain - &outItems); // CFArrayRef *outItems - - NSLog(@"OSStatus: %i", err); - - NSLog(@"SecExternalFormat: %@", [DDKeychain stringForSecExternalFormat:inputFormat]); - NSLog(@"SecExternalItemType: %@", [DDKeychain stringForSecExternalItemType:itemType]); - - NSLog(@"outItems: %@", (NSArray *)outItems); - - // Don't forget to delete the temporary files - [[NSFileManager defaultManager] removeItemAtPath:privateKeyPath error:nil]; - [[NSFileManager defaultManager] removeItemAtPath:reqConfPath error:nil]; - [[NSFileManager defaultManager] removeItemAtPath:certificatePath error:nil]; - [[NSFileManager defaultManager] removeItemAtPath:certWrapperPath error:nil]; - - // Don't forget to release anything we may have created - if(keychain) CFRelease(keychain); - if(outItems) CFRelease(outItems); -} - -/** - * Returns an array of SecCertificateRefs except for the first element in the array, which is a SecIdentityRef. - * Currently this method is designed to return the identity created in the method above. - * You will most likely alter this method to return a proper identity based on what it is you're trying to do. -**/ -+ (NSArray *)SSLIdentityAndCertificates -{ - // Declare any Carbon variables we may create - // We do this here so it's easier to compare to the bottom of this method where we release them all - SecKeychainRef keychain = NULL; - SecIdentitySearchRef searchRef = NULL; - - // Create array to hold the results - NSMutableArray *result = [NSMutableArray array]; - - /* SecKeychainAttribute - typedef struct - * Contains keychain attributes. - * - * struct SecKeychainAttribute - * { - * SecKeychainAttrType tag; - * UInt32 length; - * void *data; - * }; - * - * Fields: - * tag - * A 4-byte attribute tag. See “Keychain Item Attribute Constants†for valid attribute types. - * length - * The length of the buffer pointed to by data. - * data - * A pointer to the attribute data. - **/ - - /* SecKeychainAttributeList - typedef struct - * Represents a list of keychain attributes. - * - * struct SecKeychainAttributeList - * { - * UInt32 count; - * SecKeychainAttribute *attr; - * }; - * - * Fields: - * count - * An unsigned 32-bit integer that represents the number of keychain attributes in the array. - * attr - * A pointer to the first keychain attribute in the array. - **/ - - SecKeychainCopyDefault(&keychain); - - SecIdentitySearchCreate(keychain, CSSM_KEYUSE_ANY, &searchRef); - - SecIdentityRef currentIdentityRef = NULL; - while(searchRef && (SecIdentitySearchCopyNext(searchRef, ¤tIdentityRef) != errSecItemNotFound)) - { - // Extract the private key from the identity, and examine it to see if it will work for us - SecKeyRef privateKeyRef = NULL; - SecIdentityCopyPrivateKey(currentIdentityRef, &privateKeyRef); - - if(privateKeyRef) - { - // Get the name attribute of the private key - // We're looking for a private key with the name of "Mojo User" - - SecItemAttr itemAttributes[] = {kSecKeyPrintName}; - - SecExternalFormat externalFormats[] = {kSecFormatUnknown}; - - int itemAttributesSize = sizeof(itemAttributes) / sizeof(*itemAttributes); - int externalFormatsSize = sizeof(externalFormats) / sizeof(*externalFormats); - NSAssert(itemAttributesSize == externalFormatsSize, @"Arrays must have identical counts!"); - - SecKeychainAttributeInfo info = {itemAttributesSize, (void *)&itemAttributes, (void *)&externalFormats}; - - SecKeychainAttributeList *privateKeyAttributeList = NULL; - SecKeychainItemCopyAttributesAndData((SecKeychainItemRef)privateKeyRef, - &info, NULL, &privateKeyAttributeList, NULL, NULL); - - if(privateKeyAttributeList) - { - SecKeychainAttribute nameAttribute = privateKeyAttributeList->attr[0]; - - NSString *name = [[[NSString alloc] initWithBytes:nameAttribute.data - length:(nameAttribute.length) - encoding:NSUTF8StringEncoding] autorelease]; - - // Ugly Hack - // For some reason, name sometimes contains odd characters at the end of it - // I'm not sure why, and I don't know of a proper fix, thus the use of the hasPrefix: method - if([name hasPrefix:@"SecureHTTPServer"]) - { - // It's possible for there to be more than one private key with the above prefix - // But we're only allowed to have one identity, so we make sure to only add one to the array - if([result count] == 0) - { - [result addObject:(id)currentIdentityRef]; - } - } - - SecKeychainItemFreeAttributesAndData(privateKeyAttributeList, NULL); - } - - CFRelease(privateKeyRef); - } - - CFRelease(currentIdentityRef); - } - - if(keychain) CFRelease(keychain); - if(searchRef) CFRelease(searchRef); - - return result; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Utilities: -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * Creates (if necessary) and returns a temporary directory for the application. - * - * A general temporary directory is provided for each user by the OS. - * This prevents conflicts between the same application running on multiple user accounts. - * We take this a step further by putting everything inside another subfolder, identified by our application name. -**/ -+ (NSString *)applicationTemporaryDirectory -{ - NSString *userTempDir = NSTemporaryDirectory(); - NSString *appTempDir = [userTempDir stringByAppendingPathComponent:@"SecureHTTPServer"]; - - NSFileManager *fileManager = [NSFileManager defaultManager]; - if([fileManager fileExistsAtPath:appTempDir] == NO) - { - [fileManager createDirectoryAtPath:appTempDir withIntermediateDirectories:YES attributes:nil error:nil]; - } - - return appTempDir; -} - -/** - * Simple utility class to convert a SecExternalFormat into a string suitable for printing/logging. -**/ -+ (NSString *)stringForSecExternalFormat:(SecExternalFormat)extFormat -{ - switch(extFormat) - { - case kSecFormatUnknown : return @"kSecFormatUnknown"; - - /* Asymmetric Key Formats */ - case kSecFormatOpenSSL : return @"kSecFormatOpenSSL"; - case kSecFormatSSH : return @"kSecFormatSSH - Not Supported"; - case kSecFormatBSAFE : return @"kSecFormatBSAFE"; - - /* Symmetric Key Formats */ - case kSecFormatRawKey : return @"kSecFormatRawKey"; - - /* Formats for wrapped symmetric and private keys */ - case kSecFormatWrappedPKCS8 : return @"kSecFormatWrappedPKCS8"; - case kSecFormatWrappedOpenSSL : return @"kSecFormatWrappedOpenSSL"; - case kSecFormatWrappedSSH : return @"kSecFormatWrappedSSH - Not Supported"; - case kSecFormatWrappedLSH : return @"kSecFormatWrappedLSH - Not Supported"; - - /* Formats for certificates */ - case kSecFormatX509Cert : return @"kSecFormatX509Cert"; - - /* Aggregate Types */ - case kSecFormatPEMSequence : return @"kSecFormatPEMSequence"; - case kSecFormatPKCS7 : return @"kSecFormatPKCS7"; - case kSecFormatPKCS12 : return @"kSecFormatPKCS12"; - case kSecFormatNetscapeCertSequence : return @"kSecFormatNetscapeCertSequence"; - - default : return @"Unknown"; - } -} - -/** - * Simple utility class to convert a SecExternalItemType into a string suitable for printing/logging. -**/ -+ (NSString *)stringForSecExternalItemType:(SecExternalItemType)itemType -{ - switch(itemType) - { - case kSecItemTypeUnknown : return @"kSecItemTypeUnknown"; - - case kSecItemTypePrivateKey : return @"kSecItemTypePrivateKey"; - case kSecItemTypePublicKey : return @"kSecItemTypePublicKey"; - case kSecItemTypeSessionKey : return @"kSecItemTypeSessionKey"; - case kSecItemTypeCertificate : return @"kSecItemTypeCertificate"; - case kSecItemTypeAggregate : return @"kSecItemTypeAggregate"; - - default : return @"Unknown"; - } -} - -/** - * Simple utility class to convert a SecKeychainAttrType into a string suitable for printing/logging. -**/ -+ (NSString *)stringForSecKeychainAttrType:(SecKeychainAttrType)attrType -{ - switch(attrType) - { - case kSecCreationDateItemAttr : return @"kSecCreationDateItemAttr"; - case kSecModDateItemAttr : return @"kSecModDateItemAttr"; - case kSecDescriptionItemAttr : return @"kSecDescriptionItemAttr"; - case kSecCommentItemAttr : return @"kSecCommentItemAttr"; - case kSecCreatorItemAttr : return @"kSecCreatorItemAttr"; - case kSecTypeItemAttr : return @"kSecTypeItemAttr"; - case kSecScriptCodeItemAttr : return @"kSecScriptCodeItemAttr"; - case kSecLabelItemAttr : return @"kSecLabelItemAttr"; - case kSecInvisibleItemAttr : return @"kSecInvisibleItemAttr"; - case kSecNegativeItemAttr : return @"kSecNegativeItemAttr"; - case kSecCustomIconItemAttr : return @"kSecCustomIconItemAttr"; - case kSecAccountItemAttr : return @"kSecAccountItemAttr"; - case kSecServiceItemAttr : return @"kSecServiceItemAttr"; - case kSecGenericItemAttr : return @"kSecGenericItemAttr"; - case kSecSecurityDomainItemAttr : return @"kSecSecurityDomainItemAttr"; - case kSecServerItemAttr : return @"kSecServerItemAttr"; - case kSecAuthenticationTypeItemAttr : return @"kSecAuthenticationTypeItemAttr"; - case kSecPortItemAttr : return @"kSecPortItemAttr"; - case kSecPathItemAttr : return @"kSecPathItemAttr"; - case kSecVolumeItemAttr : return @"kSecVolumeItemAttr"; - case kSecAddressItemAttr : return @"kSecAddressItemAttr"; - case kSecSignatureItemAttr : return @"kSecSignatureItemAttr"; - case kSecProtocolItemAttr : return @"kSecProtocolItemAttr"; - case kSecCertificateType : return @"kSecCertificateType"; - case kSecCertificateEncoding : return @"kSecCertificateEncoding"; - case kSecCrlType : return @"kSecCrlType"; - case kSecCrlEncoding : return @"kSecCrlEncoding"; - case kSecAlias : return @"kSecAlias"; - default : return @"Unknown"; - } -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/MyHTTPConnection.h b/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/MyHTTPConnection.h deleted file mode 100644 index 946d9f8bb5389..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/MyHTTPConnection.h +++ /dev/null @@ -1,11 +0,0 @@ -#import -#import "HTTPConnection.h" - -@class MyWebSocket; - -@interface MyHTTPConnection : HTTPConnection -{ - MyWebSocket *ws; -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/MyHTTPConnection.m b/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/MyHTTPConnection.m deleted file mode 100644 index 685898c204737..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/MyHTTPConnection.m +++ /dev/null @@ -1,103 +0,0 @@ -#import "MyHTTPConnection.h" -#import "HTTPMessage.h" -#import "HTTPResponse.h" -#import "HTTPDynamicFileResponse.h" -#import "GCDAsyncSocket.h" -#import "MyWebSocket.h" -#import "HTTPLogging.h" -#import "DDKeychain.h" - -// Log levels: off, error, warn, info, verbose -// Other flags: trace -static const int httpLogLevel = HTTP_LOG_LEVEL_WARN; // | HTTP_LOG_FLAG_TRACE; - - -@implementation MyHTTPConnection - -/** - * Overrides HTTPConnection's method -**/ -- (BOOL)isSecureServer -{ - HTTPLogTrace(); - - // Create an HTTPS server (all connections will be secured via SSL/TLS) - return YES; -} - -/** - * Overrides HTTPConnection's method - * - * This method is expected to returns an array appropriate for use in kCFStreamSSLCertificates SSL Settings. - * It should be an array of SecCertificateRefs except for the first element in the array, which is a SecIdentityRef. -**/ -- (NSArray *)sslIdentityAndCertificates -{ - HTTPLogTrace(); - - NSArray *result = [DDKeychain SSLIdentityAndCertificates]; - if([result count] == 0) - { - HTTPLogInfo(@"sslIdentityAndCertificates: Creating New Identity..."); - [DDKeychain createNewIdentity]; - return [DDKeychain SSLIdentityAndCertificates]; - } - return result; -} - -- (NSObject *)httpResponseForMethod:(NSString *)method URI:(NSString *)path -{ - HTTPLogTrace(); - - if ([path isEqualToString:@"/WebSocketTest2.js"]) - { - // The socket.js file contains a URL template that needs to be completed: - // - // ws = new WebSocket("%%WEBSOCKET_URL%%"); - // - // We need to replace "%%WEBSOCKET_URL%%" with whatever URL the server is running on. - // We can accomplish this easily with the HTTPDynamicFileResponse class, - // which takes a dictionary of replacement key-value pairs, - // and performs replacements on the fly as it uploads the file. - - NSString *wsLocation; - - NSString *scheme = [asyncSocket isSecure] ? @"wss" : @"ws"; - NSString *wsHost = [request headerField:@"Host"]; - - if (wsHost == nil) - { - NSString *port = [NSString stringWithFormat:@"%hu", [asyncSocket localPort]]; - wsLocation = [NSString stringWithFormat:@"%@://localhost:%@%/service", scheme, port]; - } - else - { - wsLocation = [NSString stringWithFormat:@"%@://%@/service", scheme, wsHost]; - } - - NSDictionary *replacementDict = [NSDictionary dictionaryWithObject:wsLocation forKey:@"WEBSOCKET_URL"]; - - return [[[HTTPDynamicFileResponse alloc] initWithFilePath:[self filePathForURI:path] - forConnection:self - separator:@"%%" - replacementDictionary:replacementDict] autorelease]; - } - - return [super httpResponseForMethod:method URI:path]; -} - -- (WebSocket *)webSocketForURI:(NSString *)path -{ - HTTPLogTrace2(@"%@[%p]: webSocketForURI: %@", THIS_FILE, self, path); - - if([path isEqualToString:@"/service"]) - { - HTTPLogInfo(@"MyHTTPConnection: Creating MyWebSocket..."); - - return [[[MyWebSocket alloc] initWithRequest:request socket:asyncSocket] autorelease]; - } - - return [super webSocketForURI:path]; -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/MyWebSocket.h b/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/MyWebSocket.h deleted file mode 100644 index 00a5ad342fa7e..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/MyWebSocket.h +++ /dev/null @@ -1,10 +0,0 @@ -#import -#import "WebSocket.h" - - -@interface MyWebSocket : WebSocket -{ - -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/MyWebSocket.m b/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/MyWebSocket.m deleted file mode 100644 index 103122d8e5502..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/MyWebSocket.m +++ /dev/null @@ -1,32 +0,0 @@ -#import "MyWebSocket.h" -#import "HTTPLogging.h" - -// Log levels: off, error, warn, info, verbose -// Other flags : trace -static const int httpLogLevel = HTTP_LOG_LEVEL_WARN | HTTP_LOG_FLAG_TRACE; - - -@implementation MyWebSocket - -- (void)didOpen -{ - HTTPLogTrace(); - - [super didOpen]; -} - -- (void)didReceiveMessage:(NSString *)msg -{ - HTTPLogTrace2(@"%@[%p]: didReceiveMessage: %@", THIS_FILE, self, msg); - - [self sendMessage:[NSString stringWithFormat:@"%@", [NSDate date]]]; -} - -- (void)didClose -{ - HTTPLogTrace(); - - [super didClose]; -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/SecureWebSocketServer-Info.plist b/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/SecureWebSocketServer-Info.plist deleted file mode 100644 index 7b4babf76d9ea..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/SecureWebSocketServer-Info.plist +++ /dev/null @@ -1,32 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.deusty.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSMinimumSystemVersion - ${MACOSX_DEPLOYMENT_TARGET} - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/SecureWebSocketServer-Prefix.pch b/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/SecureWebSocketServer-Prefix.pch deleted file mode 100644 index 567edf5e54f0a..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/SecureWebSocketServer-Prefix.pch +++ /dev/null @@ -1,7 +0,0 @@ -// -// Prefix header for all source files of the 'SecureWebSocketServer' target in the 'SecureWebSocketServer' project -// - -#ifdef __OBJC__ - #import -#endif diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/SecureWebSocketServerAppDelegate.h b/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/SecureWebSocketServerAppDelegate.h deleted file mode 100644 index 61425f402a6c9..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/SecureWebSocketServerAppDelegate.h +++ /dev/null @@ -1,14 +0,0 @@ -#import - -@class HTTPServer; - - -@interface SecureWebSocketServerAppDelegate : NSObject { -@private - HTTPServer *httpServer; - NSWindow *window; -} - -@property (assign) IBOutlet NSWindow *window; - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/SecureWebSocketServerAppDelegate.m b/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/SecureWebSocketServerAppDelegate.m deleted file mode 100644 index c213cd4c694bf..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/SecureWebSocketServerAppDelegate.m +++ /dev/null @@ -1,51 +0,0 @@ -#import "SecureWebSocketServerAppDelegate.h" -#import "HTTPServer.h" -#import "MyHTTPConnection.h" -#import "DDLog.h" -#import "DDTTYLogger.h" - -// Log levels: off, error, warn, info, verbose -static const int ddLogLevel = LOG_LEVEL_VERBOSE; - - -@implementation SecureWebSocketServerAppDelegate - -@synthesize window; - -- (void)applicationDidFinishLaunching:(NSNotification *)aNotification -{ - // Configure our logging framework. - // To keep things simple and fast, we're just going to log to the Xcode console. - [DDLog addLogger:[DDTTYLogger sharedInstance]]; - - // Create server using our custom MyHTTPServer class - httpServer = [[HTTPServer alloc] init]; - - // Tell server to use our custom MyHTTPConnection class. - [httpServer setConnectionClass:[MyHTTPConnection class]]; - - // Tell the server to broadcast its presence via Bonjour. - // This allows browsers such as Safari to automatically discover our service. - [httpServer setType:@"_http._tcp."]; - - // Normally there's no need to run our server on any specific port. - // Technologies like Bonjour allow clients to dynamically discover the server's port at runtime. - // However, for easy testing you may want force a certain port so you can just hit the refresh button. - [httpServer setPort:12345]; - - // Serve files from our embedded Web folder - NSString *webPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"Web"]; - DDLogInfo(@"Setting document root: %@", webPath); - - [httpServer setDocumentRoot:webPath]; - - // Start the server (and check for problems) - - NSError *error; - if(![httpServer start:&error]) - { - DDLogError(@"Error starting HTTP Server: %@", error); - } -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/Web/WebSocketTest.js b/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/Web/WebSocketTest.js deleted file mode 100644 index 3b1343c0f4b0f..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/Web/WebSocketTest.js +++ /dev/null @@ -1,12 +0,0 @@ -function WebSocketTest() -{ - if ("WebSocket" in window) - { - alert("WebSocket supported here! :)\r\n\r\nBrowser: " + navigator.appName + " " + navigator.appVersion + "\r\n\r\n(based on Google sample code)"); - } - else - { - // Browser doesn't support WebSocket - alert("WebSocket NOT supported here! :(\r\n\r\nBrowser: " + navigator.appName + " " + navigator.appVersion + "\r\n\r\n(based on Google sample code)"); - } -} \ No newline at end of file diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/Web/WebSocketTest2.js b/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/Web/WebSocketTest2.js deleted file mode 100644 index 57a4bb035bc7d..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/Web/WebSocketTest2.js +++ /dev/null @@ -1,56 +0,0 @@ - -var ws; -var t; - -function init() -{ - document.getElementById('updateme').innerHTML = "connecting to websocket"; - OpenWebSocket(); -} - -function OpenWebSocket() -{ - if ("WebSocket" in window) - { - ws = new WebSocket("%%WEBSOCKET_URL%%"); - ws.onopen = function() - { - // Web Socket is connected - - document.getElementById('updateme').innerHTML = "websocket is open"; - - t=setTimeout("SendMessage()",1000); - }; - ws.onmessage = function(evt) - { - document.getElementById('updateme').innerHTML = evt.data; - }; - ws.onclose = function() - { - document.getElementById('updateme').innerHTML = "websocket is closed"; - OpenWebSocket(); - }; - ws.onerror = function(evt) - { - alert("onerror: " + evt); - }; - } - else - { - alert("Browser doesn't support WebSocket!"); - } -} - -function SendMessage() -{ - if ("WebSocket" in window) - { - ws.send("time"); - - t=setTimeout("SendMessage()",1000); - } - else - { - alert("Browser doesn't support WebSocket!"); - } -} \ No newline at end of file diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/Web/index.html b/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/Web/index.html deleted file mode 100644 index 670e65d3eccd1..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/Web/index.html +++ /dev/null @@ -1,19 +0,0 @@ - - -SimpleWebSocketServer - - - - - - -Does my browser support WebSockets?
    -
    -
    - Server Time - not updated yet - - - - - \ No newline at end of file diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/en.lproj/Credits.rtf b/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/en.lproj/Credits.rtf deleted file mode 100644 index 46576ef211d18..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/en.lproj/Credits.rtf +++ /dev/null @@ -1,29 +0,0 @@ -{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;} -{\colortbl;\red255\green255\blue255;} -\paperw9840\paperh8400 -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural - -\f0\b\fs24 \cf0 Engineering: -\b0 \ - Some people\ -\ - -\b Human Interface Design: -\b0 \ - Some other people\ -\ - -\b Testing: -\b0 \ - Hopefully not nobody\ -\ - -\b Documentation: -\b0 \ - Whoever\ -\ - -\b With special thanks to: -\b0 \ - Mom\ -} diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/en.lproj/InfoPlist.strings b/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28ff8f86a..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/en.lproj/MainMenu.xib b/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/en.lproj/MainMenu.xib deleted file mode 100644 index d240bc05835ee..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/en.lproj/MainMenu.xib +++ /dev/null @@ -1,4119 +0,0 @@ - - - - 1060 - 10A324 - 719 - 1015 - 418.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 719 - - - YES - - - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - YES - - - YES - - - - YES - - NSApplication - - - FirstResponder - - - NSApplication - - - AMainMenu - - YES - - - SecureWebSocketServer - - 1048576 - 2147483647 - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - submenuAction: - - SecureWebSocketServer - - YES - - - About SecureWebSocketServer - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Preferences… - , - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Services - - 1048576 - 2147483647 - - - submenuAction: - - Services - - YES - - _NSServicesMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Hide SecureWebSocketServer - h - 1048576 - 2147483647 - - - - - - Hide Others - h - 1572864 - 2147483647 - - - - - - Show All - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Quit SecureWebSocketServer - q - 1048576 - 2147483647 - - - - - _NSAppleMenu - - - - - File - - 1048576 - 2147483647 - - - submenuAction: - - File - - YES - - - New - n - 1048576 - 2147483647 - - - - - - Open… - o - 1048576 - 2147483647 - - - - - - Open Recent - - 1048576 - 2147483647 - - - submenuAction: - - Open Recent - - YES - - - Clear Menu - - 1048576 - 2147483647 - - - - - _NSRecentDocumentsMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Close - w - 1048576 - 2147483647 - - - - - - Save - s - 1048576 - 2147483647 - - - - - - Save As… - S - 1179648 - 2147483647 - - - - - - Revert to Saved - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Page Setup... - P - 1179648 - 2147483647 - - - - - - - Print… - p - 1048576 - 2147483647 - - - - - - - - - Edit - - 1048576 - 2147483647 - - - submenuAction: - - Edit - - YES - - - Undo - z - 1048576 - 2147483647 - - - - - - Redo - Z - 1179648 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Cut - x - 1048576 - 2147483647 - - - - - - Copy - c - 1048576 - 2147483647 - - - - - - Paste - v - 1048576 - 2147483647 - - - - - - Paste and Match Style - V - 1572864 - 2147483647 - - - - - - Delete - - 1048576 - 2147483647 - - - - - - Select All - a - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Find - - 1048576 - 2147483647 - - - submenuAction: - - Find - - YES - - - Find… - f - 1048576 - 2147483647 - - - 1 - - - - Find Next - g - 1048576 - 2147483647 - - - 2 - - - - Find Previous - G - 1179648 - 2147483647 - - - 3 - - - - Use Selection for Find - e - 1048576 - 2147483647 - - - 7 - - - - Jump to Selection - j - 1048576 - 2147483647 - - - - - - - - - Spelling and Grammar - - 1048576 - 2147483647 - - - submenuAction: - - Spelling and Grammar - - YES - - - Show Spelling and Grammar - : - 1048576 - 2147483647 - - - - - - Check Document Now - ; - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Check Spelling While Typing - - 1048576 - 2147483647 - - - - - - Check Grammar With Spelling - - 1048576 - 2147483647 - - - - - - Correct Spelling Automatically - - 2147483647 - - - - - - - - - Substitutions - - 1048576 - 2147483647 - - - submenuAction: - - Substitutions - - YES - - - Show Substitutions - - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Smart Copy/Paste - f - 1048576 - 2147483647 - - - 1 - - - - Smart Quotes - g - 1048576 - 2147483647 - - - 2 - - - - Smart Dashes - - 2147483647 - - - - - - Smart Links - G - 1179648 - 2147483647 - - - 3 - - - - Text Replacement - - 2147483647 - - - - - - - - - Transformations - - 2147483647 - - - submenuAction: - - Transformations - - YES - - - Make Upper Case - - 2147483647 - - - - - - Make Lower Case - - 2147483647 - - - - - - Capitalize - - 2147483647 - - - - - - - - - Speech - - 1048576 - 2147483647 - - - submenuAction: - - Speech - - YES - - - Start Speaking - - 1048576 - 2147483647 - - - - - - Stop Speaking - - 1048576 - 2147483647 - - - - - - - - - - - - Format - - 2147483647 - - - submenuAction: - - Format - - YES - - - Font - - 2147483647 - - - submenuAction: - - Font - - YES - - - Show Fonts - t - 1048576 - 2147483647 - - - - - - Bold - b - 1048576 - 2147483647 - - - 2 - - - - Italic - i - 1048576 - 2147483647 - - - 1 - - - - Underline - u - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Bigger - + - 1048576 - 2147483647 - - - 3 - - - - Smaller - - - 1048576 - 2147483647 - - - 4 - - - - YES - YES - - - 2147483647 - - - - - - Kern - - 2147483647 - - - submenuAction: - - Kern - - YES - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Tighten - - 2147483647 - - - - - - Loosen - - 2147483647 - - - - - - - - - Ligature - - 2147483647 - - - submenuAction: - - Ligature - - YES - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Use All - - 2147483647 - - - - - - - - - Baseline - - 2147483647 - - - submenuAction: - - Baseline - - YES - - - Use Default - - 2147483647 - - - - - - Superscript - - 2147483647 - - - - - - Subscript - - 2147483647 - - - - - - Raise - - 2147483647 - - - - - - Lower - - 2147483647 - - - - - - - - - YES - YES - - - 2147483647 - - - - - - Show Colors - C - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Copy Style - c - 1572864 - 2147483647 - - - - - - Paste Style - v - 1572864 - 2147483647 - - - - - _NSFontMenu - - - - - Text - - 2147483647 - - - submenuAction: - - Text - - YES - - - Align Left - { - 1048576 - 2147483647 - - - - - - Center - | - 1048576 - 2147483647 - - - - - - Justify - - 2147483647 - - - - - - Align Right - } - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Writing Direction - - 2147483647 - - - submenuAction: - - Writing Direction - - YES - - - YES - Paragraph - - 2147483647 - - - - - - CURlZmF1bHQ - - 2147483647 - - - - - - CUxlZnQgdG8gUmlnaHQ - - 2147483647 - - - - - - CVJpZ2h0IHRvIExlZnQ - - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - YES - Selection - - 2147483647 - - - - - - CURlZmF1bHQ - - 2147483647 - - - - - - CUxlZnQgdG8gUmlnaHQ - - 2147483647 - - - - - - CVJpZ2h0IHRvIExlZnQ - - 2147483647 - - - - - - - - - YES - YES - - - 2147483647 - - - - - - Show Ruler - - 2147483647 - - - - - - Copy Ruler - c - 1310720 - 2147483647 - - - - - - Paste Ruler - v - 1310720 - 2147483647 - - - - - - - - - - - - View - - 1048576 - 2147483647 - - - submenuAction: - - View - - YES - - - Show Toolbar - t - 1572864 - 2147483647 - - - - - - Customize Toolbar… - - 1048576 - 2147483647 - - - - - - - - - Window - - 1048576 - 2147483647 - - - submenuAction: - - Window - - YES - - - Minimize - m - 1048576 - 2147483647 - - - - - - Zoom - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Bring All to Front - - 1048576 - 2147483647 - - - - - _NSWindowsMenu - - - - - Help - - 2147483647 - - - submenuAction: - - Help - - YES - - - SecureWebSocketServer Help - ? - 1048576 - 2147483647 - - - - - _NSHelpMenu - - - - _NSMainMenu - - - 15 - 2 - {{335, 390}, {480, 360}} - 1954021376 - SecureWebSocketServer - NSWindow - - {1.79769e+308, 1.79769e+308} - - - 256 - {480, 360} - - - {{0, 0}, {1920, 1178}} - {1.79769e+308, 1.79769e+308} - - - SecureWebSocketServerAppDelegate - - - NSFontManager - - - - - YES - - - performMiniaturize: - - - - 37 - - - - arrangeInFront: - - - - 39 - - - - print: - - - - 86 - - - - runPageLayout: - - - - 87 - - - - clearRecentDocuments: - - - - 127 - - - - orderFrontStandardAboutPanel: - - - - 142 - - - - performClose: - - - - 193 - - - - toggleContinuousSpellChecking: - - - - 222 - - - - undo: - - - - 223 - - - - copy: - - - - 224 - - - - checkSpelling: - - - - 225 - - - - paste: - - - - 226 - - - - stopSpeaking: - - - - 227 - - - - cut: - - - - 228 - - - - showGuessPanel: - - - - 230 - - - - redo: - - - - 231 - - - - selectAll: - - - - 232 - - - - startSpeaking: - - - - 233 - - - - delete: - - - - 235 - - - - performZoom: - - - - 240 - - - - performFindPanelAction: - - - - 241 - - - - centerSelectionInVisibleArea: - - - - 245 - - - - toggleGrammarChecking: - - - - 347 - - - - toggleSmartInsertDelete: - - - - 355 - - - - toggleAutomaticQuoteSubstitution: - - - - 356 - - - - toggleAutomaticLinkDetection: - - - - 357 - - - - saveDocument: - - - - 362 - - - - saveDocumentAs: - - - - 363 - - - - revertDocumentToSaved: - - - - 364 - - - - runToolbarCustomizationPalette: - - - - 365 - - - - toggleToolbarShown: - - - - 366 - - - - hide: - - - - 367 - - - - hideOtherApplications: - - - - 368 - - - - unhideAllApplications: - - - - 370 - - - - newDocument: - - - - 373 - - - - openDocument: - - - - 374 - - - - addFontTrait: - - - - 421 - - - - addFontTrait: - - - - 422 - - - - modifyFont: - - - - 423 - - - - orderFrontFontPanel: - - - - 424 - - - - modifyFont: - - - - 425 - - - - raiseBaseline: - - - - 426 - - - - lowerBaseline: - - - - 427 - - - - copyFont: - - - - 428 - - - - subscript: - - - - 429 - - - - superscript: - - - - 430 - - - - tightenKerning: - - - - 431 - - - - underline: - - - - 432 - - - - orderFrontColorPanel: - - - - 433 - - - - useAllLigatures: - - - - 434 - - - - loosenKerning: - - - - 435 - - - - pasteFont: - - - - 436 - - - - unscript: - - - - 437 - - - - useStandardKerning: - - - - 438 - - - - useStandardLigatures: - - - - 439 - - - - turnOffLigatures: - - - - 440 - - - - turnOffKerning: - - - - 441 - - - - terminate: - - - - 449 - - - - toggleAutomaticSpellingCorrection: - - - - 456 - - - - orderFrontSubstitutionsPanel: - - - - 458 - - - - toggleAutomaticDashSubstitution: - - - - 461 - - - - toggleAutomaticTextReplacement: - - - - 463 - - - - uppercaseWord: - - - - 464 - - - - capitalizeWord: - - - - 467 - - - - lowercaseWord: - - - - 468 - - - - pasteAsPlainText: - - - - 486 - - - - performFindPanelAction: - - - - 487 - - - - performFindPanelAction: - - - - 488 - - - - performFindPanelAction: - - - - 489 - - - - showHelp: - - - - 493 - - - - delegate - - - - 495 - - - - alignCenter: - - - - 518 - - - - pasteRuler: - - - - 519 - - - - toggleRuler: - - - - 520 - - - - alignRight: - - - - 521 - - - - copyRuler: - - - - 522 - - - - alignJustified: - - - - 523 - - - - alignLeft: - - - - 524 - - - - makeBaseWritingDirectionNatural: - - - - 525 - - - - makeBaseWritingDirectionLeftToRight: - - - - 526 - - - - makeBaseWritingDirectionRightToLeft: - - - - 527 - - - - makeTextWritingDirectionNatural: - - - - 528 - - - - makeTextWritingDirectionLeftToRight: - - - - 529 - - - - makeTextWritingDirectionRightToLeft: - - - - 530 - - - - window - - - - 532 - - - - - YES - - 0 - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - -3 - - - Application - - - 29 - - - YES - - - - - - - - - - - - 19 - - - YES - - - - - - 56 - - - YES - - - - - - 217 - - - YES - - - - - - 83 - - - YES - - - - - - 81 - - - YES - - - - - - - - - - - - - - - - 75 - - - - - 80 - - - - - 78 - - - - - 72 - - - - - 82 - - - - - 124 - - - YES - - - - - - 77 - - - - - 73 - - - - - 79 - - - - - 112 - - - - - 74 - - - - - 125 - - - YES - - - - - - 126 - - - - - 205 - - - YES - - - - - - - - - - - - - - - - - - - - 202 - - - - - 198 - - - - - 207 - - - - - 214 - - - - - 199 - - - - - 203 - - - - - 197 - - - - - 206 - - - - - 215 - - - - - 218 - - - YES - - - - - - 216 - - - YES - - - - - - 200 - - - YES - - - - - - - - - - - 219 - - - - - 201 - - - - - 204 - - - - - 220 - - - YES - - - - - - - - - - 213 - - - - - 210 - - - - - 221 - - - - - 208 - - - - - 209 - - - - - 57 - - - YES - - - - - - - - - - - - - - - - 58 - - - - - 134 - - - - - 150 - - - - - 136 - - - - - 144 - - - - - 129 - - - - - 143 - - - - - 236 - - - - - 131 - - - YES - - - - - - 149 - - - - - 145 - - - - - 130 - - - - - 24 - - - YES - - - - - - - - - 92 - - - - - 5 - - - - - 239 - - - - - 23 - - - - - 295 - - - YES - - - - - - 296 - - - YES - - - - - - - 297 - - - - - 298 - - - - - 211 - - - YES - - - - - - 212 - - - YES - - - - - - - 195 - - - - - 196 - - - - - 346 - - - - - 348 - - - YES - - - - - - 349 - - - YES - - - - - - - - - - - - 350 - - - - - 351 - - - - - 354 - - - - - 371 - - - YES - - - - - - 372 - - - - - 375 - - - YES - - - - - - 376 - - - YES - - - - - - - 377 - - - YES - - - - - - 388 - - - YES - - - - - - - - - - - - - - - - - - - - - 389 - - - - - 390 - - - - - 391 - - - - - 392 - - - - - 393 - - - - - 394 - - - - - 395 - - - - - 396 - - - - - 397 - - - YES - - - - - - 398 - - - YES - - - - - - 399 - - - YES - - - - - - 400 - - - - - 401 - - - - - 402 - - - - - 403 - - - - - 404 - - - - - 405 - - - YES - - - - - - - - - - 406 - - - - - 407 - - - - - 408 - - - - - 409 - - - - - 410 - - - - - 411 - - - YES - - - - - - - - 412 - - - - - 413 - - - - - 414 - - - - - 415 - - - YES - - - - - - - - - 416 - - - - - 417 - - - - - 418 - - - - - 419 - - - - - 420 - - - - - 450 - - - YES - - - - - - 451 - - - YES - - - - - - - - 452 - - - - - 453 - - - - - 454 - - - - - 457 - - - - - 459 - - - - - 460 - - - - - 462 - - - - - 465 - - - - - 466 - - - - - 485 - - - - - 490 - - - YES - - - - - - 491 - - - YES - - - - - - 492 - - - - - 494 - - - - - 496 - - - YES - - - - - - 497 - - - YES - - - - - - - - - - - - - - - 498 - - - - - 499 - - - - - 500 - - - - - 501 - - - - - 502 - - - - - 503 - - - YES - - - - - - 504 - - - - - 505 - - - - - 506 - - - - - 507 - - - - - 508 - - - YES - - - - - - - - - - - - - - 509 - - - - - 510 - - - - - 511 - - - - - 512 - - - - - 513 - - - - - 514 - - - - - 515 - - - - - 516 - - - - - 517 - - - - - - - YES - - YES - -3.IBPluginDependency - 112.IBPluginDependency - 112.ImportedFromIB2 - 124.IBPluginDependency - 124.ImportedFromIB2 - 125.IBPluginDependency - 125.ImportedFromIB2 - 125.editorWindowContentRectSynchronizationRect - 126.IBPluginDependency - 126.ImportedFromIB2 - 129.IBPluginDependency - 129.ImportedFromIB2 - 130.IBPluginDependency - 130.ImportedFromIB2 - 130.editorWindowContentRectSynchronizationRect - 131.IBPluginDependency - 131.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 - 136.IBPluginDependency - 136.ImportedFromIB2 - 143.IBPluginDependency - 143.ImportedFromIB2 - 144.IBPluginDependency - 144.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 - 19.IBPluginDependency - 19.ImportedFromIB2 - 195.IBPluginDependency - 195.ImportedFromIB2 - 196.IBPluginDependency - 196.ImportedFromIB2 - 197.IBPluginDependency - 197.ImportedFromIB2 - 198.IBPluginDependency - 198.ImportedFromIB2 - 199.IBPluginDependency - 199.ImportedFromIB2 - 200.IBEditorWindowLastContentRect - 200.IBPluginDependency - 200.ImportedFromIB2 - 200.editorWindowContentRectSynchronizationRect - 201.IBPluginDependency - 201.ImportedFromIB2 - 202.IBPluginDependency - 202.ImportedFromIB2 - 203.IBPluginDependency - 203.ImportedFromIB2 - 204.IBPluginDependency - 204.ImportedFromIB2 - 205.IBEditorWindowLastContentRect - 205.IBPluginDependency - 205.ImportedFromIB2 - 205.editorWindowContentRectSynchronizationRect - 206.IBPluginDependency - 206.ImportedFromIB2 - 207.IBPluginDependency - 207.ImportedFromIB2 - 208.IBPluginDependency - 208.ImportedFromIB2 - 209.IBPluginDependency - 209.ImportedFromIB2 - 210.IBPluginDependency - 210.ImportedFromIB2 - 211.IBPluginDependency - 211.ImportedFromIB2 - 212.IBPluginDependency - 212.ImportedFromIB2 - 212.editorWindowContentRectSynchronizationRect - 213.IBPluginDependency - 213.ImportedFromIB2 - 214.IBPluginDependency - 214.ImportedFromIB2 - 215.IBPluginDependency - 215.ImportedFromIB2 - 216.IBPluginDependency - 216.ImportedFromIB2 - 217.IBPluginDependency - 217.ImportedFromIB2 - 218.IBPluginDependency - 218.ImportedFromIB2 - 219.IBPluginDependency - 219.ImportedFromIB2 - 220.IBEditorWindowLastContentRect - 220.IBPluginDependency - 220.ImportedFromIB2 - 220.editorWindowContentRectSynchronizationRect - 221.IBPluginDependency - 221.ImportedFromIB2 - 23.IBPluginDependency - 23.ImportedFromIB2 - 236.IBPluginDependency - 236.ImportedFromIB2 - 239.IBPluginDependency - 239.ImportedFromIB2 - 24.IBEditorWindowLastContentRect - 24.IBPluginDependency - 24.ImportedFromIB2 - 24.editorWindowContentRectSynchronizationRect - 29.IBEditorWindowLastContentRect - 29.IBPluginDependency - 29.ImportedFromIB2 - 29.WindowOrigin - 29.editorWindowContentRectSynchronizationRect - 295.IBPluginDependency - 296.IBEditorWindowLastContentRect - 296.IBPluginDependency - 296.editorWindowContentRectSynchronizationRect - 297.IBPluginDependency - 298.IBPluginDependency - 346.IBPluginDependency - 346.ImportedFromIB2 - 348.IBPluginDependency - 348.ImportedFromIB2 - 349.IBEditorWindowLastContentRect - 349.IBPluginDependency - 349.ImportedFromIB2 - 349.editorWindowContentRectSynchronizationRect - 350.IBPluginDependency - 350.ImportedFromIB2 - 351.IBPluginDependency - 351.ImportedFromIB2 - 354.IBPluginDependency - 354.ImportedFromIB2 - 371.IBEditorWindowLastContentRect - 371.IBPluginDependency - 371.IBWindowTemplateEditedContentRect - 371.NSWindowTemplate.visibleAtLaunch - 371.editorWindowContentRectSynchronizationRect - 371.windowTemplate.maxSize - 372.IBPluginDependency - 375.IBPluginDependency - 376.IBEditorWindowLastContentRect - 376.IBPluginDependency - 377.IBPluginDependency - 388.IBEditorWindowLastContentRect - 388.IBPluginDependency - 389.IBPluginDependency - 390.IBPluginDependency - 391.IBPluginDependency - 392.IBPluginDependency - 393.IBPluginDependency - 394.IBPluginDependency - 395.IBPluginDependency - 396.IBPluginDependency - 397.IBPluginDependency - 398.IBPluginDependency - 399.IBPluginDependency - 400.IBPluginDependency - 401.IBPluginDependency - 402.IBPluginDependency - 403.IBPluginDependency - 404.IBPluginDependency - 405.IBPluginDependency - 406.IBPluginDependency - 407.IBPluginDependency - 408.IBPluginDependency - 409.IBPluginDependency - 410.IBPluginDependency - 411.IBPluginDependency - 412.IBPluginDependency - 413.IBPluginDependency - 414.IBPluginDependency - 415.IBPluginDependency - 416.IBPluginDependency - 417.IBPluginDependency - 418.IBPluginDependency - 419.IBPluginDependency - 450.IBPluginDependency - 451.IBEditorWindowLastContentRect - 451.IBPluginDependency - 452.IBPluginDependency - 453.IBPluginDependency - 454.IBPluginDependency - 457.IBPluginDependency - 459.IBPluginDependency - 460.IBPluginDependency - 462.IBPluginDependency - 465.IBPluginDependency - 466.IBPluginDependency - 485.IBPluginDependency - 490.IBPluginDependency - 491.IBEditorWindowLastContentRect - 491.IBPluginDependency - 492.IBPluginDependency - 496.IBPluginDependency - 497.IBEditorWindowLastContentRect - 497.IBPluginDependency - 498.IBPluginDependency - 499.IBPluginDependency - 5.IBPluginDependency - 5.ImportedFromIB2 - 500.IBPluginDependency - 501.IBPluginDependency - 502.IBPluginDependency - 503.IBPluginDependency - 504.IBPluginDependency - 505.IBPluginDependency - 506.IBPluginDependency - 507.IBPluginDependency - 508.IBEditorWindowLastContentRect - 508.IBPluginDependency - 509.IBPluginDependency - 510.IBPluginDependency - 511.IBPluginDependency - 512.IBPluginDependency - 513.IBPluginDependency - 514.IBPluginDependency - 515.IBPluginDependency - 516.IBPluginDependency - 517.IBPluginDependency - 56.IBPluginDependency - 56.ImportedFromIB2 - 57.IBEditorWindowLastContentRect - 57.IBPluginDependency - 57.ImportedFromIB2 - 57.editorWindowContentRectSynchronizationRect - 58.IBPluginDependency - 58.ImportedFromIB2 - 72.IBPluginDependency - 72.ImportedFromIB2 - 73.IBPluginDependency - 73.ImportedFromIB2 - 74.IBPluginDependency - 74.ImportedFromIB2 - 75.IBPluginDependency - 75.ImportedFromIB2 - 77.IBPluginDependency - 77.ImportedFromIB2 - 78.IBPluginDependency - 78.ImportedFromIB2 - 79.IBPluginDependency - 79.ImportedFromIB2 - 80.IBPluginDependency - 80.ImportedFromIB2 - 81.IBEditorWindowLastContentRect - 81.IBPluginDependency - 81.ImportedFromIB2 - 81.editorWindowContentRectSynchronizationRect - 82.IBPluginDependency - 82.ImportedFromIB2 - 83.IBPluginDependency - 83.ImportedFromIB2 - 92.IBPluginDependency - 92.ImportedFromIB2 - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{522, 812}, {146, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{436, 809}, {64, 6}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{753, 187}, {275, 113}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {275, 83}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{547, 180}, {254, 283}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{187, 434}, {243, 243}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {167, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{753, 217}, {238, 103}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {241, 103}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{654, 239}, {194, 73}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{525, 802}, {197, 73}} - {{380, 836}, {512, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - {74, 862} - {{6, 978}, {478, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - {{604, 269}, {231, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - {{475, 832}, {234, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{746, 287}, {220, 133}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {215, 63}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{380, 496}, {480, 360}} - com.apple.InterfaceBuilder.CocoaPlugin - {{380, 496}, {480, 360}} - - {{33, 99}, {480, 360}} - {3.40282e+38, 3.40282e+38} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{591, 420}, {83, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{523, 2}, {178, 283}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{753, 197}, {170, 63}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{725, 289}, {246, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{674, 260}, {204, 183}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{878, 180}, {164, 173}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - {{286, 129}, {275, 183}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{23, 794}, {245, 183}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{452, 109}, {196, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{145, 474}, {199, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - YES - - - YES - - - - - YES - - - YES - - - - 532 - - - - YES - - SecureWebSocketServerAppDelegate - NSObject - - window - NSWindow - - - IBProjectSource - SecureWebSocketServerAppDelegate.h - - - - - YES - - NSApplication - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSApplication.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSApplicationScripting.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSColorPanel.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSHelpManager.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSPageLayout.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSUserInterfaceItemSearching.h - - - - NSBrowser - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSBrowser.h - - - - NSControl - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSControl.h - - - - NSDocument - NSObject - - YES - - YES - printDocument: - revertDocumentToSaved: - runPageLayout: - saveDocument: - saveDocumentAs: - saveDocumentTo: - - - YES - id - id - id - id - id - id - - - - IBFrameworkSource - AppKit.framework/Headers/NSDocument.h - - - - NSDocument - - IBFrameworkSource - AppKit.framework/Headers/NSDocumentScripting.h - - - - NSDocumentController - NSObject - - YES - - YES - clearRecentDocuments: - newDocument: - openDocument: - saveAllDocuments: - - - YES - id - id - id - id - - - - IBFrameworkSource - AppKit.framework/Headers/NSDocumentController.h - - - - NSFontManager - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSFontManager.h - - - - NSFormatter - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFormatter.h - - - - NSMatrix - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSMatrix.h - - - - NSMenu - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSMenu.h - - - - NSMenuItem - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSMenuItem.h - - - - NSMovieView - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSMovieView.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSAccessibility.h - - - - NSObject - - - - NSObject - - - - NSObject - - - - NSObject - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSDictionaryController.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSDragging.h - - - - NSObject - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSFontPanel.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSKeyValueBinding.h - - - - NSObject - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSNibLoading.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSOutlineView.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSPasteboard.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSSavePanel.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSTableView.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSToolbarItem.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSView.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSClassDescription.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObjectScripting.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSPortCoder.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptClassDescription.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptObjectSpecifiers.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptWhoseTests.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLDownload.h - - - - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSInterfaceStyle.h - - - - NSResponder - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSResponder.h - - - - NSTableView - NSControl - - - - NSText - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSText.h - - - - NSTextView - NSText - - IBFrameworkSource - AppKit.framework/Headers/NSTextView.h - - - - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSClipView.h - - - - NSView - - - - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSRulerView.h - - - - NSView - NSResponder - - - - NSWindow - - IBFrameworkSource - AppKit.framework/Headers/NSDrawer.h - - - - NSWindow - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSWindow.h - - - - NSWindow - - IBFrameworkSource - AppKit.framework/Headers/NSWindowScripting.h - - - - - 0 - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - - - YES - ../SecureWebSocketServer.xcodeproj - 3 - - diff --git a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/main.m b/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/main.m deleted file mode 100644 index 1943fb915e6c1..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SecureWebSocketServer/SecureWebSocketServer/main.m +++ /dev/null @@ -1,14 +0,0 @@ -// -// main.m -// SecureWebSocketServer -// -// Created by Robbie Hanson on 6/3/11. -// Copyright 2011 Voalte. All rights reserved. -// - -#import - -int main(int argc, char *argv[]) -{ - return NSApplicationMain(argc, (const char **)argv); -} diff --git a/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/AppDelegate.h b/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/AppDelegate.h deleted file mode 100644 index d0977339a05e1..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/AppDelegate.h +++ /dev/null @@ -1,8 +0,0 @@ -#import -@class HTTPServer; - -@interface AppDelegate : NSObject -{ - HTTPServer *httpServer; -} -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/AppDelegate.m b/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/AppDelegate.m deleted file mode 100644 index 06c2fa3946529..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/AppDelegate.m +++ /dev/null @@ -1,43 +0,0 @@ -#import "AppDelegate.h" -#import "HTTPServer.h" -#import "DDLog.h" -#import "DDTTYLogger.h" - -// Log levels: off, error, warn, info, verbose -static const int ddLogLevel = LOG_LEVEL_VERBOSE; - - -@implementation AppDelegate - -- (void)applicationDidFinishLaunching:(NSNotification *)aNotification -{ - // Configure our logging framework. - // To keep things simple and fast, we're just going to log to the Xcode console. - [DDLog addLogger:[DDTTYLogger sharedInstance]]; - - // Initalize our http server - httpServer = [[HTTPServer alloc] init]; - - // Tell the server to broadcast its presence via Bonjour. - // This allows browsers such as Safari to automatically discover our service. - [httpServer setType:@"_http._tcp."]; - - // Normally there's no need to run our server on any specific port. - // Technologies like Bonjour allow clients to dynamically discover the server's port at runtime. - // However, for easy testing you may want force a certain port so you can just hit the refresh button. -// [httpServer setPort:12345]; - - // Serve files from the standard Sites folder - NSString *docRoot = [@"~/Sites" stringByExpandingTildeInPath]; - DDLogInfo(@"Setting document root: %@", docRoot); - - [httpServer setDocumentRoot:docRoot]; - - NSError *error = nil; - if(![httpServer start:&error]) - { - DDLogError(@"Error starting HTTP Server: %@", error); - } -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/English.lproj/InfoPlist.strings b/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/English.lproj/InfoPlist.strings deleted file mode 100644 index a1229adbf4543..0000000000000 Binary files a/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/English.lproj/InfoPlist.strings and /dev/null differ diff --git a/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/English.lproj/MainMenu.nib/designable.nib b/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/English.lproj/MainMenu.nib/designable.nib deleted file mode 100644 index c869f52834572..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/English.lproj/MainMenu.nib/designable.nib +++ /dev/null @@ -1,2291 +0,0 @@ - - - - 1060 - 10H574 - 804 - 1038.35 - 461.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 804 - - - YES - - - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - - PluginDependencyRecalculationVersion - - - - YES - - - NSApplication - - - - FirstResponder - - - NSApplication - - - 15 - 2 - {{220, 433}, {480, 360}} - 1886912512 - Window - NSWindow - - View - - {1.79769e+308, 1.79769e+308} - {213, 107} - - - 256 - {480, 360} - - - {{0, 0}, {1280, 832}} - {213, 129} - {1.79769e+308, 1.79769e+308} - Window - - - MainMenu - - YES - - - NewApplication - - 1048576 - 2147483647 - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - submenuAction: - - NewApplication - - YES - - - About NewApplication - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Preferences… - , - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Services - - 1048576 - 2147483647 - - - submenuAction: - - - Services - - - YES - - _NSServicesMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Hide NewApplication - h - 1048576 - 2147483647 - - - - - - Hide Others - h - 1572864 - 2147483647 - - - - - - Show All - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Quit NewApplication - q - 1048576 - 2147483647 - - - - - _NSAppleMenu - - - - - File - - 1048576 - 2147483647 - - - submenuAction: - - - File - - - YES - - - New - n - 1048576 - 2147483647 - - - - - - Open... - o - 1048576 - 2147483647 - - - - - - Open Recent - - 1048576 - 2147483647 - - - submenuAction: - - - Open Recent - - - YES - - - Clear Menu - - 1048576 - 2147483647 - - - - - _NSRecentDocumentsMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Close - w - 1048576 - 2147483647 - - - - - - Save - s - 1048576 - 2147483647 - - - - - - Save As… - S - 1048576 - 2147483647 - - - - - - Revert - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Page Setup… - P - 1048576 - 2147483647 - - - - - - Print… - p - 1048576 - 2147483647 - - - - - - - - - Edit - - 1048576 - 2147483647 - - - submenuAction: - - - Edit - - - YES - - - Undo - z - 1048576 - 2147483647 - - - - - - Redo - Z - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Cut - x - 1048576 - 2147483647 - - - - - - Copy - c - 1048576 - 2147483647 - - - - - - Paste - v - 1048576 - 2147483647 - - - - - - Paste and Match Style - V - 1572864 - 2147483647 - - - - - - Delete - - 1048576 - 2147483647 - - - - - - Select All - a - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Find - - 1048576 - 2147483647 - - - submenuAction: - - - Find - - - YES - - - Find… - f - 1048576 - 2147483647 - - - 1 - - - - Find Next - g - 1048576 - 2147483647 - - - 2 - - - - Find Previous - G - 1048576 - 2147483647 - - - 3 - - - - Use Selection for Find - e - 1048576 - 2147483647 - - - 7 - - - - Jump to Selection - j - 1048576 - 2147483647 - - - - - - - - - Spelling - - 1048576 - 2147483647 - - - submenuAction: - - Spelling - - YES - - - Spelling… - : - 1048576 - 2147483647 - - - - - - Check Spelling - ; - 1048576 - 2147483647 - - - - - - Check Spelling as You Type - - 1048576 - 2147483647 - - - - - - - - - - - - Window - - 1048576 - 2147483647 - - - submenuAction: - - - Window - - - YES - - - Minimize - m - 1048576 - 2147483647 - - - - - - Zoom - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Bring All to Front - - 1048576 - 2147483647 - - - - - _NSWindowsMenu - - - - - Help - - 1048576 - 2147483647 - - - submenuAction: - - Help - - YES - - - NewApplication Help - ? - 1048576 - 2147483647 - - - - - - - - _NSMainMenu - - - AppDelegate - - - - - YES - - - performMiniaturize: - - - - 37 - - - - arrangeInFront: - - - - 39 - - - - print: - - - - 86 - - - - runPageLayout: - - - - 87 - - - - showHelp: - - - - 122 - - - - clearRecentDocuments: - - - - 127 - - - - terminate: - - - - 139 - - - - orderFrontStandardAboutPanel: - - - - 142 - - - - hideOtherApplications: - - - - 146 - - - - hide: - - - - 152 - - - - unhideAllApplications: - - - - 153 - - - - cut: - - - - 175 - - - - paste: - - - - 176 - - - - redo: - - - - 178 - - - - selectAll: - - - - 179 - - - - undo: - - - - 180 - - - - copy: - - - - 181 - - - - showGuessPanel: - - - - 188 - - - - checkSpelling: - - - - 190 - - - - toggleContinuousSpellChecking: - - - - 192 - - - - performClose: - - - - 193 - - - - delete: - - - - 195 - - - - performZoom: - - - - 198 - - - - performFindPanelAction: - - - - 199 - - - - performFindPanelAction: - - - - 200 - - - - performFindPanelAction: - - - - 201 - - - - performFindPanelAction: - - - - 202 - - - - centerSelectionInVisibleArea: - - - - 203 - - - - pasteAsPlainText: - - - - 205 - - - - delegate - - - - 207 - - - - - YES - - 0 - - YES - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - 21 - - - YES - - - - Window - - - 2 - - - - - 29 - - - YES - - - - - - - - MainMenu - - - 19 - - - YES - - - - - - 24 - - - YES - - - - - - - - - 5 - - - - - 23 - - - - - 92 - - - - - 197 - - - - - 56 - - - YES - - - - - - 57 - - - YES - - - - - - - - - - - - - - - - 58 - - - - - 129 - - - - - 131 - - - YES - - - - - - 130 - - - - - 134 - - - - - 136 - - - - - 143 - - - - - 144 - - - - - 145 - - - - - 149 - - - - - 150 - - - - - 196 - - - - - 83 - - - YES - - - - - - 81 - - - YES - - - - - - - - - - - - - - - - 72 - - - - - 73 - - - - - 74 - - - - - 75 - - - - - 77 - - - - - 78 - - - - - 79 - - - - - 80 - - - - - 82 - - - - - 112 - - - - - 124 - - - YES - - - - - - 125 - - - YES - - - - - - 126 - - - - - 103 - - - YES - - - - - - 106 - - - YES - - - - - - 111 - - - - - 163 - - - YES - - - - - - 169 - - - YES - - - - - - - - - - - - - - - - - 156 - - - - - 157 - - - - - 158 - - - - - 160 - - - - - 164 - - - - - 168 - - - YES - - - - - - 159 - - - YES - - - - - - - - - - 154 - - - - - 155 - - - - - 161 - - - - - 162 - - - - - 167 - - - - - 171 - - - - - 172 - - - - - 173 - - - - - 174 - - - - - 184 - - - YES - - - - - - 185 - - - YES - - - - - - - - 187 - - - - - 189 - - - - - 191 - - - - - 204 - - - - - 206 - - - AppDelegate - - - -3 - - - Application - - - - - YES - - YES - 103.IBPluginDependency - 103.ImportedFromIB2 - 106.IBPluginDependency - 106.ImportedFromIB2 - 111.IBPluginDependency - 111.ImportedFromIB2 - 112.IBPluginDependency - 112.ImportedFromIB2 - 124.IBPluginDependency - 124.ImportedFromIB2 - 125.IBPluginDependency - 125.ImportedFromIB2 - 126.IBPluginDependency - 126.ImportedFromIB2 - 129.IBPluginDependency - 129.ImportedFromIB2 - 130.IBPluginDependency - 130.ImportedFromIB2 - 131.IBPluginDependency - 131.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 - 136.IBPluginDependency - 136.ImportedFromIB2 - 143.IBPluginDependency - 143.ImportedFromIB2 - 144.IBPluginDependency - 144.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 - 154.IBPluginDependency - 154.ImportedFromIB2 - 155.IBPluginDependency - 155.ImportedFromIB2 - 156.IBPluginDependency - 156.ImportedFromIB2 - 157.IBPluginDependency - 157.ImportedFromIB2 - 158.IBPluginDependency - 158.ImportedFromIB2 - 159.IBPluginDependency - 159.ImportedFromIB2 - 160.IBPluginDependency - 160.ImportedFromIB2 - 161.IBPluginDependency - 161.ImportedFromIB2 - 162.IBPluginDependency - 162.ImportedFromIB2 - 163.IBPluginDependency - 163.ImportedFromIB2 - 164.IBPluginDependency - 164.ImportedFromIB2 - 167.IBPluginDependency - 167.ImportedFromIB2 - 168.IBPluginDependency - 168.ImportedFromIB2 - 169.IBPluginDependency - 169.ImportedFromIB2 - 171.IBPluginDependency - 171.ImportedFromIB2 - 172.IBPluginDependency - 172.ImportedFromIB2 - 173.IBPluginDependency - 173.ImportedFromIB2 - 174.IBPluginDependency - 174.ImportedFromIB2 - 184.IBPluginDependency - 184.ImportedFromIB2 - 185.IBPluginDependency - 185.ImportedFromIB2 - 187.IBPluginDependency - 187.ImportedFromIB2 - 189.IBPluginDependency - 189.ImportedFromIB2 - 19.IBPluginDependency - 19.ImportedFromIB2 - 191.IBPluginDependency - 191.ImportedFromIB2 - 196.IBPluginDependency - 196.ImportedFromIB2 - 197.IBPluginDependency - 197.ImportedFromIB2 - 2.IBPluginDependency - 2.ImportedFromIB2 - 204.IBPluginDependency - 204.ImportedFromIB2 - 206.ImportedFromIB2 - 21.IBEditorWindowLastContentRect - 21.IBPluginDependency - 21.IBWindowTemplateEditedContentRect - 21.ImportedFromIB2 - 21.NSWindowTemplate.visibleAtLaunch - 21.windowTemplate.hasMinSize - 21.windowTemplate.minSize - 23.IBPluginDependency - 23.ImportedFromIB2 - 24.IBPluginDependency - 24.ImportedFromIB2 - 29.IBEditorWindowLastContentRect - 29.IBPluginDependency - 29.ImportedFromIB2 - 5.IBPluginDependency - 5.ImportedFromIB2 - 56.IBPluginDependency - 56.ImportedFromIB2 - 57.IBPluginDependency - 57.ImportedFromIB2 - 58.IBPluginDependency - 58.ImportedFromIB2 - 72.IBPluginDependency - 72.ImportedFromIB2 - 73.IBPluginDependency - 73.ImportedFromIB2 - 74.IBPluginDependency - 74.ImportedFromIB2 - 75.IBPluginDependency - 75.ImportedFromIB2 - 77.IBPluginDependency - 77.ImportedFromIB2 - 78.IBPluginDependency - 78.ImportedFromIB2 - 79.IBPluginDependency - 79.ImportedFromIB2 - 80.IBPluginDependency - 80.ImportedFromIB2 - 81.IBPluginDependency - 81.ImportedFromIB2 - 82.IBPluginDependency - 82.ImportedFromIB2 - 83.IBPluginDependency - 83.ImportedFromIB2 - 92.IBPluginDependency - 92.ImportedFromIB2 - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - {{333, 474}, {480, 360}} - com.apple.InterfaceBuilder.CocoaPlugin - {{333, 474}, {480, 360}} - - - - {213, 107} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{333, 803}, {362, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - YES - - - YES - - - - - YES - - - YES - - - - 208 - - - - YES - - AppDelegate - NSObject - - IBProjectSource - AppDelegate.h - - - - AppDelegate - NSObject - - IBUserSource - - - - - FirstResponder - - IBUserSource - - - - - - YES - - NSApplication - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSApplication.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSApplicationScripting.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSColorPanel.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSHelpManager.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSPageLayout.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSUserInterfaceItemSearching.h - - - - NSBrowser - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSBrowser.h - - - - NSControl - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSControl.h - - - - NSDocument - NSObject - - YES - - YES - printDocument: - revertDocumentToSaved: - runPageLayout: - saveDocument: - saveDocumentAs: - saveDocumentTo: - - - YES - id - id - id - id - id - id - - - - YES - - YES - printDocument: - revertDocumentToSaved: - runPageLayout: - saveDocument: - saveDocumentAs: - saveDocumentTo: - - - YES - - printDocument: - id - - - revertDocumentToSaved: - id - - - runPageLayout: - id - - - saveDocument: - id - - - saveDocumentAs: - id - - - saveDocumentTo: - id - - - - - IBFrameworkSource - AppKit.framework/Headers/NSDocument.h - - - - NSDocument - - IBFrameworkSource - AppKit.framework/Headers/NSDocumentScripting.h - - - - NSDocumentController - NSObject - - YES - - YES - clearRecentDocuments: - newDocument: - openDocument: - saveAllDocuments: - - - YES - id - id - id - id - - - - YES - - YES - clearRecentDocuments: - newDocument: - openDocument: - saveAllDocuments: - - - YES - - clearRecentDocuments: - id - - - newDocument: - id - - - openDocument: - id - - - saveAllDocuments: - id - - - - - IBFrameworkSource - AppKit.framework/Headers/NSDocumentController.h - - - - NSFormatter - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFormatter.h - - - - NSMatrix - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSMatrix.h - - - - NSMenu - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSMenu.h - - - - NSMenuItem - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSMenuItem.h - - - - NSMovieView - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSMovieView.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSAccessibility.h - - - - NSObject - - - - NSObject - - - - NSObject - - - - NSObject - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSDictionaryController.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSDragging.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSFontManager.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSFontPanel.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSKeyValueBinding.h - - - - NSObject - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSNibLoading.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSOutlineView.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSPasteboard.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSSavePanel.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSTableView.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSToolbarItem.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSView.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSClassDescription.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObjectScripting.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSPortCoder.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptClassDescription.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptObjectSpecifiers.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptWhoseTests.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLDownload.h - - - - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSInterfaceStyle.h - - - - NSResponder - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSResponder.h - - - - NSTableView - NSControl - - - - NSText - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSText.h - - - - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSClipView.h - - - - NSView - - - - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSRulerView.h - - - - NSView - NSResponder - - - - NSWindow - - IBFrameworkSource - AppKit.framework/Headers/NSDrawer.h - - - - NSWindow - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSWindow.h - - - - NSWindow - - IBFrameworkSource - AppKit.framework/Headers/NSWindowScripting.h - - - - - 0 - IBCocoaFramework - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - - - YES - - 3 - - YES - - YES - NSMenuCheckmark - NSMenuMixedState - - - YES - {9, 8} - {7, 2} - - - - diff --git a/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/English.lproj/MainMenu.nib/keyedobjects.nib b/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/English.lproj/MainMenu.nib/keyedobjects.nib deleted file mode 100644 index 984efe794875b..0000000000000 Binary files a/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/English.lproj/MainMenu.nib/keyedobjects.nib and /dev/null differ diff --git a/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/Info.plist b/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/Info.plist deleted file mode 100644 index a4fded79d5a0d..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.yourcompany.SimpleHTTPServer - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/Instructions.txt b/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/Instructions.txt deleted file mode 100644 index 0139f69b00617..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/Instructions.txt +++ /dev/null @@ -1,17 +0,0 @@ -INFO: - -This is a bare bones example of how to embed the CocoaHTTPServer in a desktop application. The document root of the server is set to the ~/Sites folder. - -INSTRUCTIONS: - -Open the Xcode project, and build and go. - -On the Xcode console you'll see a message saying: -"Started HTTP server on port 59123" - -Now open your browser and type in the URL: -http://localhost:59123 - -(Replace 59123 with whatever port the server is actually running on.) - -Enjoy. \ No newline at end of file diff --git a/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/SimpleHTTPServer.xcodeproj/project.pbxproj b/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/SimpleHTTPServer.xcodeproj/project.pbxproj deleted file mode 100644 index d9eecc47b874a..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/SimpleHTTPServer.xcodeproj/project.pbxproj +++ /dev/null @@ -1,456 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; }; - 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; - 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; - DC373002139DC57A00A8407D /* DDData.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372FE6139DC57A00A8407D /* DDData.m */; }; - DC373003139DC57A00A8407D /* DDNumber.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372FE8139DC57A00A8407D /* DDNumber.m */; }; - DC373004139DC57A00A8407D /* DDRange.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372FEA139DC57A00A8407D /* DDRange.m */; }; - DC373005139DC57A00A8407D /* HTTPAuthenticationRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372FEC139DC57A00A8407D /* HTTPAuthenticationRequest.m */; }; - DC373006139DC57A00A8407D /* HTTPConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372FEE139DC57A00A8407D /* HTTPConnection.m */; }; - DC373007139DC57A00A8407D /* HTTPMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372FF1139DC57A00A8407D /* HTTPMessage.m */; }; - DC373008139DC57A00A8407D /* HTTPServer.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372FF4139DC57A00A8407D /* HTTPServer.m */; }; - DC373009139DC57A00A8407D /* HTTPAsyncFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372FF7139DC57A00A8407D /* HTTPAsyncFileResponse.m */; }; - DC37300A139DC57A00A8407D /* HTTPDataResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372FF9139DC57A00A8407D /* HTTPDataResponse.m */; }; - DC37300B139DC57A00A8407D /* HTTPDynamicFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372FFB139DC57A00A8407D /* HTTPDynamicFileResponse.m */; }; - DC37300C139DC57A00A8407D /* HTTPFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372FFD139DC57A00A8407D /* HTTPFileResponse.m */; }; - DC37300D139DC57A00A8407D /* HTTPRedirectResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372FFF139DC57A00A8407D /* HTTPRedirectResponse.m */; }; - DC37300E139DC57A00A8407D /* WebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = DC373001139DC57A00A8407D /* WebSocket.m */; }; - DC41D6D90C178D5700F8D00D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DC41D6D70C178D5700F8D00D /* AppDelegate.m */; }; - DC9631E0129E2DBB003AC1CE /* GCDAsyncSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = DC9631DF129E2DBB003AC1CE /* GCDAsyncSocket.m */; }; - DC9631F2129E2DE9003AC1CE /* DDASLLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = DC9631EB129E2DE9003AC1CE /* DDASLLogger.m */; }; - DC9631F3129E2DE9003AC1CE /* DDFileLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = DC9631ED129E2DE9003AC1CE /* DDFileLogger.m */; }; - DC9631F4129E2DE9003AC1CE /* DDLog.m in Sources */ = {isa = PBXBuildFile; fileRef = DC9631EF129E2DE9003AC1CE /* DDLog.m */; }; - DC9631F5129E2DE9003AC1CE /* DDTTYLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = DC9631F1129E2DE9003AC1CE /* DDTTYLogger.m */; }; - DC963205129E2E3C003AC1CE /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC963204129E2E3C003AC1CE /* Security.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - DC41D6F60C178E9200F8D00D /* Copy Internal Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Copy Internal Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; - 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 29B97319FDCFA39411CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/MainMenu.nib; sourceTree = ""; }; - 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; - 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; - 32CA4F630368D1EE00C91783 /* SimpleHTTPServer_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleHTTPServer_Prefix.pch; sourceTree = ""; }; - 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; - 8D1107320486CEB800E47090 /* SimpleHTTPServer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SimpleHTTPServer.app; sourceTree = BUILT_PRODUCTS_DIR; }; - DC372E2A139D31CE00A8407D /* Base.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = ""; }; - DC372E2B139D31CE00A8407D /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; - DC372E2C139D31CE00A8407D /* Release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; - DC372FE5139DC57A00A8407D /* DDData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDData.h; sourceTree = ""; }; - DC372FE6139DC57A00A8407D /* DDData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDData.m; sourceTree = ""; }; - DC372FE7139DC57A00A8407D /* DDNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDNumber.h; sourceTree = ""; }; - DC372FE8139DC57A00A8407D /* DDNumber.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDNumber.m; sourceTree = ""; }; - DC372FE9139DC57A00A8407D /* DDRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDRange.h; sourceTree = ""; }; - DC372FEA139DC57A00A8407D /* DDRange.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDRange.m; sourceTree = ""; }; - DC372FEB139DC57A00A8407D /* HTTPAuthenticationRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPAuthenticationRequest.h; path = ../../Core/HTTPAuthenticationRequest.h; sourceTree = ""; }; - DC372FEC139DC57A00A8407D /* HTTPAuthenticationRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPAuthenticationRequest.m; path = ../../Core/HTTPAuthenticationRequest.m; sourceTree = ""; }; - DC372FED139DC57A00A8407D /* HTTPConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPConnection.h; path = ../../Core/HTTPConnection.h; sourceTree = ""; }; - DC372FEE139DC57A00A8407D /* HTTPConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPConnection.m; path = ../../Core/HTTPConnection.m; sourceTree = ""; }; - DC372FEF139DC57A00A8407D /* HTTPLogging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPLogging.h; path = ../../Core/HTTPLogging.h; sourceTree = ""; }; - DC372FF0139DC57A00A8407D /* HTTPMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPMessage.h; path = ../../Core/HTTPMessage.h; sourceTree = ""; }; - DC372FF1139DC57A00A8407D /* HTTPMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPMessage.m; path = ../../Core/HTTPMessage.m; sourceTree = ""; }; - DC372FF2139DC57A00A8407D /* HTTPResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPResponse.h; path = ../../Core/HTTPResponse.h; sourceTree = ""; }; - DC372FF3139DC57A00A8407D /* HTTPServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPServer.h; path = ../../Core/HTTPServer.h; sourceTree = ""; }; - DC372FF4139DC57A00A8407D /* HTTPServer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPServer.m; path = ../../Core/HTTPServer.m; sourceTree = ""; }; - DC372FF6139DC57A00A8407D /* HTTPAsyncFileResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPAsyncFileResponse.h; sourceTree = ""; }; - DC372FF7139DC57A00A8407D /* HTTPAsyncFileResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPAsyncFileResponse.m; sourceTree = ""; }; - DC372FF8139DC57A00A8407D /* HTTPDataResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPDataResponse.h; sourceTree = ""; }; - DC372FF9139DC57A00A8407D /* HTTPDataResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPDataResponse.m; sourceTree = ""; }; - DC372FFA139DC57A00A8407D /* HTTPDynamicFileResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPDynamicFileResponse.h; sourceTree = ""; }; - DC372FFB139DC57A00A8407D /* HTTPDynamicFileResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPDynamicFileResponse.m; sourceTree = ""; }; - DC372FFC139DC57A00A8407D /* HTTPFileResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPFileResponse.h; sourceTree = ""; }; - DC372FFD139DC57A00A8407D /* HTTPFileResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPFileResponse.m; sourceTree = ""; }; - DC372FFE139DC57A00A8407D /* HTTPRedirectResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPRedirectResponse.h; sourceTree = ""; }; - DC372FFF139DC57A00A8407D /* HTTPRedirectResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPRedirectResponse.m; sourceTree = ""; }; - DC373000139DC57A00A8407D /* WebSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebSocket.h; path = ../../Core/WebSocket.h; sourceTree = ""; }; - DC373001139DC57A00A8407D /* WebSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WebSocket.m; path = ../../Core/WebSocket.m; sourceTree = ""; }; - DC41D6D70C178D5700F8D00D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - DC41D6D80C178D5700F8D00D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - DC9631DE129E2DBB003AC1CE /* GCDAsyncSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GCDAsyncSocket.h; path = ../../Vendor/CocoaAsyncSocket/GCDAsyncSocket.h; sourceTree = SOURCE_ROOT; }; - DC9631DF129E2DBB003AC1CE /* GCDAsyncSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GCDAsyncSocket.m; path = ../../Vendor/CocoaAsyncSocket/GCDAsyncSocket.m; sourceTree = SOURCE_ROOT; }; - DC9631EA129E2DE9003AC1CE /* DDASLLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDASLLogger.h; path = ../../Vendor/CocoaLumberjack/DDASLLogger.h; sourceTree = SOURCE_ROOT; }; - DC9631EB129E2DE9003AC1CE /* DDASLLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDASLLogger.m; path = ../../Vendor/CocoaLumberjack/DDASLLogger.m; sourceTree = SOURCE_ROOT; }; - DC9631EC129E2DE9003AC1CE /* DDFileLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDFileLogger.h; path = ../../Vendor/CocoaLumberjack/DDFileLogger.h; sourceTree = SOURCE_ROOT; }; - DC9631ED129E2DE9003AC1CE /* DDFileLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDFileLogger.m; path = ../../Vendor/CocoaLumberjack/DDFileLogger.m; sourceTree = SOURCE_ROOT; }; - DC9631EE129E2DE9003AC1CE /* DDLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDLog.h; path = ../../Vendor/CocoaLumberjack/DDLog.h; sourceTree = SOURCE_ROOT; }; - DC9631EF129E2DE9003AC1CE /* DDLog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDLog.m; path = ../../Vendor/CocoaLumberjack/DDLog.m; sourceTree = SOURCE_ROOT; }; - DC9631F0129E2DE9003AC1CE /* DDTTYLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDTTYLogger.h; path = ../../Vendor/CocoaLumberjack/DDTTYLogger.h; sourceTree = SOURCE_ROOT; }; - DC9631F1129E2DE9003AC1CE /* DDTTYLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDTTYLogger.m; path = ../../Vendor/CocoaLumberjack/DDTTYLogger.m; sourceTree = SOURCE_ROOT; }; - DC963204129E2E3C003AC1CE /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8D11072E0486CEB800E47090 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, - DC963205129E2E3C003AC1CE /* Security.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Classes */ = { - isa = PBXGroup; - children = ( - DC41D6D80C178D5700F8D00D /* AppDelegate.h */, - DC41D6D70C178D5700F8D00D /* AppDelegate.m */, - ); - name = Classes; - sourceTree = ""; - }; - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { - isa = PBXGroup; - children = ( - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, - DC963204129E2E3C003AC1CE /* Security.framework */, - ); - name = "Linked Frameworks"; - sourceTree = ""; - }; - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - 29B97324FDCFA39411CA2CEA /* AppKit.framework */, - 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */, - 29B97325FDCFA39411CA2CEA /* Foundation.framework */, - ); - name = "Other Frameworks"; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 8D1107320486CEB800E47090 /* SimpleHTTPServer.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* SimpleHTTPServer */ = { - isa = PBXGroup; - children = ( - DC9631E9129E2DD5003AC1CE /* Logging */, - DC41D6CD0C178CEA00F8D00D /* TCP */, - DC41D6D50C178D1600F8D00D /* HTTP */, - 080E96DDFE201D6D7F000001 /* Classes */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = SimpleHTTPServer; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - DC372E29139D31CE00A8407D /* Xcode-Configurations */, - 32CA4F630368D1EE00C91783 /* SimpleHTTPServer_Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.m */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - 8D1107310486CEB800E47090 /* Info.plist */, - 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, - 29B97318FDCFA39411CA2CEA /* MainMenu.nib */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, - ); - name = Frameworks; - sourceTree = ""; - }; - DC372E29139D31CE00A8407D /* Xcode-Configurations */ = { - isa = PBXGroup; - children = ( - DC372E2A139D31CE00A8407D /* Base.xcconfig */, - DC372E2B139D31CE00A8407D /* Debug.xcconfig */, - DC372E2C139D31CE00A8407D /* Release.xcconfig */, - ); - name = "Xcode-Configurations"; - path = "../Xcode-Configurations"; - sourceTree = ""; - }; - DC372FE4139DC57A00A8407D /* Categories */ = { - isa = PBXGroup; - children = ( - DC372FE5139DC57A00A8407D /* DDData.h */, - DC372FE6139DC57A00A8407D /* DDData.m */, - DC372FE7139DC57A00A8407D /* DDNumber.h */, - DC372FE8139DC57A00A8407D /* DDNumber.m */, - DC372FE9139DC57A00A8407D /* DDRange.h */, - DC372FEA139DC57A00A8407D /* DDRange.m */, - ); - name = Categories; - path = ../../Core/Categories; - sourceTree = ""; - }; - DC372FF5139DC57A00A8407D /* Responses */ = { - isa = PBXGroup; - children = ( - DC372FF8139DC57A00A8407D /* HTTPDataResponse.h */, - DC372FF9139DC57A00A8407D /* HTTPDataResponse.m */, - DC372FFC139DC57A00A8407D /* HTTPFileResponse.h */, - DC372FFD139DC57A00A8407D /* HTTPFileResponse.m */, - DC372FFE139DC57A00A8407D /* HTTPRedirectResponse.h */, - DC372FFF139DC57A00A8407D /* HTTPRedirectResponse.m */, - DC372FF6139DC57A00A8407D /* HTTPAsyncFileResponse.h */, - DC372FF7139DC57A00A8407D /* HTTPAsyncFileResponse.m */, - DC372FFA139DC57A00A8407D /* HTTPDynamicFileResponse.h */, - DC372FFB139DC57A00A8407D /* HTTPDynamicFileResponse.m */, - ); - name = Responses; - path = ../../Core/Responses; - sourceTree = ""; - }; - DC41D6CD0C178CEA00F8D00D /* TCP */ = { - isa = PBXGroup; - children = ( - DC9631DE129E2DBB003AC1CE /* GCDAsyncSocket.h */, - DC9631DF129E2DBB003AC1CE /* GCDAsyncSocket.m */, - ); - name = TCP; - sourceTree = ""; - }; - DC41D6D50C178D1600F8D00D /* HTTP */ = { - isa = PBXGroup; - children = ( - DC372FEF139DC57A00A8407D /* HTTPLogging.h */, - DC372FEB139DC57A00A8407D /* HTTPAuthenticationRequest.h */, - DC372FEC139DC57A00A8407D /* HTTPAuthenticationRequest.m */, - DC372FF3139DC57A00A8407D /* HTTPServer.h */, - DC372FF4139DC57A00A8407D /* HTTPServer.m */, - DC372FED139DC57A00A8407D /* HTTPConnection.h */, - DC372FEE139DC57A00A8407D /* HTTPConnection.m */, - DC372FF0139DC57A00A8407D /* HTTPMessage.h */, - DC372FF1139DC57A00A8407D /* HTTPMessage.m */, - DC372FF2139DC57A00A8407D /* HTTPResponse.h */, - DC373000139DC57A00A8407D /* WebSocket.h */, - DC373001139DC57A00A8407D /* WebSocket.m */, - DC372FF5139DC57A00A8407D /* Responses */, - DC372FE4139DC57A00A8407D /* Categories */, - ); - name = HTTP; - sourceTree = ""; - }; - DC9631E9129E2DD5003AC1CE /* Logging */ = { - isa = PBXGroup; - children = ( - DC9631EE129E2DE9003AC1CE /* DDLog.h */, - DC9631EF129E2DE9003AC1CE /* DDLog.m */, - DC9631F0129E2DE9003AC1CE /* DDTTYLogger.h */, - DC9631F1129E2DE9003AC1CE /* DDTTYLogger.m */, - DC9631EA129E2DE9003AC1CE /* DDASLLogger.h */, - DC9631EB129E2DE9003AC1CE /* DDASLLogger.m */, - DC9631EC129E2DE9003AC1CE /* DDFileLogger.h */, - DC9631ED129E2DE9003AC1CE /* DDFileLogger.m */, - ); - name = Logging; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 8D1107260486CEB800E47090 /* SimpleHTTPServer */ = { - isa = PBXNativeTarget; - buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "SimpleHTTPServer" */; - buildPhases = ( - 8D1107290486CEB800E47090 /* Resources */, - 8D11072C0486CEB800E47090 /* Sources */, - 8D11072E0486CEB800E47090 /* Frameworks */, - DC41D6F60C178E9200F8D00D /* Copy Internal Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SimpleHTTPServer; - productInstallPath = "$(HOME)/Applications"; - productName = SimpleHTTPServer; - productReference = 8D1107320486CEB800E47090 /* SimpleHTTPServer.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0420; - }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SimpleHTTPServer" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* SimpleHTTPServer */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 8D1107260486CEB800E47090 /* SimpleHTTPServer */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 8D1107290486CEB800E47090 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */, - 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 8D11072C0486CEB800E47090 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D11072D0486CEB800E47090 /* main.m in Sources */, - DC41D6D90C178D5700F8D00D /* AppDelegate.m in Sources */, - DC9631E0129E2DBB003AC1CE /* GCDAsyncSocket.m in Sources */, - DC9631F2129E2DE9003AC1CE /* DDASLLogger.m in Sources */, - DC9631F3129E2DE9003AC1CE /* DDFileLogger.m in Sources */, - DC9631F4129E2DE9003AC1CE /* DDLog.m in Sources */, - DC9631F5129E2DE9003AC1CE /* DDTTYLogger.m in Sources */, - DC373002139DC57A00A8407D /* DDData.m in Sources */, - DC373003139DC57A00A8407D /* DDNumber.m in Sources */, - DC373004139DC57A00A8407D /* DDRange.m in Sources */, - DC373005139DC57A00A8407D /* HTTPAuthenticationRequest.m in Sources */, - DC373006139DC57A00A8407D /* HTTPConnection.m in Sources */, - DC373007139DC57A00A8407D /* HTTPMessage.m in Sources */, - DC373008139DC57A00A8407D /* HTTPServer.m in Sources */, - DC373009139DC57A00A8407D /* HTTPAsyncFileResponse.m in Sources */, - DC37300A139DC57A00A8407D /* HTTPDataResponse.m in Sources */, - DC37300B139DC57A00A8407D /* HTTPDynamicFileResponse.m in Sources */, - DC37300C139DC57A00A8407D /* HTTPFileResponse.m in Sources */, - DC37300D139DC57A00A8407D /* HTTPRedirectResponse.m in Sources */, - DC37300E139DC57A00A8407D /* WebSocket.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 089C165DFE840E0CC02AAC07 /* English */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - 29B97318FDCFA39411CA2CEA /* MainMenu.nib */ = { - isa = PBXVariantGroup; - children = ( - 29B97319FDCFA39411CA2CEA /* English */, - ); - name = MainMenu.nib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - C01FCF4B08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = SimpleHTTPServer; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - C01FCF4C08A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = SimpleHTTPServer; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DC372E2B139D31CE00A8407D /* Debug.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - SDKROOT = macosx; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DC372E2C139D31CE00A8407D /* Release.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - SDKROOT = macosx; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "SimpleHTTPServer" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4B08A954540054247B /* Debug */, - C01FCF4C08A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SimpleHTTPServer" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/SimpleHTTPServer.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/SimpleHTTPServer.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 84df21ccf9abd..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/SimpleHTTPServer.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/SimpleHTTPServer_Prefix.pch b/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/SimpleHTTPServer_Prefix.pch deleted file mode 100644 index 3435bc2504cb3..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/SimpleHTTPServer_Prefix.pch +++ /dev/null @@ -1,7 +0,0 @@ -// -// Prefix header for all source files of the 'SimpleHTTPServer' target in the 'SimpleHTTPServer' project -// - -#ifdef __OBJC__ - #import -#endif diff --git a/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/main.m b/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/main.m deleted file mode 100644 index 5d42ec063bd7c..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SimpleHTTPServer/main.m +++ /dev/null @@ -1,14 +0,0 @@ -// -// main.m -// SimpleHTTPServer -// -// Created by Robert Hanson on 6/6/07. -// Copyright Deusty Designs, LLC 2007. All rights reserved. -// - -#import - -int main(int argc, char *argv[]) -{ - return NSApplicationMain(argc, (const char **) argv); -} diff --git a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/English.lproj/InfoPlist.strings b/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/English.lproj/InfoPlist.strings deleted file mode 100644 index 477b28ff8f86a..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/English.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/English.lproj/MainMenu.xib b/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/English.lproj/MainMenu.xib deleted file mode 100644 index 09132c58b0b34..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/English.lproj/MainMenu.xib +++ /dev/null @@ -1,4119 +0,0 @@ - - - - 1060 - 10A324 - 719 - 1015 - 418.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 719 - - - YES - - - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - YES - - - YES - - - - YES - - NSApplication - - - FirstResponder - - - NSApplication - - - AMainMenu - - YES - - - SimpleWebSocketServer - - 1048576 - 2147483647 - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - submenuAction: - - SimpleWebSocketServer - - YES - - - About SimpleWebSocketServer - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Preferences… - , - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Services - - 1048576 - 2147483647 - - - submenuAction: - - Services - - YES - - _NSServicesMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Hide SimpleWebSocketServer - h - 1048576 - 2147483647 - - - - - - Hide Others - h - 1572864 - 2147483647 - - - - - - Show All - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Quit SimpleWebSocketServer - q - 1048576 - 2147483647 - - - - - _NSAppleMenu - - - - - File - - 1048576 - 2147483647 - - - submenuAction: - - File - - YES - - - New - n - 1048576 - 2147483647 - - - - - - Open… - o - 1048576 - 2147483647 - - - - - - Open Recent - - 1048576 - 2147483647 - - - submenuAction: - - Open Recent - - YES - - - Clear Menu - - 1048576 - 2147483647 - - - - - _NSRecentDocumentsMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Close - w - 1048576 - 2147483647 - - - - - - Save - s - 1048576 - 2147483647 - - - - - - Save As… - S - 1179648 - 2147483647 - - - - - - Revert to Saved - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Page Setup... - P - 1179648 - 2147483647 - - - - - - - Print… - p - 1048576 - 2147483647 - - - - - - - - - Edit - - 1048576 - 2147483647 - - - submenuAction: - - Edit - - YES - - - Undo - z - 1048576 - 2147483647 - - - - - - Redo - Z - 1179648 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Cut - x - 1048576 - 2147483647 - - - - - - Copy - c - 1048576 - 2147483647 - - - - - - Paste - v - 1048576 - 2147483647 - - - - - - Paste and Match Style - V - 1572864 - 2147483647 - - - - - - Delete - - 1048576 - 2147483647 - - - - - - Select All - a - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Find - - 1048576 - 2147483647 - - - submenuAction: - - Find - - YES - - - Find… - f - 1048576 - 2147483647 - - - 1 - - - - Find Next - g - 1048576 - 2147483647 - - - 2 - - - - Find Previous - G - 1179648 - 2147483647 - - - 3 - - - - Use Selection for Find - e - 1048576 - 2147483647 - - - 7 - - - - Jump to Selection - j - 1048576 - 2147483647 - - - - - - - - - Spelling and Grammar - - 1048576 - 2147483647 - - - submenuAction: - - Spelling and Grammar - - YES - - - Show Spelling and Grammar - : - 1048576 - 2147483647 - - - - - - Check Document Now - ; - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Check Spelling While Typing - - 1048576 - 2147483647 - - - - - - Check Grammar With Spelling - - 1048576 - 2147483647 - - - - - - Correct Spelling Automatically - - 2147483647 - - - - - - - - - Substitutions - - 1048576 - 2147483647 - - - submenuAction: - - Substitutions - - YES - - - Show Substitutions - - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Smart Copy/Paste - f - 1048576 - 2147483647 - - - 1 - - - - Smart Quotes - g - 1048576 - 2147483647 - - - 2 - - - - Smart Dashes - - 2147483647 - - - - - - Smart Links - G - 1179648 - 2147483647 - - - 3 - - - - Text Replacement - - 2147483647 - - - - - - - - - Transformations - - 2147483647 - - - submenuAction: - - Transformations - - YES - - - Make Upper Case - - 2147483647 - - - - - - Make Lower Case - - 2147483647 - - - - - - Capitalize - - 2147483647 - - - - - - - - - Speech - - 1048576 - 2147483647 - - - submenuAction: - - Speech - - YES - - - Start Speaking - - 1048576 - 2147483647 - - - - - - Stop Speaking - - 1048576 - 2147483647 - - - - - - - - - - - - Format - - 2147483647 - - - submenuAction: - - Format - - YES - - - Font - - 2147483647 - - - submenuAction: - - Font - - YES - - - Show Fonts - t - 1048576 - 2147483647 - - - - - - Bold - b - 1048576 - 2147483647 - - - 2 - - - - Italic - i - 1048576 - 2147483647 - - - 1 - - - - Underline - u - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Bigger - + - 1048576 - 2147483647 - - - 3 - - - - Smaller - - - 1048576 - 2147483647 - - - 4 - - - - YES - YES - - - 2147483647 - - - - - - Kern - - 2147483647 - - - submenuAction: - - Kern - - YES - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Tighten - - 2147483647 - - - - - - Loosen - - 2147483647 - - - - - - - - - Ligature - - 2147483647 - - - submenuAction: - - Ligature - - YES - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Use All - - 2147483647 - - - - - - - - - Baseline - - 2147483647 - - - submenuAction: - - Baseline - - YES - - - Use Default - - 2147483647 - - - - - - Superscript - - 2147483647 - - - - - - Subscript - - 2147483647 - - - - - - Raise - - 2147483647 - - - - - - Lower - - 2147483647 - - - - - - - - - YES - YES - - - 2147483647 - - - - - - Show Colors - C - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Copy Style - c - 1572864 - 2147483647 - - - - - - Paste Style - v - 1572864 - 2147483647 - - - - - _NSFontMenu - - - - - Text - - 2147483647 - - - submenuAction: - - Text - - YES - - - Align Left - { - 1048576 - 2147483647 - - - - - - Center - | - 1048576 - 2147483647 - - - - - - Justify - - 2147483647 - - - - - - Align Right - } - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Writing Direction - - 2147483647 - - - submenuAction: - - Writing Direction - - YES - - - YES - Paragraph - - 2147483647 - - - - - - CURlZmF1bHQ - - 2147483647 - - - - - - CUxlZnQgdG8gUmlnaHQ - - 2147483647 - - - - - - CVJpZ2h0IHRvIExlZnQ - - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - YES - Selection - - 2147483647 - - - - - - CURlZmF1bHQ - - 2147483647 - - - - - - CUxlZnQgdG8gUmlnaHQ - - 2147483647 - - - - - - CVJpZ2h0IHRvIExlZnQ - - 2147483647 - - - - - - - - - YES - YES - - - 2147483647 - - - - - - Show Ruler - - 2147483647 - - - - - - Copy Ruler - c - 1310720 - 2147483647 - - - - - - Paste Ruler - v - 1310720 - 2147483647 - - - - - - - - - - - - View - - 1048576 - 2147483647 - - - submenuAction: - - View - - YES - - - Show Toolbar - t - 1572864 - 2147483647 - - - - - - Customize Toolbar… - - 1048576 - 2147483647 - - - - - - - - - Window - - 1048576 - 2147483647 - - - submenuAction: - - Window - - YES - - - Minimize - m - 1048576 - 2147483647 - - - - - - Zoom - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Bring All to Front - - 1048576 - 2147483647 - - - - - _NSWindowsMenu - - - - - Help - - 2147483647 - - - submenuAction: - - Help - - YES - - - SimpleWebSocketServer Help - ? - 1048576 - 2147483647 - - - - - _NSHelpMenu - - - - _NSMainMenu - - - 15 - 2 - {{335, 390}, {480, 360}} - 1954021376 - SimpleWebSocketServer - NSWindow - - {1.79769e+308, 1.79769e+308} - - - 256 - {480, 360} - - - {{0, 0}, {1920, 1178}} - {1.79769e+308, 1.79769e+308} - - - SimpleWebSocketServerAppDelegate - - - NSFontManager - - - - - YES - - - performMiniaturize: - - - - 37 - - - - arrangeInFront: - - - - 39 - - - - print: - - - - 86 - - - - runPageLayout: - - - - 87 - - - - clearRecentDocuments: - - - - 127 - - - - orderFrontStandardAboutPanel: - - - - 142 - - - - performClose: - - - - 193 - - - - toggleContinuousSpellChecking: - - - - 222 - - - - undo: - - - - 223 - - - - copy: - - - - 224 - - - - checkSpelling: - - - - 225 - - - - paste: - - - - 226 - - - - stopSpeaking: - - - - 227 - - - - cut: - - - - 228 - - - - showGuessPanel: - - - - 230 - - - - redo: - - - - 231 - - - - selectAll: - - - - 232 - - - - startSpeaking: - - - - 233 - - - - delete: - - - - 235 - - - - performZoom: - - - - 240 - - - - performFindPanelAction: - - - - 241 - - - - centerSelectionInVisibleArea: - - - - 245 - - - - toggleGrammarChecking: - - - - 347 - - - - toggleSmartInsertDelete: - - - - 355 - - - - toggleAutomaticQuoteSubstitution: - - - - 356 - - - - toggleAutomaticLinkDetection: - - - - 357 - - - - saveDocument: - - - - 362 - - - - saveDocumentAs: - - - - 363 - - - - revertDocumentToSaved: - - - - 364 - - - - runToolbarCustomizationPalette: - - - - 365 - - - - toggleToolbarShown: - - - - 366 - - - - hide: - - - - 367 - - - - hideOtherApplications: - - - - 368 - - - - unhideAllApplications: - - - - 370 - - - - newDocument: - - - - 373 - - - - openDocument: - - - - 374 - - - - addFontTrait: - - - - 421 - - - - addFontTrait: - - - - 422 - - - - modifyFont: - - - - 423 - - - - orderFrontFontPanel: - - - - 424 - - - - modifyFont: - - - - 425 - - - - raiseBaseline: - - - - 426 - - - - lowerBaseline: - - - - 427 - - - - copyFont: - - - - 428 - - - - subscript: - - - - 429 - - - - superscript: - - - - 430 - - - - tightenKerning: - - - - 431 - - - - underline: - - - - 432 - - - - orderFrontColorPanel: - - - - 433 - - - - useAllLigatures: - - - - 434 - - - - loosenKerning: - - - - 435 - - - - pasteFont: - - - - 436 - - - - unscript: - - - - 437 - - - - useStandardKerning: - - - - 438 - - - - useStandardLigatures: - - - - 439 - - - - turnOffLigatures: - - - - 440 - - - - turnOffKerning: - - - - 441 - - - - terminate: - - - - 449 - - - - toggleAutomaticSpellingCorrection: - - - - 456 - - - - orderFrontSubstitutionsPanel: - - - - 458 - - - - toggleAutomaticDashSubstitution: - - - - 461 - - - - toggleAutomaticTextReplacement: - - - - 463 - - - - uppercaseWord: - - - - 464 - - - - capitalizeWord: - - - - 467 - - - - lowercaseWord: - - - - 468 - - - - pasteAsPlainText: - - - - 486 - - - - performFindPanelAction: - - - - 487 - - - - performFindPanelAction: - - - - 488 - - - - performFindPanelAction: - - - - 489 - - - - showHelp: - - - - 493 - - - - delegate - - - - 495 - - - - alignCenter: - - - - 518 - - - - pasteRuler: - - - - 519 - - - - toggleRuler: - - - - 520 - - - - alignRight: - - - - 521 - - - - copyRuler: - - - - 522 - - - - alignJustified: - - - - 523 - - - - alignLeft: - - - - 524 - - - - makeBaseWritingDirectionNatural: - - - - 525 - - - - makeBaseWritingDirectionLeftToRight: - - - - 526 - - - - makeBaseWritingDirectionRightToLeft: - - - - 527 - - - - makeTextWritingDirectionNatural: - - - - 528 - - - - makeTextWritingDirectionLeftToRight: - - - - 529 - - - - makeTextWritingDirectionRightToLeft: - - - - 530 - - - - window - - - - 532 - - - - - YES - - 0 - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - -3 - - - Application - - - 29 - - - YES - - - - - - - - - - - - 19 - - - YES - - - - - - 56 - - - YES - - - - - - 217 - - - YES - - - - - - 83 - - - YES - - - - - - 81 - - - YES - - - - - - - - - - - - - - - - 75 - - - - - 80 - - - - - 78 - - - - - 72 - - - - - 82 - - - - - 124 - - - YES - - - - - - 77 - - - - - 73 - - - - - 79 - - - - - 112 - - - - - 74 - - - - - 125 - - - YES - - - - - - 126 - - - - - 205 - - - YES - - - - - - - - - - - - - - - - - - - - 202 - - - - - 198 - - - - - 207 - - - - - 214 - - - - - 199 - - - - - 203 - - - - - 197 - - - - - 206 - - - - - 215 - - - - - 218 - - - YES - - - - - - 216 - - - YES - - - - - - 200 - - - YES - - - - - - - - - - - 219 - - - - - 201 - - - - - 204 - - - - - 220 - - - YES - - - - - - - - - - 213 - - - - - 210 - - - - - 221 - - - - - 208 - - - - - 209 - - - - - 57 - - - YES - - - - - - - - - - - - - - - - 58 - - - - - 134 - - - - - 150 - - - - - 136 - - - - - 144 - - - - - 129 - - - - - 143 - - - - - 236 - - - - - 131 - - - YES - - - - - - 149 - - - - - 145 - - - - - 130 - - - - - 24 - - - YES - - - - - - - - - 92 - - - - - 5 - - - - - 239 - - - - - 23 - - - - - 295 - - - YES - - - - - - 296 - - - YES - - - - - - - 297 - - - - - 298 - - - - - 211 - - - YES - - - - - - 212 - - - YES - - - - - - - 195 - - - - - 196 - - - - - 346 - - - - - 348 - - - YES - - - - - - 349 - - - YES - - - - - - - - - - - - 350 - - - - - 351 - - - - - 354 - - - - - 371 - - - YES - - - - - - 372 - - - - - 375 - - - YES - - - - - - 376 - - - YES - - - - - - - 377 - - - YES - - - - - - 388 - - - YES - - - - - - - - - - - - - - - - - - - - - 389 - - - - - 390 - - - - - 391 - - - - - 392 - - - - - 393 - - - - - 394 - - - - - 395 - - - - - 396 - - - - - 397 - - - YES - - - - - - 398 - - - YES - - - - - - 399 - - - YES - - - - - - 400 - - - - - 401 - - - - - 402 - - - - - 403 - - - - - 404 - - - - - 405 - - - YES - - - - - - - - - - 406 - - - - - 407 - - - - - 408 - - - - - 409 - - - - - 410 - - - - - 411 - - - YES - - - - - - - - 412 - - - - - 413 - - - - - 414 - - - - - 415 - - - YES - - - - - - - - - 416 - - - - - 417 - - - - - 418 - - - - - 419 - - - - - 420 - - - - - 450 - - - YES - - - - - - 451 - - - YES - - - - - - - - 452 - - - - - 453 - - - - - 454 - - - - - 457 - - - - - 459 - - - - - 460 - - - - - 462 - - - - - 465 - - - - - 466 - - - - - 485 - - - - - 490 - - - YES - - - - - - 491 - - - YES - - - - - - 492 - - - - - 494 - - - - - 496 - - - YES - - - - - - 497 - - - YES - - - - - - - - - - - - - - - 498 - - - - - 499 - - - - - 500 - - - - - 501 - - - - - 502 - - - - - 503 - - - YES - - - - - - 504 - - - - - 505 - - - - - 506 - - - - - 507 - - - - - 508 - - - YES - - - - - - - - - - - - - - 509 - - - - - 510 - - - - - 511 - - - - - 512 - - - - - 513 - - - - - 514 - - - - - 515 - - - - - 516 - - - - - 517 - - - - - - - YES - - YES - -3.IBPluginDependency - 112.IBPluginDependency - 112.ImportedFromIB2 - 124.IBPluginDependency - 124.ImportedFromIB2 - 125.IBPluginDependency - 125.ImportedFromIB2 - 125.editorWindowContentRectSynchronizationRect - 126.IBPluginDependency - 126.ImportedFromIB2 - 129.IBPluginDependency - 129.ImportedFromIB2 - 130.IBPluginDependency - 130.ImportedFromIB2 - 130.editorWindowContentRectSynchronizationRect - 131.IBPluginDependency - 131.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 - 136.IBPluginDependency - 136.ImportedFromIB2 - 143.IBPluginDependency - 143.ImportedFromIB2 - 144.IBPluginDependency - 144.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 - 19.IBPluginDependency - 19.ImportedFromIB2 - 195.IBPluginDependency - 195.ImportedFromIB2 - 196.IBPluginDependency - 196.ImportedFromIB2 - 197.IBPluginDependency - 197.ImportedFromIB2 - 198.IBPluginDependency - 198.ImportedFromIB2 - 199.IBPluginDependency - 199.ImportedFromIB2 - 200.IBEditorWindowLastContentRect - 200.IBPluginDependency - 200.ImportedFromIB2 - 200.editorWindowContentRectSynchronizationRect - 201.IBPluginDependency - 201.ImportedFromIB2 - 202.IBPluginDependency - 202.ImportedFromIB2 - 203.IBPluginDependency - 203.ImportedFromIB2 - 204.IBPluginDependency - 204.ImportedFromIB2 - 205.IBEditorWindowLastContentRect - 205.IBPluginDependency - 205.ImportedFromIB2 - 205.editorWindowContentRectSynchronizationRect - 206.IBPluginDependency - 206.ImportedFromIB2 - 207.IBPluginDependency - 207.ImportedFromIB2 - 208.IBPluginDependency - 208.ImportedFromIB2 - 209.IBPluginDependency - 209.ImportedFromIB2 - 210.IBPluginDependency - 210.ImportedFromIB2 - 211.IBPluginDependency - 211.ImportedFromIB2 - 212.IBPluginDependency - 212.ImportedFromIB2 - 212.editorWindowContentRectSynchronizationRect - 213.IBPluginDependency - 213.ImportedFromIB2 - 214.IBPluginDependency - 214.ImportedFromIB2 - 215.IBPluginDependency - 215.ImportedFromIB2 - 216.IBPluginDependency - 216.ImportedFromIB2 - 217.IBPluginDependency - 217.ImportedFromIB2 - 218.IBPluginDependency - 218.ImportedFromIB2 - 219.IBPluginDependency - 219.ImportedFromIB2 - 220.IBEditorWindowLastContentRect - 220.IBPluginDependency - 220.ImportedFromIB2 - 220.editorWindowContentRectSynchronizationRect - 221.IBPluginDependency - 221.ImportedFromIB2 - 23.IBPluginDependency - 23.ImportedFromIB2 - 236.IBPluginDependency - 236.ImportedFromIB2 - 239.IBPluginDependency - 239.ImportedFromIB2 - 24.IBEditorWindowLastContentRect - 24.IBPluginDependency - 24.ImportedFromIB2 - 24.editorWindowContentRectSynchronizationRect - 29.IBEditorWindowLastContentRect - 29.IBPluginDependency - 29.ImportedFromIB2 - 29.WindowOrigin - 29.editorWindowContentRectSynchronizationRect - 295.IBPluginDependency - 296.IBEditorWindowLastContentRect - 296.IBPluginDependency - 296.editorWindowContentRectSynchronizationRect - 297.IBPluginDependency - 298.IBPluginDependency - 346.IBPluginDependency - 346.ImportedFromIB2 - 348.IBPluginDependency - 348.ImportedFromIB2 - 349.IBEditorWindowLastContentRect - 349.IBPluginDependency - 349.ImportedFromIB2 - 349.editorWindowContentRectSynchronizationRect - 350.IBPluginDependency - 350.ImportedFromIB2 - 351.IBPluginDependency - 351.ImportedFromIB2 - 354.IBPluginDependency - 354.ImportedFromIB2 - 371.IBEditorWindowLastContentRect - 371.IBPluginDependency - 371.IBWindowTemplateEditedContentRect - 371.NSWindowTemplate.visibleAtLaunch - 371.editorWindowContentRectSynchronizationRect - 371.windowTemplate.maxSize - 372.IBPluginDependency - 375.IBPluginDependency - 376.IBEditorWindowLastContentRect - 376.IBPluginDependency - 377.IBPluginDependency - 388.IBEditorWindowLastContentRect - 388.IBPluginDependency - 389.IBPluginDependency - 390.IBPluginDependency - 391.IBPluginDependency - 392.IBPluginDependency - 393.IBPluginDependency - 394.IBPluginDependency - 395.IBPluginDependency - 396.IBPluginDependency - 397.IBPluginDependency - 398.IBPluginDependency - 399.IBPluginDependency - 400.IBPluginDependency - 401.IBPluginDependency - 402.IBPluginDependency - 403.IBPluginDependency - 404.IBPluginDependency - 405.IBPluginDependency - 406.IBPluginDependency - 407.IBPluginDependency - 408.IBPluginDependency - 409.IBPluginDependency - 410.IBPluginDependency - 411.IBPluginDependency - 412.IBPluginDependency - 413.IBPluginDependency - 414.IBPluginDependency - 415.IBPluginDependency - 416.IBPluginDependency - 417.IBPluginDependency - 418.IBPluginDependency - 419.IBPluginDependency - 450.IBPluginDependency - 451.IBEditorWindowLastContentRect - 451.IBPluginDependency - 452.IBPluginDependency - 453.IBPluginDependency - 454.IBPluginDependency - 457.IBPluginDependency - 459.IBPluginDependency - 460.IBPluginDependency - 462.IBPluginDependency - 465.IBPluginDependency - 466.IBPluginDependency - 485.IBPluginDependency - 490.IBPluginDependency - 491.IBEditorWindowLastContentRect - 491.IBPluginDependency - 492.IBPluginDependency - 496.IBPluginDependency - 497.IBEditorWindowLastContentRect - 497.IBPluginDependency - 498.IBPluginDependency - 499.IBPluginDependency - 5.IBPluginDependency - 5.ImportedFromIB2 - 500.IBPluginDependency - 501.IBPluginDependency - 502.IBPluginDependency - 503.IBPluginDependency - 504.IBPluginDependency - 505.IBPluginDependency - 506.IBPluginDependency - 507.IBPluginDependency - 508.IBEditorWindowLastContentRect - 508.IBPluginDependency - 509.IBPluginDependency - 510.IBPluginDependency - 511.IBPluginDependency - 512.IBPluginDependency - 513.IBPluginDependency - 514.IBPluginDependency - 515.IBPluginDependency - 516.IBPluginDependency - 517.IBPluginDependency - 56.IBPluginDependency - 56.ImportedFromIB2 - 57.IBEditorWindowLastContentRect - 57.IBPluginDependency - 57.ImportedFromIB2 - 57.editorWindowContentRectSynchronizationRect - 58.IBPluginDependency - 58.ImportedFromIB2 - 72.IBPluginDependency - 72.ImportedFromIB2 - 73.IBPluginDependency - 73.ImportedFromIB2 - 74.IBPluginDependency - 74.ImportedFromIB2 - 75.IBPluginDependency - 75.ImportedFromIB2 - 77.IBPluginDependency - 77.ImportedFromIB2 - 78.IBPluginDependency - 78.ImportedFromIB2 - 79.IBPluginDependency - 79.ImportedFromIB2 - 80.IBPluginDependency - 80.ImportedFromIB2 - 81.IBEditorWindowLastContentRect - 81.IBPluginDependency - 81.ImportedFromIB2 - 81.editorWindowContentRectSynchronizationRect - 82.IBPluginDependency - 82.ImportedFromIB2 - 83.IBPluginDependency - 83.ImportedFromIB2 - 92.IBPluginDependency - 92.ImportedFromIB2 - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{522, 812}, {146, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{436, 809}, {64, 6}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{753, 187}, {275, 113}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {275, 83}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{547, 180}, {254, 283}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{187, 434}, {243, 243}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {167, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{753, 217}, {238, 103}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {241, 103}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{654, 239}, {194, 73}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{525, 802}, {197, 73}} - {{380, 836}, {512, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - {74, 862} - {{6, 978}, {478, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - {{604, 269}, {231, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - {{475, 832}, {234, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{746, 287}, {220, 133}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {215, 63}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{380, 496}, {480, 360}} - com.apple.InterfaceBuilder.CocoaPlugin - {{380, 496}, {480, 360}} - - {{33, 99}, {480, 360}} - {3.40282e+38, 3.40282e+38} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{591, 420}, {83, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{523, 2}, {178, 283}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{753, 197}, {170, 63}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{725, 289}, {246, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{674, 260}, {204, 183}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{878, 180}, {164, 173}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - {{286, 129}, {275, 183}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{23, 794}, {245, 183}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{452, 109}, {196, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{145, 474}, {199, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - YES - - - YES - - - - - YES - - - YES - - - - 532 - - - - YES - - SimpleWebSocketServerAppDelegate - NSObject - - window - NSWindow - - - IBProjectSource - SimpleWebSocketServerAppDelegate.h - - - - - YES - - NSApplication - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSApplication.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSApplicationScripting.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSColorPanel.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSHelpManager.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSPageLayout.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSUserInterfaceItemSearching.h - - - - NSBrowser - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSBrowser.h - - - - NSControl - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSControl.h - - - - NSDocument - NSObject - - YES - - YES - printDocument: - revertDocumentToSaved: - runPageLayout: - saveDocument: - saveDocumentAs: - saveDocumentTo: - - - YES - id - id - id - id - id - id - - - - IBFrameworkSource - AppKit.framework/Headers/NSDocument.h - - - - NSDocument - - IBFrameworkSource - AppKit.framework/Headers/NSDocumentScripting.h - - - - NSDocumentController - NSObject - - YES - - YES - clearRecentDocuments: - newDocument: - openDocument: - saveAllDocuments: - - - YES - id - id - id - id - - - - IBFrameworkSource - AppKit.framework/Headers/NSDocumentController.h - - - - NSFontManager - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSFontManager.h - - - - NSFormatter - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFormatter.h - - - - NSMatrix - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSMatrix.h - - - - NSMenu - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSMenu.h - - - - NSMenuItem - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSMenuItem.h - - - - NSMovieView - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSMovieView.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSAccessibility.h - - - - NSObject - - - - NSObject - - - - NSObject - - - - NSObject - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSDictionaryController.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSDragging.h - - - - NSObject - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSFontPanel.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSKeyValueBinding.h - - - - NSObject - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSNibLoading.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSOutlineView.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSPasteboard.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSSavePanel.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSTableView.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSToolbarItem.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSView.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSClassDescription.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObjectScripting.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSPortCoder.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptClassDescription.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptObjectSpecifiers.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptWhoseTests.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLDownload.h - - - - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSInterfaceStyle.h - - - - NSResponder - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSResponder.h - - - - NSTableView - NSControl - - - - NSText - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSText.h - - - - NSTextView - NSText - - IBFrameworkSource - AppKit.framework/Headers/NSTextView.h - - - - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSClipView.h - - - - NSView - - - - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSRulerView.h - - - - NSView - NSResponder - - - - NSWindow - - IBFrameworkSource - AppKit.framework/Headers/NSDrawer.h - - - - NSWindow - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSWindow.h - - - - NSWindow - - IBFrameworkSource - AppKit.framework/Headers/NSWindowScripting.h - - - - - 0 - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - - - YES - ../SimpleWebSocketServer.xcodeproj - 3 - - diff --git a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/Instructions.txt b/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/Instructions.txt deleted file mode 100644 index a687b740a2bca..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/Instructions.txt +++ /dev/null @@ -1,20 +0,0 @@ -INFO: - -This example project demonstrates support for WebSockets. - -The sample includes a Web folder which is added to the project, copied into the application's resources folder, and is set as the document root of the http server. It contains a simple index.html file and the client-side code (run in the web browser) for the websocket stuff. - -Take a look at the MyWebSocket class to see the related server code. - -INSTRUCTIONS: - -Open the Xcode project, and build and go. - -On the Xcode console you'll see a message saying: -"Started HTTP server on port 59123" - -Now open a browser that supports WebSockets (e.g. Google Chrome or Safari) -and type in the URL: -http://localhost:59123 - -Enjoy. \ No newline at end of file diff --git a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/MyHTTPConnection.h b/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/MyHTTPConnection.h deleted file mode 100644 index 946d9f8bb5389..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/MyHTTPConnection.h +++ /dev/null @@ -1,11 +0,0 @@ -#import -#import "HTTPConnection.h" - -@class MyWebSocket; - -@interface MyHTTPConnection : HTTPConnection -{ - MyWebSocket *ws; -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/MyHTTPConnection.m b/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/MyHTTPConnection.m deleted file mode 100644 index 2b4b0e72adad5..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/MyHTTPConnection.m +++ /dev/null @@ -1,69 +0,0 @@ -#import "MyHTTPConnection.h" -#import "HTTPMessage.h" -#import "HTTPResponse.h" -#import "HTTPDynamicFileResponse.h" -#import "GCDAsyncSocket.h" -#import "MyWebSocket.h" -#import "HTTPLogging.h" - -// Log levels: off, error, warn, info, verbose -// Other flags: trace -static const int httpLogLevel = HTTP_LOG_LEVEL_WARN; // | HTTP_LOG_FLAG_TRACE; - - -@implementation MyHTTPConnection - -- (NSObject *)httpResponseForMethod:(NSString *)method URI:(NSString *)path -{ - HTTPLogTrace(); - - if ([path isEqualToString:@"/WebSocketTest2.js"]) - { - // The socket.js file contains a URL template that needs to be completed: - // - // ws = new WebSocket("%%WEBSOCKET_URL%%"); - // - // We need to replace "%%WEBSOCKET_URL%%" with whatever URL the server is running on. - // We can accomplish this easily with the HTTPDynamicFileResponse class, - // which takes a dictionary of replacement key-value pairs, - // and performs replacements on the fly as it uploads the file. - - NSString *wsLocation; - - NSString *wsHost = [request headerField:@"Host"]; - if (wsHost == nil) - { - NSString *port = [NSString stringWithFormat:@"%hu", [asyncSocket localPort]]; - wsLocation = [NSString stringWithFormat:@"ws://localhost:%@%/service", port]; - } - else - { - wsLocation = [NSString stringWithFormat:@"ws://%@/service", wsHost]; - } - - NSDictionary *replacementDict = [NSDictionary dictionaryWithObject:wsLocation forKey:@"WEBSOCKET_URL"]; - - return [[[HTTPDynamicFileResponse alloc] initWithFilePath:[self filePathForURI:path] - forConnection:self - separator:@"%%" - replacementDictionary:replacementDict] autorelease]; - } - - return [super httpResponseForMethod:method URI:path]; -} - -- (WebSocket *)webSocketForURI:(NSString *)path -{ - HTTPLogTrace2(@"%@[%p]: webSocketForURI: %@", THIS_FILE, self, path); - - if([path isEqualToString:@"/service"]) - { - HTTPLogInfo(@"MyHTTPConnection: Creating MyWebSocket..."); - - return [[[MyWebSocket alloc] initWithRequest:request socket:asyncSocket] autorelease]; - } - - return [super webSocketForURI:path]; -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/MyWebSocket.h b/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/MyWebSocket.h deleted file mode 100644 index 00a5ad342fa7e..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/MyWebSocket.h +++ /dev/null @@ -1,10 +0,0 @@ -#import -#import "WebSocket.h" - - -@interface MyWebSocket : WebSocket -{ - -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/MyWebSocket.m b/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/MyWebSocket.m deleted file mode 100644 index d12cacdbe03df..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/MyWebSocket.m +++ /dev/null @@ -1,34 +0,0 @@ -#import "MyWebSocket.h" -#import "HTTPLogging.h" - -// Log levels: off, error, warn, info, verbose -// Other flags : trace -static const int httpLogLevel = HTTP_LOG_LEVEL_WARN | HTTP_LOG_FLAG_TRACE; - - -@implementation MyWebSocket - -- (void)didOpen -{ - HTTPLogTrace(); - - [super didOpen]; - - [self sendMessage:@"Welcome to my WebSocket"]; -} - -- (void)didReceiveMessage:(NSString *)msg -{ - HTTPLogTrace2(@"%@[%p]: didReceiveMessage: %@", THIS_FILE, self, msg); - - [self sendMessage:[NSString stringWithFormat:@"%@", [NSDate date]]]; -} - -- (void)didClose -{ - HTTPLogTrace(); - - [super didClose]; -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/SimpleWebSocketServer-Info.plist b/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/SimpleWebSocketServer-Info.plist deleted file mode 100644 index f5e01d9a9cd40..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/SimpleWebSocketServer-Info.plist +++ /dev/null @@ -1,32 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleShortVersionString - 1.0 - LSMinimumSystemVersion - ${MACOSX_DEPLOYMENT_TARGET} - CFBundleVersion - 1 - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/SimpleWebSocketServer.xcodeproj/project.pbxproj b/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/SimpleWebSocketServer.xcodeproj/project.pbxproj deleted file mode 100644 index 3ef835a639f10..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/SimpleWebSocketServer.xcodeproj/project.pbxproj +++ /dev/null @@ -1,457 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; }; - 256AC3DA0F4B6AC300CF3369 /* SimpleWebSocketServerAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 256AC3D90F4B6AC300CF3369 /* SimpleWebSocketServerAppDelegate.m */; }; - 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; - 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; - DC2E3573129B962B009F096E /* GCDAsyncSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = DC2E3572129B962B009F096E /* GCDAsyncSocket.m */; }; - DC2E35CA129B96CE009F096E /* DDASLLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = DC2E35C3129B96CE009F096E /* DDASLLogger.m */; }; - DC2E35CB129B96CE009F096E /* DDFileLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = DC2E35C5129B96CE009F096E /* DDFileLogger.m */; }; - DC2E35CC129B96CE009F096E /* DDLog.m in Sources */ = {isa = PBXBuildFile; fileRef = DC2E35C7129B96CE009F096E /* DDLog.m */; }; - DC2E35CD129B96CE009F096E /* DDTTYLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = DC2E35C9129B96CE009F096E /* DDTTYLogger.m */; }; - DC2E35D3129B97BC009F096E /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC2E35D2129B97BC009F096E /* Security.framework */; }; - DC373036139DC5D200A8407D /* DDData.m in Sources */ = {isa = PBXBuildFile; fileRef = DC37301A139DC5D200A8407D /* DDData.m */; }; - DC373037139DC5D200A8407D /* DDNumber.m in Sources */ = {isa = PBXBuildFile; fileRef = DC37301C139DC5D200A8407D /* DDNumber.m */; }; - DC373038139DC5D200A8407D /* DDRange.m in Sources */ = {isa = PBXBuildFile; fileRef = DC37301E139DC5D200A8407D /* DDRange.m */; }; - DC373039139DC5D200A8407D /* HTTPAuthenticationRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = DC373020139DC5D200A8407D /* HTTPAuthenticationRequest.m */; }; - DC37303A139DC5D200A8407D /* HTTPConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = DC373022139DC5D200A8407D /* HTTPConnection.m */; }; - DC37303B139DC5D200A8407D /* HTTPMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = DC373025139DC5D200A8407D /* HTTPMessage.m */; }; - DC37303C139DC5D200A8407D /* HTTPServer.m in Sources */ = {isa = PBXBuildFile; fileRef = DC373028139DC5D200A8407D /* HTTPServer.m */; }; - DC37303D139DC5D200A8407D /* HTTPAsyncFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC37302B139DC5D200A8407D /* HTTPAsyncFileResponse.m */; }; - DC37303E139DC5D200A8407D /* HTTPDataResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC37302D139DC5D200A8407D /* HTTPDataResponse.m */; }; - DC37303F139DC5D200A8407D /* HTTPDynamicFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC37302F139DC5D200A8407D /* HTTPDynamicFileResponse.m */; }; - DC373040139DC5D200A8407D /* HTTPFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC373031139DC5D200A8407D /* HTTPFileResponse.m */; }; - DC373041139DC5D200A8407D /* HTTPRedirectResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC373033139DC5D200A8407D /* HTTPRedirectResponse.m */; }; - DC373042139DC5D200A8407D /* WebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = DC373035139DC5D200A8407D /* WebSocket.m */; }; - DC753F2D117E85F90072A9C4 /* MyHTTPConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = DC753F2C117E85F90072A9C4 /* MyHTTPConnection.m */; }; - DC753F40117E8EC30072A9C4 /* MyWebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = DC753F3F117E8EC30072A9C4 /* MyWebSocket.m */; }; - DCE8083B1180AB500020037F /* Web in Resources */ = {isa = PBXBuildFile; fileRef = DCE808361180AB500020037F /* Web */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; - 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; - 1DDD58150DA1D0A300B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; - 256AC3D80F4B6AC300CF3369 /* SimpleWebSocketServerAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleWebSocketServerAppDelegate.h; sourceTree = ""; }; - 256AC3D90F4B6AC300CF3369 /* SimpleWebSocketServerAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SimpleWebSocketServerAppDelegate.m; sourceTree = ""; }; - 256AC3F00F4B6AF500CF3369 /* SimpleWebSocketServer_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleWebSocketServer_Prefix.pch; sourceTree = ""; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; - 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; - 8D1107310486CEB800E47090 /* SimpleWebSocketServer-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "SimpleWebSocketServer-Info.plist"; sourceTree = ""; }; - 8D1107320486CEB800E47090 /* SimpleWebSocketServer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SimpleWebSocketServer.app; sourceTree = BUILT_PRODUCTS_DIR; }; - DC2E3571129B962B009F096E /* GCDAsyncSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GCDAsyncSocket.h; path = ../../Vendor/CocoaAsyncSocket/GCDAsyncSocket.h; sourceTree = SOURCE_ROOT; }; - DC2E3572129B962B009F096E /* GCDAsyncSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GCDAsyncSocket.m; path = ../../Vendor/CocoaAsyncSocket/GCDAsyncSocket.m; sourceTree = SOURCE_ROOT; }; - DC2E35C2129B96CE009F096E /* DDASLLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDASLLogger.h; path = ../../Vendor/CocoaLumberjack/DDASLLogger.h; sourceTree = SOURCE_ROOT; }; - DC2E35C3129B96CE009F096E /* DDASLLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDASLLogger.m; path = ../../Vendor/CocoaLumberjack/DDASLLogger.m; sourceTree = SOURCE_ROOT; }; - DC2E35C4129B96CE009F096E /* DDFileLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDFileLogger.h; path = ../../Vendor/CocoaLumberjack/DDFileLogger.h; sourceTree = SOURCE_ROOT; }; - DC2E35C5129B96CE009F096E /* DDFileLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDFileLogger.m; path = ../../Vendor/CocoaLumberjack/DDFileLogger.m; sourceTree = SOURCE_ROOT; }; - DC2E35C6129B96CE009F096E /* DDLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDLog.h; path = ../../Vendor/CocoaLumberjack/DDLog.h; sourceTree = SOURCE_ROOT; }; - DC2E35C7129B96CE009F096E /* DDLog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDLog.m; path = ../../Vendor/CocoaLumberjack/DDLog.m; sourceTree = SOURCE_ROOT; }; - DC2E35C8129B96CE009F096E /* DDTTYLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDTTYLogger.h; path = ../../Vendor/CocoaLumberjack/DDTTYLogger.h; sourceTree = SOURCE_ROOT; }; - DC2E35C9129B96CE009F096E /* DDTTYLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDTTYLogger.m; path = ../../Vendor/CocoaLumberjack/DDTTYLogger.m; sourceTree = SOURCE_ROOT; }; - DC2E35D2129B97BC009F096E /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; - DC372E96139D52F600A8407D /* Base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = ""; }; - DC372E97139D52F600A8407D /* Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; - DC372E99139D52F600A8407D /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; - DC373019139DC5D200A8407D /* DDData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDData.h; sourceTree = ""; }; - DC37301A139DC5D200A8407D /* DDData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDData.m; sourceTree = ""; }; - DC37301B139DC5D200A8407D /* DDNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDNumber.h; sourceTree = ""; }; - DC37301C139DC5D200A8407D /* DDNumber.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDNumber.m; sourceTree = ""; }; - DC37301D139DC5D200A8407D /* DDRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDRange.h; sourceTree = ""; }; - DC37301E139DC5D200A8407D /* DDRange.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDRange.m; sourceTree = ""; }; - DC37301F139DC5D200A8407D /* HTTPAuthenticationRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPAuthenticationRequest.h; path = ../../Core/HTTPAuthenticationRequest.h; sourceTree = ""; }; - DC373020139DC5D200A8407D /* HTTPAuthenticationRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPAuthenticationRequest.m; path = ../../Core/HTTPAuthenticationRequest.m; sourceTree = ""; }; - DC373021139DC5D200A8407D /* HTTPConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPConnection.h; path = ../../Core/HTTPConnection.h; sourceTree = ""; }; - DC373022139DC5D200A8407D /* HTTPConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPConnection.m; path = ../../Core/HTTPConnection.m; sourceTree = ""; }; - DC373023139DC5D200A8407D /* HTTPLogging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPLogging.h; path = ../../Core/HTTPLogging.h; sourceTree = ""; }; - DC373024139DC5D200A8407D /* HTTPMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPMessage.h; path = ../../Core/HTTPMessage.h; sourceTree = ""; }; - DC373025139DC5D200A8407D /* HTTPMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPMessage.m; path = ../../Core/HTTPMessage.m; sourceTree = ""; }; - DC373026139DC5D200A8407D /* HTTPResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPResponse.h; path = ../../Core/HTTPResponse.h; sourceTree = ""; }; - DC373027139DC5D200A8407D /* HTTPServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPServer.h; path = ../../Core/HTTPServer.h; sourceTree = ""; }; - DC373028139DC5D200A8407D /* HTTPServer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPServer.m; path = ../../Core/HTTPServer.m; sourceTree = ""; }; - DC37302A139DC5D200A8407D /* HTTPAsyncFileResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPAsyncFileResponse.h; sourceTree = ""; }; - DC37302B139DC5D200A8407D /* HTTPAsyncFileResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPAsyncFileResponse.m; sourceTree = ""; }; - DC37302C139DC5D200A8407D /* HTTPDataResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPDataResponse.h; sourceTree = ""; }; - DC37302D139DC5D200A8407D /* HTTPDataResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPDataResponse.m; sourceTree = ""; }; - DC37302E139DC5D200A8407D /* HTTPDynamicFileResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPDynamicFileResponse.h; sourceTree = ""; }; - DC37302F139DC5D200A8407D /* HTTPDynamicFileResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPDynamicFileResponse.m; sourceTree = ""; }; - DC373030139DC5D200A8407D /* HTTPFileResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPFileResponse.h; sourceTree = ""; }; - DC373031139DC5D200A8407D /* HTTPFileResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPFileResponse.m; sourceTree = ""; }; - DC373032139DC5D200A8407D /* HTTPRedirectResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPRedirectResponse.h; sourceTree = ""; }; - DC373033139DC5D200A8407D /* HTTPRedirectResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPRedirectResponse.m; sourceTree = ""; }; - DC373034139DC5D200A8407D /* WebSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebSocket.h; path = ../../Core/WebSocket.h; sourceTree = ""; }; - DC373035139DC5D200A8407D /* WebSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WebSocket.m; path = ../../Core/WebSocket.m; sourceTree = ""; }; - DC753F2B117E85F90072A9C4 /* MyHTTPConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyHTTPConnection.h; sourceTree = ""; }; - DC753F2C117E85F90072A9C4 /* MyHTTPConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyHTTPConnection.m; sourceTree = ""; }; - DC753F3E117E8EC30072A9C4 /* MyWebSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyWebSocket.h; sourceTree = ""; }; - DC753F3F117E8EC30072A9C4 /* MyWebSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyWebSocket.m; sourceTree = ""; }; - DCE808361180AB500020037F /* Web */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Web; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8D11072E0486CEB800E47090 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, - DC2E35D3129B97BC009F096E /* Security.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Classes */ = { - isa = PBXGroup; - children = ( - 256AC3D80F4B6AC300CF3369 /* SimpleWebSocketServerAppDelegate.h */, - 256AC3D90F4B6AC300CF3369 /* SimpleWebSocketServerAppDelegate.m */, - DC753F2B117E85F90072A9C4 /* MyHTTPConnection.h */, - DC753F2C117E85F90072A9C4 /* MyHTTPConnection.m */, - DC753F3E117E8EC30072A9C4 /* MyWebSocket.h */, - DC753F3F117E8EC30072A9C4 /* MyWebSocket.m */, - ); - name = Classes; - sourceTree = ""; - }; - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { - isa = PBXGroup; - children = ( - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, - DC2E35D2129B97BC009F096E /* Security.framework */, - ); - name = "Linked Frameworks"; - sourceTree = ""; - }; - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - 29B97324FDCFA39411CA2CEA /* AppKit.framework */, - 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */, - 29B97325FDCFA39411CA2CEA /* Foundation.framework */, - ); - name = "Other Frameworks"; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 8D1107320486CEB800E47090 /* SimpleWebSocketServer.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* SimpleWebSocketServer */ = { - isa = PBXGroup; - children = ( - DC2E35C1129B96B9009F096E /* Logging */, - DC753EE8117E84DC0072A9C4 /* TCP */, - DC753EE4117E84D00072A9C4 /* HTTP */, - 080E96DDFE201D6D7F000001 /* Classes */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = SimpleWebSocketServer; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - DC372E95139D52F600A8407D /* Xcode-Configurations */, - 256AC3F00F4B6AF500CF3369 /* SimpleWebSocketServer_Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.m */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - DCE808361180AB500020037F /* Web */, - 8D1107310486CEB800E47090 /* SimpleWebSocketServer-Info.plist */, - 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, - 1DDD58140DA1D0A300B32029 /* MainMenu.xib */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, - ); - name = Frameworks; - sourceTree = ""; - }; - DC2E35C1129B96B9009F096E /* Logging */ = { - isa = PBXGroup; - children = ( - DC2E35C6129B96CE009F096E /* DDLog.h */, - DC2E35C7129B96CE009F096E /* DDLog.m */, - DC2E35C8129B96CE009F096E /* DDTTYLogger.h */, - DC2E35C9129B96CE009F096E /* DDTTYLogger.m */, - DC2E35C2129B96CE009F096E /* DDASLLogger.h */, - DC2E35C3129B96CE009F096E /* DDASLLogger.m */, - DC2E35C4129B96CE009F096E /* DDFileLogger.h */, - DC2E35C5129B96CE009F096E /* DDFileLogger.m */, - ); - name = Logging; - sourceTree = ""; - }; - DC372E95139D52F600A8407D /* Xcode-Configurations */ = { - isa = PBXGroup; - children = ( - DC372E96139D52F600A8407D /* Base.xcconfig */, - DC372E97139D52F600A8407D /* Debug.xcconfig */, - DC372E99139D52F600A8407D /* Release.xcconfig */, - ); - name = "Xcode-Configurations"; - path = "../Xcode-Configurations"; - sourceTree = ""; - }; - DC373018139DC5D200A8407D /* Categories */ = { - isa = PBXGroup; - children = ( - DC373019139DC5D200A8407D /* DDData.h */, - DC37301A139DC5D200A8407D /* DDData.m */, - DC37301B139DC5D200A8407D /* DDNumber.h */, - DC37301C139DC5D200A8407D /* DDNumber.m */, - DC37301D139DC5D200A8407D /* DDRange.h */, - DC37301E139DC5D200A8407D /* DDRange.m */, - ); - name = Categories; - path = ../../Core/Categories; - sourceTree = ""; - }; - DC373029139DC5D200A8407D /* Responses */ = { - isa = PBXGroup; - children = ( - DC37302C139DC5D200A8407D /* HTTPDataResponse.h */, - DC37302D139DC5D200A8407D /* HTTPDataResponse.m */, - DC373030139DC5D200A8407D /* HTTPFileResponse.h */, - DC373031139DC5D200A8407D /* HTTPFileResponse.m */, - DC373032139DC5D200A8407D /* HTTPRedirectResponse.h */, - DC373033139DC5D200A8407D /* HTTPRedirectResponse.m */, - DC37302A139DC5D200A8407D /* HTTPAsyncFileResponse.h */, - DC37302B139DC5D200A8407D /* HTTPAsyncFileResponse.m */, - DC37302E139DC5D200A8407D /* HTTPDynamicFileResponse.h */, - DC37302F139DC5D200A8407D /* HTTPDynamicFileResponse.m */, - ); - name = Responses; - path = ../../Core/Responses; - sourceTree = ""; - }; - DC753EE4117E84D00072A9C4 /* HTTP */ = { - isa = PBXGroup; - children = ( - DC373023139DC5D200A8407D /* HTTPLogging.h */, - DC37301F139DC5D200A8407D /* HTTPAuthenticationRequest.h */, - DC373020139DC5D200A8407D /* HTTPAuthenticationRequest.m */, - DC373027139DC5D200A8407D /* HTTPServer.h */, - DC373028139DC5D200A8407D /* HTTPServer.m */, - DC373021139DC5D200A8407D /* HTTPConnection.h */, - DC373022139DC5D200A8407D /* HTTPConnection.m */, - DC373024139DC5D200A8407D /* HTTPMessage.h */, - DC373025139DC5D200A8407D /* HTTPMessage.m */, - DC373026139DC5D200A8407D /* HTTPResponse.h */, - DC373034139DC5D200A8407D /* WebSocket.h */, - DC373035139DC5D200A8407D /* WebSocket.m */, - DC373029139DC5D200A8407D /* Responses */, - DC373018139DC5D200A8407D /* Categories */, - ); - name = HTTP; - sourceTree = ""; - }; - DC753EE8117E84DC0072A9C4 /* TCP */ = { - isa = PBXGroup; - children = ( - DC2E3571129B962B009F096E /* GCDAsyncSocket.h */, - DC2E3572129B962B009F096E /* GCDAsyncSocket.m */, - ); - name = TCP; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 8D1107260486CEB800E47090 /* SimpleWebSocketServer */ = { - isa = PBXNativeTarget; - buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "SimpleWebSocketServer" */; - buildPhases = ( - 8D1107290486CEB800E47090 /* Resources */, - 8D11072C0486CEB800E47090 /* Sources */, - 8D11072E0486CEB800E47090 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SimpleWebSocketServer; - productInstallPath = "$(HOME)/Applications"; - productName = SimpleWebSocketServer; - productReference = 8D1107320486CEB800E47090 /* SimpleWebSocketServer.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SimpleWebSocketServer" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* SimpleWebSocketServer */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 8D1107260486CEB800E47090 /* SimpleWebSocketServer */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 8D1107290486CEB800E47090 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, - 1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */, - DCE8083B1180AB500020037F /* Web in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 8D11072C0486CEB800E47090 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D11072D0486CEB800E47090 /* main.m in Sources */, - 256AC3DA0F4B6AC300CF3369 /* SimpleWebSocketServerAppDelegate.m in Sources */, - DC753F2D117E85F90072A9C4 /* MyHTTPConnection.m in Sources */, - DC753F40117E8EC30072A9C4 /* MyWebSocket.m in Sources */, - DC2E3573129B962B009F096E /* GCDAsyncSocket.m in Sources */, - DC2E35CA129B96CE009F096E /* DDASLLogger.m in Sources */, - DC2E35CB129B96CE009F096E /* DDFileLogger.m in Sources */, - DC2E35CC129B96CE009F096E /* DDLog.m in Sources */, - DC2E35CD129B96CE009F096E /* DDTTYLogger.m in Sources */, - DC373036139DC5D200A8407D /* DDData.m in Sources */, - DC373037139DC5D200A8407D /* DDNumber.m in Sources */, - DC373038139DC5D200A8407D /* DDRange.m in Sources */, - DC373039139DC5D200A8407D /* HTTPAuthenticationRequest.m in Sources */, - DC37303A139DC5D200A8407D /* HTTPConnection.m in Sources */, - DC37303B139DC5D200A8407D /* HTTPMessage.m in Sources */, - DC37303C139DC5D200A8407D /* HTTPServer.m in Sources */, - DC37303D139DC5D200A8407D /* HTTPAsyncFileResponse.m in Sources */, - DC37303E139DC5D200A8407D /* HTTPDataResponse.m in Sources */, - DC37303F139DC5D200A8407D /* HTTPDynamicFileResponse.m in Sources */, - DC373040139DC5D200A8407D /* HTTPFileResponse.m in Sources */, - DC373041139DC5D200A8407D /* HTTPRedirectResponse.m in Sources */, - DC373042139DC5D200A8407D /* WebSocket.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 089C165DFE840E0CC02AAC07 /* English */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - 1DDD58140DA1D0A300B32029 /* MainMenu.xib */ = { - isa = PBXVariantGroup; - children = ( - 1DDD58150DA1D0A300B32029 /* English */, - ); - name = MainMenu.xib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - C01FCF4B08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREFIX_HEADER = SimpleWebSocketServer_Prefix.pch; - INFOPLIST_FILE = "SimpleWebSocketServer-Info.plist"; - PRODUCT_NAME = SimpleWebSocketServer; - }; - name = Debug; - }; - C01FCF4C08A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PREFIX_HEADER = SimpleWebSocketServer_Prefix.pch; - INFOPLIST_FILE = "SimpleWebSocketServer-Info.plist"; - PRODUCT_NAME = SimpleWebSocketServer; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DC372E97139D52F600A8407D /* Debug.xcconfig */; - buildSettings = { - SDKROOT = macosx10.6; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DC372E99139D52F600A8407D /* Release.xcconfig */; - buildSettings = { - SDKROOT = macosx10.6; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "SimpleWebSocketServer" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4B08A954540054247B /* Debug */, - C01FCF4C08A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SimpleWebSocketServer" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/SimpleWebSocketServer.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/SimpleWebSocketServer.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 86062a86f3d2a..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/SimpleWebSocketServer.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/SimpleWebSocketServerAppDelegate.h b/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/SimpleWebSocketServerAppDelegate.h deleted file mode 100644 index fe0e4e5d56a9f..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/SimpleWebSocketServerAppDelegate.h +++ /dev/null @@ -1,14 +0,0 @@ -#import - -@class HTTPServer; - - -@interface SimpleWebSocketServerAppDelegate : NSObject -{ - HTTPServer *httpServer; - NSWindow *window; -} - -@property (assign) IBOutlet NSWindow *window; - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/SimpleWebSocketServerAppDelegate.m b/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/SimpleWebSocketServerAppDelegate.m deleted file mode 100644 index 645a27a932199..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/SimpleWebSocketServerAppDelegate.m +++ /dev/null @@ -1,51 +0,0 @@ -#import "SimpleWebSocketServerAppDelegate.h" -#import "HTTPServer.h" -#import "MyHTTPConnection.h" -#import "DDLog.h" -#import "DDTTYLogger.h" - -// Log levels: off, error, warn, info, verbose -static const int ddLogLevel = LOG_LEVEL_VERBOSE; - - -@implementation SimpleWebSocketServerAppDelegate - -@synthesize window; - -- (void)applicationDidFinishLaunching:(NSNotification *)aNotification -{ - // Configure our logging framework. - // To keep things simple and fast, we're just going to log to the Xcode console. - [DDLog addLogger:[DDTTYLogger sharedInstance]]; - - // Create server using our custom MyHTTPServer class - httpServer = [[HTTPServer alloc] init]; - - // Tell server to use our custom MyHTTPConnection class. - [httpServer setConnectionClass:[MyHTTPConnection class]]; - - // Tell the server to broadcast its presence via Bonjour. - // This allows browsers such as Safari to automatically discover our service. - [httpServer setType:@"_http._tcp."]; - - // Normally there's no need to run our server on any specific port. - // Technologies like Bonjour allow clients to dynamically discover the server's port at runtime. - // However, for easy testing you may want force a certain port so you can just hit the refresh button. - [httpServer setPort:12345]; - - // Serve files from our embedded Web folder - NSString *webPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"Web"]; - DDLogInfo(@"Setting document root: %@", webPath); - - [httpServer setDocumentRoot:webPath]; - - // Start the server (and check for problems) - - NSError *error; - if(![httpServer start:&error]) - { - DDLogError(@"Error starting HTTP Server: %@", error); - } -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/SimpleWebSocketServer_Prefix.pch b/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/SimpleWebSocketServer_Prefix.pch deleted file mode 100644 index 2a31f7b1cf303..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/SimpleWebSocketServer_Prefix.pch +++ /dev/null @@ -1,7 +0,0 @@ -// -// Prefix header for all source files of the 'SimpleWebSocketServer' target in the 'SimpleWebSocketServer' project -// - -#ifdef __OBJC__ - #import -#endif diff --git a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/Web/WebSocketTest.js b/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/Web/WebSocketTest.js deleted file mode 100644 index 3b1343c0f4b0f..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/Web/WebSocketTest.js +++ /dev/null @@ -1,12 +0,0 @@ -function WebSocketTest() -{ - if ("WebSocket" in window) - { - alert("WebSocket supported here! :)\r\n\r\nBrowser: " + navigator.appName + " " + navigator.appVersion + "\r\n\r\n(based on Google sample code)"); - } - else - { - // Browser doesn't support WebSocket - alert("WebSocket NOT supported here! :(\r\n\r\nBrowser: " + navigator.appName + " " + navigator.appVersion + "\r\n\r\n(based on Google sample code)"); - } -} \ No newline at end of file diff --git a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/Web/WebSocketTest2.js b/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/Web/WebSocketTest2.js deleted file mode 100644 index 4c01e36d7cb7c..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/Web/WebSocketTest2.js +++ /dev/null @@ -1,21 +0,0 @@ -function WebSocketTest2() -{ - if ("WebSocket" in window) - { - var ws = new WebSocket("%%WEBSOCKET_URL%%"); - ws.onopen = function() - { - // Web Socket is connected - alert("websocket is open"); - - // You can send data now - ws.send("Hey man, you got the time?"); - }; - ws.onmessage = function(evt) { alert("received: " + evt.data); }; - ws.onclose = function() { alert("websocket is closed"); }; - } - else - { - alert("Browser doesn't support WebSocket!"); - } -} \ No newline at end of file diff --git a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/Web/index.html b/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/Web/index.html deleted file mode 100644 index 37b661997c3bd..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/Web/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - -SimpleWebSocketServer - - - - -Does my browser support WebSockets?
    -
    -Open WebSocket and tell me what time it is. - - \ No newline at end of file diff --git a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/main.m b/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/main.m deleted file mode 100644 index 911d12a8e0106..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/SimpleWebSocketServer/main.m +++ /dev/null @@ -1,14 +0,0 @@ -// -// main.m -// SimpleWebSocketServer -// -// Created by Robbie Hanson on 4/20/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// - -#import - -int main(int argc, char *argv[]) -{ - return NSApplicationMain(argc, (const char **) argv); -} diff --git a/third_party/objc/CocoaHTTPServer/Samples/WebDAVServer/AppDelegate.h b/third_party/objc/CocoaHTTPServer/Samples/WebDAVServer/AppDelegate.h deleted file mode 100644 index 1660932162c0e..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/WebDAVServer/AppDelegate.h +++ /dev/null @@ -1,9 +0,0 @@ -#import - -@class HTTPServer; - -@interface AppDelegate : NSObject { -@private - HTTPServer* _httpServer; -} -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/WebDAVServer/AppDelegate.m b/third_party/objc/CocoaHTTPServer/Samples/WebDAVServer/AppDelegate.m deleted file mode 100644 index 26645b97378ce..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/WebDAVServer/AppDelegate.m +++ /dev/null @@ -1,40 +0,0 @@ -#import "AppDelegate.h" -#import "DDLog.h" -#import "DDTTYLogger.h" -#import "HTTPServer.h" -#import "DAVConnection.h" - -static const int ddLogLevel = LOG_LEVEL_VERBOSE; - -@implementation AppDelegate - -- (void) applicationDidFinishLaunching:(NSNotification*)notification { - // Configure logging system - [DDLog addLogger:[DDTTYLogger sharedInstance]]; - - // Create DAV server - _httpServer = [[HTTPServer alloc] init]; - [_httpServer setConnectionClass:[DAVConnection class]]; - [_httpServer setPort:8080]; - - // Enable Bonjour - [_httpServer setType:@"_http._tcp."]; - - // Set document root - [_httpServer setDocumentRoot:[@"~/Sites" stringByExpandingTildeInPath]]; - - // Start DAV server - NSError* error = nil; - if (![_httpServer start:&error]) { - DDLogError(@"Error starting HTTP Server: %@", error); - } -} - -- (void) applicationWillTerminate:(NSNotification*)notification { - // Stop DAV server - [_httpServer stop]; - [_httpServer release]; - _httpServer = nil; -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/WebDAVServer/English.lproj/MainMenu.nib/designable.nib b/third_party/objc/CocoaHTTPServer/Samples/WebDAVServer/English.lproj/MainMenu.nib/designable.nib deleted file mode 100644 index c93d7f3092016..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/WebDAVServer/English.lproj/MainMenu.nib/designable.nib +++ /dev/null @@ -1,748 +0,0 @@ - - - - 1060 - 10J4138 - 851 - 1038.35 - 461.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 851 - - - YES - - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - - PluginDependencyRecalculationVersion - - - - YES - - - NSApplication - - - - FirstResponder - - - NSApplication - - - MainMenu - - YES - - - DAVServer - - 1048576 - 2147483647 - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - submenuAction: - - DAVServer - - YES - - - About DAVServer - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Services - - 1048576 - 2147483647 - - - submenuAction: - - - Services - - - YES - - _NSServicesMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Hide DAVServer - h - 1048576 - 2147483647 - - - - - - Hide Others - h - 1572864 - 2147483647 - - - - - - Show All - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Quit DAVServer - q - 1048576 - 2147483647 - - - - - _NSAppleMenu - - - - - Edit - - 1048576 - 2147483647 - - - submenuAction: - - - Edit - - - YES - - - Undo - z - 1048576 - 2147483647 - - - - - - Redo - Z - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Cut - x - 1048576 - 2147483647 - - - - - - Copy - c - 1048576 - 2147483647 - - - - - - Paste - v - 1048576 - 2147483647 - - - - - - Delete - - 1048576 - 2147483647 - - - - - - Select All - a - 1048576 - 2147483647 - - - - - - - - _NSMainMenu - - - AppDelegate - - - - - YES - - - terminate: - - - - 139 - - - - orderFrontStandardAboutPanel: - - - - 142 - - - - hideOtherApplications: - - - - 146 - - - - hide: - - - - 152 - - - - unhideAllApplications: - - - - 153 - - - - cut: - - - - 175 - - - - paste: - - - - 176 - - - - redo: - - - - 178 - - - - selectAll: - - - - 179 - - - - undo: - - - - 180 - - - - copy: - - - - 181 - - - - delete: - - - - 195 - - - - delegate - - - - 207 - - - - - YES - - 0 - - YES - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - 29 - - - YES - - - - - MainMenu - - - 56 - - - YES - - - - - - 57 - - - YES - - - - - - - - - - - - - - 58 - - - - - 131 - - - YES - - - - - - 130 - - - - - 134 - - - - - 136 - - - - - 144 - - - - - 145 - - - - - 149 - - - - - 150 - - - - - 196 - - - - - 163 - - - YES - - - - - - 169 - - - YES - - - - - - - - - - - - - 156 - - - - - 157 - - - - - 158 - - - - - 160 - - - - - 164 - - - - - 171 - - - - - 172 - - - - - 173 - - - - - 206 - - - AppDelegate - - - -3 - - - Application - - - - - YES - - YES - 130.IBPluginDependency - 130.ImportedFromIB2 - 131.IBPluginDependency - 131.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 - 136.IBPluginDependency - 136.ImportedFromIB2 - 144.IBPluginDependency - 144.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 - 156.IBPluginDependency - 156.ImportedFromIB2 - 157.IBPluginDependency - 157.ImportedFromIB2 - 158.IBPluginDependency - 158.ImportedFromIB2 - 160.IBPluginDependency - 160.ImportedFromIB2 - 163.IBPluginDependency - 163.ImportedFromIB2 - 164.IBPluginDependency - 164.ImportedFromIB2 - 169.IBEditorWindowLastContentRect - 169.IBPluginDependency - 169.ImportedFromIB2 - 171.IBPluginDependency - 171.ImportedFromIB2 - 172.IBPluginDependency - 172.ImportedFromIB2 - 173.IBPluginDependency - 173.ImportedFromIB2 - 196.IBPluginDependency - 196.ImportedFromIB2 - 206.ImportedFromIB2 - 29.IBEditorWindowLastContentRect - 29.IBPluginDependency - 29.ImportedFromIB2 - 56.IBPluginDependency - 56.ImportedFromIB2 - 57.IBEditorWindowLastContentRect - 57.IBPluginDependency - 57.ImportedFromIB2 - 58.IBPluginDependency - 58.ImportedFromIB2 - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{440, 650}, {151, 153}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - {{333, 803}, {163, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{345, 650}, {207, 153}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - YES - - - YES - - - - - YES - - - YES - - - - 208 - - - - YES - - AppDelegate - NSObject - - IBProjectSource - AppDelegate.h - - - - AppDelegate - NSObject - - IBUserSource - - - - - FirstResponder - NSObject - - IBUserSource - - - - - - 0 - IBCocoaFramework - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - - - YES - - 3 - - YES - - YES - NSMenuCheckmark - NSMenuMixedState - - - YES - {9, 8} - {7, 2} - - - - diff --git a/third_party/objc/CocoaHTTPServer/Samples/WebDAVServer/English.lproj/MainMenu.nib/keyedobjects.nib b/third_party/objc/CocoaHTTPServer/Samples/WebDAVServer/English.lproj/MainMenu.nib/keyedobjects.nib deleted file mode 100644 index ef64f7e9a0f81..0000000000000 Binary files a/third_party/objc/CocoaHTTPServer/Samples/WebDAVServer/English.lproj/MainMenu.nib/keyedobjects.nib and /dev/null differ diff --git a/third_party/objc/CocoaHTTPServer/Samples/WebDAVServer/Info.plist b/third_party/objc/CocoaHTTPServer/Samples/WebDAVServer/Info.plist deleted file mode 100644 index ae13957325125..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/WebDAVServer/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleVersion - 1.0 - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/third_party/objc/CocoaHTTPServer/Samples/WebDAVServer/Instructions.txt b/third_party/objc/CocoaHTTPServer/Samples/WebDAVServer/Instructions.txt deleted file mode 100644 index 50e1d9524e6f2..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/WebDAVServer/Instructions.txt +++ /dev/null @@ -1,23 +0,0 @@ -INFO: - -This project demonstrates WebDAV support. It makes your local ~/Sites directory available through the protocol. - -INSTRUCTIONS: - -Open the Xcode project, and build and go. - -On the Xcode console you'll see a message saying: -"Started HTTP server on port 8080" - -Now open the Mac Finder, and click: -Go -> Connect to ServerÉ (Or type command K) - -You will be prompted to enter the server address. Type in: -http://localhost:8080 - -Then click connect. -You will be prompted for a username and password, but this sample doesn't have any such restrictions so you can just login as a guest. - -Then the finder will mount the DAV volume! - -Enjoy. \ No newline at end of file diff --git a/third_party/objc/CocoaHTTPServer/Samples/WebDAVServer/WebDAVServer.xcodeproj/project.pbxproj b/third_party/objc/CocoaHTTPServer/Samples/WebDAVServer/WebDAVServer.xcodeproj/project.pbxproj deleted file mode 100644 index d81eae46e1da5..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/WebDAVServer/WebDAVServer.xcodeproj/project.pbxproj +++ /dev/null @@ -1,461 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; }; - 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; - DC278B40127670BF00EAFA9F /* DDData.m in Sources */ = {isa = PBXBuildFile; fileRef = DC278B3B127670BF00EAFA9F /* DDData.m */; }; - DC278B41127670BF00EAFA9F /* DDNumber.m in Sources */ = {isa = PBXBuildFile; fileRef = DC278B3D127670BF00EAFA9F /* DDNumber.m */; }; - DC278B42127670BF00EAFA9F /* DDRange.m in Sources */ = {isa = PBXBuildFile; fileRef = DC278B3F127670BF00EAFA9F /* DDRange.m */; }; - DC278B521276714F00EAFA9F /* HTTPAsyncFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC278B471276714F00EAFA9F /* HTTPAsyncFileResponse.m */; }; - DC278B531276714F00EAFA9F /* HTTPAuthenticationRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = DC278B491276714F00EAFA9F /* HTTPAuthenticationRequest.m */; }; - DC278B541276714F00EAFA9F /* HTTPConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = DC278B4B1276714F00EAFA9F /* HTTPConnection.m */; }; - DC278B551276714F00EAFA9F /* HTTPDynamicFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC278B4D1276714F00EAFA9F /* HTTPDynamicFileResponse.m */; }; - DC278B571276714F00EAFA9F /* HTTPServer.m in Sources */ = {isa = PBXBuildFile; fileRef = DC278B511276714F00EAFA9F /* HTTPServer.m */; }; - DC278B5A1276717D00EAFA9F /* WebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = DC278B591276717D00EAFA9F /* WebSocket.m */; }; - DC37324C139F3E8500A8407D /* DAVConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = DC373245139F3E8500A8407D /* DAVConnection.m */; }; - DC37324D139F3E8500A8407D /* DAVResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC373247139F3E8500A8407D /* DAVResponse.m */; }; - DC37324E139F3E8500A8407D /* DELETEResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC373249139F3E8500A8407D /* DELETEResponse.m */; }; - DC37324F139F3E8500A8407D /* PUTResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC37324B139F3E8500A8407D /* PUTResponse.m */; }; - DC41D6D90C178D5700F8D00D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DC41D6D70C178D5700F8D00D /* AppDelegate.m */; }; - DC9631E0129E2DBB003AC1CE /* GCDAsyncSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = DC9631DF129E2DBB003AC1CE /* GCDAsyncSocket.m */; }; - DC9631F2129E2DE9003AC1CE /* DDASLLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = DC9631EB129E2DE9003AC1CE /* DDASLLogger.m */; }; - DC9631F3129E2DE9003AC1CE /* DDFileLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = DC9631ED129E2DE9003AC1CE /* DDFileLogger.m */; }; - DC9631F4129E2DE9003AC1CE /* DDLog.m in Sources */ = {isa = PBXBuildFile; fileRef = DC9631EF129E2DE9003AC1CE /* DDLog.m */; }; - DC9631F5129E2DE9003AC1CE /* DDTTYLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = DC9631F1129E2DE9003AC1CE /* DDTTYLogger.m */; }; - DC9631FD129E2E02003AC1CE /* HTTPDataResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC9631F7129E2E02003AC1CE /* HTTPDataResponse.m */; }; - DC9631FE129E2E02003AC1CE /* HTTPFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC9631F9129E2E02003AC1CE /* HTTPFileResponse.m */; }; - DC9631FF129E2E02003AC1CE /* HTTPRedirectResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC9631FC129E2E02003AC1CE /* HTTPRedirectResponse.m */; }; - DC963205129E2E3C003AC1CE /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC963204129E2E3C003AC1CE /* Security.framework */; }; - DC9A0996128A5275006AD900 /* HTTPMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = DC9A0995128A5275006AD900 /* HTTPMessage.m */; }; - E220758413978B5100D030B6 /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = E220758313978B5100D030B6 /* libxml2.dylib */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - DC41D6F60C178E9200F8D00D /* Copy Internal Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Copy Internal Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 29B97319FDCFA39411CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/MainMenu.nib; sourceTree = ""; }; - 32CA4F630368D1EE00C91783 /* WebDAVServer_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebDAVServer_Prefix.pch; sourceTree = ""; }; - 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; - 8D1107320486CEB800E47090 /* WebDAVServer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WebDAVServer.app; sourceTree = BUILT_PRODUCTS_DIR; }; - DC278B3A127670BF00EAFA9F /* DDData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDData.h; sourceTree = ""; }; - DC278B3B127670BF00EAFA9F /* DDData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDData.m; sourceTree = ""; }; - DC278B3C127670BF00EAFA9F /* DDNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDNumber.h; sourceTree = ""; }; - DC278B3D127670BF00EAFA9F /* DDNumber.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDNumber.m; sourceTree = ""; }; - DC278B3E127670BF00EAFA9F /* DDRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDRange.h; sourceTree = ""; }; - DC278B3F127670BF00EAFA9F /* DDRange.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDRange.m; sourceTree = ""; }; - DC278B461276714F00EAFA9F /* HTTPAsyncFileResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPAsyncFileResponse.h; sourceTree = ""; }; - DC278B471276714F00EAFA9F /* HTTPAsyncFileResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPAsyncFileResponse.m; sourceTree = ""; }; - DC278B481276714F00EAFA9F /* HTTPAuthenticationRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPAuthenticationRequest.h; sourceTree = ""; }; - DC278B491276714F00EAFA9F /* HTTPAuthenticationRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPAuthenticationRequest.m; sourceTree = ""; }; - DC278B4A1276714F00EAFA9F /* HTTPConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPConnection.h; sourceTree = ""; }; - DC278B4B1276714F00EAFA9F /* HTTPConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPConnection.m; sourceTree = ""; }; - DC278B4C1276714F00EAFA9F /* HTTPDynamicFileResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPDynamicFileResponse.h; sourceTree = ""; }; - DC278B4D1276714F00EAFA9F /* HTTPDynamicFileResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPDynamicFileResponse.m; sourceTree = ""; }; - DC278B4E1276714F00EAFA9F /* HTTPResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPResponse.h; sourceTree = ""; }; - DC278B501276714F00EAFA9F /* HTTPServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPServer.h; sourceTree = ""; }; - DC278B511276714F00EAFA9F /* HTTPServer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPServer.m; sourceTree = ""; }; - DC278B581276717D00EAFA9F /* WebSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebSocket.h; sourceTree = ""; }; - DC278B591276717D00EAFA9F /* WebSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WebSocket.m; sourceTree = ""; }; - DC373244139F3E8500A8407D /* DAVConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DAVConnection.h; sourceTree = ""; }; - DC373245139F3E8500A8407D /* DAVConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DAVConnection.m; sourceTree = ""; }; - DC373246139F3E8500A8407D /* DAVResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DAVResponse.h; sourceTree = ""; }; - DC373247139F3E8500A8407D /* DAVResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DAVResponse.m; sourceTree = ""; }; - DC373248139F3E8500A8407D /* DELETEResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DELETEResponse.h; sourceTree = ""; }; - DC373249139F3E8500A8407D /* DELETEResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DELETEResponse.m; sourceTree = ""; }; - DC37324A139F3E8500A8407D /* PUTResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PUTResponse.h; sourceTree = ""; }; - DC37324B139F3E8500A8407D /* PUTResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PUTResponse.m; sourceTree = ""; }; - DC41D6D70C178D5700F8D00D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - DC41D6D80C178D5700F8D00D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - DC9631DE129E2DBB003AC1CE /* GCDAsyncSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GCDAsyncSocket.h; sourceTree = ""; }; - DC9631DF129E2DBB003AC1CE /* GCDAsyncSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GCDAsyncSocket.m; sourceTree = ""; }; - DC9631EA129E2DE9003AC1CE /* DDASLLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDASLLogger.h; sourceTree = ""; }; - DC9631EB129E2DE9003AC1CE /* DDASLLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDASLLogger.m; sourceTree = ""; }; - DC9631EC129E2DE9003AC1CE /* DDFileLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDFileLogger.h; sourceTree = ""; }; - DC9631ED129E2DE9003AC1CE /* DDFileLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDFileLogger.m; sourceTree = ""; }; - DC9631EE129E2DE9003AC1CE /* DDLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDLog.h; sourceTree = ""; }; - DC9631EF129E2DE9003AC1CE /* DDLog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDLog.m; sourceTree = ""; }; - DC9631F0129E2DE9003AC1CE /* DDTTYLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDTTYLogger.h; sourceTree = ""; }; - DC9631F1129E2DE9003AC1CE /* DDTTYLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDTTYLogger.m; sourceTree = ""; }; - DC9631F6129E2E02003AC1CE /* HTTPDataResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPDataResponse.h; sourceTree = ""; }; - DC9631F7129E2E02003AC1CE /* HTTPDataResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPDataResponse.m; sourceTree = ""; }; - DC9631F8129E2E02003AC1CE /* HTTPFileResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPFileResponse.h; sourceTree = ""; }; - DC9631F9129E2E02003AC1CE /* HTTPFileResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPFileResponse.m; sourceTree = ""; }; - DC9631FA129E2E02003AC1CE /* HTTPLogging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPLogging.h; sourceTree = ""; }; - DC9631FB129E2E02003AC1CE /* HTTPRedirectResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPRedirectResponse.h; sourceTree = ""; }; - DC9631FC129E2E02003AC1CE /* HTTPRedirectResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPRedirectResponse.m; sourceTree = ""; }; - DC963204129E2E3C003AC1CE /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; - DC9A0994128A5275006AD900 /* HTTPMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPMessage.h; sourceTree = ""; }; - DC9A0995128A5275006AD900 /* HTTPMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPMessage.m; sourceTree = ""; }; - E220758313978B5100D030B6 /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; }; - E23C163E139F16CA009BFD22 /* Base.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = ""; }; - E23C163F139F16CA009BFD22 /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; - E23C1641139F16CA009BFD22 /* Release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8D11072E0486CEB800E47090 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, - DC963205129E2E3C003AC1CE /* Security.framework in Frameworks */, - E220758413978B5100D030B6 /* libxml2.dylib in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Classes */ = { - isa = PBXGroup; - children = ( - DC41D6D80C178D5700F8D00D /* AppDelegate.h */, - DC41D6D70C178D5700F8D00D /* AppDelegate.m */, - ); - name = Classes; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 8D1107320486CEB800E47090 /* WebDAVServer.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* SimpleHTTPServer */ = { - isa = PBXGroup; - children = ( - E23C163D139F16CA009BFD22 /* Xcode-Configurations */, - DC9631E9129E2DD5003AC1CE /* CocoaLumberjack */, - DC41D6CD0C178CEA00F8D00D /* CocoaAsyncSocket */, - DC41D6D50C178D1600F8D00D /* Core */, - DC373243139F3E8500A8407D /* WebDAV */, - 080E96DDFE201D6D7F000001 /* Classes */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 29B97323FDCFA39411CA2CEA /* Frameworks and Libraries */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = SimpleHTTPServer; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - 32CA4F630368D1EE00C91783 /* WebDAVServer_Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.m */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - 8D1107310486CEB800E47090 /* Info.plist */, - 29B97318FDCFA39411CA2CEA /* MainMenu.nib */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks and Libraries */ = { - isa = PBXGroup; - children = ( - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, - DC963204129E2E3C003AC1CE /* Security.framework */, - E220758313978B5100D030B6 /* libxml2.dylib */, - ); - name = "Frameworks and Libraries"; - sourceTree = ""; - }; - DC373243139F3E8500A8407D /* WebDAV */ = { - isa = PBXGroup; - children = ( - DC373244139F3E8500A8407D /* DAVConnection.h */, - DC373245139F3E8500A8407D /* DAVConnection.m */, - DC373246139F3E8500A8407D /* DAVResponse.h */, - DC373247139F3E8500A8407D /* DAVResponse.m */, - DC373248139F3E8500A8407D /* DELETEResponse.h */, - DC373249139F3E8500A8407D /* DELETEResponse.m */, - DC37324A139F3E8500A8407D /* PUTResponse.h */, - DC37324B139F3E8500A8407D /* PUTResponse.m */, - ); - name = WebDAV; - path = ../../Extensions/WebDAV; - sourceTree = ""; - }; - DC41D6CD0C178CEA00F8D00D /* CocoaAsyncSocket */ = { - isa = PBXGroup; - children = ( - DC9631DE129E2DBB003AC1CE /* GCDAsyncSocket.h */, - DC9631DF129E2DBB003AC1CE /* GCDAsyncSocket.m */, - ); - name = CocoaAsyncSocket; - path = ../../Vendor/CocoaAsyncSocket; - sourceTree = ""; - }; - DC41D6D50C178D1600F8D00D /* Core */ = { - isa = PBXGroup; - children = ( - DC9631FA129E2E02003AC1CE /* HTTPLogging.h */, - DC278B481276714F00EAFA9F /* HTTPAuthenticationRequest.h */, - DC278B491276714F00EAFA9F /* HTTPAuthenticationRequest.m */, - DC278B501276714F00EAFA9F /* HTTPServer.h */, - DC278B511276714F00EAFA9F /* HTTPServer.m */, - DC278B4A1276714F00EAFA9F /* HTTPConnection.h */, - DC278B4B1276714F00EAFA9F /* HTTPConnection.m */, - DC9A0994128A5275006AD900 /* HTTPMessage.h */, - DC9A0995128A5275006AD900 /* HTTPMessage.m */, - DC278B4E1276714F00EAFA9F /* HTTPResponse.h */, - DC278B581276717D00EAFA9F /* WebSocket.h */, - DC278B591276717D00EAFA9F /* WebSocket.m */, - DCA9EB8E0FA257A600FB1AC7 /* Responses */, - DCF61A7F0E609727009BFEE4 /* Categories */, - ); - name = Core; - path = ../../Core; - sourceTree = ""; - }; - DC9631E9129E2DD5003AC1CE /* CocoaLumberjack */ = { - isa = PBXGroup; - children = ( - DC9631EE129E2DE9003AC1CE /* DDLog.h */, - DC9631EF129E2DE9003AC1CE /* DDLog.m */, - DC9631F0129E2DE9003AC1CE /* DDTTYLogger.h */, - DC9631F1129E2DE9003AC1CE /* DDTTYLogger.m */, - DC9631EA129E2DE9003AC1CE /* DDASLLogger.h */, - DC9631EB129E2DE9003AC1CE /* DDASLLogger.m */, - DC9631EC129E2DE9003AC1CE /* DDFileLogger.h */, - DC9631ED129E2DE9003AC1CE /* DDFileLogger.m */, - ); - name = CocoaLumberjack; - path = ../../Vendor/CocoaLumberjack; - sourceTree = ""; - }; - DCA9EB8E0FA257A600FB1AC7 /* Responses */ = { - isa = PBXGroup; - children = ( - DC9631F8129E2E02003AC1CE /* HTTPFileResponse.h */, - DC9631F9129E2E02003AC1CE /* HTTPFileResponse.m */, - DC9631F6129E2E02003AC1CE /* HTTPDataResponse.h */, - DC9631F7129E2E02003AC1CE /* HTTPDataResponse.m */, - DC9631FB129E2E02003AC1CE /* HTTPRedirectResponse.h */, - DC9631FC129E2E02003AC1CE /* HTTPRedirectResponse.m */, - DC278B461276714F00EAFA9F /* HTTPAsyncFileResponse.h */, - DC278B471276714F00EAFA9F /* HTTPAsyncFileResponse.m */, - DC278B4C1276714F00EAFA9F /* HTTPDynamicFileResponse.h */, - DC278B4D1276714F00EAFA9F /* HTTPDynamicFileResponse.m */, - ); - path = Responses; - sourceTree = ""; - }; - DCF61A7F0E609727009BFEE4 /* Categories */ = { - isa = PBXGroup; - children = ( - DC278B3A127670BF00EAFA9F /* DDData.h */, - DC278B3B127670BF00EAFA9F /* DDData.m */, - DC278B3C127670BF00EAFA9F /* DDNumber.h */, - DC278B3D127670BF00EAFA9F /* DDNumber.m */, - DC278B3E127670BF00EAFA9F /* DDRange.h */, - DC278B3F127670BF00EAFA9F /* DDRange.m */, - ); - path = Categories; - sourceTree = ""; - }; - E23C163D139F16CA009BFD22 /* Xcode-Configurations */ = { - isa = PBXGroup; - children = ( - E23C163E139F16CA009BFD22 /* Base.xcconfig */, - E23C163F139F16CA009BFD22 /* Debug.xcconfig */, - E23C1641139F16CA009BFD22 /* Release.xcconfig */, - ); - name = "Xcode-Configurations"; - path = "../Xcode-Configurations"; - sourceTree = SOURCE_ROOT; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 8D1107260486CEB800E47090 /* WebDAVServer */ = { - isa = PBXNativeTarget; - buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "WebDAVServer" */; - buildPhases = ( - 8D1107290486CEB800E47090 /* Resources */, - 8D11072C0486CEB800E47090 /* Sources */, - 8D11072E0486CEB800E47090 /* Frameworks */, - DC41D6F60C178E9200F8D00D /* Copy Internal Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = WebDAVServer; - productInstallPath = "$(HOME)/Applications"; - productName = SimpleHTTPServer; - productReference = 8D1107320486CEB800E47090 /* WebDAVServer.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "WebDAVServer" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* SimpleHTTPServer */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 8D1107260486CEB800E47090 /* WebDAVServer */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 8D1107290486CEB800E47090 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 8D11072C0486CEB800E47090 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D11072D0486CEB800E47090 /* main.m in Sources */, - DC41D6D90C178D5700F8D00D /* AppDelegate.m in Sources */, - DC278B40127670BF00EAFA9F /* DDData.m in Sources */, - DC278B41127670BF00EAFA9F /* DDNumber.m in Sources */, - DC278B42127670BF00EAFA9F /* DDRange.m in Sources */, - DC278B521276714F00EAFA9F /* HTTPAsyncFileResponse.m in Sources */, - DC278B531276714F00EAFA9F /* HTTPAuthenticationRequest.m in Sources */, - DC278B541276714F00EAFA9F /* HTTPConnection.m in Sources */, - DC278B551276714F00EAFA9F /* HTTPDynamicFileResponse.m in Sources */, - DC278B571276714F00EAFA9F /* HTTPServer.m in Sources */, - DC278B5A1276717D00EAFA9F /* WebSocket.m in Sources */, - DC9A0996128A5275006AD900 /* HTTPMessage.m in Sources */, - DC9631E0129E2DBB003AC1CE /* GCDAsyncSocket.m in Sources */, - DC9631F2129E2DE9003AC1CE /* DDASLLogger.m in Sources */, - DC9631F3129E2DE9003AC1CE /* DDFileLogger.m in Sources */, - DC9631F4129E2DE9003AC1CE /* DDLog.m in Sources */, - DC9631F5129E2DE9003AC1CE /* DDTTYLogger.m in Sources */, - DC9631FD129E2E02003AC1CE /* HTTPDataResponse.m in Sources */, - DC9631FE129E2E02003AC1CE /* HTTPFileResponse.m in Sources */, - DC9631FF129E2E02003AC1CE /* HTTPRedirectResponse.m in Sources */, - DC37324C139F3E8500A8407D /* DAVConnection.m in Sources */, - DC37324D139F3E8500A8407D /* DAVResponse.m in Sources */, - DC37324E139F3E8500A8407D /* DELETEResponse.m in Sources */, - DC37324F139F3E8500A8407D /* PUTResponse.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 29B97318FDCFA39411CA2CEA /* MainMenu.nib */ = { - isa = PBXVariantGroup; - children = ( - 29B97319FDCFA39411CA2CEA /* English */, - ); - name = MainMenu.nib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - C01FCF4B08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = WebDAVServer_Prefix.pch; - HEADER_SEARCH_PATHS = "${SDKROOT}/usr/include/libxml2"; - INFOPLIST_FILE = Info.plist; - PRODUCT_NAME = WebDAVServer; - }; - name = Debug; - }; - C01FCF4C08A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = WebDAVServer_Prefix.pch; - HEADER_SEARCH_PATHS = "${SDKROOT}/usr/include/libxml2"; - INFOPLIST_FILE = Info.plist; - PRODUCT_NAME = WebDAVServer; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = E23C163F139F16CA009BFD22 /* Debug.xcconfig */; - buildSettings = { - SDKROOT = macosx; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = E23C1641139F16CA009BFD22 /* Release.xcconfig */; - buildSettings = { - SDKROOT = macosx; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "WebDAVServer" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4B08A954540054247B /* Debug */, - C01FCF4C08A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "WebDAVServer" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/third_party/objc/CocoaHTTPServer/Samples/WebDAVServer/WebDAVServer.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/third_party/objc/CocoaHTTPServer/Samples/WebDAVServer/WebDAVServer.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 6bd0885b09bc6..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/WebDAVServer/WebDAVServer.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/third_party/objc/CocoaHTTPServer/Samples/WebDAVServer/WebDAVServer_Prefix.pch b/third_party/objc/CocoaHTTPServer/Samples/WebDAVServer/WebDAVServer_Prefix.pch deleted file mode 100644 index 00e8847a74719..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/WebDAVServer/WebDAVServer_Prefix.pch +++ /dev/null @@ -1,3 +0,0 @@ -#ifdef __OBJC__ -#import -#endif diff --git a/third_party/objc/CocoaHTTPServer/Samples/WebDAVServer/main.m b/third_party/objc/CocoaHTTPServer/Samples/WebDAVServer/main.m deleted file mode 100644 index 71e751e31720c..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/WebDAVServer/main.m +++ /dev/null @@ -1,5 +0,0 @@ -#import - -int main(int argc, char* argv[]) { - return NSApplicationMain(argc, (const char**)argv); -} diff --git a/third_party/objc/CocoaHTTPServer/Samples/Xcode-Configurations/Base.xcconfig b/third_party/objc/CocoaHTTPServer/Samples/Xcode-Configurations/Base.xcconfig deleted file mode 100644 index d861d6b4dbf11..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/Xcode-Configurations/Base.xcconfig +++ /dev/null @@ -1,19 +0,0 @@ -// Common -INFOPLIST_FILE = Info.plist -ALWAYS_SEARCH_USER_PATHS = NO -GCC_DYNAMIC_NO_PIC = YES -GCC_C_LANGUAGE_STANDARD = c99 -GCC_ENABLE_CPP_EXCEPTIONS = NO -GCC_ENABLE_CPP_RTTI = NO -GCC_WARN_SHADOW = YES -GCC_WARN_64_TO_32_BIT_CONVERSION = YES -GCC_WARN_ABOUT_RETURN_TYPE = YES -GCC_WARN_MISSING_PARENTHESES = YES -GCC_WARN_UNUSED_VARIABLE = YES -GCC_PRECOMPILE_PREFIX_HEADER = YES -WARNING_CFLAGS = -Wall -Winline - -// iOS SDK -CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer - - diff --git a/third_party/objc/CocoaHTTPServer/Samples/Xcode-Configurations/Debug.xcconfig b/third_party/objc/CocoaHTTPServer/Samples/Xcode-Configurations/Debug.xcconfig deleted file mode 100644 index 30577d1ff880f..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/Xcode-Configurations/Debug.xcconfig +++ /dev/null @@ -1,5 +0,0 @@ -#include "Base" - -// Common -ONLY_ACTIVE_ARCH = YES -GCC_OPTIMIZATION_LEVEL = 0 diff --git a/third_party/objc/CocoaHTTPServer/Samples/Xcode-Configurations/ReadMe.txt b/third_party/objc/CocoaHTTPServer/Samples/Xcode-Configurations/ReadMe.txt deleted file mode 100644 index 93c83fbab7776..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/Xcode-Configurations/ReadMe.txt +++ /dev/null @@ -1,3 +0,0 @@ -Since there are so many different sample Xcode projects, we use these Xcode config files to help simplify a lot configuring of the projects and targets, and ensuring they are all in sync. - -Please note: These settings are not required if you want to include the CocoaHTTPServer in your project. They mostly help the developers of the project by ensuring that many compiler warnings are turned on so we don't introduce compiler issues into the project. \ No newline at end of file diff --git a/third_party/objc/CocoaHTTPServer/Samples/Xcode-Configurations/Release.xcconfig b/third_party/objc/CocoaHTTPServer/Samples/Xcode-Configurations/Release.xcconfig deleted file mode 100644 index a3c3701583629..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/Xcode-Configurations/Release.xcconfig +++ /dev/null @@ -1,6 +0,0 @@ -#include "Base" - -// Common -GCC_TREAT_WARNINGS_AS_ERRORS = YES -GCC_PREPROCESSOR_DEFINITIONS = NDEBUG NS_BLOCK_ASSERTIONS -VALIDATE_PRODUCT = YES diff --git a/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/Classes/iPhoneHTTPServerAppDelegate.h b/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/Classes/iPhoneHTTPServerAppDelegate.h deleted file mode 100644 index 7dc33f7065c62..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/Classes/iPhoneHTTPServerAppDelegate.h +++ /dev/null @@ -1,18 +0,0 @@ -#import - -@class iPhoneHTTPServerViewController; -@class HTTPServer; - -@interface iPhoneHTTPServerAppDelegate : NSObject -{ - HTTPServer *httpServer; - - UIWindow *window; - iPhoneHTTPServerViewController *viewController; -} - -@property (nonatomic, retain) IBOutlet UIWindow *window; -@property (nonatomic, retain) IBOutlet iPhoneHTTPServerViewController *viewController; - -@end - diff --git a/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/Classes/iPhoneHTTPServerAppDelegate.m b/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/Classes/iPhoneHTTPServerAppDelegate.m deleted file mode 100644 index 4043ac6145e68..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/Classes/iPhoneHTTPServerAppDelegate.m +++ /dev/null @@ -1,63 +0,0 @@ -#import "iPhoneHTTPServerAppDelegate.h" -#import "iPhoneHTTPServerViewController.h" -#import "HTTPServer.h" -#import "DDLog.h" -#import "DDTTYLogger.h" - -// Log levels: off, error, warn, info, verbose -static const int ddLogLevel = LOG_LEVEL_VERBOSE; - - -@implementation iPhoneHTTPServerAppDelegate - -@synthesize window; -@synthesize viewController; - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - // Configure our logging framework. - // To keep things simple and fast, we're just going to log to the Xcode console. - [DDLog addLogger:[DDTTYLogger sharedInstance]]; - - // Create server using our custom MyHTTPServer class - httpServer = [[HTTPServer alloc] init]; - - // Tell the server to broadcast its presence via Bonjour. - // This allows browsers such as Safari to automatically discover our service. - [httpServer setType:@"_http._tcp."]; - - // Normally there's no need to run our server on any specific port. - // Technologies like Bonjour allow clients to dynamically discover the server's port at runtime. - // However, for easy testing you may want force a certain port so you can just hit the refresh button. - [httpServer setPort:12345]; - - // Serve files from our embedded Web folder - NSString *webPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"Web"]; - DDLogInfo(@"Setting document root: %@", webPath); - - [httpServer setDocumentRoot:webPath]; - - // Start the server (and check for problems) - - NSError *error; - if(![httpServer start:&error]) - { - DDLogError(@"Error starting HTTP Server: %@", error); - } - - // Add the view controller's view to the window and display. - [window addSubview:viewController.view]; - [window makeKeyAndVisible]; - - return YES; -} - -- (void)dealloc -{ - [viewController release]; - [window release]; - [super dealloc]; -} - - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/Classes/iPhoneHTTPServerViewController.h b/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/Classes/iPhoneHTTPServerViewController.h deleted file mode 100644 index 6111998f00d4f..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/Classes/iPhoneHTTPServerViewController.h +++ /dev/null @@ -1,9 +0,0 @@ -#import - - -@interface iPhoneHTTPServerViewController : UIViewController { - -} - -@end - diff --git a/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/Classes/iPhoneHTTPServerViewController.m b/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/Classes/iPhoneHTTPServerViewController.m deleted file mode 100644 index 9d19a9e4cb741..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/Classes/iPhoneHTTPServerViewController.m +++ /dev/null @@ -1,6 +0,0 @@ -#import "iPhoneHTTPServerViewController.h" - - -@implementation iPhoneHTTPServerViewController - -@end diff --git a/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/Instructions.txt b/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/Instructions.txt deleted file mode 100644 index be78b3b9c35fa..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/Instructions.txt +++ /dev/null @@ -1,23 +0,0 @@ -INFO: - -This is a bare bones project demonstrating how to embed the CocoaHTTPServer in an iOS project. - -Notice the Web folder. This folder is added to the project as a resource, and the folder itself is copied into the iPhone app. The contents of the folder are set as the document root of the http server. - -INSTRUCTIONS: - -Open the Xcode project, and build and go. - -On the Xcode console you'll see a message saying: -"Started HTTP server on port 59123" - -Now open your browser and type in the URL to access the server. -If you're running it via the simulator, then you can use: -http://localhost:59123 - -If you're running it on your device, then you'll need to use: -http://:59123 - -(Replace 59123 with whatever port the server is actually running on.) - -Enjoy. \ No newline at end of file diff --git a/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/MainWindow.xib b/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/MainWindow.xib deleted file mode 100644 index ef75390dcf79e..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/MainWindow.xib +++ /dev/null @@ -1,444 +0,0 @@ - - - - 1024 - 10D571 - 786 - 1038.29 - 460.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 112 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - IBCocoaTouchFramework - - - iPhoneHTTPServerViewController - - - 1 - - IBCocoaTouchFramework - NO - - - - 292 - {320, 480} - - 1 - MSAxIDEAA - - NO - NO - - IBCocoaTouchFramework - YES - - - - - YES - - - delegate - - - - 4 - - - - viewController - - - - 11 - - - - window - - - - 14 - - - - - YES - - 0 - - - - - - -1 - - - File's Owner - - - 3 - - - iPhoneHTTPServer App Delegate - - - -2 - - - - - 10 - - - - - 12 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 10.CustomClassName - 10.IBEditorWindowLastContentRect - 10.IBPluginDependency - 12.IBEditorWindowLastContentRect - 12.IBPluginDependency - 3.CustomClassName - 3.IBPluginDependency - - - YES - UIApplication - UIResponder - iPhoneHTTPServerViewController - {{234, 376}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - {{525, 346}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - iPhoneHTTPServerAppDelegate - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - YES - - - - - YES - - - YES - - - - 15 - - - - YES - - UIWindow - UIView - - IBUserSource - - - - - iPhoneHTTPServerAppDelegate - NSObject - - YES - - YES - viewController - window - - - YES - iPhoneHTTPServerViewController - UIWindow - - - - YES - - YES - viewController - window - - - YES - - viewController - iPhoneHTTPServerViewController - - - window - UIWindow - - - - - IBProjectSource - Classes/iPhoneHTTPServerAppDelegate.h - - - - iPhoneHTTPServerAppDelegate - NSObject - - IBUserSource - - - - - iPhoneHTTPServerViewController - UIViewController - - IBProjectSource - Classes/iPhoneHTTPServerViewController.h - - - - - YES - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UIApplication - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIApplication.h - - - - UIResponder - NSObject - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UIPopoverController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UISplitViewController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - UIWindow - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIWindow.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - iPhoneHTTPServer.xcodeproj - 3 - 112 - - diff --git a/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/Web/index.html b/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/Web/index.html deleted file mode 100644 index e23a7fe9348a0..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/Web/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - -iPhone HTTP Server Example - - -

    Welcome to CocoaHTTPServer!

    - -You can customize this page for your app, make other pages, or even serve up dynamic content.
    - -CocoaHTTPServer Project Page
    - - - \ No newline at end of file diff --git a/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/iPhoneHTTPServer-Info.plist b/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/iPhoneHTTPServer-Info.plist deleted file mode 100644 index 32894445dffb5..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/iPhoneHTTPServer-Info.plist +++ /dev/null @@ -1,30 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - NSMainNibFile - MainWindow - - diff --git a/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/iPhoneHTTPServer.xcodeproj/project.pbxproj b/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/iPhoneHTTPServer.xcodeproj/project.pbxproj deleted file mode 100755 index 2339c03c8445e..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/iPhoneHTTPServer.xcodeproj/project.pbxproj +++ /dev/null @@ -1,415 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 1D3623260D0F684500981E51 /* iPhoneHTTPServerAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* iPhoneHTTPServerAppDelegate.m */; }; - 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; - 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; - 2899E5220DE3E06400AC0155 /* iPhoneHTTPServerViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2899E5210DE3E06400AC0155 /* iPhoneHTTPServerViewController.xib */; }; - 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; }; - 28D7ACF80DDB3853001CB0EB /* iPhoneHTTPServerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* iPhoneHTTPServerViewController.m */; }; - DC372EFE139DC2E600A8407D /* DDData.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372EE2139DC2E600A8407D /* DDData.m */; }; - DC372EFF139DC2E600A8407D /* DDNumber.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372EE4139DC2E600A8407D /* DDNumber.m */; }; - DC372F00139DC2E600A8407D /* DDRange.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372EE6139DC2E600A8407D /* DDRange.m */; }; - DC372F01139DC2E600A8407D /* HTTPAuthenticationRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372EE8139DC2E600A8407D /* HTTPAuthenticationRequest.m */; }; - DC372F02139DC2E600A8407D /* HTTPConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372EEA139DC2E600A8407D /* HTTPConnection.m */; }; - DC372F03139DC2E600A8407D /* HTTPMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372EED139DC2E600A8407D /* HTTPMessage.m */; }; - DC372F04139DC2E600A8407D /* HTTPServer.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372EF0139DC2E600A8407D /* HTTPServer.m */; }; - DC372F05139DC2E600A8407D /* HTTPAsyncFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372EF3139DC2E600A8407D /* HTTPAsyncFileResponse.m */; }; - DC372F06139DC2E600A8407D /* HTTPDataResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372EF5139DC2E600A8407D /* HTTPDataResponse.m */; }; - DC372F07139DC2E600A8407D /* HTTPDynamicFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372EF7139DC2E600A8407D /* HTTPDynamicFileResponse.m */; }; - DC372F08139DC2E600A8407D /* HTTPFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372EF9139DC2E600A8407D /* HTTPFileResponse.m */; }; - DC372F09139DC2E600A8407D /* HTTPRedirectResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372EFB139DC2E600A8407D /* HTTPRedirectResponse.m */; }; - DC372F0A139DC2E600A8407D /* WebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = DC372EFD139DC2E600A8407D /* WebSocket.m */; }; - DC5406D5129F5C9600195140 /* DDASLLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = DC5406CE129F5C9600195140 /* DDASLLogger.m */; }; - DC5406D6129F5C9600195140 /* DDFileLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = DC5406D0129F5C9600195140 /* DDFileLogger.m */; }; - DC5406D7129F5C9600195140 /* DDLog.m in Sources */ = {isa = PBXBuildFile; fileRef = DC5406D2129F5C9600195140 /* DDLog.m */; }; - DC5406D8129F5C9600195140 /* DDTTYLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = DC5406D4129F5C9600195140 /* DDTTYLogger.m */; }; - DC5406E0129F5CB700195140 /* GCDAsyncSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = DC5406DF129F5CB700195140 /* GCDAsyncSocket.m */; }; - DC5406E2129F5CC900195140 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC5406E1129F5CC800195140 /* CFNetwork.framework */; }; - DC540781129F638200195140 /* Web in Resources */ = {isa = PBXBuildFile; fileRef = DC54077E129F638200195140 /* Web */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1D3623240D0F684500981E51 /* iPhoneHTTPServerAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iPhoneHTTPServerAppDelegate.h; sourceTree = ""; }; - 1D3623250D0F684500981E51 /* iPhoneHTTPServerAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = iPhoneHTTPServerAppDelegate.m; sourceTree = ""; }; - 1D6058910D05DD3D006BFB54 /* iPhoneHTTPServer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iPhoneHTTPServer.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 2899E5210DE3E06400AC0155 /* iPhoneHTTPServerViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = iPhoneHTTPServerViewController.xib; sourceTree = ""; }; - 28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; - 28D7ACF60DDB3853001CB0EB /* iPhoneHTTPServerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iPhoneHTTPServerViewController.h; sourceTree = ""; }; - 28D7ACF70DDB3853001CB0EB /* iPhoneHTTPServerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = iPhoneHTTPServerViewController.m; sourceTree = ""; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 32CA4F630368D1EE00C91783 /* iPhoneHTTPServer_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iPhoneHTTPServer_Prefix.pch; sourceTree = ""; }; - 8D1107310486CEB800E47090 /* iPhoneHTTPServer-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "iPhoneHTTPServer-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; - DC372E48139D398400A8407D /* Base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = ""; }; - DC372E49139D398400A8407D /* Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; - DC372E4B139D398400A8407D /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; - DC372EE1139DC2E600A8407D /* DDData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDData.h; sourceTree = ""; }; - DC372EE2139DC2E600A8407D /* DDData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDData.m; sourceTree = ""; }; - DC372EE3139DC2E600A8407D /* DDNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDNumber.h; sourceTree = ""; }; - DC372EE4139DC2E600A8407D /* DDNumber.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDNumber.m; sourceTree = ""; }; - DC372EE5139DC2E600A8407D /* DDRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDRange.h; sourceTree = ""; }; - DC372EE6139DC2E600A8407D /* DDRange.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDRange.m; sourceTree = ""; }; - DC372EE7139DC2E600A8407D /* HTTPAuthenticationRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPAuthenticationRequest.h; path = ../../Core/HTTPAuthenticationRequest.h; sourceTree = ""; }; - DC372EE8139DC2E600A8407D /* HTTPAuthenticationRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPAuthenticationRequest.m; path = ../../Core/HTTPAuthenticationRequest.m; sourceTree = ""; }; - DC372EE9139DC2E600A8407D /* HTTPConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPConnection.h; path = ../../Core/HTTPConnection.h; sourceTree = ""; }; - DC372EEA139DC2E600A8407D /* HTTPConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPConnection.m; path = ../../Core/HTTPConnection.m; sourceTree = ""; }; - DC372EEB139DC2E600A8407D /* HTTPLogging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPLogging.h; path = ../../Core/HTTPLogging.h; sourceTree = ""; }; - DC372EEC139DC2E600A8407D /* HTTPMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPMessage.h; path = ../../Core/HTTPMessage.h; sourceTree = ""; }; - DC372EED139DC2E600A8407D /* HTTPMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPMessage.m; path = ../../Core/HTTPMessage.m; sourceTree = ""; }; - DC372EEE139DC2E600A8407D /* HTTPResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPResponse.h; path = ../../Core/HTTPResponse.h; sourceTree = ""; }; - DC372EEF139DC2E600A8407D /* HTTPServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPServer.h; path = ../../Core/HTTPServer.h; sourceTree = ""; }; - DC372EF0139DC2E600A8407D /* HTTPServer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPServer.m; path = ../../Core/HTTPServer.m; sourceTree = ""; }; - DC372EF2139DC2E600A8407D /* HTTPAsyncFileResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPAsyncFileResponse.h; sourceTree = ""; }; - DC372EF3139DC2E600A8407D /* HTTPAsyncFileResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPAsyncFileResponse.m; sourceTree = ""; }; - DC372EF4139DC2E600A8407D /* HTTPDataResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPDataResponse.h; sourceTree = ""; }; - DC372EF5139DC2E600A8407D /* HTTPDataResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPDataResponse.m; sourceTree = ""; }; - DC372EF6139DC2E600A8407D /* HTTPDynamicFileResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPDynamicFileResponse.h; sourceTree = ""; }; - DC372EF7139DC2E600A8407D /* HTTPDynamicFileResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPDynamicFileResponse.m; sourceTree = ""; }; - DC372EF8139DC2E600A8407D /* HTTPFileResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPFileResponse.h; sourceTree = ""; }; - DC372EF9139DC2E600A8407D /* HTTPFileResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPFileResponse.m; sourceTree = ""; }; - DC372EFA139DC2E600A8407D /* HTTPRedirectResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPRedirectResponse.h; sourceTree = ""; }; - DC372EFB139DC2E600A8407D /* HTTPRedirectResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPRedirectResponse.m; sourceTree = ""; }; - DC372EFC139DC2E600A8407D /* WebSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebSocket.h; path = ../../Core/WebSocket.h; sourceTree = ""; }; - DC372EFD139DC2E600A8407D /* WebSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WebSocket.m; path = ../../Core/WebSocket.m; sourceTree = ""; }; - DC5406CD129F5C9600195140 /* DDASLLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDASLLogger.h; path = ../../Vendor/CocoaLumberjack/DDASLLogger.h; sourceTree = SOURCE_ROOT; }; - DC5406CE129F5C9600195140 /* DDASLLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDASLLogger.m; path = ../../Vendor/CocoaLumberjack/DDASLLogger.m; sourceTree = SOURCE_ROOT; }; - DC5406CF129F5C9600195140 /* DDFileLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDFileLogger.h; path = ../../Vendor/CocoaLumberjack/DDFileLogger.h; sourceTree = SOURCE_ROOT; }; - DC5406D0129F5C9600195140 /* DDFileLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDFileLogger.m; path = ../../Vendor/CocoaLumberjack/DDFileLogger.m; sourceTree = SOURCE_ROOT; }; - DC5406D1129F5C9600195140 /* DDLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDLog.h; path = ../../Vendor/CocoaLumberjack/DDLog.h; sourceTree = SOURCE_ROOT; }; - DC5406D2129F5C9600195140 /* DDLog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDLog.m; path = ../../Vendor/CocoaLumberjack/DDLog.m; sourceTree = SOURCE_ROOT; }; - DC5406D3129F5C9600195140 /* DDTTYLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDTTYLogger.h; path = ../../Vendor/CocoaLumberjack/DDTTYLogger.h; sourceTree = SOURCE_ROOT; }; - DC5406D4129F5C9600195140 /* DDTTYLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDTTYLogger.m; path = ../../Vendor/CocoaLumberjack/DDTTYLogger.m; sourceTree = SOURCE_ROOT; }; - DC5406DE129F5CB700195140 /* GCDAsyncSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GCDAsyncSocket.h; path = ../../Vendor/CocoaAsyncSocket/GCDAsyncSocket.h; sourceTree = SOURCE_ROOT; }; - DC5406DF129F5CB700195140 /* GCDAsyncSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GCDAsyncSocket.m; path = ../../Vendor/CocoaAsyncSocket/GCDAsyncSocket.m; sourceTree = SOURCE_ROOT; }; - DC5406E1129F5CC800195140 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; }; - DC54077E129F638200195140 /* Web */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Web; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, - 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, - DC5406E2129F5CC900195140 /* CFNetwork.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Classes */ = { - isa = PBXGroup; - children = ( - 1D3623240D0F684500981E51 /* iPhoneHTTPServerAppDelegate.h */, - 1D3623250D0F684500981E51 /* iPhoneHTTPServerAppDelegate.m */, - 28D7ACF60DDB3853001CB0EB /* iPhoneHTTPServerViewController.h */, - 28D7ACF70DDB3853001CB0EB /* iPhoneHTTPServerViewController.m */, - ); - path = Classes; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 1D6058910D05DD3D006BFB54 /* iPhoneHTTPServer.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - DC5406CA129F5C7D00195140 /* Logging */, - DC5406DD129F5CA300195140 /* TCP */, - DC5406E7129F5CD100195140 /* HTTP */, - 080E96DDFE201D6D7F000001 /* Classes */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - DC372E47139D398400A8407D /* Xcode-Configurations */, - 32CA4F630368D1EE00C91783 /* iPhoneHTTPServer_Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.m */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - 2899E5210DE3E06400AC0155 /* iPhoneHTTPServerViewController.xib */, - 28AD733E0D9D9553002E5188 /* MainWindow.xib */, - 8D1107310486CEB800E47090 /* iPhoneHTTPServer-Info.plist */, - DC54077E129F638200195140 /* Web */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, - 1D30AB110D05D00D00671497 /* Foundation.framework */, - 288765A40DF7441C002DB57D /* CoreGraphics.framework */, - DC5406E1129F5CC800195140 /* CFNetwork.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - DC372E47139D398400A8407D /* Xcode-Configurations */ = { - isa = PBXGroup; - children = ( - DC372E48139D398400A8407D /* Base.xcconfig */, - DC372E49139D398400A8407D /* Debug.xcconfig */, - DC372E4B139D398400A8407D /* Release.xcconfig */, - ); - name = "Xcode-Configurations"; - path = "../Xcode-Configurations"; - sourceTree = ""; - }; - DC372EE0139DC2E600A8407D /* Categories */ = { - isa = PBXGroup; - children = ( - DC372EE1139DC2E600A8407D /* DDData.h */, - DC372EE2139DC2E600A8407D /* DDData.m */, - DC372EE3139DC2E600A8407D /* DDNumber.h */, - DC372EE4139DC2E600A8407D /* DDNumber.m */, - DC372EE5139DC2E600A8407D /* DDRange.h */, - DC372EE6139DC2E600A8407D /* DDRange.m */, - ); - name = Categories; - path = ../../Core/Categories; - sourceTree = ""; - }; - DC372EF1139DC2E600A8407D /* Responses */ = { - isa = PBXGroup; - children = ( - DC372EF2139DC2E600A8407D /* HTTPAsyncFileResponse.h */, - DC372EF3139DC2E600A8407D /* HTTPAsyncFileResponse.m */, - DC372EF4139DC2E600A8407D /* HTTPDataResponse.h */, - DC372EF5139DC2E600A8407D /* HTTPDataResponse.m */, - DC372EF6139DC2E600A8407D /* HTTPDynamicFileResponse.h */, - DC372EF7139DC2E600A8407D /* HTTPDynamicFileResponse.m */, - DC372EF8139DC2E600A8407D /* HTTPFileResponse.h */, - DC372EF9139DC2E600A8407D /* HTTPFileResponse.m */, - DC372EFA139DC2E600A8407D /* HTTPRedirectResponse.h */, - DC372EFB139DC2E600A8407D /* HTTPRedirectResponse.m */, - ); - name = Responses; - path = ../../Core/Responses; - sourceTree = ""; - }; - DC5406CA129F5C7D00195140 /* Logging */ = { - isa = PBXGroup; - children = ( - DC5406D1129F5C9600195140 /* DDLog.h */, - DC5406D2129F5C9600195140 /* DDLog.m */, - DC5406D3129F5C9600195140 /* DDTTYLogger.h */, - DC5406D4129F5C9600195140 /* DDTTYLogger.m */, - DC5406CD129F5C9600195140 /* DDASLLogger.h */, - DC5406CE129F5C9600195140 /* DDASLLogger.m */, - DC5406CF129F5C9600195140 /* DDFileLogger.h */, - DC5406D0129F5C9600195140 /* DDFileLogger.m */, - ); - name = Logging; - sourceTree = ""; - }; - DC5406DD129F5CA300195140 /* TCP */ = { - isa = PBXGroup; - children = ( - DC5406DE129F5CB700195140 /* GCDAsyncSocket.h */, - DC5406DF129F5CB700195140 /* GCDAsyncSocket.m */, - ); - name = TCP; - sourceTree = ""; - }; - DC5406E7129F5CD100195140 /* HTTP */ = { - isa = PBXGroup; - children = ( - DC372EEB139DC2E600A8407D /* HTTPLogging.h */, - DC372EE7139DC2E600A8407D /* HTTPAuthenticationRequest.h */, - DC372EE8139DC2E600A8407D /* HTTPAuthenticationRequest.m */, - DC372EEF139DC2E600A8407D /* HTTPServer.h */, - DC372EF0139DC2E600A8407D /* HTTPServer.m */, - DC372EE9139DC2E600A8407D /* HTTPConnection.h */, - DC372EEA139DC2E600A8407D /* HTTPConnection.m */, - DC372EEC139DC2E600A8407D /* HTTPMessage.h */, - DC372EED139DC2E600A8407D /* HTTPMessage.m */, - DC372EEE139DC2E600A8407D /* HTTPResponse.h */, - DC372EFC139DC2E600A8407D /* WebSocket.h */, - DC372EFD139DC2E600A8407D /* WebSocket.m */, - DC372EF1139DC2E600A8407D /* Responses */, - DC372EE0139DC2E600A8407D /* Categories */, - ); - name = HTTP; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1D6058900D05DD3D006BFB54 /* iPhoneHTTPServer */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "iPhoneHTTPServer" */; - buildPhases = ( - 1D60588D0D05DD3D006BFB54 /* Resources */, - 1D60588E0D05DD3D006BFB54 /* Sources */, - 1D60588F0D05DD3D006BFB54 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = iPhoneHTTPServer; - productName = iPhoneHTTPServer; - productReference = 1D6058910D05DD3D006BFB54 /* iPhoneHTTPServer.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "iPhoneHTTPServer" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 1D6058900D05DD3D006BFB54 /* iPhoneHTTPServer */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 1D60588D0D05DD3D006BFB54 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */, - 2899E5220DE3E06400AC0155 /* iPhoneHTTPServerViewController.xib in Resources */, - DC540781129F638200195140 /* Web in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1D60588E0D05DD3D006BFB54 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589B0D05DD56006BFB54 /* main.m in Sources */, - 1D3623260D0F684500981E51 /* iPhoneHTTPServerAppDelegate.m in Sources */, - 28D7ACF80DDB3853001CB0EB /* iPhoneHTTPServerViewController.m in Sources */, - DC5406D5129F5C9600195140 /* DDASLLogger.m in Sources */, - DC5406D6129F5C9600195140 /* DDFileLogger.m in Sources */, - DC5406D7129F5C9600195140 /* DDLog.m in Sources */, - DC5406D8129F5C9600195140 /* DDTTYLogger.m in Sources */, - DC5406E0129F5CB700195140 /* GCDAsyncSocket.m in Sources */, - DC372EFE139DC2E600A8407D /* DDData.m in Sources */, - DC372EFF139DC2E600A8407D /* DDNumber.m in Sources */, - DC372F00139DC2E600A8407D /* DDRange.m in Sources */, - DC372F01139DC2E600A8407D /* HTTPAuthenticationRequest.m in Sources */, - DC372F02139DC2E600A8407D /* HTTPConnection.m in Sources */, - DC372F03139DC2E600A8407D /* HTTPMessage.m in Sources */, - DC372F04139DC2E600A8407D /* HTTPServer.m in Sources */, - DC372F05139DC2E600A8407D /* HTTPAsyncFileResponse.m in Sources */, - DC372F06139DC2E600A8407D /* HTTPDataResponse.m in Sources */, - DC372F07139DC2E600A8407D /* HTTPDynamicFileResponse.m in Sources */, - DC372F08139DC2E600A8407D /* HTTPFileResponse.m in Sources */, - DC372F09139DC2E600A8407D /* HTTPRedirectResponse.m in Sources */, - DC372F0A139DC2E600A8407D /* WebSocket.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 1D6058940D05DD3E006BFB54 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PREFIX_HEADER = iPhoneHTTPServer_Prefix.pch; - INFOPLIST_FILE = "iPhoneHTTPServer-Info.plist"; - PRODUCT_NAME = iPhoneHTTPServer; - }; - name = Debug; - }; - 1D6058950D05DD3E006BFB54 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PREFIX_HEADER = iPhoneHTTPServer_Prefix.pch; - INFOPLIST_FILE = "iPhoneHTTPServer-Info.plist"; - PRODUCT_NAME = iPhoneHTTPServer; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DC372E49139D398400A8407D /* Debug.xcconfig */; - buildSettings = { - SDKROOT = iphoneos; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DC372E4B139D398400A8407D /* Release.xcconfig */; - buildSettings = { - SDKROOT = iphoneos; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "iPhoneHTTPServer" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1D6058940D05DD3E006BFB54 /* Debug */, - 1D6058950D05DD3E006BFB54 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "iPhoneHTTPServer" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/iPhoneHTTPServer.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/iPhoneHTTPServer.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 7b9f55338fd2e..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/iPhoneHTTPServer.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/iPhoneHTTPServerViewController.xib b/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/iPhoneHTTPServerViewController.xib deleted file mode 100644 index 72e138ae9ac01..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/iPhoneHTTPServerViewController.xib +++ /dev/null @@ -1,156 +0,0 @@ - - - - 800 - 10C540 - 759 - 1038.25 - 458.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 77 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - {320, 460} - - - 3 - MC43NQA - - 2 - - - NO - - IBCocoaTouchFramework - - - - - YES - - - view - - - - 7 - - - - - YES - - 0 - - - - - - -1 - - - File's Owner - - - -2 - - - - - 6 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 6.IBEditorWindowLastContentRect - 6.IBPluginDependency - - - YES - iPhoneHTTPServerViewController - UIResponder - {{239, 654}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - YES - - - - - YES - - - YES - - - - 7 - - - - YES - - iPhoneHTTPServerViewController - UIViewController - - IBProjectSource - Classes/iPhoneHTTPServerViewController.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - iPhoneHTTPServer.xcodeproj - 3 - 77 - - - diff --git a/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/iPhoneHTTPServer_Prefix.pch b/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/iPhoneHTTPServer_Prefix.pch deleted file mode 100644 index 4d0d89dec7d08..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/iPhoneHTTPServer_Prefix.pch +++ /dev/null @@ -1,8 +0,0 @@ -// -// Prefix header for all source files of the 'iPhoneHTTPServer' target in the 'iPhoneHTTPServer' project -// - -#ifdef __OBJC__ - #import - #import -#endif diff --git a/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/main.m b/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/main.m deleted file mode 100644 index 2e89a6b8bb86a..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Samples/iPhoneHTTPServer/main.m +++ /dev/null @@ -1,17 +0,0 @@ -// -// main.m -// iPhoneHTTPServer -// -// Created by Robbie Hanson on 11/25/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// - -#import - -int main(int argc, char *argv[]) { - - NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, nil); - [pool release]; - return retVal; -} diff --git a/third_party/objc/CocoaHTTPServer/Vendor/CocoaAsyncSocket/About.txt b/third_party/objc/CocoaHTTPServer/Vendor/CocoaAsyncSocket/About.txt deleted file mode 100644 index 63547dd460e97..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Vendor/CocoaAsyncSocket/About.txt +++ /dev/null @@ -1,4 +0,0 @@ -The CocoaAsyncSocket project is under Public Domain license. -http://code.google.com/p/cocoaasyncsocket/ - -The AsyncSocket project has been around since 2001 and is used in many applications and frameworks. \ No newline at end of file diff --git a/third_party/objc/CocoaHTTPServer/Vendor/CocoaAsyncSocket/GCDAsyncSocket.h b/third_party/objc/CocoaHTTPServer/Vendor/CocoaAsyncSocket/GCDAsyncSocket.h deleted file mode 100644 index e53350b324d87..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Vendor/CocoaAsyncSocket/GCDAsyncSocket.h +++ /dev/null @@ -1,963 +0,0 @@ -// -// GCDAsyncSocket.h -// -// This class is in the public domain. -// Originally created by Robbie Hanson in Q3 2010. -// Updated and maintained by Deusty LLC and the Mac development community. -// -// http://code.google.com/p/cocoaasyncsocket/ -// - -#import -#import -#import - -@class GCDAsyncReadPacket; -@class GCDAsyncWritePacket; - -extern NSString *const GCDAsyncSocketException; -extern NSString *const GCDAsyncSocketErrorDomain; - -#if !TARGET_OS_IPHONE -extern NSString *const GCDAsyncSocketSSLCipherSuites; -extern NSString *const GCDAsyncSocketSSLDiffieHellmanParameters; -#endif - -enum GCDAsyncSocketError -{ - GCDAsyncSocketNoError = 0, // Never used - GCDAsyncSocketBadConfigError, // Invalid configuration - GCDAsyncSocketBadParamError, // Invalid parameter was passed - GCDAsyncSocketConnectTimeoutError, // A connect operation timed out - GCDAsyncSocketReadTimeoutError, // A read operation timed out - GCDAsyncSocketWriteTimeoutError, // A write operation timed out - GCDAsyncSocketReadMaxedOutError, // Reached set maxLength without completing - GCDAsyncSocketClosedError, // The remote peer closed the connection - GCDAsyncSocketOtherError, // Description provided in userInfo -}; -typedef enum GCDAsyncSocketError GCDAsyncSocketError; - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -@interface GCDAsyncSocket : NSObject -{ - uint32_t flags; - uint16_t config; - - id delegate; - dispatch_queue_t delegateQueue; - - int socket4FD; - int socket6FD; - int connectIndex; - NSData * connectInterface4; - NSData * connectInterface6; - - dispatch_queue_t socketQueue; - - dispatch_source_t accept4Source; - dispatch_source_t accept6Source; - dispatch_source_t connectTimer; - dispatch_source_t readSource; - dispatch_source_t writeSource; - dispatch_source_t readTimer; - dispatch_source_t writeTimer; - - NSMutableArray *readQueue; - NSMutableArray *writeQueue; - - GCDAsyncReadPacket *currentRead; - GCDAsyncWritePacket *currentWrite; - - unsigned long socketFDBytesAvailable; - - NSMutableData *partialReadBuffer; - -#if TARGET_OS_IPHONE - CFStreamClientContext streamContext; - CFReadStreamRef readStream; - CFWriteStreamRef writeStream; -#else - SSLContextRef sslContext; - NSMutableData *sslReadBuffer; - size_t sslWriteCachedLength; -#endif - - id userData; -} - -/** - * GCDAsyncSocket uses the standard delegate paradigm, - * but executes all delegate callbacks on a given delegate dispatch queue. - * This allows for maximum concurrency, while at the same time providing easy thread safety. - * - * You MUST set a delegate AND delegate dispatch queue before attempting to - * use the socket, or you will get an error. - * - * The socket queue is optional. - * If you pass NULL, GCDAsyncSocket will automatically create it's own socket queue. - * If you choose to provide a socket queue, the socket queue must not be a concurrent queue. - * - * The delegate queue and socket queue can optionally be the same. -**/ -- (id)init; -- (id)initWithSocketQueue:(dispatch_queue_t)sq; -- (id)initWithDelegate:(id)aDelegate delegateQueue:(dispatch_queue_t)dq; -- (id)initWithDelegate:(id)aDelegate delegateQueue:(dispatch_queue_t)dq socketQueue:(dispatch_queue_t)sq; - -#pragma mark Configuration - -- (id)delegate; -- (void)setDelegate:(id)delegate; -- (void)synchronouslySetDelegate:(id)delegate; - -- (dispatch_queue_t)delegateQueue; -- (void)setDelegateQueue:(dispatch_queue_t)delegateQueue; -- (void)synchronouslySetDelegateQueue:(dispatch_queue_t)delegateQueue; - -- (void)getDelegate:(id *)delegatePtr delegateQueue:(dispatch_queue_t *)delegateQueuePtr; -- (void)setDelegate:(id)delegate delegateQueue:(dispatch_queue_t)delegateQueue; -- (void)synchronouslySetDelegate:(id)delegate delegateQueue:(dispatch_queue_t)delegateQueue; - -/** - * Traditionally sockets are not closed until the conversation is over. - * However, it is technically possible for the remote enpoint to close its write stream. - * Our socket would then be notified that there is no more data to be read, - * but our socket would still be writeable and the remote endpoint could continue to receive our data. - * - * The argument for this confusing functionality stems from the idea that a client could shut down its - * write stream after sending a request to the server, thus notifying the server there are to be no further requests. - * In practice, however, this technique did little to help server developers. - * - * To make matters worse, from a TCP perspective there is no way to tell the difference from a read stream close - * and a full socket close. They both result in the TCP stack receiving a FIN packet. The only way to tell - * is by continuing to write to the socket. If it was only a read stream close, then writes will continue to work. - * Otherwise an error will be occur shortly (when the remote end sends us a RST packet). - * - * In addition to the technical challenges and confusion, many high level socket/stream API's provide - * no support for dealing with the problem. If the read stream is closed, the API immediately declares the - * socket to be closed, and shuts down the write stream as well. In fact, this is what Apple's CFStream API does. - * It might sound like poor design at first, but in fact it simplifies development. - * - * The vast majority of the time if the read stream is closed it's because the remote endpoint closed its socket. - * Thus it actually makes sense to close the socket at this point. - * And in fact this is what most networking developers want and expect to happen. - * However, if you are writing a server that interacts with a plethora of clients, - * you might encounter a client that uses the discouraged technique of shutting down its write stream. - * If this is the case, you can set this property to NO, - * and make use of the socketDidCloseReadStream delegate method. - * - * The default value is YES. -**/ -- (BOOL)autoDisconnectOnClosedReadStream; -- (void)setAutoDisconnectOnClosedReadStream:(BOOL)flag; - -/** - * By default, both IPv4 and IPv6 are enabled. - * - * For accepting incoming connections, this means GCDAsyncSocket automatically supports both protocols, - * and can simulataneously accept incoming connections on either protocol. - * - * For outgoing connections, this means GCDAsyncSocket can connect to remote hosts running either protocol. - * If a DNS lookup returns only IPv4 results, GCDAsyncSocket will automatically use IPv4. - * If a DNS lookup returns only IPv6 results, GCDAsyncSocket will automatically use IPv6. - * If a DNS lookup returns both IPv4 and IPv6 results, the preferred protocol will be chosen. - * By default, the preferred protocol is IPv4, but may be configured as desired. -**/ -- (BOOL)isIPv4Enabled; -- (void)setIPv4Enabled:(BOOL)flag; - -- (BOOL)isIPv6Enabled; -- (void)setIPv6Enabled:(BOOL)flag; - -- (BOOL)isIPv4PreferredOverIPv6; -- (void)setPreferIPv4OverIPv6:(BOOL)flag; - -/** - * User data allows you to associate arbitrary information with the socket. - * This data is not used internally by socket in any way. -**/ -- (id)userData; -- (void)setUserData:(id)arbitraryUserData; - -#pragma mark Accepting - -/** - * Tells the socket to begin listening and accepting connections on the given port. - * When a connection is accepted, a new instance of GCDAsyncSocket will be spawned to handle it, - * and the socket:didAcceptNewSocket: delegate method will be invoked. - * - * The socket will listen on all available interfaces (e.g. wifi, ethernet, etc) -**/ -- (BOOL)acceptOnPort:(uint16_t)port error:(NSError **)errPtr; - -/** - * This method is the same as acceptOnPort:error: with the - * additional option of specifying which interface to listen on. - * - * For example, you could specify that the socket should only accept connections over ethernet, - * and not other interfaces such as wifi. - * - * The interface may be specified by name (e.g. "en1" or "lo0") or by IP address (e.g. "192.168.4.34"). - * You may also use the special strings "localhost" or "loopback" to specify that - * the socket only accept connections from the local machine. - * - * You can see the list of interfaces via the command line utility "ifconfig", - * or programmatically via the getifaddrs() function. - * - * To accept connections on any interface pass nil, or simply use the acceptOnPort:error: method. -**/ -- (BOOL)acceptOnInterface:(NSString *)interface port:(uint16_t)port error:(NSError **)errPtr; - -#pragma mark Connecting - -/** - * Connects to the given host and port. - * - * This method invokes connectToHost:onPort:viaInterface:withTimeout:error: - * and uses the default interface, and no timeout. -**/ -- (BOOL)connectToHost:(NSString *)host onPort:(uint16_t)port error:(NSError **)errPtr; - -/** - * Connects to the given host and port with an optional timeout. - * - * This method invokes connectToHost:onPort:viaInterface:withTimeout:error: and uses the default interface. -**/ -- (BOOL)connectToHost:(NSString *)host - onPort:(uint16_t)port - withTimeout:(NSTimeInterval)timeout - error:(NSError **)errPtr; - -/** - * Connects to the given host & port, via the optional interface, with an optional timeout. - * - * The host may be a domain name (e.g. "deusty.com") or an IP address string (e.g. "192.168.0.2"). - * The host may also be the special strings "localhost" or "loopback" to specify connecting - * to a service on the local machine. - * - * The interface may be a name (e.g. "en1" or "lo0") or the corresponding IP address (e.g. "192.168.4.35"). - * The interface may also be used to specify the local port (see below). - * - * To not time out use a negative time interval. - * - * This method will return NO if an error is detected, and set the error pointer (if one was given). - * Possible errors would be a nil host, invalid interface, or socket is already connected. - * - * If no errors are detected, this method will start a background connect operation and immediately return YES. - * The delegate callbacks are used to notify you when the socket connects, or if the host was unreachable. - * - * Since this class supports queued reads and writes, you can immediately start reading and/or writing. - * All read/write operations will be queued, and upon socket connection, - * the operations will be dequeued and processed in order. - * - * The interface may optionally contain a port number at the end of the string, separated by a colon. - * This allows you to specify the local port that should be used for the outgoing connection. (read paragraph to end) - * To specify both interface and local port: "en1:8082" or "192.168.4.35:2424". - * To specify only local port: ":8082". - * Please note this is an advanced feature, and is somewhat hidden on purpose. - * You should understand that 99.999% of the time you should NOT specify the local port for an outgoing connection. - * If you think you need to, there is a very good chance you have a fundamental misunderstanding somewhere. - * Local ports do NOT need to match remote ports. In fact, they almost never do. - * This feature is here for networking professionals using very advanced techniques. -**/ -- (BOOL)connectToHost:(NSString *)host - onPort:(uint16_t)port - viaInterface:(NSString *)interface - withTimeout:(NSTimeInterval)timeout - error:(NSError **)errPtr; - -/** - * Connects to the given address, specified as a sockaddr structure wrapped in a NSData object. - * For example, a NSData object returned from NSNetService's addresses method. - * - * If you have an existing struct sockaddr you can convert it to a NSData object like so: - * struct sockaddr sa -> NSData *dsa = [NSData dataWithBytes:&remoteAddr length:remoteAddr.sa_len]; - * struct sockaddr *sa -> NSData *dsa = [NSData dataWithBytes:remoteAddr length:remoteAddr->sa_len]; - * - * This method invokes connectToAdd -**/ -- (BOOL)connectToAddress:(NSData *)remoteAddr error:(NSError **)errPtr; - -/** - * This method is the same as connectToAddress:error: with an additional timeout option. - * To not time out use a negative time interval, or simply use the connectToAddress:error: method. -**/ -- (BOOL)connectToAddress:(NSData *)remoteAddr withTimeout:(NSTimeInterval)timeout error:(NSError **)errPtr; - -/** - * Connects to the given address, using the specified interface and timeout. - * - * The address is specified as a sockaddr structure wrapped in a NSData object. - * For example, a NSData object returned from NSNetService's addresses method. - * - * If you have an existing struct sockaddr you can convert it to a NSData object like so: - * struct sockaddr sa -> NSData *dsa = [NSData dataWithBytes:&remoteAddr length:remoteAddr.sa_len]; - * struct sockaddr *sa -> NSData *dsa = [NSData dataWithBytes:remoteAddr length:remoteAddr->sa_len]; - * - * The interface may be a name (e.g. "en1" or "lo0") or the corresponding IP address (e.g. "192.168.4.35"). - * The interface may also be used to specify the local port (see below). - * - * The timeout is optional. To not time out use a negative time interval. - * - * This method will return NO if an error is detected, and set the error pointer (if one was given). - * Possible errors would be a nil host, invalid interface, or socket is already connected. - * - * If no errors are detected, this method will start a background connect operation and immediately return YES. - * The delegate callbacks are used to notify you when the socket connects, or if the host was unreachable. - * - * Since this class supports queued reads and writes, you can immediately start reading and/or writing. - * All read/write operations will be queued, and upon socket connection, - * the operations will be dequeued and processed in order. - * - * The interface may optionally contain a port number at the end of the string, separated by a colon. - * This allows you to specify the local port that should be used for the outgoing connection. (read paragraph to end) - * To specify both interface and local port: "en1:8082" or "192.168.4.35:2424". - * To specify only local port: ":8082". - * Please note this is an advanced feature, and is somewhat hidden on purpose. - * You should understand that 99.999% of the time you should NOT specify the local port for an outgoing connection. - * If you think you need to, there is a very good chance you have a fundamental misunderstanding somewhere. - * Local ports do NOT need to match remote ports. In fact, they almost never do. - * This feature is here for networking professionals using very advanced techniques. -**/ -- (BOOL)connectToAddress:(NSData *)remoteAddr - viaInterface:(NSString *)interface - withTimeout:(NSTimeInterval)timeout - error:(NSError **)errPtr; - -#pragma mark Disconnecting - -/** - * Disconnects immediately (synchronously). Any pending reads or writes are dropped. - * - * If the socket is not already disconnected, an invocation to the socketDidDisconnect:withError: delegate method - * will be queued onto the delegateQueue asynchronously (behind any previously queued delegate methods). - * In other words, the disconnected delegate method will be invoked sometime shortly after this method returns. - * - * Please note the recommended way of releasing a GCDAsyncSocket instance (e.g. in a dealloc method) - * [asyncSocket setDelegate:nil]; - * [asyncSocket disconnect]; - * [asyncSocket release]; - * - * If you plan on disconnecting the socket, and then immediately asking it to connect again, - * you'll likely want to do so like this: - * [asyncSocket setDelegate:nil]; - * [asyncSocket disconnect]; - * [asyncSocket setDelegate:self]; - * [asyncSocket connect...]; -**/ -- (void)disconnect; - -/** - * Disconnects after all pending reads have completed. - * After calling this, the read and write methods will do nothing. - * The socket will disconnect even if there are still pending writes. -**/ -- (void)disconnectAfterReading; - -/** - * Disconnects after all pending writes have completed. - * After calling this, the read and write methods will do nothing. - * The socket will disconnect even if there are still pending reads. -**/ -- (void)disconnectAfterWriting; - -/** - * Disconnects after all pending reads and writes have completed. - * After calling this, the read and write methods will do nothing. -**/ -- (void)disconnectAfterReadingAndWriting; - -#pragma mark Diagnostics - -/** - * Returns whether the socket is disconnected or connected. - * - * A disconnected socket may be recycled. - * That is, it can used again for connecting or listening. - * - * If a socket is in the process of connecting, it may be neither disconnected nor connected. -**/ -- (BOOL)isDisconnected; -- (BOOL)isConnected; - -/** - * Returns the local or remote host and port to which this socket is connected, or nil and 0 if not connected. - * The host will be an IP address. -**/ -- (NSString *)connectedHost; -- (uint16_t)connectedPort; - -- (NSString *)localHost; -- (uint16_t)localPort; - -/** - * Returns the local or remote address to which this socket is connected, - * specified as a sockaddr structure wrapped in a NSData object. - * - * See also the connectedHost, connectedPort, localHost and localPort methods. -**/ -- (NSData *)connectedAddress; -- (NSData *)localAddress; - -/** - * Returns whether the socket is IPv4 or IPv6. - * An accepting socket may be both. -**/ -- (BOOL)isIPv4; -- (BOOL)isIPv6; - -/** - * Returns whether or not the socket has been secured via SSL/TLS. - * - * See also the startTLS method. -**/ -- (BOOL)isSecure; - -#pragma mark Reading - -// The readData and writeData methods won't block (they are asynchronous). -// -// When a read is complete the socket:didReadData:withTag: delegate method is dispatched on the delegateQueue. -// When a write is complete the socket:didWriteDataWithTag: delegate method is dispatched on the delegateQueue. -// -// You may optionally set a timeout for any read/write operation. (To not timeout, use a negative time interval.) -// If a read/write opertion times out, the corresponding "socket:shouldTimeout..." delegate method -// is called to optionally allow you to extend the timeout. -// Upon a timeout, the "socket:didDisconnectWithError:" method is called -// -// The tag is for your convenience. -// You can use it as an array index, step number, state id, pointer, etc. - -/** - * Reads the first available bytes that become available on the socket. - * - * If the timeout value is negative, the read operation will not use a timeout. -**/ -- (void)readDataWithTimeout:(NSTimeInterval)timeout tag:(long)tag; - -/** - * Reads the first available bytes that become available on the socket. - * The bytes will be appended to the given byte buffer starting at the given offset. - * The given buffer will automatically be increased in size if needed. - * - * If the timeout value is negative, the read operation will not use a timeout. - * If the buffer if nil, the socket will create a buffer for you. - * - * If the bufferOffset is greater than the length of the given buffer, - * the method will do nothing, and the delegate will not be called. - * - * If you pass a buffer, you must not alter it in any way while the socket is using it. - * After completion, the data returned in socket:didReadData:withTag: will be a subset of the given buffer. - * That is, it will reference the bytes that were appended to the given buffer via - * the method [NSData dataWithBytesNoCopy:length:freeWhenDone:NO]. -**/ -- (void)readDataWithTimeout:(NSTimeInterval)timeout - buffer:(NSMutableData *)buffer - bufferOffset:(NSUInteger)offset - tag:(long)tag; - -/** - * Reads the first available bytes that become available on the socket. - * The bytes will be appended to the given byte buffer starting at the given offset. - * The given buffer will automatically be increased in size if needed. - * A maximum of length bytes will be read. - * - * If the timeout value is negative, the read operation will not use a timeout. - * If the buffer if nil, a buffer will automatically be created for you. - * If maxLength is zero, no length restriction is enforced. - * - * If the bufferOffset is greater than the length of the given buffer, - * the method will do nothing, and the delegate will not be called. - * - * If you pass a buffer, you must not alter it in any way while the socket is using it. - * After completion, the data returned in socket:didReadData:withTag: will be a subset of the given buffer. - * That is, it will reference the bytes that were appended to the given buffer via - * the method [NSData dataWithBytesNoCopy:length:freeWhenDone:NO]. -**/ -- (void)readDataWithTimeout:(NSTimeInterval)timeout - buffer:(NSMutableData *)buffer - bufferOffset:(NSUInteger)offset - maxLength:(NSUInteger)length - tag:(long)tag; - -/** - * Reads the given number of bytes. - * - * If the timeout value is negative, the read operation will not use a timeout. - * - * If the length is 0, this method does nothing and the delegate is not called. -**/ -- (void)readDataToLength:(NSUInteger)length withTimeout:(NSTimeInterval)timeout tag:(long)tag; - -/** - * Reads the given number of bytes. - * The bytes will be appended to the given byte buffer starting at the given offset. - * The given buffer will automatically be increased in size if needed. - * - * If the timeout value is negative, the read operation will not use a timeout. - * If the buffer if nil, a buffer will automatically be created for you. - * - * If the length is 0, this method does nothing and the delegate is not called. - * If the bufferOffset is greater than the length of the given buffer, - * the method will do nothing, and the delegate will not be called. - * - * If you pass a buffer, you must not alter it in any way while AsyncSocket is using it. - * After completion, the data returned in socket:didReadData:withTag: will be a subset of the given buffer. - * That is, it will reference the bytes that were appended to the given buffer via - * the method [NSData dataWithBytesNoCopy:length:freeWhenDone:NO]. -**/ -- (void)readDataToLength:(NSUInteger)length - withTimeout:(NSTimeInterval)timeout - buffer:(NSMutableData *)buffer - bufferOffset:(NSUInteger)offset - tag:(long)tag; - -/** - * Reads bytes until (and including) the passed "data" parameter, which acts as a separator. - * - * If the timeout value is negative, the read operation will not use a timeout. - * - * If you pass nil or zero-length data as the "data" parameter, - * the method will do nothing (except maybe print a warning), and the delegate will not be called. - * - * To read a line from the socket, use the line separator (e.g. CRLF for HTTP, see below) as the "data" parameter. - * If you're developing your own custom protocol, be sure your separator can not occur naturally as - * part of the data between separators. - * For example, imagine you want to send several small documents over a socket. - * Using CRLF as a separator is likely unwise, as a CRLF could easily exist within the documents. - * In this particular example, it would be better to use a protocol similar to HTTP with - * a header that includes the length of the document. - * Also be careful that your separator cannot occur naturally as part of the encoding for a character. - * - * The given data (separator) parameter should be immutable. - * For performance reasons, the socket will retain it, not copy it. - * So if it is immutable, don't modify it while the socket is using it. -**/ -- (void)readDataToData:(NSData *)data withTimeout:(NSTimeInterval)timeout tag:(long)tag; - -/** - * Reads bytes until (and including) the passed "data" parameter, which acts as a separator. - * The bytes will be appended to the given byte buffer starting at the given offset. - * The given buffer will automatically be increased in size if needed. - * - * If the timeout value is negative, the read operation will not use a timeout. - * If the buffer if nil, a buffer will automatically be created for you. - * - * If the bufferOffset is greater than the length of the given buffer, - * the method will do nothing (except maybe print a warning), and the delegate will not be called. - * - * If you pass a buffer, you must not alter it in any way while the socket is using it. - * After completion, the data returned in socket:didReadData:withTag: will be a subset of the given buffer. - * That is, it will reference the bytes that were appended to the given buffer via - * the method [NSData dataWithBytesNoCopy:length:freeWhenDone:NO]. - * - * To read a line from the socket, use the line separator (e.g. CRLF for HTTP, see below) as the "data" parameter. - * If you're developing your own custom protocol, be sure your separator can not occur naturally as - * part of the data between separators. - * For example, imagine you want to send several small documents over a socket. - * Using CRLF as a separator is likely unwise, as a CRLF could easily exist within the documents. - * In this particular example, it would be better to use a protocol similar to HTTP with - * a header that includes the length of the document. - * Also be careful that your separator cannot occur naturally as part of the encoding for a character. - * - * The given data (separator) parameter should be immutable. - * For performance reasons, the socket will retain it, not copy it. - * So if it is immutable, don't modify it while the socket is using it. -**/ -- (void)readDataToData:(NSData *)data - withTimeout:(NSTimeInterval)timeout - buffer:(NSMutableData *)buffer - bufferOffset:(NSUInteger)offset - tag:(long)tag; - -/** - * Reads bytes until (and including) the passed "data" parameter, which acts as a separator. - * - * If the timeout value is negative, the read operation will not use a timeout. - * - * If maxLength is zero, no length restriction is enforced. - * Otherwise if maxLength bytes are read without completing the read, - * it is treated similarly to a timeout - the socket is closed with a GCDAsyncSocketReadMaxedOutError. - * The read will complete successfully if exactly maxLength bytes are read and the given data is found at the end. - * - * If you pass nil or zero-length data as the "data" parameter, - * the method will do nothing (except maybe print a warning), and the delegate will not be called. - * If you pass a maxLength parameter that is less than the length of the data parameter, - * the method will do nothing (except maybe print a warning), and the delegate will not be called. - * - * To read a line from the socket, use the line separator (e.g. CRLF for HTTP, see below) as the "data" parameter. - * If you're developing your own custom protocol, be sure your separator can not occur naturally as - * part of the data between separators. - * For example, imagine you want to send several small documents over a socket. - * Using CRLF as a separator is likely unwise, as a CRLF could easily exist within the documents. - * In this particular example, it would be better to use a protocol similar to HTTP with - * a header that includes the length of the document. - * Also be careful that your separator cannot occur naturally as part of the encoding for a character. - * - * The given data (separator) parameter should be immutable. - * For performance reasons, the socket will retain it, not copy it. - * So if it is immutable, don't modify it while the socket is using it. -**/ -- (void)readDataToData:(NSData *)data withTimeout:(NSTimeInterval)timeout maxLength:(NSUInteger)length tag:(long)tag; - -/** - * Reads bytes until (and including) the passed "data" parameter, which acts as a separator. - * The bytes will be appended to the given byte buffer starting at the given offset. - * The given buffer will automatically be increased in size if needed. - * - * If the timeout value is negative, the read operation will not use a timeout. - * If the buffer if nil, a buffer will automatically be created for you. - * - * If maxLength is zero, no length restriction is enforced. - * Otherwise if maxLength bytes are read without completing the read, - * it is treated similarly to a timeout - the socket is closed with a GCDAsyncSocketReadMaxedOutError. - * The read will complete successfully if exactly maxLength bytes are read and the given data is found at the end. - * - * If you pass a maxLength parameter that is less than the length of the data (separator) parameter, - * the method will do nothing (except maybe print a warning), and the delegate will not be called. - * If the bufferOffset is greater than the length of the given buffer, - * the method will do nothing (except maybe print a warning), and the delegate will not be called. - * - * If you pass a buffer, you must not alter it in any way while the socket is using it. - * After completion, the data returned in socket:didReadData:withTag: will be a subset of the given buffer. - * That is, it will reference the bytes that were appended to the given buffer via - * the method [NSData dataWithBytesNoCopy:length:freeWhenDone:NO]. - * - * To read a line from the socket, use the line separator (e.g. CRLF for HTTP, see below) as the "data" parameter. - * If you're developing your own custom protocol, be sure your separator can not occur naturally as - * part of the data between separators. - * For example, imagine you want to send several small documents over a socket. - * Using CRLF as a separator is likely unwise, as a CRLF could easily exist within the documents. - * In this particular example, it would be better to use a protocol similar to HTTP with - * a header that includes the length of the document. - * Also be careful that your separator cannot occur naturally as part of the encoding for a character. - * - * The given data (separator) parameter should be immutable. - * For performance reasons, the socket will retain it, not copy it. - * So if it is immutable, don't modify it while the socket is using it. -**/ -- (void)readDataToData:(NSData *)data - withTimeout:(NSTimeInterval)timeout - buffer:(NSMutableData *)buffer - bufferOffset:(NSUInteger)offset - maxLength:(NSUInteger)length - tag:(long)tag; - -#pragma mark Writing - -/** - * Writes data to the socket, and calls the delegate when finished. - * - * If you pass in nil or zero-length data, this method does nothing and the delegate will not be called. - * If the timeout value is negative, the write operation will not use a timeout. - * - * Thread-Safety Note: - * If the given data parameter is mutable (NSMutableData) then you MUST NOT alter the data while - * the socket is writing it. In other words, it's not safe to alter the data until after the delegate method - * socket:didWriteDataWithTag: is invoked signifying that this particular write operation has completed. - * This is due to the fact that GCDAsyncSocket does NOT copy the data. It simply retains it. - * This is for performance reasons. Often times, if NSMutableData is passed, it is because - * a request/response was built up in memory. Copying this data adds an unwanted/unneeded overhead. - * If you need to write data from an immutable buffer, and you need to alter the buffer before the socket - * completes writing the bytes (which is NOT immediately after this method returns, but rather at a later time - * when the delegate method notifies you), then you should first copy the bytes, and pass the copy to this method. -**/ -- (void)writeData:(NSData *)data withTimeout:(NSTimeInterval)timeout tag:(long)tag; - -#pragma mark Security - -/** - * Secures the connection using SSL/TLS. - * - * This method may be called at any time, and the TLS handshake will occur after all pending reads and writes - * are finished. This allows one the option of sending a protocol dependent StartTLS message, and queuing - * the upgrade to TLS at the same time, without having to wait for the write to finish. - * Any reads or writes scheduled after this method is called will occur over the secured connection. - * - * The possible keys and values for the TLS settings are well documented. - * Some possible keys are: - * - kCFStreamSSLLevel - * - kCFStreamSSLAllowsExpiredCertificates - * - kCFStreamSSLAllowsExpiredRoots - * - kCFStreamSSLAllowsAnyRoot - * - kCFStreamSSLValidatesCertificateChain - * - kCFStreamSSLPeerName - * - kCFStreamSSLCertificates - * - kCFStreamSSLIsServer - * - * Please refer to Apple's documentation for associated values, as well as other possible keys. - * - * If you pass in nil or an empty dictionary, the default settings will be used. - * - * The default settings will check to make sure the remote party's certificate is signed by a - * trusted 3rd party certificate agency (e.g. verisign) and that the certificate is not expired. - * However it will not verify the name on the certificate unless you - * give it a name to verify against via the kCFStreamSSLPeerName key. - * The security implications of this are important to understand. - * Imagine you are attempting to create a secure connection to MySecureServer.com, - * but your socket gets directed to MaliciousServer.com because of a hacked DNS server. - * If you simply use the default settings, and MaliciousServer.com has a valid certificate, - * the default settings will not detect any problems since the certificate is valid. - * To properly secure your connection in this particular scenario you - * should set the kCFStreamSSLPeerName property to "MySecureServer.com". - * If you do not know the peer name of the remote host in advance (for example, you're not sure - * if it will be "domain.com" or "www.domain.com"), then you can use the default settings to validate the - * certificate, and then use the X509Certificate class to verify the issuer after the socket has been secured. - * The X509Certificate class is part of the CocoaAsyncSocket open source project. - **/ -- (void)startTLS:(NSDictionary *)tlsSettings; - -#pragma mark Advanced - -/** - * It's not thread-safe to access certain variables from outside the socket's internal queue. - * - * For example, the socket file descriptor. - * File descriptors are simply integers which reference an index in the per-process file table. - * However, when one requests a new file descriptor (by opening a file or socket), - * the file descriptor returned is guaranteed to be the lowest numbered unused descriptor. - * So if we're not careful, the following could be possible: - * - * - Thread A invokes a method which returns the socket's file descriptor. - * - The socket is closed via the socket's internal queue on thread B. - * - Thread C opens a file, and subsequently receives the file descriptor that was previously the socket's FD. - * - Thread A is now accessing/altering the file instead of the socket. - * - * In addition to this, other variables are not actually objects, - * and thus cannot be retained/released or even autoreleased. - * An example is the sslContext, of type SSLContextRef, which is actually a malloc'd struct. - * - * Although there are internal variables that make it difficult to maintain thread-safety, - * it is important to provide access to these variables - * to ensure this class can be used in a wide array of environments. - * This method helps to accomplish this by invoking the current block on the socket's internal queue. - * The methods below can be invoked from within the block to access - * those generally thread-unsafe internal variables in a thread-safe manner. - * The given block will be invoked synchronously on the socket's internal queue. - * - * If you save references to any protected variables and use them outside the block, you do so at your own peril. -**/ -- (void)performBlock:(dispatch_block_t)block; - -/** - * These methods are only available from within the context of a performBlock: invocation. - * See the documentation for the performBlock: method above. - * - * Provides access to the socket's file descriptor(s). - * If the socket is a server socket (is accepting incoming connections), - * it might actually have multiple internal socket file descriptors - one for IPv4 and one for IPv6. -**/ -- (int)socketFD; -- (int)socket4FD; -- (int)socket6FD; - -#if TARGET_OS_IPHONE - -/** - * These methods are only available from within the context of a performBlock: invocation. - * See the documentation for the performBlock: method above. - * - * Provides access to the socket's internal CFReadStream/CFWriteStream. - * - * These streams are only used as workarounds for specific iOS shortcomings: - * - * - Apple has decided to keep the SecureTransport framework private is iOS. - * This means the only supplied way to do SSL/TLS is via CFStream or some other API layered on top of it. - * Thus, in order to provide SSL/TLS support on iOS we are forced to rely on CFStream, - * instead of the preferred and faster and more powerful SecureTransport. - * - * - If a socket doesn't have backgrounding enabled, and that socket is closed while the app is backgrounded, - * Apple only bothers to notify us via the CFStream API. - * The faster and more powerful GCD API isn't notified properly in this case. - * - * See also: (BOOL)enableBackgroundingOnSocket -**/ -- (CFReadStreamRef)readStream; -- (CFWriteStreamRef)writeStream; - -/** - * This method is only available from within the context of a performBlock: invocation. - * See the documentation for the performBlock: method above. - * - * Configures the socket to allow it to operate when the iOS application has been backgrounded. - * In other words, this method creates a read & write stream, and invokes: - * - * CFReadStreamSetProperty(readStream, kCFStreamNetworkServiceType, kCFStreamNetworkServiceTypeVoIP); - * CFWriteStreamSetProperty(writeStream, kCFStreamNetworkServiceType, kCFStreamNetworkServiceTypeVoIP); - * - * Returns YES if successful, NO otherwise. - * - * Note: Apple does not officially support backgrounding server sockets. - * That is, if your socket is accepting incoming connections, Apple does not officially support - * allowing iOS applications to accept incoming connections while an app is backgrounded. - * - * Example usage: - * - * - (void)socket:(GCDAsyncSocket *)sock didConnectToHost:(NSString *)host port:(uint16_t)port - * { - * [asyncSocket performBlock:^{ - * [asyncSocket enableBackgroundingOnSocket]; - * }]; - * } -**/ -- (BOOL)enableBackgroundingOnSocket; - -#else - -/** - * This method is only available from within the context of a performBlock: invocation. - * See the documentation for the performBlock: method above. - * - * Provides access to the socket's SSLContext, if SSL/TLS has been started on the socket. -**/ -- (SSLContextRef)sslContext; - -#endif - -#pragma mark Utilities - -/** - * Extracting host and port information from raw address data. -**/ -+ (NSString *)hostFromAddress:(NSData *)address; -+ (uint16_t)portFromAddress:(NSData *)address; -+ (BOOL)getHost:(NSString **)hostPtr port:(uint16_t *)portPtr fromAddress:(NSData *)address; - -/** - * A few common line separators, for use with the readDataToData:... methods. -**/ -+ (NSData *)CRLFData; // 0x0D0A -+ (NSData *)CRData; // 0x0D -+ (NSData *)LFData; // 0x0A -+ (NSData *)ZeroData; // 0x00 - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -@protocol GCDAsyncSocketDelegate -@optional - -/** - * This method is called immediately prior to socket:didAcceptNewSocket:. - * It optionally allows a listening socket to specify the socketQueue for a new accepted socket. - * If this method is not implemented, or returns NULL, the new accepted socket will create its own default queue. - * - * Since you cannot autorelease a dispatch_queue, - * this method uses the "new" prefix in its name to specify that the returned queue has been retained. - * - * Thus you could do something like this in the implementation: - * return dispatch_queue_create("MyQueue", NULL); - * - * If you are placing multiple sockets on the same queue, - * then care should be taken to increment the retain count each time this method is invoked. - * - * For example, your implementation might look something like this: - * dispatch_retain(myExistingQueue); - * return myExistingQueue; -**/ -- (dispatch_queue_t)newSocketQueueForConnectionFromAddress:(NSData *)address onSocket:(GCDAsyncSocket *)sock; - -/** - * Called when a socket accepts a connection. - * Another socket is automatically spawned to handle it. - * - * You must retain the newSocket if you wish to handle the connection. - * Otherwise the newSocket instance will be released and the spawned connection will be closed. - * - * By default the new socket will have the same delegate and delegateQueue. - * You may, of course, change this at any time. -**/ -- (void)socket:(GCDAsyncSocket *)sock didAcceptNewSocket:(GCDAsyncSocket *)newSocket; - -/** - * Called when a socket connects and is ready for reading and writing. - * The host parameter will be an IP address, not a DNS name. -**/ -- (void)socket:(GCDAsyncSocket *)sock didConnectToHost:(NSString *)host port:(uint16_t)port; - -/** - * Called when a socket has completed reading the requested data into memory. - * Not called if there is an error. -**/ -- (void)socket:(GCDAsyncSocket *)sock didReadData:(NSData *)data withTag:(long)tag; - -/** - * Called when a socket has read in data, but has not yet completed the read. - * This would occur if using readToData: or readToLength: methods. - * It may be used to for things such as updating progress bars. -**/ -- (void)socket:(GCDAsyncSocket *)sock didReadPartialDataOfLength:(NSUInteger)partialLength tag:(long)tag; - -/** - * Called when a socket has completed writing the requested data. Not called if there is an error. -**/ -- (void)socket:(GCDAsyncSocket *)sock didWriteDataWithTag:(long)tag; - -/** - * Called when a socket has written some data, but has not yet completed the entire write. - * It may be used to for things such as updating progress bars. -**/ -- (void)socket:(GCDAsyncSocket *)sock didWritePartialDataOfLength:(NSUInteger)partialLength tag:(long)tag; - -/** - * Called if a read operation has reached its timeout without completing. - * This method allows you to optionally extend the timeout. - * If you return a positive time interval (> 0) the read's timeout will be extended by the given amount. - * If you don't implement this method, or return a non-positive time interval (<= 0) the read will timeout as usual. - * - * The elapsed parameter is the sum of the original timeout, plus any additions previously added via this method. - * The length parameter is the number of bytes that have been read so far for the read operation. - * - * Note that this method may be called multiple times for a single read if you return positive numbers. -**/ -- (NSTimeInterval)socket:(GCDAsyncSocket *)sock shouldTimeoutReadWithTag:(long)tag - elapsed:(NSTimeInterval)elapsed - bytesDone:(NSUInteger)length; - -/** - * Called if a write operation has reached its timeout without completing. - * This method allows you to optionally extend the timeout. - * If you return a positive time interval (> 0) the write's timeout will be extended by the given amount. - * If you don't implement this method, or return a non-positive time interval (<= 0) the write will timeout as usual. - * - * The elapsed parameter is the sum of the original timeout, plus any additions previously added via this method. - * The length parameter is the number of bytes that have been written so far for the write operation. - * - * Note that this method may be called multiple times for a single write if you return positive numbers. -**/ -- (NSTimeInterval)socket:(GCDAsyncSocket *)sock shouldTimeoutWriteWithTag:(long)tag - elapsed:(NSTimeInterval)elapsed - bytesDone:(NSUInteger)length; - -/** - * Conditionally called if the read stream closes, but the write stream may still be writeable. - * - * This delegate method is only called if autoDisconnectOnClosedReadStream has been set to NO. - * See the discussion on the autoDisconnectOnClosedReadStream method for more information. -**/ -- (void)socketDidCloseReadStream:(GCDAsyncSocket *)sock; - -/** - * Called when a socket disconnects with or without error. - * - * If you call the disconnect method, and the socket wasn't already disconnected, - * this delegate method will be called before the disconnect method returns. -**/ -- (void)socketDidDisconnect:(GCDAsyncSocket *)sock withError:(NSError *)err; - -/** - * Called after the socket has successfully completed SSL/TLS negotiation. - * This method is not called unless you use the provided startTLS method. - * - * If a SSL/TLS negotiation fails (invalid certificate, etc) then the socket will immediately close, - * and the socketDidDisconnect:withError: delegate method will be called with the specific SSL error code. -**/ -- (void)socketDidSecure:(GCDAsyncSocket *)sock; - -@end diff --git a/third_party/objc/CocoaHTTPServer/Vendor/CocoaAsyncSocket/GCDAsyncSocket.m b/third_party/objc/CocoaHTTPServer/Vendor/CocoaAsyncSocket/GCDAsyncSocket.m deleted file mode 100644 index 2a441473a645e..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Vendor/CocoaAsyncSocket/GCDAsyncSocket.m +++ /dev/null @@ -1,6944 +0,0 @@ -// -// GCDAsyncSocket.m -// -// This class is in the public domain. -// Originally created by Robbie Hanson in Q4 2010. -// Updated and maintained by Deusty LLC and the Mac development community. -// -// http://code.google.com/p/cocoaasyncsocket/ -// - -#import "GCDAsyncSocket.h" - -#if TARGET_OS_IPHONE - #import -#endif - -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import - - -#if 0 - -// Logging Enabled - See log level below - -// Logging uses the CocoaLumberjack framework (which is also GCD based). -// http://code.google.com/p/cocoalumberjack/ -// -// It allows us to do a lot of logging without significantly slowing down the code. -#import "DDLog.h" - -#define LogAsync YES -#define LogContext 65535 - -#define LogObjc(flg, frmt, ...) LOG_OBJC_MAYBE(LogAsync, logLevel, flg, LogContext, frmt, ##__VA_ARGS__) -#define LogC(flg, frmt, ...) LOG_C_MAYBE(LogAsync, logLevel, flg, LogContext, frmt, ##__VA_ARGS__) - -#define LogError(frmt, ...) LogObjc(LOG_FLAG_ERROR, (@"%@: " frmt), THIS_FILE, ##__VA_ARGS__) -#define LogWarn(frmt, ...) LogObjc(LOG_FLAG_WARN, (@"%@: " frmt), THIS_FILE, ##__VA_ARGS__) -#define LogInfo(frmt, ...) LogObjc(LOG_FLAG_INFO, (@"%@: " frmt), THIS_FILE, ##__VA_ARGS__) -#define LogVerbose(frmt, ...) LogObjc(LOG_FLAG_VERBOSE, (@"%@: " frmt), THIS_FILE, ##__VA_ARGS__) - -#define LogCError(frmt, ...) LogC(LOG_FLAG_ERROR, (@"%@: " frmt), THIS_FILE, ##__VA_ARGS__) -#define LogCWarn(frmt, ...) LogC(LOG_FLAG_WARN, (@"%@: " frmt), THIS_FILE, ##__VA_ARGS__) -#define LogCInfo(frmt, ...) LogC(LOG_FLAG_INFO, (@"%@: " frmt), THIS_FILE, ##__VA_ARGS__) -#define LogCVerbose(frmt, ...) LogC(LOG_FLAG_VERBOSE, (@"%@: " frmt), THIS_FILE, ##__VA_ARGS__) - -#define LogTrace() LogObjc(LOG_FLAG_VERBOSE, @"%@: %@", THIS_FILE, THIS_METHOD) -#define LogCTrace() LogC(LOG_FLAG_VERBOSE, @"%@: %s", THIS_FILE, __FUNCTION__) - -// Log levels : off, error, warn, info, verbose -static const int logLevel = LOG_LEVEL_VERBOSE; - -#else - -// Logging Disabled - -#define LogError(frmt, ...) {} -#define LogWarn(frmt, ...) {} -#define LogInfo(frmt, ...) {} -#define LogVerbose(frmt, ...) {} - -#define LogCError(frmt, ...) {} -#define LogCWarn(frmt, ...) {} -#define LogCInfo(frmt, ...) {} -#define LogCVerbose(frmt, ...) {} - -#define LogTrace() {} -#define LogCTrace(frmt, ...) {} - -#endif - -/** - * Seeing a return statements within an inner block - * can sometimes be mistaken for a return point of the enclosing method. - * This makes inline blocks a bit easier to read. -**/ -#define return_from_block return - -/** - * A socket file descriptor is really just an integer. - * It represents the index of the socket within the kernel. - * This makes invalid file descriptor comparisons easier to read. -**/ -#define SOCKET_NULL -1 - - -NSString *const GCDAsyncSocketException = @"GCDAsyncSocketException"; -NSString *const GCDAsyncSocketErrorDomain = @"GCDAsyncSocketErrorDomain"; - -#if !TARGET_OS_IPHONE -NSString *const GCDAsyncSocketSSLCipherSuites = @"GCDAsyncSocketSSLCipherSuites"; -NSString *const GCDAsyncSocketSSLDiffieHellmanParameters = @"GCDAsyncSocketSSLDiffieHellmanParameters"; -#endif - -enum GCDAsyncSocketFlags -{ - kSocketStarted = 1 << 0, // If set, socket has been started (accepting/connecting) - kConnected = 1 << 1, // If set, the socket is connected - kForbidReadsWrites = 1 << 2, // If set, no new reads or writes are allowed - kReadsPaused = 1 << 3, // If set, reads are paused due to possible timeout - kWritesPaused = 1 << 4, // If set, writes are paused due to possible timeout - kDisconnectAfterReads = 1 << 5, // If set, disconnect after no more reads are queued - kDisconnectAfterWrites = 1 << 6, // If set, disconnect after no more writes are queued - kSocketCanAcceptBytes = 1 << 7, // If set, we know socket can accept bytes. If unset, it's unknown. - kReadSourceSuspended = 1 << 8, // If set, the read source is suspended - kWriteSourceSuspended = 1 << 9, // If set, the write source is suspended - kQueuedTLS = 1 << 10, // If set, we've queued an upgrade to TLS - kStartingReadTLS = 1 << 11, // If set, we're waiting for TLS negotiation to complete - kStartingWriteTLS = 1 << 12, // If set, we're waiting for TLS negotiation to complete - kSocketSecure = 1 << 13, // If set, socket is using secure communication via SSL/TLS - kSocketHasReadEOF = 1 << 14, // If set, we have read EOF from socket - kReadStreamClosed = 1 << 15, // If set, we've read EOF plus prebuffer has been drained -#if TARGET_OS_IPHONE - kAddedStreamListener = 1 << 16, // If set, CFStreams have been added to listener thread - kSecureSocketHasBytesAvailable = 1 << 17, // If set, CFReadStream has notified us of bytes available -#endif -}; - -enum GCDAsyncSocketConfig -{ - kIPv4Disabled = 1 << 0, // If set, IPv4 is disabled - kIPv6Disabled = 1 << 1, // If set, IPv6 is disabled - kPreferIPv6 = 1 << 2, // If set, IPv6 is preferred over IPv4 - kAllowHalfDuplexConnection = 1 << 3, // If set, the socket will stay open even if the read stream closes -}; - -#if TARGET_OS_IPHONE - static NSThread *listenerThread; // Used for CFStreams -#endif - -@interface GCDAsyncSocket (Private) - -// Accepting -- (BOOL)doAccept:(int)socketFD; - -// Connecting -- (void)startConnectTimeout:(NSTimeInterval)timeout; -- (void)endConnectTimeout; -- (void)doConnectTimeout; -- (void)lookup:(int)aConnectIndex host:(NSString *)host port:(uint16_t)port; -- (void)lookup:(int)aConnectIndex didSucceedWithAddress4:(NSData *)address4 address6:(NSData *)address6; -- (void)lookup:(int)aConnectIndex didFail:(NSError *)error; -- (BOOL)connectWithAddress4:(NSData *)address4 address6:(NSData *)address6 error:(NSError **)errPtr; -- (void)didConnect:(int)aConnectIndex; -- (void)didNotConnect:(int)aConnectIndex error:(NSError *)error; - -// Disconnect -- (void)closeWithError:(NSError *)error; -- (void)close; -- (void)maybeClose; - -// Errors -- (NSError *)badConfigError:(NSString *)msg; -- (NSError *)badParamError:(NSString *)msg; -- (NSError *)gaiError:(int)gai_error; -- (NSError *)errnoError; -- (NSError *)errnoErrorWithReason:(NSString *)reason; -- (NSError *)connectTimeoutError; -- (NSError *)otherError:(NSString *)msg; - -// Diagnostics -- (NSString *)connectedHost4; -- (NSString *)connectedHost6; -- (uint16_t)connectedPort4; -- (uint16_t)connectedPort6; -- (NSString *)localHost4; -- (NSString *)localHost6; -- (uint16_t)localPort4; -- (uint16_t)localPort6; -- (NSString *)connectedHostFromSocket4:(int)socketFD; -- (NSString *)connectedHostFromSocket6:(int)socketFD; -- (uint16_t)connectedPortFromSocket4:(int)socketFD; -- (uint16_t)connectedPortFromSocket6:(int)socketFD; -- (NSString *)localHostFromSocket4:(int)socketFD; -- (NSString *)localHostFromSocket6:(int)socketFD; -- (uint16_t)localPortFromSocket4:(int)socketFD; -- (uint16_t)localPortFromSocket6:(int)socketFD; - -// Utilities -- (void)getInterfaceAddress4:(NSMutableData **)addr4Ptr - address6:(NSMutableData **)addr6Ptr - fromDescription:(NSString *)interfaceDescription - port:(uint16_t)port; -- (void)setupReadAndWriteSourcesForNewlyConnectedSocket:(int)socketFD; -- (void)suspendReadSource; -- (void)resumeReadSource; -- (void)suspendWriteSource; -- (void)resumeWriteSource; - -// Reading -- (void)maybeDequeueRead; -- (void)flushSSLBuffers; -- (void)doReadData; -- (void)doReadEOF; -- (void)completeCurrentRead; -- (void)endCurrentRead; -- (void)setupReadTimerWithTimeout:(NSTimeInterval)timeout; -- (void)doReadTimeout; -- (void)doReadTimeoutWithExtension:(NSTimeInterval)timeoutExtension; - -// Writing -- (void)maybeDequeueWrite; -- (void)doWriteData; -- (void)completeCurrentWrite; -- (void)endCurrentWrite; -- (void)setupWriteTimerWithTimeout:(NSTimeInterval)timeout; -- (void)doWriteTimeout; -- (void)doWriteTimeoutWithExtension:(NSTimeInterval)timeoutExtension; - -// Security -- (void)maybeStartTLS; -#if !TARGET_OS_IPHONE -- (void)continueSSLHandshake; -#endif - -// CFStream -#if TARGET_OS_IPHONE -+ (void)startListenerThreadIfNeeded; -- (BOOL)createReadAndWriteStream; -- (BOOL)registerForStreamCallbacksIncludingReadWrite:(BOOL)includeReadWrite; -- (BOOL)addStreamsToRunLoop; -- (BOOL)openStreams; -- (void)removeStreamsFromRunLoop; -#endif - -// Class Methods -+ (NSString *)hostFromSockaddr4:(const struct sockaddr_in *)pSockaddr4; -+ (NSString *)hostFromSockaddr6:(const struct sockaddr_in6 *)pSockaddr6; -+ (uint16_t)portFromSockaddr4:(const struct sockaddr_in *)pSockaddr4; -+ (uint16_t)portFromSockaddr6:(const struct sockaddr_in6 *)pSockaddr6; - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * The GCDAsyncReadPacket encompasses the instructions for any given read. - * The content of a read packet allows the code to determine if we're: - * - reading to a certain length - * - reading to a certain separator - * - or simply reading the first chunk of available data -**/ -@interface GCDAsyncReadPacket : NSObject -{ - @public - NSMutableData *buffer; - NSUInteger startOffset; - NSUInteger bytesDone; - NSUInteger maxLength; - NSTimeInterval timeout; - NSUInteger readLength; - NSData *term; - BOOL bufferOwner; - NSUInteger originalBufferLength; - long tag; -} -- (id)initWithData:(NSMutableData *)d - startOffset:(NSUInteger)s - maxLength:(NSUInteger)m - timeout:(NSTimeInterval)t - readLength:(NSUInteger)l - terminator:(NSData *)e - tag:(long)i; - -- (void)ensureCapacityForAdditionalDataOfLength:(NSUInteger)bytesToRead; - -- (NSUInteger)optimalReadLengthWithDefault:(NSUInteger)defaultValue shouldPreBuffer:(BOOL *)shouldPreBufferPtr; - -- (NSUInteger)readLengthForNonTermWithHint:(NSUInteger)bytesAvailable; -- (NSUInteger)readLengthForTermWithHint:(NSUInteger)bytesAvailable shouldPreBuffer:(BOOL *)shouldPreBufferPtr; -- (NSUInteger)readLengthForTermWithPreBuffer:(NSData *)preBuffer found:(BOOL *)foundPtr; - -- (NSInteger)searchForTermAfterPreBuffering:(ssize_t)numBytes; - -@end - -@implementation GCDAsyncReadPacket - -- (id)initWithData:(NSMutableData *)d - startOffset:(NSUInteger)s - maxLength:(NSUInteger)m - timeout:(NSTimeInterval)t - readLength:(NSUInteger)l - terminator:(NSData *)e - tag:(long)i -{ - if((self = [super init])) - { - bytesDone = 0; - maxLength = m; - timeout = t; - readLength = l; - term = [e copy]; - tag = i; - - if (d) - { - buffer = [d retain]; - startOffset = s; - bufferOwner = NO; - originalBufferLength = [d length]; - } - else - { - if (readLength > 0) - buffer = [[NSMutableData alloc] initWithLength:readLength]; - else - buffer = [[NSMutableData alloc] initWithLength:0]; - - startOffset = 0; - bufferOwner = YES; - originalBufferLength = 0; - } - } - return self; -} - -/** - * Increases the length of the buffer (if needed) to ensure a read of the given size will fit. -**/ -- (void)ensureCapacityForAdditionalDataOfLength:(NSUInteger)bytesToRead -{ - NSUInteger buffSize = [buffer length]; - NSUInteger buffUsed = startOffset + bytesDone; - - NSUInteger buffSpace = buffSize - buffUsed; - - if (bytesToRead > buffSpace) - { - NSUInteger buffInc = bytesToRead - buffSpace; - - [buffer increaseLengthBy:buffInc]; - } -} - -/** - * This method is used when we do NOT know how much data is available to be read from the socket. - * This method returns the default value unless it exceeds the specified readLength or maxLength. - * - * Furthermore, the shouldPreBuffer decision is based upon the packet type, - * and whether the returned value would fit in the current buffer without requiring a resize of the buffer. -**/ -- (NSUInteger)optimalReadLengthWithDefault:(NSUInteger)defaultValue shouldPreBuffer:(BOOL *)shouldPreBufferPtr -{ - NSUInteger result; - - if (readLength > 0) - { - // Read a specific length of data - - result = MIN(defaultValue, (readLength - bytesDone)); - - // There is no need to prebuffer since we know exactly how much data we need to read. - // Even if the buffer isn't currently big enough to fit this amount of data, - // it would have to be resized eventually anyway. - - if (shouldPreBufferPtr) - *shouldPreBufferPtr = NO; - } - else - { - // Either reading until we find a specified terminator, - // or we're simply reading all available data. - // - // In other words, one of: - // - // - readDataToData packet - // - readDataWithTimeout packet - - if (maxLength > 0) - result = MIN(defaultValue, (maxLength - bytesDone)); - else - result = defaultValue; - - // Since we don't know the size of the read in advance, - // the shouldPreBuffer decision is based upon whether the returned value would fit - // in the current buffer without requiring a resize of the buffer. - // - // This is because, in all likelyhood, the amount read from the socket will be less than the default value. - // Thus we should avoid over-allocating the read buffer when we can simply use the pre-buffer instead. - - if (shouldPreBufferPtr) - { - NSUInteger buffSize = [buffer length]; - NSUInteger buffUsed = startOffset + bytesDone; - - NSUInteger buffSpace = buffSize - buffUsed; - - if (buffSpace >= result) - *shouldPreBufferPtr = NO; - else - *shouldPreBufferPtr = YES; - } - } - - return result; -} - -/** - * For read packets without a set terminator, returns the amount of data - * that can be read without exceeding the readLength or maxLength. - * - * The given parameter indicates the number of bytes estimated to be available on the socket, - * which is taken into consideration during the calculation. - * - * The given hint MUST be greater than zero. -**/ -- (NSUInteger)readLengthForNonTermWithHint:(NSUInteger)bytesAvailable -{ - NSAssert(term == nil, @"This method does not apply to term reads"); - NSAssert(bytesAvailable > 0, @"Invalid parameter: bytesAvailable"); - - if (readLength > 0) - { - // Read a specific length of data - - return MIN(bytesAvailable, (readLength - bytesDone)); - - // No need to avoid resizing the buffer. - // If the user provided their own buffer, - // and told us to read a certain length of data that exceeds the size of the buffer, - // then it is clear that our code will resize the buffer during the read operation. - // - // This method does not actually do any resizing. - // The resizing will happen elsewhere if needed. - } - else - { - // Read all available data - - NSUInteger result = bytesAvailable; - - if (maxLength > 0) - { - result = MIN(result, (maxLength - bytesDone)); - } - - // No need to avoid resizing the buffer. - // If the user provided their own buffer, - // and told us to read all available data without giving us a maxLength, - // then it is clear that our code might resize the buffer during the read operation. - // - // This method does not actually do any resizing. - // The resizing will happen elsewhere if needed. - - return result; - } -} - -/** - * For read packets with a set terminator, returns the amount of data - * that can be read without exceeding the maxLength. - * - * The given parameter indicates the number of bytes estimated to be available on the socket, - * which is taken into consideration during the calculation. - * - * To optimize memory allocations, mem copies, and mem moves - * the shouldPreBuffer boolean value will indicate if the data should be read into a prebuffer first, - * or if the data can be read directly into the read packet's buffer. -**/ -- (NSUInteger)readLengthForTermWithHint:(NSUInteger)bytesAvailable shouldPreBuffer:(BOOL *)shouldPreBufferPtr -{ - NSAssert(term != nil, @"This method does not apply to non-term reads"); - NSAssert(bytesAvailable > 0, @"Invalid parameter: bytesAvailable"); - - - NSUInteger result = bytesAvailable; - - if (maxLength > 0) - { - result = MIN(result, (maxLength - bytesDone)); - } - - // Should the data be read into the read packet's buffer, or into a pre-buffer first? - // - // One would imagine the preferred option is the faster one. - // So which one is faster? - // - // Reading directly into the packet's buffer requires: - // 1. Possibly resizing packet buffer (malloc/realloc) - // 2. Filling buffer (read) - // 3. Searching for term (memcmp) - // 4. Possibly copying overflow into prebuffer (malloc/realloc, memcpy) - // - // Reading into prebuffer first: - // 1. Possibly resizing prebuffer (malloc/realloc) - // 2. Filling buffer (read) - // 3. Searching for term (memcmp) - // 4. Copying underflow into packet buffer (malloc/realloc, memcpy) - // 5. Removing underflow from prebuffer (memmove) - // - // Comparing the performance of the two we can see that reading - // data into the prebuffer first is slower due to the extra memove. - // - // However: - // The implementation of NSMutableData is open source via core foundation's CFMutableData. - // Decreasing the length of a mutable data object doesn't cause a realloc. - // In other words, the capacity of a mutable data object can grow, but doesn't shrink. - // - // This means the prebuffer will rarely need a realloc. - // The packet buffer, on the other hand, may often need a realloc. - // This is especially true if we are the buffer owner. - // Furthermore, if we are constantly realloc'ing the packet buffer, - // and then moving the overflow into the prebuffer, - // then we're consistently over-allocating memory for each term read. - // And now we get into a bit of a tradeoff between speed and memory utilization. - // - // The end result is that the two perform very similarly. - // And we can answer the original question very simply by another means. - // - // If we can read all the data directly into the packet's buffer without resizing it first, - // then we do so. Otherwise we use the prebuffer. - - if (shouldPreBufferPtr) - { - NSUInteger buffSize = [buffer length]; - NSUInteger buffUsed = startOffset + bytesDone; - - if ((buffSize - buffUsed) >= result) - *shouldPreBufferPtr = NO; - else - *shouldPreBufferPtr = YES; - } - - return result; -} - -/** - * For read packets with a set terminator, - * returns the amount of data that can be read from the given preBuffer, - * without going over a terminator or the maxLength. - * - * It is assumed the terminator has not already been read. -**/ -- (NSUInteger)readLengthForTermWithPreBuffer:(NSData *)preBuffer found:(BOOL *)foundPtr -{ - NSAssert(term != nil, @"This method does not apply to non-term reads"); - NSAssert([preBuffer length] > 0, @"Invoked with empty pre buffer!"); - - // We know that the terminator, as a whole, doesn't exist in our own buffer. - // But it is possible that a portion of it exists in our buffer. - // So we're going to look for the terminator starting with a portion of our own buffer. - // - // Example: - // - // term length = 3 bytes - // bytesDone = 5 bytes - // preBuffer length = 5 bytes - // - // If we append the preBuffer to our buffer, - // it would look like this: - // - // --------------------- - // |B|B|B|B|B|P|P|P|P|P| - // --------------------- - // - // So we start our search here: - // - // --------------------- - // |B|B|B|B|B|P|P|P|P|P| - // -------^-^-^--------- - // - // And move forwards... - // - // --------------------- - // |B|B|B|B|B|P|P|P|P|P| - // ---------^-^-^------- - // - // Until we find the terminator or reach the end. - // - // --------------------- - // |B|B|B|B|B|P|P|P|P|P| - // ---------------^-^-^- - - BOOL found = NO; - - NSUInteger termLength = [term length]; - NSUInteger preBufferLength = [preBuffer length]; - - if ((bytesDone + preBufferLength) < termLength) - { - // Not enough data for a full term sequence yet - return preBufferLength; - } - - NSUInteger maxPreBufferLength; - if (maxLength > 0) { - maxPreBufferLength = MIN(preBufferLength, (maxLength - bytesDone)); - - // Note: maxLength >= termLength - } - else { - maxPreBufferLength = preBufferLength; - } - - uint8_t seq[termLength]; - const void *termBuf = [term bytes]; - - NSUInteger bufLen = MIN(bytesDone, (termLength - 1)); - uint8_t *buf = (uint8_t *)[buffer mutableBytes] + startOffset + bytesDone - bufLen; - - NSUInteger preLen = termLength - bufLen; - const uint8_t *pre = [preBuffer bytes]; - - NSUInteger loopCount = bufLen + maxPreBufferLength - termLength + 1; // Plus one. See example above. - - NSUInteger result = preBufferLength; - - NSUInteger i; - for (i = 0; i < loopCount; i++) - { - if (bufLen > 0) - { - // Combining bytes from buffer and preBuffer - - memcpy(seq, buf, bufLen); - memcpy(seq + bufLen, pre, preLen); - - if (memcmp(seq, termBuf, termLength) == 0) - { - result = preLen; - found = YES; - break; - } - - buf++; - bufLen--; - preLen++; - } - else - { - // Comparing directly from preBuffer - - if (memcmp(pre, termBuf, termLength) == 0) - { - NSUInteger preOffset = pre - (const uint8_t *)[preBuffer bytes]; // pointer arithmetic - - result = preOffset + termLength; - found = YES; - break; - } - - pre++; - } - } - - // There is no need to avoid resizing the buffer in this particular situation. - - if (foundPtr) *foundPtr = found; - return result; -} - -/** - * For read packets with a set terminator, scans the packet buffer for the term. - * It is assumed the terminator had not been fully read prior to the new bytes. - * - * If the term is found, the number of excess bytes after the term are returned. - * If the term is not found, this method will return -1. - * - * Note: A return value of zero means the term was found at the very end. - * - * Prerequisites: - * The given number of bytes have been added to the end of our buffer. - * Our bytesDone variable has NOT been changed due to the prebuffered bytes. -**/ -- (NSInteger)searchForTermAfterPreBuffering:(ssize_t)numBytes -{ - NSAssert(term != nil, @"This method does not apply to non-term reads"); - - // The implementation of this method is very similar to the above method. - // See the above method for a discussion of the algorithm used here. - - uint8_t *buff = [buffer mutableBytes]; - NSUInteger buffLength = bytesDone + numBytes; - - const void *termBuff = [term bytes]; - NSUInteger termLength = [term length]; - - // Note: We are dealing with unsigned integers, - // so make sure the math doesn't go below zero. - - NSUInteger i = ((buffLength - numBytes) >= termLength) ? (buffLength - numBytes - termLength + 1) : 0; - - while (i + termLength <= buffLength) - { - uint8_t *subBuffer = buff + startOffset + i; - - if (memcmp(subBuffer, termBuff, termLength) == 0) - { - return buffLength - (i + termLength); - } - - i++; - } - - return -1; -} - -- (void)dealloc -{ - [buffer release]; - [term release]; - [super dealloc]; -} - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * The GCDAsyncWritePacket encompasses the instructions for any given write. -**/ -@interface GCDAsyncWritePacket : NSObject -{ - @public - NSData *buffer; - NSUInteger bytesDone; - long tag; - NSTimeInterval timeout; -} -- (id)initWithData:(NSData *)d timeout:(NSTimeInterval)t tag:(long)i; -@end - -@implementation GCDAsyncWritePacket - -- (id)initWithData:(NSData *)d timeout:(NSTimeInterval)t tag:(long)i -{ - if((self = [super init])) - { - buffer = [d retain]; // Retain not copy. For performance as documented in header file. - bytesDone = 0; - timeout = t; - tag = i; - } - return self; -} - -- (void)dealloc -{ - [buffer release]; - [super dealloc]; -} - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * The GCDAsyncSpecialPacket encompasses special instructions for interruptions in the read/write queues. - * This class my be altered to support more than just TLS in the future. -**/ -@interface GCDAsyncSpecialPacket : NSObject -{ - @public - NSDictionary *tlsSettings; -} -- (id)initWithTLSSettings:(NSDictionary *)settings; -@end - -@implementation GCDAsyncSpecialPacket - -- (id)initWithTLSSettings:(NSDictionary *)settings -{ - if((self = [super init])) - { - tlsSettings = [settings copy]; - } - return self; -} - -- (void)dealloc -{ - [tlsSettings release]; - [super dealloc]; -} - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -@implementation GCDAsyncSocket - -- (id)init -{ - return [self initWithDelegate:nil delegateQueue:NULL socketQueue:NULL]; -} - -- (id)initWithSocketQueue:(dispatch_queue_t)sq -{ - return [self initWithDelegate:nil delegateQueue:NULL socketQueue:sq]; -} - -- (id)initWithDelegate:(id)aDelegate delegateQueue:(dispatch_queue_t)dq -{ - return [self initWithDelegate:aDelegate delegateQueue:dq socketQueue:NULL]; -} - -- (id)initWithDelegate:(id)aDelegate delegateQueue:(dispatch_queue_t)dq socketQueue:(dispatch_queue_t)sq -{ - if((self = [super init])) - { - delegate = aDelegate; - - if (dq) - { - dispatch_retain(dq); - delegateQueue = dq; - } - - socket4FD = SOCKET_NULL; - socket6FD = SOCKET_NULL; - connectIndex = 0; - - if (sq) - { - NSAssert(sq != dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), - @"The given socketQueue parameter must not be a concurrent queue."); - NSAssert(sq != dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), - @"The given socketQueue parameter must not be a concurrent queue."); - NSAssert(sq != dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), - @"The given socketQueue parameter must not be a concurrent queue."); - - dispatch_retain(sq); - socketQueue = sq; - } - else - { - socketQueue = dispatch_queue_create("GCDAsyncSocket", NULL); - } - - readQueue = [[NSMutableArray alloc] initWithCapacity:5]; - currentRead = nil; - - writeQueue = [[NSMutableArray alloc] initWithCapacity:5]; - currentWrite = nil; - - partialReadBuffer = [[NSMutableData alloc] init]; - } - return self; -} - -- (void)dealloc -{ - LogInfo(@"%@ - %@ (start)", THIS_METHOD, self); - - if (dispatch_get_current_queue() == socketQueue) - { - [self closeWithError:nil]; - } - else - { - dispatch_sync(socketQueue, ^{ - [self closeWithError:nil]; - }); - } - - delegate = nil; - if (delegateQueue) - dispatch_release(delegateQueue); - delegateQueue = NULL; - - dispatch_release(socketQueue); - socketQueue = NULL; - - [readQueue release]; - [writeQueue release]; - - [partialReadBuffer release]; - -#if !TARGET_OS_IPHONE - [sslReadBuffer release]; -#endif - - [userData release]; - - LogInfo(@"%@ - %@ (finish)", THIS_METHOD, self); - - [super dealloc]; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Configuration -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (id)delegate -{ - if (dispatch_get_current_queue() == socketQueue) - { - return delegate; - } - else - { - __block id result; - - dispatch_sync(socketQueue, ^{ - result = delegate; - }); - - return result; - } -} - -- (void)setDelegate:(id)newDelegate synchronously:(BOOL)synchronously -{ - dispatch_block_t block = ^{ - delegate = newDelegate; - }; - - if (dispatch_get_current_queue() == socketQueue) { - block(); - } - else { - if (synchronously) - dispatch_sync(socketQueue, block); - else - dispatch_async(socketQueue, block); - } -} - -- (void)setDelegate:(id)newDelegate -{ - [self setDelegate:newDelegate synchronously:NO]; -} - -- (void)synchronouslySetDelegate:(id)newDelegate -{ - [self setDelegate:newDelegate synchronously:YES]; -} - -- (dispatch_queue_t)delegateQueue -{ - if (dispatch_get_current_queue() == socketQueue) - { - return delegateQueue; - } - else - { - __block dispatch_queue_t result; - - dispatch_sync(socketQueue, ^{ - result = delegateQueue; - }); - - return result; - } -} - -- (void)setDelegateQueue:(dispatch_queue_t)newDelegateQueue synchronously:(BOOL)synchronously -{ - dispatch_block_t block = ^{ - - if (delegateQueue) - dispatch_release(delegateQueue); - - if (newDelegateQueue) - dispatch_retain(newDelegateQueue); - - delegateQueue = newDelegateQueue; - }; - - if (dispatch_get_current_queue() == socketQueue) { - block(); - } - else { - if (synchronously) - dispatch_sync(socketQueue, block); - else - dispatch_async(socketQueue, block); - } -} - -- (void)setDelegateQueue:(dispatch_queue_t)newDelegateQueue -{ - [self setDelegateQueue:newDelegateQueue synchronously:NO]; -} - -- (void)synchronouslySetDelegateQueue:(dispatch_queue_t)newDelegateQueue -{ - [self setDelegateQueue:newDelegateQueue synchronously:YES]; -} - -- (void)getDelegate:(id *)delegatePtr delegateQueue:(dispatch_queue_t *)delegateQueuePtr -{ - if (dispatch_get_current_queue() == socketQueue) - { - if (delegatePtr) *delegatePtr = delegate; - if (delegateQueuePtr) *delegateQueuePtr = delegateQueue; - } - else - { - __block id dPtr = NULL; - __block dispatch_queue_t dqPtr = NULL; - - dispatch_sync(socketQueue, ^{ - dPtr = delegate; - dqPtr = delegateQueue; - }); - - if (delegatePtr) *delegatePtr = dPtr; - if (delegateQueuePtr) *delegateQueuePtr = dqPtr; - } -} - -- (void)setDelegate:(id)newDelegate delegateQueue:(dispatch_queue_t)newDelegateQueue synchronously:(BOOL)synchronously -{ - dispatch_block_t block = ^{ - - delegate = newDelegate; - - if (delegateQueue) - dispatch_release(delegateQueue); - - if (newDelegateQueue) - dispatch_retain(newDelegateQueue); - - delegateQueue = newDelegateQueue; - }; - - if (dispatch_get_current_queue() == socketQueue) { - block(); - } - else { - if (synchronously) - dispatch_sync(socketQueue, block); - else - dispatch_async(socketQueue, block); - } -} - -- (void)setDelegate:(id)newDelegate delegateQueue:(dispatch_queue_t)newDelegateQueue -{ - [self setDelegate:newDelegate delegateQueue:newDelegateQueue synchronously:NO]; -} - -- (void)synchronouslySetDelegate:(id)newDelegate delegateQueue:(dispatch_queue_t)newDelegateQueue -{ - [self setDelegate:newDelegate delegateQueue:newDelegateQueue synchronously:YES]; -} - -- (BOOL)autoDisconnectOnClosedReadStream -{ - // Note: YES means kAllowHalfDuplexConnection is OFF - - if (dispatch_get_current_queue() == socketQueue) - { - return ((config & kAllowHalfDuplexConnection) == 0); - } - else - { - __block BOOL result; - - dispatch_sync(socketQueue, ^{ - result = ((config & kAllowHalfDuplexConnection) == 0); - }); - - return result; - } -} - -- (void)setAutoDisconnectOnClosedReadStream:(BOOL)flag -{ - // Note: YES means kAllowHalfDuplexConnection is OFF - - dispatch_block_t block = ^{ - - if (flag) - config &= ~kAllowHalfDuplexConnection; - else - config |= kAllowHalfDuplexConnection; - }; - - if (dispatch_get_current_queue() == socketQueue) - block(); - else - dispatch_async(socketQueue, block); -} - -- (BOOL)isIPv4Enabled -{ - // Note: YES means kIPv4Disabled is OFF - - if (dispatch_get_current_queue() == socketQueue) - { - return ((config & kIPv4Disabled) == 0); - } - else - { - __block BOOL result; - - dispatch_sync(socketQueue, ^{ - result = ((config & kIPv4Disabled) == 0); - }); - - return result; - } -} - -- (void)setIPv4Enabled:(BOOL)flag -{ - // Note: YES means kIPv4Disabled is OFF - - dispatch_block_t block = ^{ - - if (flag) - config &= ~kIPv4Disabled; - else - config |= kIPv4Disabled; - }; - - if (dispatch_get_current_queue() == socketQueue) - block(); - else - dispatch_async(socketQueue, block); -} - -- (BOOL)isIPv6Enabled -{ - // Note: YES means kIPv6Disabled is OFF - - if (dispatch_get_current_queue() == socketQueue) - { - return ((config & kIPv6Disabled) == 0); - } - else - { - __block BOOL result; - - dispatch_sync(socketQueue, ^{ - result = ((config & kIPv6Disabled) == 0); - }); - - return result; - } -} - -- (void)setIPv6Enabled:(BOOL)flag -{ - // Note: YES means kIPv6Disabled is OFF - - dispatch_block_t block = ^{ - - if (flag) - config &= ~kIPv6Disabled; - else - config |= kIPv6Disabled; - }; - - if (dispatch_get_current_queue() == socketQueue) - block(); - else - dispatch_async(socketQueue, block); -} - -- (BOOL)isIPv4PreferredOverIPv6 -{ - // Note: YES means kPreferIPv6 is OFF - - if (dispatch_get_current_queue() == socketQueue) - { - return ((config & kPreferIPv6) == 0); - } - else - { - __block BOOL result; - - dispatch_sync(socketQueue, ^{ - result = ((config & kPreferIPv6) == 0); - }); - - return result; - } -} - -- (void)setPreferIPv4OverIPv6:(BOOL)flag -{ - // Note: YES means kPreferIPv6 is OFF - - dispatch_block_t block = ^{ - - if (flag) - config &= ~kPreferIPv6; - else - config |= kPreferIPv6; - }; - - if (dispatch_get_current_queue() == socketQueue) - block(); - else - dispatch_async(socketQueue, block); -} - -- (id)userData -{ - __block id result = nil; - - dispatch_block_t block = ^{ - - result = [userData retain]; - }; - - if (dispatch_get_current_queue() == socketQueue) - block(); - else - dispatch_sync(socketQueue, block); - - return [result autorelease]; -} - -- (void)setUserData:(id)arbitraryUserData -{ - dispatch_block_t block = ^{ - - if (userData != arbitraryUserData) - { - [userData release]; - userData = [arbitraryUserData retain]; - } - }; - - if (dispatch_get_current_queue() == socketQueue) - block(); - else - dispatch_async(socketQueue, block); -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Accepting -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (BOOL)acceptOnPort:(uint16_t)port error:(NSError **)errPtr -{ - return [self acceptOnInterface:nil port:port error:errPtr]; -} - -- (BOOL)acceptOnInterface:(NSString *)inInterface port:(uint16_t)port error:(NSError **)errPtr -{ - LogTrace(); - - // Just in-case interface parameter is immutable. - NSString *interface = [[inInterface copy] autorelease]; - - __block BOOL result = NO; - __block NSError *err = nil; - - // CreateSocket Block - // This block will be invoked within the dispatch block below. - - int(^createSocket)(int, NSData*) = ^int (int domain, NSData *interfaceAddr) { - - int socketFD = socket(domain, SOCK_STREAM, 0); - - if (socketFD == SOCKET_NULL) - { - NSString *reason = @"Error in socket() function"; - err = [[self errnoErrorWithReason:reason] retain]; - - return SOCKET_NULL; - } - - int status; - - // Set socket options - - status = fcntl(socketFD, F_SETFL, O_NONBLOCK); - if (status == -1) - { - NSString *reason = @"Error enabling non-blocking IO on socket (fcntl)"; - err = [[self errnoErrorWithReason:reason] retain]; - - close(socketFD); - return SOCKET_NULL; - } - - int reuseOn = 1; - status = setsockopt(socketFD, SOL_SOCKET, SO_REUSEADDR, &reuseOn, sizeof(reuseOn)); - if (status == -1) - { - NSString *reason = @"Error enabling address reuse (setsockopt)"; - err = [[self errnoErrorWithReason:reason] retain]; - - close(socketFD); - return SOCKET_NULL; - } - - // Bind socket - - status = bind(socketFD, (const struct sockaddr *)[interfaceAddr bytes], (socklen_t)[interfaceAddr length]); - if (status == -1) - { - NSString *reason = @"Error in bind() function"; - err = [[self errnoErrorWithReason:reason] retain]; - - close(socketFD); - return SOCKET_NULL; - } - - // Listen - - status = listen(socketFD, 1024); - if (status == -1) - { - NSString *reason = @"Error in listen() function"; - err = [[self errnoErrorWithReason:reason] retain]; - - close(socketFD); - return SOCKET_NULL; - } - - return socketFD; - }; - - // Create dispatch block and run on socketQueue - - dispatch_block_t block = ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - if (delegate == nil) // Must have delegate set - { - NSString *msg = @"Attempting to accept without a delegate. Set a delegate first."; - err = [[self badConfigError:msg] retain]; - - [pool drain]; - return_from_block; - } - - if (delegateQueue == NULL) // Must have delegate queue set - { - NSString *msg = @"Attempting to accept without a delegate queue. Set a delegate queue first."; - err = [[self badConfigError:msg] retain]; - - [pool drain]; - return_from_block; - } - - BOOL isIPv4Disabled = (config & kIPv4Disabled) ? YES : NO; - BOOL isIPv6Disabled = (config & kIPv6Disabled) ? YES : NO; - - if (isIPv4Disabled && isIPv6Disabled) // Must have IPv4 or IPv6 enabled - { - NSString *msg = @"Both IPv4 and IPv6 have been disabled. Must enable at least one protocol first."; - err = [[self badConfigError:msg] retain]; - - [pool drain]; - return_from_block; - } - - if (![self isDisconnected]) // Must be disconnected - { - NSString *msg = @"Attempting to accept while connected or accepting connections. Disconnect first."; - err = [[self badConfigError:msg] retain]; - - [pool drain]; - return_from_block; - } - - // Clear queues (spurious read/write requests post disconnect) - [readQueue removeAllObjects]; - [writeQueue removeAllObjects]; - - // Resolve interface from description - - NSMutableData *interface4 = nil; - NSMutableData *interface6 = nil; - - [self getInterfaceAddress4:&interface4 address6:&interface6 fromDescription:interface port:port]; - - if ((interface4 == nil) && (interface6 == nil)) - { - NSString *msg = @"Unknown interface. Specify valid interface by name (e.g. \"en1\") or IP address."; - err = [[self badParamError:msg] retain]; - - [pool drain]; - return_from_block; - } - - if (isIPv4Disabled && (interface6 == nil)) - { - NSString *msg = @"IPv4 has been disabled and specified interface doesn't support IPv6."; - err = [[self badParamError:msg] retain]; - - [pool drain]; - return_from_block; - } - - if (isIPv6Disabled && (interface4 == nil)) - { - NSString *msg = @"IPv6 has been disabled and specified interface doesn't support IPv4."; - err = [[self badParamError:msg] retain]; - - [pool drain]; - return_from_block; - } - - BOOL enableIPv4 = !isIPv4Disabled && (interface4 != nil); - BOOL enableIPv6 = !isIPv6Disabled && (interface6 != nil); - - // Create sockets, configure, bind, and listen - - if (enableIPv4) - { - LogVerbose(@"Creating IPv4 socket"); - socket4FD = createSocket(AF_INET, interface4); - - if (socket4FD == SOCKET_NULL) - { - [pool drain]; - return_from_block; - } - } - - if (enableIPv6) - { - LogVerbose(@"Creating IPv6 socket"); - - if (enableIPv4 && (port == 0)) - { - // No specific port was specified, so we allowed the OS to pick an available port for us. - // Now we need to make sure the IPv6 socket listens on the same port as the IPv4 socket. - - struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)[interface6 mutableBytes]; - addr6->sin6_port = htons([self localPort4]); - } - - socket6FD = createSocket(AF_INET6, interface6); - - if (socket6FD == SOCKET_NULL) - { - if (socket4FD != SOCKET_NULL) - { - close(socket4FD); - } - - [pool drain]; - return_from_block; - } - } - - // Create accept sources - - if (enableIPv4) - { - accept4Source = dispatch_source_create(DISPATCH_SOURCE_TYPE_READ, socket4FD, 0, socketQueue); - - int socketFD = socket4FD; - dispatch_source_t acceptSource = accept4Source; - - dispatch_source_set_event_handler(accept4Source, ^{ - NSAutoreleasePool *eventPool = [[NSAutoreleasePool alloc] init]; - - LogVerbose(@"event4Block"); - - unsigned long i = 0; - unsigned long numPendingConnections = dispatch_source_get_data(acceptSource); - - LogVerbose(@"numPendingConnections: %lu", numPendingConnections); - - while ([self doAccept:socketFD] && (++i < numPendingConnections)); - - [eventPool drain]; - }); - - dispatch_source_set_cancel_handler(accept4Source, ^{ - - LogVerbose(@"dispatch_release(accept4Source)"); - dispatch_release(acceptSource); - - LogVerbose(@"close(socket4FD)"); - close(socketFD); - }); - - LogVerbose(@"dispatch_resume(accept4Source)"); - dispatch_resume(accept4Source); - } - - if (enableIPv6) - { - accept6Source = dispatch_source_create(DISPATCH_SOURCE_TYPE_READ, socket6FD, 0, socketQueue); - - int socketFD = socket6FD; - dispatch_source_t acceptSource = accept6Source; - - dispatch_source_set_event_handler(accept6Source, ^{ - NSAutoreleasePool *eventPool = [[NSAutoreleasePool alloc] init]; - - LogVerbose(@"event6Block"); - - unsigned long i = 0; - unsigned long numPendingConnections = dispatch_source_get_data(acceptSource); - - LogVerbose(@"numPendingConnections: %lu", numPendingConnections); - - while ([self doAccept:socketFD] && (++i < numPendingConnections)); - - [eventPool drain]; - }); - - dispatch_source_set_cancel_handler(accept6Source, ^{ - - LogVerbose(@"dispatch_release(accept6Source)"); - dispatch_release(acceptSource); - - LogVerbose(@"close(socket6FD)"); - close(socketFD); - }); - - LogVerbose(@"dispatch_resume(accept6Source)"); - dispatch_resume(accept6Source); - } - - flags |= kSocketStarted; - - result = YES; - [pool drain]; - }; - - if (dispatch_get_current_queue() == socketQueue) - block(); - else - dispatch_sync(socketQueue, block); - - if (result == NO) - { - LogInfo(@"Error in accept: %@", err); - - if (errPtr) - *errPtr = [err autorelease]; - else - [err release]; - } - - return result; -} - -- (BOOL)doAccept:(int)parentSocketFD -{ - LogTrace(); - - BOOL isIPv4; - int childSocketFD; - NSData *childSocketAddress; - - if (parentSocketFD == socket4FD) - { - isIPv4 = YES; - - struct sockaddr_in addr; - socklen_t addrLen = sizeof(addr); - - childSocketFD = accept(parentSocketFD, (struct sockaddr *)&addr, &addrLen); - - if (childSocketFD == -1) - { - LogWarn(@"Accept failed with error: %@", [self errnoError]); - return NO; - } - - childSocketAddress = [NSData dataWithBytes:&addr length:addrLen]; - } - else // if (parentSocketFD == socket6FD) - { - isIPv4 = NO; - - struct sockaddr_in6 addr; - socklen_t addrLen = sizeof(addr); - - childSocketFD = accept(parentSocketFD, (struct sockaddr *)&addr, &addrLen); - - if (childSocketFD == -1) - { - LogWarn(@"Accept failed with error: %@", [self errnoError]); - return NO; - } - - childSocketAddress = [NSData dataWithBytes:&addr length:addrLen]; - } - - // Enable non-blocking IO on the socket - - int result = fcntl(childSocketFD, F_SETFL, O_NONBLOCK); - if (result == -1) - { - LogWarn(@"Error enabling non-blocking IO on accepted socket (fcntl)"); - return NO; - } - - // Prevent SIGPIPE signals - - int nosigpipe = 1; - setsockopt(childSocketFD, SOL_SOCKET, SO_NOSIGPIPE, &nosigpipe, sizeof(nosigpipe)); - - // Notify delegate - - if (delegateQueue) - { - id theDelegate = delegate; - - dispatch_async(delegateQueue, ^{ - NSAutoreleasePool *delegatePool = [[NSAutoreleasePool alloc] init]; - - // Query delegate for custom socket queue - - dispatch_queue_t childSocketQueue = NULL; - - if ([theDelegate respondsToSelector:@selector(newSocketQueueForConnectionFromAddress:onSocket:)]) - { - childSocketQueue = [theDelegate newSocketQueueForConnectionFromAddress:childSocketAddress - onSocket:self]; - } - - // Create GCDAsyncSocket instance for accepted socket - - GCDAsyncSocket *acceptedSocket = [[GCDAsyncSocket alloc] initWithDelegate:delegate - delegateQueue:delegateQueue - socketQueue:childSocketQueue]; - - if (isIPv4) - acceptedSocket->socket4FD = childSocketFD; - else - acceptedSocket->socket6FD = childSocketFD; - - acceptedSocket->flags = (kSocketStarted | kConnected); - - // Setup read and write sources for accepted socket - - dispatch_async(acceptedSocket->socketQueue, ^{ - NSAutoreleasePool *socketPool = [[NSAutoreleasePool alloc] init]; - - [acceptedSocket setupReadAndWriteSourcesForNewlyConnectedSocket:childSocketFD]; - - [socketPool drain]; - }); - - // Notify delegate - - if ([theDelegate respondsToSelector:@selector(socket:didAcceptNewSocket:)]) - { - [theDelegate socket:self didAcceptNewSocket:acceptedSocket]; - } - - // Release the socket queue returned from the delegate (it was retained by acceptedSocket) - if (childSocketQueue) - dispatch_release(childSocketQueue); - - // Release the accepted socket (it should have been retained by the delegate) - [acceptedSocket release]; - - [delegatePool drain]; - }); - } - - return YES; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Connecting -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * This method runs through the various checks required prior to a connection attempt. - * It is shared between the connectToHost and connectToAddress methods. - * -**/ -- (BOOL)preConnectWithInterface:(NSString *)interface error:(NSError **)errPtr -{ - NSAssert(dispatch_get_current_queue() == socketQueue, @"Must be dispatched on socketQueue"); - - if (delegate == nil) // Must have delegate set - { - if (errPtr) - { - NSString *msg = @"Attempting to connect without a delegate. Set a delegate first."; - *errPtr = [self badConfigError:msg]; - } - return NO; - } - - if (delegateQueue == NULL) // Must have delegate queue set - { - if (errPtr) - { - NSString *msg = @"Attempting to connect without a delegate queue. Set a delegate queue first."; - *errPtr = [self badConfigError:msg]; - } - return NO; - } - - if (![self isDisconnected]) // Must be disconnected - { - if (errPtr) - { - NSString *msg = @"Attempting to connect while connected or accepting connections. Disconnect first."; - *errPtr = [self badConfigError:msg]; - } - return NO; - } - - BOOL isIPv4Disabled = (config & kIPv4Disabled) ? YES : NO; - BOOL isIPv6Disabled = (config & kIPv6Disabled) ? YES : NO; - - if (isIPv4Disabled && isIPv6Disabled) // Must have IPv4 or IPv6 enabled - { - if (errPtr) - { - NSString *msg = @"Both IPv4 and IPv6 have been disabled. Must enable at least one protocol first."; - *errPtr = [self badConfigError:msg]; - } - return NO; - } - - if (interface) - { - NSMutableData *interface4 = nil; - NSMutableData *interface6 = nil; - - [self getInterfaceAddress4:&interface4 address6:&interface6 fromDescription:interface port:0]; - - if ((interface4 == nil) && (interface6 == nil)) - { - if (errPtr) - { - NSString *msg = @"Unknown interface. Specify valid interface by name (e.g. \"en1\") or IP address."; - *errPtr = [self badParamError:msg]; - } - return NO; - } - - if (isIPv4Disabled && (interface6 == nil)) - { - if (errPtr) - { - NSString *msg = @"IPv4 has been disabled and specified interface doesn't support IPv6."; - *errPtr = [self badParamError:msg]; - } - return NO; - } - - if (isIPv6Disabled && (interface4 == nil)) - { - if (errPtr) - { - NSString *msg = @"IPv6 has been disabled and specified interface doesn't support IPv4."; - *errPtr = [self badParamError:msg]; - } - return NO; - } - - connectInterface4 = [interface4 retain]; - connectInterface6 = [interface6 retain]; - } - - // Clear queues (spurious read/write requests post disconnect) - [readQueue removeAllObjects]; - [writeQueue removeAllObjects]; - - return YES; -} - -- (BOOL)connectToHost:(NSString*)host onPort:(uint16_t)port error:(NSError **)errPtr -{ - return [self connectToHost:host onPort:port withTimeout:-1 error:errPtr]; -} - -- (BOOL)connectToHost:(NSString *)host - onPort:(uint16_t)port - withTimeout:(NSTimeInterval)timeout - error:(NSError **)errPtr -{ - return [self connectToHost:host onPort:port viaInterface:nil withTimeout:timeout error:errPtr]; -} - -- (BOOL)connectToHost:(NSString *)inHost - onPort:(uint16_t)port - viaInterface:(NSString *)inInterface - withTimeout:(NSTimeInterval)timeout - error:(NSError **)errPtr -{ - LogTrace(); - - // Just in case immutable objects were passed - NSString *host = [[inHost copy] autorelease]; - NSString *interface = [[inInterface copy] autorelease]; - - __block BOOL result = NO; - __block NSError *err = nil; - - dispatch_block_t block = ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - // Check for problems with host parameter - - if ([host length] == 0) - { - NSString *msg = @"Invalid host parameter (nil or \"\"). Should be a domain name or IP address string."; - err = [[self badParamError:msg] retain]; - - [pool drain]; - return_from_block; - } - - // Run through standard pre-connect checks - - if (![self preConnectWithInterface:interface error:&err]) - { - [err retain]; - [pool drain]; - return_from_block; - } - - // We've made it past all the checks. - // It's time to start the connection process. - - flags |= kSocketStarted; - - LogVerbose(@"Dispatching DNS lookup..."); - - // It's possible that the given host parameter is actually a NSMutableString. - // So we want to copy it now, within this block that will be executed synchronously. - // This way the asynchronous lookup block below doesn't have to worry about it changing. - - int aConnectIndex = connectIndex; - NSString *hostCpy = [[host copy] autorelease]; - - dispatch_queue_t globalConcurrentQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); - dispatch_async(globalConcurrentQueue, ^{ - NSAutoreleasePool *lookupPool = [[NSAutoreleasePool alloc] init]; - - [self lookup:aConnectIndex host:hostCpy port:port]; - - [lookupPool drain]; - }); - - [self startConnectTimeout:timeout]; - - result = YES; - [pool drain]; - }; - - if (dispatch_get_current_queue() == socketQueue) - block(); - else - dispatch_sync(socketQueue, block); - - if (result == NO) - { - if (errPtr) - *errPtr = [err autorelease]; - else - [err release]; - } - - return result; -} - -- (BOOL)connectToAddress:(NSData *)remoteAddr error:(NSError **)errPtr -{ - return [self connectToAddress:remoteAddr viaInterface:nil withTimeout:-1 error:errPtr]; -} - -- (BOOL)connectToAddress:(NSData *)remoteAddr withTimeout:(NSTimeInterval)timeout error:(NSError **)errPtr -{ - return [self connectToAddress:remoteAddr viaInterface:nil withTimeout:timeout error:errPtr]; -} - -- (BOOL)connectToAddress:(NSData *)inRemoteAddr - viaInterface:(NSString *)inInterface - withTimeout:(NSTimeInterval)timeout - error:(NSError **)errPtr -{ - LogTrace(); - - // Just in case immutable objects were passed - NSData *remoteAddr = [[inRemoteAddr copy] autorelease]; - NSString *interface = [[inInterface copy] autorelease]; - - __block BOOL result = NO; - __block NSError *err = nil; - - dispatch_block_t block = ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - // Check for problems with remoteAddr parameter - - NSData *address4 = nil; - NSData *address6 = nil; - - if ([remoteAddr length] >= sizeof(struct sockaddr)) - { - const struct sockaddr *sockaddr = (const struct sockaddr *)[remoteAddr bytes]; - - if (sockaddr->sa_family == AF_INET) - { - if ([remoteAddr length] == sizeof(struct sockaddr_in)) - { - address4 = remoteAddr; - } - } - else if (sockaddr->sa_family == AF_INET6) - { - if ([remoteAddr length] == sizeof(struct sockaddr_in6)) - { - address6 = remoteAddr; - } - } - } - - if ((address4 == nil) && (address6 == nil)) - { - NSString *msg = @"A valid IPv4 or IPv6 address was not given"; - err = [[self badParamError:msg] retain]; - - [pool drain]; - return_from_block; - } - - BOOL isIPv4Disabled = (config & kIPv4Disabled) ? YES : NO; - BOOL isIPv6Disabled = (config & kIPv6Disabled) ? YES : NO; - - if (isIPv4Disabled && (address4 != nil)) - { - NSString *msg = @"IPv4 has been disabled and an IPv4 address was passed."; - err = [[self badParamError:msg] retain]; - - [pool drain]; - return_from_block; - } - - if (isIPv6Disabled && (address6 != nil)) - { - NSString *msg = @"IPv6 has been disabled and an IPv6 address was passed."; - err = [[self badParamError:msg] retain]; - - [pool drain]; - return_from_block; - } - - // Run through standard pre-connect checks - - if (![self preConnectWithInterface:interface error:&err]) - { - [err retain]; - [pool drain]; - return_from_block; - } - - // We've made it past all the checks. - // It's time to start the connection process. - - if (![self connectWithAddress4:address4 address6:address6 error:&err]) - { - [err retain]; - [pool drain]; - return_from_block; - } - - flags |= kSocketStarted; - - [self startConnectTimeout:timeout]; - - result = YES; - [pool drain]; - }; - - if (dispatch_get_current_queue() == socketQueue) - block(); - else - dispatch_sync(socketQueue, block); - - if (result == NO) - { - if (errPtr) - *errPtr = [err autorelease]; - else - [err release]; - } - - return result; -} - -- (void)lookup:(int)aConnectIndex host:(NSString *)host port:(uint16_t)port -{ - LogTrace(); - - // This method is executed on a global concurrent queue. - // It posts the results back to the socket queue. - // The lookupIndex is used to ignore the results if the connect operation was cancelled or timed out. - - NSError *error = nil; - - NSData *address4 = nil; - NSData *address6 = nil; - - - if ([host isEqualToString:@"localhost"] || [host isEqualToString:@"loopback"]) - { - // Use LOOPBACK address - struct sockaddr_in nativeAddr; - nativeAddr.sin_len = sizeof(struct sockaddr_in); - nativeAddr.sin_family = AF_INET; - nativeAddr.sin_port = htons(port); - nativeAddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); - memset(&(nativeAddr.sin_zero), 0, sizeof(nativeAddr.sin_zero)); - - struct sockaddr_in6 nativeAddr6; - nativeAddr6.sin6_len = sizeof(struct sockaddr_in6); - nativeAddr6.sin6_family = AF_INET6; - nativeAddr6.sin6_port = htons(port); - nativeAddr6.sin6_flowinfo = 0; - nativeAddr6.sin6_addr = in6addr_loopback; - nativeAddr6.sin6_scope_id = 0; - - // Wrap the native address structures - address4 = [NSData dataWithBytes:&nativeAddr length:sizeof(nativeAddr)]; - address6 = [NSData dataWithBytes:&nativeAddr6 length:sizeof(nativeAddr6)]; - } - else - { - NSString *portStr = [NSString stringWithFormat:@"%hu", port]; - - struct addrinfo hints, *res, *res0; - - memset(&hints, 0, sizeof(hints)); - hints.ai_family = PF_UNSPEC; - hints.ai_socktype = SOCK_STREAM; - hints.ai_protocol = IPPROTO_TCP; - - int gai_error = getaddrinfo([host UTF8String], [portStr UTF8String], &hints, &res0); - - if (gai_error) - { - error = [self gaiError:gai_error]; - } - else - { - for(res = res0; res; res = res->ai_next) - { - if ((address4 == nil) && (res->ai_family == AF_INET)) - { - // Found IPv4 address - // Wrap the native address structure - address4 = [NSData dataWithBytes:res->ai_addr length:res->ai_addrlen]; - } - else if ((address6 == nil) && (res->ai_family == AF_INET6)) - { - // Found IPv6 address - // Wrap the native address structure - address6 = [NSData dataWithBytes:res->ai_addr length:res->ai_addrlen]; - } - } - freeaddrinfo(res0); - - if ((address4 == nil) && (address6 == nil)) - { - error = [self gaiError:EAI_FAIL]; - } - } - } - - if (error) - { - dispatch_async(socketQueue, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - [self lookup:aConnectIndex didFail:error]; - [pool drain]; - }); - } - else - { - dispatch_async(socketQueue, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - [self lookup:aConnectIndex didSucceedWithAddress4:address4 address6:address6]; - [pool drain]; - }); - } -} - -- (void)lookup:(int)aConnectIndex didSucceedWithAddress4:(NSData *)address4 address6:(NSData *)address6 -{ - LogTrace(); - - NSAssert(dispatch_get_current_queue() == socketQueue, @"Must be dispatched on socketQueue"); - NSAssert(address4 || address6, @"Expected at least one valid address"); - - if (aConnectIndex != connectIndex) - { - LogInfo(@"Ignoring lookupDidSucceed, already disconnected"); - - // The connect operation has been cancelled. - // That is, socket was disconnected, or connection has already timed out. - return; - } - - // Check for problems - - BOOL isIPv4Disabled = (config & kIPv4Disabled) ? YES : NO; - BOOL isIPv6Disabled = (config & kIPv6Disabled) ? YES : NO; - - if (isIPv4Disabled && (address6 == nil)) - { - NSString *msg = @"IPv4 has been disabled and DNS lookup found no IPv6 address."; - - [self closeWithError:[self otherError:msg]]; - return; - } - - if (isIPv6Disabled && (address4 == nil)) - { - NSString *msg = @"IPv6 has been disabled and DNS lookup found no IPv4 address."; - - [self closeWithError:[self otherError:msg]]; - return; - } - - // Start the normal connection process - - NSError *err = nil; - if (![self connectWithAddress4:address4 address6:address6 error:&err]) - { - [self closeWithError:err]; - } -} - -/** - * This method is called if the DNS lookup fails. - * This method is executed on the socketQueue. - * - * Since the DNS lookup executed synchronously on a global concurrent queue, - * the original connection request may have already been cancelled or timed-out by the time this method is invoked. - * The lookupIndex tells us whether the lookup is still valid or not. -**/ -- (void)lookup:(int)aConnectIndex didFail:(NSError *)error -{ - LogTrace(); - - NSAssert(dispatch_get_current_queue() == socketQueue, @"Must be dispatched on socketQueue"); - - - if (aConnectIndex != connectIndex) - { - LogInfo(@"Ignoring lookup:didFail: - already disconnected"); - - // The connect operation has been cancelled. - // That is, socket was disconnected, or connection has already timed out. - return; - } - - [self endConnectTimeout]; - [self closeWithError:error]; -} - -- (BOOL)connectWithAddress4:(NSData *)address4 address6:(NSData *)address6 error:(NSError **)errPtr -{ - LogTrace(); - - NSAssert(dispatch_get_current_queue() == socketQueue, @"Must be dispatched on socketQueue"); - - LogVerbose(@"IPv4: %@:%hu", [[self class] hostFromAddress:address4], [[self class] portFromAddress:address4]); - LogVerbose(@"IPv6: %@:%hu", [[self class] hostFromAddress:address6], [[self class] portFromAddress:address6]); - - // Determine socket type - - BOOL preferIPv6 = (config & kPreferIPv6) ? YES : NO; - - BOOL useIPv6 = ((preferIPv6 && address6) || (address4 == nil)); - - // Create the socket - - int socketFD; - NSData *address; - NSData *connectInterface; - - if (useIPv6) - { - LogVerbose(@"Creating IPv6 socket"); - - socket6FD = socket(AF_INET6, SOCK_STREAM, 0); - - socketFD = socket6FD; - address = address6; - connectInterface = connectInterface6; - } - else - { - LogVerbose(@"Creating IPv4 socket"); - - socket4FD = socket(AF_INET, SOCK_STREAM, 0); - - socketFD = socket4FD; - address = address4; - connectInterface = connectInterface4; - } - - if (socketFD == SOCKET_NULL) - { - if (errPtr) - *errPtr = [self errnoErrorWithReason:@"Error in socket() function"]; - - return NO; - } - - // Bind the socket to the desired interface (if needed) - - if (connectInterface) - { - LogVerbose(@"Binding socket..."); - - if ([[self class] portFromAddress:connectInterface] > 0) - { - // Since we're going to be binding to a specific port, - // we should turn on reuseaddr to allow us to override sockets in time_wait. - - int reuseOn = 1; - setsockopt(socketFD, SOL_SOCKET, SO_REUSEADDR, &reuseOn, sizeof(reuseOn)); - } - - const struct sockaddr *interfaceAddr = (const struct sockaddr *)[connectInterface bytes]; - - int result = bind(socketFD, interfaceAddr, (socklen_t)[connectInterface length]); - if (result != 0) - { - if (errPtr) - *errPtr = [self errnoErrorWithReason:@"Error in bind() function"]; - - return NO; - } - } - - // Start the connection process in a background queue - - int aConnectIndex = connectIndex; - - dispatch_queue_t globalConcurrentQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); - dispatch_async(globalConcurrentQueue, ^{ - - int result = connect(socketFD, (const struct sockaddr *)[address bytes], (socklen_t)[address length]); - if (result == 0) - { - dispatch_async(socketQueue, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - [self didConnect:aConnectIndex]; - [pool drain]; - }); - } - else - { - NSError *error = [self errnoErrorWithReason:@"Error in connect() function"]; - - dispatch_async(socketQueue, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - [self didNotConnect:aConnectIndex error:error]; - [pool drain]; - }); - } - }); - - LogVerbose(@"Connecting..."); - - return YES; -} - -- (void)didConnect:(int)aConnectIndex -{ - LogTrace(); - - NSAssert(dispatch_get_current_queue() == socketQueue, @"Must be dispatched on socketQueue"); - - - if (aConnectIndex != connectIndex) - { - LogInfo(@"Ignoring didConnect, already disconnected"); - - // The connect operation has been cancelled. - // That is, socket was disconnected, or connection has already timed out. - return; - } - - flags |= kConnected; - - [self endConnectTimeout]; - - #if TARGET_OS_IPHONE - // The endConnectTimeout method executed above incremented the connectIndex. - aConnectIndex = connectIndex; - #endif - - // Setup read/write streams (as workaround for specific shortcomings in the iOS platform) - // - // Note: - // There may be configuration options that must be set by the delegate before opening the streams. - // The primary example is the kCFStreamNetworkServiceTypeVoIP flag, which only works on an unopened stream. - // - // Thus we wait until after the socket:didConnectToHost:port: delegate method has completed. - // This gives the delegate time to properly configure the streams if needed. - - dispatch_block_t SetupStreamsPart1 = ^{ - #if TARGET_OS_IPHONE - - if (![self createReadAndWriteStream]) - { - [self closeWithError:[self otherError:@"Error creating CFStreams"]]; - return; - } - - if (![self registerForStreamCallbacksIncludingReadWrite:NO]) - { - [self closeWithError:[self otherError:@"Error in CFStreamSetClient"]]; - return; - } - - #endif - }; - dispatch_block_t SetupStreamsPart2 = ^{ - #if TARGET_OS_IPHONE - - if (aConnectIndex != connectIndex) - { - // The socket has been disconnected. - return; - } - - if (![self addStreamsToRunLoop]) - { - [self closeWithError:[self otherError:@"Error in CFStreamScheduleWithRunLoop"]]; - return; - } - - if (![self openStreams]) - { - [self closeWithError:[self otherError:@"Error creating CFStreams"]]; - return; - } - - #endif - }; - - // Notify delegate - - NSString *host = [self connectedHost]; - uint16_t port = [self connectedPort]; - - if (delegateQueue && [delegate respondsToSelector:@selector(socket:didConnectToHost:port:)]) - { - SetupStreamsPart1(); - - id theDelegate = delegate; - - dispatch_async(delegateQueue, ^{ - NSAutoreleasePool *delegatePool = [[NSAutoreleasePool alloc] init]; - - [theDelegate socket:self didConnectToHost:host port:port]; - - dispatch_async(socketQueue, ^{ - NSAutoreleasePool *callbackPool = [[NSAutoreleasePool alloc] init]; - - SetupStreamsPart2(); - - [callbackPool drain]; - }); - - [delegatePool drain]; - }); - } - else - { - SetupStreamsPart1(); - SetupStreamsPart2(); - } - - // Get the connected socket - - int socketFD = (socket4FD != SOCKET_NULL) ? socket4FD : socket6FD; - - // Enable non-blocking IO on the socket - - int result = fcntl(socketFD, F_SETFL, O_NONBLOCK); - if (result == -1) - { - NSString *errMsg = @"Error enabling non-blocking IO on socket (fcntl)"; - [self closeWithError:[self otherError:errMsg]]; - - return; - } - - // Prevent SIGPIPE signals - - int nosigpipe = 1; - setsockopt(socketFD, SOL_SOCKET, SO_NOSIGPIPE, &nosigpipe, sizeof(nosigpipe)); - - // Setup our read/write sources - - [self setupReadAndWriteSourcesForNewlyConnectedSocket:socketFD]; - - // Dequeue any pending read/write requests - - [self maybeDequeueRead]; - [self maybeDequeueWrite]; -} - -- (void)didNotConnect:(int)aConnectIndex error:(NSError *)error -{ - LogTrace(); - - NSAssert(dispatch_get_current_queue() == socketQueue, @"Must be dispatched on socketQueue"); - - - if (aConnectIndex != connectIndex) - { - LogInfo(@"Ignoring didNotConnect, already disconnected"); - - // The connect operation has been cancelled. - // That is, socket was disconnected, or connection has already timed out. - return; - } - - [self endConnectTimeout]; - [self closeWithError:error]; -} - -- (void)startConnectTimeout:(NSTimeInterval)timeout -{ - if (timeout >= 0.0) - { - connectTimer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, socketQueue); - - dispatch_source_set_event_handler(connectTimer, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - [self doConnectTimeout]; - - [pool drain]; - }); - - dispatch_source_t theConnectTimer = connectTimer; - dispatch_source_set_cancel_handler(connectTimer, ^{ - LogVerbose(@"dispatch_release(connectTimer)"); - dispatch_release(theConnectTimer); - }); - - dispatch_time_t tt = dispatch_time(DISPATCH_TIME_NOW, (timeout * NSEC_PER_SEC)); - dispatch_source_set_timer(connectTimer, tt, DISPATCH_TIME_FOREVER, 0); - - dispatch_resume(connectTimer); - } -} - -- (void)endConnectTimeout -{ - LogTrace(); - - if (connectTimer) - { - dispatch_source_cancel(connectTimer); - connectTimer = NULL; - } - - // Increment connectIndex. - // This will prevent us from processing results from any related background asynchronous operations. - // - // Note: This should be called from close method even if connectTimer is NULL. - // This is because one might disconnect a socket prior to a successful connection which had no timeout. - - connectIndex++; - - if (connectInterface4) - { - [connectInterface4 release]; - connectInterface4 = nil; - } - if (connectInterface6) - { - [connectInterface6 release]; - connectInterface6 = nil; - } -} - -- (void)doConnectTimeout -{ - LogTrace(); - - [self endConnectTimeout]; - [self closeWithError:[self connectTimeoutError]]; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Disconnecting -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (void)closeWithError:(NSError *)error -{ - LogTrace(); - - NSAssert(dispatch_get_current_queue() == socketQueue, @"Must be dispatched on socketQueue"); - - - [self endConnectTimeout]; - - if (currentRead != nil) [self endCurrentRead]; - if (currentWrite != nil) [self endCurrentWrite]; - - [readQueue removeAllObjects]; - [writeQueue removeAllObjects]; - - [partialReadBuffer setLength:0]; - - #if TARGET_OS_IPHONE - { - if (readStream || writeStream) - { - [self removeStreamsFromRunLoop]; - - if (readStream) - { - CFReadStreamSetClient(readStream, kCFStreamEventNone, NULL, NULL); - CFReadStreamClose(readStream); - CFRelease(readStream); - readStream = NULL; - } - if (writeStream) - { - CFWriteStreamSetClient(writeStream, kCFStreamEventNone, NULL, NULL); - CFWriteStreamClose(writeStream); - CFRelease(writeStream); - writeStream = NULL; - } - } - } - #else - { - [sslReadBuffer setLength:0]; - if (sslContext) - { - // Getting a linker error here about SSLDisposeContext? - // You need to add the Security Framework to your application. - - SSLDisposeContext(sslContext); - sslContext = NULL; - } - } - #endif - - // For some crazy reason (in my opinion), cancelling a dispatch source doesn't - // invoke the cancel handler if the dispatch source is paused. - // So we have to unpause the source if needed. - // This allows the cancel handler to be run, which in turn releases the source and closes the socket. - - if (accept4Source) - { - LogVerbose(@"dispatch_source_cancel(accept4Source)"); - dispatch_source_cancel(accept4Source); - - // We never suspend accept4Source - - accept4Source = NULL; - } - - if (accept6Source) - { - LogVerbose(@"dispatch_source_cancel(accept6Source)"); - dispatch_source_cancel(accept6Source); - - // We never suspend accept6Source - - accept6Source = NULL; - } - - if (readSource) - { - LogVerbose(@"dispatch_source_cancel(readSource)"); - dispatch_source_cancel(readSource); - - [self resumeReadSource]; - - readSource = NULL; - } - - if (writeSource) - { - LogVerbose(@"dispatch_source_cancel(writeSource)"); - dispatch_source_cancel(writeSource); - - [self resumeWriteSource]; - - writeSource = NULL; - } - - // The sockets will be closed by the cancel handlers of the corresponding source - - socket4FD = SOCKET_NULL; - socket6FD = SOCKET_NULL; - - // If the client has passed the connect/accept method, then the connection has at least begun. - // Notify delegate that it is now ending. - BOOL shouldCallDelegate = (flags & kSocketStarted); - - // Clear stored socket info and all flags (config remains as is) - socketFDBytesAvailable = 0; - flags = 0; - - if (shouldCallDelegate) - { - if (delegateQueue && [delegate respondsToSelector: @selector(socketDidDisconnect:withError:)]) - { - id theDelegate = delegate; - - dispatch_async(delegateQueue, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - [theDelegate socketDidDisconnect:self withError:error]; - - [pool drain]; - }); - } - } -} - -- (void)disconnect -{ - dispatch_block_t block = ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - if (flags & kSocketStarted) - { - [self closeWithError:nil]; - } - - [pool drain]; - }; - - // Synchronous disconnection, as documented in the header file - - if (dispatch_get_current_queue() == socketQueue) - block(); - else - dispatch_sync(socketQueue, block); -} - -- (void)disconnectAfterReading -{ - dispatch_async(socketQueue, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - if (flags & kSocketStarted) - { - flags |= (kForbidReadsWrites | kDisconnectAfterReads); - [self maybeClose]; - } - - [pool drain]; - }); -} - -- (void)disconnectAfterWriting -{ - dispatch_async(socketQueue, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - if (flags & kSocketStarted) - { - flags |= (kForbidReadsWrites | kDisconnectAfterWrites); - [self maybeClose]; - } - - [pool drain]; - }); -} - -- (void)disconnectAfterReadingAndWriting -{ - dispatch_async(socketQueue, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - if (flags & kSocketStarted) - { - flags |= (kForbidReadsWrites | kDisconnectAfterReads | kDisconnectAfterWrites); - [self maybeClose]; - } - - [pool drain]; - }); -} - -/** - * Closes the socket if possible. - * That is, if all writes have completed, and we're set to disconnect after writing, - * or if all reads have completed, and we're set to disconnect after reading. -**/ -- (void)maybeClose -{ - NSAssert(dispatch_get_current_queue() == socketQueue, @"Must be dispatched on socketQueue"); - - BOOL shouldClose = NO; - - if (flags & kDisconnectAfterReads) - { - if (([readQueue count] == 0) && (currentRead == nil)) - { - if (flags & kDisconnectAfterWrites) - { - if (([writeQueue count] == 0) && (currentWrite == nil)) - { - shouldClose = YES; - } - } - else - { - shouldClose = YES; - } - } - } - else if (flags & kDisconnectAfterWrites) - { - if (([writeQueue count] == 0) && (currentWrite == nil)) - { - shouldClose = YES; - } - } - - if (shouldClose) - { - [self closeWithError:nil]; - } -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Errors -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (NSError *)badConfigError:(NSString *)errMsg -{ - NSDictionary *userInfo = [NSDictionary dictionaryWithObject:errMsg forKey:NSLocalizedDescriptionKey]; - - return [NSError errorWithDomain:GCDAsyncSocketErrorDomain code:GCDAsyncSocketBadConfigError userInfo:userInfo]; -} - -- (NSError *)badParamError:(NSString *)errMsg -{ - NSDictionary *userInfo = [NSDictionary dictionaryWithObject:errMsg forKey:NSLocalizedDescriptionKey]; - - return [NSError errorWithDomain:GCDAsyncSocketErrorDomain code:GCDAsyncSocketBadParamError userInfo:userInfo]; -} - -- (NSError *)gaiError:(int)gai_error -{ - NSString *errMsg = [NSString stringWithCString:gai_strerror(gai_error) encoding:NSASCIIStringEncoding]; - NSDictionary *userInfo = [NSDictionary dictionaryWithObject:errMsg forKey:NSLocalizedDescriptionKey]; - - return [NSError errorWithDomain:@"kCFStreamErrorDomainNetDB" code:gai_error userInfo:userInfo]; -} - -- (NSError *)errnoErrorWithReason:(NSString *)reason -{ - NSString *errMsg = [NSString stringWithUTF8String:strerror(errno)]; - NSDictionary *userInfo = [NSDictionary dictionaryWithObjectsAndKeys:errMsg, NSLocalizedDescriptionKey, - reason, NSLocalizedFailureReasonErrorKey, nil]; - - return [NSError errorWithDomain:NSPOSIXErrorDomain code:errno userInfo:userInfo]; -} - -- (NSError *)errnoError -{ - NSString *errMsg = [NSString stringWithUTF8String:strerror(errno)]; - NSDictionary *userInfo = [NSDictionary dictionaryWithObject:errMsg forKey:NSLocalizedDescriptionKey]; - - return [NSError errorWithDomain:NSPOSIXErrorDomain code:errno userInfo:userInfo]; -} - -- (NSError *)sslError:(OSStatus)ssl_error -{ - NSString *msg = @"Error code definition can be found in Apple's SecureTransport.h"; - NSDictionary *userInfo = [NSDictionary dictionaryWithObject:msg forKey:NSLocalizedRecoverySuggestionErrorKey]; - - return [NSError errorWithDomain:@"kCFStreamErrorDomainSSL" code:ssl_error userInfo:userInfo]; -} - -- (NSError *)connectTimeoutError -{ - NSString *errMsg = NSLocalizedStringWithDefaultValue(@"GCDAsyncSocketConnectTimeoutError", - @"GCDAsyncSocket", [NSBundle mainBundle], - @"Attempt to connect to host timed out", nil); - - NSDictionary *userInfo = [NSDictionary dictionaryWithObject:errMsg forKey:NSLocalizedDescriptionKey]; - - return [NSError errorWithDomain:GCDAsyncSocketErrorDomain code:GCDAsyncSocketConnectTimeoutError userInfo:userInfo]; -} - -/** - * Returns a standard AsyncSocket maxed out error. -**/ -- (NSError *)readMaxedOutError -{ - NSString *errMsg = NSLocalizedStringWithDefaultValue(@"GCDAsyncSocketReadMaxedOutError", - @"GCDAsyncSocket", [NSBundle mainBundle], - @"Read operation reached set maximum length", nil); - - NSDictionary *info = [NSDictionary dictionaryWithObject:errMsg forKey:NSLocalizedDescriptionKey]; - - return [NSError errorWithDomain:GCDAsyncSocketErrorDomain code:GCDAsyncSocketReadMaxedOutError userInfo:info]; -} - -/** - * Returns a standard AsyncSocket write timeout error. -**/ -- (NSError *)readTimeoutError -{ - NSString *errMsg = NSLocalizedStringWithDefaultValue(@"GCDAsyncSocketReadTimeoutError", - @"GCDAsyncSocket", [NSBundle mainBundle], - @"Read operation timed out", nil); - - NSDictionary *userInfo = [NSDictionary dictionaryWithObject:errMsg forKey:NSLocalizedDescriptionKey]; - - return [NSError errorWithDomain:GCDAsyncSocketErrorDomain code:GCDAsyncSocketReadTimeoutError userInfo:userInfo]; -} - -/** - * Returns a standard AsyncSocket write timeout error. -**/ -- (NSError *)writeTimeoutError -{ - NSString *errMsg = NSLocalizedStringWithDefaultValue(@"GCDAsyncSocketWriteTimeoutError", - @"GCDAsyncSocket", [NSBundle mainBundle], - @"Write operation timed out", nil); - - NSDictionary *userInfo = [NSDictionary dictionaryWithObject:errMsg forKey:NSLocalizedDescriptionKey]; - - return [NSError errorWithDomain:GCDAsyncSocketErrorDomain code:GCDAsyncSocketWriteTimeoutError userInfo:userInfo]; -} - -- (NSError *)connectionClosedError -{ - NSString *errMsg = NSLocalizedStringWithDefaultValue(@"GCDAsyncSocketClosedError", - @"GCDAsyncSocket", [NSBundle mainBundle], - @"Socket closed by remote peer", nil); - - NSDictionary *userInfo = [NSDictionary dictionaryWithObject:errMsg forKey:NSLocalizedDescriptionKey]; - - return [NSError errorWithDomain:GCDAsyncSocketErrorDomain code:GCDAsyncSocketClosedError userInfo:userInfo]; -} - -- (NSError *)otherError:(NSString *)errMsg -{ - NSDictionary *userInfo = [NSDictionary dictionaryWithObject:errMsg forKey:NSLocalizedDescriptionKey]; - - return [NSError errorWithDomain:GCDAsyncSocketErrorDomain code:GCDAsyncSocketOtherError userInfo:userInfo]; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Diagnostics -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (BOOL)isDisconnected -{ - __block BOOL result = NO; - - dispatch_block_t block = ^{ - result = (flags & kSocketStarted) ? NO : YES; - }; - - if (dispatch_get_current_queue() == socketQueue) - block(); - else - dispatch_sync(socketQueue, block); - - return result; -} - -- (BOOL)isConnected -{ - __block BOOL result = NO; - - dispatch_block_t block = ^{ - result = (flags & kConnected) ? YES : NO; - }; - - if (dispatch_get_current_queue() == socketQueue) - block(); - else - dispatch_sync(socketQueue, block); - - return result; -} - -- (NSString *)connectedHost -{ - if (dispatch_get_current_queue() == socketQueue) - { - if (socket4FD != SOCKET_NULL) - return [self connectedHostFromSocket4:socket4FD]; - if (socket6FD != SOCKET_NULL) - return [self connectedHostFromSocket6:socket6FD]; - - return nil; - } - else - { - __block NSString *result = nil; - - dispatch_sync(socketQueue, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - if (socket4FD != SOCKET_NULL) - result = [[self connectedHostFromSocket4:socket4FD] retain]; - else if (socket6FD != SOCKET_NULL) - result = [[self connectedHostFromSocket6:socket6FD] retain]; - - [pool drain]; - }); - - return [result autorelease]; - } -} - -- (uint16_t)connectedPort -{ - if (dispatch_get_current_queue() == socketQueue) - { - if (socket4FD != SOCKET_NULL) - return [self connectedPortFromSocket4:socket4FD]; - if (socket6FD != SOCKET_NULL) - return [self connectedPortFromSocket6:socket6FD]; - - return 0; - } - else - { - __block uint16_t result = 0; - - dispatch_sync(socketQueue, ^{ - // No need for autorelease pool - - if (socket4FD != SOCKET_NULL) - result = [self connectedPortFromSocket4:socket4FD]; - else if (socket6FD != SOCKET_NULL) - result = [self connectedPortFromSocket6:socket6FD]; - }); - - return result; - } -} - -- (NSString *)localHost -{ - if (dispatch_get_current_queue() == socketQueue) - { - if (socket4FD != SOCKET_NULL) - return [self localHostFromSocket4:socket4FD]; - if (socket6FD != SOCKET_NULL) - return [self localHostFromSocket6:socket6FD]; - - return nil; - } - else - { - __block NSString *result = nil; - - dispatch_sync(socketQueue, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - if (socket4FD != SOCKET_NULL) - result = [[self localHostFromSocket4:socket4FD] retain]; - else if (socket6FD != SOCKET_NULL) - result = [[self localHostFromSocket6:socket6FD] retain]; - - [pool drain]; - }); - - return [result autorelease]; - } -} - -- (uint16_t)localPort -{ - if (dispatch_get_current_queue() == socketQueue) - { - if (socket4FD != SOCKET_NULL) - return [self localPortFromSocket4:socket4FD]; - if (socket6FD != SOCKET_NULL) - return [self localPortFromSocket6:socket6FD]; - - return 0; - } - else - { - __block uint16_t result = 0; - - dispatch_sync(socketQueue, ^{ - // No need for autorelease pool - - if (socket4FD != SOCKET_NULL) - result = [self localPortFromSocket4:socket4FD]; - else if (socket6FD != SOCKET_NULL) - result = [self localPortFromSocket6:socket6FD]; - }); - - return result; - } -} - -- (NSString *)connectedHost4 -{ - if (socket4FD != SOCKET_NULL) - return [self connectedHostFromSocket4:socket4FD]; - - return nil; -} - -- (NSString *)connectedHost6 -{ - if (socket6FD != SOCKET_NULL) - return [self connectedHostFromSocket6:socket6FD]; - - return nil; -} - -- (uint16_t)connectedPort4 -{ - if (socket4FD != SOCKET_NULL) - return [self connectedPortFromSocket4:socket4FD]; - - return 0; -} - -- (uint16_t)connectedPort6 -{ - if (socket6FD != SOCKET_NULL) - return [self connectedPortFromSocket6:socket6FD]; - - return 0; -} - -- (NSString *)localHost4 -{ - if (socket4FD != SOCKET_NULL) - return [self localHostFromSocket4:socket4FD]; - - return nil; -} - -- (NSString *)localHost6 -{ - if (socket6FD != SOCKET_NULL) - return [self localHostFromSocket6:socket6FD]; - - return nil; -} - -- (uint16_t)localPort4 -{ - if (socket4FD != SOCKET_NULL) - return [self localPortFromSocket4:socket4FD]; - - return 0; -} - -- (uint16_t)localPort6 -{ - if (socket6FD != SOCKET_NULL) - return [self localPortFromSocket6:socket6FD]; - - return 0; -} - -- (NSString *)connectedHostFromSocket4:(int)socketFD -{ - struct sockaddr_in sockaddr4; - socklen_t sockaddr4len = sizeof(sockaddr4); - - if (getpeername(socketFD, (struct sockaddr *)&sockaddr4, &sockaddr4len) < 0) - { - return nil; - } - return [[self class] hostFromSockaddr4:&sockaddr4]; -} - -- (NSString *)connectedHostFromSocket6:(int)socketFD -{ - struct sockaddr_in6 sockaddr6; - socklen_t sockaddr6len = sizeof(sockaddr6); - - if (getpeername(socketFD, (struct sockaddr *)&sockaddr6, &sockaddr6len) < 0) - { - return nil; - } - return [[self class] hostFromSockaddr6:&sockaddr6]; -} - -- (uint16_t)connectedPortFromSocket4:(int)socketFD -{ - struct sockaddr_in sockaddr4; - socklen_t sockaddr4len = sizeof(sockaddr4); - - if (getpeername(socketFD, (struct sockaddr *)&sockaddr4, &sockaddr4len) < 0) - { - return 0; - } - return [[self class] portFromSockaddr4:&sockaddr4]; -} - -- (uint16_t)connectedPortFromSocket6:(int)socketFD -{ - struct sockaddr_in6 sockaddr6; - socklen_t sockaddr6len = sizeof(sockaddr6); - - if (getpeername(socketFD, (struct sockaddr *)&sockaddr6, &sockaddr6len) < 0) - { - return 0; - } - return [[self class] portFromSockaddr6:&sockaddr6]; -} - -- (NSString *)localHostFromSocket4:(int)socketFD -{ - struct sockaddr_in sockaddr4; - socklen_t sockaddr4len = sizeof(sockaddr4); - - if (getsockname(socketFD, (struct sockaddr *)&sockaddr4, &sockaddr4len) < 0) - { - return nil; - } - return [[self class] hostFromSockaddr4:&sockaddr4]; -} - -- (NSString *)localHostFromSocket6:(int)socketFD -{ - struct sockaddr_in6 sockaddr6; - socklen_t sockaddr6len = sizeof(sockaddr6); - - if (getsockname(socketFD, (struct sockaddr *)&sockaddr6, &sockaddr6len) < 0) - { - return nil; - } - return [[self class] hostFromSockaddr6:&sockaddr6]; -} - -- (uint16_t)localPortFromSocket4:(int)socketFD -{ - struct sockaddr_in sockaddr4; - socklen_t sockaddr4len = sizeof(sockaddr4); - - if (getsockname(socketFD, (struct sockaddr *)&sockaddr4, &sockaddr4len) < 0) - { - return 0; - } - return [[self class] portFromSockaddr4:&sockaddr4]; -} - -- (uint16_t)localPortFromSocket6:(int)socketFD -{ - struct sockaddr_in6 sockaddr6; - socklen_t sockaddr6len = sizeof(sockaddr6); - - if (getsockname(socketFD, (struct sockaddr *)&sockaddr6, &sockaddr6len) < 0) - { - return 0; - } - return [[self class] portFromSockaddr6:&sockaddr6]; -} - -- (NSData *)connectedAddress -{ - __block NSData *result = nil; - - dispatch_block_t block = ^{ - if (socket4FD != SOCKET_NULL) - { - struct sockaddr_in sockaddr4; - socklen_t sockaddr4len = sizeof(sockaddr4); - - if (getpeername(socket4FD, (struct sockaddr *)&sockaddr4, &sockaddr4len) == 0) - { - result = [[NSData alloc] initWithBytes:&sockaddr4 length:sockaddr4len]; - } - } - - if (socket6FD != SOCKET_NULL) - { - struct sockaddr_in6 sockaddr6; - socklen_t sockaddr6len = sizeof(sockaddr6); - - if (getpeername(socket6FD, (struct sockaddr *)&sockaddr6, &sockaddr6len) == 0) - { - result = [[NSData alloc] initWithBytes:&sockaddr6 length:sockaddr6len]; - } - } - }; - - if (dispatch_get_current_queue() == socketQueue) - block(); - else - dispatch_sync(socketQueue, block); - - return [result autorelease]; -} - -- (NSData *)localAddress -{ - __block NSData *result = nil; - - dispatch_block_t block = ^{ - if (socket4FD != SOCKET_NULL) - { - struct sockaddr_in sockaddr4; - socklen_t sockaddr4len = sizeof(sockaddr4); - - if (getsockname(socket4FD, (struct sockaddr *)&sockaddr4, &sockaddr4len) == 0) - { - result = [[NSData alloc] initWithBytes:&sockaddr4 length:sockaddr4len]; - } - } - - if (socket6FD != SOCKET_NULL) - { - struct sockaddr_in6 sockaddr6; - socklen_t sockaddr6len = sizeof(sockaddr6); - - if (getsockname(socket6FD, (struct sockaddr *)&sockaddr6, &sockaddr6len) == 0) - { - result = [[NSData alloc] initWithBytes:&sockaddr6 length:sockaddr6len]; - } - } - }; - - if (dispatch_get_current_queue() == socketQueue) - block(); - else - dispatch_sync(socketQueue, block); - - return [result autorelease]; -} - -- (BOOL)isIPv4 -{ - if (dispatch_get_current_queue() == socketQueue) - { - return (socket4FD != SOCKET_NULL); - } - else - { - __block BOOL result = NO; - - dispatch_sync(socketQueue, ^{ - result = (socket4FD != SOCKET_NULL); - }); - - return result; - } -} - -- (BOOL)isIPv6 -{ - if (dispatch_get_current_queue() == socketQueue) - { - return (socket6FD != SOCKET_NULL); - } - else - { - __block BOOL result = NO; - - dispatch_sync(socketQueue, ^{ - result = (socket6FD != SOCKET_NULL); - }); - - return result; - } -} - -- (BOOL)isSecure -{ - if (dispatch_get_current_queue() == socketQueue) - { - return (flags & kSocketSecure) ? YES : NO; - } - else - { - __block BOOL result; - - dispatch_sync(socketQueue, ^{ - result = (flags & kSocketSecure) ? YES : NO; - }); - - return result; - } -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Utilities -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * Finds the address of an interface description. - * An inteface description may be an interface name (en0, en1, lo0) or corresponding IP (192.168.4.34). - * - * The interface description may optionally contain a port number at the end, separated by a colon. - * If a non-zero port parameter is provided, any port number in the interface description is ignored. - * - * The returned value is a 'struct sockaddr' wrapped in an NSMutableData object. -**/ -- (void)getInterfaceAddress4:(NSMutableData **)interfaceAddr4Ptr - address6:(NSMutableData **)interfaceAddr6Ptr - fromDescription:(NSString *)interfaceDescription - port:(uint16_t)port -{ - NSMutableData *addr4 = nil; - NSMutableData *addr6 = nil; - - NSString *interface = nil; - - NSArray *components = [interfaceDescription componentsSeparatedByString:@":"]; - if ([components count] > 0) - { - NSString *temp = [components objectAtIndex:0]; - if ([temp length] > 0) - { - interface = temp; - } - } - if ([components count] > 1 && port == 0) - { - long portL = strtol([[components objectAtIndex:1] UTF8String], NULL, 10); - - if (portL > 0 && portL <= UINT16_MAX) - { - port = (uint16_t)portL; - } - } - - if (interface == nil) - { - // ANY address - - struct sockaddr_in sockaddr4; - memset(&sockaddr4, 0, sizeof(sockaddr4)); - - sockaddr4.sin_len = sizeof(sockaddr4); - sockaddr4.sin_family = AF_INET; - sockaddr4.sin_port = htons(port); - sockaddr4.sin_addr.s_addr = htonl(INADDR_ANY); - - struct sockaddr_in6 sockaddr6; - memset(&sockaddr6, 0, sizeof(sockaddr6)); - - sockaddr6.sin6_len = sizeof(sockaddr6); - sockaddr6.sin6_family = AF_INET6; - sockaddr6.sin6_port = htons(port); - sockaddr6.sin6_addr = in6addr_any; - - addr4 = [NSMutableData dataWithBytes:&sockaddr4 length:sizeof(sockaddr4)]; - addr6 = [NSMutableData dataWithBytes:&sockaddr6 length:sizeof(sockaddr6)]; - } - else if ([interface isEqualToString:@"localhost"] || [interface isEqualToString:@"loopback"]) - { - // LOOPBACK address - - struct sockaddr_in sockaddr4; - memset(&sockaddr4, 0, sizeof(sockaddr4)); - - sockaddr4.sin_len = sizeof(sockaddr4); - sockaddr4.sin_family = AF_INET; - sockaddr4.sin_port = htons(port); - sockaddr4.sin_addr.s_addr = htonl(INADDR_LOOPBACK); - - struct sockaddr_in6 sockaddr6; - memset(&sockaddr6, 0, sizeof(sockaddr6)); - - sockaddr6.sin6_len = sizeof(sockaddr6); - sockaddr6.sin6_family = AF_INET6; - sockaddr6.sin6_port = htons(port); - sockaddr6.sin6_addr = in6addr_loopback; - - addr4 = [NSMutableData dataWithBytes:&sockaddr4 length:sizeof(sockaddr4)]; - addr6 = [NSMutableData dataWithBytes:&sockaddr6 length:sizeof(sockaddr6)]; - } - else - { - const char *iface = [interface UTF8String]; - - struct ifaddrs *addrs; - const struct ifaddrs *cursor; - - if ((getifaddrs(&addrs) == 0)) - { - cursor = addrs; - while (cursor != NULL) - { - if ((addr4 == nil) && (cursor->ifa_addr->sa_family == AF_INET)) - { - // IPv4 - - struct sockaddr_in nativeAddr4; - memcpy(&nativeAddr4, cursor->ifa_addr, sizeof(nativeAddr4)); - - if (strcmp(cursor->ifa_name, iface) == 0) - { - // Name match - - nativeAddr4.sin_port = htons(port); - - addr4 = [NSMutableData dataWithBytes:&nativeAddr4 length:sizeof(nativeAddr4)]; - } - else - { - char ip[INET_ADDRSTRLEN]; - - const char *conversion = inet_ntop(AF_INET, &nativeAddr4.sin_addr, ip, sizeof(ip)); - - if ((conversion != NULL) && (strcmp(ip, iface) == 0)) - { - // IP match - - nativeAddr4.sin_port = htons(port); - - addr4 = [NSMutableData dataWithBytes:&nativeAddr4 length:sizeof(nativeAddr4)]; - } - } - } - else if ((addr6 == nil) && (cursor->ifa_addr->sa_family == AF_INET6)) - { - // IPv6 - - struct sockaddr_in6 nativeAddr6; - memcpy(&nativeAddr6, cursor->ifa_addr, sizeof(nativeAddr6)); - - if (strcmp(cursor->ifa_name, iface) == 0) - { - // Name match - - nativeAddr6.sin6_port = htons(port); - - addr6 = [NSMutableData dataWithBytes:&nativeAddr6 length:sizeof(nativeAddr6)]; - } - else - { - char ip[INET6_ADDRSTRLEN]; - - const char *conversion = inet_ntop(AF_INET6, &nativeAddr6.sin6_addr, ip, sizeof(ip)); - - if ((conversion != NULL) && (strcmp(ip, iface) == 0)) - { - // IP match - - nativeAddr6.sin6_port = htons(port); - - addr6 = [NSMutableData dataWithBytes:&nativeAddr6 length:sizeof(nativeAddr6)]; - } - } - } - - cursor = cursor->ifa_next; - } - - freeifaddrs(addrs); - } - } - - if (interfaceAddr4Ptr) *interfaceAddr4Ptr = addr4; - if (interfaceAddr6Ptr) *interfaceAddr6Ptr = addr6; -} - -- (void)setupReadAndWriteSourcesForNewlyConnectedSocket:(int)socketFD -{ - readSource = dispatch_source_create(DISPATCH_SOURCE_TYPE_READ, socketFD, 0, socketQueue); - writeSource = dispatch_source_create(DISPATCH_SOURCE_TYPE_WRITE, socketFD, 0, socketQueue); - - // Setup event handlers - - dispatch_source_set_event_handler(readSource, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - LogVerbose(@"readEventBlock"); - - socketFDBytesAvailable = dispatch_source_get_data(readSource); - LogVerbose(@"socketFDBytesAvailable: %lu", socketFDBytesAvailable); - - if (socketFDBytesAvailable > 0) - [self doReadData]; - else - [self doReadEOF]; - - [pool drain]; - }); - - dispatch_source_set_event_handler(writeSource, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - LogVerbose(@"writeEventBlock"); - - flags |= kSocketCanAcceptBytes; - [self doWriteData]; - - [pool drain]; - }); - - // Setup cancel handlers - - __block int socketFDRefCount = 2; - - dispatch_source_t theReadSource = readSource; - dispatch_source_t theWriteSource = writeSource; - - dispatch_source_set_cancel_handler(readSource, ^{ - - LogVerbose(@"readCancelBlock"); - - LogVerbose(@"dispatch_release(readSource)"); - dispatch_release(theReadSource); - - if (--socketFDRefCount == 0) - { - LogVerbose(@"close(socketFD)"); - close(socketFD); - } - }); - - dispatch_source_set_cancel_handler(writeSource, ^{ - - LogVerbose(@"writeCancelBlock"); - - LogVerbose(@"dispatch_release(writeSource)"); - dispatch_release(theWriteSource); - - if (--socketFDRefCount == 0) - { - LogVerbose(@"close(socketFD)"); - close(socketFD); - } - }); - - // We will not be able to read until data arrives. - // But we should be able to write immediately. - - socketFDBytesAvailable = 0; - flags &= ~kReadSourceSuspended; - - LogVerbose(@"dispatch_resume(readSource)"); - dispatch_resume(readSource); - - flags |= kSocketCanAcceptBytes; - flags |= kWriteSourceSuspended; -} - -- (BOOL)usingCFStream -{ - #if TARGET_OS_IPHONE - - if (flags & kSocketSecure) - { - // Due to the fact that Apple doesn't give us the full power of SecureTransport on iOS, - // we are relegated to using the slower, less powerful, and RunLoop based CFStream API. :( Boo! - // - // Thus we're not able to use the GCD read/write sources in this particular scenario. - - return YES; - } - - #endif - - return NO; -} - -- (void)suspendReadSource -{ - if (!(flags & kReadSourceSuspended)) - { - LogVerbose(@"dispatch_suspend(readSource)"); - - dispatch_suspend(readSource); - flags |= kReadSourceSuspended; - } -} - -- (void)resumeReadSource -{ - if (flags & kReadSourceSuspended) - { - LogVerbose(@"dispatch_resume(readSource)"); - - dispatch_resume(readSource); - flags &= ~kReadSourceSuspended; - } -} - -- (void)suspendWriteSource -{ - if (!(flags & kWriteSourceSuspended)) - { - LogVerbose(@"dispatch_suspend(writeSource)"); - - dispatch_suspend(writeSource); - flags |= kWriteSourceSuspended; - } -} - -- (void)resumeWriteSource -{ - if (flags & kWriteSourceSuspended) - { - LogVerbose(@"dispatch_resume(writeSource)"); - - dispatch_resume(writeSource); - flags &= ~kWriteSourceSuspended; - } -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Reading -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (void)readDataWithTimeout:(NSTimeInterval)timeout tag:(long)tag -{ - [self readDataWithTimeout:timeout buffer:nil bufferOffset:0 maxLength:0 tag:tag]; -} - -- (void)readDataWithTimeout:(NSTimeInterval)timeout - buffer:(NSMutableData *)buffer - bufferOffset:(NSUInteger)offset - tag:(long)tag -{ - [self readDataWithTimeout:timeout buffer:buffer bufferOffset:offset maxLength:0 tag:tag]; -} - -- (void)readDataWithTimeout:(NSTimeInterval)timeout - buffer:(NSMutableData *)buffer - bufferOffset:(NSUInteger)offset - maxLength:(NSUInteger)length - tag:(long)tag -{ - if (offset > [buffer length]) { - LogWarn(@"Cannot read: offset > [buffer length]"); - return; - } - - GCDAsyncReadPacket *packet = [[GCDAsyncReadPacket alloc] initWithData:buffer - startOffset:offset - maxLength:length - timeout:timeout - readLength:0 - terminator:nil - tag:tag]; - - dispatch_async(socketQueue, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - LogTrace(); - - if ((flags & kSocketStarted) && !(flags & kForbidReadsWrites)) - { - [readQueue addObject:packet]; - [self maybeDequeueRead]; - } - - [pool drain]; - }); - - // Do not rely on the block being run in order to release the packet, - // as the queue might get released without the block completing. - [packet release]; -} - -- (void)readDataToLength:(NSUInteger)length withTimeout:(NSTimeInterval)timeout tag:(long)tag -{ - [self readDataToLength:length withTimeout:timeout buffer:nil bufferOffset:0 tag:tag]; -} - -- (void)readDataToLength:(NSUInteger)length - withTimeout:(NSTimeInterval)timeout - buffer:(NSMutableData *)buffer - bufferOffset:(NSUInteger)offset - tag:(long)tag -{ - if (length == 0) { - LogWarn(@"Cannot read: length == 0"); - return; - } - if (offset > [buffer length]) { - LogWarn(@"Cannot read: offset > [buffer length]"); - return; - } - - GCDAsyncReadPacket *packet = [[GCDAsyncReadPacket alloc] initWithData:buffer - startOffset:offset - maxLength:0 - timeout:timeout - readLength:length - terminator:nil - tag:tag]; - - dispatch_async(socketQueue, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - LogTrace(); - - if ((flags & kSocketStarted) && !(flags & kForbidReadsWrites)) - { - [readQueue addObject:packet]; - [self maybeDequeueRead]; - } - - [pool drain]; - }); - - // Do not rely on the block being run in order to release the packet, - // as the queue might get released without the block completing. - [packet release]; -} - -- (void)readDataToData:(NSData *)data withTimeout:(NSTimeInterval)timeout tag:(long)tag -{ - [self readDataToData:data withTimeout:timeout buffer:nil bufferOffset:0 maxLength:0 tag:tag]; -} - -- (void)readDataToData:(NSData *)data - withTimeout:(NSTimeInterval)timeout - buffer:(NSMutableData *)buffer - bufferOffset:(NSUInteger)offset - tag:(long)tag -{ - [self readDataToData:data withTimeout:timeout buffer:buffer bufferOffset:offset maxLength:0 tag:tag]; -} - -- (void)readDataToData:(NSData *)data withTimeout:(NSTimeInterval)timeout maxLength:(NSUInteger)length tag:(long)tag -{ - [self readDataToData:data withTimeout:timeout buffer:nil bufferOffset:0 maxLength:length tag:tag]; -} - -- (void)readDataToData:(NSData *)data - withTimeout:(NSTimeInterval)timeout - buffer:(NSMutableData *)buffer - bufferOffset:(NSUInteger)offset - maxLength:(NSUInteger)maxLength - tag:(long)tag -{ - if ([data length] == 0) { - LogWarn(@"Cannot read: [data length] == 0"); - return; - } - if (offset > [buffer length]) { - LogWarn(@"Cannot read: offset > [buffer length]"); - return; - } - if (maxLength > 0 && maxLength < [data length]) { - LogWarn(@"Cannot read: maxLength > 0 && maxLength < [data length]"); - return; - } - - GCDAsyncReadPacket *packet = [[GCDAsyncReadPacket alloc] initWithData:buffer - startOffset:offset - maxLength:maxLength - timeout:timeout - readLength:0 - terminator:data - tag:tag]; - - dispatch_async(socketQueue, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - LogTrace(); - - if ((flags & kSocketStarted) && !(flags & kForbidReadsWrites)) - { - [readQueue addObject:packet]; - [self maybeDequeueRead]; - } - - [pool drain]; - }); - - // Do not rely on the block being run in order to release the packet, - // as the queue might get released without the block completing. - [packet release]; -} - -/** - * This method starts a new read, if needed. - * - * It is called when: - * - a user requests a read - * - after a read request has finished (to handle the next request) - * - immediately after the socket opens to handle any pending requests - * - * This method also handles auto-disconnect post read/write completion. -**/ -- (void)maybeDequeueRead -{ - LogTrace(); - NSAssert(dispatch_get_current_queue() == socketQueue, @"Must be dispatched on socketQueue"); - - // If we're not currently processing a read AND we have an available read stream - if ((currentRead == nil) && (flags & kConnected)) - { - if ([readQueue count] > 0) - { - // Dequeue the next object in the write queue - currentRead = [[readQueue objectAtIndex:0] retain]; - [readQueue removeObjectAtIndex:0]; - - - if ([currentRead isKindOfClass:[GCDAsyncSpecialPacket class]]) - { - LogVerbose(@"Dequeued GCDAsyncSpecialPacket"); - - // Attempt to start TLS - flags |= kStartingReadTLS; - - // This method won't do anything unless both kStartingReadTLS and kStartingWriteTLS are set - [self maybeStartTLS]; - } - else - { - LogVerbose(@"Dequeued GCDAsyncReadPacket"); - - // Setup read timer (if needed) - [self setupReadTimerWithTimeout:currentRead->timeout]; - - // Immediately read, if possible - [self doReadData]; - } - } - else if (flags & kDisconnectAfterReads) - { - if (flags & kDisconnectAfterWrites) - { - if (([writeQueue count] == 0) && (currentWrite == nil)) - { - [self closeWithError:nil]; - } - } - else - { - [self closeWithError:nil]; - } - } - else if (flags & kSocketSecure) - { - [self flushSSLBuffers]; - - // Edge case: - // - // We just drained all data from the ssl buffers, - // and all known data from the socket (socketFDBytesAvailable). - // - // If we didn't get any data from this process, - // then we may have reached the end of the TCP stream. - // - // Be sure callbacks are enabled so we're notified about a disconnection. - - if ([partialReadBuffer length] == 0) - { - if ([self usingCFStream]) { - // Callbacks never disabled - } - else { - [self resumeReadSource]; - } - } - } - } -} - -- (void)flushSSLBuffers -{ - LogTrace(); - - NSAssert((flags & kSocketSecure), @"Cannot flush ssl buffers on non-secure socket"); - - if ([partialReadBuffer length] > 0) - { - // Only flush the ssl buffers if the partialReadBuffer is empty. - // This is to avoid growing the partialReadBuffer inifinitely large. - - return; - } - -#if TARGET_OS_IPHONE - - if ((flags & kSecureSocketHasBytesAvailable) && CFReadStreamHasBytesAvailable(readStream)) - { - LogVerbose(@"%@ - Flushing ssl buffers into partialReadBuffer...", THIS_METHOD); - - CFIndex defaultBytesToRead = (1024 * 16); - - NSUInteger partialReadBufferOffset = [partialReadBuffer length]; - [partialReadBuffer increaseLengthBy:defaultBytesToRead]; - - uint8_t *buffer = [partialReadBuffer mutableBytes] + partialReadBufferOffset; - - CFIndex result = CFReadStreamRead(readStream, buffer, defaultBytesToRead); - LogVerbose(@"%@ - CFReadStreamRead(): result = %i", THIS_METHOD, (int)result); - - if (result <= 0) - { - [partialReadBuffer setLength:partialReadBufferOffset]; - } - else - { - [partialReadBuffer setLength:(partialReadBufferOffset + result)]; - } - - flags &= ~kSecureSocketHasBytesAvailable; - } - -#else - - __block NSUInteger estimatedBytesAvailable; - - dispatch_block_t updateEstimatedBytesAvailable = ^{ - - // Figure out if there is any data available to be read - // - // socketFDBytesAvailable <- Number of encrypted bytes we haven't read from the bsd socket - // [sslReadBuffer length] <- Number of encrypted bytes we've buffered from bsd socket - // sslInternalBufSize <- Number od decrypted bytes SecureTransport has buffered - // - // We call the variable "estimated" because we don't know how many decrypted bytes we'll get - // from the encrypted bytes in the sslReadBuffer. - // However, we do know this is an upper bound on the estimation. - - estimatedBytesAvailable = socketFDBytesAvailable + [sslReadBuffer length]; - - size_t sslInternalBufSize = 0; - SSLGetBufferedReadSize(sslContext, &sslInternalBufSize); - - estimatedBytesAvailable += sslInternalBufSize; - }; - - updateEstimatedBytesAvailable(); - - if (estimatedBytesAvailable > 0) - { - LogVerbose(@"%@ - Flushing ssl buffers into partialReadBuffer...", THIS_METHOD); - - BOOL done = NO; - do - { - LogVerbose(@"%@ - estimatedBytesAvailable = %lu", THIS_METHOD, (unsigned long)estimatedBytesAvailable); - - // Make room in the partialReadBuffer - - NSUInteger partialReadBufferOffset = [partialReadBuffer length]; - [partialReadBuffer increaseLengthBy:estimatedBytesAvailable]; - - uint8_t *buffer = (uint8_t *)[partialReadBuffer mutableBytes] + partialReadBufferOffset; - size_t bytesRead = 0; - - // Read data into partialReadBuffer - - OSStatus result = SSLRead(sslContext, buffer, (size_t)estimatedBytesAvailable, &bytesRead); - LogVerbose(@"%@ - read from secure socket = %u", THIS_METHOD, (unsigned)bytesRead); - - [partialReadBuffer setLength:(partialReadBufferOffset + bytesRead)]; - LogVerbose(@"%@ - partialReadBuffer.length = %lu", THIS_METHOD, (unsigned long)[partialReadBuffer length]); - - if (result != noErr) - { - done = YES; - } - else - { - updateEstimatedBytesAvailable(); - } - - } while (!done && estimatedBytesAvailable > 0); - } - -#endif -} - -- (void)doReadData -{ - LogTrace(); - - // This method is called on the socketQueue. - // It might be called directly, or via the readSource when data is available to be read. - - if ((currentRead == nil) || (flags & kReadsPaused)) - { - LogVerbose(@"No currentRead or kReadsPaused"); - - // Unable to read at this time - - if (flags & kSocketSecure) - { - // Here's the situation: - // - // We have an established secure connection. - // There may not be a currentRead, but there might be encrypted data sitting around for us. - // When the user does get around to issuing a read, that encrypted data will need to be decrypted. - // - // So why make the user wait? - // We might as well get a head start on decrypting some data now. - // - // The other reason we do this has to do with detecting a socket disconnection. - // The SSL/TLS protocol has it's own disconnection handshake. - // So when a secure socket is closed, a "goodbye" packet comes across the wire. - // We want to make sure we read the "goodbye" packet so we can properly detect the TCP disconnection. - - [self flushSSLBuffers]; - } - - if ([self usingCFStream]) - { - // CFReadStream only fires once when there is available data. - // It won't fire again until we've invoked CFReadStreamRead. - } - else - { - // If the readSource is firing, we need to pause it - // or else it will continue to fire over and over again. - // - // If the readSource is not firing, - // we want it to continue monitoring the socket. - - if (socketFDBytesAvailable > 0) - { - [self suspendReadSource]; - } - } - return; - } - - BOOL hasBytesAvailable; - unsigned long estimatedBytesAvailable; - - #if TARGET_OS_IPHONE - if (flags & kSocketSecure) - { - // Relegated to using CFStream... :( Boo! Give us SecureTransport Apple! - - estimatedBytesAvailable = 0; - if ((flags & kSecureSocketHasBytesAvailable) && CFReadStreamHasBytesAvailable(readStream)) - hasBytesAvailable = YES; - else - hasBytesAvailable = NO; - } - else - { - estimatedBytesAvailable = socketFDBytesAvailable; - hasBytesAvailable = (estimatedBytesAvailable > 0); - - } - #else - - estimatedBytesAvailable = socketFDBytesAvailable; - - if (flags & kSocketSecure) - { - // There are 2 buffers to be aware of here. - // - // We are using SecureTransport, a TLS/SSL security layer which sits atop TCP. - // We issue a read to the SecureTranport API, which in turn issues a read to our SSLReadFunction. - // Our SSLReadFunction then reads from the BSD socket and returns the encrypted data to SecureTransport. - // SecureTransport then decrypts the data, and finally returns the decrypted data back to us. - // - // The first buffer is one we create. - // SecureTransport often requests small amounts of data. - // This has to do with the encypted packets that are coming across the TCP stream. - // But it's non-optimal to do a bunch of small reads from the BSD socket. - // So our SSLReadFunction reads all available data from the socket (optimizing the sys call) - // and may store excess in the sslReadBuffer. - - estimatedBytesAvailable += [sslReadBuffer length]; - - // The second buffer is within SecureTransport. - // As mentioned earlier, there are encrypted packets coming across the TCP stream. - // SecureTransport needs the entire packet to decrypt it. - // But if the entire packet produces X bytes of decrypted data, - // and we only asked SecureTransport for X/2 bytes of data, - // it must store the extra X/2 bytes of decrypted data for the next read. - // - // The SSLGetBufferedReadSize function will tell us the size of this internal buffer. - // From the documentation: - // - // "This function does not block or cause any low-level read operations to occur." - - size_t sslInternalBufSize = 0; - SSLGetBufferedReadSize(sslContext, &sslInternalBufSize); - - estimatedBytesAvailable += sslInternalBufSize; - } - - hasBytesAvailable = (estimatedBytesAvailable > 0); - - #endif - - if ((hasBytesAvailable == NO) && ([partialReadBuffer length] == 0)) - { - LogVerbose(@"No data available to read..."); - - // No data available to read. - - if (![self usingCFStream]) - { - // Need to wait for readSource to fire and notify us of - // available data in the socket's internal read buffer. - - [self resumeReadSource]; - } - return; - } - - if (flags & kStartingReadTLS) - { - LogVerbose(@"Waiting for SSL/TLS handshake to complete"); - - // The readQueue is waiting for SSL/TLS handshake to complete. - - if (flags & kStartingWriteTLS) - { - #if !TARGET_OS_IPHONE - - // We are in the process of a SSL Handshake. - // We were waiting for incoming data which has just arrived. - - [self continueSSLHandshake]; - - #endif - } - else - { - // We are still waiting for the writeQueue to drain and start the SSL/TLS process. - // We now know data is available to read. - - if (![self usingCFStream]) - { - // Suspend the read source or else it will continue to fire nonstop. - - [self suspendReadSource]; - } - } - - return; - } - - BOOL done = NO; // Completed read operation - BOOL waiting = NO; // Ran out of data, waiting for more - BOOL socketEOF = (flags & kSocketHasReadEOF) ? YES : NO; // Nothing more to via socket (end of file) - NSError *error = nil; // Error occured - - NSUInteger totalBytesReadForCurrentRead = 0; - - // - // STEP 1 - READ FROM PREBUFFER - // - - NSUInteger partialReadBufferLength = [partialReadBuffer length]; - - if (partialReadBufferLength > 0) - { - // There are 3 types of read packets: - // - // 1) Read all available data. - // 2) Read a specific length of data. - // 3) Read up to a particular terminator. - - NSUInteger bytesToCopy; - - if (currentRead->term != nil) - { - // Read type #3 - read up to a terminator - - bytesToCopy = [currentRead readLengthForTermWithPreBuffer:partialReadBuffer found:&done]; - } - else - { - // Read type #1 or #2 - - bytesToCopy = [currentRead readLengthForNonTermWithHint:partialReadBufferLength]; - } - - // Make sure we have enough room in the buffer for our read. - - [currentRead ensureCapacityForAdditionalDataOfLength:bytesToCopy]; - - // Copy bytes from prebuffer into packet buffer - - uint8_t *buffer = (uint8_t *)[currentRead->buffer mutableBytes] + currentRead->startOffset + - currentRead->bytesDone; - - memcpy(buffer, [partialReadBuffer bytes], bytesToCopy); - - // Remove the copied bytes from the partial read buffer - [partialReadBuffer replaceBytesInRange:NSMakeRange(0, bytesToCopy) withBytes:NULL length:0]; - partialReadBufferLength -= bytesToCopy; - - LogVerbose(@"copied(%lu) partialReadBufferLength(%lu)", bytesToCopy, partialReadBufferLength); - - // Update totals - - currentRead->bytesDone += bytesToCopy; - totalBytesReadForCurrentRead += bytesToCopy; - - // Check to see if the read operation is done - - if (currentRead->readLength > 0) - { - // Read type #2 - read a specific length of data - - done = (currentRead->bytesDone == currentRead->readLength); - } - else if (currentRead->term != nil) - { - // Read type #3 - read up to a terminator - - // Our 'done' variable was updated via the readLengthForTermWithPreBuffer:found: method - - if (!done && currentRead->maxLength > 0) - { - // We're not done and there's a set maxLength. - // Have we reached that maxLength yet? - - if (currentRead->bytesDone >= currentRead->maxLength) - { - error = [self readMaxedOutError]; - } - } - } - else - { - // Read type #1 - read all available data - // - // We're done as soon as - // - we've read all available data (in prebuffer and socket) - // - we've read the maxLength of read packet. - - done = ((currentRead->maxLength > 0) && (currentRead->bytesDone == currentRead->maxLength)); - } - - } - - // - // STEP 2 - READ FROM SOCKET - // - - if (!done && !waiting && !socketEOF && !error && hasBytesAvailable) - { - NSAssert((partialReadBufferLength == 0), @"Invalid logic"); - - // There are 3 types of read packets: - // - // 1) Read all available data. - // 2) Read a specific length of data. - // 3) Read up to a particular terminator. - - BOOL readIntoPartialReadBuffer = NO; - NSUInteger bytesToRead; - - if ([self usingCFStream]) - { - // Since Apple has neglected to make SecureTransport available on iOS, - // we are relegated to using the slower, less powerful, RunLoop based CFStream API. - // - // This API doesn't tell us how much data is available on the socket to be read. - // If we had that information we could optimize our memory allocations, and sys calls. - // - // But alas... - // So we do it old school, and just read as much data from the socket as we can. - - NSUInteger defaultReadLength = (1024 * 32); - - bytesToRead = [currentRead optimalReadLengthWithDefault:defaultReadLength - shouldPreBuffer:&readIntoPartialReadBuffer]; - } - else - { - if (currentRead->term != nil) - { - // Read type #3 - read up to a terminator - - bytesToRead = [currentRead readLengthForTermWithHint:estimatedBytesAvailable - shouldPreBuffer:&readIntoPartialReadBuffer]; - } - else - { - // Read type #1 or #2 - - bytesToRead = [currentRead readLengthForNonTermWithHint:estimatedBytesAvailable]; - } - } - - if (bytesToRead > SIZE_MAX) // NSUInteger may be bigger than size_t (read param 3) - { - bytesToRead = SIZE_MAX; - } - - // Make sure we have enough room in the buffer for our read. - // - // We are either reading directly into the currentRead->buffer, - // or we're reading into the temporary partialReadBuffer. - - uint8_t *buffer; - - if (readIntoPartialReadBuffer) - { - if (bytesToRead > partialReadBufferLength) - { - [partialReadBuffer setLength:bytesToRead]; - } - - buffer = [partialReadBuffer mutableBytes]; - } - else - { - [currentRead ensureCapacityForAdditionalDataOfLength:bytesToRead]; - - buffer = (uint8_t *)[currentRead->buffer mutableBytes] + currentRead->startOffset + currentRead->bytesDone; - } - - // Read data into buffer - - size_t bytesRead = 0; - - if (flags & kSocketSecure) - { - #if TARGET_OS_IPHONE - - CFIndex result = CFReadStreamRead(readStream, buffer, (CFIndex)bytesToRead); - LogVerbose(@"CFReadStreamRead(): result = %i", (int)result); - - if (result < 0) - { - error = [NSMakeCollectable(CFReadStreamCopyError(readStream)) autorelease]; - - if (readIntoPartialReadBuffer) - [partialReadBuffer setLength:0]; - } - else if (result == 0) - { - socketEOF = YES; - - if (readIntoPartialReadBuffer) - [partialReadBuffer setLength:0]; - } - else - { - waiting = YES; - bytesRead = (size_t)result; - } - - // We only know how many decrypted bytes were read. - // The actual number of bytes read was likely more due to the overhead of the encryption. - // So we reset our flag, and rely on the next callback to alert us of more data. - flags &= ~kSecureSocketHasBytesAvailable; - - #else - - OSStatus result = SSLRead(sslContext, buffer, (size_t)bytesToRead, &bytesRead); - LogVerbose(@"read from secure socket = %u", (unsigned)bytesRead); - - if (result != noErr) - { - if (result == errSSLWouldBlock) - waiting = YES; - else - error = [self sslError:result]; - - // It's possible that bytesRead > 0, yet the result is errSSLWouldBlock. - // This happens when the SSLRead function is able to read some data, - // but not the entire amount we requested. - - if (bytesRead <= 0) - { - bytesRead = 0; - - if (readIntoPartialReadBuffer) - [partialReadBuffer setLength:0]; - } - } - - // Do not modify socketFDBytesAvailable. - // It will be updated via the SSLReadFunction(). - - #endif - } - else - { - int socketFD = (socket4FD == SOCKET_NULL) ? socket6FD : socket4FD; - - ssize_t result = read(socketFD, buffer, (size_t)bytesToRead); - LogVerbose(@"read from socket = %i", (int)result); - - if (result < 0) - { - if (errno == EWOULDBLOCK) - waiting = YES; - else - error = [self errnoErrorWithReason:@"Error in read() function"]; - - socketFDBytesAvailable = 0; - - if (readIntoPartialReadBuffer) - [partialReadBuffer setLength:0]; - } - else if (result == 0) - { - socketEOF = YES; - socketFDBytesAvailable = 0; - - if (readIntoPartialReadBuffer) - [partialReadBuffer setLength:0]; - } - else - { - bytesRead = result; - - if (socketFDBytesAvailable <= bytesRead) - socketFDBytesAvailable = 0; - else - socketFDBytesAvailable -= bytesRead; - - if (socketFDBytesAvailable == 0) - { - waiting = YES; - } - } - } - - if (bytesRead > 0) - { - // Check to see if the read operation is done - - if (currentRead->readLength > 0) - { - // Read type #2 - read a specific length of data - // - // Note: We should never be using a prebuffer when we're reading a specific length of data. - - NSAssert(readIntoPartialReadBuffer == NO, @"Invalid logic"); - - currentRead->bytesDone += bytesRead; - totalBytesReadForCurrentRead += bytesRead; - - done = (currentRead->bytesDone == currentRead->readLength); - } - else if (currentRead->term != nil) - { - // Read type #3 - read up to a terminator - - if (readIntoPartialReadBuffer) - { - // We just read a big chunk of data into the partialReadBuffer. - // Search for the terminating sequence. - // - // Note: We are depending upon [partialReadBuffer length] to tell us how much data is - // available in the partialReadBuffer. So we need to be sure this matches how many bytes - // have actually been read into said buffer. - - [partialReadBuffer setLength:bytesRead]; - - bytesToRead = [currentRead readLengthForTermWithPreBuffer:partialReadBuffer found:&done]; - - // Ensure there's room on the read packet's buffer - - [currentRead ensureCapacityForAdditionalDataOfLength:bytesToRead]; - - // Copy bytes from prebuffer into read buffer - - uint8_t *preBuf = [partialReadBuffer mutableBytes]; - uint8_t *readBuf = (uint8_t *)[currentRead->buffer mutableBytes] + currentRead->startOffset - + currentRead->bytesDone; - - memcpy(readBuf, preBuf, bytesToRead); - - // Remove the copied bytes from the prebuffer - [partialReadBuffer replaceBytesInRange:NSMakeRange(0, bytesToRead) withBytes:NULL length:0]; - - // Update totals - currentRead->bytesDone += bytesToRead; - totalBytesReadForCurrentRead += bytesToRead; - - // Our 'done' variable was updated via the readLengthForTermWithPreBuffer:found: method above - } - else - { - // We just read a big chunk of data directly into the packet's buffer. - // We need to move any overflow into the prebuffer. - - NSInteger overflow = [currentRead searchForTermAfterPreBuffering:bytesRead]; - - if (overflow == 0) - { - // Perfect match! - // Every byte we read stays in the read buffer, - // and the last byte we read was the last byte of the term. - - currentRead->bytesDone += bytesRead; - totalBytesReadForCurrentRead += bytesRead; - done = YES; - } - else if (overflow > 0) - { - // The term was found within the data that we read, - // and there are extra bytes that extend past the end of the term. - // We need to move these excess bytes out of the read packet and into the prebuffer. - - NSInteger underflow = bytesRead - overflow; - - // Copy excess data into partialReadBuffer - void *overflowBuffer = buffer + currentRead->bytesDone + underflow; - - [partialReadBuffer appendBytes:overflowBuffer length:overflow]; - - // Note: The completeCurrentRead method will trim the buffer for us. - - currentRead->bytesDone += underflow; - totalBytesReadForCurrentRead += underflow; - done = YES; - } - else - { - // The term was not found within the data that we read. - - currentRead->bytesDone += bytesRead; - totalBytesReadForCurrentRead += bytesRead; - done = NO; - } - } - - if (!done && currentRead->maxLength > 0) - { - // We're not done and there's a set maxLength. - // Have we reached that maxLength yet? - - if (currentRead->bytesDone >= currentRead->maxLength) - { - error = [self readMaxedOutError]; - } - } - } - else - { - // Read type #1 - read all available data - - if (readIntoPartialReadBuffer) - { - // We just read a chunk of data into the partialReadBuffer. - // Copy the data into the read packet. - // - // Recall that we didn't read directly into the packet's buffer to avoid - // over-allocating memory since we had no clue how much data was available to be read. - // - // Note: We are depending upon [partialReadBuffer length] to tell us how much data is - // available in the partialReadBuffer. So we need to be sure this matches how many bytes - // have actually been read into said buffer. - - [partialReadBuffer setLength:bytesRead]; - - // Ensure there's room on the read packet's buffer - - [currentRead ensureCapacityForAdditionalDataOfLength:bytesRead]; - - // Copy bytes from prebuffer into read buffer - - uint8_t *preBuf = [partialReadBuffer mutableBytes]; - uint8_t *readBuf = (uint8_t *)[currentRead->buffer mutableBytes] + currentRead->startOffset - + currentRead->bytesDone; - - memcpy(readBuf, preBuf, bytesRead); - - // Remove the copied bytes from the prebuffer - [partialReadBuffer replaceBytesInRange:NSMakeRange(0, bytesRead) withBytes:NULL length:0]; - - // Update totals - currentRead->bytesDone += bytesRead; - totalBytesReadForCurrentRead += bytesRead; - } - else - { - currentRead->bytesDone += bytesRead; - totalBytesReadForCurrentRead += bytesRead; - } - - done = YES; - } - - } // if (bytesRead > 0) - - } // if (!done && !error && hasBytesAvailable) - - - if (!done && currentRead->readLength == 0 && currentRead->term == nil) - { - // Read type #1 - read all available data - // - // We might arrive here if we read data from the prebuffer but not from the socket. - - done = (totalBytesReadForCurrentRead > 0); - } - - // Only one of the following can possibly be true: - // - // - waiting - // - socketEOF - // - socketError - // - maxoutError - // - // They may all be false. - // One of the above may be true even if done is true. - // This might be the case if we completed read type #1 via data from the prebuffer. - - if (done) - { - [self completeCurrentRead]; - - if (!error && (!socketEOF || partialReadBufferLength > 0)) - { - [self maybeDequeueRead]; - } - } - else if (totalBytesReadForCurrentRead > 0) - { - // We're not done read type #2 or #3 yet, but we have read in some bytes - - if (delegateQueue && [delegate respondsToSelector:@selector(socket:didReadPartialDataOfLength:tag:)]) - { - id theDelegate = delegate; - GCDAsyncReadPacket *theRead = currentRead; - - dispatch_async(delegateQueue, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - [theDelegate socket:self didReadPartialDataOfLength:totalBytesReadForCurrentRead tag:theRead->tag]; - - [pool drain]; - }); - } - } - - // Check for errors - - if (error) - { - [self closeWithError:error]; - } - else if (socketEOF) - { - [self doReadEOF]; - } - else if (waiting) - { - if (![self usingCFStream]) - { - // Monitor the socket for readability (if we're not already doing so) - [self resumeReadSource]; - } - } - - // Do not add any code here without first adding return statements in the error cases above. -} - -- (void)doReadEOF -{ - LogTrace(); - - // This method may be called more than once. - // If the EOF is read while there is still data in the partialReadBuffer, - // then this method may be called continually after invocations of doReadData to see if it's time to disconnect. - - flags |= kSocketHasReadEOF; - - if (flags & kSocketSecure) - { - // If the SSL layer has any buffered data, flush it into the partialReadBuffer now. - - [self flushSSLBuffers]; - } - - BOOL shouldDisconnect; - NSError *error = nil; - - if ((flags & kStartingReadTLS) || (flags & kStartingWriteTLS)) - { - // We received an EOF during or prior to startTLS. - // The SSL/TLS handshake is now impossible, so this is an unrecoverable situation. - - shouldDisconnect = YES; - - #if !TARGET_OS_IPHONE - error = [self sslError:errSSLClosedAbort]; - #endif - } - else if (flags & kReadStreamClosed) - { - // The partialReadBuffer has already been drained. - // The config allows half-duplex connections. - // We've previously checked the socket, and it appeared writeable. - // So we marked the read stream as closed and notified the delegate. - // - // As per the half-duplex contract, the socket will be closed when a write fails, - // or when the socket is manually closed. - - shouldDisconnect = NO; - } - else if ([partialReadBuffer length] > 0) - { - LogVerbose(@"Socket reached EOF, but there is still data available in prebuffer"); - - // Although we won't be able to read any more data from the socket, - // there is existing data that has been prebuffered that we can read. - - shouldDisconnect = NO; - } - else if (config & kAllowHalfDuplexConnection) - { - // We just received an EOF (end of file) from the socket's read stream. - // This means the remote end of the socket (the peer we're connected to) - // has explicitly stated that it will not be sending us any more data. - // - // Query the socket to see if it is still writeable. (Perhaps the peer will continue reading data from us) - - int socketFD = (socket4FD == SOCKET_NULL) ? socket6FD : socket4FD; - - struct pollfd pfd[1]; - pfd[0].fd = socketFD; - pfd[0].events = POLLOUT; - pfd[0].revents = 0; - - poll(pfd, 1, 0); - - if (pfd[0].revents & POLLOUT) - { - // Socket appears to still be writeable - - shouldDisconnect = NO; - flags |= kReadStreamClosed; - - // Notify the delegate that we're going half-duplex - - if (delegateQueue && [delegate respondsToSelector:@selector(socketDidCloseReadStream:)]) - { - id theDelegate = delegate; - - dispatch_async(delegateQueue, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - [theDelegate socketDidCloseReadStream:self]; - - [pool drain]; - }); - } - } - else - { - shouldDisconnect = YES; - } - } - else - { - shouldDisconnect = YES; - } - - - if (shouldDisconnect) - { - if (error == nil) - { - error = [self connectionClosedError]; - } - [self closeWithError:error]; - } - else - { - if (![self usingCFStream]) - { - // Suspend the read source (if needed) - - [self suspendReadSource]; - } - } -} - -- (void)completeCurrentRead -{ - LogTrace(); - - NSAssert(currentRead, @"Trying to complete current read when there is no current read."); - - - NSData *result; - - if (currentRead->bufferOwner) - { - // We created the buffer on behalf of the user. - // Trim our buffer to be the proper size. - [currentRead->buffer setLength:currentRead->bytesDone]; - - result = currentRead->buffer; - } - else - { - // We did NOT create the buffer. - // The buffer is owned by the caller. - // Only trim the buffer if we had to increase its size. - - if ([currentRead->buffer length] > currentRead->originalBufferLength) - { - NSUInteger readSize = currentRead->startOffset + currentRead->bytesDone; - NSUInteger origSize = currentRead->originalBufferLength; - - NSUInteger buffSize = MAX(readSize, origSize); - - [currentRead->buffer setLength:buffSize]; - } - - uint8_t *buffer = (uint8_t *)[currentRead->buffer mutableBytes] + currentRead->startOffset; - - result = [NSData dataWithBytesNoCopy:buffer length:currentRead->bytesDone freeWhenDone:NO]; - } - - if (delegateQueue && [delegate respondsToSelector:@selector(socket:didReadData:withTag:)]) - { - id theDelegate = delegate; - GCDAsyncReadPacket *theRead = currentRead; - - dispatch_async(delegateQueue, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - [theDelegate socket:self didReadData:result withTag:theRead->tag]; - - [pool drain]; - }); - } - - [self endCurrentRead]; -} - -- (void)endCurrentRead -{ - if (readTimer) - { - dispatch_source_cancel(readTimer); - readTimer = NULL; - } - - [currentRead release]; - currentRead = nil; -} - -- (void)setupReadTimerWithTimeout:(NSTimeInterval)timeout -{ - if (timeout >= 0.0) - { - readTimer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, socketQueue); - - dispatch_source_set_event_handler(readTimer, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - [self doReadTimeout]; - [pool drain]; - }); - - dispatch_source_t theReadTimer = readTimer; - dispatch_source_set_cancel_handler(readTimer, ^{ - LogVerbose(@"dispatch_release(readTimer)"); - dispatch_release(theReadTimer); - }); - - dispatch_time_t tt = dispatch_time(DISPATCH_TIME_NOW, (timeout * NSEC_PER_SEC)); - - dispatch_source_set_timer(readTimer, tt, DISPATCH_TIME_FOREVER, 0); - dispatch_resume(readTimer); - } -} - -- (void)doReadTimeout -{ - // This is a little bit tricky. - // Ideally we'd like to synchronously query the delegate about a timeout extension. - // But if we do so synchronously we risk a possible deadlock. - // So instead we have to do so asynchronously, and callback to ourselves from within the delegate block. - - flags |= kReadsPaused; - - if (delegateQueue && [delegate respondsToSelector:@selector(socket:shouldTimeoutReadWithTag:elapsed:bytesDone:)]) - { - id theDelegate = delegate; - GCDAsyncReadPacket *theRead = currentRead; - - dispatch_async(delegateQueue, ^{ - NSAutoreleasePool *delegatePool = [[NSAutoreleasePool alloc] init]; - - NSTimeInterval timeoutExtension = 0.0; - - timeoutExtension = [theDelegate socket:self shouldTimeoutReadWithTag:theRead->tag - elapsed:theRead->timeout - bytesDone:theRead->bytesDone]; - - dispatch_async(socketQueue, ^{ - NSAutoreleasePool *callbackPool = [[NSAutoreleasePool alloc] init]; - - [self doReadTimeoutWithExtension:timeoutExtension]; - - [callbackPool drain]; - }); - - [delegatePool drain]; - }); - } - else - { - [self doReadTimeoutWithExtension:0.0]; - } -} - -- (void)doReadTimeoutWithExtension:(NSTimeInterval)timeoutExtension -{ - if (currentRead) - { - if (timeoutExtension > 0.0) - { - currentRead->timeout += timeoutExtension; - - // Reschedule the timer - dispatch_time_t tt = dispatch_time(DISPATCH_TIME_NOW, (timeoutExtension * NSEC_PER_SEC)); - dispatch_source_set_timer(readTimer, tt, DISPATCH_TIME_FOREVER, 0); - - // Unpause reads, and continue - flags &= ~kReadsPaused; - [self doReadData]; - } - else - { - LogVerbose(@"ReadTimeout"); - - [self closeWithError:[self readTimeoutError]]; - } - } -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Writing -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (void)writeData:(NSData *)data withTimeout:(NSTimeInterval)timeout tag:(long)tag -{ - if ([data length] == 0) return; - - GCDAsyncWritePacket *packet = [[GCDAsyncWritePacket alloc] initWithData:data timeout:timeout tag:tag]; - - dispatch_async(socketQueue, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - LogTrace(); - - if ((flags & kSocketStarted) && !(flags & kForbidReadsWrites)) - { - [writeQueue addObject:packet]; - [self maybeDequeueWrite]; - } - - [pool drain]; - }); - - // Do not rely on the block being run in order to release the packet, - // as the queue might get released without the block completing. - [packet release]; -} - -/** - * Conditionally starts a new write. - * - * It is called when: - * - a user requests a write - * - after a write request has finished (to handle the next request) - * - immediately after the socket opens to handle any pending requests - * - * This method also handles auto-disconnect post read/write completion. -**/ -- (void)maybeDequeueWrite -{ - LogTrace(); - NSAssert(dispatch_get_current_queue() == socketQueue, @"Must be dispatched on socketQueue"); - - - // If we're not currently processing a write AND we have an available write stream - if ((currentWrite == nil) && (flags & kConnected)) - { - if ([writeQueue count] > 0) - { - // Dequeue the next object in the write queue - currentWrite = [[writeQueue objectAtIndex:0] retain]; - [writeQueue removeObjectAtIndex:0]; - - - if ([currentWrite isKindOfClass:[GCDAsyncSpecialPacket class]]) - { - LogVerbose(@"Dequeued GCDAsyncSpecialPacket"); - - // Attempt to start TLS - flags |= kStartingWriteTLS; - - // This method won't do anything unless both kStartingReadTLS and kStartingWriteTLS are set - [self maybeStartTLS]; - } - else - { - LogVerbose(@"Dequeued GCDAsyncWritePacket"); - - // Setup write timer (if needed) - [self setupWriteTimerWithTimeout:currentWrite->timeout]; - - // Immediately write, if possible - [self doWriteData]; - } - } - else if (flags & kDisconnectAfterWrites) - { - if (flags & kDisconnectAfterReads) - { - if (([readQueue count] == 0) && (currentRead == nil)) - { - [self closeWithError:nil]; - } - } - else - { - [self closeWithError:nil]; - } - } - } -} - -- (void)doWriteData -{ - LogTrace(); - - // This method is called by the writeSource via the socketQueue - - if ((currentWrite == nil) || (flags & kWritesPaused)) - { - LogVerbose(@"No currentWrite or kWritesPaused"); - - // Unable to write at this time - - if ([self usingCFStream]) - { - // CFWriteStream only fires once when there is available data. - // It won't fire again until we've invoked CFWriteStreamWrite. - } - else - { - // If the writeSource is firing, we need to pause it - // or else it will continue to fire over and over again. - - if (flags & kSocketCanAcceptBytes) - { - [self suspendWriteSource]; - } - } - return; - } - - if (!(flags & kSocketCanAcceptBytes)) - { - LogVerbose(@"No space available to write..."); - - // No space available to write. - - if (![self usingCFStream]) - { - // Need to wait for writeSource to fire and notify us of - // available space in the socket's internal write buffer. - - [self resumeWriteSource]; - } - return; - } - - if (flags & kStartingWriteTLS) - { - LogVerbose(@"Waiting for SSL/TLS handshake to complete"); - - // The writeQueue is waiting for SSL/TLS handshake to complete. - - if (flags & kStartingReadTLS) - { - #if !TARGET_OS_IPHONE - - // We are in the process of a SSL Handshake. - // We were waiting for available space in the socket's internal OS buffer to continue writing. - - [self continueSSLHandshake]; - - #endif - } - else - { - // We are still waiting for the readQueue to drain and start the SSL/TLS process. - // We now know we can write to the socket. - - if (![self usingCFStream]) - { - // Suspend the write source or else it will continue to fire nonstop. - - [self suspendWriteSource]; - } - } - - return; - } - - // Note: This method is not called if theCurrentWrite is an GCDAsyncSpecialPacket (startTLS packet) - - BOOL waiting = NO; - NSError *error = nil; - size_t bytesWritten = 0; - - if (flags & kSocketSecure) - { - #if TARGET_OS_IPHONE - - const uint8_t *buffer = (const uint8_t *)[currentWrite->buffer bytes] + currentWrite->bytesDone; - - NSUInteger bytesToWrite = [currentWrite->buffer length] - currentWrite->bytesDone; - - if (bytesToWrite > SIZE_MAX) // NSUInteger may be bigger than size_t (write param 3) - { - bytesToWrite = SIZE_MAX; - } - - CFIndex result = CFWriteStreamWrite(writeStream, buffer, (CFIndex)bytesToWrite); - LogVerbose(@"CFWriteStreamWrite(%lu) = %li", bytesToWrite, result); - - if (result < 0) - { - error = [NSMakeCollectable(CFWriteStreamCopyError(writeStream)) autorelease]; - } - else - { - bytesWritten = (size_t)result; - - // We always set waiting to true in this scenario. - // CFStream may have altered our underlying socket to non-blocking. - // Thus if we attempt to write without a callback, we may end up blocking our queue. - waiting = YES; - } - - #else - - // We're going to use the SSLWrite function. - // - // OSStatus SSLWrite(SSLContextRef context, const void *data, size_t dataLength, size_t *processed) - // - // Parameters: - // context - An SSL session context reference. - // data - A pointer to the buffer of data to write. - // dataLength - The amount, in bytes, of data to write. - // processed - On return, the length, in bytes, of the data actually written. - // - // It sounds pretty straight-forward, - // but there are a few caveats you should be aware of. - // - // The SSLWrite method operates in a non-obvious (and rather annoying) manner. - // According to the documentation: - // - // Because you may configure the underlying connection to operate in a non-blocking manner, - // a write operation might return errSSLWouldBlock, indicating that less data than requested - // was actually transferred. In this case, you should repeat the call to SSLWrite until some - // other result is returned. - // - // This sounds perfect, but when our SSLWriteFunction returns errSSLWouldBlock, - // then the SSLWrite method returns (with the proper errSSLWouldBlock return value), - // but it sets bytesWritten to bytesToWrite !! - // - // In other words, if the SSLWrite function doesn't completely write all the data we tell it to, - // then it doesn't tell us how many bytes were actually written. - // - // You might be wondering: - // If the SSLWrite function doesn't tell us how many bytes were written, - // then how in the world are we supposed to update our parameters (buffer & bytesToWrite) - // for the next time we invoke SSLWrite? - // - // The answer is that SSLWrite cached all the data we told it to write, - // and it will push out that data next time we call SSLWrite. - // If we call SSLWrite with new data, it will push out the cached data first, and then the new data. - // If we call SSLWrite with empty data, then it will simply push out the cached data. - // - // For this purpose we're going to break large writes into a series of smaller writes. - // This allows us to report progress back to the delegate. - - OSStatus result; - - BOOL hasCachedDataToWrite = (sslWriteCachedLength > 0); - BOOL hasNewDataToWrite = YES; - - if (hasCachedDataToWrite) - { - size_t processed = 0; - - result = SSLWrite(sslContext, NULL, 0, &processed); - - if (result == noErr) - { - bytesWritten = sslWriteCachedLength; - sslWriteCachedLength = 0; - - if (currentWrite->bytesDone == [currentWrite->buffer length]) - { - // We've written all data for the current write. - hasNewDataToWrite = NO; - } - } - else - { - if (result == errSSLWouldBlock) - { - waiting = YES; - } - else - { - error = [self sslError:result]; - } - - // Can't write any new data since we were unable to write the cached data. - hasNewDataToWrite = NO; - } - } - - if (hasNewDataToWrite) - { - const uint8_t *buffer = (const uint8_t *)[currentWrite->buffer bytes] + currentWrite->bytesDone + bytesWritten; - - NSUInteger bytesToWrite = [currentWrite->buffer length] - currentWrite->bytesDone - bytesWritten; - - if (bytesToWrite > SIZE_MAX) // NSUInteger may be bigger than size_t (write param 3) - { - bytesToWrite = SIZE_MAX; - } - - size_t bytesRemaining = bytesToWrite; - - BOOL keepLooping = YES; - while (keepLooping) - { - size_t sslBytesToWrite = MIN(bytesRemaining, 32768); - size_t sslBytesWritten = 0; - - result = SSLWrite(sslContext, buffer, sslBytesToWrite, &sslBytesWritten); - - if (result == noErr) - { - buffer += sslBytesWritten; - bytesWritten += sslBytesWritten; - bytesRemaining -= sslBytesWritten; - - keepLooping = (bytesRemaining > 0); - } - else - { - if (result == errSSLWouldBlock) - { - waiting = YES; - sslWriteCachedLength = sslBytesToWrite; - } - else - { - error = [self sslError:result]; - } - - keepLooping = NO; - } - - } // while (keepLooping) - - } // if (hasNewDataToWrite) - - #endif - } - else - { - int socketFD = (socket4FD == SOCKET_NULL) ? socket6FD : socket4FD; - - const uint8_t *buffer = (const uint8_t *)[currentWrite->buffer bytes] + currentWrite->bytesDone; - - NSUInteger bytesToWrite = [currentWrite->buffer length] - currentWrite->bytesDone; - - if (bytesToWrite > SIZE_MAX) // NSUInteger may be bigger than size_t (write param 3) - { - bytesToWrite = SIZE_MAX; - } - - ssize_t result = write(socketFD, buffer, (size_t)bytesToWrite); - LogVerbose(@"wrote to socket = %zd", result); - - // Check results - if (result < 0) - { - if (errno == EWOULDBLOCK) - { - waiting = YES; - } - else - { - error = [self errnoErrorWithReason:@"Error in write() function"]; - } - } - else - { - bytesWritten = result; - } - } - - // We're done with our writing. - // If we explictly ran into a situation where the socket told us there was no room in the buffer, - // then we immediately resume listening for notifications. - // - // We must do this before we dequeue another write, - // as that may in turn invoke this method again. - // - // Note that if CFStream is involved, it may have maliciously put our socket in blocking mode. - - if (waiting) - { - flags &= ~kSocketCanAcceptBytes; - - if (![self usingCFStream]) - { - [self resumeWriteSource]; - } - } - - // Check our results - - BOOL done = NO; - - if (bytesWritten > 0) - { - // Update total amount read for the current write - currentWrite->bytesDone += bytesWritten; - LogVerbose(@"currentWrite->bytesDone = %lu", currentWrite->bytesDone); - - // Is packet done? - done = (currentWrite->bytesDone == [currentWrite->buffer length]); - } - - if (done) - { - [self completeCurrentWrite]; - - if (!error) - { - [self maybeDequeueWrite]; - } - } - else - { - // We were unable to finish writing the data, - // so we're waiting for another callback to notify us of available space in the lower-level output buffer. - - if (!waiting & !error) - { - // This would be the case if our write was able to accept some data, but not all of it. - - flags &= ~kSocketCanAcceptBytes; - - if (![self usingCFStream]) - { - [self resumeWriteSource]; - } - } - - if (bytesWritten > 0) - { - // We're not done with the entire write, but we have written some bytes - - if (delegateQueue && [delegate respondsToSelector:@selector(socket:didWritePartialDataOfLength:tag:)]) - { - id theDelegate = delegate; - GCDAsyncWritePacket *theWrite = currentWrite; - - dispatch_async(delegateQueue, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - [theDelegate socket:self didWritePartialDataOfLength:bytesWritten tag:theWrite->tag]; - - [pool drain]; - }); - } - } - } - - // Check for errors - - if (error) - { - [self closeWithError:[self errnoErrorWithReason:@"Error in write() function"]]; - } - - // Do not add any code here without first adding a return statement in the error case above. -} - -- (void)completeCurrentWrite -{ - LogTrace(); - - NSAssert(currentWrite, @"Trying to complete current write when there is no current write."); - - - if (delegateQueue && [delegate respondsToSelector:@selector(socket:didWriteDataWithTag:)]) - { - id theDelegate = delegate; - GCDAsyncWritePacket *theWrite = currentWrite; - - dispatch_async(delegateQueue, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - [theDelegate socket:self didWriteDataWithTag:theWrite->tag]; - - [pool drain]; - }); - } - - [self endCurrentWrite]; -} - -- (void)endCurrentWrite -{ - if (writeTimer) - { - dispatch_source_cancel(writeTimer); - writeTimer = NULL; - } - - [currentWrite release]; - currentWrite = nil; -} - -- (void)setupWriteTimerWithTimeout:(NSTimeInterval)timeout -{ - if (timeout >= 0.0) - { - writeTimer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, socketQueue); - - dispatch_source_set_event_handler(writeTimer, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - [self doWriteTimeout]; - - [pool drain]; - }); - - dispatch_source_t theWriteTimer = writeTimer; - dispatch_source_set_cancel_handler(writeTimer, ^{ - LogVerbose(@"dispatch_release(writeTimer)"); - dispatch_release(theWriteTimer); - }); - - dispatch_time_t tt = dispatch_time(DISPATCH_TIME_NOW, (timeout * NSEC_PER_SEC)); - - dispatch_source_set_timer(writeTimer, tt, DISPATCH_TIME_FOREVER, 0); - dispatch_resume(writeTimer); - } -} - -- (void)doWriteTimeout -{ - // This is a little bit tricky. - // Ideally we'd like to synchronously query the delegate about a timeout extension. - // But if we do so synchronously we risk a possible deadlock. - // So instead we have to do so asynchronously, and callback to ourselves from within the delegate block. - - flags |= kWritesPaused; - - if (delegateQueue && [delegate respondsToSelector:@selector(socket:shouldTimeoutWriteWithTag:elapsed:bytesDone:)]) - { - id theDelegate = delegate; - GCDAsyncWritePacket *theWrite = currentWrite; - - dispatch_async(delegateQueue, ^{ - NSAutoreleasePool *delegatePool = [[NSAutoreleasePool alloc] init]; - - NSTimeInterval timeoutExtension = 0.0; - - timeoutExtension = [theDelegate socket:self shouldTimeoutWriteWithTag:theWrite->tag - elapsed:theWrite->timeout - bytesDone:theWrite->bytesDone]; - - dispatch_async(socketQueue, ^{ - NSAutoreleasePool *callbackPool = [[NSAutoreleasePool alloc] init]; - - [self doWriteTimeoutWithExtension:timeoutExtension]; - - [callbackPool drain]; - }); - - [delegatePool drain]; - }); - } - else - { - [self doWriteTimeoutWithExtension:0.0]; - } -} - -- (void)doWriteTimeoutWithExtension:(NSTimeInterval)timeoutExtension -{ - if (currentWrite) - { - if (timeoutExtension > 0.0) - { - currentWrite->timeout += timeoutExtension; - - // Reschedule the timer - dispatch_time_t tt = dispatch_time(DISPATCH_TIME_NOW, (timeoutExtension * NSEC_PER_SEC)); - dispatch_source_set_timer(writeTimer, tt, DISPATCH_TIME_FOREVER, 0); - - // Unpause writes, and continue - flags &= ~kWritesPaused; - [self doWriteData]; - } - else - { - LogVerbose(@"WriteTimeout"); - - [self closeWithError:[self writeTimeoutError]]; - } - } -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Security -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (void)startTLS:(NSDictionary *)tlsSettings -{ - LogTrace(); - - if (tlsSettings == nil) - { - // Passing nil/NULL to CFReadStreamSetProperty will appear to work the same as passing an empty dictionary, - // but causes problems if we later try to fetch the remote host's certificate. - // - // To be exact, it causes the following to return NULL instead of the normal result: - // CFReadStreamCopyProperty(readStream, kCFStreamPropertySSLPeerCertificates) - // - // So we use an empty dictionary instead, which works perfectly. - - tlsSettings = [NSDictionary dictionary]; - } - - GCDAsyncSpecialPacket *packet = [[GCDAsyncSpecialPacket alloc] initWithTLSSettings:tlsSettings]; - - dispatch_async(socketQueue, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - if ((flags & kSocketStarted) && !(flags & kQueuedTLS) && !(flags & kForbidReadsWrites)) - { - [readQueue addObject:packet]; - [writeQueue addObject:packet]; - - flags |= kQueuedTLS; - - [self maybeDequeueRead]; - [self maybeDequeueWrite]; - } - - [pool drain]; - }); - - [packet release]; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Security - Mac OS X -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -#if !TARGET_OS_IPHONE - -- (OSStatus)sslReadWithBuffer:(void *)buffer length:(size_t *)bufferLength -{ - LogVerbose(@"sslReadWithBuffer:%p length:%lu", buffer, (unsigned long)*bufferLength); - - if ((socketFDBytesAvailable == 0) && ([sslReadBuffer length] == 0)) - { - LogVerbose(@"%@ - No data available to read...", THIS_METHOD); - - // No data available to read. - // - // Need to wait for readSource to fire and notify us of - // available data in the socket's internal read buffer. - - [self resumeReadSource]; - - *bufferLength = 0; - return errSSLWouldBlock; - } - - size_t totalBytesRead = 0; - size_t totalBytesLeftToBeRead = *bufferLength; - - BOOL done = NO; - BOOL socketError = NO; - - // - // STEP 1 : READ FROM SSL PRE BUFFER - // - - NSUInteger sslReadBufferLength = [sslReadBuffer length]; - - if (sslReadBufferLength > 0) - { - LogVerbose(@"%@: Reading from SSL pre buffer...", THIS_METHOD); - - size_t bytesToCopy; - if (sslReadBufferLength > totalBytesLeftToBeRead) - bytesToCopy = totalBytesLeftToBeRead; - else - bytesToCopy = (size_t)sslReadBufferLength; - - LogVerbose(@"%@: Copying %zu bytes from sslReadBuffer", THIS_METHOD, bytesToCopy); - - memcpy(buffer, [sslReadBuffer mutableBytes], bytesToCopy); - - [sslReadBuffer replaceBytesInRange:NSMakeRange(0, bytesToCopy) withBytes:NULL length:0]; - - LogVerbose(@"%@: sslReadBuffer.length = %lu", THIS_METHOD, (unsigned long)[sslReadBuffer length]); - - totalBytesRead += bytesToCopy; - totalBytesLeftToBeRead -= bytesToCopy; - - done = (totalBytesLeftToBeRead == 0); - - if (done) LogVerbose(@"%@: Complete", THIS_METHOD); - } - - // - // STEP 2 : READ FROM SOCKET - // - - if (!done && (socketFDBytesAvailable > 0)) - { - LogVerbose(@"%@: Reading from socket...", THIS_METHOD); - - int socketFD = (socket6FD == SOCKET_NULL) ? socket4FD : socket6FD; - - BOOL readIntoPreBuffer; - size_t bytesToRead; - uint8_t *buf; - - if (socketFDBytesAvailable > totalBytesLeftToBeRead) - { - // Read all available data from socket into sslReadBuffer. - // Then copy requested amount into dataBuffer. - - LogVerbose(@"%@: Reading into sslReadBuffer...", THIS_METHOD); - - if ([sslReadBuffer length] < socketFDBytesAvailable) - { - [sslReadBuffer setLength:socketFDBytesAvailable]; - } - - readIntoPreBuffer = YES; - bytesToRead = (size_t)socketFDBytesAvailable; - buf = [sslReadBuffer mutableBytes]; - } - else - { - // Read available data from socket directly into dataBuffer. - - LogVerbose(@"%@: Reading directly into dataBuffer...", THIS_METHOD); - - readIntoPreBuffer = NO; - bytesToRead = totalBytesLeftToBeRead; - buf = (uint8_t *)buffer + totalBytesRead; - } - - ssize_t result = read(socketFD, buf, bytesToRead); - LogVerbose(@"%@: read from socket = %zd", THIS_METHOD, result); - - if (result < 0) - { - LogVerbose(@"%@: read errno = %i", THIS_METHOD, errno); - - if (errno != EWOULDBLOCK) - { - socketError = YES; - } - - socketFDBytesAvailable = 0; - - if (readIntoPreBuffer) - { - [sslReadBuffer setLength:0]; - } - } - else if (result == 0) - { - LogVerbose(@"%@: read EOF", THIS_METHOD); - - socketError = YES; - socketFDBytesAvailable = 0; - - if (readIntoPreBuffer) - { - [sslReadBuffer setLength:0]; - } - } - else - { - size_t bytesReadFromSocket = result; - - if (socketFDBytesAvailable > bytesReadFromSocket) - socketFDBytesAvailable -= bytesReadFromSocket; - else - socketFDBytesAvailable = 0; - - if (readIntoPreBuffer) - { - size_t bytesToCopy = MIN(totalBytesLeftToBeRead, bytesReadFromSocket); - - LogVerbose(@"%@: Copying %zu bytes out of sslReadBuffer", THIS_METHOD, bytesToCopy); - - memcpy((uint8_t *)buffer + totalBytesRead, [sslReadBuffer bytes], bytesToCopy); - - [sslReadBuffer setLength:bytesReadFromSocket]; - [sslReadBuffer replaceBytesInRange:NSMakeRange(0, bytesToCopy) withBytes:NULL length:0]; - - totalBytesRead += bytesToCopy; - totalBytesLeftToBeRead -= bytesToCopy; - - LogVerbose(@"%@: sslReadBuffer.length = %lu", THIS_METHOD, (unsigned long)[sslReadBuffer length]); - } - else - { - totalBytesRead += bytesReadFromSocket; - totalBytesLeftToBeRead -= bytesReadFromSocket; - } - - done = (totalBytesLeftToBeRead == 0); - - if (done) LogVerbose(@"%@: Complete", THIS_METHOD); - } - } - - *bufferLength = totalBytesRead; - - if (done) - return noErr; - - if (socketError) - return errSSLClosedAbort; - - return errSSLWouldBlock; -} - -- (OSStatus)sslWriteWithBuffer:(const void *)buffer length:(size_t *)bufferLength -{ - if (!(flags & kSocketCanAcceptBytes)) - { - // Unable to write. - // - // Need to wait for writeSource to fire and notify us of - // available space in the socket's internal write buffer. - - [self resumeWriteSource]; - - *bufferLength = 0; - return errSSLWouldBlock; - } - - size_t bytesToWrite = *bufferLength; - size_t bytesWritten = 0; - - BOOL done = NO; - BOOL socketError = NO; - - int socketFD = (socket4FD == SOCKET_NULL) ? socket6FD : socket4FD; - - ssize_t result = write(socketFD, buffer, bytesToWrite); - - if (result < 0) - { - if (errno != EWOULDBLOCK) - { - socketError = YES; - } - - flags &= ~kSocketCanAcceptBytes; - } - else if (result == 0) - { - flags &= ~kSocketCanAcceptBytes; - } - else - { - bytesWritten = result; - - done = (bytesWritten == bytesToWrite); - } - - *bufferLength = bytesWritten; - - if (done) - return noErr; - - if (socketError) - return errSSLClosedAbort; - - return errSSLWouldBlock; -} - -static OSStatus SSLReadFunction(SSLConnectionRef connection, void *data, size_t *dataLength) -{ - GCDAsyncSocket *asyncSocket = (GCDAsyncSocket *)connection; - - NSCAssert(dispatch_get_current_queue() == asyncSocket->socketQueue, @"What the deuce?"); - - return [asyncSocket sslReadWithBuffer:data length:dataLength]; -} - -static OSStatus SSLWriteFunction(SSLConnectionRef connection, const void *data, size_t *dataLength) -{ - GCDAsyncSocket *asyncSocket = (GCDAsyncSocket *)connection; - - NSCAssert(dispatch_get_current_queue() == asyncSocket->socketQueue, @"What the deuce?"); - - return [asyncSocket sslWriteWithBuffer:data length:dataLength]; -} - -- (void)maybeStartTLS -{ - LogTrace(); - - // We can't start TLS until: - // - All queued reads prior to the user calling startTLS are complete - // - All queued writes prior to the user calling startTLS are complete - // - // We'll know these conditions are met when both kStartingReadTLS and kStartingWriteTLS are set - - if ((flags & kStartingReadTLS) && (flags & kStartingWriteTLS)) - { - LogVerbose(@"Starting TLS..."); - - OSStatus status; - - GCDAsyncSpecialPacket *tlsPacket = (GCDAsyncSpecialPacket *)currentRead; - NSDictionary *tlsSettings = tlsPacket->tlsSettings; - - // Create SSLContext, and setup IO callbacks and connection ref - - BOOL isServer = [[tlsSettings objectForKey:(NSString *)kCFStreamSSLIsServer] boolValue]; - - status = SSLNewContext(isServer, &sslContext); - if (status != noErr) - { - [self closeWithError:[self otherError:@"Error in SSLNewContext"]]; - return; - } - - status = SSLSetIOFuncs(sslContext, &SSLReadFunction, &SSLWriteFunction); - if (status != noErr) - { - [self closeWithError:[self otherError:@"Error in SSLSetIOFuncs"]]; - return; - } - - status = SSLSetConnection(sslContext, (SSLConnectionRef)self); - if (status != noErr) - { - [self closeWithError:[self otherError:@"Error in SSLSetConnection"]]; - return; - } - - // Configure SSLContext from given settings - // - // Checklist: - // 1. kCFStreamSSLPeerName - // 2. kCFStreamSSLAllowsAnyRoot - // 3. kCFStreamSSLAllowsExpiredRoots - // 4. kCFStreamSSLValidatesCertificateChain - // 5. kCFStreamSSLAllowsExpiredCertificates - // 6. kCFStreamSSLCertificates - // 7. kCFStreamSSLLevel - // 8. GCDAsyncSocketSSLCipherSuites - // 9. GCDAsyncSocketSSLDiffieHellmanParameters - - id value; - - // 1. kCFStreamSSLPeerName - - value = [tlsSettings objectForKey:(NSString *)kCFStreamSSLPeerName]; - if ([value isKindOfClass:[NSString class]]) - { - NSString *peerName = (NSString *)value; - - const char *peer = [peerName UTF8String]; - size_t peerLen = strlen(peer); - - status = SSLSetPeerDomainName(sslContext, peer, peerLen); - if (status != noErr) - { - [self closeWithError:[self otherError:@"Error in SSLSetPeerDomainName"]]; - return; - } - } - - // 2. kCFStreamSSLAllowsAnyRoot - - value = [tlsSettings objectForKey:(NSString *)kCFStreamSSLAllowsAnyRoot]; - if (value) - { - BOOL allowsAnyRoot = [value boolValue]; - - status = SSLSetAllowsAnyRoot(sslContext, allowsAnyRoot); - if (status != noErr) - { - [self closeWithError:[self otherError:@"Error in SSLSetAllowsAnyRoot"]]; - return; - } - } - - // 3. kCFStreamSSLAllowsExpiredRoots - - value = [tlsSettings objectForKey:(NSString *)kCFStreamSSLAllowsExpiredRoots]; - if (value) - { - BOOL allowsExpiredRoots = [value boolValue]; - - status = SSLSetAllowsExpiredRoots(sslContext, allowsExpiredRoots); - if (status != noErr) - { - [self closeWithError:[self otherError:@"Error in SSLSetAllowsExpiredRoots"]]; - return; - } - } - - // 4. kCFStreamSSLValidatesCertificateChain - - value = [tlsSettings objectForKey:(NSString *)kCFStreamSSLValidatesCertificateChain]; - if (value) - { - BOOL validatesCertChain = [value boolValue]; - - status = SSLSetEnableCertVerify(sslContext, validatesCertChain); - if (status != noErr) - { - [self closeWithError:[self otherError:@"Error in SSLSetEnableCertVerify"]]; - return; - } - } - - // 5. kCFStreamSSLAllowsExpiredCertificates - - value = [tlsSettings objectForKey:(NSString *)kCFStreamSSLAllowsExpiredCertificates]; - if (value) - { - BOOL allowsExpiredCerts = [value boolValue]; - - status = SSLSetAllowsExpiredCerts(sslContext, allowsExpiredCerts); - if (status != noErr) - { - [self closeWithError:[self otherError:@"Error in SSLSetAllowsExpiredCerts"]]; - return; - } - } - - // 6. kCFStreamSSLCertificates - - value = [tlsSettings objectForKey:(NSString *)kCFStreamSSLCertificates]; - if (value) - { - CFArrayRef certs = (CFArrayRef)value; - - status = SSLSetCertificate(sslContext, certs); - if (status != noErr) - { - [self closeWithError:[self otherError:@"Error in SSLSetCertificate"]]; - return; - } - } - - // 7. kCFStreamSSLLevel - - value = [tlsSettings objectForKey:(NSString *)kCFStreamSSLLevel]; - if (value) - { - NSString *sslLevel = (NSString *)value; - - if ([sslLevel isEqualToString:(NSString *)kCFStreamSocketSecurityLevelSSLv2]) - { - // kCFStreamSocketSecurityLevelSSLv2: - // - // Specifies that SSL version 2 be set as the security protocol. - - SSLSetProtocolVersionEnabled(sslContext, kSSLProtocolAll, NO); - SSLSetProtocolVersionEnabled(sslContext, kSSLProtocol2, YES); - } - else if ([sslLevel isEqualToString:(NSString *)kCFStreamSocketSecurityLevelSSLv3]) - { - // kCFStreamSocketSecurityLevelSSLv3: - // - // Specifies that SSL version 3 be set as the security protocol. - // If SSL version 3 is not available, specifies that SSL version 2 be set as the security protocol. - - SSLSetProtocolVersionEnabled(sslContext, kSSLProtocolAll, NO); - SSLSetProtocolVersionEnabled(sslContext, kSSLProtocol2, YES); - SSLSetProtocolVersionEnabled(sslContext, kSSLProtocol3, YES); - } - else if ([sslLevel isEqualToString:(NSString *)kCFStreamSocketSecurityLevelTLSv1]) - { - // kCFStreamSocketSecurityLevelTLSv1: - // - // Specifies that TLS version 1 be set as the security protocol. - - SSLSetProtocolVersionEnabled(sslContext, kSSLProtocolAll, NO); - SSLSetProtocolVersionEnabled(sslContext, kTLSProtocol1, YES); - } - else if ([sslLevel isEqualToString:(NSString *)kCFStreamSocketSecurityLevelNegotiatedSSL]) - { - // kCFStreamSocketSecurityLevelNegotiatedSSL: - // - // Specifies that the highest level security protocol that can be negotiated be used. - - SSLSetProtocolVersionEnabled(sslContext, kSSLProtocolAll, YES); - } - } - - // 8. GCDAsyncSocketSSLCipherSuites - - value = [tlsSettings objectForKey:GCDAsyncSocketSSLCipherSuites]; - if (value) - { - NSArray *cipherSuites = (NSArray *)value; - NSUInteger numberCiphers = [cipherSuites count]; - SSLCipherSuite ciphers[numberCiphers]; - - NSUInteger cipherIndex; - for (cipherIndex = 0; cipherIndex < numberCiphers; cipherIndex++) - { - NSNumber *cipherObject = [cipherSuites objectAtIndex:cipherIndex]; - ciphers[cipherIndex] = [cipherObject shortValue]; - } - - status = SSLSetEnabledCiphers(sslContext, ciphers, numberCiphers); - if (status != noErr) - { - [self closeWithError:[self otherError:@"Error in SSLSetEnabledCiphers"]]; - return; - } - } - - // 9. GCDAsyncSocketSSLDiffieHellmanParameters - - value = [tlsSettings objectForKey:GCDAsyncSocketSSLDiffieHellmanParameters]; - if (value) - { - NSData *diffieHellmanData = (NSData *)value; - - status = SSLSetDiffieHellmanParams(sslContext, [diffieHellmanData bytes], [diffieHellmanData length]); - if (status != noErr) - { - [self closeWithError:[self otherError:@"Error in SSLSetDiffieHellmanParams"]]; - return; - } - } - - // Setup the sslReadBuffer - // - // If there is any data in the partialReadBuffer, - // this needs to be moved into the sslReadBuffer, - // as this data is now part of the secure read stream. - - sslReadBuffer = [[NSMutableData alloc] init]; - - if ([partialReadBuffer length] > 0) - { - [sslReadBuffer appendData:partialReadBuffer]; - [partialReadBuffer setLength:0]; - } - - // Start the SSL Handshake process - - [self continueSSLHandshake]; - } -} - -- (void)continueSSLHandshake -{ - LogTrace(); - - // If the return value is noErr, the session is ready for normal secure communication. - // If the return value is errSSLWouldBlock, the SSLHandshake function must be called again. - // Otherwise, the return value indicates an error code. - - OSStatus status = SSLHandshake(sslContext); - - if (status == noErr) - { - LogVerbose(@"SSLHandshake complete"); - - flags &= ~kStartingReadTLS; - flags &= ~kStartingWriteTLS; - - flags |= kSocketSecure; - - if (delegateQueue && [delegate respondsToSelector:@selector(socketDidSecure:)]) - { - id theDelegate = delegate; - - dispatch_async(delegateQueue, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - [theDelegate socketDidSecure:self]; - - [pool drain]; - }); - } - - [self endCurrentRead]; - [self endCurrentWrite]; - - [self maybeDequeueRead]; - [self maybeDequeueWrite]; - } - else if (status == errSSLWouldBlock) - { - LogVerbose(@"SSLHandshake continues..."); - - // Handshake continues... - // - // This method will be called again from doReadData or doWriteData. - } - else - { - [self closeWithError:[self sslError:status]]; - } -} - -#endif - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Security - iOS -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -#if TARGET_OS_IPHONE - -- (void)finishSSLHandshake -{ - LogTrace(); - - if ((flags & kStartingReadTLS) && (flags & kStartingWriteTLS)) - { - flags &= ~kStartingReadTLS; - flags &= ~kStartingWriteTLS; - - flags |= kSocketSecure; - - if (delegateQueue && [delegate respondsToSelector:@selector(socketDidSecure:)]) - { - id theDelegate = delegate; - - dispatch_async(delegateQueue, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - [theDelegate socketDidSecure:self]; - - [pool drain]; - }); - } - - [self endCurrentRead]; - [self endCurrentWrite]; - - [self maybeDequeueRead]; - [self maybeDequeueWrite]; - } -} - -- (void)abortSSLHandshake:(NSError *)error -{ - LogTrace(); - - if ((flags & kStartingReadTLS) && (flags & kStartingWriteTLS)) - { - flags &= ~kStartingReadTLS; - flags &= ~kStartingWriteTLS; - - [self closeWithError:error]; - } -} - -- (void)maybeStartTLS -{ - LogTrace(); - - // We can't start TLS until: - // - All queued reads prior to the user calling startTLS are complete - // - All queued writes prior to the user calling startTLS are complete - // - // We'll know these conditions are met when both kStartingReadTLS and kStartingWriteTLS are set - - if ((flags & kStartingReadTLS) && (flags & kStartingWriteTLS)) - { - LogVerbose(@"Starting TLS..."); - - if ([partialReadBuffer length] > 0) - { - NSString *msg = @"Invalid TLS transition. Handshake has already been read from socket."; - - [self closeWithError:[self otherError:msg]]; - return; - } - - [self suspendReadSource]; - [self suspendWriteSource]; - - socketFDBytesAvailable = 0; - flags &= ~kSocketCanAcceptBytes; - flags &= ~kSecureSocketHasBytesAvailable; - - if (![self createReadAndWriteStream]) - { - [self closeWithError:[self otherError:@"Error in CFStreamCreatePairWithSocket"]]; - return; - } - - if (![self registerForStreamCallbacksIncludingReadWrite:YES]) - { - [self closeWithError:[self otherError:@"Error in CFStreamSetClient"]]; - return; - } - - if (![self addStreamsToRunLoop]) - { - [self closeWithError:[self otherError:@"Error in CFStreamScheduleWithRunLoop"]]; - return; - } - - NSAssert([currentRead isKindOfClass:[GCDAsyncSpecialPacket class]], @"Invalid read packet for startTLS"); - NSAssert([currentWrite isKindOfClass:[GCDAsyncSpecialPacket class]], @"Invalid write packet for startTLS"); - - GCDAsyncSpecialPacket *tlsPacket = (GCDAsyncSpecialPacket *)currentRead; - NSDictionary *tlsSettings = tlsPacket->tlsSettings; - - // Getting an error concerning kCFStreamPropertySSLSettings ? - // You need to add the CFNetwork framework to your iOS application. - - BOOL r1 = CFReadStreamSetProperty(readStream, kCFStreamPropertySSLSettings, (CFDictionaryRef)tlsSettings); - BOOL r2 = CFWriteStreamSetProperty(writeStream, kCFStreamPropertySSLSettings, (CFDictionaryRef)tlsSettings); - - // For some reason, starting around the time of iOS 4.3, - // the first call to set the kCFStreamPropertySSLSettings will return true, - // but the second will return false. - // - // Order doesn't seem to matter. - // So you could call CFReadStreamSetProperty and then CFWriteStreamSetProperty, or you could reverse the order. - // Either way, the first call will return true, and the second returns false. - // - // Interestingly, this doesn't seem to affect anything. - // Which is not altogether unusual, as the documentation seems to suggest that (for many settings) - // setting it on one side of the stream automatically sets it for the other side of the stream. - // - // Although there isn't anything in the documentation to suggest that the second attempt would fail. - // - // Furthermore, this only seems to affect streams that are negotiating a security upgrade. - // In other words, the socket gets connected, there is some back-and-forth communication over the unsecure - // connection, and then a startTLS is issued. - // So this mostly affects newer protocols (XMPP, IMAP) as opposed to older protocols (HTTPS). - - if (!r1 && !r2) // Yes, the && is correct - workaround for apple bug. - { - [self closeWithError:[self otherError:@"Error in CFStreamSetProperty"]]; - return; - } - - if (![self openStreams]) - { - [self closeWithError:[self otherError:@"Error in CFStreamOpen"]]; - return; - } - - LogVerbose(@"Waiting for SSL Handshake to complete..."); - } -} - -#endif - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark CFStream -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -#if TARGET_OS_IPHONE - -+ (void)startListenerThreadIfNeeded -{ - static dispatch_once_t predicate; - dispatch_once(&predicate, ^{ - - listenerThread = [[NSThread alloc] initWithTarget:self - selector:@selector(listenerThread) - object:nil]; - [listenerThread start]; - }); -} - -+ (void)listenerThread -{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - LogInfo(@"ListenerThread: Started"); - - // We can't run the run loop unless it has an associated input source or a timer. - // So we'll just create a timer that will never fire - unless the server runs for a decades. - [NSTimer scheduledTimerWithTimeInterval:[[NSDate distantFuture] timeIntervalSinceNow] - target:self - selector:@selector(ignore:) - userInfo:nil - repeats:YES]; - - [[NSRunLoop currentRunLoop] run]; - - LogInfo(@"ListenerThread: Stopped"); - - [pool drain]; -} - -+ (void)addStreamListener:(GCDAsyncSocket *)asyncSocket -{ - LogTrace(); - NSAssert([NSThread currentThread] == listenerThread, @"Invoked on wrong thread"); - - CFRunLoopRef runLoop = CFRunLoopGetCurrent(); - - if (asyncSocket->readStream) - CFReadStreamScheduleWithRunLoop(asyncSocket->readStream, runLoop, kCFRunLoopDefaultMode); - - if (asyncSocket->writeStream) - CFWriteStreamScheduleWithRunLoop(asyncSocket->writeStream, runLoop, kCFRunLoopDefaultMode); -} - -+ (void)removeStreamListener:(GCDAsyncSocket *)asyncSocket -{ - LogTrace(); - NSAssert([NSThread currentThread] == listenerThread, @"Invoked on wrong thread"); - - CFRunLoopRef runLoop = CFRunLoopGetCurrent(); - - if (asyncSocket->readStream) - CFReadStreamUnscheduleFromRunLoop(asyncSocket->readStream, runLoop, kCFRunLoopDefaultMode); - - if (asyncSocket->writeStream) - CFWriteStreamUnscheduleFromRunLoop(asyncSocket->writeStream, runLoop, kCFRunLoopDefaultMode); -} - -static void CFReadStreamCallback (CFReadStreamRef stream, CFStreamEventType type, void *pInfo) -{ - GCDAsyncSocket *asyncSocket = [(GCDAsyncSocket *)pInfo retain]; - - switch(type) - { - case kCFStreamEventHasBytesAvailable: - { - dispatch_async(asyncSocket->socketQueue, ^{ - - LogCVerbose(@"CFReadStreamCallback - HasBytesAvailable"); - - if (asyncSocket->readStream != stream) - return_from_block; - - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - if ((asyncSocket->flags & kStartingReadTLS) && (asyncSocket->flags & kStartingWriteTLS)) - { - // If we set kCFStreamPropertySSLSettings before we opened the streams, this might be a lie. - // (A callback related to the tcp stream, but not to the SSL layer). - - if (CFReadStreamHasBytesAvailable(asyncSocket->readStream)) - { - asyncSocket->flags |= kSecureSocketHasBytesAvailable; - [asyncSocket finishSSLHandshake]; - } - } - else - { - asyncSocket->flags |= kSecureSocketHasBytesAvailable; - [asyncSocket doReadData]; - } - - [pool drain]; - }); - - break; - } - default: - { - NSError *error = NSMakeCollectable(CFReadStreamCopyError(stream)); - if (error == nil && type == kCFStreamEventEndEncountered) - { - error = [[asyncSocket connectionClosedError] retain]; - } - - dispatch_async(asyncSocket->socketQueue, ^{ - - LogCVerbose(@"CFReadStreamCallback - Other"); - - if (asyncSocket->readStream != stream) - return_from_block; - - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - if ((asyncSocket->flags & kStartingReadTLS) && (asyncSocket->flags & kStartingWriteTLS)) - { - [asyncSocket abortSSLHandshake:error]; - } - else - { - [asyncSocket closeWithError:error]; - } - - [pool drain]; - }); - - [error release]; - break; - } - } - - [asyncSocket release]; -} - -static void CFWriteStreamCallback (CFWriteStreamRef stream, CFStreamEventType type, void *pInfo) -{ - GCDAsyncSocket *asyncSocket = [(GCDAsyncSocket *)pInfo retain]; - - switch(type) - { - case kCFStreamEventCanAcceptBytes: - { - dispatch_async(asyncSocket->socketQueue, ^{ - - LogCVerbose(@"CFWriteStreamCallback - CanAcceptBytes"); - - if (asyncSocket->writeStream != stream) - return_from_block; - - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - if ((asyncSocket->flags & kStartingReadTLS) && (asyncSocket->flags & kStartingWriteTLS)) - { - // If we set kCFStreamPropertySSLSettings before we opened the streams, this might be a lie. - // (A callback related to the tcp stream, but not to the SSL layer). - - if (CFWriteStreamCanAcceptBytes(asyncSocket->writeStream)) - { - asyncSocket->flags |= kSocketCanAcceptBytes; - [asyncSocket finishSSLHandshake]; - } - } - else - { - asyncSocket->flags |= kSocketCanAcceptBytes; - [asyncSocket doWriteData]; - } - - [pool drain]; - }); - - break; - } - default: - { - NSError *error = NSMakeCollectable(CFWriteStreamCopyError(stream)); - if (error == nil && type == kCFStreamEventEndEncountered) - { - error = [[asyncSocket connectionClosedError] retain]; - } - - dispatch_async(asyncSocket->socketQueue, ^{ - - LogCVerbose(@"CFWriteStreamCallback - Other"); - - if (asyncSocket->writeStream != stream) - return_from_block; - - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - if ((asyncSocket->flags & kStartingReadTLS) && (asyncSocket->flags & kStartingWriteTLS)) - { - [asyncSocket abortSSLHandshake:error]; - } - else - { - [asyncSocket closeWithError:error]; - } - - [pool drain]; - }); - - [error release]; - break; - } - } - - [asyncSocket release]; -} - -- (BOOL)createReadAndWriteStream -{ - LogTrace(); - - NSAssert(dispatch_get_current_queue() == socketQueue, @"Must be dispatched on socketQueue"); - - - if (readStream || writeStream) - { - // Streams already created - return YES; - } - - int socketFD = (socket6FD == SOCKET_NULL) ? socket4FD : socket6FD; - - if (socketFD == SOCKET_NULL) - { - // Cannot create streams without a file descriptor - return NO; - } - - if (![self isConnected]) - { - // Cannot create streams until file descriptor is connected - return NO; - } - - LogVerbose(@"Creating read and write stream..."); - - CFStreamCreatePairWithSocket(NULL, (CFSocketNativeHandle)socketFD, &readStream, &writeStream); - - // The kCFStreamPropertyShouldCloseNativeSocket property should be false by default (for our case). - // But let's not take any chances. - - if (readStream) - CFReadStreamSetProperty(readStream, kCFStreamPropertyShouldCloseNativeSocket, kCFBooleanFalse); - if (writeStream) - CFWriteStreamSetProperty(writeStream, kCFStreamPropertyShouldCloseNativeSocket, kCFBooleanFalse); - - if ((readStream == NULL) || (writeStream == NULL)) - { - LogWarn(@"Unable to create read and write stream..."); - - if (readStream) - { - CFReadStreamClose(readStream); - CFRelease(readStream); - readStream = NULL; - } - if (writeStream) - { - CFWriteStreamClose(writeStream); - CFRelease(writeStream); - writeStream = NULL; - } - - return NO; - } - - return YES; -} - -- (BOOL)registerForStreamCallbacksIncludingReadWrite:(BOOL)includeReadWrite -{ - LogVerbose(@"%@ %@", THIS_METHOD, (includeReadWrite ? @"YES" : @"NO")); - - NSAssert(dispatch_get_current_queue() == socketQueue, @"Must be dispatched on socketQueue"); - NSAssert((readStream != NULL && writeStream != NULL), @"Read/Write stream is null"); - - streamContext.version = 0; - streamContext.info = self; - streamContext.retain = nil; - streamContext.release = nil; - streamContext.copyDescription = nil; - - CFOptionFlags readStreamEvents = kCFStreamEventErrorOccurred | kCFStreamEventEndEncountered; - if (includeReadWrite) - readStreamEvents |= kCFStreamEventHasBytesAvailable; - - if (!CFReadStreamSetClient(readStream, readStreamEvents, &CFReadStreamCallback, &streamContext)) - { - return NO; - } - - CFOptionFlags writeStreamEvents = kCFStreamEventErrorOccurred | kCFStreamEventEndEncountered; - if (includeReadWrite) - writeStreamEvents |= kCFStreamEventCanAcceptBytes; - - if (!CFWriteStreamSetClient(writeStream, writeStreamEvents, &CFWriteStreamCallback, &streamContext)) - { - return NO; - } - - return YES; -} - -- (BOOL)addStreamsToRunLoop -{ - LogTrace(); - - NSAssert(dispatch_get_current_queue() == socketQueue, @"Must be dispatched on socketQueue"); - NSAssert((readStream != NULL && writeStream != NULL), @"Read/Write stream is null"); - - if (!(flags & kAddedStreamListener)) - { - LogVerbose(@"Adding streams to runloop..."); - - [[self class] startListenerThreadIfNeeded]; - [[self class] performSelector:@selector(addStreamListener:) - onThread:listenerThread - withObject:self - waitUntilDone:YES]; - - flags |= kAddedStreamListener; - } - - return YES; -} - -- (void)removeStreamsFromRunLoop -{ - LogTrace(); - - NSAssert(dispatch_get_current_queue() == socketQueue, @"Must be dispatched on socketQueue"); - NSAssert((readStream != NULL && writeStream != NULL), @"Read/Write stream is null"); - - if (flags & kAddedStreamListener) - { - LogVerbose(@"Removing streams from runloop..."); - - [[self class] performSelector:@selector(removeStreamListener:) - onThread:listenerThread - withObject:self - waitUntilDone:YES]; - - flags &= ~kAddedStreamListener; - } -} - -- (BOOL)openStreams -{ - LogTrace(); - - NSAssert(dispatch_get_current_queue() == socketQueue, @"Must be dispatched on socketQueue"); - NSAssert((readStream != NULL && writeStream != NULL), @"Read/Write stream is null"); - - CFStreamStatus readStatus = CFReadStreamGetStatus(readStream); - CFStreamStatus writeStatus = CFWriteStreamGetStatus(writeStream); - - if ((readStatus == kCFStreamStatusNotOpen) || (writeStatus == kCFStreamStatusNotOpen)) - { - LogVerbose(@"Opening read and write stream..."); - - BOOL r1 = CFReadStreamOpen(readStream); - BOOL r2 = CFWriteStreamOpen(writeStream); - - if (!r1 || !r2) - { - LogError(@"Error in CFStreamOpen"); - return NO; - } - } - - return YES; -} - -#endif - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Advanced -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (void)performBlock:(dispatch_block_t)block -{ - dispatch_sync(socketQueue, block); -} - -- (int)socketFD -{ - if (dispatch_get_current_queue() != socketQueue) - { - LogWarn(@"%@ - Method only available from within the context of a performBlock: invocation", THIS_METHOD); - return SOCKET_NULL; - } - - if (socket4FD != SOCKET_NULL) - return socket4FD; - else - return socket6FD; -} - -- (int)socket4FD -{ - if (dispatch_get_current_queue() != socketQueue) - { - LogWarn(@"%@ - Method only available from within the context of a performBlock: invocation", THIS_METHOD); - return SOCKET_NULL; - } - - return socket4FD; -} - -- (int)socket6FD -{ - if (dispatch_get_current_queue() != socketQueue) - { - LogWarn(@"%@ - Method only available from within the context of a performBlock: invocation", THIS_METHOD); - return SOCKET_NULL; - } - - return socket6FD; -} - -#if TARGET_OS_IPHONE - -- (CFReadStreamRef)readStream -{ - if (dispatch_get_current_queue() != socketQueue) - { - LogWarn(@"%@ - Method only available from within the context of a performBlock: invocation", THIS_METHOD); - return NULL; - } - - if (readStream == NULL) - [self createReadAndWriteStream]; - - return readStream; -} - -- (CFWriteStreamRef)writeStream -{ - if (dispatch_get_current_queue() != socketQueue) - { - LogWarn(@"%@ - Method only available from within the context of a performBlock: invocation", THIS_METHOD); - return NULL; - } - - if (writeStream == NULL) - [self createReadAndWriteStream]; - - return writeStream; -} - -- (BOOL)enableBackgroundingOnSocketWithCaveat:(BOOL)caveat -{ - if (![self createReadAndWriteStream]) - { - // Error occured creating streams (perhaps socket isn't open) - return NO; - } - - BOOL r1, r2; - - LogVerbose(@"Enabling backgrouding on socket"); - - r1 = CFReadStreamSetProperty(readStream, kCFStreamNetworkServiceType, kCFStreamNetworkServiceTypeVoIP); - r2 = CFWriteStreamSetProperty(writeStream, kCFStreamNetworkServiceType, kCFStreamNetworkServiceTypeVoIP); - - if (!r1 || !r2) - { - return NO; - } - - if (!caveat) - { - if (![self openStreams]) - { - return NO; - } - } - - return YES; -} - -- (BOOL)enableBackgroundingOnSocket -{ - LogTrace(); - - if (dispatch_get_current_queue() != socketQueue) - { - LogWarn(@"%@ - Method only available from within the context of a performBlock: invocation", THIS_METHOD); - return NO; - } - - return [self enableBackgroundingOnSocketWithCaveat:NO]; -} - -- (BOOL)enableBackgroundingOnSocketWithCaveat // Deprecated in iOS 4.??? -{ - // This method was created as a workaround for a bug in iOS. - // Apple has since fixed this bug. - // I'm not entirely sure which version of iOS they fixed it in... - - LogTrace(); - - if (dispatch_get_current_queue() != socketQueue) - { - LogWarn(@"%@ - Method only available from within the context of a performBlock: invocation", THIS_METHOD); - return NO; - } - - return [self enableBackgroundingOnSocketWithCaveat:YES]; -} - -#else - -- (SSLContextRef)sslContext -{ - if (dispatch_get_current_queue() != socketQueue) - { - LogWarn(@"%@ - Method only available from within the context of a performBlock: invocation", THIS_METHOD); - return NULL; - } - - return sslContext; -} - -#endif - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Class Methods -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -+ (NSString *)hostFromSockaddr4:(const struct sockaddr_in *)pSockaddr4 -{ - char addrBuf[INET_ADDRSTRLEN]; - - if (inet_ntop(AF_INET, &pSockaddr4->sin_addr, addrBuf, (socklen_t)sizeof(addrBuf)) == NULL) - { - addrBuf[0] = '\0'; - } - - return [NSString stringWithCString:addrBuf encoding:NSASCIIStringEncoding]; -} - -+ (NSString *)hostFromSockaddr6:(const struct sockaddr_in6 *)pSockaddr6 -{ - char addrBuf[INET6_ADDRSTRLEN]; - - if (inet_ntop(AF_INET6, &pSockaddr6->sin6_addr, addrBuf, (socklen_t)sizeof(addrBuf)) == NULL) - { - addrBuf[0] = '\0'; - } - - return [NSString stringWithCString:addrBuf encoding:NSASCIIStringEncoding]; -} - -+ (uint16_t)portFromSockaddr4:(const struct sockaddr_in *)pSockaddr4 -{ - return ntohs(pSockaddr4->sin_port); -} - -+ (uint16_t)portFromSockaddr6:(const struct sockaddr_in6 *)pSockaddr6 -{ - return ntohs(pSockaddr6->sin6_port); -} - -+ (NSString *)hostFromAddress:(NSData *)address -{ - NSString *host; - - if ([self getHost:&host port:NULL fromAddress:address]) - return host; - else - return nil; -} - -+ (uint16_t)portFromAddress:(NSData *)address -{ - uint16_t port; - - if ([self getHost:NULL port:&port fromAddress:address]) - return port; - else - return 0; -} - -+ (BOOL)getHost:(NSString **)hostPtr port:(uint16_t *)portPtr fromAddress:(NSData *)address -{ - if ([address length] >= sizeof(struct sockaddr)) - { - const struct sockaddr *sockaddrX = [address bytes]; - - if (sockaddrX->sa_family == AF_INET) - { - if ([address length] >= sizeof(struct sockaddr_in)) - { - struct sockaddr_in sockaddr4; - memcpy(&sockaddr4, sockaddrX, sizeof(sockaddr4)); - - if (hostPtr) *hostPtr = [self hostFromSockaddr4:&sockaddr4]; - if (portPtr) *portPtr = [self portFromSockaddr4:&sockaddr4]; - - return YES; - } - } - else if (sockaddrX->sa_family == AF_INET6) - { - if ([address length] >= sizeof(struct sockaddr_in6)) - { - struct sockaddr_in6 sockaddr6; - memcpy(&sockaddr6, sockaddrX, sizeof(sockaddr6)); - - if (hostPtr) *hostPtr = [self hostFromSockaddr6:&sockaddr6]; - if (portPtr) *portPtr = [self portFromSockaddr6:&sockaddr6]; - - return YES; - } - } - } - - return NO; -} - -+ (NSData *)CRLFData -{ - return [NSData dataWithBytes:"\x0D\x0A" length:2]; -} - -+ (NSData *)CRData -{ - return [NSData dataWithBytes:"\x0D" length:1]; -} - -+ (NSData *)LFData -{ - return [NSData dataWithBytes:"\x0A" length:1]; -} - -+ (NSData *)ZeroData -{ - return [NSData dataWithBytes:"" length:1]; -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/About.txt b/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/About.txt deleted file mode 100644 index d0aa3bbf15368..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/About.txt +++ /dev/null @@ -1,33 +0,0 @@ -CocoaLumberjack is under the New BSD License. -http://code.google.com/p/cocoalumberjack/ - -Extensive documentation, tutorials, etc are available: -http://code.google.com/p/cocoalumberjack/w/list - -Overview of the project (copied from google code homepage): - - - -The lumberjack framework is fast & simple, yet powerful & flexible. -It is similar in concept to other popular logging frameworks such as log4j, yet is designed specifically for objective-c, and takes advantage of features such as multi-threading, grand central dispatch (if available), lockless atomic operations, and the dynamic nature of the objective-c runtime. - -Lumberjack is fast: -In most cases it is an order of magnitude faster than NSLog. - -Lumberjack is simple: -It takes as little as a single line of code to configure lumberjack when your application launches. Then simply replace your NSLog statements with DDLog statements and that's about it. (And the DDLog macros have the exact same format and syntax as NSLog, so it's super easy.) - -Lumberjack is powerful: -One log statement can be sent to multiple loggers, meaning you can log to a file and the console simultaneously. Want more? Create your own loggers (it's easy) and send your log statements over the network. Or to a database or distributed file system. The sky is the limit. - -Lumberjack is flexible: -Configure your logging however you want. Change log levels per file (perfect for debugging). Change log levels per logger (verbose console, but concise log file). Change log levels per xcode configuration (verbose debug, but concise release). Have your log statements compiled out of the release build. Customize the number of log levels for your application. Add your own fine-grained logging. Dynamically change log levels during runtime. Choose how & when you want your log files to be rolled. Upload your log files to a central server. Compress archived log files to save disk space... - - - -This framework is for you if: - -You're looking for a way to track down that impossible-to-reproduce bug that keeps popping up in the field. -You're frustrated with the super short console log on the iPhone. -You're looking to take your application to the next level in terms of support and stability. -You're looking for an enterprise level logging solution for your application (Mac or iPhone). \ No newline at end of file diff --git a/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/DDASLLogger.h b/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/DDASLLogger.h deleted file mode 100644 index eec4bb2ae3ec9..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/DDASLLogger.h +++ /dev/null @@ -1,41 +0,0 @@ -#import -#import - -#import "DDLog.h" - -/** - * Welcome to Cocoa Lumberjack! - * - * The Google Code page has a wealth of documentation if you have any questions. - * http://code.google.com/p/cocoalumberjack/ - * - * If you're new to the project you may wish to read the "Getting Started" page. - * http://code.google.com/p/cocoalumberjack/wiki/GettingStarted - * - * - * This class provides a logger for the Apple System Log facility. - * - * As described in the "Getting Started" page, - * the traditional NSLog() function directs it's output to two places: - * - * - Apple System Log - * - StdErr (if stderr is a TTY) so log statements show up in Xcode console - * - * To duplicate NSLog() functionality you can simply add this logger and a tty logger. - * However, if you instead choose to use file logging (for faster performance), - * you may choose to use a file logger and a tty logger. -**/ - -@interface DDASLLogger : DDAbstractLogger -{ - aslclient client; -} - -+ (DDASLLogger *)sharedInstance; - -// Inherited from DDAbstractLogger - -// - (id )logFormatter; -// - (void)setLogFormatter:(id )formatter; - -@end diff --git a/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/DDASLLogger.m b/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/DDASLLogger.m deleted file mode 100644 index d88f192991f39..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/DDASLLogger.m +++ /dev/null @@ -1,86 +0,0 @@ -#import "DDASLLogger.h" - -#import - - -@implementation DDASLLogger - -static DDASLLogger *sharedInstance; - -/** - * The runtime sends initialize to each class in a program exactly one time just before the class, - * or any class that inherits from it, is sent its first message from within the program. (Thus the - * method may never be invoked if the class is not used.) The runtime sends the initialize message to - * classes in a thread-safe manner. Superclasses receive this message before their subclasses. - * - * This method may also be called directly (assumably by accident), hence the safety mechanism. -**/ -+ (void)initialize -{ - static BOOL initialized = NO; - if (!initialized) - { - initialized = YES; - - sharedInstance = [[DDASLLogger alloc] init]; - } -} - -+ (DDASLLogger *)sharedInstance -{ - return sharedInstance; -} - -- (id)init -{ - if (sharedInstance != nil) - { - [self release]; - return nil; - } - - if ((self = [super init])) - { - // A default asl client is provided for the main thread, - // but background threads need to create their own client. - - client = asl_open(NULL, "com.apple.console", 0); - } - return self; -} - -- (void)logMessage:(DDLogMessage *)logMessage -{ - NSString *logMsg = logMessage->logMsg; - - if (formatter) - { - logMsg = [formatter formatLogMessage:logMessage]; - } - - if (logMsg) - { - const char *msg = [logMsg UTF8String]; - - int aslLogLevel; - switch (logMessage->logLevel) - { - // Note: By default ASL will filter anything above level 5 (Notice). - // So our mappings shouldn't go above that level. - - case 1 : aslLogLevel = ASL_LEVEL_CRIT; break; - case 2 : aslLogLevel = ASL_LEVEL_ERR; break; - case 3 : aslLogLevel = ASL_LEVEL_WARNING; break; - default : aslLogLevel = ASL_LEVEL_NOTICE; break; - } - - asl_log(client, NULL, aslLogLevel, "%s", msg); - } -} - -- (NSString *)loggerName -{ - return @"cocoa.lumberjack.aslLogger"; -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/DDAbstractDatabaseLogger.h b/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/DDAbstractDatabaseLogger.h deleted file mode 100644 index 07b6620d19acc..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/DDAbstractDatabaseLogger.h +++ /dev/null @@ -1,102 +0,0 @@ -#import - -#import "DDLog.h" - -/** - * Welcome to Cocoa Lumberjack! - * - * The Google Code page has a wealth of documentation if you have any questions. - * http://code.google.com/p/cocoalumberjack/ - * - * If you're new to the project you may wish to read the "Getting Started" page. - * http://code.google.com/p/cocoalumberjack/wiki/GettingStarted - * - * - * This class provides an abstract implementation of a database logger. - * - * That is, it provides the base implementation for a database logger to build atop of. - * All that is needed for a concrete database logger is to extend this class - * and override the methods in the implementation file that are prefixed with "db_". -**/ - -@interface DDAbstractDatabaseLogger : DDAbstractLogger { -@protected - NSUInteger saveThreshold; - NSTimeInterval saveInterval; - NSTimeInterval maxAge; - NSTimeInterval deleteInterval; - BOOL deleteOnEverySave; - - BOOL saveTimerSuspended; - NSUInteger unsavedCount; - dispatch_time_t unsavedTime; - dispatch_source_t saveTimer; - dispatch_time_t lastDeleteTime; - dispatch_source_t deleteTimer; -} - -/** - * Specifies how often to save the data to disk. - * Since saving is an expensive operation (disk io) it is not done after every log statement. - * These properties allow you to configure how/when the logger saves to disk. - * - * A save is done when either (whichever happens first): - * - * - The number of unsaved log entries reaches saveThreshold - * - The amount of time since the oldest unsaved log entry was created reaches saveInterval - * - * You can optionally disable the saveThreshold by setting it to zero. - * If you disable the saveThreshold you are entirely dependent on the saveInterval. - * - * You can optionally disable the saveInterval by setting it to zero (or a negative value). - * If you disable the saveInterval you are entirely dependent on the saveThreshold. - * - * It's not wise to disable both saveThreshold and saveInterval. - * - * The default saveThreshold is 500. - * The default saveInterval is 60 seconds. -**/ -@property (assign, readwrite) NSUInteger saveThreshold; -@property (assign, readwrite) NSTimeInterval saveInterval; - -/** - * It is likely you don't want the log entries to persist forever. - * Doing so would allow the database to grow infinitely large over time. - * - * The maxAge property provides a way to specify how old a log statement can get - * before it should get deleted from the database. - * - * The deleteInterval specifies how often to sweep for old log entries. - * Since deleting is an expensive operation (disk io) is is done on a fixed interval. - * - * An alternative to the deleteInterval is the deleteOnEverySave option. - * This specifies that old log entries should be deleted during every save operation. - * - * You can optionally disable the maxAge by setting it to zero (or a negative value). - * If you disable the maxAge then old log statements are not deleted. - * - * You can optionally disable the deleteInterval by setting it to zero (or a negative value). - * - * If you disable both deleteInterval and deleteOnEverySave then old log statements are not deleted. - * - * It's not wise to enable both deleteInterval and deleteOnEverySave. - * - * The default maxAge is 7 days. - * The default deleteInterval is 5 minutes. - * The default deleteOnEverySave is NO. -**/ -@property (assign, readwrite) NSTimeInterval maxAge; -@property (assign, readwrite) NSTimeInterval deleteInterval; -@property (assign, readwrite) BOOL deleteOnEverySave; - -/** - * Forces a save of any pending log entries (flushes log entries to disk). -**/ -- (void)savePendingLogEntries; - -/** - * Removes any log entries that are older than maxAge. -**/ -- (void)deleteOldLogEntries; - -@end diff --git a/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/DDAbstractDatabaseLogger.m b/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/DDAbstractDatabaseLogger.m deleted file mode 100644 index 3e34d4e5e8371..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/DDAbstractDatabaseLogger.m +++ /dev/null @@ -1,608 +0,0 @@ -#import "DDAbstractDatabaseLogger.h" - -@interface DDAbstractDatabaseLogger () -- (void)destroySaveTimer; -- (void)destroyDeleteTimer; -@end - -#pragma mark - - -@implementation DDAbstractDatabaseLogger - -- (id)init -{ - if ((self = [super init])) - { - saveThreshold = 500; - saveInterval = 60; // 60 seconds - maxAge = (60 * 60 * 24 * 7); // 7 days - deleteInterval = (60 * 5); // 5 minutes - } - return self; -} - -- (void)dealloc -{ - [self destroySaveTimer]; - [self destroyDeleteTimer]; - - [super dealloc]; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Override Me -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (BOOL)db_log:(DDLogMessage *)logMessage -{ - // Override me and add your implementation. - // - // Return YES if an item was added to the buffer. - // Return NO if the logMessage was ignored. - - return NO; -} - -- (void)db_save -{ - // Override me and add your implementation. -} - -- (void)db_delete -{ - // Override me and add your implementation. -} - -- (void)db_saveAndDelete -{ - // Override me and add your implementation. -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Private API -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (void)performSaveAndSuspendSaveTimer -{ - if (unsavedCount > 0) - { - if (deleteOnEverySave) - [self db_saveAndDelete]; - else - [self db_save]; - } - - unsavedCount = 0; - unsavedTime = 0; - - if (saveTimer && !saveTimerSuspended) - { - dispatch_suspend(saveTimer); - saveTimerSuspended = YES; - } -} - -- (void)performDelete -{ - if (maxAge > 0.0) - { - [self db_delete]; - - lastDeleteTime = dispatch_time(DISPATCH_TIME_NOW, 0); - } -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Timers -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (void)destroySaveTimer -{ - if (saveTimer) - { - dispatch_source_cancel(saveTimer); - dispatch_release(saveTimer); - saveTimer = NULL; - } -} - -- (void)updateAndResumeSaveTimer -{ - if ((saveTimer != NULL) && (saveInterval > 0.0) && (unsavedTime > 0.0)) - { - uint64_t interval = saveInterval * NSEC_PER_SEC; - dispatch_time_t startTime = dispatch_time(unsavedTime, interval); - - dispatch_source_set_timer(saveTimer, startTime, interval, 1.0); - - if (saveTimerSuspended) - { - dispatch_resume(saveTimer); - saveTimerSuspended = NO; - } - } -} - -- (void)createSuspendedSaveTimer -{ - if ((saveTimer == NULL) && (saveInterval > 0.0)) - { - saveTimer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, loggerQueue); - - dispatch_source_set_event_handler(saveTimer, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - [self performSaveAndSuspendSaveTimer]; - - [pool drain]; - }); - - saveTimerSuspended = YES; - } -} - -- (void)destroyDeleteTimer -{ - if (deleteTimer) - { - dispatch_source_cancel(deleteTimer); - dispatch_release(deleteTimer); - deleteTimer = NULL; - } -} - -- (void)updateDeleteTimer -{ - if ((deleteTimer != NULL) && (deleteInterval > 0.0) && (maxAge > 0.0)) - { - uint64_t interval = deleteInterval * NSEC_PER_SEC; - dispatch_time_t startTime; - - if (lastDeleteTime > 0) - startTime = dispatch_time(lastDeleteTime, interval); - else - startTime = dispatch_time(DISPATCH_TIME_NOW, interval); - - dispatch_source_set_timer(deleteTimer, startTime, interval, 1.0); - } -} - -- (void)createAndStartDeleteTimer -{ - if ((deleteTimer == NULL) && (deleteInterval > 0.0) && (maxAge > 0.0)) - { - deleteTimer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, loggerQueue); - - dispatch_source_set_event_handler(deleteTimer, ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - [self performDelete]; - - [pool drain]; - }); - - [self updateDeleteTimer]; - - dispatch_resume(deleteTimer); - } -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Configuration -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (NSUInteger)saveThreshold -{ - if (dispatch_get_current_queue() == loggerQueue) - { - return saveThreshold; - } - else - { - __block NSUInteger result; - - dispatch_sync(loggerQueue, ^{ - result = saveThreshold; - }); - - return result; - } -} - -- (void)setSaveThreshold:(NSUInteger)threshold -{ - dispatch_block_t block = ^{ - - if (saveThreshold != threshold) - { - saveThreshold = threshold; - - // Since the saveThreshold has changed, - // we check to see if the current unsavedCount has surpassed the new threshold. - // - // If it has, we immediately save the log. - - if ((unsavedCount >= saveThreshold) && (saveThreshold > 0)) - { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - [self performSaveAndSuspendSaveTimer]; - - [pool drain]; - } - } - }; - - if (dispatch_get_current_queue() == loggerQueue) - block(); - else - dispatch_async(loggerQueue, block); -} - -- (NSTimeInterval)saveInterval -{ - if (dispatch_get_current_queue() == loggerQueue) - { - return saveInterval; - } - else - { - __block NSTimeInterval result; - - dispatch_sync(loggerQueue, ^{ - result = saveInterval; - }); - - return result; - } -} - -- (void)setSaveInterval:(NSTimeInterval)interval -{ - dispatch_block_t block = ^{ - - if (saveInterval != interval) - { - saveInterval = interval; - - // There are several cases we need to handle here. - // - // 1. If the saveInterval was previously enabled and it just got disabled, - // then we need to stop the saveTimer. (And we might as well release it.) - // - // 2. If the saveInterval was previously disabled and it just got enabled, - // then we need to setup the saveTimer. (Plus we might need to do an immediate save.) - // - // 3. If the saveInterval increased, then we need to reset the timer so that it fires at the later date. - // - // 4. If the saveInterval decreased, then we need to reset the timer so that it fires at an earlier date. - // (Plus we might need to do an immediate save.) - - if (saveInterval > 0.0) - { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - if (saveTimer == NULL) - { - // Handles #2 - // - // Since the saveTimer uses the unsavedTime to calculate it's first fireDate, - // if a save is needed the timer will fire immediately. - - [self createSuspendedSaveTimer]; - [self updateAndResumeSaveTimer]; - } - else - { - // Handles #3 - // Handles #4 - // - // Since the saveTimer uses the unsavedTime to calculate it's first fireDate, - // if a save is needed the timer will fire immediately. - - [self updateAndResumeSaveTimer]; - } - - [pool drain]; - } - else if (saveTimer) - { - // Handles #1 - - [self destroySaveTimer]; - } - } - }; - - if (dispatch_get_current_queue() == loggerQueue) - block(); - else - dispatch_async(loggerQueue, block); -} - -- (NSTimeInterval)maxAge -{ - if (dispatch_get_current_queue() == loggerQueue) - { - return maxAge; - } - else - { - __block NSTimeInterval result; - - dispatch_sync(loggerQueue, ^{ - result = maxAge; - }); - - return result; - } -} - -- (void)setMaxAge:(NSTimeInterval)interval -{ - dispatch_block_t block = ^{ - - if (maxAge != interval) - { - NSTimeInterval oldMaxAge = maxAge; - NSTimeInterval newMaxAge = interval; - - maxAge = interval; - - // There are several cases we need to handle here. - // - // 1. If the maxAge was previously enabled and it just got disabled, - // then we need to stop the deleteTimer. (And we might as well release it.) - // - // 2. If the maxAge was previously disabled and it just got enabled, - // then we need to setup the deleteTimer. (Plus we might need to do an immediate delete.) - // - // 3. If the maxAge was increased, - // then we don't need to do anything. - // - // 4. If the maxAge was decreased, - // then we should do an immediate delete. - - BOOL shouldDeleteNow = NO; - - if (oldMaxAge > 0.0) - { - if (newMaxAge <= 0.0) - { - // Handles #1 - - [self destroyDeleteTimer]; - } - else if (oldMaxAge > newMaxAge) - { - // Handles #4 - shouldDeleteNow = YES; - } - } - else if (newMaxAge > 0.0) - { - // Handles #2 - shouldDeleteNow = YES; - } - - if (shouldDeleteNow) - { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - [self performDelete]; - - if (deleteTimer) - [self updateDeleteTimer]; - else - [self createAndStartDeleteTimer]; - - [pool drain]; - } - } - }; - - if (dispatch_get_current_queue() == loggerQueue) - block(); - else - dispatch_async(loggerQueue, block); -} - -- (NSTimeInterval)deleteInterval -{ - if (dispatch_get_current_queue() == loggerQueue) - { - return deleteInterval; - } - else - { - __block NSTimeInterval result; - - dispatch_sync(loggerQueue, ^{ - result = deleteInterval; - }); - - return result; - } -} - -- (void)setDeleteInterval:(NSTimeInterval)interval -{ - dispatch_block_t block = ^{ - - if (deleteInterval != interval) - { - deleteInterval = interval; - - // There are several cases we need to handle here. - // - // 1. If the deleteInterval was previously enabled and it just got disabled, - // then we need to stop the deleteTimer. (And we might as well release it.) - // - // 2. If the deleteInterval was previously disabled and it just got enabled, - // then we need to setup the deleteTimer. (Plus we might need to do an immediate delete.) - // - // 3. If the deleteInterval increased, then we need to reset the timer so that it fires at the later date. - // - // 4. If the deleteInterval decreased, then we need to reset the timer so that it fires at an earlier date. - // (Plus we might need to do an immediate delete.) - - if (deleteInterval > 0.0) - { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - if (deleteTimer == NULL) - { - // Handles #2 - // - // Since the deleteTimer uses the lastDeleteTime to calculate it's first fireDate, - // if a delete is needed the timer will fire immediately. - - [self createAndStartDeleteTimer]; - } - else - { - // Handles #3 - // Handles #4 - // - // Since the deleteTimer uses the lastDeleteTime to calculate it's first fireDate, - // if a save is needed the timer will fire immediately. - - [self updateDeleteTimer]; - } - - [pool drain]; - } - else if (deleteTimer) - { - // Handles #1 - - [self destroyDeleteTimer]; - } - } - }; - - if (dispatch_get_current_queue() == loggerQueue) - block(); - else - dispatch_async(loggerQueue, block); -} - -- (BOOL)deleteOnEverySave -{ - if (dispatch_get_current_queue() == loggerQueue) - { - return deleteOnEverySave; - } - else - { - __block BOOL result; - - dispatch_sync(loggerQueue, ^{ - result = deleteOnEverySave; - }); - - return result; - } -} - -- (void)setDeleteOnEverySave:(BOOL)flag -{ - dispatch_block_t block = ^{ - - deleteOnEverySave = flag; - }; - - if (dispatch_get_current_queue() == loggerQueue) - block(); - else - dispatch_async(loggerQueue, block); -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Public API -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (void)savePendingLogEntries -{ - dispatch_block_t block = ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - [self performSaveAndSuspendSaveTimer]; - - [pool drain]; - }; - - if (dispatch_get_current_queue() == loggerQueue) - block(); - else - dispatch_async(loggerQueue, block); -} - -- (void)deleteOldLogEntries -{ - dispatch_block_t block = ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - [self performDelete]; - - [pool drain]; - }; - - if (dispatch_get_current_queue() == loggerQueue) - block(); - else - dispatch_async(loggerQueue, block); -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark DDLogger -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (void)didAddLogger -{ - // If you override me be sure to invoke [super didAddLogger]; - - [self createSuspendedSaveTimer]; - - [self createAndStartDeleteTimer]; -} - -- (void)willRemoveLogger -{ - // If you override me be sure to invoke [super willRemoveLogger]; - - [self performSaveAndSuspendSaveTimer]; - - [self destroySaveTimer]; - [self destroyDeleteTimer]; -} - -- (void)logMessage:(DDLogMessage *)logMessage -{ - if ([self db_log:logMessage]) - { - BOOL firstUnsavedEntry = (++unsavedCount == 1); - - if ((unsavedCount >= saveThreshold) && (saveThreshold > 0)) - { - [self performSaveAndSuspendSaveTimer]; - } - else if (firstUnsavedEntry) - { - unsavedTime = dispatch_time(DISPATCH_TIME_NOW, 0); - [self updateAndResumeSaveTimer]; - } - } -} - -- (void)flush -{ - // This method is invoked by DDLog's flushLog method. - // - // It is called automatically when the application quits, - // or if the developer invokes DDLog's flushLog method prior to crashing or something. - - [self performSaveAndSuspendSaveTimer]; -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/DDFileLogger.h b/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/DDFileLogger.h deleted file mode 100644 index 482152eaeab7e..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/DDFileLogger.h +++ /dev/null @@ -1,293 +0,0 @@ -#import -#import "DDLog.h" - -@class DDLogFileInfo; - -/** - * Welcome to Cocoa Lumberjack! - * - * The Google Code page has a wealth of documentation if you have any questions. - * http://code.google.com/p/cocoalumberjack/ - * - * If you're new to the project you may wish to read the "Getting Started" page. - * http://code.google.com/p/cocoalumberjack/wiki/GettingStarted - * - * - * This class provides a logger to write log statements to a file. -**/ - - -// Default configuration and safety/sanity values. -// -// maximumFileSize -> DEFAULT_LOG_MAX_FILE_SIZE -// rollingFrequency -> DEFAULT_LOG_ROLLING_FREQUENCY -// maximumNumberOfLogFiles -> DEFAULT_LOG_MAX_NUM_LOG_FILES -// -// You should carefully consider the proper configuration values for your application. - -#define DEFAULT_LOG_MAX_FILE_SIZE (1024 * 1024) // 1 MB -#define DEFAULT_LOG_ROLLING_FREQUENCY (60 * 60 * 24) // 24 Hours -#define DEFAULT_LOG_MAX_NUM_LOG_FILES (5) // 5 Files - - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -// The LogFileManager protocol is designed to allow you to control all aspects of your log files. -// -// The primary purpose of this is to allow you to do something with the log files after they have been rolled. -// Perhaps you want to compress them to save disk space. -// Perhaps you want to upload them to an FTP server. -// Perhaps you want to run some analytics on the file. -// -// A default LogFileManager is, of course, provided. -// The default LogFileManager simply deletes old log files according to the maximumNumberOfLogFiles property. -// -// This protocol provides various methods to fetch the list of log files. -// -// There are two variants: sorted and unsorted. -// If sorting is not necessary, the unsorted variant is obviously faster. -// The sorted variant will return an array sorted by when the log files were created, -// with the most recently created log file at index 0, and the oldest log file at the end of the array. -// -// You can fetch only the log file paths (full path including name), log file names (name only), -// or an array of DDLogFileInfo objects. -// The DDLogFileInfo class is documented below, and provides a handy wrapper that -// gives you easy access to various file attributes such as the creation date or the file size. - -@protocol DDLogFileManager -@required - -// Public properties - -@property (readwrite, assign) NSUInteger maximumNumberOfLogFiles; - -// Public methods - -- (NSString *)logsDirectory; - -- (NSArray *)unsortedLogFilePaths; -- (NSArray *)unsortedLogFileNames; -- (NSArray *)unsortedLogFileInfos; - -- (NSArray *)sortedLogFilePaths; -- (NSArray *)sortedLogFileNames; -- (NSArray *)sortedLogFileInfos; - -// Private methods (only to be used by DDFileLogger) - -- (NSString *)createNewLogFile; - -@optional - -// Notifications from DDFileLogger - -- (void)didArchiveLogFile:(NSString *)logFilePath; -- (void)didRollAndArchiveLogFile:(NSString *)logFilePath; - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -// Default log file manager. -// -// All log files are placed inside the logsDirectory. -// If a specific logsDirectory isn't specified, the default directory is used. -// On Mac, this is in ~/Library/Application Support//Logs. -// On iPhone, this is in ~/Documents/Logs. -// -// Log files are named "log-.txt", -// where uuid is a 6 character hexadecimal consisting of the set [0123456789ABCDEF]. -// -// Archived log files are automatically deleted according to the maximumNumberOfLogFiles property. - -@interface DDLogFileManagerDefault : NSObject -{ - NSUInteger maximumNumberOfLogFiles; - NSString *_logsDirectory; -} - -- (id)init; -- (id)initWithLogsDirectory:(NSString *)logsDirectory; - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -// Most users will want file log messages to be prepended with the date and time. -// Rather than forcing the majority of users to write their own formatter, -// we will supply a logical default formatter. -// Users can easily replace this formatter with their own by invoking the setLogFormatter method. -// It can also be removed by calling setLogFormatter, and passing a nil parameter. -// -// In addition to the convenience of having a logical default formatter, -// it will also provide a template that makes it easy for developers to copy and change. - -@interface DDLogFileFormatterDefault : NSObject -{ - NSDateFormatter *dateFormatter; -} - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -@interface DDFileLogger : DDAbstractLogger -{ - id logFileManager; - - DDLogFileInfo *currentLogFileInfo; - NSFileHandle *currentLogFileHandle; - - NSTimer *rollingTimer; - - unsigned long long maximumFileSize; - NSTimeInterval rollingFrequency; -} - -- (id)init; -- (id)initWithLogFileManager:(id )logFileManager; - -// Configuration -// -// maximumFileSize: -// The approximate maximum size to allow log files to grow. -// If a log file is larger than this value after a write, -// then the log file is rolled. -// -// rollingFrequency -// How often to roll the log file. -// The frequency is given as an NSTimeInterval, which is a double that specifies the interval in seconds. -// Once the log file gets to be this old, it is rolled. -// -// Both the maximumFileSize and the rollingFrequency are used to manage rolling. -// Whichever occurs first will cause the log file to be rolled. -// -// For example: -// The rollingFrequency is 24 hours, -// but the log file surpasses the maximumFileSize after only 20 hours. -// The log file will be rolled at that 20 hour mark. -// A new log file will be created, and the 24 hour timer will be restarted. -// -// logFileManager -// Allows you to retrieve the list of log files, -// and configure the maximum number of archived log files to keep. - -@property (readwrite, assign) unsigned long long maximumFileSize; - -@property (readwrite, assign) NSTimeInterval rollingFrequency; - -@property (nonatomic, readonly) id logFileManager; - - -// You can optionally force the current log file to be rolled with this method. - -- (void)rollLogFile; - -// Inherited from DDAbstractLogger - -// - (id )logFormatter; -// - (void)setLogFormatter:(id )formatter; - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -// DDLogFileInfo is a simple class that provides access to various file attributes. -// It provides good performance as it only fetches the information if requested, -// and it caches the information to prevent duplicate fetches. -// -// It was designed to provide quick snapshots of the current state of log files, -// and to help sort log files in an array. -// -// This class does not monitor the files, or update it's cached attribute values if the file changes on disk. -// This is not what the class was designed for. -// -// If you absolutely must get updated values, -// you can invoke the reset method which will clear the cache. - -@interface DDLogFileInfo : NSObject -{ - NSString *filePath; - NSString *fileName; - - NSDictionary *fileAttributes; - - NSDate *creationDate; - NSDate *modificationDate; - - unsigned long long fileSize; -} - -@property (nonatomic, readonly) NSString *filePath; -@property (nonatomic, readonly) NSString *fileName; - -@property (nonatomic, readonly) NSDictionary *fileAttributes; - -@property (nonatomic, readonly) NSDate *creationDate; -@property (nonatomic, readonly) NSDate *modificationDate; - -@property (nonatomic, readonly) unsigned long long fileSize; - -@property (nonatomic, readonly) NSTimeInterval age; - -@property (nonatomic, readwrite) BOOL isArchived; - -+ (id)logFileWithPath:(NSString *)filePath; - -- (id)initWithFilePath:(NSString *)filePath; - -- (void)reset; -- (void)renameFile:(NSString *)newFileName; - -#if TARGET_IPHONE_SIMULATOR - -// So here's the situation. -// Extended attributes are perfect for what we're trying to do here (marking files as archived). -// This is exactly what extended attributes were designed for. -// -// But Apple screws us over on the simulator. -// Everytime you build-and-go, they copy the application into a new folder on the hard drive, -// and as part of the process they strip extended attributes from our log files. -// Normally, a copy of a file preserves extended attributes. -// So obviously Apple has gone to great lengths to piss us off. -// -// Thus we use a slightly different tactic for marking log files as archived in the simulator. -// That way it "just works" and there's no confusion when testing. -// -// The difference in method names is indicative of the difference in functionality. -// On the simulator we add an attribute by appending a filename extension. -// -// For example: -// log-ABC123.txt -> log-ABC123.archived.txt - -- (BOOL)hasExtensionAttributeWithName:(NSString *)attrName; - -- (void)addExtensionAttributeWithName:(NSString *)attrName; -- (void)removeExtensionAttributeWithName:(NSString *)attrName; - -#else - -// Normal use of extended attributes used everywhere else, -// such as on Macs and on iPhone devices. - -- (BOOL)hasExtendedAttributeWithName:(NSString *)attrName; - -- (void)addExtendedAttributeWithName:(NSString *)attrName; -- (void)removeExtendedAttributeWithName:(NSString *)attrName; - -#endif - -- (NSComparisonResult)reverseCompareByCreationDate:(DDLogFileInfo *)another; -- (NSComparisonResult)reverseCompareByModificationDate:(DDLogFileInfo *)another; - -@end diff --git a/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/DDFileLogger.m b/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/DDFileLogger.m deleted file mode 100644 index 2221deef6b8df..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/DDFileLogger.m +++ /dev/null @@ -1,1498 +0,0 @@ -#import "DDFileLogger.h" - -#import -#import -#import -#import - -// We probably shouldn't be using DDLog() statements within the DDLog implementation. -// But we still want to leave our log statements for any future debugging, -// and to allow other developers to trace the implementation (which is a great learning tool). -// -// So we use primitive logging macros around NSLog. -// We maintain the NS prefix on the macros to be explicit about the fact that we're using NSLog. - -#define LOG_LEVEL 2 - -#define NSLogError(frmt, ...) do{ if(LOG_LEVEL >= 1) NSLog((frmt), ##__VA_ARGS__); } while(0) -#define NSLogWarn(frmt, ...) do{ if(LOG_LEVEL >= 2) NSLog((frmt), ##__VA_ARGS__); } while(0) -#define NSLogInfo(frmt, ...) do{ if(LOG_LEVEL >= 3) NSLog((frmt), ##__VA_ARGS__); } while(0) -#define NSLogVerbose(frmt, ...) do{ if(LOG_LEVEL >= 4) NSLog((frmt), ##__VA_ARGS__); } while(0) - -@interface DDLogFileManagerDefault (PrivateAPI) - -- (void)deleteOldLogFiles; -- (NSString *)defaultLogsDirectory; - -@end - -@interface DDFileLogger (PrivateAPI) - -#if GCD_MAYBE_UNAVAILABLE - -- (void)lt_getMaximumFileSize:(NSMutableArray *)resultHolder; -- (void)lt_setMaximumFileSize:(NSNumber *)maximumFileSizeWrapper; - -- (void)lt_getRollingFrequency:(NSMutableArray *)resultHolder; -- (void)lt_setRollingFrequency:(NSNumber *)rollingFrequencyWrapper; - -#endif - -- (void)rollLogFileNow; -- (void)maybeRollLogFileDueToAge:(NSTimer *)aTimer; -- (void)maybeRollLogFileDueToSize; -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -@implementation DDLogFileManagerDefault - -@synthesize maximumNumberOfLogFiles; - -- (id)init -{ - return [self initWithLogsDirectory:nil]; -} - -- (id)initWithLogsDirectory:(NSString *)aLogsDirectory -{ - if ((self = [super init])) - { - maximumNumberOfLogFiles = DEFAULT_LOG_MAX_NUM_LOG_FILES; - - if (aLogsDirectory) - _logsDirectory = [aLogsDirectory copy]; - else - _logsDirectory = [[self defaultLogsDirectory] copy]; - - NSKeyValueObservingOptions kvoOptions = NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew; - - [self addObserver:self forKeyPath:@"maximumNumberOfLogFiles" options:kvoOptions context:nil]; - - NSLogVerbose(@"DDFileLogManagerDefault: logsDirectory:\n%@", [self logsDirectory]); - NSLogVerbose(@"DDFileLogManagerDefault: sortedLogFileNames:\n%@", [self sortedLogFileNames]); - } - return self; -} - -- (void)dealloc -{ - [_logsDirectory release]; - [super dealloc]; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Configuration -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (void)observeValueForKeyPath:(NSString *)keyPath - ofObject:(id)object - change:(NSDictionary *)change - context:(void *)context -{ - NSNumber *old = [change objectForKey:NSKeyValueChangeOldKey]; - NSNumber *new = [change objectForKey:NSKeyValueChangeNewKey]; - - if ([old isEqual:new]) - { - // No change in value - don't bother with any processing. - return; - } - - if ([keyPath isEqualToString:@"maximumNumberOfLogFiles"]) - { - NSLogInfo(@"DDFileLogManagerDefault: Responding to configuration change: maximumNumberOfLogFiles"); - - if (IS_GCD_AVAILABLE) - { - #if GCD_MAYBE_AVAILABLE - - dispatch_async([DDLog loggingQueue], ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - [self deleteOldLogFiles]; - - [pool drain]; - }); - - #endif - } - else - { - #if GCD_MAYBE_UNAVAILABLE - - [self performSelector:@selector(deleteOldLogFiles) - onThread:[DDLog loggingThread] - withObject:nil - waitUntilDone:NO]; - - #endif - } - } -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark File Deleting -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * Deletes archived log files that exceed the maximumNumberOfLogFiles configuration value. -**/ -- (void)deleteOldLogFiles -{ - NSLogVerbose(@"DDLogFileManagerDefault: deleteOldLogFiles"); - - NSArray *sortedLogFileInfos = [self sortedLogFileInfos]; - - NSUInteger maxNumLogFiles = self.maximumNumberOfLogFiles; - - // Do we consider the first file? - // We are only supposed to be deleting archived files. - // In most cases, the first file is likely the log file that is currently being written to. - // So in most cases, we do not want to consider this file for deletion. - - NSUInteger count = [sortedLogFileInfos count]; - BOOL excludeFirstFile = NO; - - if (count > 0) - { - DDLogFileInfo *logFileInfo = [sortedLogFileInfos objectAtIndex:0]; - - if (!logFileInfo.isArchived) - { - excludeFirstFile = YES; - } - } - - NSArray *sortedArchivedLogFileInfos; - if (excludeFirstFile) - { - count--; - sortedArchivedLogFileInfos = [sortedLogFileInfos subarrayWithRange:NSMakeRange(1, count)]; - } - else - { - sortedArchivedLogFileInfos = sortedLogFileInfos; - } - - NSUInteger i; - for (i = 0; i < count; i++) - { - if (i >= maxNumLogFiles) - { - DDLogFileInfo *logFileInfo = [sortedArchivedLogFileInfos objectAtIndex:i]; - - NSLogInfo(@"DDLogFileManagerDefault: Deleting file: %@", logFileInfo.fileName); - - [[NSFileManager defaultManager] removeItemAtPath:logFileInfo.filePath error:nil]; - } - } -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Log Files -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * Returns the path to the default logs directory. - * If the logs directory doesn't exist, this method automatically creates it. -**/ -- (NSString *)defaultLogsDirectory -{ -#if TARGET_OS_IPHONE - NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); - NSString *baseDir = ([paths count] > 0) ? [paths objectAtIndex:0] : nil; -#else - NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES); - NSString *basePath = ([paths count] > 0) ? [paths objectAtIndex:0] : NSTemporaryDirectory(); - - NSString *appName = [[NSProcessInfo processInfo] processName]; - - NSString *baseDir = [basePath stringByAppendingPathComponent:appName]; -#endif - - return [baseDir stringByAppendingPathComponent:@"Logs"]; -} - -- (NSString *)logsDirectory -{ - // We could do this check once, during initalization, and not bother again. - // But this way the code continues to work if the directory gets deleted while the code is running. - - if (![[NSFileManager defaultManager] fileExistsAtPath:_logsDirectory]) - { - NSError *err = nil; - if (![[NSFileManager defaultManager] createDirectoryAtPath:_logsDirectory - withIntermediateDirectories:YES attributes:nil error:&err]) - { - NSLogError(@"DDFileLogManagerDefault: Error creating logsDirectory: %@", err); - } - } - - return _logsDirectory; -} - -- (BOOL)isLogFile:(NSString *)fileName -{ - // A log file has a name like "log-.txt", where is a HEX-string of 6 characters. - // - // For example: log-DFFE99.txt - - BOOL hasProperPrefix = [fileName hasPrefix:@"log-"]; - - BOOL hasProperLength = [fileName length] >= 10; - - - if (hasProperPrefix && hasProperLength) - { - NSCharacterSet *hexSet = [NSCharacterSet characterSetWithCharactersInString:@"0123456789ABCDEF"]; - - NSString *hex = [fileName substringWithRange:NSMakeRange(4, 6)]; - NSString *nohex = [hex stringByTrimmingCharactersInSet:hexSet]; - - if ([nohex length] == 0) - { - return YES; - } - } - - return NO; -} - -/** - * Returns an array of NSString objects, - * each of which is the filePath to an existing log file on disk. -**/ -- (NSArray *)unsortedLogFilePaths -{ - NSString *logsDirectory = [self logsDirectory]; - NSArray *fileNames = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:logsDirectory error:nil]; - - NSMutableArray *unsortedLogFilePaths = [NSMutableArray arrayWithCapacity:[fileNames count]]; - - for (NSString *fileName in fileNames) - { - // Filter out any files that aren't log files. (Just for extra safety) - - if ([self isLogFile:fileName]) - { - NSString *filePath = [logsDirectory stringByAppendingPathComponent:fileName]; - - [unsortedLogFilePaths addObject:filePath]; - } - } - - return unsortedLogFilePaths; -} - -/** - * Returns an array of NSString objects, - * each of which is the fileName of an existing log file on disk. -**/ -- (NSArray *)unsortedLogFileNames -{ - NSArray *unsortedLogFilePaths = [self unsortedLogFilePaths]; - - NSMutableArray *unsortedLogFileNames = [NSMutableArray arrayWithCapacity:[unsortedLogFilePaths count]]; - - for (NSString *filePath in unsortedLogFilePaths) - { - [unsortedLogFileNames addObject:[filePath lastPathComponent]]; - } - - return unsortedLogFileNames; -} - -/** - * Returns an array of DDLogFileInfo objects, - * each representing an existing log file on disk, - * and containing important information about the log file such as it's modification date and size. -**/ -- (NSArray *)unsortedLogFileInfos -{ - NSArray *unsortedLogFilePaths = [self unsortedLogFilePaths]; - - NSMutableArray *unsortedLogFileInfos = [NSMutableArray arrayWithCapacity:[unsortedLogFilePaths count]]; - - for (NSString *filePath in unsortedLogFilePaths) - { - DDLogFileInfo *logFileInfo = [[DDLogFileInfo alloc] initWithFilePath:filePath]; - - [unsortedLogFileInfos addObject:logFileInfo]; - [logFileInfo release]; - } - - return unsortedLogFileInfos; -} - -/** - * Just like the unsortedLogFilePaths method, but sorts the array. - * The items in the array are sorted by modification date. - * The first item in the array will be the most recently modified log file. -**/ -- (NSArray *)sortedLogFilePaths -{ - NSArray *sortedLogFileInfos = [self sortedLogFileInfos]; - - NSMutableArray *sortedLogFilePaths = [NSMutableArray arrayWithCapacity:[sortedLogFileInfos count]]; - - for (DDLogFileInfo *logFileInfo in sortedLogFileInfos) - { - [sortedLogFilePaths addObject:[logFileInfo filePath]]; - } - - return sortedLogFilePaths; -} - -/** - * Just like the unsortedLogFileNames method, but sorts the array. - * The items in the array are sorted by modification date. - * The first item in the array will be the most recently modified log file. -**/ -- (NSArray *)sortedLogFileNames -{ - NSArray *sortedLogFileInfos = [self sortedLogFileInfos]; - - NSMutableArray *sortedLogFileNames = [NSMutableArray arrayWithCapacity:[sortedLogFileInfos count]]; - - for (DDLogFileInfo *logFileInfo in sortedLogFileInfos) - { - [sortedLogFileNames addObject:[logFileInfo fileName]]; - } - - return sortedLogFileNames; -} - -/** - * Just like the unsortedLogFileInfos method, but sorts the array. - * The items in the array are sorted by modification date. - * The first item in the array will be the most recently modified log file. -**/ -- (NSArray *)sortedLogFileInfos -{ - return [[self unsortedLogFileInfos] sortedArrayUsingSelector:@selector(reverseCompareByCreationDate:)]; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Creation -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * Generates a short UUID suitable for use in the log file's name. - * The result will have six characters, all in the hexadecimal set [0123456789ABCDEF]. -**/ -- (NSString *)generateShortUUID -{ - CFUUIDRef uuid = CFUUIDCreate(NULL); - - CFStringRef fullStr = CFUUIDCreateString(NULL, uuid); - CFStringRef shortStr = CFStringCreateWithSubstring(NULL, fullStr, CFRangeMake(0, 6)); - - CFRelease(fullStr); - CFRelease(uuid); - - return [NSMakeCollectable(shortStr) autorelease]; -} - -/** - * Generates a new unique log file path, and creates the corresponding log file. -**/ -- (NSString *)createNewLogFile -{ - // Generate a random log file name, and create the file (if there isn't a collision) - - NSString *logsDirectory = [self logsDirectory]; - do - { - NSString *fileName = [NSString stringWithFormat:@"log-%@.txt", [self generateShortUUID]]; - - NSString *filePath = [logsDirectory stringByAppendingPathComponent:fileName]; - - if (![[NSFileManager defaultManager] fileExistsAtPath:filePath]) - { - NSLogVerbose(@"DDLogFileManagerDefault: Creating new log file: %@", fileName); - - [[NSFileManager defaultManager] createFileAtPath:filePath contents:nil attributes:nil]; - - // Since we just created a new log file, we may need to delete some old log files - [self deleteOldLogFiles]; - - return filePath; - } - - } while(YES); -} - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -@implementation DDLogFileFormatterDefault - -- (id)init -{ - if((self = [super init])) - { - dateFormatter = [[NSDateFormatter alloc] init]; - [dateFormatter setFormatterBehavior:NSDateFormatterBehavior10_4]; - [dateFormatter setDateFormat:@"yyyy/MM/dd HH:mm:ss:SSS"]; - } - return self; -} - -- (NSString *)formatLogMessage:(DDLogMessage *)logMessage -{ - NSString *dateAndTime = [dateFormatter stringFromDate:(logMessage->timestamp)]; - - return [NSString stringWithFormat:@"%@ %@", dateAndTime, logMessage->logMsg]; -} - -- (void)dealloc -{ - [dateFormatter release]; - [super dealloc]; -} - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -@implementation DDFileLogger - -@synthesize maximumFileSize; -@synthesize rollingFrequency; -@synthesize logFileManager; - -- (id)init -{ - DDLogFileManagerDefault *defaultLogFileManager = [[[DDLogFileManagerDefault alloc] init] autorelease]; - - return [self initWithLogFileManager:defaultLogFileManager]; -} - -- (id)initWithLogFileManager:(id )aLogFileManager -{ - if ((self = [super init])) - { - maximumFileSize = DEFAULT_LOG_MAX_FILE_SIZE; - rollingFrequency = DEFAULT_LOG_ROLLING_FREQUENCY; - - logFileManager = [aLogFileManager retain]; - - formatter = [[DDLogFileFormatterDefault alloc] init]; - } - return self; -} - -- (void)dealloc -{ - [formatter release]; - [logFileManager release]; - - [currentLogFileInfo release]; - - [currentLogFileHandle synchronizeFile]; - [currentLogFileHandle closeFile]; - [currentLogFileHandle release]; - - [rollingTimer invalidate]; - [rollingTimer release]; - - [super dealloc]; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Configuration -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (unsigned long long)maximumFileSize -{ - // The design of this method is taken from the DDAbstractLogger implementation. - // For documentation please refer to the DDAbstractLogger implementation. - - // Note: The internal implementation should access the maximumFileSize variable directly, - // but if we forget to do this, then this method should at least work properly. - - if (IS_GCD_AVAILABLE) - { - #if GCD_MAYBE_AVAILABLE - - if (dispatch_get_current_queue() == loggerQueue) - { - return maximumFileSize; - } - - __block unsigned long long result; - - dispatch_block_t block = ^{ - result = maximumFileSize; - }; - dispatch_sync([DDLog loggingQueue], block); - - return result; - - #endif - } - else - { - #if GCD_MAYBE_UNAVAILABLE - - NSThread *loggingThread = [DDLog loggingThread]; - - if ([NSThread currentThread] == loggingThread) - { - return maximumFileSize; - } - - unsigned long long result; - NSMutableArray *resultHolder = [[NSMutableArray alloc] init]; - - [self performSelector:@selector(lt_getMaximumFileSize:) - onThread:loggingThread - withObject:resultHolder - waitUntilDone:YES]; - - OSMemoryBarrier(); - - result = [[resultHolder objectAtIndex:0] unsignedLongLongValue]; - [resultHolder release]; - - return result; - - #endif - } -} - -- (void)setMaximumFileSize:(unsigned long long)newMaximumFileSize -{ - // The design of this method is taken from the DDAbstractLogger implementation. - // For documentation please refer to the DDAbstractLogger implementation. - - if (IS_GCD_AVAILABLE) - { - #if GCD_MAYBE_AVAILABLE - - dispatch_block_t block = ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - maximumFileSize = newMaximumFileSize; - [self maybeRollLogFileDueToSize]; - - [pool drain]; - }; - - if (dispatch_get_current_queue() == loggerQueue) - block(); - else - dispatch_async([DDLog loggingQueue], block); - - #endif - } - else - { - #if GCD_MAYBE_UNAVAILABLE - - NSThread *loggingThread = [DDLog loggingThread]; - NSNumber *newMaximumFileSizeWrapper = [NSNumber numberWithUnsignedLongLong:newMaximumFileSize]; - - if ([NSThread currentThread] == loggingThread) - { - [self lt_setMaximumFileSize:newMaximumFileSizeWrapper]; - } - else - { - [self performSelector:@selector(lt_setMaximumFileSize:) - onThread:loggingThread - withObject:newMaximumFileSizeWrapper - waitUntilDone:NO]; - } - - #endif - } -} - -- (NSTimeInterval)rollingFrequency -{ - // The design of this method is taken from the DDAbstractLogger implementation. - // For documentation please refer to the DDAbstractLogger implementation. - - // Note: The internal implementation should access the rollingFrequency variable directly, - // but if we forget to do this, then this method should at least work properly. - - if (IS_GCD_AVAILABLE) - { - #if GCD_MAYBE_AVAILABLE - - if (dispatch_get_current_queue() == loggerQueue) - { - return rollingFrequency; - } - - __block NSTimeInterval result; - - dispatch_block_t block = ^{ - result = rollingFrequency; - }; - dispatch_sync([DDLog loggingQueue], block); - - return result; - - #endif - } - else - { - #if GCD_MAYBE_UNAVAILABLE - - NSThread *loggingThread = [DDLog loggingThread]; - - if ([NSThread currentThread] == loggingThread) - { - return rollingFrequency; - } - - NSTimeInterval result; - NSMutableArray *resultHolder = [[NSMutableArray alloc] init]; - - [self performSelector:@selector(lt_getRollingFrequency:) - onThread:loggingThread - withObject:resultHolder - waitUntilDone:YES]; - - OSMemoryBarrier(); - - result = [[resultHolder objectAtIndex:0] doubleValue]; - [resultHolder release]; - - return result; - - #endif - } -} - -- (void)setRollingFrequency:(NSTimeInterval)newRollingFrequency -{ - // The design of this method is taken from the DDAbstractLogger implementation. - // For documentation please refer to the DDAbstractLogger implementation. - - if (IS_GCD_AVAILABLE) - { - #if GCD_MAYBE_AVAILABLE - - dispatch_block_t block = ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - rollingFrequency = newRollingFrequency; - [self maybeRollLogFileDueToAge:nil]; - - [pool drain]; - }; - - if (dispatch_get_current_queue() == loggerQueue) - block(); - else - dispatch_async([DDLog loggingQueue], block); - - #endif - } - else - { - #if GCD_MAYBE_UNAVAILABLE - - NSThread *loggingThread = [DDLog loggingThread]; - NSNumber *newMaximumRollingFrequencyWrapper = [NSNumber numberWithDouble:newRollingFrequency]; - - if ([NSThread currentThread] == loggingThread) - { - [self lt_setRollingFrequency:newMaximumRollingFrequencyWrapper]; - } - else - { - [self performSelector:@selector(lt_setRollingFrequency:) - onThread:loggingThread - withObject:newMaximumRollingFrequencyWrapper - waitUntilDone:NO]; - } - - #endif - } -} - -#if GCD_MAYBE_UNAVAILABLE - -- (void)lt_getMaximumFileSize:(NSMutableArray *)resultHolder -{ - // This method is executed on the logging thread. - - [resultHolder addObject:[NSNumber numberWithUnsignedLongLong:maximumFileSize]]; - OSMemoryBarrier(); -} - -- (void)lt_setMaximumFileSize:(NSNumber *)maximumFileSizeWrapper -{ - // This method is executed on the logging thread. - - maximumFileSize = [maximumFileSizeWrapper unsignedLongLongValue]; - - [self maybeRollLogFileDueToSize]; -} - -- (void)lt_getRollingFrequency:(NSMutableArray *)resultHolder -{ - // This method is executed on the logging thread. - - [resultHolder addObject:[NSNumber numberWithDouble:rollingFrequency]]; - OSMemoryBarrier(); -} - -- (void)lt_setRollingFrequency:(NSNumber *)rollingFrequencyWrapper -{ - // This method is executed on the logging thread. - - rollingFrequency = [rollingFrequencyWrapper doubleValue]; - - [self maybeRollLogFileDueToAge:nil]; -} - -#endif - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark File Rolling -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (void)scheduleTimerToRollLogFileDueToAge -{ - if (rollingTimer) - { - [rollingTimer invalidate]; - [rollingTimer release]; - rollingTimer = nil; - } - - if (currentLogFileInfo == nil) - { - return; - } - - NSDate *logFileCreationDate = [currentLogFileInfo creationDate]; - - NSTimeInterval ti = [logFileCreationDate timeIntervalSinceReferenceDate]; - ti += rollingFrequency; - - NSDate *logFileRollingDate = [NSDate dateWithTimeIntervalSinceReferenceDate:ti]; - - NSLogVerbose(@"DDFileLogger: scheduleTimerToRollLogFileDueToAge"); - - NSLogVerbose(@"DDFileLogger: logFileCreationDate: %@", logFileCreationDate); - NSLogVerbose(@"DDFileLogger: logFileRollingDate : %@", logFileRollingDate); - - rollingTimer = [[NSTimer scheduledTimerWithTimeInterval:[logFileRollingDate timeIntervalSinceNow] - target:self - selector:@selector(maybeRollLogFileDueToAge:) - userInfo:nil - repeats:NO] retain]; -} - -- (void)rollLogFile -{ - // This method is public. - // We need to execute the rolling on our logging thread/queue. - - if (IS_GCD_AVAILABLE) - { - #if GCD_MAYBE_AVAILABLE - - dispatch_block_t block = ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - [self rollLogFileNow]; - [pool drain]; - }; - dispatch_async([DDLog loggingQueue], block); - - #endif - } - else - { - #if GCD_MAYBE_UNAVAILABLE - - [self performSelector:@selector(rollLogFileNow) - onThread:[DDLog loggingThread] - withObject:nil - waitUntilDone:NO]; - - #endif - } -} - -- (void)rollLogFileNow -{ - NSLogVerbose(@"DDFileLogger: rollLogFileNow"); - - [currentLogFileHandle synchronizeFile]; - [currentLogFileHandle closeFile]; - [currentLogFileHandle release]; - currentLogFileHandle = nil; - - currentLogFileInfo.isArchived = YES; - - if ([logFileManager respondsToSelector:@selector(didRollAndArchiveLogFile:)]) - { - [logFileManager didRollAndArchiveLogFile:(currentLogFileInfo.filePath)]; - } - - [currentLogFileInfo release]; - currentLogFileInfo = nil; -} - -- (void)maybeRollLogFileDueToAge:(NSTimer *)aTimer -{ - if (currentLogFileInfo.age >= rollingFrequency) - { - NSLogVerbose(@"DDFileLogger: Rolling log file due to age..."); - - [self rollLogFileNow]; - } - else - { - [self scheduleTimerToRollLogFileDueToAge]; - } -} - -- (void)maybeRollLogFileDueToSize -{ - // This method is called from logMessage. - // Keep it FAST. - - unsigned long long fileSize = [currentLogFileHandle offsetInFile]; - - // Note: Use direct access to maximumFileSize variable. - // We specifically wrote our own getter/setter method to allow us to do this (for performance reasons). - - if (fileSize >= maximumFileSize) // YES, we are using direct access. Read note above. - { - NSLogVerbose(@"DDFileLogger: Rolling log file due to size..."); - - [self rollLogFileNow]; - } -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark File Logging -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * Returns the log file that should be used. - * If there is an existing log file that is suitable, - * within the constraints of maximumFileSize and rollingFrequency, then it is returned. - * - * Otherwise a new file is created and returned. -**/ -- (DDLogFileInfo *)currentLogFileInfo -{ - if (currentLogFileInfo == nil) - { - NSArray *sortedLogFileInfos = [logFileManager sortedLogFileInfos]; - - if ([sortedLogFileInfos count] > 0) - { - DDLogFileInfo *mostRecentLogFileInfo = [sortedLogFileInfos objectAtIndex:0]; - - BOOL useExistingLogFile = YES; - BOOL shouldArchiveMostRecent = NO; - - if (mostRecentLogFileInfo.isArchived) - { - useExistingLogFile = NO; - shouldArchiveMostRecent = NO; - } - else if (mostRecentLogFileInfo.fileSize >= maximumFileSize) - { - useExistingLogFile = NO; - shouldArchiveMostRecent = YES; - } - else if (mostRecentLogFileInfo.age >= rollingFrequency) - { - useExistingLogFile = NO; - shouldArchiveMostRecent = YES; - } - - if (useExistingLogFile) - { - NSLogVerbose(@"DDFileLogger: Resuming logging with file %@", mostRecentLogFileInfo.fileName); - - currentLogFileInfo = [mostRecentLogFileInfo retain]; - } - else - { - if (shouldArchiveMostRecent) - { - mostRecentLogFileInfo.isArchived = YES; - - if ([logFileManager respondsToSelector:@selector(didArchiveLogFile:)]) - { - [logFileManager didArchiveLogFile:(mostRecentLogFileInfo.filePath)]; - } - } - } - } - - if (currentLogFileInfo == nil) - { - NSString *currentLogFilePath = [logFileManager createNewLogFile]; - - currentLogFileInfo = [[DDLogFileInfo alloc] initWithFilePath:currentLogFilePath]; - } - } - - return currentLogFileInfo; -} - -- (NSFileHandle *)currentLogFileHandle -{ - if (currentLogFileHandle == nil) - { - NSString *logFilePath = [[self currentLogFileInfo] filePath]; - - currentLogFileHandle = [[NSFileHandle fileHandleForWritingAtPath:logFilePath] retain]; - [currentLogFileHandle seekToEndOfFile]; - - if (currentLogFileHandle) - { - [self scheduleTimerToRollLogFileDueToAge]; - } - } - - return currentLogFileHandle; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark DDLogger Protocol -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (void)logMessage:(DDLogMessage *)logMessage -{ - NSString *logMsg = logMessage->logMsg; - - if (formatter) - { - logMsg = [formatter formatLogMessage:logMessage]; - } - - if (logMsg) - { - if (![logMsg hasSuffix:@"\n"]) - { - logMsg = [logMsg stringByAppendingString:@"\n"]; - } - - NSData *logData = [logMsg dataUsingEncoding:NSUTF8StringEncoding]; - - [[self currentLogFileHandle] writeData:logData]; - - [self maybeRollLogFileDueToSize]; - } -} - -- (NSString *)loggerName -{ - return @"cocoa.lumberjack.fileLogger"; -} - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -#if TARGET_IPHONE_SIMULATOR - #define XATTR_ARCHIVED_NAME @"archived" -#else - #define XATTR_ARCHIVED_NAME @"lumberjack.log.archived" -#endif - -@implementation DDLogFileInfo - -@synthesize filePath; - -@dynamic fileName; -@dynamic fileAttributes; -@dynamic creationDate; -@dynamic modificationDate; -@dynamic fileSize; -@dynamic age; - -@dynamic isArchived; - - -#pragma mark Lifecycle - -+ (id)logFileWithPath:(NSString *)aFilePath -{ - return [[[DDLogFileInfo alloc] initWithFilePath:aFilePath] autorelease]; -} - -- (id)initWithFilePath:(NSString *)aFilePath -{ - if ((self = [super init])) - { - filePath = [aFilePath copy]; - } - return self; -} - -- (void)dealloc -{ - [filePath release]; - [fileName release]; - - [fileAttributes release]; - - [creationDate release]; - [modificationDate release]; - - [super dealloc]; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Standard Info -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (NSDictionary *)fileAttributes -{ - if (fileAttributes == nil) - { - fileAttributes = [[[NSFileManager defaultManager] attributesOfItemAtPath:filePath error:nil] retain]; - } - return fileAttributes; -} - -- (NSString *)fileName -{ - if (fileName == nil) - { - fileName = [[filePath lastPathComponent] retain]; - } - return fileName; -} - -- (NSDate *)modificationDate -{ - if (modificationDate == nil) - { - modificationDate = [[[self fileAttributes] objectForKey:NSFileModificationDate] retain]; - } - - return modificationDate; -} - -- (NSDate *)creationDate -{ - if (creationDate == nil) - { - - #if TARGET_OS_IPHONE - - const char *path = [filePath UTF8String]; - - struct attrlist attrList; - memset(&attrList, 0, sizeof(attrList)); - attrList.bitmapcount = ATTR_BIT_MAP_COUNT; - attrList.commonattr = ATTR_CMN_CRTIME; - - struct { - u_int32_t attrBufferSizeInBytes; - struct timespec crtime; - } attrBuffer; - - int result = getattrlist(path, &attrList, &attrBuffer, sizeof(attrBuffer), 0); - if (result == 0) - { - double seconds = (double)(attrBuffer.crtime.tv_sec); - double nanos = (double)(attrBuffer.crtime.tv_nsec); - - NSTimeInterval ti = seconds + (nanos / 1000000000.0); - - creationDate = [[NSDate dateWithTimeIntervalSince1970:ti] retain]; - } - else - { - NSLogError(@"DDLogFileInfo: creationDate(%@): getattrlist result = %i", self.fileName, result); - } - - #else - - creationDate = [[[self fileAttributes] objectForKey:NSFileCreationDate] retain]; - - #endif - - } - return creationDate; -} - -- (unsigned long long)fileSize -{ - if (fileSize == 0) - { - fileSize = [[[self fileAttributes] objectForKey:NSFileSize] unsignedLongLongValue]; - } - - return fileSize; -} - -- (NSTimeInterval)age -{ - return [[self creationDate] timeIntervalSinceNow] * -1.0; -} - -- (NSString *)description -{ - return [[NSDictionary dictionaryWithObjectsAndKeys: - self.filePath, @"filePath", - self.fileName, @"fileName", - self.fileAttributes, @"fileAttributes", - self.creationDate, @"creationDate", - self.modificationDate, @"modificationDate", - [NSNumber numberWithUnsignedLongLong:self.fileSize], @"fileSize", - [NSNumber numberWithDouble:self.age], @"age", - [NSNumber numberWithBool:self.isArchived], @"isArchived", - nil] description]; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Archiving -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (BOOL)isArchived -{ - -#if TARGET_IPHONE_SIMULATOR - - // Extended attributes don't work properly on the simulator. - // So we have to use a less attractive alternative. - // See full explanation in the header file. - - return [self hasExtensionAttributeWithName:XATTR_ARCHIVED_NAME]; - -#else - - return [self hasExtendedAttributeWithName:XATTR_ARCHIVED_NAME]; - -#endif -} - -- (void)setIsArchived:(BOOL)flag -{ - -#if TARGET_IPHONE_SIMULATOR - - // Extended attributes don't work properly on the simulator. - // So we have to use a less attractive alternative. - // See full explanation in the header file. - - if (flag) - [self addExtensionAttributeWithName:XATTR_ARCHIVED_NAME]; - else - [self removeExtensionAttributeWithName:XATTR_ARCHIVED_NAME]; - -#else - - if (flag) - [self addExtendedAttributeWithName:XATTR_ARCHIVED_NAME]; - else - [self removeExtendedAttributeWithName:XATTR_ARCHIVED_NAME]; - -#endif -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Changes -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (void)reset -{ - [fileName release]; - fileName = nil; - - [fileAttributes release]; - fileAttributes = nil; - - [creationDate release]; - creationDate = nil; - - [modificationDate release]; - modificationDate = nil; -} - -- (void)renameFile:(NSString *)newFileName -{ - // This method is only used on the iPhone simulator, where normal extended attributes are broken. - // See full explanation in the header file. - - if (![newFileName isEqualToString:[self fileName]]) - { - NSString *fileDir = [filePath stringByDeletingLastPathComponent]; - - NSString *newFilePath = [fileDir stringByAppendingPathComponent:newFileName]; - - NSLogVerbose(@"DDLogFileInfo: Renaming file: '%@' -> '%@'", self.fileName, newFileName); - - NSError *error = nil; - if (![[NSFileManager defaultManager] moveItemAtPath:filePath toPath:newFilePath error:&error]) - { - NSLogError(@"DDLogFileInfo: Error renaming file (%@): %@", self.fileName, error); - } - - [filePath release]; - filePath = [newFilePath retain]; - - [self reset]; - } -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Attribute Management -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -#if TARGET_IPHONE_SIMULATOR - -// Extended attributes don't work properly on the simulator. -// So we have to use a less attractive alternative. -// See full explanation in the header file. - -- (BOOL)hasExtensionAttributeWithName:(NSString *)attrName -{ - // This method is only used on the iPhone simulator, where normal extended attributes are broken. - // See full explanation in the header file. - - // Split the file name into components. - // - // log-ABC123.archived.uploaded.txt - // - // 0. log-ABC123 - // 1. archived - // 2. uploaded - // 3. txt - // - // So we want to search for the attrName in the components (ignoring the first and last array indexes). - - NSArray *components = [[self fileName] componentsSeparatedByString:@"."]; - - // Watch out for file names without an extension - - NSUInteger count = [components count]; - NSUInteger max = (count >= 2) ? count-1 : count; - - NSUInteger i; - for (i = 1; i < max; i++) - { - NSString *attr = [components objectAtIndex:i]; - - if ([attrName isEqualToString:attr]) - { - return YES; - } - } - - return NO; -} - -- (void)addExtensionAttributeWithName:(NSString *)attrName -{ - // This method is only used on the iPhone simulator, where normal extended attributes are broken. - // See full explanation in the header file. - - if ([attrName length] == 0) return; - - // Example: - // attrName = "archived" - // - // "log-ABC123.txt" -> "log-ABC123.archived.txt" - - NSArray *components = [[self fileName] componentsSeparatedByString:@"."]; - - NSUInteger count = [components count]; - - NSUInteger estimatedNewLength = [[self fileName] length] + [attrName length] + 1; - NSMutableString *newFileName = [NSMutableString stringWithCapacity:estimatedNewLength]; - - if (count > 0) - { - [newFileName appendString:[components objectAtIndex:0]]; - } - - NSString *lastExt = @""; - - NSUInteger i; - for (i = 1; i < count; i++) - { - NSString *attr = [components objectAtIndex:i]; - if ([attr length] == 0) - { - continue; - } - - if ([attrName isEqualToString:attr]) - { - // Extension attribute already exists in file name - return; - } - - if ([lastExt length] > 0) - { - [newFileName appendFormat:@".%@", lastExt]; - } - - lastExt = attr; - } - - [newFileName appendFormat:@".%@", attrName]; - - if ([lastExt length] > 0) - { - [newFileName appendFormat:@".%@", lastExt]; - } - - [self renameFile:newFileName]; -} - -- (void)removeExtensionAttributeWithName:(NSString *)attrName -{ - // This method is only used on the iPhone simulator, where normal extended attributes are broken. - // See full explanation in the header file. - - if ([attrName length] == 0) return; - - // Example: - // attrName = "archived" - // - // "log-ABC123.txt" -> "log-ABC123.archived.txt" - - NSArray *components = [[self fileName] componentsSeparatedByString:@"."]; - - NSUInteger count = [components count]; - - NSUInteger estimatedNewLength = [[self fileName] length]; - NSMutableString *newFileName = [NSMutableString stringWithCapacity:estimatedNewLength]; - - if (count > 0) - { - [newFileName appendString:[components objectAtIndex:0]]; - } - - BOOL found = NO; - - NSUInteger i; - for (i = 1; i < count; i++) - { - NSString *attr = [components objectAtIndex:i]; - - if ([attrName isEqualToString:attr]) - { - found = YES; - } - else - { - [newFileName appendFormat:@".%@", attr]; - } - } - - if (found) - { - [self renameFile:newFileName]; - } -} - -#else - -- (BOOL)hasExtendedAttributeWithName:(NSString *)attrName -{ - const char *path = [filePath UTF8String]; - const char *name = [attrName UTF8String]; - - ssize_t result = getxattr(path, name, NULL, 0, 0, 0); - - return (result >= 0); -} - -- (void)addExtendedAttributeWithName:(NSString *)attrName -{ - const char *path = [filePath UTF8String]; - const char *name = [attrName UTF8String]; - - int result = setxattr(path, name, NULL, 0, 0, 0); - - if (result < 0) - { - NSLogError(@"DDLogFileInfo: setxattr(%@, %@): error = %i", attrName, self.fileName, result); - } -} - -- (void)removeExtendedAttributeWithName:(NSString *)attrName -{ - const char *path = [filePath UTF8String]; - const char *name = [attrName UTF8String]; - - int result = removexattr(path, name, 0); - - if (result < 0 && errno != ENOATTR) - { - NSLogError(@"DDLogFileInfo: removexattr(%@, %@): error = %i", attrName, self.fileName, result); - } -} - -#endif - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Comparisons -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (BOOL)isEqual:(id)object -{ - if ([object isKindOfClass:[self class]]) - { - DDLogFileInfo *another = (DDLogFileInfo *)object; - - return [filePath isEqualToString:[another filePath]]; - } - - return NO; -} - -- (NSComparisonResult)reverseCompareByCreationDate:(DDLogFileInfo *)another -{ - NSDate *us = [self creationDate]; - NSDate *them = [another creationDate]; - - NSComparisonResult result = [us compare:them]; - - if (result == NSOrderedAscending) - return NSOrderedDescending; - - if (result == NSOrderedDescending) - return NSOrderedAscending; - - return NSOrderedSame; -} - -- (NSComparisonResult)reverseCompareByModificationDate:(DDLogFileInfo *)another -{ - NSDate *us = [self modificationDate]; - NSDate *them = [another modificationDate]; - - NSComparisonResult result = [us compare:them]; - - if (result == NSOrderedAscending) - return NSOrderedDescending; - - if (result == NSOrderedDescending) - return NSOrderedAscending; - - return NSOrderedSame; -} - -@end diff --git a/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/DDLog.h b/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/DDLog.h deleted file mode 100755 index 34c2b6124fcfa..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/DDLog.h +++ /dev/null @@ -1,615 +0,0 @@ -#import - -/** - * Welcome to Cocoa Lumberjack! - * - * The Google Code page has a wealth of documentation if you have any questions. - * http://code.google.com/p/cocoalumberjack/ - * - * If you're new to the project you may wish to read the "Getting Started" page. - * http://code.google.com/p/cocoalumberjack/wiki/GettingStarted - * - * Otherwise, here is a quick refresher. - * There are three steps to using the macros: - * - * Step 1: - * Import the header in your implementation file: - * - * #import "DDLog.h" - * - * Step 2: - * Define your logging level in your implementation file: - * - * // Log levels: off, error, warn, info, verbose - * static const int ddLogLevel = LOG_LEVEL_VERBOSE; - * - * Step 3: - * Replace your NSLog statements with DDLog statements according to the severity of the message. - * - * NSLog(@"Fatal error, no dohickey found!"); -> DDLogError(@"Fatal error, no dohickey found!"); - * - * DDLog works exactly the same as NSLog. - * This means you can pass it multiple variables just like NSLog. -**/ - - -// Can we use Grand Central Dispatch? -// -// This question is actually composed of two parts: -// 1. Is it available to the compiler? -// 2. Is it available to the runtime? -// -// For example, if we are building a universal iPad/iPhone app, -// our base SDK may be iOS 4, but our deployment target would be iOS 3.2. -// In this case we can compile against the GCD libraries (which are available starting with iOS 4), -// but we can only use them at runtime if running on iOS 4 or later. -// If running on an iPad using iOS 3.2, we need to use runtime checks for backwards compatibility. -// -// The solution is to use a combination of compile-time and run-time macros. -// -// Note that when the minimum supported SDK supports GCD -// the run-time checks will be compiled out during optimization. - -#if TARGET_OS_IPHONE - - // Compiling for iPod/iPhone/iPad - - #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 40000 // 4.0 supported - - #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 40000 // 4.0 supported and required - - #define IS_GCD_AVAILABLE YES - #define GCD_MAYBE_AVAILABLE 1 - #define GCD_MAYBE_UNAVAILABLE 0 - - #else // 4.0 supported but not required - - #ifndef NSFoundationVersionNumber_iPhoneOS_4_0 - #define NSFoundationVersionNumber_iPhoneOS_4_0 751.32 - #endif - - #define IS_GCD_AVAILABLE (NSFoundationVersionNumber >= NSFoundationVersionNumber_iPhoneOS_4_0) - #define GCD_MAYBE_AVAILABLE 1 - #define GCD_MAYBE_UNAVAILABLE 1 - - #endif - - #else // 4.0 not supported - - #define IS_GCD_AVAILABLE NO - #define GCD_MAYBE_AVAILABLE 0 - #define GCD_MAYBE_UNAVAILABLE 1 - - #endif - -#else - - // Compiling for Mac OS X - - #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 // 10.6 supported - - #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 // 10.6 supported and required - - #define IS_GCD_AVAILABLE YES - #define GCD_MAYBE_AVAILABLE 1 - #define GCD_MAYBE_UNAVAILABLE 0 - - #else // 10.6 supported but not required - - #ifndef NSFoundationVersionNumber10_6 - #define NSFoundationVersionNumber10_6 751.00 - #endif - - #define IS_GCD_AVAILABLE (NSFoundationVersionNumber >= NSFoundationVersionNumber10_6) - #define GCD_MAYBE_AVAILABLE 1 - #define GCD_MAYBE_UNAVAILABLE 1 - - #endif - - #else // 10.6 not supported - - #define IS_GCD_AVAILABLE NO - #define GCD_MAYBE_AVAILABLE 0 - #define GCD_MAYBE_UNAVAILABLE 1 - - #endif - -#endif - -/* -// Uncomment for quick temporary test to see if it builds for older OS targets -#undef IS_GCD_AVAILABLE -#undef GCD_MAYBE_AVAILABLE -#undef GCD_MAYBE_UNAVAILABLE - -#define IS_GCD_AVAILABLE NO -#define GCD_MAYBE_AVAILABLE 0 -#define GCD_MAYBE_UNAVAILABLE 1 -*/ - -@class DDLogMessage; - -@protocol DDLogger; -@protocol DDLogFormatter; - -/** - * Define our big multiline macros so all the other macros will be easy to read. -**/ - -#define LOG_MACRO(isAsynchronous, lvl, flg, ctx, fnct, frmt, ...) \ - [DDLog log:isAsynchronous \ - level:lvl \ - flag:flg \ - context:ctx \ - file:__FILE__ \ - function:fnct \ - line:__LINE__ \ - format:(frmt), ##__VA_ARGS__] - - -#define LOG_OBJC_MACRO(async, lvl, flg, ctx, frmt, ...) \ - LOG_MACRO(async, lvl, flg, ctx, sel_getName(_cmd), frmt, ##__VA_ARGS__) - -#define LOG_C_MACRO(async, lvl, flg, ctx, frmt, ...) \ - LOG_MACRO(async, lvl, flg, ctx, __FUNCTION__, frmt, ##__VA_ARGS__) - -#define SYNC_LOG_OBJC_MACRO(lvl, flg, ctx, frmt, ...) \ - LOG_OBJC_MACRO( NO, lvl, flg, ctx, frmt, ##__VA_ARGS__) - -#define ASYNC_LOG_OBJC_MACRO(lvl, flg, ctx, frmt, ...) \ - LOG_OBJC_MACRO(YES, lvl, flg, ctx, frmt, ##__VA_ARGS__) - -#define SYNC_LOG_C_MACRO(lvl, flg, ctx, frmt, ...) \ - LOG_C_MACRO( NO, lvl, flg, ctx, frmt, ##__VA_ARGS__) - -#define ASYNC_LOG_C_MACRO(lvl, flg, ctx, frmt, ...) \ - LOG_C_MACRO(YES, lvl, flg, ctx, frmt, ##__VA_ARGS__) - - -#define LOG_MAYBE(async, lvl, flg, ctx, fnct, frmt, ...) \ - do { if(lvl & flg) LOG_MACRO(async, lvl, flg, ctx, fnct, frmt, ##__VA_ARGS__); } while(0) - -#define LOG_OBJC_MAYBE(async, lvl, flg, ctx, frmt, ...) \ - LOG_MAYBE(async, lvl, flg, ctx, sel_getName(_cmd), frmt, ##__VA_ARGS__) - -#define LOG_C_MAYBE(async, lvl, flg, ctx, frmt, ...) \ - LOG_MAYBE(async, lvl, flg, ctx, __FUNCTION__, frmt, ##__VA_ARGS__) - -#define SYNC_LOG_OBJC_MAYBE(lvl, flg, ctx, frmt, ...) \ - LOG_OBJC_MAYBE( NO, lvl, flg, ctx, frmt, ##__VA_ARGS__) - -#define ASYNC_LOG_OBJC_MAYBE(lvl, flg, ctx, frmt, ...) \ - LOG_OBJC_MAYBE(YES, lvl, flg, ctx, frmt, ##__VA_ARGS__) - -#define SYNC_LOG_C_MAYBE(lvl, flg, ctx, frmt, ...) \ - LOG_C_MAYBE( NO, lvl, flg, ctx, frmt, ##__VA_ARGS__) - -#define ASYNC_LOG_C_MAYBE(lvl, flg, ctx, frmt, ...) \ - LOG_C_MAYBE(YES, lvl, flg, ctx, frmt, ##__VA_ARGS__) - -/** - * Define the standard options. - * - * We default to only 4 levels because it makes it easier for beginners - * to make the transition to a logging framework. - * - * More advanced users may choose to completely customize the levels (and level names) to suite their needs. - * For more information on this see the "Custom Log Levels" page: - * http://code.google.com/p/cocoalumberjack/wiki/CustomLogLevels - * - * Advanced users may also notice that we're using a bitmask. - * This is to allow for custom fine grained logging: - * http://code.google.com/p/cocoalumberjack/wiki/FineGrainedLogging - * - * -- Flags -- - * - * Typically you will use the LOG_LEVELS (see below), but the flags may be used directly in certain situations. - * For example, say you have a lot of warning log messages, and you wanted to disable them. - * However, you still needed to see your error and info log messages. - * You could accomplish that with the following: - * - * static const int ddLogLevel = LOG_FLAG_ERROR | LOG_FLAG_INFO; - * - * Flags may also be consulted when writing custom log formatters, - * as the DDLogMessage class captures the individual flag that caused the log message to fire. - * - * -- Levels -- - * - * Log levels are simply the proper bitmask of the flags. - * - * -- Booleans -- - * - * The booleans may be used when your logging code involves more than one line. - * For example: - * - * if (LOG_VERBOSE) { - * for (id sprocket in sprockets) - * DDLogVerbose(@"sprocket: %@", [sprocket description]) - * } - * - * -- Async -- - * - * Defines the default asynchronous options. - * The default philosophy for asynchronous logging is very simple: - * - * Log messages with errors should be executed synchronously. - * After all, an error just occurred. The application could be unstable. - * - * All other log messages, such as debug output, are executed asynchronously. - * After all, if it wasn't an error, then it was just informational output, - * or something the application was easily able to recover from. - * - * -- Changes -- - * - * You are strongly discouraged from modifying this file. - * If you do, you make it more difficult on yourself to merge future bug fixes and improvements from the project. - * Instead, create your own MyLogging.h or ApplicationNameLogging.h or CompanyLogging.h - * - * For an example of customizing your logging experience, see the "Custom Log Levels" page: - * http://code.google.com/p/cocoalumberjack/wiki/CustomLogLevels -**/ - -#define LOG_FLAG_ERROR (1 << 0) // 0...0001 -#define LOG_FLAG_WARN (1 << 1) // 0...0010 -#define LOG_FLAG_INFO (1 << 2) // 0...0100 -#define LOG_FLAG_VERBOSE (1 << 3) // 0...1000 - -#define LOG_LEVEL_OFF 0 -#define LOG_LEVEL_ERROR (LOG_FLAG_ERROR) // 0...0001 -#define LOG_LEVEL_WARN (LOG_FLAG_ERROR | LOG_FLAG_WARN) // 0...0011 -#define LOG_LEVEL_INFO (LOG_FLAG_ERROR | LOG_FLAG_WARN | LOG_FLAG_INFO) // 0...0111 -#define LOG_LEVEL_VERBOSE (LOG_FLAG_ERROR | LOG_FLAG_WARN | LOG_FLAG_INFO | LOG_FLAG_VERBOSE) // 0...1111 - -#define LOG_ERROR (ddLogLevel & LOG_FLAG_ERROR) -#define LOG_WARN (ddLogLevel & LOG_FLAG_WARN) -#define LOG_INFO (ddLogLevel & LOG_FLAG_INFO) -#define LOG_VERBOSE (ddLogLevel & LOG_FLAG_VERBOSE) - -#define LOG_ASYNC_ENABLED YES - -#define LOG_ASYNC_ERROR ( NO && LOG_ASYNC_ENABLED) -#define LOG_ASYNC_WARN (YES && LOG_ASYNC_ENABLED) -#define LOG_ASYNC_INFO (YES && LOG_ASYNC_ENABLED) -#define LOG_ASYNC_VERBOSE (YES && LOG_ASYNC_ENABLED) - -#define DDLogError(frmt, ...) LOG_OBJC_MAYBE(LOG_ASYNC_ERROR, ddLogLevel, LOG_FLAG_ERROR, 0, frmt, ##__VA_ARGS__) -#define DDLogWarn(frmt, ...) LOG_OBJC_MAYBE(LOG_ASYNC_WARN, ddLogLevel, LOG_FLAG_WARN, 0, frmt, ##__VA_ARGS__) -#define DDLogInfo(frmt, ...) LOG_OBJC_MAYBE(LOG_ASYNC_INFO, ddLogLevel, LOG_FLAG_INFO, 0, frmt, ##__VA_ARGS__) -#define DDLogVerbose(frmt, ...) LOG_OBJC_MAYBE(LOG_ASYNC_VERBOSE, ddLogLevel, LOG_FLAG_VERBOSE, 0, frmt, ##__VA_ARGS__) - -#define DDLogCError(frmt, ...) LOG_C_MAYBE(LOG_ASYNC_ERROR, ddLogLevel, LOG_FLAG_ERROR, 0, frmt, ##__VA_ARGS__) -#define DDLogCWarn(frmt, ...) LOG_C_MAYBE(LOG_ASYNC_WARN, ddLogLevel, LOG_FLAG_WARN, 0, frmt, ##__VA_ARGS__) -#define DDLogCInfo(frmt, ...) LOG_C_MAYBE(LOG_ASYNC_INFO, ddLogLevel, LOG_FLAG_INFO, 0, frmt, ##__VA_ARGS__) -#define DDLogCVerbose(frmt, ...) LOG_C_MAYBE(LOG_ASYNC_VERBOSE, ddLogLevel, LOG_FLAG_VERBOSE, 0, frmt, ##__VA_ARGS__) - -/** - * The THIS_FILE macro gives you an NSString of the file name. - * For simplicity and clarity, the file name does not include the full path or file extension. - * - * For example: DDLogWarn(@"%@: Unable to find thingy", THIS_FILE) -> @"MyViewController: Unable to find thingy" -**/ - -NSString *ExtractFileNameWithoutExtension(const char *filePath, BOOL copy); - -#define THIS_FILE (ExtractFileNameWithoutExtension(__FILE__, NO)) - -/** - * The THIS_METHOD macro gives you the name of the current objective-c method. - * - * For example: DDLogWarn(@"%@ - Requires non-nil strings") -> @"setMake:model: requires non-nil strings" - * - * Note: This does NOT work in straight C functions (non objective-c). - * Instead you should use the predefined __FUNCTION__ macro. -**/ - -#define THIS_METHOD NSStringFromSelector(_cmd) - - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -@interface DDLog : NSObject - -#if GCD_MAYBE_AVAILABLE - -/** - * Provides access to the underlying logging queue. - * This may be helpful to Logger classes for things like thread synchronization. -**/ - -+ (dispatch_queue_t)loggingQueue; - -#endif - -#if GCD_MAYBE_UNAVAILABLE - -/** - * Provides access to the underlying logging thread. - * This may be helpful to Logger classes for things like thread synchronization. -**/ - -+ (NSThread *)loggingThread; - -#endif - -/** - * Logging Primitive. - * - * This method is used by the macros above. - * It is suggested you stick with the macros as they're easier to use. -**/ - -+ (void)log:(BOOL)synchronous - level:(int)level - flag:(int)flag - context:(int)context - file:(const char *)file - function:(const char *)function - line:(int)line - format:(NSString *)format, ...; - -/** - * Since logging can be asynchronous, there may be times when you want to flush the logs. - * The framework invokes this automatically when the application quits. -**/ - -+ (void)flushLog; - -/** - * Loggers - * - * If you want your log statements to go somewhere, - * you should create and add a logger. -**/ - -+ (void)addLogger:(id )logger; -+ (void)removeLogger:(id )logger; - -+ (void)removeAllLoggers; - -/** - * Registered Dynamic Logging - * - * These methods allow you to obtain a list of classes that are using registered dynamic logging, - * and also provides methods to get and set their log level during run time. -**/ - -+ (NSArray *)registeredClasses; -+ (NSArray *)registeredClassNames; - -+ (int)logLevelForClass:(Class)aClass; -+ (int)logLevelForClassWithName:(NSString *)aClassName; - -+ (void)setLogLevel:(int)logLevel forClass:(Class)aClass; -+ (void)setLogLevel:(int)logLevel forClassWithName:(NSString *)aClassName; - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -@protocol DDLogger -@required - -- (void)logMessage:(DDLogMessage *)logMessage; - -/** - * Formatters may optionally be added to any logger. - * If no formatter is set, the logger simply logs the message as it is given in logMessage. - * Or it may use its own built in formatting style. -**/ -- (id )logFormatter; -- (void)setLogFormatter:(id )formatter; - -@optional - -/** - * Since logging is asynchronous, adding and removing loggers is also asynchronous. - * In other words, the loggers are added and removed at appropriate times with regards to log messages. - * - * - Loggers will not receive log messages that were executed prior to when they were added. - * - Loggers will not receive log messages that were executed after they were removed. - * - * These methods are executed in the logging thread/queue. - * This is the same thread/queue that will execute every logMessage: invocation. - * Loggers may use these methods for thread synchronization or other setup/teardown tasks. -**/ -- (void)didAddLogger; -- (void)willRemoveLogger; - -/** - * Some loggers may buffer IO for optimization purposes. - * For example, a database logger may only save occasionaly as the disk IO is slow. - * In such loggers, this method should be implemented to flush any pending IO. - * - * This allows invocations of DDLog's flushLog method to be propogated to loggers that need it. - * - * Note that DDLog's flushLog method is invoked automatically when the application quits, - * and it may be also invoked manually by the developer prior to application crashes, or other such reasons. -**/ -- (void)flush; - -#if GCD_MAYBE_AVAILABLE - -/** - * When Grand Central Dispatch is available - * each logger is executed concurrently with respect to the other loggers. - * Thus, a dedicated dispatch queue is used for each logger. - * Logger implementations may optionally choose to provide their own dispatch queue. -**/ -- (dispatch_queue_t)loggerQueue; - -/** - * If the logger implementation does not choose to provide its own queue, - * one will automatically be created for it. - * The created queue will receive its name from this method. - * This may be helpful for debugging or profiling reasons. -**/ -- (NSString *)loggerName; - -#endif - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -@protocol DDLogFormatter -@required - -/** - * Formatters may optionally be added to any logger. - * This allows for increased flexibility in the logging environment. - * For example, log messages for log files may be formatted differently than log messages for the console. - * - * For more information about formatters, see the "Custom Formatters" page: - * http://code.google.com/p/cocoalumberjack/wiki/CustomFormatters - * - * The formatter may also optionally filter the log message by returning nil, - * in which case the logger will not log the message. -**/ - -- (NSString *)formatLogMessage:(DDLogMessage *)logMessage; - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -@protocol DDRegisteredDynamicLogging - -/** - * Implement these methods to allow a file's log level to be managed from a central location. - * - * This is useful if you'd like to be able to change log levels for various parts - * of your code from within the running application. - * - * Imagine pulling up the settings for your application, - * and being able to configure the logging level on a per file basis. - * - * The implementation can be very straight-forward: - * - * + (int)ddLogLevel - * { - * return ddLogLevel; - * } - * - * + (void)ddSetLogLevel:(int)logLevel - * { - * ddLogLevel = logLevel; - * } -**/ - -+ (int)ddLogLevel; -+ (void)ddSetLogLevel:(int)logLevel; - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * The DDLogMessage class encapsulates information about the log message. - * If you write custom loggers or formatters, you will be dealing with objects of this class. -**/ - -@interface DDLogMessage : NSObject -{ - -// The public variables below can be accessed directly (for speed). -// For example: logMessage->logLevel - -@public - int logLevel; - int logFlag; - int logContext; - NSString *logMsg; - NSDate *timestamp; - const char *file; - const char *function; - int lineNumber; - mach_port_t machThreadID; - -// The private variables below are only calculated if needed. -// You should use the public methods to access this information. - -@private - NSString *threadID; - NSString *fileName; - NSString *methodName; -} - -// The initializer is somewhat reserved for internal use. -// However, if you find need to manually create logMessage objects, -// there is one thing you should be aware of. -// The initializer expects the file and function parameters to be string literals. -// That is, it expects the given strings to exist for the duration of the object's lifetime, -// and it expects the given strings to be immutable. -// In other words, it does not copy these strings, it simply points to them. - -- (id)initWithLogMsg:(NSString *)logMsg - level:(int)logLevel - flag:(int)logFlag - context:(int)logContext - file:(const char *)file - function:(const char *)function - line:(int)line; - -/** - * Returns the threadID as it appears in NSLog. - * That is, it is a hexadecimal value which is calculated from the machThreadID. -**/ -- (NSString *)threadID; - -/** - * Convenience method to get just the file name, as the file variable is generally the full file path. - * This method does not include the file extension, which is generally unwanted for logging purposes. -**/ -- (NSString *)fileName; - -/** - * Returns the function variable in NSString form. -**/ -- (NSString *)methodName; - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * The DDLogger protocol specifies that an optional formatter can be added to a logger. - * Most (but not all) loggers will want to support formatters. - * - * However, writting getters and setters in a thread safe manner, - * while still maintaining maximum speed for the logging process, is a difficult task. - * - * To do it right, the implementation of the getter/setter has strict requiremenets: - * - Must NOT require the logMessage method to acquire a lock. - * - Must NOT require the logMessage method to access an atomic property (also a lock of sorts). - * - * To simplify things, an abstract logger is provided that implements the getter and setter. - * - * Logger implementations may simply extend this class, - * and they can ACCESS THE FORMATTER VARIABLE DIRECTLY from within their logMessage method! -**/ - -@interface DDAbstractLogger : NSObject -{ - id formatter; - -#if GCD_MAYBE_AVAILABLE - dispatch_queue_t loggerQueue; -#endif -} - -- (id )logFormatter; -- (void)setLogFormatter:(id )formatter; - -@end diff --git a/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/DDLog.m b/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/DDLog.m deleted file mode 100755 index bff5d450236a1..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/DDLog.m +++ /dev/null @@ -1,1491 +0,0 @@ -#import "DDLog.h" - -#import -#import -#import -#import -#import - - -/** - * Welcome to Cocoa Lumberjack! - * - * The Google Code page has a wealth of documentation if you have any questions. - * http://code.google.com/p/cocoalumberjack/ - * - * If you're new to the project you may wish to read the "Getting Started" page. - * http://code.google.com/p/cocoalumberjack/wiki/GettingStarted - * -**/ - -// We probably shouldn't be using DDLog() statements within the DDLog implementation. -// But we still want to leave our log statements for any future debugging, -// and to allow other developers to trace the implementation (which is a great learning tool). -// -// So we use a primitive logging macro around NSLog. -// We maintain the NS prefix on the macros to be explicit about the fact that we're using NSLog. - -#define DD_DEBUG NO - -#define NSLogDebug(frmt, ...) do{ if(DD_DEBUG) NSLog((frmt), ##__VA_ARGS__); } while(0) - -// Specifies the maximum queue size of the logging thread. -// -// Since most logging is asynchronous, its possible for rogue threads to flood the logging queue. -// That is, to issue an abundance of log statements faster than the logging thread can keepup. -// Typically such a scenario occurs when log statements are added haphazardly within large loops, -// but may also be possible if relatively slow loggers are being used. -// -// This property caps the queue size at a given number of outstanding log statements. -// If a thread attempts to issue a log statement when the queue is already maxed out, -// the issuing thread will block until the queue size drops below the max again. - -#define LOG_MAX_QUEUE_SIZE 1000 // Should not exceed INT32_MAX - -#if GCD_MAYBE_AVAILABLE -struct LoggerNode { - id logger; - dispatch_queue_t loggerQueue; - struct LoggerNode * next; -}; -typedef struct LoggerNode LoggerNode; -#endif - - -@interface DDLog (PrivateAPI) - -+ (void)lt_addLogger:(id )logger; -+ (void)lt_removeLogger:(id )logger; -+ (void)lt_removeAllLoggers; -+ (void)lt_log:(DDLogMessage *)logMessage; -+ (void)lt_flush; - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -@implementation DDLog - -#if GCD_MAYBE_AVAILABLE - - // All logging statements are added to the same queue to ensure FIFO operation. - static dispatch_queue_t loggingQueue; - - // Individual loggers are executed concurrently per log statement. - // Each logger has it's own associated queue, and a dispatch group is used for synchrnoization. - static dispatch_group_t loggingGroup; - - // A linked list is used to manage all the individual loggers. - // Each item in the linked list also includes the loggers associated dispatch queue. - static LoggerNode *loggerNodes; - - // In order to prevent to queue from growing infinitely large, - // a maximum size is enforced (LOG_MAX_QUEUE_SIZE). - static dispatch_semaphore_t queueSemaphore; - - // Minor optimization for uniprocessor machines - static unsigned int numProcessors; - -#endif - -#if GCD_MAYBE_UNAVAILABLE - - // All logging statements are queued onto the same thread to ensure FIFO operation. - static NSThread *loggingThread; - - // An array is used to manage all the individual loggers. - // The array is only modified on the loggingThread. - static NSMutableArray *loggers; - - // In order to prevent to queue from growing infinitely large, - // a maximum size is enforced (LOG_MAX_QUEUE_SIZE). - static int32_t queueSize; // Incremented and decremented locklessly using OSAtomic operations - static NSCondition *condition; // Not used unless the queueSize exceeds its max - static NSMutableArray *blockedThreads; // Not used unless the queueSize exceeds its max - -#endif - -/** - * The runtime sends initialize to each class in a program exactly one time just before the class, - * or any class that inherits from it, is sent its first message from within the program. (Thus the - * method may never be invoked if the class is not used.) The runtime sends the initialize message to - * classes in a thread-safe manner. Superclasses receive this message before their subclasses. - * - * This method may also be called directly (assumably by accident), hence the safety mechanism. -**/ -+ (void)initialize -{ - static BOOL initialized = NO; - if (!initialized) - { - initialized = YES; - - if (IS_GCD_AVAILABLE) - { - #if GCD_MAYBE_AVAILABLE - - NSLogDebug(@"DDLog: Using grand central dispatch"); - - loggingQueue = dispatch_queue_create("cocoa.lumberjack", NULL); - loggingGroup = dispatch_group_create(); - - loggerNodes = NULL; - - queueSemaphore = dispatch_semaphore_create(LOG_MAX_QUEUE_SIZE); - - // Figure out how many processors are available. - // This may be used later for an optimization on uniprocessor machines. - - host_basic_info_data_t hostInfo; - mach_msg_type_number_t infoCount; - - infoCount = HOST_BASIC_INFO_COUNT; - host_info(mach_host_self(), HOST_BASIC_INFO, (host_info_t)&hostInfo, &infoCount); - - unsigned int result = (unsigned int)(hostInfo.max_cpus); - unsigned int one = (unsigned int)(1); - - numProcessors = MAX(result, one); - - NSLogDebug(@"DDLog: numProcessors = %u", numProcessors); - - #endif - } - else - { - #if GCD_MAYBE_UNAVAILABLE - - NSLogDebug(@"DDLog: GCD not available"); - - loggingThread = [[NSThread alloc] initWithTarget:self selector:@selector(lt_main:) object:nil]; - [loggingThread start]; - - loggers = [[NSMutableArray alloc] initWithCapacity:4]; - - queueSize = 0; - - condition = [[NSCondition alloc] init]; - blockedThreads = [[NSMutableArray alloc] init]; - - #endif - } - - #if TARGET_OS_IPHONE - NSString *notificationName = @"UIApplicationWillTerminateNotification"; - #else - NSString *notificationName = @"NSApplicationWillTerminateNotification"; - #endif - - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(applicationWillTerminate:) - name:notificationName - object:nil]; - } -} - -#if GCD_MAYBE_AVAILABLE - -/** - * Provides access to the logging queue. -**/ -+ (dispatch_queue_t)loggingQueue -{ - return loggingQueue; -} - -#endif - -#if GCD_MAYBE_UNAVAILABLE - -/** - * Provides access to the logging thread. -**/ -+ (NSThread *)loggingThread -{ - return loggingThread; -} - -#endif - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Notifications -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -+ (void)applicationWillTerminate:(NSNotification *)notification -{ - [self flushLog]; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Logger Management -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -+ (void)addLogger:(id )logger -{ - if (logger == nil) return; - - if (IS_GCD_AVAILABLE) - { - #if GCD_MAYBE_AVAILABLE - - dispatch_block_t addLoggerBlock = ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - [self lt_addLogger:logger]; - - [pool drain]; - }; - - dispatch_async(loggingQueue, addLoggerBlock); - - #endif - } - else - { - #if GCD_MAYBE_UNAVAILABLE - - [self performSelector:@selector(lt_addLogger:) onThread:loggingThread withObject:logger waitUntilDone:NO]; - - #endif - } -} - -+ (void)removeLogger:(id )logger -{ - if (logger == nil) return; - - if (IS_GCD_AVAILABLE) - { - #if GCD_MAYBE_AVAILABLE - - dispatch_block_t removeLoggerBlock = ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - [self lt_removeLogger:logger]; - - [pool drain]; - }; - - dispatch_async(loggingQueue, removeLoggerBlock); - - #endif - } - else - { - #if GCD_MAYBE_UNAVAILABLE - - [self performSelector:@selector(lt_removeLogger:) onThread:loggingThread withObject:logger waitUntilDone:NO]; - - #endif - } -} - -+ (void)removeAllLoggers -{ - if (IS_GCD_AVAILABLE) - { - #if GCD_MAYBE_AVAILABLE - - dispatch_block_t removeAllLoggersBlock = ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - [self lt_removeAllLoggers]; - - [pool drain]; - }; - - dispatch_async(loggingQueue, removeAllLoggersBlock); - - #endif - } - else - { - #if GCD_MAYBE_UNAVAILABLE - - [self performSelector:@selector(lt_removeAllLoggers) onThread:loggingThread withObject:nil waitUntilDone:NO]; - - #endif - } -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Master Logging -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -+ (void)queueLogMessage:(DDLogMessage *)logMessage asynchronously:(BOOL)asyncFlag -{ - // We have a tricky situation here... - // - // In the common case, when the queueSize is below the maximumQueueSize, - // we want to simply enqueue the logMessage. And we want to do this as fast as possible, - // which means we don't want to block and we don't want to use any locks. - // - // However, if the queueSize gets too big, we want to block. - // But we have very strict requirements as to when we block, and how long we block. - // - // The following example should help illustrate our requirements: - // - // Imagine that the maximum queue size is configured to be 5, - // and that there are already 5 log messages queued. - // Let us call these 5 queued log messages A, B, C, D, and E. (A is next to be executed) - // - // Now if our thread issues a log statement (let us call the log message F), - // it should block before the message is added to the queue. - // Furthermore, it should be unblocked immediately after A has been unqueued. - // - // The requirements are strict in this manner so that we block only as long as necessary, - // and so that blocked threads are unblocked in the order in which they were blocked. - // - // Returning to our previous example, let us assume that log messages A through E are still queued. - // Our aforementioned thread is blocked attempting to queue log message F. - // Now assume we have another separate thread that attempts to issue log message G. - // It should block until log messages A and B have been unqueued. - - if (IS_GCD_AVAILABLE) - { - #if GCD_MAYBE_AVAILABLE - - // We are using a counting semaphore provided by GCD. - // The semaphore is initialized with our LOG_MAX_QUEUE_SIZE value. - // Everytime we want to queue a log message we decrement this value. - // If the resulting value is less than zero, - // the semaphore function waits in FIFO order for a signal to occur before returning. - // - // A dispatch semaphore is an efficient implementation of a traditional counting semaphore. - // Dispatch semaphores call down to the kernel only when the calling thread needs to be blocked. - // If the calling semaphore does not need to block, no kernel call is made. - - dispatch_semaphore_wait(queueSemaphore, DISPATCH_TIME_FOREVER); - - #endif - } - else - { - #if GCD_MAYBE_UNAVAILABLE - - // We're going increment our queue size (in an atomic fashion). - // If the queue size would exceed our LOG_MAX_QUEUE_SIZE value, - // then we're going to take a lock, and add ourself to the blocked threads array. - // Then we wait for the logging thread to signal us. - // When it does, we automatically reaquire the lock, - // and check to see if we have been removed from the blocked threads array. - // When this occurs we are unblocked, and we can go ahead and queue our log message. - - int32_t newQueueSize = OSAtomicIncrement32(&queueSize); - if (newQueueSize > LOG_MAX_QUEUE_SIZE) - { - NSLogDebug(@"DDLog: Blocking thread %@ (newQueueSize=%i)", [logMessage threadID], newQueueSize); - - [condition lock]; - - NSString *currentThreadID = [logMessage threadID]; - [blockedThreads addObject:currentThreadID]; - - NSUInteger lastKnownIndex = [blockedThreads count] - 1; - - if (lastKnownIndex == 0) - { - NSLogDebug(@"DDLog: Potential edge case: First blocked thread -> Signaling condition..."); - - // Edge case: - // The loggingThread/loggingQueue acquired the lock before we did, - // but it immediately discovered the blockedThreads array was empty. - - [condition signal]; - } - - BOOL done = NO; - while (!done) - { - BOOL found = NO; - NSUInteger i; - NSUInteger count = [blockedThreads count]; - - for (i = 0; i <= lastKnownIndex && i < count && !found; i++) - { - NSString *blockedThreadID = [blockedThreads objectAtIndex:i]; - - // Instead of doing a string comparison, - // we can save CPU cycles by doing an pointer comparison, - // since we still have access to the string that we added the array. - - if (blockedThreadID == currentThreadID) - { - found = YES; - lastKnownIndex = i; - } - } - - // If our currentThreadID is still in the blockedThreads array, - // then we are still blocked, and we're not done. - - done = !found; - - if (!done) - { - [condition wait]; - } - } - - - [condition unlock]; - - NSLogDebug(@"DDLog: Unblocking thread %@", [logMessage threadID]); - } - - #endif - } - - // We've now sure we won't overflow the queue. - // It is time to queue our log message. - - if (IS_GCD_AVAILABLE) - { - #if GCD_MAYBE_AVAILABLE - - dispatch_block_t logBlock = ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - [self lt_log:logMessage]; - - [pool drain]; - }; - - if (asyncFlag) - dispatch_async(loggingQueue, logBlock); - else - dispatch_sync(loggingQueue, logBlock); - - #endif - } - else - { - #if GCD_MAYBE_UNAVAILABLE - - [self performSelector:@selector(lt_log:) onThread:loggingThread withObject:logMessage waitUntilDone:!asyncFlag]; - - #endif - } -} - -+ (void)log:(BOOL)asynchronous - level:(int)level - flag:(int)flag - context:(int)context - file:(const char *)file - function:(const char *)function - line:(int)line - format:(NSString *)format, ... -{ - va_list args; - if (format) - { - va_start(args, format); - - NSString *logMsg = [[NSString alloc] initWithFormat:format arguments:args]; - DDLogMessage *logMessage = [[DDLogMessage alloc] initWithLogMsg:logMsg - level:level - flag:flag - context:context - file:file - function:function - line:line]; - - [self queueLogMessage:logMessage asynchronously:asynchronous]; - - [logMessage release]; - [logMsg release]; - - va_end(args); - } -} - -+ (void)flushLog -{ - if (IS_GCD_AVAILABLE) - { - #if GCD_MAYBE_AVAILABLE - - dispatch_block_t flushBlock = ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - [self lt_flush]; - - [pool drain]; - }; - - dispatch_sync(loggingQueue, flushBlock); - - #endif - } - else - { - #if GCD_MAYBE_UNAVAILABLE - - [self performSelector:@selector(lt_flush) onThread:loggingThread withObject:nil waitUntilDone:YES]; - - #endif - } -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Registered Dynamic Logging -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -+ (BOOL)isRegisteredClass:(Class)class -{ - SEL getterSel = @selector(ddLogLevel); - SEL setterSel = @selector(ddSetLogLevel:); - - Method getter = class_getClassMethod(class, getterSel); - Method setter = class_getClassMethod(class, setterSel); - - if ((getter != NULL) && (setter != NULL)) - { - return YES; - } - - return NO; -} - -+ (NSArray *)registeredClasses -{ - int numClasses, i; - - // We're going to get the list of all registered classes. - // The Objective-C runtime library automatically registers all the classes defined in your source code. - // - // To do this we use the following method (documented in the Objective-C Runtime Reference): - // - // int objc_getClassList(Class *buffer, int bufferLen) - // - // We can pass (NULL, 0) to obtain the total number of - // registered class definitions without actually retrieving any class definitions. - // This allows us to allocate the minimum amount of memory needed for the application. - - numClasses = objc_getClassList(NULL, 0); - - // The numClasses method now tells us how many classes we have. - // So we can allocate our buffer, and get pointers to all the class definitions. - - Class *classes = malloc(sizeof(Class) * numClasses); - - numClasses = objc_getClassList(classes, numClasses); - - // We can now loop through the classes, and test each one to see if it is a DDLogging class. - - NSMutableArray *result = [NSMutableArray arrayWithCapacity:numClasses]; - - for (i = 0; i < numClasses; i++) - { - Class class = classes[i]; - - if ([self isRegisteredClass:class]) - { - [result addObject:class]; - } - } - - free(classes); - - return result; -} - -+ (NSArray *)registeredClassNames -{ - NSArray *registeredClasses = [self registeredClasses]; - NSMutableArray *result = [NSMutableArray arrayWithCapacity:[registeredClasses count]]; - - for (Class class in registeredClasses) - { - [result addObject:NSStringFromClass(class)]; - } - - return result; -} - -+ (int)logLevelForClass:(Class)aClass -{ - if ([self isRegisteredClass:aClass]) - { - return [aClass ddLogLevel]; - } - - return -1; -} - -+ (int)logLevelForClassWithName:(NSString *)aClassName -{ - Class aClass = NSClassFromString(aClassName); - - return [self logLevelForClass:aClass]; -} - -+ (void)setLogLevel:(int)logLevel forClass:(Class)aClass -{ - if ([self isRegisteredClass:aClass]) - { - [aClass ddSetLogLevel:logLevel]; - } -} - -+ (void)setLogLevel:(int)logLevel forClassWithName:(NSString *)aClassName -{ - Class aClass = NSClassFromString(aClassName); - - [self setLogLevel:logLevel forClass:aClass]; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Logging Thread -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -#if GCD_MAYBE_UNAVAILABLE - -/** - * Entry point for logging thread. -**/ -+ (void)lt_main:(id)ignore -{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - // We can't run the run loop unless it has an associated input source or a timer. - // So we'll just create a timer that will never fire - unless the server runs for 10,000 years. - [NSTimer scheduledTimerWithTimeInterval:DBL_MAX target:self selector:@selector(ignore:) userInfo:nil repeats:NO]; - - [[NSRunLoop currentRunLoop] run]; - - [pool drain]; -} - -#endif - -/** - * This method should only be run on the logging thread/queue. -**/ -+ (void)lt_addLogger:(id )logger -{ - if (IS_GCD_AVAILABLE) - { - #if GCD_MAYBE_AVAILABLE - - // Add to linked list of LoggerNode elements. - // Need to create loggerQueue if loggerNode doesn't provide one. - - LoggerNode *loggerNode = malloc(sizeof(LoggerNode)); - loggerNode->logger = [logger retain]; - - if ([logger respondsToSelector:@selector(loggerQueue)]) - { - // Logger may be providing its own queue - - loggerNode->loggerQueue = [logger loggerQueue]; - } - - if (loggerNode->loggerQueue) - { - dispatch_retain(loggerNode->loggerQueue); - } - else - { - // Automatically create queue for the logger. - // Use the logger name as the queue name if possible. - - const char *loggerQueueName = NULL; - if ([logger respondsToSelector:@selector(loggerName)]) - { - loggerQueueName = [[logger loggerName] UTF8String]; - } - - loggerNode->loggerQueue = dispatch_queue_create(loggerQueueName, NULL); - } - - loggerNode->next = loggerNodes; - loggerNodes = loggerNode; - - #endif - } - else - { - #if GCD_MAYBE_UNAVAILABLE - - // Add to loggers array - - [loggers addObject:logger]; - - #endif - } - - if ([logger respondsToSelector:@selector(didAddLogger)]) - { - [logger didAddLogger]; - } -} - -/** - * This method should only be run on the logging thread/queue. -**/ -+ (void)lt_removeLogger:(id )logger -{ - if ([logger respondsToSelector:@selector(willRemoveLogger)]) - { - [logger willRemoveLogger]; - } - - if (IS_GCD_AVAILABLE) - { - #if GCD_MAYBE_AVAILABLE - - // Remove from linked list of LoggerNode elements. - // - // Need to release: - // - logger - // - loggerQueue - // - loggerNode - - LoggerNode *prevNode = NULL; - LoggerNode *currentNode = loggerNodes; - - while (currentNode) - { - if (currentNode->logger == logger) - { - if (prevNode) - { - // LoggerNode had previous node pointing to it. - prevNode->next = currentNode->next; - } - else - { - // LoggerNode was first in list. Update loggerNodes pointer. - loggerNodes = currentNode->next; - } - - [currentNode->logger release]; - currentNode->logger = nil; - - dispatch_release(currentNode->loggerQueue); - currentNode->loggerQueue = NULL; - - currentNode->next = NULL; - - free(currentNode); - - break; - } - - prevNode = currentNode; - currentNode = currentNode->next; - } - - #endif - } - else - { - #if GCD_MAYBE_UNAVAILABLE - - // Remove from loggers array - - [loggers removeObject:logger]; - - #endif - } -} - -/** - * This method should only be run on the logging thread/queue. -**/ -+ (void)lt_removeAllLoggers -{ - if (IS_GCD_AVAILABLE) - { - #if GCD_MAYBE_AVAILABLE - - // Iterate through linked list of LoggerNode elements. - // For each one, notify the logger, and deallocate all associated resources. - // - // Need to release: - // - logger - // - loggerQueue - // - loggerNode - - LoggerNode *nextNode; - LoggerNode *currentNode = loggerNodes; - - while (currentNode) - { - if ([currentNode->logger respondsToSelector:@selector(willRemoveLogger)]) - { - [currentNode->logger willRemoveLogger]; - } - - nextNode = currentNode->next; - - [currentNode->logger release]; - currentNode->logger = nil; - - dispatch_release(currentNode->loggerQueue); - currentNode->loggerQueue = NULL; - - currentNode->next = NULL; - - free(currentNode); - - currentNode = nextNode; - } - - loggerNodes = NULL; - - #endif - } - else - { - #if GCD_MAYBE_UNAVAILABLE - - // Notify all loggers. - // And then remove them all from loggers array. - - for (id logger in loggers) - { - if ([logger respondsToSelector:@selector(willRemoveLogger)]) - { - [logger willRemoveLogger]; - } - } - - [loggers removeAllObjects]; - - #endif - } -} - -/** - * This method should only be run on the logging thread/queue. -**/ -+ (void)lt_log:(DDLogMessage *)logMessage -{ - // Execute the given log message on each of our loggers. - - if (IS_GCD_AVAILABLE) - { - #if GCD_MAYBE_AVAILABLE - - if (numProcessors > 1) - { - // Execute each logger concurrently, each within its own queue. - // All blocks are added to same group. - // After each block has been queued, wait on group. - // - // The waiting ensures that a slow logger doesn't end up with a large queue of pending log messages. - // This would defeat the purpose of the efforts we made earlier to restrict the max queue size. - - LoggerNode *currentNode = loggerNodes; - - while (currentNode) - { - dispatch_block_t loggerBlock = ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - [currentNode->logger logMessage:logMessage]; - - [pool drain]; - }; - - dispatch_group_async(loggingGroup, currentNode->loggerQueue, loggerBlock); - - currentNode = currentNode->next; - } - - dispatch_group_wait(loggingGroup, DISPATCH_TIME_FOREVER); - } - else - { - // Execute each logger serialy, each within its own queue. - - LoggerNode *currentNode = loggerNodes; - - while (currentNode) - { - dispatch_block_t loggerBlock = ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - [currentNode->logger logMessage:logMessage]; - - [pool drain]; - }; - - dispatch_sync(currentNode->loggerQueue, loggerBlock); - - currentNode = currentNode->next; - } - } - - #endif - } - else - { - #if GCD_MAYBE_UNAVAILABLE - - for (id logger in loggers) - { - [logger logMessage:logMessage]; - } - - #endif - } - - // If our queue got too big, there may be blocked threads waiting to add log messages to the queue. - // Since we've now dequeued an item from the log, we may need to unblock the next thread. - - if (IS_GCD_AVAILABLE) - { - #if GCD_MAYBE_AVAILABLE - - // We are using a counting semaphore provided by GCD. - // The semaphore is initialized with our LOG_MAX_QUEUE_SIZE value. - // When a log message is queued this value is decremented. - // When a log message is dequeued this value is incremented. - // If the value ever drops below zero, - // the queueing thread blocks and waits in FIFO order for us to signal it. - // - // A dispatch semaphore is an efficient implementation of a traditional counting semaphore. - // Dispatch semaphores call down to the kernel only when the calling thread needs to be blocked. - // If the calling semaphore does not need to block, no kernel call is made. - - dispatch_semaphore_signal(queueSemaphore); - - #endif - } - else - { - #if GCD_MAYBE_UNAVAILABLE - - int32_t newQueueSize = OSAtomicDecrement32(&queueSize); - if (newQueueSize >= LOG_MAX_QUEUE_SIZE) - { - // There is an existing blocked thread waiting for us. - // When the thread went to queue a log message, it first incremented the queueSize. - // At this point it realized that was going to exceed the maxQueueSize. - // It then added itself to the blockedThreads list, and is now waiting for us to signal it. - - [condition lock]; - - while ([blockedThreads count] == 0) - { - NSLogDebug(@"DDLog: Edge case: Empty blocked threads array -> Waiting for condition..."); - - // Edge case. - // We acquired the lock before the blockedThread did. - // That is why the array is empty. - // Allow it to acquire the lock and signal us. - - [condition wait]; - } - - // The blockedThreads variable is acting as a queue. (FIFO) - // Whatever was the first thread to block can now be unblocked. - // This means that thread will block only until the count of - // prevoiusly queued plus previously reserved log messages before it have dropped below the maxQueueSize. - - NSLogDebug(@"DDLog: Signaling thread %@ (newQueueSize=%i)", [blockedThreads objectAtIndex:0], newQueueSize); - - [blockedThreads removeObjectAtIndex:0]; - [condition broadcast]; - - [condition unlock]; - } - - #endif - } -} - -/** - * This method should only be run on the background logging thread. -**/ -+ (void)lt_flush -{ - // All log statements issued before the flush method was invoked have now been executed. - // - // Now we need to propogate the flush request to any loggers that implement the flush method. - // This is designed for loggers that buffer IO. - - if (IS_GCD_AVAILABLE) - { - #if GCD_MAYBE_AVAILABLE - - LoggerNode *currentNode = loggerNodes; - - while (currentNode) - { - if ([currentNode->logger respondsToSelector:@selector(flush)]) - { - dispatch_block_t loggerBlock = ^{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - [currentNode->logger flush]; - - [pool drain]; - }; - - dispatch_group_async(loggingGroup, currentNode->loggerQueue, loggerBlock); - } - currentNode = currentNode->next; - } - - dispatch_group_wait(loggingGroup, DISPATCH_TIME_FOREVER); - - #endif - } - else - { - #if GCD_MAYBE_UNAVAILABLE - - for (id logger in loggers) - { - if ([logger respondsToSelector:@selector(flush)]) - { - [logger flush]; - } - } - - #endif - } -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Utilities -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -NSString *ExtractFileNameWithoutExtension(const char *filePath, BOOL copy) -{ - if (filePath == NULL) return nil; - - char *lastSlash = NULL; - char *lastDot = NULL; - - char *p = (char *)filePath; - - while (*p != '\0') - { - if (*p == '/') - lastSlash = p; - else if (*p == '.') - lastDot = p; - - p++; - } - - char *subStr; - NSUInteger subLen; - - if (lastSlash) - { - if (lastDot) - { - // lastSlash -> lastDot - subStr = lastSlash + 1; - subLen = lastDot - subStr; - } - else - { - // lastSlash -> endOfString - subStr = lastSlash + 1; - subLen = p - subStr; - } - } - else - { - if (lastDot) - { - // startOfString -> lastDot - subStr = (char *)filePath; - subLen = lastDot - subStr; - } - else - { - // startOfString -> endOfString - subStr = (char *)filePath; - subLen = p - subStr; - } - } - - if (copy) - { - return [[[NSString alloc] initWithBytes:subStr - length:subLen - encoding:NSUTF8StringEncoding] autorelease]; - } - else - { - // We can take advantage of the fact that __FILE__ is a string literal. - // Specifically, we don't need to waste time copying the string. - // We can just tell NSString to point to a range within the string literal. - - return [[[NSString alloc] initWithBytesNoCopy:subStr - length:subLen - encoding:NSUTF8StringEncoding - freeWhenDone:NO] autorelease]; - } -} - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -@implementation DDLogMessage - -- (id)initWithLogMsg:(NSString *)msg - level:(int)level - flag:(int)flag - context:(int)context - file:(const char *)aFile - function:(const char *)aFunction - line:(int)line -{ - if((self = [super init])) - { - logMsg = [msg retain]; - logLevel = level; - logFlag = flag; - logContext = context; - file = aFile; - function = aFunction; - lineNumber = line; - - timestamp = [[NSDate alloc] init]; - - machThreadID = pthread_mach_thread_np(pthread_self()); - } - return self; -} - -- (NSString *)threadID -{ - if (threadID == nil) - { - threadID = [[NSString alloc] initWithFormat:@"%x", machThreadID]; - } - - return threadID; -} - -- (NSString *)fileName -{ - if (fileName == nil) - { - fileName = [ExtractFileNameWithoutExtension(file, NO) retain]; - } - - return fileName; -} - -- (NSString *)methodName -{ - if (methodName == nil && function != NULL) - { - methodName = [[NSString alloc] initWithUTF8String:function]; - } - - return methodName; -} - -- (void)dealloc -{ - [logMsg release]; - [timestamp release]; - - [threadID release]; - [fileName release]; - [methodName release]; - - [super dealloc]; -} - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -@implementation DDAbstractLogger - -- (id)init -{ - if ((self = [super init])) - { - if (IS_GCD_AVAILABLE) - { - #if GCD_MAYBE_AVAILABLE - - const char *loggerQueueName = NULL; - if ([self respondsToSelector:@selector(loggerName)]) - { - loggerQueueName = [[self loggerName] UTF8String]; - } - - loggerQueue = dispatch_queue_create(loggerQueueName, NULL); - - #endif - } - } - return self; -} - -- (void)dealloc -{ - if (IS_GCD_AVAILABLE) - { - #if GCD_MAYBE_AVAILABLE - if (loggerQueue) dispatch_release(loggerQueue); - #endif - } - - [super dealloc]; -} - -- (void)logMessage:(DDLogMessage *)logMessage -{ - // Override me -} - -#if GCD_MAYBE_UNAVAILABLE - -- (void)lt_getLogFormatter:(NSMutableArray *)resultHolder -{ - // This method is executed on the logging thread. - - [resultHolder addObject:formatter]; - OSMemoryBarrier(); -} - -- (void)lt_setLogFormatter:(id )logFormatter -{ - // This method is executed on the logging thread. - - if (formatter != logFormatter) - { - [formatter release]; - formatter = [logFormatter retain]; - } -} - -#endif - -- (id )logFormatter -{ - // This method must be thread safe and intuitive. - // Therefore if somebody executes the following code: - // - // [logger setLogFormatter:myFormatter]; - // formatter = [logger logFormatter]; - // - // They would expect formatter to equal myFormatter. - // This functionality must be ensured by the getter and setter method. - // - // The thread safety must not come at a cost to the performance of the logMessage method. - // This method is likely called sporadically, while the logMessage method is called repeatedly. - // This means, the implementation of this method: - // - Must NOT require the logMessage method to acquire a lock. - // - Must NOT require the logMessage method to access an atomic property (also a lock of sorts). - // - // Thread safety is ensured by executing access to the formatter variable on the logging thread/queue. - // This is the same thread/queue that the logMessage method operates on. - // - // Note: The last time I benchmarked the performance of direct access vs atomic property access, - // direct access was over twice as fast on the desktop and over 6 times as fast on the iPhone. - - if (IS_GCD_AVAILABLE) - { - #if GCD_MAYBE_AVAILABLE - - // loggerQueue : Our own private internal queue that the logMessage method runs on. - // Operations are added to this queue from the global loggingQueue. - // - // loggingQueue : The queue that all log messages go through before they arrive in our loggerQueue. - // - // It is important to note that, while the loggerQueue is used to create thread-safety for our formatter, - // changes to the formatter variable are queued on the loggingQueue. - // - // Since this will obviously confuse the hell out of me later, here is a better description. - // Imagine the following code: - // - // DDLogVerbose(@"log msg 1"); - // DDLogVerbose(@"log msg 2"); - // [logger setFormatter:myFormatter]; - // DDLogVerbose(@"log msg 3"); - // - // Our intuitive requirement means that the new formatter will only apply to the 3rd log message. - // But notice what happens if we have asynchronous logging enabled for verbose mode. - // - // Log msg 1 starts executing asynchronously on the loggingQueue. - // The loggingQueue executes the log statement on each logger concurrently. - // That means it executes log msg 1 on our loggerQueue. - // While log msg 1 is executing, log msg 2 gets added to the loggingQueue. - // Then the user requests that we change our formatter. - // So at this exact moment, our queues look like this: - // - // loggerQueue : executing log msg 1, nil - // loggingQueue : executing log msg 1, log msg 2, nil - // - // So direct access to the formatter is only available if requested from the loggerQueue. - // In all other circumstances we need to go through the loggingQueue to get the proper value. - - if (dispatch_get_current_queue() == loggerQueue) - { - return formatter; - } - - __block id result; - - dispatch_sync([DDLog loggingQueue], ^{ - result = [formatter retain]; - }); - - return [result autorelease]; - - #endif - } - else - { - #if GCD_MAYBE_UNAVAILABLE - - NSThread *loggingThread = [DDLog loggingThread]; - - if ([NSThread currentThread] == loggingThread) - { - return formatter; - } - - NSMutableArray *resultHolder = [[NSMutableArray alloc] init]; - - [self performSelector:@selector(lt_getLogFormatter:) - onThread:loggingThread - withObject:resultHolder - waitUntilDone:YES]; - - OSMemoryBarrier(); - - id result = [[resultHolder objectAtIndex:0] retain]; - [resultHolder release]; - - return [result autorelease]; - - #endif - } -} - -- (void)setLogFormatter:(id )logFormatter -{ - // This method must be thread safe and intuitive. - // Therefore if somebody executes the following code: - // - // [logger setLogFormatter:myFormatter]; - // formatter = [logger logFormatter]; - // - // They would expect formatter to equal myFormatter. - // This functionality must be ensured by the getter and setter method. - // - // The thread safety must not come at a cost to the performance of the logMessage method. - // This method is likely called sporadically, while the logMessage method is called repeatedly. - // This means, the implementation of this method: - // - Must NOT require the logMessage method to acquire a lock. - // - Must NOT require the logMessage method to access an atomic property (also a lock of sorts). - // - // Thread safety is ensured by executing access to the formatter variable on the logging thread/queue. - // This is the same thread/queue that the logMessage method operates on. - // - // Note: The last time I benchmarked the performance of direct access vs atomic property access, - // direct access was over twice as fast on the desktop and over 6 times as fast on the iPhone. - - if (IS_GCD_AVAILABLE) - { - #if GCD_MAYBE_AVAILABLE - - // loggerQueue : Our own private internal queue that the logMessage method runs on. - // Operations are added to this queue from the global loggingQueue. - // - // loggingQueue : The queue that all log messages go through before they arrive in our loggerQueue. - // - // It is important to note that, while the loggerQueue is used to create thread-safety for our formatter, - // changes to the formatter variable are queued on the loggingQueue. - // - // Since this will obviously confuse the hell out of me later, here is a better description. - // Imagine the following code: - // - // DDLogVerbose(@"log msg 1"); - // DDLogVerbose(@"log msg 2"); - // [logger setFormatter:myFormatter]; - // DDLogVerbose(@"log msg 3"); - // - // Our intuitive requirement means that the new formatter will only apply to the 3rd log message. - // But notice what happens if we have asynchronous logging enabled for verbose mode. - // - // Log msg 1 starts executing asynchronously on the loggingQueue. - // The loggingQueue executes the log statement on each logger concurrently. - // That means it executes log msg 1 on our loggerQueue. - // While log msg 1 is executing, log msg 2 gets added to the loggingQueue. - // Then the user requests that we change our formatter. - // So at this exact moment, our queues look like this: - // - // loggerQueue : executing log msg 1, nil - // loggingQueue : executing log msg 1, log msg 2, nil - // - // So direct access to the formatter is only available if requested from the loggerQueue. - // In all other circumstances we need to go through the loggingQueue to get the proper value. - - dispatch_block_t block = ^{ - if (formatter != logFormatter) - { - [formatter release]; - formatter = [logFormatter retain]; - } - }; - - if (dispatch_get_current_queue() == loggerQueue) - block(); - else - dispatch_async([DDLog loggingQueue], block); - - #endif - } - else - { - #if GCD_MAYBE_UNAVAILABLE - - NSThread *loggingThread = [DDLog loggingThread]; - - if ([NSThread currentThread] == loggingThread) - { - [self lt_setLogFormatter:logFormatter]; - } - else - { - [self performSelector:@selector(lt_setLogFormatter:) - onThread:loggingThread - withObject:logFormatter - waitUntilDone:NO]; - } - - #endif - } -} - -#if GCD_MAYBE_AVAILABLE - -- (dispatch_queue_t)loggerQueue -{ - return loggerQueue; -} - -- (NSString *)loggerName -{ - return NSStringFromClass([self class]); -} - -#endif - -@end diff --git a/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/DDTTYLogger.h b/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/DDTTYLogger.h deleted file mode 100644 index c964fe9f681b4..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/DDTTYLogger.h +++ /dev/null @@ -1,49 +0,0 @@ -#import - -#import "DDLog.h" - -/** - * Welcome to Cocoa Lumberjack! - * - * The Google Code page has a wealth of documentation if you have any questions. - * http://code.google.com/p/cocoalumberjack/ - * - * If you're new to the project you may wish to read the "Getting Started" page. - * http://code.google.com/p/cocoalumberjack/wiki/GettingStarted - * - * - * This class provides a logger for Terminal output or Xcode console output, - * depending on where you are running your code. - * - * As described in the "Getting Started" page, - * the traditional NSLog() function directs it's output to two places: - * - * - Apple System Log (so it shows up in Console.app) - * - StdErr (if stderr is a TTY, so log statements show up in Xcode console) - * - * To duplicate NSLog() functionality you can simply add this logger and an asl logger. - * However, if you instead choose to use file logging (for faster performance), - * you may choose to use only a file logger and a tty logger. -**/ - -@interface DDTTYLogger : DDAbstractLogger -{ - BOOL isaTTY; - - NSDateFormatter *dateFormatter; - - char *app; // Not null terminated - char *pid; // Not null terminated - - size_t appLen; - size_t pidLen; -} - -+ (DDTTYLogger *)sharedInstance; - -// Inherited from DDAbstractLogger - -// - (id )logFormatter; -// - (void)setLogFormatter:(id )formatter; - -@end diff --git a/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/DDTTYLogger.m b/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/DDTTYLogger.m deleted file mode 100644 index 76b8742649332..0000000000000 --- a/third_party/objc/CocoaHTTPServer/Vendor/CocoaLumberjack/DDTTYLogger.m +++ /dev/null @@ -1,173 +0,0 @@ -#import "DDTTYLogger.h" - -#import -#import - - -@implementation DDTTYLogger - -static DDTTYLogger *sharedInstance; - -/** - * The runtime sends initialize to each class in a program exactly one time just before the class, - * or any class that inherits from it, is sent its first message from within the program. (Thus the - * method may never be invoked if the class is not used.) The runtime sends the initialize message to - * classes in a thread-safe manner. Superclasses receive this message before their subclasses. - * - * This method may also be called directly (assumably by accident), hence the safety mechanism. -**/ -+ (void)initialize -{ - static BOOL initialized = NO; - if (!initialized) - { - initialized = YES; - - sharedInstance = [[DDTTYLogger alloc] init]; - } -} - -+ (DDTTYLogger *)sharedInstance -{ - return sharedInstance; -} - -- (id)init -{ - if (sharedInstance != nil) - { - [self release]; - return nil; - } - - if ((self = [super init])) - { - isaTTY = isatty(STDERR_FILENO); - - if (isaTTY) - { - dateFormatter = [[NSDateFormatter alloc] init]; - [dateFormatter setFormatterBehavior:NSDateFormatterBehavior10_4]; - [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss:SSS"]; - - // Initialze 'app' variable (char *) - - NSString *appNStr = [[NSProcessInfo processInfo] processName]; - const char *appCStr = [appNStr UTF8String]; - - appLen = strlen(appCStr); - - app = (char *)malloc(appLen); - strncpy(app, appCStr, appLen); // Not null terminated - - // Initialize 'pid' variable (char *) - - NSString *pidNStr = [NSString stringWithFormat:@"%i", (int)getpid()]; - const char *pidCStr = [pidNStr UTF8String]; - - pidLen = strlen(pidCStr); - - pid = (char *)malloc(pidLen); - strncpy(pid, pidCStr, pidLen); // Not null terminated - } - } - return self; -} - -- (void)logMessage:(DDLogMessage *)logMessage -{ - if (!isaTTY) return; - - NSString *logMsg = logMessage->logMsg; - BOOL isFormatted = NO; - - if (formatter) - { - logMsg = [formatter formatLogMessage:logMessage]; - isFormatted = logMsg != logMessage->logMsg; - } - - if (logMsg) - { - const char *msg = [logMsg UTF8String]; - size_t msgLen = strlen(msg); - - if (isFormatted) - { - struct iovec v[2]; - - v[0].iov_base = (char *)msg; - v[0].iov_len = msgLen; - - v[1].iov_base = "\n"; - v[1].iov_len = (msg[msgLen] == '\n') ? 0 : 1; - - writev(STDERR_FILENO, v, 2); - } - else - { - // The following is a highly optimized verion of file output to std err. - - // ts = timestamp - - NSString *tsNStr = [dateFormatter stringFromDate:(logMessage->timestamp)]; - - const char *tsCStr = [tsNStr UTF8String]; - size_t tsLen = strlen(tsCStr); - - // tid = thread id - // - // How many characters do we need for the thread id? - // logMessage->machThreadID is of type mach_port_t, which is an unsigned int. - // - // 1 hex char = 4 bits - // 8 hex chars for 32 bit, plus ending '\0' = 9 - - char tidCStr[9]; - int tidLen = snprintf(tidCStr, 9, "%x", logMessage->machThreadID); - - // Here is our format: "%s %s[%i:%s] %s", timestamp, appName, processID, threadID, logMsg - - struct iovec v[10]; - - v[0].iov_base = (char *)tsCStr; - v[0].iov_len = tsLen; - - v[1].iov_base = " "; - v[1].iov_len = 1; - - v[2].iov_base = app; - v[2].iov_len = appLen; - - v[3].iov_base = "["; - v[3].iov_len = 1; - - v[4].iov_base = pid; - v[4].iov_len = pidLen; - - v[5].iov_base = ":"; - v[5].iov_len = 1; - - v[6].iov_base = tidCStr; - v[6].iov_len = MIN((size_t)8, tidLen); // snprintf doesn't return what you might think - - v[7].iov_base = "] "; - v[7].iov_len = 2; - - v[8].iov_base = (char *)msg; - v[8].iov_len = msgLen; - - v[9].iov_base = "\n"; - v[9].iov_len = (msg[msgLen] == '\n') ? 0 : 1; - - writev(STDERR_FILENO, v, 10); - } - } -} - -- (NSString *)loggerName -{ - return @"cocoa.lumberjack.ttyLogger"; -} - -@end diff --git a/third_party/objc/iphonesim/README b/third_party/objc/iphonesim/README deleted file mode 100644 index c83055daa8509..0000000000000 --- a/third_party/objc/iphonesim/README +++ /dev/null @@ -1 +0,0 @@ -This file is the i386 Release compile of https://github.com/phonegap/ios-sim taken at 852cd1feb4b8c569f714714d0249ee56aca18516 diff --git a/third_party/objc/iphonesim/build.desc b/third_party/objc/iphonesim/build.desc deleted file mode 100644 index a71ed2d391b81..0000000000000 --- a/third_party/objc/iphonesim/build.desc +++ /dev/null @@ -1,5 +0,0 @@ - -rake_file(name = "iphonesim-binary", - src = [ - "ios-sim", - ]) diff --git a/third_party/objc/iphonesim/ios-sim b/third_party/objc/iphonesim/ios-sim deleted file mode 100755 index 7c1a32642b657..0000000000000 Binary files a/third_party/objc/iphonesim/ios-sim and /dev/null differ diff --git a/third_party/objc/json-framework/.gitattributes b/third_party/objc/json-framework/.gitattributes deleted file mode 100644 index af4951e7cefb5..0000000000000 --- a/third_party/objc/json-framework/.gitattributes +++ /dev/null @@ -1,5 +0,0 @@ -# Set default behaviour, in case users don't have core.autocrlf set. -* text=auto - -# Ignore whitespace in these files -Tests/Stream/* binary diff --git a/third_party/objc/json-framework/.gitignore b/third_party/objc/json-framework/.gitignore deleted file mode 100644 index 1b61dfe1b6806..0000000000000 --- a/third_party/objc/json-framework/.gitignore +++ /dev/null @@ -1,19 +0,0 @@ -# Xcode -build/ -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -*.xcworkspace -!default.xcworkspace -xcuserdata/ -profile -*.moved-aside -DerivedData -.idea/ -.DS_Store -.svn/ diff --git a/third_party/objc/json-framework/Classes/NSObject+SBJson.h b/third_party/objc/json-framework/Classes/NSObject+SBJson.h deleted file mode 100644 index c9eeaa5efb8d2..0000000000000 --- a/third_party/objc/json-framework/Classes/NSObject+SBJson.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - Copyright (C) 2009 Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of the author nor the names of its contributors may be used - to endorse or promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import - -#pragma mark JSON Writing - -/// Adds JSON generation to NSObject -@interface NSObject (NSObject_SBJsonWriting) - -/** - @brief Encodes the receiver into a JSON string - - Although defined as a category on NSObject it is only defined for NSArray and NSDictionary. - - @return the receiver encoded in JSON, or nil on error. - - @see @ref objc2json - */ -- (NSString *)JSONRepresentation; - -@end - - -#pragma mark JSON Parsing - -/// Adds JSON parsing methods to NSString -@interface NSString (NSString_SBJsonParsing) - -/** - @brief Decodes the receiver's JSON text - - @return the NSDictionary or NSArray represented by the receiver, or nil on error. - - @see @ref json2objc - */ -- (id)JSONValue; - -@end - -/// Adds JSON parsing methods to NSData -@interface NSData (NSData_SBJsonParsing) - -/** - @brief Decodes the receiver's JSON data - - @return the NSDictionary or NSArray represented by the receiver, or nil on error. - - @see @ref json2objc - */ -- (id)JSONValue; - -@end diff --git a/third_party/objc/json-framework/Classes/NSObject+SBJson.m b/third_party/objc/json-framework/Classes/NSObject+SBJson.m deleted file mode 100644 index 62b0987354bcb..0000000000000 --- a/third_party/objc/json-framework/Classes/NSObject+SBJson.m +++ /dev/null @@ -1,72 +0,0 @@ -/* - Copyright (C) 2009 Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of the author nor the names of its contributors may be used - to endorse or promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import "NSObject+SBJson.h" -#import "SBJsonWriter.h" -#import "SBJsonParser.h" - -@implementation NSObject (NSObject_SBJsonWriting) - -- (NSString *)JSONRepresentation { - SBJsonWriter *writer = [[SBJsonWriter alloc] init]; - NSString *json = [writer stringWithObject:self]; - if (!json) - NSLog(@"-JSONRepresentation failed. Error is: %@", writer.error); - return json; -} - -@end - - - -@implementation NSString (NSString_SBJsonParsing) - -- (id)JSONValue { - SBJsonParser *parser = [[SBJsonParser alloc] init]; - id repr = [parser objectWithString:self]; - if (!repr) - NSLog(@"-JSONValue failed. Error is: %@", parser.error); - return repr; -} - -@end - - - -@implementation NSData (NSData_SBJsonParsing) - -- (id)JSONValue { - SBJsonParser *parser = [[SBJsonParser alloc] init]; - id repr = [parser objectWithData:self]; - if (!repr) - NSLog(@"-JSONValue failed. Error is: %@", parser.error); - return repr; -} - -@end diff --git a/third_party/objc/json-framework/Classes/SBJson.h b/third_party/objc/json-framework/Classes/SBJson.h deleted file mode 100644 index b25da4a3281bb..0000000000000 --- a/third_party/objc/json-framework/Classes/SBJson.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - Copyright (C) 2009-2011 Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of the author nor the names of its contributors may be used - to endorse or promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/** - @page json2objc JSON to Objective-C - - JSON is mapped to Objective-C types in the following way: - - @li null -> NSNull - @li string -> NSString - @li array -> NSMutableArray - @li object -> NSMutableDictionary - @li true -> NSNumber's -numberWithBool:YES - @li false -> NSNumber's -numberWithBool:NO - @li integer up to 19 digits -> NSNumber's -numberWithLongLong: - @li all other numbers -> NSDecimalNumber - - Since Objective-C doesn't have a dedicated class for boolean values, - these turns into NSNumber instances. However, since these are - initialised with the -initWithBool: method they round-trip back to JSON - properly. In other words, they won't silently suddenly become 0 or 1; - they'll be represented as 'true' and 'false' again. - - As an optimisation integers up to 19 digits in length (the max length - for signed long long integers) turn into NSNumber instances, while - complex ones turn into NSDecimalNumber instances. We can thus avoid any - loss of precision as JSON allows ridiculously large numbers. - - @page objc2json Objective-C to JSON - - Objective-C types are mapped to JSON types in the following way: - - @li NSNull -> null - @li NSString -> string - @li NSArray -> array - @li NSDictionary -> object - @li NSNumber's -initWithBool:YES -> true - @li NSNumber's -initWithBool:NO -> false - @li NSNumber -> number - - @note In JSON the keys of an object must be strings. NSDictionary - keys need not be, but attempting to convert an NSDictionary with - non-string keys into JSON will throw an exception. - - NSNumber instances created with the -numberWithBool: method are - converted into the JSON boolean "true" and "false" values, and vice - versa. Any other NSNumber instances are converted to a JSON number the - way you would expect. - - */ - -#import "SBJsonParser.h" -#import "SBJsonWriter.h" -#import "SBJsonStreamParser.h" -#import "SBJsonStreamParserAdapter.h" -#import "SBJsonStreamWriter.h" -#import "NSObject+SBJson.h" - diff --git a/third_party/objc/json-framework/Classes/SBJsonParser.h b/third_party/objc/json-framework/Classes/SBJsonParser.h deleted file mode 100644 index 751122fb69c5a..0000000000000 --- a/third_party/objc/json-framework/Classes/SBJsonParser.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - Copyright (C) 2009 Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of the author nor the names of its contributors may be used - to endorse or promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import - -/** - @brief Parse JSON Strings and NSData objects - - This uses SBJsonStreamParser internally. - - @see @ref objc2json - - */ - -@interface SBJsonParser : NSObject - -/** - @brief The maximum recursing depth. - - Defaults to 32. If the input is nested deeper than this the input will be deemed to be - malicious and the parser returns nil, signalling an error. ("Nested too deep".) You can - turn off this security feature by setting the maxDepth value to 0. - */ -@property NSUInteger maxDepth; - -/** - @brief Description of parse error - - This method returns the trace of the last method that failed. - You need to check the return value of the call you're making to figure out - if the call actually failed, before you know call this method. - - @return A string describing the error encountered, or nil if no error occured. - - */ -@property(copy) NSString *error; - -/** - @brief Return the object represented by the given NSData object. - - The data *must* be UTF8 encoded. - - @param data An NSData containing UTF8 encoded data to parse. - @return The NSArray or NSDictionary represented by the object, or nil if an error occured. - - */ -- (id)objectWithData:(NSData*)data; - -/** - @brief Return the object represented by the given string - - This method converts its input to an NSData object containing UTF8 and calls -objectWithData: with it. - - @return The NSArray or NSDictionary represented by the object, or nil if an error occured. - */ -- (id)objectWithString:(NSString *)repr; - -/** - @brief Return the object represented by the given string - - This method calls objectWithString: internally. If an error occurs, and if @p error - is not nil, it creates an NSError object and returns this through its second argument. - - @param jsonText the json string to parse - @param error pointer to an NSError object to populate on error - - @return The NSArray or NSDictionary represented by the object, or nil if an error occured. - */ - -- (id)objectWithString:(NSString*)jsonText - error:(NSError**)error; - -@end - - diff --git a/third_party/objc/json-framework/Classes/SBJsonParser.m b/third_party/objc/json-framework/Classes/SBJsonParser.m deleted file mode 100644 index d1b4b1efee6dc..0000000000000 --- a/third_party/objc/json-framework/Classes/SBJsonParser.m +++ /dev/null @@ -1,100 +0,0 @@ -/* - Copyright (C) 2009,2010 Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of the author nor the names of its contributors may be used - to endorse or promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import "SBJsonParser.h" -#import "SBJsonStreamParser.h" -#import "SBJsonStreamParserAdapter.h" -#import "SBJsonStreamParserAccumulator.h" - -@implementation SBJsonParser - -@synthesize maxDepth; -@synthesize error; - -- (id)init { - self = [super init]; - if (self) - self.maxDepth = 32u; - return self; -} - - -#pragma mark Methods - -- (id)objectWithData:(NSData *)data { - - if (!data) { - self.error = @"Input was 'nil'"; - return nil; - } - - SBJsonStreamParserAccumulator *accumulator = [[SBJsonStreamParserAccumulator alloc] init]; - - SBJsonStreamParserAdapter *adapter = [[SBJsonStreamParserAdapter alloc] init]; - adapter.delegate = accumulator; - - SBJsonStreamParser *parser = [[SBJsonStreamParser alloc] init]; - parser.maxDepth = self.maxDepth; - parser.delegate = adapter; - - switch ([parser parse:data]) { - case SBJsonStreamParserComplete: - return accumulator.value; - break; - - case SBJsonStreamParserWaitingForData: - self.error = @"Unexpected end of input"; - break; - - case SBJsonStreamParserError: - self.error = parser.error; - break; - } - - return nil; -} - -- (id)objectWithString:(NSString *)repr { - return [self objectWithData:[repr dataUsingEncoding:NSUTF8StringEncoding]]; -} - -- (id)objectWithString:(NSString*)repr error:(NSError**)error_ { - id tmp = [self objectWithString:repr]; - if (tmp) - return tmp; - - if (error_) { - NSDictionary *ui = [NSDictionary dictionaryWithObjectsAndKeys:error, NSLocalizedDescriptionKey, nil]; - *error_ = [NSError errorWithDomain:@"org.brautaset.SBJsonParser.ErrorDomain" code:0 userInfo:ui]; - } - - return nil; -} - -@end diff --git a/third_party/objc/json-framework/Classes/SBJsonStreamParser.h b/third_party/objc/json-framework/Classes/SBJsonStreamParser.h deleted file mode 100644 index 2530eca67ce81..0000000000000 --- a/third_party/objc/json-framework/Classes/SBJsonStreamParser.h +++ /dev/null @@ -1,161 +0,0 @@ -/* - Copyright (c) 2010, Stig Brautaset. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - Neither the name of the the author nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import - -@class SBJsonTokeniser; -@class SBJsonStreamParser; -@class SBJsonStreamParserState; - -typedef enum { - SBJsonStreamParserComplete, - SBJsonStreamParserWaitingForData, - SBJsonStreamParserError, -} SBJsonStreamParserStatus; - - -/** - @brief Delegate for interacting directly with the stream parser - - You will most likely find it much more convenient to implement the - SBJsonStreamParserAdapterDelegate protocol instead. - */ -@protocol SBJsonStreamParserDelegate - -/// Called when object start is found -- (void)parserFoundObjectStart:(SBJsonStreamParser*)parser; - -/// Called when object key is found -- (void)parser:(SBJsonStreamParser*)parser foundObjectKey:(NSString*)key; - -/// Called when object end is found -- (void)parserFoundObjectEnd:(SBJsonStreamParser*)parser; - -/// Called when array start is found -- (void)parserFoundArrayStart:(SBJsonStreamParser*)parser; - -/// Called when array end is found -- (void)parserFoundArrayEnd:(SBJsonStreamParser*)parser; - -/// Called when a boolean value is found -- (void)parser:(SBJsonStreamParser*)parser foundBoolean:(BOOL)x; - -/// Called when a null value is found -- (void)parserFoundNull:(SBJsonStreamParser*)parser; - -/// Called when a number is found -- (void)parser:(SBJsonStreamParser*)parser foundNumber:(NSNumber*)num; - -/// Called when a string is found -- (void)parser:(SBJsonStreamParser*)parser foundString:(NSString*)string; - -@end - - -/** - @brief Parse a stream of JSON data. - - Using this class directly you can reduce the apparent latency for each - download/parse cycle of documents over a slow connection. You can start - parsing *and return chunks of the parsed document* before the entire - document is downloaded. - - Using this class is also useful to parse huge documents on disk - bit by bit so you don't have to keep them all in memory. - - @see SBJsonStreamParserAdapter for more information. - - @see @ref objc2json - - */ -@interface SBJsonStreamParser : NSObject { -@private - SBJsonTokeniser *tokeniser; -} - -@property (nonatomic, unsafe_unretained) SBJsonStreamParserState *state; // Private -@property (nonatomic, readonly, strong) NSMutableArray *stateStack; // Private - -/** - @brief Expect multiple documents separated by whitespace - - Normally the @p -parse: method returns SBJsonStreamParserComplete when it's found a complete JSON document. - Attempting to parse any more data at that point is considered an error. ("Garbage after JSON".) - - If you set this property to true the parser will never return SBJsonStreamParserComplete. Rather, - once an object is completed it will expect another object to immediately follow, separated - only by (optional) whitespace. - - @see The TweetStream app in the Examples - */ -@property BOOL supportMultipleDocuments; - -/** - @brief Delegate to receive messages - - The object set here receives a series of messages as the parser breaks down the JSON stream - into valid tokens. - - @note - Usually this should be an instance of SBJsonStreamParserAdapter, but you can - substitute your own implementation of the SBJsonStreamParserDelegate protocol if you need to. - */ -@property (unsafe_unretained) id delegate; - -/** - @brief The max parse depth - - If the input is nested deeper than this the parser will halt parsing and return an error. - - Defaults to 32. - */ -@property NSUInteger maxDepth; - -/// Holds the error after SBJsonStreamParserError was returned -@property (copy) NSString *error; - -/** - @brief Parse some JSON - - The JSON is assumed to be UTF8 encoded. This can be a full JSON document, or a part of one. - - @param data An NSData object containing the next chunk of JSON - - @return - @li SBJsonStreamParserComplete if a full document was found - @li SBJsonStreamParserWaitingForData if a partial document was found and more data is required to complete it - @li SBJsonStreamParserError if an error occured. (See the error property for details in this case.) - - */ -- (SBJsonStreamParserStatus)parse:(NSData*)data; - -@end diff --git a/third_party/objc/json-framework/Classes/SBJsonStreamParser.m b/third_party/objc/json-framework/Classes/SBJsonStreamParser.m deleted file mode 100644 index cfc9629bb157c..0000000000000 --- a/third_party/objc/json-framework/Classes/SBJsonStreamParser.m +++ /dev/null @@ -1,252 +0,0 @@ -/* - Copyright (c) 2010, Stig Brautaset. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - Neither the name of the the author nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import "SBJsonStreamParser.h" -#import "SBJsonTokeniser.h" -#import "SBJsonStreamParserState.h" -#import - -@implementation SBJsonStreamParser - -@synthesize supportMultipleDocuments; -@synthesize error; -@synthesize delegate; -@synthesize maxDepth; -@synthesize state; -@synthesize stateStack; - -#pragma mark Housekeeping - -- (id)init { - self = [super init]; - if (self) { - maxDepth = 32u; - stateStack = [[NSMutableArray alloc] initWithCapacity:maxDepth]; - state = [SBJsonStreamParserStateStart sharedInstance]; - tokeniser = [[SBJsonTokeniser alloc] init]; - } - return self; -} - - -#pragma mark Methods - -- (NSString*)tokenName:(sbjson_token_t)token { - switch (token) { - case sbjson_token_array_start: - return @"start of array"; - break; - - case sbjson_token_array_end: - return @"end of array"; - break; - - case sbjson_token_number: - return @"number"; - break; - - case sbjson_token_string: - return @"string"; - break; - - case sbjson_token_true: - case sbjson_token_false: - return @"boolean"; - break; - - case sbjson_token_null: - return @"null"; - break; - - case sbjson_token_keyval_separator: - return @"key-value separator"; - break; - - case sbjson_token_separator: - return @"value separator"; - break; - - case sbjson_token_object_start: - return @"start of object"; - break; - - case sbjson_token_object_end: - return @"end of object"; - break; - - case sbjson_token_eof: - case sbjson_token_error: - break; - } - NSAssert(NO, @"Should not get here"); - return @""; -} - -- (void)maxDepthError { - self.error = [NSString stringWithFormat:@"Input depth exceeds max depth of %lu", (unsigned long)maxDepth]; - self.state = [SBJsonStreamParserStateError sharedInstance]; -} - -- (void)handleObjectStart { - if (stateStack.count >= maxDepth) { - [self maxDepthError]; - return; - } - - [delegate parserFoundObjectStart:self]; - [stateStack addObject:state]; - self.state = [SBJsonStreamParserStateObjectStart sharedInstance]; -} - -- (void)handleObjectEnd: (sbjson_token_t) tok { - self.state = [stateStack lastObject]; - [stateStack removeLastObject]; - [state parser:self shouldTransitionTo:tok]; - [delegate parserFoundObjectEnd:self]; -} - -- (void)handleArrayStart { - if (stateStack.count >= maxDepth) { - [self maxDepthError]; - return; - } - - [delegate parserFoundArrayStart:self]; - [stateStack addObject:state]; - self.state = [SBJsonStreamParserStateArrayStart sharedInstance]; -} - -- (void)handleArrayEnd: (sbjson_token_t) tok { - self.state = [stateStack lastObject]; - [stateStack removeLastObject]; - [state parser:self shouldTransitionTo:tok]; - [delegate parserFoundArrayEnd:self]; -} - -- (void) handleTokenNotExpectedHere: (sbjson_token_t) tok { - NSString *tokenName = [self tokenName:tok]; - NSString *stateName = [state name]; - - self.error = [NSString stringWithFormat:@"Token '%@' not expected %@", tokenName, stateName]; - self.state = [SBJsonStreamParserStateError sharedInstance]; -} - -- (SBJsonStreamParserStatus)parse:(NSData *)data_ { - @autoreleasepool { - [tokeniser appendData:data_]; - - for (;;) { - - if ([state isError]) - return SBJsonStreamParserError; - - NSObject *token; - sbjson_token_t tok = [tokeniser getToken:&token]; - switch (tok) { - case sbjson_token_eof: - return [state parserShouldReturn:self]; - break; - - case sbjson_token_error: - self.state = [SBJsonStreamParserStateError sharedInstance]; - self.error = tokeniser.error; - return SBJsonStreamParserError; - break; - - default: - - if (![state parser:self shouldAcceptToken:tok]) { - [self handleTokenNotExpectedHere: tok]; - return SBJsonStreamParserError; - } - - switch (tok) { - case sbjson_token_object_start: - [self handleObjectStart]; - break; - - case sbjson_token_object_end: - [self handleObjectEnd: tok]; - break; - - case sbjson_token_array_start: - [self handleArrayStart]; - break; - - case sbjson_token_array_end: - [self handleArrayEnd: tok]; - break; - - case sbjson_token_separator: - case sbjson_token_keyval_separator: - [state parser:self shouldTransitionTo:tok]; - break; - - case sbjson_token_true: - [delegate parser:self foundBoolean:YES]; - [state parser:self shouldTransitionTo:tok]; - break; - - case sbjson_token_false: - [delegate parser:self foundBoolean:NO]; - [state parser:self shouldTransitionTo:tok]; - break; - - case sbjson_token_null: - [delegate parserFoundNull:self]; - [state parser:self shouldTransitionTo:tok]; - break; - - case sbjson_token_number: - [delegate parser:self foundNumber:(NSNumber*)token]; - [state parser:self shouldTransitionTo:tok]; - break; - - case sbjson_token_string: - if ([state needKey]) - [delegate parser:self foundObjectKey:(NSString*)token]; - else - [delegate parser:self foundString:(NSString*)token]; - [state parser:self shouldTransitionTo:tok]; - break; - - default: - break; - } - break; - } - } - return SBJsonStreamParserComplete; - } -} - -@end diff --git a/third_party/objc/json-framework/Classes/SBJsonStreamParserAccumulator.h b/third_party/objc/json-framework/Classes/SBJsonStreamParserAccumulator.h deleted file mode 100644 index 141d6eedc0a80..0000000000000 --- a/third_party/objc/json-framework/Classes/SBJsonStreamParserAccumulator.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - Copyright (C) 2011 Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of the author nor the names of its contributors may be used - to endorse or promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import -#import "SBJsonStreamParserAdapter.h" - -@interface SBJsonStreamParserAccumulator : NSObject - -@property (copy) id value; - -@end diff --git a/third_party/objc/json-framework/Classes/SBJsonStreamParserAccumulator.m b/third_party/objc/json-framework/Classes/SBJsonStreamParserAccumulator.m deleted file mode 100644 index 1d39cebd12162..0000000000000 --- a/third_party/objc/json-framework/Classes/SBJsonStreamParserAccumulator.m +++ /dev/null @@ -1,47 +0,0 @@ -/* - Copyright (C) 2011 Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of the author nor the names of its contributors may be used - to endorse or promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import "SBJsonStreamParserAccumulator.h" - -@implementation SBJsonStreamParserAccumulator - -@synthesize value; - - -#pragma mark SBJsonStreamParserAdapterDelegate - -- (void)parser:(SBJsonStreamParser*)parser foundArray:(NSArray *)array { - value = array; -} - -- (void)parser:(SBJsonStreamParser*)parser foundObject:(NSDictionary *)dict { - value = dict; -} - -@end diff --git a/third_party/objc/json-framework/Classes/SBJsonStreamParserAdapter.h b/third_party/objc/json-framework/Classes/SBJsonStreamParserAdapter.h deleted file mode 100644 index 942bc01868003..0000000000000 --- a/third_party/objc/json-framework/Classes/SBJsonStreamParserAdapter.h +++ /dev/null @@ -1,148 +0,0 @@ -/* - Copyright (c) 2010, Stig Brautaset. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - Neither the name of the the author nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import -#import "SBJsonStreamParser.h" - -typedef enum { - SBJsonStreamParserAdapterNone, - SBJsonStreamParserAdapterArray, - SBJsonStreamParserAdapterObject, -} SBJsonStreamParserAdapterType; - -/** - @brief Delegate for getting objects & arrays from the stream parser adapter - - @see The TweetStream example project. - */ -@protocol SBJsonStreamParserAdapterDelegate - -/** - @brief Called if a JSON array is found - - This method is called if a JSON array is found. - - */ -- (void)parser:(SBJsonStreamParser*)parser foundArray:(NSArray*)array; - -/** - @brief Called when a JSON object is found - - This method is called if a JSON object is found. - */ -- (void)parser:(SBJsonStreamParser*)parser foundObject:(NSDictionary*)dict; - -@end - -/** - @brief SBJsonStreamParserDelegate protocol adapter - - Rather than implementing the SBJsonStreamParserDelegate protocol yourself you will - most likely find it much more convenient to use an instance of this class and - implement the SBJsonStreamParserAdapterDelegate protocol instead. - - The default behaviour is that the delegate only receives one call from - either the -parser:foundArray: or -parser:foundObject: method when the - document is fully parsed. However, if your inputs contains multiple JSON - documents and you set the parser's -supportMultipleDocuments property to YES - you will get one call for each full method. - - @code - SBJsonStreamParserAdapter *adapter = [[[SBJsonStreamParserAdapter alloc] init] autorelease]; - adapter.delegate = self; - - SBJsonStreamParser *parser = [[[SBJsonStreamParser alloc] init] autorelease]; - parser.delegate = adapter; - parser.supportMultipleDocuments = YES; - - // Note that this input contains multiple top-level JSON documents - NSData *json = [@"[]{}[]{}" dataWithEncoding:NSUTF8StringEncoding]; - [parser parse:data]; - @endcode - - In the above example @p self will have the following sequence of methods called on it: - - @li -parser:foundArray: - @li -parser:foundObject: - @li -parser:foundArray: - @li -parser:foundObject: - - Often you won't have control over the input you're parsing, so can't make use of - this feature. But, all is not lost: this class will let you get the same effect by - allowing you to skip one or more of the outer enclosing objects. Thus, the next - example results in the same sequence of -parser:foundArray: / -parser:foundObject: - being called on your delegate. - - @code - SBJsonStreamParserAdapter *adapter = [[[SBJsonStreamParserAdapter alloc] init] autorelease]; - adapter.delegate = self; - adapter.levelsToSkip = 1; - - SBJsonStreamParser *parser = [[[SBJsonStreamParser alloc] init] autorelease]; - parser.delegate = adapter; - - // Note that this input contains A SINGLE top-level document - NSData *json = [@"[[],{},[],{}]" dataWithEncoding:NSUTF8StringEncoding]; - [parser parse:data]; - @endcode - -*/ -@interface SBJsonStreamParserAdapter : NSObject { -@private - NSUInteger depth; - NSMutableArray *array; - NSMutableDictionary *dict; - NSMutableArray *keyStack; - NSMutableArray *stack; - - SBJsonStreamParserAdapterType currentType; -} - -/** - @brief How many levels to skip - - This is useful for parsing huge JSON documents, or documents coming in over a very slow link. - - If you set this to N it will skip the outer N levels and call the -parser:foundArray: - or -parser:foundObject: methods for each of the inner objects, as appropriate. - - @see The StreamParserIntegrationTest.m file for examples -*/ -@property NSUInteger levelsToSkip; - -/** - @brief Your delegate object - Set this to the object you want to receive the SBJsonStreamParserAdapterDelegate messages. - */ -@property (unsafe_unretained) id delegate; - -@end diff --git a/third_party/objc/json-framework/Classes/SBJsonStreamParserAdapter.m b/third_party/objc/json-framework/Classes/SBJsonStreamParserAdapter.m deleted file mode 100644 index e77b534d7cf18..0000000000000 --- a/third_party/objc/json-framework/Classes/SBJsonStreamParserAdapter.m +++ /dev/null @@ -1,164 +0,0 @@ -/* - Copyright (c) 2010, Stig Brautaset. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - Neither the name of the the author nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import "SBJsonStreamParserAdapter.h" - -@interface SBJsonStreamParserAdapter () - -- (void)pop; -- (void)parser:(SBJsonStreamParser*)parser found:(id)obj; - -@end - - - -@implementation SBJsonStreamParserAdapter - -@synthesize delegate; -@synthesize levelsToSkip; - -#pragma mark Housekeeping - -- (id)init { - self = [super init]; - if (self) { - keyStack = [[NSMutableArray alloc] initWithCapacity:32]; - stack = [[NSMutableArray alloc] initWithCapacity:32]; - - currentType = SBJsonStreamParserAdapterNone; - } - return self; -} - - -#pragma mark Private methods - -- (void)pop { - [stack removeLastObject]; - array = nil; - dict = nil; - currentType = SBJsonStreamParserAdapterNone; - - id value = [stack lastObject]; - - if ([value isKindOfClass:[NSArray class]]) { - array = value; - currentType = SBJsonStreamParserAdapterArray; - } else if ([value isKindOfClass:[NSDictionary class]]) { - dict = value; - currentType = SBJsonStreamParserAdapterObject; - } -} - -- (void)parser:(SBJsonStreamParser*)parser found:(id)obj { - NSParameterAssert(obj); - - switch (currentType) { - case SBJsonStreamParserAdapterArray: - [array addObject:obj]; - break; - - case SBJsonStreamParserAdapterObject: - NSParameterAssert(keyStack.count); - [dict setObject:obj forKey:[keyStack lastObject]]; - [keyStack removeLastObject]; - break; - - case SBJsonStreamParserAdapterNone: - if ([obj isKindOfClass:[NSArray class]]) { - [delegate parser:parser foundArray:obj]; - } else { - [delegate parser:parser foundObject:obj]; - } - break; - - default: - break; - } -} - - -#pragma mark Delegate methods - -- (void)parserFoundObjectStart:(SBJsonStreamParser*)parser { - if (++depth > self.levelsToSkip) { - dict = [NSMutableDictionary new]; - [stack addObject:dict]; - currentType = SBJsonStreamParserAdapterObject; - } -} - -- (void)parser:(SBJsonStreamParser*)parser foundObjectKey:(NSString*)key_ { - [keyStack addObject:key_]; -} - -- (void)parserFoundObjectEnd:(SBJsonStreamParser*)parser { - if (depth-- > self.levelsToSkip) { - id value = dict; - [self pop]; - [self parser:parser found:value]; - } -} - -- (void)parserFoundArrayStart:(SBJsonStreamParser*)parser { - if (++depth > self.levelsToSkip) { - array = [NSMutableArray new]; - [stack addObject:array]; - currentType = SBJsonStreamParserAdapterArray; - } -} - -- (void)parserFoundArrayEnd:(SBJsonStreamParser*)parser { - if (depth-- > self.levelsToSkip) { - id value = array; - [self pop]; - [self parser:parser found:value]; - } -} - -- (void)parser:(SBJsonStreamParser*)parser foundBoolean:(BOOL)x { - [self parser:parser found:[NSNumber numberWithBool:x]]; -} - -- (void)parserFoundNull:(SBJsonStreamParser*)parser { - [self parser:parser found:[NSNull null]]; -} - -- (void)parser:(SBJsonStreamParser*)parser foundNumber:(NSNumber*)num { - [self parser:parser found:num]; -} - -- (void)parser:(SBJsonStreamParser*)parser foundString:(NSString*)string { - [self parser:parser found:string]; -} - -@end diff --git a/third_party/objc/json-framework/Classes/SBJsonStreamParserState.h b/third_party/objc/json-framework/Classes/SBJsonStreamParserState.h deleted file mode 100644 index ea893cb3b555d..0000000000000 --- a/third_party/objc/json-framework/Classes/SBJsonStreamParserState.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - Copyright (c) 2010, Stig Brautaset. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - Neither the name of the the author nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import - -#import "SBJsonTokeniser.h" -#import "SBJsonStreamParser.h" - -@interface SBJsonStreamParserState : NSObject -+ (id)sharedInstance; - -- (BOOL)parser:(SBJsonStreamParser*)parser shouldAcceptToken:(sbjson_token_t)token; -- (SBJsonStreamParserStatus)parserShouldReturn:(SBJsonStreamParser*)parser; -- (void)parser:(SBJsonStreamParser*)parser shouldTransitionTo:(sbjson_token_t)tok; -- (BOOL)needKey; -- (BOOL)isError; - -- (NSString*)name; - -@end - -@interface SBJsonStreamParserStateStart : SBJsonStreamParserState -@end - -@interface SBJsonStreamParserStateComplete : SBJsonStreamParserState -@end - -@interface SBJsonStreamParserStateError : SBJsonStreamParserState -@end - - -@interface SBJsonStreamParserStateObjectStart : SBJsonStreamParserState -@end - -@interface SBJsonStreamParserStateObjectGotKey : SBJsonStreamParserState -@end - -@interface SBJsonStreamParserStateObjectSeparator : SBJsonStreamParserState -@end - -@interface SBJsonStreamParserStateObjectGotValue : SBJsonStreamParserState -@end - -@interface SBJsonStreamParserStateObjectNeedKey : SBJsonStreamParserState -@end - -@interface SBJsonStreamParserStateArrayStart : SBJsonStreamParserState -@end - -@interface SBJsonStreamParserStateArrayGotValue : SBJsonStreamParserState -@end - -@interface SBJsonStreamParserStateArrayNeedValue : SBJsonStreamParserState -@end diff --git a/third_party/objc/json-framework/Classes/SBJsonStreamParserState.m b/third_party/objc/json-framework/Classes/SBJsonStreamParserState.m deleted file mode 100644 index 42981ad9aad47..0000000000000 --- a/third_party/objc/json-framework/Classes/SBJsonStreamParserState.m +++ /dev/null @@ -1,359 +0,0 @@ -/* - Copyright (c) 2010, Stig Brautaset. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - Neither the name of the the author nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import "SBJsonStreamParserState.h" -#import "SBJsonStreamParser.h" - -#define SINGLETON \ -+ (id)sharedInstance { \ - static id state = nil; \ - if (!state) { \ - @synchronized(self) { \ - if (!state) state = [[self alloc] init]; \ - } \ - } \ - return state; \ -} - -@implementation SBJsonStreamParserState - -+ (id)sharedInstance { return nil; } - -- (BOOL)parser:(SBJsonStreamParser*)parser shouldAcceptToken:(sbjson_token_t)token { - return NO; -} - -- (SBJsonStreamParserStatus)parserShouldReturn:(SBJsonStreamParser*)parser { - return SBJsonStreamParserWaitingForData; -} - -- (void)parser:(SBJsonStreamParser*)parser shouldTransitionTo:(sbjson_token_t)tok {} - -- (BOOL)needKey { - return NO; -} - -- (NSString*)name { - return @""; -} - -- (BOOL)isError { - return NO; -} - -@end - -#pragma mark - - -@implementation SBJsonStreamParserStateStart - -SINGLETON - -- (BOOL)parser:(SBJsonStreamParser*)parser shouldAcceptToken:(sbjson_token_t)token { - return token == sbjson_token_array_start || token == sbjson_token_object_start; -} - -- (void)parser:(SBJsonStreamParser*)parser shouldTransitionTo:(sbjson_token_t)tok { - - SBJsonStreamParserState *state = nil; - switch (tok) { - case sbjson_token_array_start: - state = [SBJsonStreamParserStateArrayStart sharedInstance]; - break; - - case sbjson_token_object_start: - state = [SBJsonStreamParserStateObjectStart sharedInstance]; - break; - - case sbjson_token_array_end: - case sbjson_token_object_end: - if (parser.supportMultipleDocuments) - state = parser.state; - else - state = [SBJsonStreamParserStateComplete sharedInstance]; - break; - - case sbjson_token_eof: - return; - - default: - state = [SBJsonStreamParserStateError sharedInstance]; - break; - } - - - parser.state = state; -} - -- (NSString*)name { return @"before outer-most array or object"; } - -@end - -#pragma mark - - -@implementation SBJsonStreamParserStateComplete - -SINGLETON - -- (NSString*)name { return @"after outer-most array or object"; } - -- (SBJsonStreamParserStatus)parserShouldReturn:(SBJsonStreamParser*)parser { - return SBJsonStreamParserComplete; -} - -@end - -#pragma mark - - -@implementation SBJsonStreamParserStateError - -SINGLETON - -- (NSString*)name { return @"in error"; } - -- (SBJsonStreamParserStatus)parserShouldReturn:(SBJsonStreamParser*)parser { - return SBJsonStreamParserError; -} - -- (BOOL)isError { - return YES; -} - -@end - -#pragma mark - - -@implementation SBJsonStreamParserStateObjectStart - -SINGLETON - -- (NSString*)name { return @"at beginning of object"; } - -- (BOOL)parser:(SBJsonStreamParser*)parser shouldAcceptToken:(sbjson_token_t)token { - switch (token) { - case sbjson_token_object_end: - case sbjson_token_string: - return YES; - break; - default: - return NO; - break; - } -} - -- (void)parser:(SBJsonStreamParser*)parser shouldTransitionTo:(sbjson_token_t)tok { - parser.state = [SBJsonStreamParserStateObjectGotKey sharedInstance]; -} - -- (BOOL)needKey { - return YES; -} - -@end - -#pragma mark - - -@implementation SBJsonStreamParserStateObjectGotKey - -SINGLETON - -- (NSString*)name { return @"after object key"; } - -- (BOOL)parser:(SBJsonStreamParser*)parser shouldAcceptToken:(sbjson_token_t)token { - return token == sbjson_token_keyval_separator; -} - -- (void)parser:(SBJsonStreamParser*)parser shouldTransitionTo:(sbjson_token_t)tok { - parser.state = [SBJsonStreamParserStateObjectSeparator sharedInstance]; -} - -@end - -#pragma mark - - -@implementation SBJsonStreamParserStateObjectSeparator - -SINGLETON - -- (NSString*)name { return @"as object value"; } - -- (BOOL)parser:(SBJsonStreamParser*)parser shouldAcceptToken:(sbjson_token_t)token { - switch (token) { - case sbjson_token_object_start: - case sbjson_token_array_start: - case sbjson_token_true: - case sbjson_token_false: - case sbjson_token_null: - case sbjson_token_number: - case sbjson_token_string: - return YES; - break; - - default: - return NO; - break; - } -} - -- (void)parser:(SBJsonStreamParser*)parser shouldTransitionTo:(sbjson_token_t)tok { - parser.state = [SBJsonStreamParserStateObjectGotValue sharedInstance]; -} - -@end - -#pragma mark - - -@implementation SBJsonStreamParserStateObjectGotValue - -SINGLETON - -- (NSString*)name { return @"after object value"; } - -- (BOOL)parser:(SBJsonStreamParser*)parser shouldAcceptToken:(sbjson_token_t)token { - switch (token) { - case sbjson_token_object_end: - case sbjson_token_separator: - return YES; - break; - default: - return NO; - break; - } -} - -- (void)parser:(SBJsonStreamParser*)parser shouldTransitionTo:(sbjson_token_t)tok { - parser.state = [SBJsonStreamParserStateObjectNeedKey sharedInstance]; -} - - -@end - -#pragma mark - - -@implementation SBJsonStreamParserStateObjectNeedKey - -SINGLETON - -- (NSString*)name { return @"in place of object key"; } - -- (BOOL)parser:(SBJsonStreamParser*)parser shouldAcceptToken:(sbjson_token_t)token { - return sbjson_token_string == token; -} - -- (void)parser:(SBJsonStreamParser*)parser shouldTransitionTo:(sbjson_token_t)tok { - parser.state = [SBJsonStreamParserStateObjectGotKey sharedInstance]; -} - -- (BOOL)needKey { - return YES; -} - -@end - -#pragma mark - - -@implementation SBJsonStreamParserStateArrayStart - -SINGLETON - -- (NSString*)name { return @"at array start"; } - -- (BOOL)parser:(SBJsonStreamParser*)parser shouldAcceptToken:(sbjson_token_t)token { - switch (token) { - case sbjson_token_object_end: - case sbjson_token_keyval_separator: - case sbjson_token_separator: - return NO; - break; - - default: - return YES; - break; - } -} - -- (void)parser:(SBJsonStreamParser*)parser shouldTransitionTo:(sbjson_token_t)tok { - parser.state = [SBJsonStreamParserStateArrayGotValue sharedInstance]; -} - -@end - -#pragma mark - - -@implementation SBJsonStreamParserStateArrayGotValue - -SINGLETON - -- (NSString*)name { return @"after array value"; } - - -- (BOOL)parser:(SBJsonStreamParser*)parser shouldAcceptToken:(sbjson_token_t)token { - return token == sbjson_token_array_end || token == sbjson_token_separator; -} - -- (void)parser:(SBJsonStreamParser*)parser shouldTransitionTo:(sbjson_token_t)tok { - if (tok == sbjson_token_separator) - parser.state = [SBJsonStreamParserStateArrayNeedValue sharedInstance]; -} - -@end - -#pragma mark - - -@implementation SBJsonStreamParserStateArrayNeedValue - -SINGLETON - -- (NSString*)name { return @"as array value"; } - - -- (BOOL)parser:(SBJsonStreamParser*)parser shouldAcceptToken:(sbjson_token_t)token { - switch (token) { - case sbjson_token_array_end: - case sbjson_token_keyval_separator: - case sbjson_token_object_end: - case sbjson_token_separator: - return NO; - break; - - default: - return YES; - break; - } -} - -- (void)parser:(SBJsonStreamParser*)parser shouldTransitionTo:(sbjson_token_t)tok { - parser.state = [SBJsonStreamParserStateArrayGotValue sharedInstance]; -} - -@end - diff --git a/third_party/objc/json-framework/Classes/SBJsonStreamWriter.h b/third_party/objc/json-framework/Classes/SBJsonStreamWriter.h deleted file mode 100644 index a46b7a18bc588..0000000000000 --- a/third_party/objc/json-framework/Classes/SBJsonStreamWriter.h +++ /dev/null @@ -1,195 +0,0 @@ -/* - Copyright (c) 2010, Stig Brautaset. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - Neither the name of the the author nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import - -/// Enable JSON writing for non-native objects -@interface NSObject (SBProxyForJson) - -/** - @brief Allows generation of JSON for otherwise unsupported classes. - - If you have a custom class that you want to create a JSON representation - for you can implement this method in your class. It should return a - representation of your object defined in terms of objects that can be - translated into JSON. For example, a Person object might implement it like this: - - @code - - (id)proxyForJson { - return [NSDictionary dictionaryWithObjectsAndKeys: - name, @"name", - phone, @"phone", - email, @"email", - nil]; - } - @endcode - - */ -- (id)proxyForJson; - -@end - -@class SBJsonStreamWriter; - -@protocol SBJsonStreamWriterDelegate - -- (void)writer:(SBJsonStreamWriter*)writer appendBytes:(const void *)bytes length:(NSUInteger)length; - -@end - -@class SBJsonStreamWriterState; - -/** - @brief The Stream Writer class. - - Accepts a stream of messages and writes JSON of these to its delegate object. - - This class provides a range of high-, mid- and low-level methods. You can mix - and match calls to these. For example, you may want to call -writeArrayOpen - to start an array and then repeatedly call -writeObject: with various objects - before finishing off with a -writeArrayClose call. - - @see @ref json2objc - - */ - -@interface SBJsonStreamWriter : NSObject { - NSMutableDictionary *cache; -} - -@property (nonatomic, unsafe_unretained) SBJsonStreamWriterState *state; // Internal -@property (nonatomic, readonly, strong) NSMutableArray *stateStack; // Internal - -/** - @brief delegate to receive JSON output - Delegate that will receive messages with output. - */ -@property (unsafe_unretained) id delegate; - -/** - @brief The maximum recursing depth. - - Defaults to 512. If the input is nested deeper than this the input will be deemed to be - malicious and the parser returns nil, signalling an error. ("Nested too deep".) You can - turn off this security feature by setting the maxDepth value to 0. - */ -@property NSUInteger maxDepth; - -/** - @brief Whether we are generating human-readable (multiline) JSON. - - Set whether or not to generate human-readable JSON. The default is NO, which produces - JSON without any whitespace between tokens. If set to YES, generates human-readable - JSON with linebreaks after each array value and dictionary key/value pair, indented two - spaces per nesting level. - */ -@property BOOL humanReadable; - -/** - @brief Whether or not to sort the dictionary keys in the output. - - If this is set to YES, the dictionary keys in the JSON output will be in sorted order. - (This is useful if you need to compare two structures, for example.) The default is NO. - */ -@property BOOL sortKeys; - -/** - @brief An optional comparator to be used if sortKeys is YES. - - If this is nil, sorting will be done via @selector(compare:). - */ -@property (copy) NSComparator sortKeysComparator; - -/// Contains the error description after an error has occured. -@property (copy) NSString *error; - -/** - Write an NSDictionary to the JSON stream. - @return YES if successful, or NO on failure - */ -- (BOOL)writeObject:(NSDictionary*)dict; - -/** - Write an NSArray to the JSON stream. - @return YES if successful, or NO on failure - */ -- (BOOL)writeArray:(NSArray *)array; - -/** - Start writing an Object to the stream - @return YES if successful, or NO on failure -*/ -- (BOOL)writeObjectOpen; - -/** - Close the current object being written - @return YES if successful, or NO on failure -*/ -- (BOOL)writeObjectClose; - -/** Start writing an Array to the stream - @return YES if successful, or NO on failure -*/ -- (BOOL)writeArrayOpen; - -/** Close the current Array being written - @return YES if successful, or NO on failure -*/ -- (BOOL)writeArrayClose; - -/** Write a null to the stream - @return YES if successful, or NO on failure -*/ -- (BOOL)writeNull; - -/** Write a boolean to the stream - @return YES if successful, or NO on failure -*/ -- (BOOL)writeBool:(BOOL)x; - -/** Write a Number to the stream - @return YES if successful, or NO on failure -*/ -- (BOOL)writeNumber:(NSNumber*)n; - -/** Write a String to the stream - @return YES if successful, or NO on failure -*/ -- (BOOL)writeString:(NSString*)s; - -@end - -@interface SBJsonStreamWriter (Private) -- (BOOL)writeValue:(id)v; -- (void)appendBytes:(const void *)bytes length:(NSUInteger)length; -@end - diff --git a/third_party/objc/json-framework/Classes/SBJsonStreamWriter.m b/third_party/objc/json-framework/Classes/SBJsonStreamWriter.m deleted file mode 100644 index 38a06b448fb01..0000000000000 --- a/third_party/objc/json-framework/Classes/SBJsonStreamWriter.m +++ /dev/null @@ -1,370 +0,0 @@ -/* - Copyright (c) 2010, Stig Brautaset. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - Neither the name of the the author nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import "SBJsonStreamWriter.h" -#import "SBJsonStreamWriterState.h" - -static NSNumber *kNotANumber; -static NSNumber *kTrue; -static NSNumber *kFalse; -static NSNumber *kPositiveInfinity; -static NSNumber *kNegativeInfinity; - - -@implementation SBJsonStreamWriter - -@synthesize error; -@synthesize maxDepth; -@synthesize state; -@synthesize stateStack; -@synthesize humanReadable; -@synthesize sortKeys; -@synthesize sortKeysComparator; - -+ (void)initialize { - kNotANumber = [NSDecimalNumber notANumber]; - kPositiveInfinity = [NSNumber numberWithDouble:+INFINITY]; - kNegativeInfinity = [NSNumber numberWithDouble:-INFINITY]; - kTrue = [NSNumber numberWithBool:YES]; - kFalse = [NSNumber numberWithBool:NO]; -} - -#pragma mark Housekeeping - -@synthesize delegate; - -- (id)init { - self = [super init]; - if (self) { - maxDepth = 32u; - stateStack = [[NSMutableArray alloc] initWithCapacity:maxDepth]; - state = [SBJsonStreamWriterStateStart sharedInstance]; - cache = [[NSMutableDictionary alloc] initWithCapacity:32]; - } - return self; -} - -#pragma mark Methods - -- (void)appendBytes:(const void *)bytes length:(NSUInteger)length { - [delegate writer:self appendBytes:bytes length:length]; -} - -- (BOOL)writeObject:(NSDictionary *)dict { - if (![self writeObjectOpen]) - return NO; - - NSArray *keys = [dict allKeys]; - - if (sortKeys) { - if (sortKeysComparator) { - keys = [keys sortedArrayWithOptions:NSSortStable usingComparator:sortKeysComparator]; - } - else{ - keys = [keys sortedArrayUsingSelector:@selector(compare:)]; - } - } - - for (id k in keys) { - if (![k isKindOfClass:[NSString class]]) { - self.error = [NSString stringWithFormat:@"JSON object key must be string: %@", k]; - return NO; - } - - if (![self writeString:k]) - return NO; - if (![self writeValue:[dict objectForKey:k]]) - return NO; - } - - return [self writeObjectClose]; -} - -- (BOOL)writeArray:(NSArray*)array { - if (![self writeArrayOpen]) - return NO; - for (id v in array) - if (![self writeValue:v]) - return NO; - return [self writeArrayClose]; -} - - -- (BOOL)writeObjectOpen { - if ([state isInvalidState:self]) return NO; - if ([state expectingKey:self]) return NO; - [state appendSeparator:self]; - if (humanReadable && stateStack.count) [state appendWhitespace:self]; - - [stateStack addObject:state]; - self.state = [SBJsonStreamWriterStateObjectStart sharedInstance]; - - if (maxDepth && stateStack.count > maxDepth) { - self.error = @"Nested too deep"; - return NO; - } - - [delegate writer:self appendBytes:"{" length:1]; - return YES; -} - -- (BOOL)writeObjectClose { - if ([state isInvalidState:self]) return NO; - - SBJsonStreamWriterState *prev = state; - - self.state = [stateStack lastObject]; - [stateStack removeLastObject]; - - if (humanReadable) [prev appendWhitespace:self]; - [delegate writer:self appendBytes:"}" length:1]; - - [state transitionState:self]; - return YES; -} - -- (BOOL)writeArrayOpen { - if ([state isInvalidState:self]) return NO; - if ([state expectingKey:self]) return NO; - [state appendSeparator:self]; - if (humanReadable && stateStack.count) [state appendWhitespace:self]; - - [stateStack addObject:state]; - self.state = [SBJsonStreamWriterStateArrayStart sharedInstance]; - - if (maxDepth && stateStack.count > maxDepth) { - self.error = @"Nested too deep"; - return NO; - } - - [delegate writer:self appendBytes:"[" length:1]; - return YES; -} - -- (BOOL)writeArrayClose { - if ([state isInvalidState:self]) return NO; - if ([state expectingKey:self]) return NO; - - SBJsonStreamWriterState *prev = state; - - self.state = [stateStack lastObject]; - [stateStack removeLastObject]; - - if (humanReadable) [prev appendWhitespace:self]; - [delegate writer:self appendBytes:"]" length:1]; - - [state transitionState:self]; - return YES; -} - -- (BOOL)writeNull { - if ([state isInvalidState:self]) return NO; - if ([state expectingKey:self]) return NO; - [state appendSeparator:self]; - if (humanReadable) [state appendWhitespace:self]; - - [delegate writer:self appendBytes:"null" length:4]; - [state transitionState:self]; - return YES; -} - -- (BOOL)writeBool:(BOOL)x { - if ([state isInvalidState:self]) return NO; - if ([state expectingKey:self]) return NO; - [state appendSeparator:self]; - if (humanReadable) [state appendWhitespace:self]; - - if (x) - [delegate writer:self appendBytes:"true" length:4]; - else - [delegate writer:self appendBytes:"false" length:5]; - [state transitionState:self]; - return YES; -} - - -- (BOOL)writeValue:(id)o { - if ([o isKindOfClass:[NSDictionary class]]) { - return [self writeObject:o]; - - } else if ([o isKindOfClass:[NSArray class]]) { - return [self writeArray:o]; - - } else if ([o isKindOfClass:[NSString class]]) { - [self writeString:o]; - return YES; - - } else if ([o isKindOfClass:[NSNumber class]]) { - return [self writeNumber:o]; - - } else if ([o isKindOfClass:[NSNull class]]) { - return [self writeNull]; - - } else if ([o respondsToSelector:@selector(proxyForJson)]) { - return [self writeValue:[o proxyForJson]]; - - } - - self.error = [NSString stringWithFormat:@"JSON serialisation not supported for %@", [o class]]; - return NO; -} - -static const char *strForChar(int c) { - switch (c) { - case 0: return "\\u0000"; break; - case 1: return "\\u0001"; break; - case 2: return "\\u0002"; break; - case 3: return "\\u0003"; break; - case 4: return "\\u0004"; break; - case 5: return "\\u0005"; break; - case 6: return "\\u0006"; break; - case 7: return "\\u0007"; break; - case 8: return "\\b"; break; - case 9: return "\\t"; break; - case 10: return "\\n"; break; - case 11: return "\\u000b"; break; - case 12: return "\\f"; break; - case 13: return "\\r"; break; - case 14: return "\\u000e"; break; - case 15: return "\\u000f"; break; - case 16: return "\\u0010"; break; - case 17: return "\\u0011"; break; - case 18: return "\\u0012"; break; - case 19: return "\\u0013"; break; - case 20: return "\\u0014"; break; - case 21: return "\\u0015"; break; - case 22: return "\\u0016"; break; - case 23: return "\\u0017"; break; - case 24: return "\\u0018"; break; - case 25: return "\\u0019"; break; - case 26: return "\\u001a"; break; - case 27: return "\\u001b"; break; - case 28: return "\\u001c"; break; - case 29: return "\\u001d"; break; - case 30: return "\\u001e"; break; - case 31: return "\\u001f"; break; - case 34: return "\\\""; break; - case 92: return "\\\\"; break; - } - NSLog(@"FUTFUTFUT: -->'%c'<---", c); - return "FUTFUTFUT"; -} - -- (BOOL)writeString:(NSString*)string { - if ([state isInvalidState:self]) return NO; - [state appendSeparator:self]; - if (humanReadable) [state appendWhitespace:self]; - - NSMutableData *buf = [cache objectForKey:string]; - if (!buf) { - - NSUInteger len = [string lengthOfBytesUsingEncoding:NSUTF8StringEncoding]; - const char *utf8 = [string UTF8String]; - NSUInteger written = 0, i = 0; - - buf = [NSMutableData dataWithCapacity:(NSUInteger)(len * 1.1f)]; - [buf appendBytes:"\"" length:1]; - - for (i = 0; i < len; i++) { - int c = utf8[i]; - BOOL isControlChar = c >= 0 && c < 32; - if (isControlChar || c == '"' || c == '\\') { - if (i - written) - [buf appendBytes:utf8 + written length:i - written]; - written = i + 1; - - const char *t = strForChar(c); - [buf appendBytes:t length:strlen(t)]; - } - } - - if (i - written) - [buf appendBytes:utf8 + written length:i - written]; - - [buf appendBytes:"\"" length:1]; - [cache setObject:buf forKey:string]; - } - - [delegate writer:self appendBytes:[buf bytes] length:[buf length]]; - [state transitionState:self]; - return YES; -} - -- (BOOL)writeNumber:(NSNumber*)number { - if (number == kTrue || number == kFalse) - return [self writeBool:[number boolValue]]; - - if ([state isInvalidState:self]) return NO; - if ([state expectingKey:self]) return NO; - [state appendSeparator:self]; - if (humanReadable) [state appendWhitespace:self]; - - if ([kPositiveInfinity isEqualToNumber:number]) { - self.error = @"+Infinity is not a valid number in JSON"; - return NO; - - } else if ([kNegativeInfinity isEqualToNumber:number]) { - self.error = @"-Infinity is not a valid number in JSON"; - return NO; - - } else if ([kNotANumber isEqualToNumber:number]) { - self.error = @"NaN is not a valid number in JSON"; - return NO; - } - - const char *objcType = [number objCType]; - char num[128]; - size_t len; - - switch (objcType[0]) { - case 'c': case 'i': case 's': case 'l': case 'q': - len = snprintf(num, sizeof num, "%lld", [number longLongValue]); - break; - case 'C': case 'I': case 'S': case 'L': case 'Q': - len = snprintf(num, sizeof num, "%llu", [number unsignedLongLongValue]); - break; - case 'f': case 'd': default: - if ([number isKindOfClass:[NSDecimalNumber class]]) { - char const *utf8 = [[number stringValue] UTF8String]; - [delegate writer:self appendBytes:utf8 length: strlen(utf8)]; - [state transitionState:self]; - return YES; - } - len = snprintf(num, sizeof num, "%.17g", [number doubleValue]); - break; - } - [delegate writer:self appendBytes:num length: len]; - [state transitionState:self]; - return YES; -} - -@end diff --git a/third_party/objc/json-framework/Classes/SBJsonStreamWriterAccumulator.h b/third_party/objc/json-framework/Classes/SBJsonStreamWriterAccumulator.h deleted file mode 100644 index b12d0d5ca7285..0000000000000 --- a/third_party/objc/json-framework/Classes/SBJsonStreamWriterAccumulator.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - Copyright (C) 2011 Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of the author nor the names of its contributors may be used - to endorse or promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import "SBJsonStreamWriter.h" - -@interface SBJsonStreamWriterAccumulator : NSObject - -@property (readonly, copy) NSMutableData* data; - -@end diff --git a/third_party/objc/json-framework/Classes/SBJsonStreamWriterAccumulator.m b/third_party/objc/json-framework/Classes/SBJsonStreamWriterAccumulator.m deleted file mode 100644 index be6519082658d..0000000000000 --- a/third_party/objc/json-framework/Classes/SBJsonStreamWriterAccumulator.m +++ /dev/null @@ -1,52 +0,0 @@ -/* - Copyright (C) 2011 Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of the author nor the names of its contributors may be used - to endorse or promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import "SBJsonStreamWriterAccumulator.h" - - -@implementation SBJsonStreamWriterAccumulator - -@synthesize data; - -- (id)init { - self = [super init]; - if (self) { - data = [[NSMutableData alloc] initWithCapacity:8096u]; - } - return self; -} - - -#pragma mark SBJsonStreamWriterDelegate - -- (void)writer:(SBJsonStreamWriter *)writer appendBytes:(const void *)bytes length:(NSUInteger)length { - [data appendBytes:bytes length:length]; -} - -@end diff --git a/third_party/objc/json-framework/Classes/SBJsonStreamWriterState.h b/third_party/objc/json-framework/Classes/SBJsonStreamWriterState.h deleted file mode 100644 index 90d442a0883de..0000000000000 --- a/third_party/objc/json-framework/Classes/SBJsonStreamWriterState.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - Copyright (c) 2010, Stig Brautaset. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - Neither the name of the the author nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import - -@class SBJsonStreamWriter; - -@interface SBJsonStreamWriterState : NSObject -+ (id)sharedInstance; -- (BOOL)isInvalidState:(SBJsonStreamWriter*)writer; -- (void)appendSeparator:(SBJsonStreamWriter*)writer; -- (BOOL)expectingKey:(SBJsonStreamWriter*)writer; -- (void)transitionState:(SBJsonStreamWriter*)writer; -- (void)appendWhitespace:(SBJsonStreamWriter*)writer; -@end - -@interface SBJsonStreamWriterStateObjectStart : SBJsonStreamWriterState -@end - -@interface SBJsonStreamWriterStateObjectKey : SBJsonStreamWriterStateObjectStart -@end - -@interface SBJsonStreamWriterStateObjectValue : SBJsonStreamWriterState -@end - -@interface SBJsonStreamWriterStateArrayStart : SBJsonStreamWriterState -@end - -@interface SBJsonStreamWriterStateArrayValue : SBJsonStreamWriterState -@end - -@interface SBJsonStreamWriterStateStart : SBJsonStreamWriterState -@end - -@interface SBJsonStreamWriterStateComplete : SBJsonStreamWriterState -@end - -@interface SBJsonStreamWriterStateError : SBJsonStreamWriterState -@end - diff --git a/third_party/objc/json-framework/Classes/SBJsonStreamWriterState.m b/third_party/objc/json-framework/Classes/SBJsonStreamWriterState.m deleted file mode 100644 index 8eb47f363116e..0000000000000 --- a/third_party/objc/json-framework/Classes/SBJsonStreamWriterState.m +++ /dev/null @@ -1,143 +0,0 @@ -/* - Copyright (c) 2010, Stig Brautaset. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - Neither the name of the the author nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import "SBJsonStreamWriterState.h" -#import "SBJsonStreamWriter.h" - -#define SINGLETON \ -+ (id)sharedInstance { \ - static id state = nil; \ - if (!state) { \ - @synchronized(self) { \ - if (!state) state = [[self alloc] init]; \ - } \ - } \ - return state; \ -} - - -@implementation SBJsonStreamWriterState -+ (id)sharedInstance { return nil; } -- (BOOL)isInvalidState:(SBJsonStreamWriter*)writer { return NO; } -- (void)appendSeparator:(SBJsonStreamWriter*)writer {} -- (BOOL)expectingKey:(SBJsonStreamWriter*)writer { return NO; } -- (void)transitionState:(SBJsonStreamWriter *)writer {} -- (void)appendWhitespace:(SBJsonStreamWriter*)writer { - [writer appendBytes:"\n" length:1]; - for (NSUInteger i = 0; i < writer.stateStack.count; i++) - [writer appendBytes:" " length:2]; -} -@end - -@implementation SBJsonStreamWriterStateObjectStart - -SINGLETON - -- (void)transitionState:(SBJsonStreamWriter *)writer { - writer.state = [SBJsonStreamWriterStateObjectValue sharedInstance]; -} -- (BOOL)expectingKey:(SBJsonStreamWriter *)writer { - writer.error = @"JSON object key must be string"; - return YES; -} -@end - -@implementation SBJsonStreamWriterStateObjectKey - -SINGLETON - -- (void)appendSeparator:(SBJsonStreamWriter *)writer { - [writer appendBytes:"," length:1]; -} -@end - -@implementation SBJsonStreamWriterStateObjectValue - -SINGLETON - -- (void)appendSeparator:(SBJsonStreamWriter *)writer { - [writer appendBytes:":" length:1]; -} -- (void)transitionState:(SBJsonStreamWriter *)writer { - writer.state = [SBJsonStreamWriterStateObjectKey sharedInstance]; -} -- (void)appendWhitespace:(SBJsonStreamWriter *)writer { - [writer appendBytes:" " length:1]; -} -@end - -@implementation SBJsonStreamWriterStateArrayStart - -SINGLETON - -- (void)transitionState:(SBJsonStreamWriter *)writer { - writer.state = [SBJsonStreamWriterStateArrayValue sharedInstance]; -} -@end - -@implementation SBJsonStreamWriterStateArrayValue - -SINGLETON - -- (void)appendSeparator:(SBJsonStreamWriter *)writer { - [writer appendBytes:"," length:1]; -} -@end - -@implementation SBJsonStreamWriterStateStart - -SINGLETON - - -- (void)transitionState:(SBJsonStreamWriter *)writer { - writer.state = [SBJsonStreamWriterStateComplete sharedInstance]; -} -- (void)appendSeparator:(SBJsonStreamWriter *)writer { -} -@end - -@implementation SBJsonStreamWriterStateComplete - -SINGLETON - -- (BOOL)isInvalidState:(SBJsonStreamWriter*)writer { - writer.error = @"Stream is closed"; - return YES; -} -@end - -@implementation SBJsonStreamWriterStateError - -SINGLETON - -@end - diff --git a/third_party/objc/json-framework/Classes/SBJsonTokeniser.h b/third_party/objc/json-framework/Classes/SBJsonTokeniser.h deleted file mode 100644 index e484a94821c9f..0000000000000 --- a/third_party/objc/json-framework/Classes/SBJsonTokeniser.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - Copyright (c) 2010, Stig Brautaset. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - Neither the name of the the author nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import - -typedef enum { - sbjson_token_error = -1, - sbjson_token_eof, - - sbjson_token_array_start, - sbjson_token_array_end, - - sbjson_token_object_start, - sbjson_token_object_end, - - sbjson_token_separator, - sbjson_token_keyval_separator, - - sbjson_token_number, - sbjson_token_string, - sbjson_token_true, - sbjson_token_false, - sbjson_token_null, - -} sbjson_token_t; - -@class SBJsonUTF8Stream; - -@interface SBJsonTokeniser : NSObject - -@property (strong) SBJsonUTF8Stream *stream; -@property (copy) NSString *error; - -- (void)appendData:(NSData*)data_; - -- (sbjson_token_t)getToken:(NSObject**)token; - -@end diff --git a/third_party/objc/json-framework/Classes/SBJsonTokeniser.m b/third_party/objc/json-framework/Classes/SBJsonTokeniser.m deleted file mode 100644 index 63dd0eab0537e..0000000000000 --- a/third_party/objc/json-framework/Classes/SBJsonTokeniser.m +++ /dev/null @@ -1,473 +0,0 @@ -/* - Copyright (c) 2010-2011, Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - Neither the name of the the author nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import "SBJsonTokeniser.h" -#import "SBJsonUTF8Stream.h" - -#define SBStringIsIllegalSurrogateHighCharacter(character) (((character) >= 0xD800UL) && ((character) <= 0xDFFFUL)) -#define SBStringIsSurrogateLowCharacter(character) ((character >= 0xDC00UL) && (character <= 0xDFFFUL)) -#define SBStringIsSurrogateHighCharacter(character) ((character >= 0xD800UL) && (character <= 0xDBFFUL)) - -static int const DECIMAL_MAX_PRECISION = 38; -static int const DECIMAL_EXPONENT_MAX = 127; -static short const DECIMAL_EXPONENT_MIN = -128; -static int const LONG_LONG_DIGITS = 19; - -static NSCharacterSet *kDecimalDigitCharacterSet; - -@implementation SBJsonTokeniser - -@synthesize error = _error; -@synthesize stream = _stream; - -+ (void)initialize { - kDecimalDigitCharacterSet = [NSCharacterSet decimalDigitCharacterSet]; -} - -- (id)init { - self = [super init]; - if (self) { - _stream = [[SBJsonUTF8Stream alloc] init]; - - } - - return self; -} - - -- (void)appendData:(NSData *)data_ { - [_stream appendData:data_]; -} - - -- (sbjson_token_t)match:(const char *)pattern length:(NSUInteger)len retval:(sbjson_token_t)token { - if (![_stream haveRemainingCharacters:len]) - return sbjson_token_eof; - - if ([_stream skipCharacters:pattern length:len]) - return token; - - self.error = [NSString stringWithFormat:@"Expected '%s' after initial '%.1s'", pattern, pattern]; - return sbjson_token_error; -} - -- (BOOL)decodeEscape:(unichar)ch into:(unichar*)decoded { - switch (ch) { - case '\\': - case '/': - case '"': - *decoded = ch; - break; - - case 'b': - *decoded = '\b'; - break; - - case 'n': - *decoded = '\n'; - break; - - case 'r': - *decoded = '\r'; - break; - - case 't': - *decoded = '\t'; - break; - - case 'f': - *decoded = '\f'; - break; - - default: - self.error = @"Illegal escape character"; - return NO; - break; - } - return YES; -} - -- (BOOL)decodeHexQuad:(unichar*)quad { - unichar c, tmp = 0; - - for (int i = 0; i < 4; i++) { - (void)[_stream getNextUnichar:&c]; - tmp *= 16; - switch (c) { - case '0' ... '9': - tmp += c - '0'; - break; - - case 'a' ... 'f': - tmp += 10 + c - 'a'; - break; - - case 'A' ... 'F': - tmp += 10 + c - 'A'; - break; - - default: - return NO; - } - } - *quad = tmp; - return YES; -} - -- (sbjson_token_t)getStringToken:(NSObject**)token { - NSMutableString *acc = nil; - - for (;;) { - [_stream skip]; - - unichar ch; - { - NSMutableString *string = nil; - - if (![_stream getStringFragment:&string]) - return sbjson_token_eof; - - if (!string) { - self.error = @"Broken Unicode encoding"; - return sbjson_token_error; - } - - if (![_stream getUnichar:&ch]) - return sbjson_token_eof; - - if (acc) { - [acc appendString:string]; - - } else if (ch == '"') { - *token = [string copy]; - [_stream skip]; - return sbjson_token_string; - - } else { - acc = [string mutableCopy]; - } - } - - - switch (ch) { - case 0 ... 0x1F: - self.error = [NSString stringWithFormat:@"Unescaped control character [0x%0.2X]", (int)ch]; - return sbjson_token_error; - break; - - case '"': - *token = acc; - [_stream skip]; - return sbjson_token_string; - break; - - case '\\': - if (![_stream getNextUnichar:&ch]) - return sbjson_token_eof; - - if (ch == 'u') { - if (![_stream haveRemainingCharacters:5]) - return sbjson_token_eof; - - unichar hi; - if (![self decodeHexQuad:&hi]) { - self.error = @"Invalid hex quad"; - return sbjson_token_error; - } - - if (SBStringIsSurrogateHighCharacter(hi)) { - unichar lo; - - if (![_stream haveRemainingCharacters:6]) - return sbjson_token_eof; - - (void)[_stream getNextUnichar:&ch]; - (void)[_stream getNextUnichar:&lo]; - if (ch != '\\' || lo != 'u' || ![self decodeHexQuad:&lo]) { - self.error = @"Missing low character in surrogate pair"; - return sbjson_token_error; - } - - if (!SBStringIsSurrogateLowCharacter(lo)) { - self.error = @"Invalid low character in surrogate pair"; - return sbjson_token_error; - } - - [acc appendFormat:@"%C%C", hi, lo]; - } else if (SBStringIsIllegalSurrogateHighCharacter(hi)) { - self.error = @"Invalid high character in surrogate pair"; - return sbjson_token_error; - } else { - [acc appendFormat:@"%C", hi]; - } - - - } else { - unichar decoded; - if (![self decodeEscape:ch into:&decoded]) - return sbjson_token_error; - [acc appendFormat:@"%C", decoded]; - } - - break; - - default: { - self.error = [NSString stringWithFormat:@"Invalid UTF-8: '%x'", (int)ch]; - return sbjson_token_error; - break; - } - } - } - return sbjson_token_eof; -} - -- (sbjson_token_t)getNumberToken:(NSObject**)token { - - NSUInteger numberStart = _stream.index; - - unichar ch; - if (![_stream getUnichar:&ch]) - return sbjson_token_eof; - - BOOL isNegative = NO; - if (ch == '-') { - isNegative = YES; - if (![_stream getNextUnichar:&ch]) - return sbjson_token_eof; - } - - unsigned long long mantissa = 0; - int mantissa_length = 0; - - if (ch == '0') { - mantissa_length++; - if (![_stream getNextUnichar:&ch]) - return sbjson_token_eof; - - if ([kDecimalDigitCharacterSet characterIsMember:ch]) { - self.error = @"Leading zero is illegal in number"; - return sbjson_token_error; - } - } - - while ([kDecimalDigitCharacterSet characterIsMember:ch]) { - mantissa *= 10; - mantissa += (ch - '0'); - mantissa_length++; - - if (![_stream getNextUnichar:&ch]) - return sbjson_token_eof; - } - - short exponent = 0; - BOOL isFloat = NO; - - if (ch == '.') { - isFloat = YES; - if (![_stream getNextUnichar:&ch]) - return sbjson_token_eof; - - while ([kDecimalDigitCharacterSet characterIsMember:ch]) { - mantissa *= 10; - mantissa += (ch - '0'); - mantissa_length++; - exponent--; - - if (![_stream getNextUnichar:&ch]) - return sbjson_token_eof; - } - - if (!exponent) { - self.error = @"No digits after decimal point"; - return sbjson_token_error; - } - } - - BOOL hasExponent = NO; - if (ch == 'e' || ch == 'E') { - hasExponent = YES; - - if (![_stream getNextUnichar:&ch]) - return sbjson_token_eof; - - BOOL expIsNegative = NO; - if (ch == '-') { - expIsNegative = YES; - if (![_stream getNextUnichar:&ch]) - return sbjson_token_eof; - - } else if (ch == '+') { - if (![_stream getNextUnichar:&ch]) - return sbjson_token_eof; - } - - short explicit_exponent = 0; - short explicit_exponent_length = 0; - while ([kDecimalDigitCharacterSet characterIsMember:ch]) { - explicit_exponent *= 10; - explicit_exponent += (ch - '0'); - explicit_exponent_length++; - - if (![_stream getNextUnichar:&ch]) - return sbjson_token_eof; - } - - if (explicit_exponent_length == 0) { - self.error = @"No digits in exponent"; - return sbjson_token_error; - } - - if (expIsNegative) - exponent -= explicit_exponent; - else - exponent += explicit_exponent; - } - - if (!mantissa_length && isNegative) { - self.error = @"No digits after initial minus"; - return sbjson_token_error; - - } else if (mantissa_length > DECIMAL_MAX_PRECISION) { - self.error = @"Precision is too high"; - return sbjson_token_error; - - } else if (exponent > DECIMAL_EXPONENT_MAX || exponent < DECIMAL_EXPONENT_MIN) { - self.error = @"Exponent out of range"; - return sbjson_token_error; - } - - if (mantissa_length <= LONG_LONG_DIGITS) { - if (!isFloat && !hasExponent) { - *token = [NSNumber numberWithLongLong: isNegative ? -mantissa : mantissa]; - } else if (mantissa == 0) { - *token = [NSNumber numberWithFloat:-0.0f]; - } else { - *token = [NSDecimalNumber decimalNumberWithMantissa:mantissa - exponent:exponent - isNegative:isNegative]; - } - - } else { - NSString *number = [_stream stringWithRange:NSMakeRange(numberStart, _stream.index - numberStart)]; - *token = [NSDecimalNumber decimalNumberWithString:number]; - - } - - return sbjson_token_number; -} - -- (sbjson_token_t)getToken:(NSObject **)token { - - [_stream skipWhitespace]; - - unichar ch; - if (![_stream getUnichar:&ch]) - return sbjson_token_eof; - - NSUInteger oldIndexLocation = _stream.index; - sbjson_token_t tok; - - switch (ch) { - case '[': - tok = sbjson_token_array_start; - [_stream skip]; - break; - - case ']': - tok = sbjson_token_array_end; - [_stream skip]; - break; - - case '{': - tok = sbjson_token_object_start; - [_stream skip]; - break; - - case ':': - tok = sbjson_token_keyval_separator; - [_stream skip]; - break; - - case '}': - tok = sbjson_token_object_end; - [_stream skip]; - break; - - case ',': - tok = sbjson_token_separator; - [_stream skip]; - break; - - case 'n': - tok = [self match:"null" length:4 retval:sbjson_token_null]; - break; - - case 't': - tok = [self match:"true" length:4 retval:sbjson_token_true]; - break; - - case 'f': - tok = [self match:"false" length:5 retval:sbjson_token_false]; - break; - - case '"': - tok = [self getStringToken:token]; - break; - - case '0' ... '9': - case '-': - tok = [self getNumberToken:token]; - break; - - case '+': - self.error = @"Leading + is illegal in number"; - tok = sbjson_token_error; - break; - - default: - self.error = [NSString stringWithFormat:@"Illegal start of token [%c]", ch]; - tok = sbjson_token_error; - break; - } - - if (tok == sbjson_token_eof) { - // We ran out of bytes in the middle of a token. - // We don't know how to restart in mid-flight, so - // rewind to the start of the token for next attempt. - // Hopefully we'll have more data then. - _stream.index = oldIndexLocation; - } - - return tok; -} - - -@end diff --git a/third_party/objc/json-framework/Classes/SBJsonUTF8Stream.h b/third_party/objc/json-framework/Classes/SBJsonUTF8Stream.h deleted file mode 100644 index a26f032655f90..0000000000000 --- a/third_party/objc/json-framework/Classes/SBJsonUTF8Stream.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - Copyright (c) 2011, Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - Neither the name of the the author nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import - - -@interface SBJsonUTF8Stream : NSObject { -@private - const char *_bytes; - NSMutableData *_data; - NSUInteger _length; -} - -@property (assign) NSUInteger index; - -- (void)appendData:(NSData*)data_; - -- (BOOL)haveRemainingCharacters:(NSUInteger)chars; - -- (void)skip; -- (void)skipWhitespace; -- (BOOL)skipCharacters:(const char *)chars length:(NSUInteger)len; - -- (BOOL)getUnichar:(unichar*)ch; -- (BOOL)getNextUnichar:(unichar*)ch; -- (BOOL)getStringFragment:(NSString**)string; - -- (NSString*)stringWithRange:(NSRange)range; - -@end diff --git a/third_party/objc/json-framework/Classes/SBJsonUTF8Stream.m b/third_party/objc/json-framework/Classes/SBJsonUTF8Stream.m deleted file mode 100644 index 8865e891f0e62..0000000000000 --- a/third_party/objc/json-framework/Classes/SBJsonUTF8Stream.m +++ /dev/null @@ -1,141 +0,0 @@ -/* - Copyright (c) 2011, Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - Neither the name of the the author nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import "SBJsonUTF8Stream.h" - - -@implementation SBJsonUTF8Stream - -@synthesize index = _index; - -- (id)init { - self = [super init]; - if (self) { - _data = [[NSMutableData alloc] initWithCapacity:4096u]; - } - return self; -} - - -- (void)appendData:(NSData *)data_ { - - if (_index) { - // Discard data we've already parsed - [_data replaceBytesInRange:NSMakeRange(0, _index) withBytes:"" length:0]; - - // Reset index to point to current position - _index = 0; - } - - [_data appendData:data_]; - - // This is an optimisation. - _bytes = (const char*)[_data bytes]; - _length = [_data length]; -} - - -- (BOOL)getUnichar:(unichar*)ch { - if (_index < _length) { - *ch = (unichar)_bytes[_index]; - return YES; - } - return NO; -} - -- (BOOL)getNextUnichar:(unichar*)ch { - if (++_index < _length) { - *ch = (unichar)_bytes[_index]; - return YES; - } - return NO; -} - -- (BOOL)getStringFragment:(NSString **)string { - NSUInteger start = _index; - while (_index < _length) { - switch (_bytes[_index]) { - case '"': - case '\\': - case 0 ... 0x1f: - *string = [[NSString alloc] initWithBytes:(_bytes + start) - length:(_index - start) - encoding:NSUTF8StringEncoding]; - return YES; - break; - default: - _index++; - break; - } - } - return NO; -} - -- (void)skip { - _index++; -} - -- (void)skipWhitespace { - while (_index < _length) { - switch (_bytes[_index]) { - case ' ': - case '\t': - case '\r': - case '\n': - _index++; - break; - default: - return; - break; - } - } -} - -- (BOOL)haveRemainingCharacters:(NSUInteger)chars { - return [_data length] - _index >= chars; -} - -- (BOOL)skipCharacters:(const char *)chars length:(NSUInteger)len { - const void *bytes = ((const char*)[_data bytes]) + _index; - if (!memcmp(bytes, chars, len)) { - _index += len; - return YES; - } - return NO; -} - -- (NSString*)stringWithRange:(NSRange)range { - return [[[NSString alloc] initWithBytes:_bytes + range.location length:range.length encoding:NSUTF8StringEncoding] autorelease]; - -} - - -@end diff --git a/third_party/objc/json-framework/Classes/SBJsonWriter.h b/third_party/objc/json-framework/Classes/SBJsonWriter.h deleted file mode 100644 index 640816c9fed42..0000000000000 --- a/third_party/objc/json-framework/Classes/SBJsonWriter.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - Copyright (C) 2009 Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of the author nor the names of its contributors may be used - to endorse or promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import - -/** - @brief The JSON writer class. - - This uses SBJsonStreamWriter internally. - - @see @ref json2objc - */ - -@interface SBJsonWriter : NSObject - -/** - @brief The maximum recursing depth. - - Defaults to 32. If the input is nested deeper than this the input will be deemed to be - malicious and the parser returns nil, signalling an error. ("Nested too deep".) You can - turn off this security feature by setting the maxDepth value to 0. - */ -@property NSUInteger maxDepth; - -/** - @brief Return an error trace, or nil if there was no errors. - - Note that this method returns the trace of the last method that failed. - You need to check the return value of the call you're making to figure out - if the call actually failed, before you know call this method. - */ -@property (readonly, copy) NSString *error; - -/** - @brief Whether we are generating human-readable (multiline) JSON. - - Set whether or not to generate human-readable JSON. The default is NO, which produces - JSON without any whitespace. (Except inside strings.) If set to YES, generates human-readable - JSON with linebreaks after each array value and dictionary key/value pair, indented two - spaces per nesting level. - */ -@property BOOL humanReadable; - -/** - @brief Whether or not to sort the dictionary keys in the output. - - If this is set to YES, the dictionary keys in the JSON output will be in sorted order. - (This is useful if you need to compare two structures, for example.) The default is NO. - */ -@property BOOL sortKeys; - -/** - @brief An optional comparator to be used if sortKeys is YES. - - If this is nil, sorting will be done via @selector(compare:). - */ -@property (copy) NSComparator sortKeysComparator; - -/** - @brief Return JSON representation for the given object. - - Returns a string containing JSON representation of the passed in value, or nil on error. - If nil is returned and @p error is not NULL, @p *error can be interrogated to find the cause of the error. - - @param value any instance that can be represented as JSON text. - */ -- (NSString*)stringWithObject:(id)value; - -/** - @brief Return JSON representation for the given object. - - Returns an NSData object containing JSON represented as UTF8 text, or nil on error. - - @param value any instance that can be represented as JSON text. - */ -- (NSData*)dataWithObject:(id)value; - -/** - @brief Return JSON representation (or fragment) for the given object. - - Returns a string containing JSON representation of the passed in value, or nil on error. - If nil is returned and @p error is not NULL, @p *error can be interrogated to find the cause of the error. - - @param value any instance that can be represented as a JSON fragment - @param error pointer to object to be populated with NSError on failure - - */- (NSString*)stringWithObject:(id)value - error:(NSError**)error; - - -@end diff --git a/third_party/objc/json-framework/Classes/SBJsonWriter.m b/third_party/objc/json-framework/Classes/SBJsonWriter.m deleted file mode 100644 index d200f9ce6054c..0000000000000 --- a/third_party/objc/json-framework/Classes/SBJsonWriter.m +++ /dev/null @@ -1,112 +0,0 @@ -/* - Copyright (C) 2009 Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of the author nor the names of its contributors may be used - to endorse or promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import "SBJsonWriter.h" -#import "SBJsonStreamWriter.h" -#import "SBJsonStreamWriterAccumulator.h" - - -@interface SBJsonWriter () -@property (copy) NSString *error; -@end - -@implementation SBJsonWriter - -@synthesize sortKeys; -@synthesize humanReadable; - -@synthesize error; -@synthesize maxDepth; - -@synthesize sortKeysComparator; - -- (id)init { - self = [super init]; - if (self) { - self.maxDepth = 32u; - } - return self; -} - - -- (NSString*)stringWithObject:(id)value { - NSData *data = [self dataWithObject:value]; - if (data) - return [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; - return nil; -} - -- (NSString*)stringWithObject:(id)value error:(NSError**)error_ { - NSString *tmp = [self stringWithObject:value]; - if (tmp) - return tmp; - - if (error_) { - NSDictionary *ui = [NSDictionary dictionaryWithObjectsAndKeys:error, NSLocalizedDescriptionKey, nil]; - *error_ = [NSError errorWithDomain:@"org.brautaset.SBJsonWriter.ErrorDomain" code:0 userInfo:ui]; - } - - return nil; -} - -- (NSData*)dataWithObject:(id)object { - self.error = nil; - - SBJsonStreamWriterAccumulator *accumulator = [[SBJsonStreamWriterAccumulator alloc] init]; - - SBJsonStreamWriter *streamWriter = [[SBJsonStreamWriter alloc] init]; - streamWriter.sortKeys = self.sortKeys; - streamWriter.maxDepth = self.maxDepth; - streamWriter.sortKeysComparator = self.sortKeysComparator; - streamWriter.humanReadable = self.humanReadable; - streamWriter.delegate = accumulator; - - BOOL ok = NO; - if ([object isKindOfClass:[NSDictionary class]]) - ok = [streamWriter writeObject:object]; - - else if ([object isKindOfClass:[NSArray class]]) - ok = [streamWriter writeArray:object]; - - else if ([object respondsToSelector:@selector(proxyForJson)]) - return [self dataWithObject:[object proxyForJson]]; - else { - self.error = @"Not valid type for JSON"; - return nil; - } - - if (ok) - return accumulator.data; - - self.error = streamWriter.error; - return nil; -} - - -@end diff --git a/third_party/objc/json-framework/Examples/DisplayPretty/.gitignore b/third_party/objc/json-framework/Examples/DisplayPretty/.gitignore deleted file mode 100644 index 12cbb71a7d6c1..0000000000000 --- a/third_party/objc/json-framework/Examples/DisplayPretty/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.xcodeproj/* -!*.xcodeproj/project.pbxproj diff --git a/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty.xcodeproj/project.pbxproj b/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty.xcodeproj/project.pbxproj deleted file mode 100644 index 789d5be65c4f7..0000000000000 --- a/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty.xcodeproj/project.pbxproj +++ /dev/null @@ -1,409 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - BC70BEF8138D35AF00638110 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC70BEF7138D35AF00638110 /* Cocoa.framework */; }; - BC70BF02138D35AF00638110 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = BC70BF00138D35AF00638110 /* InfoPlist.strings */; }; - BC70BF05138D35AF00638110 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = BC70BF04138D35AF00638110 /* main.m */; }; - BC70BF08138D35AF00638110 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = BC70BF06138D35AF00638110 /* Credits.rtf */; }; - BC70BF0B138D35AF00638110 /* DisplayPrettyAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = BC70BF0A138D35AF00638110 /* DisplayPrettyAppDelegate.m */; }; - BC70BF0E138D35AF00638110 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC70BF0C138D35AF00638110 /* MainMenu.xib */; }; - BC70BF62138D408900638110 /* DisplayPrettyController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC70BF61138D408900638110 /* DisplayPrettyController.m */; }; - BCA5BD8013BE00DD00223625 /* SBJson.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCA5BD6513BE00A200223625 /* SBJson.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - BCA5BD6413BE00A200223625 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BCA5BD5D13BE00A200223625 /* SBJson.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BC12323D1391D5CC00131607; - remoteInfo = SBJson; - }; - BCA5BD6613BE00A200223625 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BCA5BD5D13BE00A200223625 /* SBJson.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BC1232521391D5CC00131607; - remoteInfo = SBJsonTests; - }; - BCA5BD6813BE00A200223625 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BCA5BD5D13BE00A200223625 /* SBJson.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BCC2626913920FC7003D9994; - remoteInfo = "sbjson-ios"; - }; - BCA5BD6A13BE00A200223625 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BCA5BD5D13BE00A200223625 /* SBJson.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BCC2627313920FC7003D9994; - remoteInfo = "sbjson-iosTests"; - }; - BCA5BD7E13BE00D600223625 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BCA5BD5D13BE00A200223625 /* SBJson.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BC12323C1391D5CC00131607; - remoteInfo = SBJson; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - BC70BEF3138D35AF00638110 /* DisplayPretty.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DisplayPretty.app; sourceTree = BUILT_PRODUCTS_DIR; }; - BC70BEF7138D35AF00638110 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; - BC70BEFA138D35AF00638110 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; - BC70BEFB138D35AF00638110 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; - BC70BEFC138D35AF00638110 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - BC70BEFF138D35AF00638110 /* DisplayPretty-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "DisplayPretty-Info.plist"; sourceTree = ""; }; - BC70BF01138D35AF00638110 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - BC70BF03138D35AF00638110 /* DisplayPretty-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "DisplayPretty-Prefix.pch"; sourceTree = ""; }; - BC70BF04138D35AF00638110 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - BC70BF07138D35AF00638110 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; }; - BC70BF09138D35AF00638110 /* DisplayPrettyAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DisplayPrettyAppDelegate.h; sourceTree = ""; }; - BC70BF0A138D35AF00638110 /* DisplayPrettyAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DisplayPrettyAppDelegate.m; sourceTree = ""; }; - BC70BF0D138D35AF00638110 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = ""; }; - BC70BF60138D408900638110 /* DisplayPrettyController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DisplayPrettyController.h; sourceTree = ""; }; - BC70BF61138D408900638110 /* DisplayPrettyController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DisplayPrettyController.m; sourceTree = ""; }; - BC76484113A3600500666A48 /* SBJson.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SBJson.framework; sourceTree = SOURCE_ROOT; }; - BCA5BD5D13BE00A200223625 /* SBJson.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SBJson.xcodeproj; path = ../../SBJson.xcodeproj; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - BC70BEF0138D35AF00638110 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - BCA5BD8013BE00DD00223625 /* SBJson.framework in Frameworks */, - BC70BEF8138D35AF00638110 /* Cocoa.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - BC70BEE8138D35AF00638110 = { - isa = PBXGroup; - children = ( - BCA5BD5D13BE00A200223625 /* SBJson.xcodeproj */, - BC70BEFD138D35AF00638110 /* DisplayPretty */, - BC70BEF6138D35AF00638110 /* Frameworks */, - BC70BEF4138D35AF00638110 /* Products */, - ); - sourceTree = ""; - }; - BC70BEF4138D35AF00638110 /* Products */ = { - isa = PBXGroup; - children = ( - BC70BEF3138D35AF00638110 /* DisplayPretty.app */, - ); - name = Products; - sourceTree = ""; - }; - BC70BEF6138D35AF00638110 /* Frameworks */ = { - isa = PBXGroup; - children = ( - BC76484113A3600500666A48 /* SBJson.framework */, - BC70BEF7138D35AF00638110 /* Cocoa.framework */, - BC70BEF9138D35AF00638110 /* Other Frameworks */, - ); - name = Frameworks; - sourceTree = ""; - }; - BC70BEF9138D35AF00638110 /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - BC70BEFA138D35AF00638110 /* AppKit.framework */, - BC70BEFB138D35AF00638110 /* CoreData.framework */, - BC70BEFC138D35AF00638110 /* Foundation.framework */, - ); - name = "Other Frameworks"; - sourceTree = ""; - }; - BC70BEFD138D35AF00638110 /* DisplayPretty */ = { - isa = PBXGroup; - children = ( - BC70BF09138D35AF00638110 /* DisplayPrettyAppDelegate.h */, - BC70BF0A138D35AF00638110 /* DisplayPrettyAppDelegate.m */, - BC70BF60138D408900638110 /* DisplayPrettyController.h */, - BC70BF61138D408900638110 /* DisplayPrettyController.m */, - BC70BF0C138D35AF00638110 /* MainMenu.xib */, - BC70BEFE138D35AF00638110 /* Supporting Files */, - ); - path = DisplayPretty; - sourceTree = ""; - }; - BC70BEFE138D35AF00638110 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - BC70BEFF138D35AF00638110 /* DisplayPretty-Info.plist */, - BC70BF00138D35AF00638110 /* InfoPlist.strings */, - BC70BF03138D35AF00638110 /* DisplayPretty-Prefix.pch */, - BC70BF04138D35AF00638110 /* main.m */, - BC70BF06138D35AF00638110 /* Credits.rtf */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - BCA5BD5E13BE00A200223625 /* Products */ = { - isa = PBXGroup; - children = ( - BCA5BD6513BE00A200223625 /* SBJson.framework */, - BCA5BD6713BE00A200223625 /* SBJsonTests.octest */, - BCA5BD6913BE00A200223625 /* libsbjson-ios.a */, - BCA5BD6B13BE00A200223625 /* sbjson-iosTests.octest */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - BC70BEF2138D35AF00638110 /* DisplayPretty */ = { - isa = PBXNativeTarget; - buildConfigurationList = BC70BF11138D35AF00638110 /* Build configuration list for PBXNativeTarget "DisplayPretty" */; - buildPhases = ( - BC70BEEF138D35AF00638110 /* Sources */, - BC70BEF0138D35AF00638110 /* Frameworks */, - BC70BEF1138D35AF00638110 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - BCA5BD7F13BE00D600223625 /* PBXTargetDependency */, - ); - name = DisplayPretty; - productName = DisplayPretty; - productReference = BC70BEF3138D35AF00638110 /* DisplayPretty.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - BC70BEEA138D35AF00638110 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0420; - ORGANIZATIONNAME = "Stig Brautaset"; - }; - buildConfigurationList = BC70BEED138D35AF00638110 /* Build configuration list for PBXProject "DisplayPretty" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = BC70BEE8138D35AF00638110; - productRefGroup = BC70BEF4138D35AF00638110 /* Products */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = BCA5BD5E13BE00A200223625 /* Products */; - ProjectRef = BCA5BD5D13BE00A200223625 /* SBJson.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - BC70BEF2138D35AF00638110 /* DisplayPretty */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - BCA5BD6513BE00A200223625 /* SBJson.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = SBJson.framework; - remoteRef = BCA5BD6413BE00A200223625 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - BCA5BD6713BE00A200223625 /* SBJsonTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = SBJsonTests.octest; - remoteRef = BCA5BD6613BE00A200223625 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - BCA5BD6913BE00A200223625 /* libsbjson-ios.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libsbjson-ios.a"; - remoteRef = BCA5BD6813BE00A200223625 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - BCA5BD6B13BE00A200223625 /* sbjson-iosTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = "sbjson-iosTests.octest"; - remoteRef = BCA5BD6A13BE00A200223625 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - BC70BEF1138D35AF00638110 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BC70BF02138D35AF00638110 /* InfoPlist.strings in Resources */, - BC70BF08138D35AF00638110 /* Credits.rtf in Resources */, - BC70BF0E138D35AF00638110 /* MainMenu.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - BC70BEEF138D35AF00638110 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BC70BF05138D35AF00638110 /* main.m in Sources */, - BC70BF0B138D35AF00638110 /* DisplayPrettyAppDelegate.m in Sources */, - BC70BF62138D408900638110 /* DisplayPrettyController.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - BCA5BD7F13BE00D600223625 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = SBJson; - targetProxy = BCA5BD7E13BE00D600223625 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - BC70BF00138D35AF00638110 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - BC70BF01138D35AF00638110 /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - BC70BF06138D35AF00638110 /* Credits.rtf */ = { - isa = PBXVariantGroup; - children = ( - BC70BF07138D35AF00638110 /* en */, - ); - name = Credits.rtf; - sourceTree = ""; - }; - BC70BF0C138D35AF00638110 /* MainMenu.xib */ = { - isa = PBXVariantGroup; - children = ( - BC70BF0D138D35AF00638110 /* en */, - ); - name = MainMenu.xib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - BC70BF0F138D35AF00638110 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.6; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - }; - name = Debug; - }; - BC70BF10138D35AF00638110 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.6; - SDKROOT = macosx; - }; - name = Release; - }; - BC70BF12138D35AF00638110 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COPY_PHASE_STRIP = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)\"", - ); - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "DisplayPretty/DisplayPretty-Prefix.pch"; - INFOPLIST_FILE = "DisplayPretty/DisplayPretty-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - BC70BF13138D35AF00638110 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)\"", - ); - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "DisplayPretty/DisplayPretty-Prefix.pch"; - INFOPLIST_FILE = "DisplayPretty/DisplayPretty-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - BC70BEED138D35AF00638110 /* Build configuration list for PBXProject "DisplayPretty" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BC70BF0F138D35AF00638110 /* Debug */, - BC70BF10138D35AF00638110 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - BC70BF11138D35AF00638110 /* Build configuration list for PBXNativeTarget "DisplayPretty" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BC70BF12138D35AF00638110 /* Debug */, - BC70BF13138D35AF00638110 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = BC70BEEA138D35AF00638110 /* Project object */; -} diff --git a/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 3e402493d4a67..0000000000000 --- a/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty/DisplayPretty-Info.plist b/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty/DisplayPretty-Info.plist deleted file mode 100644 index 9b51702a727a2..0000000000000 --- a/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty/DisplayPretty-Info.plist +++ /dev/null @@ -1,32 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - org.brautaset.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSMinimumSystemVersion - ${MACOSX_DEPLOYMENT_TARGET} - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty/DisplayPretty-Prefix.pch b/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty/DisplayPretty-Prefix.pch deleted file mode 100644 index 704c82318da25..0000000000000 --- a/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty/DisplayPretty-Prefix.pch +++ /dev/null @@ -1,7 +0,0 @@ -// -// Prefix header for all source files of the 'DisplayPretty' target in the 'DisplayPretty' project -// - -#ifdef __OBJC__ - #import -#endif diff --git a/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty/DisplayPrettyAppDelegate.h b/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty/DisplayPrettyAppDelegate.h deleted file mode 100644 index 6a5244b658113..0000000000000 --- a/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty/DisplayPrettyAppDelegate.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// DisplayPrettyAppDelegate.h -// DisplayPretty -// -// Created by Stig Brautaset on 25/05/2011. -// Copyright 2011 Stig Brautaset. All rights reserved. -// - -#import - -@interface DisplayPrettyAppDelegate : NSObject { -@private - NSWindow *window; -} - -@property (assign) IBOutlet NSWindow *window; - -@end diff --git a/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty/DisplayPrettyAppDelegate.m b/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty/DisplayPrettyAppDelegate.m deleted file mode 100644 index bff32e5d6a676..0000000000000 --- a/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty/DisplayPrettyAppDelegate.m +++ /dev/null @@ -1,20 +0,0 @@ -// -// DisplayPrettyAppDelegate.m -// DisplayPretty -// -// Created by Stig Brautaset on 25/05/2011. -// Copyright 2011 Stig Brautaset. All rights reserved. -// - -#import "DisplayPrettyAppDelegate.h" - -@implementation DisplayPrettyAppDelegate - -@synthesize window; - -- (void)applicationDidFinishLaunching:(NSNotification *)aNotification -{ - // Insert code here to initialize your application -} - -@end diff --git a/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty/DisplayPrettyController.h b/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty/DisplayPrettyController.h deleted file mode 100644 index ea5914036e4e0..0000000000000 --- a/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty/DisplayPrettyController.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// DisplayPrettyController.h -// DisplayPretty -// -// Created by Stig Brautaset on 25/05/2011. -// Copyright 2011 Stig Brautaset. All rights reserved. -// - -#import - -@class SBJsonParser; -@class SBJsonWriter; - -@interface DisplayPrettyController : NSObject { -@private - SBJsonParser *_parser; - SBJsonWriter *_writer; - - IBOutlet NSTextField *_source; - IBOutlet NSTextField *_formatted; -} - -- (IBAction)formatText:(id)sender; - -@end diff --git a/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty/DisplayPrettyController.m b/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty/DisplayPrettyController.m deleted file mode 100644 index 7f76012eca58e..0000000000000 --- a/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty/DisplayPrettyController.m +++ /dev/null @@ -1,43 +0,0 @@ -// -// DisplayPrettyController.m -// DisplayPretty -// -// Created by Stig Brautaset on 25/05/2011. -// Copyright 2011 Stig Brautaset. All rights reserved. -// - -#import "DisplayPrettyController.h" -#import - -@implementation DisplayPrettyController - -- (id)init -{ - self = [super init]; - if (self) { - _parser = [[SBJsonParser alloc] init]; - _writer = [[SBJsonWriter alloc] init]; - _writer.humanReadable = YES; - _writer.sortKeys = YES; - } - return self; -} - -- (void)dealloc -{ - [_parser release]; - [_writer release]; - [super dealloc]; -} - -- (IBAction)formatText:(id)sender { - id object = [_parser objectWithString:[_source stringValue]]; - if (object) { - [_formatted setStringValue:[_writer stringWithObject:object]]; - } else { - [_formatted setStringValue:[NSString stringWithFormat:@"An error occurred: %@", _parser.error]]; - } - -} - -@end diff --git a/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty/en.lproj/Credits.rtf b/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty/en.lproj/Credits.rtf deleted file mode 100644 index 46576ef211d18..0000000000000 --- a/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty/en.lproj/Credits.rtf +++ /dev/null @@ -1,29 +0,0 @@ -{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;} -{\colortbl;\red255\green255\blue255;} -\paperw9840\paperh8400 -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural - -\f0\b\fs24 \cf0 Engineering: -\b0 \ - Some people\ -\ - -\b Human Interface Design: -\b0 \ - Some other people\ -\ - -\b Testing: -\b0 \ - Hopefully not nobody\ -\ - -\b Documentation: -\b0 \ - Whoever\ -\ - -\b With special thanks to: -\b0 \ - Mom\ -} diff --git a/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty/en.lproj/InfoPlist.strings b/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28ff8f86a..0000000000000 --- a/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty/en.lproj/MainMenu.xib b/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty/en.lproj/MainMenu.xib deleted file mode 100644 index 61a762e7429d6..0000000000000 --- a/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty/en.lproj/MainMenu.xib +++ /dev/null @@ -1,4040 +0,0 @@ - - - - 1060 - 10J869 - 1306 - 1038.35 - 461.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 1306 - - - YES - NSTextField - NSMenu - NSWindowTemplate - NSMenuItem - NSCustomObject - NSView - NSSplitView - NSCustomView - NSTextFieldCell - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - YES - - - - - YES - - NSApplication - - - FirstResponder - - - NSApplication - - - AMainMenu - - YES - - - DisplayPretty - - 1048576 - 2147483647 - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - submenuAction: - - DisplayPretty - - YES - - - About DisplayPretty - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Preferences… - , - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Services - - 1048576 - 2147483647 - - - submenuAction: - - Services - - YES - - _NSServicesMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Hide DisplayPretty - h - 1048576 - 2147483647 - - - - - - Hide Others - h - 1572864 - 2147483647 - - - - - - Show All - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Quit DisplayPretty - q - 1048576 - 2147483647 - - - - - _NSAppleMenu - - - - - File - - 1048576 - 2147483647 - - - submenuAction: - - File - - YES - - - New - n - 1048576 - 2147483647 - - - - - - Open… - o - 1048576 - 2147483647 - - - - - - Open Recent - - 1048576 - 2147483647 - - - submenuAction: - - Open Recent - - YES - - - Clear Menu - - 1048576 - 2147483647 - - - - - _NSRecentDocumentsMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Close - w - 1048576 - 2147483647 - - - - - - Save - s - 1048576 - 2147483647 - - - - - - Save As… - S - 1179648 - 2147483647 - - - - - - Revert to Saved - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Page Setup... - P - 1179648 - 2147483647 - - - - - - - Print… - p - 1048576 - 2147483647 - - - - - - - - - Edit - - 1048576 - 2147483647 - - - submenuAction: - - Edit - - YES - - - Undo - z - 1048576 - 2147483647 - - - - - - Redo - Z - 1179648 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Cut - x - 1048576 - 2147483647 - - - - - - Copy - c - 1048576 - 2147483647 - - - - - - Paste - v - 1048576 - 2147483647 - - - - - - Paste and Match Style - V - 1572864 - 2147483647 - - - - - - Delete - - 1048576 - 2147483647 - - - - - - Select All - a - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Find - - 1048576 - 2147483647 - - - submenuAction: - - Find - - YES - - - Find… - f - 1048576 - 2147483647 - - - 1 - - - - Find Next - g - 1048576 - 2147483647 - - - 2 - - - - Find Previous - G - 1179648 - 2147483647 - - - 3 - - - - Use Selection for Find - e - 1048576 - 2147483647 - - - 7 - - - - Jump to Selection - j - 1048576 - 2147483647 - - - - - - - - - Spelling and Grammar - - 1048576 - 2147483647 - - - submenuAction: - - Spelling and Grammar - - YES - - - Show Spelling and Grammar - : - 1048576 - 2147483647 - - - - - - Check Document Now - ; - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Check Spelling While Typing - - 1048576 - 2147483647 - - - - - - Check Grammar With Spelling - - 1048576 - 2147483647 - - - - - - Correct Spelling Automatically - - 2147483647 - - - - - - - - - Substitutions - - 1048576 - 2147483647 - - - submenuAction: - - Substitutions - - YES - - - Show Substitutions - - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Smart Copy/Paste - f - 1048576 - 2147483647 - - - 1 - - - - Smart Quotes - g - 1048576 - 2147483647 - - - 2 - - - - Smart Dashes - - 2147483647 - - - - - - Smart Links - G - 1179648 - 2147483647 - - - 3 - - - - Text Replacement - - 2147483647 - - - - - - - - - Transformations - - 2147483647 - - - submenuAction: - - Transformations - - YES - - - Make Upper Case - - 2147483647 - - - - - - Make Lower Case - - 2147483647 - - - - - - Capitalize - - 2147483647 - - - - - - - - - Speech - - 1048576 - 2147483647 - - - submenuAction: - - Speech - - YES - - - Start Speaking - - 1048576 - 2147483647 - - - - - - Stop Speaking - - 1048576 - 2147483647 - - - - - - - - - - - - Format - - 2147483647 - - - submenuAction: - - Format - - YES - - - Font - - 2147483647 - - - submenuAction: - - Font - - YES - - - Show Fonts - t - 1048576 - 2147483647 - - - - - - Bold - b - 1048576 - 2147483647 - - - 2 - - - - Italic - i - 1048576 - 2147483647 - - - 1 - - - - Underline - u - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Bigger - + - 1048576 - 2147483647 - - - 3 - - - - Smaller - - - 1048576 - 2147483647 - - - 4 - - - - YES - YES - - - 2147483647 - - - - - - Kern - - 2147483647 - - - submenuAction: - - Kern - - YES - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Tighten - - 2147483647 - - - - - - Loosen - - 2147483647 - - - - - - - - - Ligature - - 2147483647 - - - submenuAction: - - Ligature - - YES - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Use All - - 2147483647 - - - - - - - - - Baseline - - 2147483647 - - - submenuAction: - - Baseline - - YES - - - Use Default - - 2147483647 - - - - - - Superscript - - 2147483647 - - - - - - Subscript - - 2147483647 - - - - - - Raise - - 2147483647 - - - - - - Lower - - 2147483647 - - - - - - - - - YES - YES - - - 2147483647 - - - - - - Show Colors - C - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Copy Style - c - 1572864 - 2147483647 - - - - - - Paste Style - v - 1572864 - 2147483647 - - - - - _NSFontMenu - - - - - Text - - 2147483647 - - - submenuAction: - - Text - - YES - - - Align Left - { - 1048576 - 2147483647 - - - - - - Center - | - 1048576 - 2147483647 - - - - - - Justify - - 2147483647 - - - - - - Align Right - } - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Writing Direction - - 2147483647 - - - submenuAction: - - Writing Direction - - YES - - - YES - Paragraph - - 2147483647 - - - - - - CURlZmF1bHQ - - 2147483647 - - - - - - CUxlZnQgdG8gUmlnaHQ - - 2147483647 - - - - - - CVJpZ2h0IHRvIExlZnQ - - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - YES - Selection - - 2147483647 - - - - - - CURlZmF1bHQ - - 2147483647 - - - - - - CUxlZnQgdG8gUmlnaHQ - - 2147483647 - - - - - - CVJpZ2h0IHRvIExlZnQ - - 2147483647 - - - - - - - - - YES - YES - - - 2147483647 - - - - - - Show Ruler - - 2147483647 - - - - - - Copy Ruler - c - 1310720 - 2147483647 - - - - - - Paste Ruler - v - 1310720 - 2147483647 - - - - - - - - - - - - View - - 1048576 - 2147483647 - - - submenuAction: - - View - - YES - - - Show Toolbar - t - 1572864 - 2147483647 - - - - - - Customize Toolbar… - - 1048576 - 2147483647 - - - - - - - - - Window - - 1048576 - 2147483647 - - - submenuAction: - - Window - - YES - - - Minimize - m - 1048576 - 2147483647 - - - - - - Zoom - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Bring All to Front - - 1048576 - 2147483647 - - - - - _NSWindowsMenu - - - - - Help - - 2147483647 - - - submenuAction: - - Help - - YES - - - DisplayPretty Help - ? - 1048576 - 2147483647 - - - - - _NSHelpMenu - - - - _NSMainMenu - - - 15 - 2 - {{335, 390}, {480, 360}} - 1954021376 - DisplayPretty - NSWindow - - - - 256 - - YES - - - 274 - - YES - - - 256 - - YES - - - 274 - {229, 320} - - - - YES - - -1805517311 - 272629760 - - - Monaco - 13 - 16 - - - YES - - 6 - System - textBackgroundColor - - 3 - MQA - - - - 6 - System - textColor - - 3 - MAA - - - - - - {229, 320} - - - - NSView - - - - 256 - - YES - - - 274 - {201, 320} - - - - YES - - -2073952767 - 272633856 - - - - YES - - - - - - {{239, 0}, {201, 320}} - - - - NSView - - - {{20, 20}, {440, 320}} - - - - YES - 3 - - - {{7, 11}, {480, 360}} - - - - - {{0, 0}, {1920, 1178}} - {1e+13, 1e+13} - - - DisplayPrettyAppDelegate - - - DisplayPrettyController - - - NSFontManager - - - - 268 - {696, 17} - YES - - 68288064 - 272630784 - Label - - LucidaGrande - 13 - 1044 - - - - 6 - System - controlColor - - 3 - MC42NjY2NjY2NjY3AA - - - - 6 - System - controlTextColor - - - - - - - - YES - - - performMiniaturize: - - - - 37 - - - - arrangeInFront: - - - - 39 - - - - print: - - - - 86 - - - - runPageLayout: - - - - 87 - - - - clearRecentDocuments: - - - - 127 - - - - orderFrontStandardAboutPanel: - - - - 142 - - - - performClose: - - - - 193 - - - - toggleContinuousSpellChecking: - - - - 222 - - - - undo: - - - - 223 - - - - copy: - - - - 224 - - - - checkSpelling: - - - - 225 - - - - paste: - - - - 226 - - - - stopSpeaking: - - - - 227 - - - - cut: - - - - 228 - - - - showGuessPanel: - - - - 230 - - - - redo: - - - - 231 - - - - selectAll: - - - - 232 - - - - startSpeaking: - - - - 233 - - - - delete: - - - - 235 - - - - performZoom: - - - - 240 - - - - performFindPanelAction: - - - - 241 - - - - centerSelectionInVisibleArea: - - - - 245 - - - - toggleGrammarChecking: - - - - 347 - - - - toggleSmartInsertDelete: - - - - 355 - - - - toggleAutomaticQuoteSubstitution: - - - - 356 - - - - toggleAutomaticLinkDetection: - - - - 357 - - - - saveDocument: - - - - 362 - - - - saveDocumentAs: - - - - 363 - - - - revertDocumentToSaved: - - - - 364 - - - - runToolbarCustomizationPalette: - - - - 365 - - - - toggleToolbarShown: - - - - 366 - - - - hide: - - - - 367 - - - - hideOtherApplications: - - - - 368 - - - - unhideAllApplications: - - - - 370 - - - - newDocument: - - - - 373 - - - - openDocument: - - - - 374 - - - - addFontTrait: - - - - 421 - - - - addFontTrait: - - - - 422 - - - - modifyFont: - - - - 423 - - - - orderFrontFontPanel: - - - - 424 - - - - modifyFont: - - - - 425 - - - - raiseBaseline: - - - - 426 - - - - lowerBaseline: - - - - 427 - - - - copyFont: - - - - 428 - - - - subscript: - - - - 429 - - - - superscript: - - - - 430 - - - - tightenKerning: - - - - 431 - - - - underline: - - - - 432 - - - - orderFrontColorPanel: - - - - 433 - - - - useAllLigatures: - - - - 434 - - - - loosenKerning: - - - - 435 - - - - pasteFont: - - - - 436 - - - - unscript: - - - - 437 - - - - useStandardKerning: - - - - 438 - - - - useStandardLigatures: - - - - 439 - - - - turnOffLigatures: - - - - 440 - - - - turnOffKerning: - - - - 441 - - - - terminate: - - - - 449 - - - - toggleAutomaticSpellingCorrection: - - - - 456 - - - - orderFrontSubstitutionsPanel: - - - - 458 - - - - toggleAutomaticDashSubstitution: - - - - 461 - - - - toggleAutomaticTextReplacement: - - - - 463 - - - - uppercaseWord: - - - - 464 - - - - capitalizeWord: - - - - 467 - - - - lowercaseWord: - - - - 468 - - - - pasteAsPlainText: - - - - 486 - - - - performFindPanelAction: - - - - 487 - - - - performFindPanelAction: - - - - 488 - - - - performFindPanelAction: - - - - 489 - - - - showHelp: - - - - 493 - - - - delegate - - - - 495 - - - - alignCenter: - - - - 518 - - - - pasteRuler: - - - - 519 - - - - toggleRuler: - - - - 520 - - - - alignRight: - - - - 521 - - - - copyRuler: - - - - 522 - - - - alignJustified: - - - - 523 - - - - alignLeft: - - - - 524 - - - - makeBaseWritingDirectionNatural: - - - - 525 - - - - makeBaseWritingDirectionLeftToRight: - - - - 526 - - - - makeBaseWritingDirectionRightToLeft: - - - - 527 - - - - makeTextWritingDirectionNatural: - - - - 528 - - - - makeTextWritingDirectionLeftToRight: - - - - 529 - - - - makeTextWritingDirectionRightToLeft: - - - - 530 - - - - window - - - - 532 - - - - _error - - - - 559 - - - - _source - - - - 583 - - - - formatText: - - - - 584 - - - - _formatted - - - - 590 - - - - - YES - - 0 - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - -3 - - - Application - - - 29 - - - YES - - - - - - - - - - - - 19 - - - YES - - - - - - 56 - - - YES - - - - - - 217 - - - YES - - - - - - 83 - - - YES - - - - - - 81 - - - YES - - - - - - - - - - - - - - - - 75 - - - - - 80 - - - - - 78 - - - - - 72 - - - - - 82 - - - - - 124 - - - YES - - - - - - 77 - - - - - 73 - - - - - 79 - - - - - 112 - - - - - 74 - - - - - 125 - - - YES - - - - - - 126 - - - - - 205 - - - YES - - - - - - - - - - - - - - - - - - - - 202 - - - - - 198 - - - - - 207 - - - - - 214 - - - - - 199 - - - - - 203 - - - - - 197 - - - - - 206 - - - - - 215 - - - - - 218 - - - YES - - - - - - 216 - - - YES - - - - - - 200 - - - YES - - - - - - - - - - - 219 - - - - - 201 - - - - - 204 - - - - - 220 - - - YES - - - - - - - - - - 213 - - - - - 210 - - - - - 221 - - - - - 208 - - - - - 209 - - - - - 57 - - - YES - - - - - - - - - - - - - - - - 58 - - - - - 134 - - - - - 150 - - - - - 136 - - - - - 144 - - - - - 129 - - - - - 143 - - - - - 236 - - - - - 131 - - - YES - - - - - - 149 - - - - - 145 - - - - - 130 - - - - - 24 - - - YES - - - - - - - - - 92 - - - - - 5 - - - - - 239 - - - - - 23 - - - - - 295 - - - YES - - - - - - 296 - - - YES - - - - - - - 297 - - - - - 298 - - - - - 211 - - - YES - - - - - - 212 - - - YES - - - - - - - 195 - - - - - 196 - - - - - 346 - - - - - 348 - - - YES - - - - - - 349 - - - YES - - - - - - - - - - - - 350 - - - - - 351 - - - - - 354 - - - - - 375 - - - YES - - - - - - 376 - - - YES - - - - - - - 377 - - - YES - - - - - - 388 - - - YES - - - - - - - - - - - - - - - - - - - - - 389 - - - - - 390 - - - - - 391 - - - - - 392 - - - - - 393 - - - - - 394 - - - - - 395 - - - - - 396 - - - - - 397 - - - YES - - - - - - 398 - - - YES - - - - - - 399 - - - YES - - - - - - 400 - - - - - 401 - - - - - 402 - - - - - 403 - - - - - 404 - - - - - 405 - - - YES - - - - - - - - - - 406 - - - - - 407 - - - - - 408 - - - - - 409 - - - - - 410 - - - - - 411 - - - YES - - - - - - - - 412 - - - - - 413 - - - - - 414 - - - - - 415 - - - YES - - - - - - - - - 416 - - - - - 417 - - - - - 418 - - - - - 419 - - - - - 420 - - - - - 450 - - - YES - - - - - - 451 - - - YES - - - - - - - - 452 - - - - - 453 - - - - - 454 - - - - - 457 - - - - - 459 - - - - - 460 - - - - - 462 - - - - - 465 - - - - - 466 - - - - - 485 - - - - - 490 - - - YES - - - - - - 491 - - - YES - - - - - - 492 - - - - - 494 - - - - - 496 - - - YES - - - - - - 497 - - - YES - - - - - - - - - - - - - - - 498 - - - - - 499 - - - - - 500 - - - - - 501 - - - - - 502 - - - - - 503 - - - YES - - - - - - 504 - - - - - 505 - - - - - 506 - - - - - 507 - - - - - 508 - - - YES - - - - - - - - - - - - - - 509 - - - - - 510 - - - - - 511 - - - - - 512 - - - - - 513 - - - - - 514 - - - - - 515 - - - - - 516 - - - - - 517 - - - - - 547 - - - YES - - - - - - 548 - - - - - 558 - - - - - 371 - - - YES - - - - - - 372 - - - YES - - - - - - 563 - - - YES - - - - - - - 565 - - - YES - - - - - - 588 - - - YES - - - - - - 589 - - - - - 564 - - - YES - - - - - - 577 - - - YES - - - - - - 578 - - - - - - - YES - - YES - -1.IBPluginDependency - -2.IBPluginDependency - -3.IBPluginDependency - 112.IBPluginDependency - 112.ImportedFromIB2 - 124.IBPluginDependency - 124.ImportedFromIB2 - 125.IBPluginDependency - 125.ImportedFromIB2 - 125.editorWindowContentRectSynchronizationRect - 126.IBPluginDependency - 126.ImportedFromIB2 - 129.IBPluginDependency - 129.ImportedFromIB2 - 130.IBPluginDependency - 130.ImportedFromIB2 - 130.editorWindowContentRectSynchronizationRect - 131.IBPluginDependency - 131.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 - 136.IBPluginDependency - 136.ImportedFromIB2 - 143.IBPluginDependency - 143.ImportedFromIB2 - 144.IBPluginDependency - 144.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 - 19.IBPluginDependency - 19.ImportedFromIB2 - 195.IBPluginDependency - 195.ImportedFromIB2 - 196.IBPluginDependency - 196.ImportedFromIB2 - 197.IBPluginDependency - 197.ImportedFromIB2 - 198.IBPluginDependency - 198.ImportedFromIB2 - 199.IBPluginDependency - 199.ImportedFromIB2 - 200.IBEditorWindowLastContentRect - 200.IBPluginDependency - 200.ImportedFromIB2 - 200.editorWindowContentRectSynchronizationRect - 201.IBPluginDependency - 201.ImportedFromIB2 - 202.IBPluginDependency - 202.ImportedFromIB2 - 203.IBPluginDependency - 203.ImportedFromIB2 - 204.IBPluginDependency - 204.ImportedFromIB2 - 205.IBEditorWindowLastContentRect - 205.IBPluginDependency - 205.ImportedFromIB2 - 205.editorWindowContentRectSynchronizationRect - 206.IBPluginDependency - 206.ImportedFromIB2 - 207.IBPluginDependency - 207.ImportedFromIB2 - 208.IBPluginDependency - 208.ImportedFromIB2 - 209.IBPluginDependency - 209.ImportedFromIB2 - 210.IBPluginDependency - 210.ImportedFromIB2 - 211.IBPluginDependency - 211.ImportedFromIB2 - 212.IBPluginDependency - 212.ImportedFromIB2 - 212.editorWindowContentRectSynchronizationRect - 213.IBPluginDependency - 213.ImportedFromIB2 - 214.IBPluginDependency - 214.ImportedFromIB2 - 215.IBPluginDependency - 215.ImportedFromIB2 - 216.IBPluginDependency - 216.ImportedFromIB2 - 217.IBPluginDependency - 217.ImportedFromIB2 - 218.IBPluginDependency - 218.ImportedFromIB2 - 219.IBPluginDependency - 219.ImportedFromIB2 - 220.IBEditorWindowLastContentRect - 220.IBPluginDependency - 220.ImportedFromIB2 - 220.editorWindowContentRectSynchronizationRect - 221.IBPluginDependency - 221.ImportedFromIB2 - 23.IBPluginDependency - 23.ImportedFromIB2 - 236.IBPluginDependency - 236.ImportedFromIB2 - 239.IBPluginDependency - 239.ImportedFromIB2 - 24.IBEditorWindowLastContentRect - 24.IBPluginDependency - 24.ImportedFromIB2 - 24.editorWindowContentRectSynchronizationRect - 29.IBEditorWindowLastContentRect - 29.IBPluginDependency - 29.ImportedFromIB2 - 29.WindowOrigin - 29.editorWindowContentRectSynchronizationRect - 295.IBPluginDependency - 296.IBEditorWindowLastContentRect - 296.IBPluginDependency - 296.editorWindowContentRectSynchronizationRect - 297.IBPluginDependency - 298.IBPluginDependency - 346.IBPluginDependency - 346.ImportedFromIB2 - 348.IBPluginDependency - 348.ImportedFromIB2 - 349.IBEditorWindowLastContentRect - 349.IBPluginDependency - 349.ImportedFromIB2 - 349.editorWindowContentRectSynchronizationRect - 350.IBPluginDependency - 350.ImportedFromIB2 - 351.IBPluginDependency - 351.ImportedFromIB2 - 354.IBPluginDependency - 354.ImportedFromIB2 - 371.IBEditorWindowLastContentRect - 371.IBNSWindowAutoPositionCentersHorizontal - 371.IBNSWindowAutoPositionCentersVertical - 371.IBPluginDependency - 371.IBWindowTemplateEditedContentRect - 371.NSWindowTemplate.visibleAtLaunch - 371.editorWindowContentRectSynchronizationRect - 372.IBPluginDependency - 375.IBPluginDependency - 376.IBEditorWindowLastContentRect - 376.IBPluginDependency - 377.IBPluginDependency - 388.IBEditorWindowLastContentRect - 388.IBPluginDependency - 389.IBPluginDependency - 390.IBPluginDependency - 391.IBPluginDependency - 392.IBPluginDependency - 393.IBPluginDependency - 394.IBPluginDependency - 395.IBPluginDependency - 396.IBPluginDependency - 397.IBPluginDependency - 398.IBPluginDependency - 399.IBPluginDependency - 400.IBPluginDependency - 401.IBPluginDependency - 402.IBPluginDependency - 403.IBPluginDependency - 404.IBPluginDependency - 405.IBPluginDependency - 406.IBPluginDependency - 407.IBPluginDependency - 408.IBPluginDependency - 409.IBPluginDependency - 410.IBPluginDependency - 411.IBPluginDependency - 412.IBPluginDependency - 413.IBPluginDependency - 414.IBPluginDependency - 415.IBPluginDependency - 416.IBPluginDependency - 417.IBPluginDependency - 418.IBPluginDependency - 419.IBPluginDependency - 420.IBPluginDependency - 450.IBPluginDependency - 451.IBEditorWindowLastContentRect - 451.IBPluginDependency - 452.IBPluginDependency - 453.IBPluginDependency - 454.IBPluginDependency - 457.IBPluginDependency - 459.IBPluginDependency - 460.IBPluginDependency - 462.IBPluginDependency - 465.IBPluginDependency - 466.IBPluginDependency - 485.IBPluginDependency - 490.IBPluginDependency - 491.IBEditorWindowLastContentRect - 491.IBPluginDependency - 492.IBPluginDependency - 494.IBPluginDependency - 496.IBPluginDependency - 497.IBEditorWindowLastContentRect - 497.IBPluginDependency - 498.IBPluginDependency - 499.IBPluginDependency - 5.IBPluginDependency - 5.ImportedFromIB2 - 500.IBPluginDependency - 501.IBPluginDependency - 502.IBPluginDependency - 503.IBPluginDependency - 504.IBPluginDependency - 505.IBPluginDependency - 506.IBPluginDependency - 507.IBPluginDependency - 508.IBEditorWindowLastContentRect - 508.IBPluginDependency - 509.IBPluginDependency - 510.IBPluginDependency - 511.IBPluginDependency - 512.IBPluginDependency - 513.IBPluginDependency - 514.IBPluginDependency - 515.IBPluginDependency - 516.IBPluginDependency - 517.IBPluginDependency - 547.IBPluginDependency - 548.IBPluginDependency - 558.IBPluginDependency - 56.IBPluginDependency - 56.ImportedFromIB2 - 563.IBPluginDependency - 564.IBPluginDependency - 565.IBPluginDependency - 57.IBEditorWindowLastContentRect - 57.IBPluginDependency - 57.ImportedFromIB2 - 57.editorWindowContentRectSynchronizationRect - 577.IBPluginDependency - 578.IBPluginDependency - 58.IBPluginDependency - 58.ImportedFromIB2 - 588.IBPluginDependency - 589.IBPluginDependency - 72.IBPluginDependency - 72.ImportedFromIB2 - 73.IBPluginDependency - 73.ImportedFromIB2 - 74.IBPluginDependency - 74.ImportedFromIB2 - 75.IBPluginDependency - 75.ImportedFromIB2 - 77.IBPluginDependency - 77.ImportedFromIB2 - 78.IBPluginDependency - 78.ImportedFromIB2 - 79.IBPluginDependency - 79.ImportedFromIB2 - 80.IBPluginDependency - 80.ImportedFromIB2 - 81.IBEditorWindowLastContentRect - 81.IBPluginDependency - 81.ImportedFromIB2 - 81.editorWindowContentRectSynchronizationRect - 82.IBPluginDependency - 82.ImportedFromIB2 - 83.IBPluginDependency - 83.ImportedFromIB2 - 92.IBPluginDependency - 92.ImportedFromIB2 - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{522, 812}, {146, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{436, 809}, {64, 6}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{753, 187}, {275, 113}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {275, 83}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{547, 180}, {254, 283}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{187, 434}, {243, 243}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {167, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{753, 217}, {238, 103}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {241, 103}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{654, 239}, {194, 73}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{525, 802}, {197, 73}} - {{380, 836}, {512, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - {74, 862} - {{6, 978}, {478, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - {{604, 269}, {231, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - {{475, 832}, {234, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{746, 287}, {220, 133}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {215, 63}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{380, 496}, {480, 360}} - - - com.apple.InterfaceBuilder.CocoaPlugin - {{380, 496}, {480, 360}} - - {{33, 99}, {480, 360}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{591, 420}, {83, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{523, 2}, {178, 283}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{753, 197}, {170, 63}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{725, 289}, {246, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{674, 260}, {204, 183}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{878, 180}, {164, 173}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{286, 129}, {275, 183}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{23, 794}, {245, 183}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{452, 109}, {196, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{145, 474}, {199, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - YES - - - - - - YES - - - - - 590 - - - - YES - - DisplayPrettyAppDelegate - NSObject - - window - NSWindow - - - window - - window - NSWindow - - - - IBProjectSource - ./Classes/DisplayPrettyAppDelegate.h - - - - DisplayPrettyController - NSObject - - formatText: - id - - - formatText: - - formatText: - id - - - - YES - - YES - _formatted - _source - - - YES - NSTextField - NSTextField - - - - YES - - YES - _formatted - _source - - - YES - - _formatted - NSTextField - - - _source - NSTextField - - - - - IBProjectSource - ./Classes/DisplayPrettyController.h - - - - NSDocument - - YES - - YES - printDocument: - revertDocumentToSaved: - runPageLayout: - saveDocument: - saveDocumentAs: - saveDocumentTo: - - - YES - id - id - id - id - id - id - - - - YES - - YES - printDocument: - revertDocumentToSaved: - runPageLayout: - saveDocument: - saveDocumentAs: - saveDocumentTo: - - - YES - - printDocument: - id - - - revertDocumentToSaved: - id - - - runPageLayout: - id - - - saveDocument: - id - - - saveDocumentAs: - id - - - saveDocumentTo: - id - - - - - IBProjectSource - ./Classes/NSDocument.h - - - - - 0 - IBCocoaFramework - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - - - YES - 3 - - YES - - YES - NSMenuCheckmark - NSMenuMixedState - - - YES - {9, 8} - {7, 2} - - - - diff --git a/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty/main.m b/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty/main.m deleted file mode 100644 index 3fa681c61e449..0000000000000 --- a/third_party/objc/json-framework/Examples/DisplayPretty/DisplayPretty/main.m +++ /dev/null @@ -1,14 +0,0 @@ -// -// main.m -// DisplayPretty -// -// Created by Stig Brautaset on 25/05/2011. -// Copyright 2011 Stig Brautaset. All rights reserved. -// - -#import - -int main(int argc, char *argv[]) -{ - return NSApplicationMain(argc, (const char **)argv); -} diff --git a/third_party/objc/json-framework/Examples/DisplayPretty/Readme.md b/third_party/objc/json-framework/Examples/DisplayPretty/Readme.md deleted file mode 100644 index 8e081af640261..0000000000000 --- a/third_party/objc/json-framework/Examples/DisplayPretty/Readme.md +++ /dev/null @@ -1,4 +0,0 @@ -## Display Pretty - -This example contains two text boxes. Input JSON into the left one, and -have it reformatted into the right one when you hit Enter. diff --git a/third_party/objc/json-framework/Examples/TweetStream/.gitignore b/third_party/objc/json-framework/Examples/TweetStream/.gitignore deleted file mode 100644 index 12cbb71a7d6c1..0000000000000 --- a/third_party/objc/json-framework/Examples/TweetStream/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.xcodeproj/* -!*.xcodeproj/project.pbxproj diff --git a/third_party/objc/json-framework/Examples/TweetStream/Readme.md b/third_party/objc/json-framework/Examples/TweetStream/Readme.md deleted file mode 100644 index 30ff894999452..0000000000000 --- a/third_party/objc/json-framework/Examples/TweetStream/Readme.md +++ /dev/null @@ -1,5 +0,0 @@ -# Tweet Stream - -This is an example of how to use json-framework to interact with [Twitter's streaming API](http://dev.twitter.com/pages/streaming_api). It uses the streaming capabilities of the parser to display an "endless" stream of tweets, despite performing only a single HTTP request. - -Additionally, this shows how you can use external linking to link to a checkout of json-framework in the same workspace, rather than copying the sources into your project. diff --git a/third_party/objc/json-framework/Examples/TweetStream/TweetStream.xcodeproj/project.pbxproj b/third_party/objc/json-framework/Examples/TweetStream/TweetStream.xcodeproj/project.pbxproj deleted file mode 100644 index 816a50126331b..0000000000000 --- a/third_party/objc/json-framework/Examples/TweetStream/TweetStream.xcodeproj/project.pbxproj +++ /dev/null @@ -1,413 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - BC70BE51138C025500638110 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC70BE50138C025500638110 /* UIKit.framework */; }; - BC70BE53138C025500638110 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC70BE52138C025500638110 /* Foundation.framework */; }; - BC70BE55138C025500638110 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC70BE54138C025500638110 /* CoreGraphics.framework */; }; - BC70BE5B138C025500638110 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = BC70BE59138C025500638110 /* InfoPlist.strings */; }; - BC70BE5E138C025500638110 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = BC70BE5D138C025500638110 /* main.m */; }; - BC70BE61138C025500638110 /* TweetStreamAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = BC70BE60138C025500638110 /* TweetStreamAppDelegate.m */; }; - BC70BE64138C025600638110 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC70BE62138C025500638110 /* MainWindow.xib */; }; - BC70BE67138C025600638110 /* TweetStreamViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC70BE66138C025600638110 /* TweetStreamViewController.m */; }; - BC70BE6A138C025600638110 /* TweetStreamViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC70BE68138C025600638110 /* TweetStreamViewController.xib */; }; - BCA5BD7D13BE00CF00223625 /* libsbjson-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BCA5BD7813BE00A700223625 /* libsbjson-ios.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - BCA5BD7313BE00A700223625 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BCA5BD6C13BE00A600223625 /* SBJson.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BC12323D1391D5CC00131607; - remoteInfo = SBJson; - }; - BCA5BD7513BE00A700223625 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BCA5BD6C13BE00A600223625 /* SBJson.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BC1232521391D5CC00131607; - remoteInfo = SBJsonTests; - }; - BCA5BD7713BE00A700223625 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BCA5BD6C13BE00A600223625 /* SBJson.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BCC2626913920FC7003D9994; - remoteInfo = "sbjson-ios"; - }; - BCA5BD7913BE00A700223625 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BCA5BD6C13BE00A600223625 /* SBJson.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BCC2627313920FC7003D9994; - remoteInfo = "sbjson-iosTests"; - }; - BCA5BD7B13BE00C900223625 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BCA5BD6C13BE00A600223625 /* SBJson.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BCC2626813920FC7003D9994; - remoteInfo = "sbjson-ios"; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - BC70BE4C138C025500638110 /* TweetStream.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TweetStream.app; sourceTree = BUILT_PRODUCTS_DIR; }; - BC70BE50138C025500638110 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - BC70BE52138C025500638110 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - BC70BE54138C025500638110 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - BC70BE58138C025500638110 /* TweetStream-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TweetStream-Info.plist"; sourceTree = ""; }; - BC70BE5A138C025500638110 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - BC70BE5C138C025500638110 /* TweetStream-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "TweetStream-Prefix.pch"; sourceTree = ""; }; - BC70BE5D138C025500638110 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - BC70BE5F138C025500638110 /* TweetStreamAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TweetStreamAppDelegate.h; sourceTree = ""; }; - BC70BE60138C025500638110 /* TweetStreamAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TweetStreamAppDelegate.m; sourceTree = ""; }; - BC70BE63138C025600638110 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainWindow.xib; sourceTree = ""; }; - BC70BE65138C025600638110 /* TweetStreamViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TweetStreamViewController.h; sourceTree = ""; }; - BC70BE66138C025600638110 /* TweetStreamViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TweetStreamViewController.m; sourceTree = ""; }; - BC70BE69138C025600638110 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/TweetStreamViewController.xib; sourceTree = ""; }; - BCA5BD6C13BE00A600223625 /* SBJson.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SBJson.xcodeproj; path = ../../SBJson.xcodeproj; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - BC70BE49138C025500638110 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - BCA5BD7D13BE00CF00223625 /* libsbjson-ios.a in Frameworks */, - BC70BE51138C025500638110 /* UIKit.framework in Frameworks */, - BC70BE53138C025500638110 /* Foundation.framework in Frameworks */, - BC70BE55138C025500638110 /* CoreGraphics.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - BC70BE41138C025500638110 = { - isa = PBXGroup; - children = ( - BCA5BD6C13BE00A600223625 /* SBJson.xcodeproj */, - BC70BE56138C025500638110 /* TweetStream */, - BC70BE4F138C025500638110 /* Frameworks */, - BC70BE4D138C025500638110 /* Products */, - ); - sourceTree = ""; - }; - BC70BE4D138C025500638110 /* Products */ = { - isa = PBXGroup; - children = ( - BC70BE4C138C025500638110 /* TweetStream.app */, - ); - name = Products; - sourceTree = ""; - }; - BC70BE4F138C025500638110 /* Frameworks */ = { - isa = PBXGroup; - children = ( - BC70BE50138C025500638110 /* UIKit.framework */, - BC70BE52138C025500638110 /* Foundation.framework */, - BC70BE54138C025500638110 /* CoreGraphics.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - BC70BE56138C025500638110 /* TweetStream */ = { - isa = PBXGroup; - children = ( - BC70BE5F138C025500638110 /* TweetStreamAppDelegate.h */, - BC70BE60138C025500638110 /* TweetStreamAppDelegate.m */, - BC70BE62138C025500638110 /* MainWindow.xib */, - BC70BE65138C025600638110 /* TweetStreamViewController.h */, - BC70BE66138C025600638110 /* TweetStreamViewController.m */, - BC70BE68138C025600638110 /* TweetStreamViewController.xib */, - BC70BE57138C025500638110 /* Supporting Files */, - ); - path = TweetStream; - sourceTree = ""; - }; - BC70BE57138C025500638110 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - BC70BE58138C025500638110 /* TweetStream-Info.plist */, - BC70BE59138C025500638110 /* InfoPlist.strings */, - BC70BE5C138C025500638110 /* TweetStream-Prefix.pch */, - BC70BE5D138C025500638110 /* main.m */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - BCA5BD6D13BE00A600223625 /* Products */ = { - isa = PBXGroup; - children = ( - BCA5BD7413BE00A700223625 /* SBJson.framework */, - BCA5BD7613BE00A700223625 /* SBJsonTests.octest */, - BCA5BD7813BE00A700223625 /* libsbjson-ios.a */, - BCA5BD7A13BE00A700223625 /* sbjson-iosTests.octest */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - BC70BE4B138C025500638110 /* TweetStream */ = { - isa = PBXNativeTarget; - buildConfigurationList = BC70BE6D138C025600638110 /* Build configuration list for PBXNativeTarget "TweetStream" */; - buildPhases = ( - BC70BE48138C025500638110 /* Sources */, - BC70BE49138C025500638110 /* Frameworks */, - BC70BE4A138C025500638110 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - BCA5BD7C13BE00C900223625 /* PBXTargetDependency */, - ); - name = TweetStream; - productName = TweetStream; - productReference = BC70BE4C138C025500638110 /* TweetStream.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - BC70BE43138C025500638110 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0420; - ORGANIZATIONNAME = "Stig Brautaset"; - }; - buildConfigurationList = BC70BE46138C025500638110 /* Build configuration list for PBXProject "TweetStream" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = BC70BE41138C025500638110; - productRefGroup = BC70BE4D138C025500638110 /* Products */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = BCA5BD6D13BE00A600223625 /* Products */; - ProjectRef = BCA5BD6C13BE00A600223625 /* SBJson.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - BC70BE4B138C025500638110 /* TweetStream */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - BCA5BD7413BE00A700223625 /* SBJson.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = SBJson.framework; - remoteRef = BCA5BD7313BE00A700223625 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - BCA5BD7613BE00A700223625 /* SBJsonTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = SBJsonTests.octest; - remoteRef = BCA5BD7513BE00A700223625 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - BCA5BD7813BE00A700223625 /* libsbjson-ios.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libsbjson-ios.a"; - remoteRef = BCA5BD7713BE00A700223625 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - BCA5BD7A13BE00A700223625 /* sbjson-iosTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = "sbjson-iosTests.octest"; - remoteRef = BCA5BD7913BE00A700223625 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - BC70BE4A138C025500638110 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BC70BE5B138C025500638110 /* InfoPlist.strings in Resources */, - BC70BE64138C025600638110 /* MainWindow.xib in Resources */, - BC70BE6A138C025600638110 /* TweetStreamViewController.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - BC70BE48138C025500638110 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BC70BE5E138C025500638110 /* main.m in Sources */, - BC70BE61138C025500638110 /* TweetStreamAppDelegate.m in Sources */, - BC70BE67138C025600638110 /* TweetStreamViewController.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - BCA5BD7C13BE00C900223625 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "sbjson-ios"; - targetProxy = BCA5BD7B13BE00C900223625 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - BC70BE59138C025500638110 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - BC70BE5A138C025500638110 /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - BC70BE62138C025500638110 /* MainWindow.xib */ = { - isa = PBXVariantGroup; - children = ( - BC70BE63138C025600638110 /* en */, - ); - name = MainWindow.xib; - sourceTree = ""; - }; - BC70BE68138C025600638110 /* TweetStreamViewController.xib */ = { - isa = PBXVariantGroup; - children = ( - BC70BE69138C025600638110 /* en */, - ); - name = TweetStreamViewController.xib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - BC70BE6B138C025600638110 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvmgcc42; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.3; - SDKROOT = iphoneos; - }; - name = Debug; - }; - BC70BE6C138C025600638110 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_VERSION = com.apple.compilers.llvmgcc42; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.3; - OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; - SDKROOT = iphoneos; - }; - name = Release; - }; - BC70BE6E138C025600638110 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ENABLE_OBJC_ARC = YES; - COPY_PHASE_STRIP = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)\"", - "\"$(SRCROOT)/../../../Library/Developer/Xcode/DerivedData/Examples-atkbdjffzwdsgfgrgywggtsrhcwl/Build/Products/Debug\"", - ); - GCC_DYNAMIC_NO_PIC = NO; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "TweetStream/TweetStream-Prefix.pch"; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - INFOPLIST_FILE = "TweetStream/TweetStream-Info.plist"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)\"", - ); - OTHER_LDFLAGS = ""; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - BC70BE6F138C025600638110 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ENABLE_OBJC_ARC = YES; - COPY_PHASE_STRIP = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)\"", - "\"$(SRCROOT)/../../../Library/Developer/Xcode/DerivedData/Examples-atkbdjffzwdsgfgrgywggtsrhcwl/Build/Products/Debug\"", - ); - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "TweetStream/TweetStream-Prefix.pch"; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - INFOPLIST_FILE = "TweetStream/TweetStream-Info.plist"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)\"", - ); - OTHER_LDFLAGS = ""; - PRODUCT_NAME = "$(TARGET_NAME)"; - VALIDATE_PRODUCT = YES; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - BC70BE46138C025500638110 /* Build configuration list for PBXProject "TweetStream" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BC70BE6B138C025600638110 /* Debug */, - BC70BE6C138C025600638110 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - BC70BE6D138C025600638110 /* Build configuration list for PBXNativeTarget "TweetStream" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BC70BE6E138C025600638110 /* Debug */, - BC70BE6F138C025600638110 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = BC70BE43138C025500638110 /* Project object */; -} diff --git a/third_party/objc/json-framework/Examples/TweetStream/TweetStream/TweetStream-Info.plist b/third_party/objc/json-framework/Examples/TweetStream/TweetStream/TweetStream-Info.plist deleted file mode 100644 index 1a12571778291..0000000000000 --- a/third_party/objc/json-framework/Examples/TweetStream/TweetStream/TweetStream-Info.plist +++ /dev/null @@ -1,38 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - org.brautaset.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - NSMainNibFile - MainWindow - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/third_party/objc/json-framework/Examples/TweetStream/TweetStream/TweetStream-Prefix.pch b/third_party/objc/json-framework/Examples/TweetStream/TweetStream/TweetStream-Prefix.pch deleted file mode 100644 index 55f74f849da91..0000000000000 --- a/third_party/objc/json-framework/Examples/TweetStream/TweetStream/TweetStream-Prefix.pch +++ /dev/null @@ -1,14 +0,0 @@ -// -// Prefix header for all source files of the 'TweetStream' target in the 'TweetStream' project -// - -#import - -#ifndef __IPHONE_3_0 -#warning "This project uses features only available in iPhone SDK 3.0 and later." -#endif - -#ifdef __OBJC__ - #import - #import -#endif diff --git a/third_party/objc/json-framework/Examples/TweetStream/TweetStream/TweetStreamAppDelegate.h b/third_party/objc/json-framework/Examples/TweetStream/TweetStream/TweetStreamAppDelegate.h deleted file mode 100644 index 43732ab3d4587..0000000000000 --- a/third_party/objc/json-framework/Examples/TweetStream/TweetStream/TweetStreamAppDelegate.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// TweetStreamAppDelegate.h -// TweetStream -// -// Created by Stig Brautaset on 24/05/2011. -// Copyright 2011 Stig Brautaset. All rights reserved. -// - -#import - -@class TweetStreamViewController; - -@interface TweetStreamAppDelegate : NSObject { - -} - -@property (nonatomic, retain) IBOutlet UIWindow *window; - -@property (nonatomic, retain) IBOutlet TweetStreamViewController *viewController; - -@end diff --git a/third_party/objc/json-framework/Examples/TweetStream/TweetStream/TweetStreamAppDelegate.m b/third_party/objc/json-framework/Examples/TweetStream/TweetStream/TweetStreamAppDelegate.m deleted file mode 100644 index 3e7343098f977..0000000000000 --- a/third_party/objc/json-framework/Examples/TweetStream/TweetStream/TweetStreamAppDelegate.m +++ /dev/null @@ -1,69 +0,0 @@ -// -// TweetStreamAppDelegate.m -// TweetStream -// -// Created by Stig Brautaset on 24/05/2011. -// Copyright 2011 Stig Brautaset. All rights reserved. -// - -#import "TweetStreamAppDelegate.h" - -#import "TweetStreamViewController.h" - -@implementation TweetStreamAppDelegate - - -@synthesize window=_window; - -@synthesize viewController=_viewController; - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - // Override point for customization after application launch. - - self.window.rootViewController = self.viewController; - [self.window makeKeyAndVisible]; - return YES; -} - -- (void)applicationWillResignActive:(UIApplication *)application -{ - /* - Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. - */ -} - -- (void)applicationDidEnterBackground:(UIApplication *)application -{ - /* - Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. - */ -} - -- (void)applicationWillEnterForeground:(UIApplication *)application -{ - /* - Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. - */ -} - -- (void)applicationDidBecomeActive:(UIApplication *)application -{ - /* - Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. - */ -} - -- (void)applicationWillTerminate:(UIApplication *)application -{ - /* - Called when the application is about to terminate. - Save data if appropriate. - See also applicationDidEnterBackground:. - */ -} - - -@end diff --git a/third_party/objc/json-framework/Examples/TweetStream/TweetStream/TweetStreamViewController.h b/third_party/objc/json-framework/Examples/TweetStream/TweetStream/TweetStreamViewController.h deleted file mode 100644 index 6ed1d6bf46232..0000000000000 --- a/third_party/objc/json-framework/Examples/TweetStream/TweetStream/TweetStreamViewController.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// TweetStreamViewController.h -// TweetStream -// -// Created by Stig Brautaset on 24/05/2011. -// Copyright 2011 Stig Brautaset. All rights reserved. -// - -#import - -@class SBJsonStreamParser; -@class SBJsonStreamParserAdapter; - -@interface TweetStreamViewController : UIViewController { - IBOutlet UITextField *username; - IBOutlet UITextField *password; - IBOutlet UITextView *tweet; - - NSURLConnection *theConnection; - SBJsonStreamParser *parser; - SBJsonStreamParserAdapter *adapter; -} - -- (IBAction)go; - -@end diff --git a/third_party/objc/json-framework/Examples/TweetStream/TweetStream/TweetStreamViewController.m b/third_party/objc/json-framework/Examples/TweetStream/TweetStream/TweetStreamViewController.m deleted file mode 100644 index 550a7f31f89a9..0000000000000 --- a/third_party/objc/json-framework/Examples/TweetStream/TweetStream/TweetStreamViewController.m +++ /dev/null @@ -1,132 +0,0 @@ -// -// TweetStreamViewController.m -// TweetStream -// -// Created by Stig Brautaset on 24/05/2011. -// Copyright 2011 Stig Brautaset. All rights reserved. -// - -#import "TweetStreamViewController.h" -#import - -@interface TweetStreamViewController () -@end - -@implementation TweetStreamViewController - - -- (void)didReceiveMemoryWarning -{ - // Releases the view if it doesn't have a superview. - [super didReceiveMemoryWarning]; - - // Release any cached data, images, etc that aren't in use. -} - -#pragma mark - View lifecycle - -// Implement viewDidLoad to do additional setup after loading the view, typically from a nib. -- (void)viewDidLoad { - [super viewDidLoad]; -} - -- (void)viewDidUnload { - [super viewDidUnload]; -} - -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation -{ - // Return YES for supported orientations - return (interfaceOrientation == UIInterfaceOrientationPortrait); -} - -#pragma mark Actions - -- (IBAction)go { - [username resignFirstResponder]; - [password resignFirstResponder]; - - // We don't want *all* the individual messages from the - // SBJsonStreamParser, just the top-level objects. The stream - // parser adapter exists for this purpose. - adapter = [[SBJsonStreamParserAdapter alloc] init]; - - // Set ourselves as the delegate, so we receive the messages - // from the adapter. - adapter.delegate = self; - - // Create a new stream parser.. - parser = [[SBJsonStreamParser alloc] init]; - - // .. and set our adapter as its delegate. - parser.delegate = adapter; - - // Normally it's an error if JSON is followed by anything but - // whitespace. Setting this means that the parser will be - // expecting the stream to contain multiple whitespace-separated - // JSON documents. - parser.supportMultipleDocuments = YES; - - NSString *url = @"https://stream.twitter.com/1/statuses/sample.json"; - - NSURLRequest *theRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:url] - cachePolicy:NSURLRequestUseProtocolCachePolicy - timeoutInterval:60.0]; - - theConnection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self]; -} - -#pragma mark SBJsonStreamParserAdapterDelegate methods - -- (void)parser:(SBJsonStreamParser *)parser foundArray:(NSArray *)array { - [NSException raise:@"unexpected" format:@"Should not get here"]; -} - -- (void)parser:(SBJsonStreamParser *)parser foundObject:(NSDictionary *)dict { - tweet.text = [dict objectForKey:@"text"]; -} - -#pragma mark NSURLConnectionDelegate methods - -- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { - NSLog(@"Connection didReceiveResponse: %@ - %@", response, [response MIMEType]); -} - -- (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge { - NSLog(@"Connection didReceiveAuthenticationChallenge: %@", challenge); - - NSURLCredential *credential = [NSURLCredential credentialWithUser:username.text - password:password.text - persistence:NSURLCredentialPersistenceForSession]; - - [[challenge sender] useCredential:credential forAuthenticationChallenge:challenge]; -} - -- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { - NSLog(@"Connection didReceiveData of length: %u", data.length); - - // Parse the new chunk of data. The parser will append it to - // its internal buffer, then parse from where it left off in - // the last chunk. - SBJsonStreamParserStatus status = [parser parse:data]; - - if (status == SBJsonStreamParserError) { - tweet.text = [NSString stringWithFormat: @"The parser encountered an error: %@", parser.error]; - NSLog(@"Parser error: %@", parser.error); - - } else if (status == SBJsonStreamParserWaitingForData) { - NSLog(@"Parser waiting for more data"); - } -} - -- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { - NSLog(@"Connection failed! Error - %@ %@", - [error localizedDescription], - [[error userInfo] objectForKey:NSURLErrorFailingURLStringErrorKey]); -} - -- (void)connectionDidFinishLoading:(NSURLConnection *)connection { -} - - -@end diff --git a/third_party/objc/json-framework/Examples/TweetStream/TweetStream/en.lproj/InfoPlist.strings b/third_party/objc/json-framework/Examples/TweetStream/TweetStream/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28ff8f86a..0000000000000 --- a/third_party/objc/json-framework/Examples/TweetStream/TweetStream/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/third_party/objc/json-framework/Examples/TweetStream/TweetStream/en.lproj/MainWindow.xib b/third_party/objc/json-framework/Examples/TweetStream/TweetStream/en.lproj/MainWindow.xib deleted file mode 100644 index d5faea339508e..0000000000000 --- a/third_party/objc/json-framework/Examples/TweetStream/TweetStream/en.lproj/MainWindow.xib +++ /dev/null @@ -1,444 +0,0 @@ - - - - 1024 - 10D571 - 786 - 1038.29 - 460.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 112 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - IBCocoaTouchFramework - - - TweetStreamViewController - - - 1 - - IBCocoaTouchFramework - NO - - - - 292 - {320, 480} - - 1 - MSAxIDEAA - - NO - NO - - IBCocoaTouchFramework - YES - - - - - YES - - - delegate - - - - 4 - - - - viewController - - - - 11 - - - - window - - - - 14 - - - - - YES - - 0 - - - - - - -1 - - - File's Owner - - - 3 - - - TweetStream App Delegate - - - -2 - - - - - 10 - - - - - 12 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 10.CustomClassName - 10.IBEditorWindowLastContentRect - 10.IBPluginDependency - 12.IBEditorWindowLastContentRect - 12.IBPluginDependency - 3.CustomClassName - 3.IBPluginDependency - - - YES - UIApplication - UIResponder - TweetStreamViewController - {{234, 376}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - {{525, 346}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - TweetStreamAppDelegate - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - YES - - - - - YES - - - YES - - - - 15 - - - - YES - - UIWindow - UIView - - IBUserSource - - - - - TweetStreamAppDelegate - NSObject - - YES - - YES - viewController - window - - - YES - TweetStreamViewController - UIWindow - - - - YES - - YES - viewController - window - - - YES - - viewController - TweetStreamViewController - - - window - UIWindow - - - - - IBProjectSource - TweetStreamAppDelegate.h - - - - TweetStreamAppDelegate - NSObject - - IBUserSource - - - - - TweetStreamViewController - UIViewController - - IBProjectSource - TweetStreamViewController.h - - - - - YES - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UIApplication - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIApplication.h - - - - UIResponder - NSObject - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UIPopoverController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UISplitViewController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - UIWindow - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIWindow.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - TweetStream.xcodeproj - 3 - 112 - - diff --git a/third_party/objc/json-framework/Examples/TweetStream/TweetStream/en.lproj/TweetStreamViewController.xib b/third_party/objc/json-framework/Examples/TweetStream/TweetStream/en.lproj/TweetStreamViewController.xib deleted file mode 100644 index 89aa803ab897b..0000000000000 --- a/third_party/objc/json-framework/Examples/TweetStream/TweetStream/en.lproj/TweetStreamViewController.xib +++ /dev/null @@ -1,384 +0,0 @@ - - - - 1056 - 10J869 - 1306 - 1038.35 - 461.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 301 - - - YES - IBUITextView - IBUIButton - IBUIView - IBUITextField - IBProxyObject - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - - YES - - - 292 - {{20, 20}, {280, 31}} - - - - NO - YES - IBCocoaTouchFramework - 0 - - 3 - Username - - 3 - MAA - - 2 - - - - Helvetica - 12 - 16 - - YES - 17 - - IBCocoaTouchFramework - - - - - 292 - {{20, 59}, {280, 31}} - - - - NO - YES - IBCocoaTouchFramework - 0 - - 3 - Password - - 3 - MAA - - - - YES - 17 - - YES - YES - IBCocoaTouchFramework - - - - - 292 - {{124, 98}, {72, 37}} - - - - NO - IBCocoaTouchFramework - 0 - 0 - - Helvetica-Bold - 15 - 16 - - 1 - Go! - - 3 - MQA - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - 3 - MC41AA - - - - - 292 - {{20, 143}, {280, 297}} - - - - - 1 - MSAxIDEAA - - YES - YES - IBCocoaTouchFramework - Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda. - - 2 - IBCocoaTouchFramework - - - - {{0, 20}, {320, 460}} - - - - - 3 - MC43NQA - - - NO - - IBCocoaTouchFramework - - - - - YES - - - view - - - - 7 - - - - password - - - - 18 - - - - tweet - - - - 19 - - - - username - - - - 20 - - - - go - - - 7 - - 21 - - - - - YES - - 0 - - - - - - -1 - - - File's Owner - - - -2 - - - - - 6 - - - YES - - - - - - - - - 9 - - - - - 10 - - - - - 11 - - - - - 12 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 10.IBPluginDependency - 11.IBPluginDependency - 12.IBPluginDependency - 6.IBEditorWindowLastContentRect - 6.IBPluginDependency - 9.IBPluginDependency - - - YES - TweetStreamViewController - UIResponder - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - {{239, 654}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - - - - YES - - - - - 21 - - - - YES - - TweetStreamViewController - UIViewController - - go - id - - - go - - go - id - - - - YES - - YES - password - tweet - username - - - YES - UITextField - UITextView - UITextField - - - - YES - - YES - password - tweet - username - - - YES - - password - UITextField - - - tweet - UITextView - - - username - UITextField - - - - - IBProjectSource - ./Classes/TweetStreamViewController.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - 3 - 301 - - diff --git a/third_party/objc/json-framework/Examples/TweetStream/TweetStream/main.m b/third_party/objc/json-framework/Examples/TweetStream/TweetStream/main.m deleted file mode 100644 index 3e9904325c2d9..0000000000000 --- a/third_party/objc/json-framework/Examples/TweetStream/TweetStream/main.m +++ /dev/null @@ -1,20 +0,0 @@ -// -// main.m -// TweetStream -// -// Created by Stig Brautaset on 24/05/2011. -// Copyright 2011 Stig Brautaset. All rights reserved. -// - -#import - -#import "TweetStreamAppDelegate.h" - -int main(int argc, char *argv[]) -{ - int retVal = 0; - @autoreleasepool { - retVal = UIApplicationMain(argc, argv, nil, NSStringFromClass([TweetStreamAppDelegate class])); - } - return retVal; -} diff --git a/third_party/objc/json-framework/INSTALL.md b/third_party/objc/json-framework/INSTALL.md deleted file mode 100644 index 5e357272f6e9b..0000000000000 --- a/third_party/objc/json-framework/INSTALL.md +++ /dev/null @@ -1,34 +0,0 @@ -Installation -============ - -The simplest way to start using JSON in your application is to copy all -the source files (the contents of the `Classes` folder) into your own -Xcode project. - -1. In the Finder, navigate to the distribution's folder -1. Navigate into the `Classes` folder. -1. Select all the files and drag-and-drop them into your Xcode project. -1. Tick the **Copy items into destination group's folder** option. -1. Use `#import "SBJson.h"` in your source files. - -That should be it. Now create that Twitter client! - -Upgrading ---------- - -If you're upgrading from a previous version, make sure you're deleting -the old SBJson classes first, moving all the files to Trash. - - -Linking rather than copying ---------------------------- - -Copying the SBJson classes into your project isn't the only way to use -this framework. With Xcode 4's workspaces it has become much simpler to -link to dependant projects. The examples in the distribution link to the -iOS library and Mac framework, respectively. Des Hartman wrote [a blog -post with step-by-step instructions for iOS][link-ios]. - -[link-ios]: http://deshartman.wordpress.com/2011/09/02/configuring-sbjson-framework-for-xcode-4-2/ - - diff --git a/third_party/objc/json-framework/InstallDocumentation.sh b/third_party/objc/json-framework/InstallDocumentation.sh deleted file mode 100755 index 90e0912e1102b..0000000000000 --- a/third_party/objc/json-framework/InstallDocumentation.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/sh -# -# Running this script installs the SBJson documentation so that it -# integrates with Xcode. It requires Doxygen to be installed. -# -# See also: -# http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# - -set -x - -VERSION=$(agvtool mvers -terse1) -TMPDIR=$(mktemp -d /tmp/$(basename $0).XXXXXX) || exit 1 -DOXYFILE=$TMPDIR/doxygen.config -DOXYGEN=/Applications/Doxygen.app/Contents/Resources/doxygen -PROJECT=$(echo *.xcodeproj | cut -d. -f1) - -if ! test -x $DOXYGEN ; then - echo "*** Install Doxygen to get documentation generated for you automatically ***" - exit 1 -fi - -# Create a doxygen configuration file with only the settings we care -# about -$DOXYGEN -g - > $DOXYFILE - -cat <> $DOXYFILE - -PROJECT_NAME = $PROJECT -PROJECT_NUMBER = $VERSION -OUTPUT_DIRECTORY = $TMPDIR -INPUT = Classes -FILE_PATTERNS = *.h *.m - -HIDE_UNDOC_MEMBERS = YES -HIDE_UNDOC_CLASSES = YES -HIDE_UNDOC_RELATIONS = YES -REPEAT_BRIEF = NO -CASE_SENSE_NAMES = YES -INLINE_INHERITED_MEMB = YES -SHOW_FILES = NO -SHOW_INCLUDE_FILES = NO -GENERATE_LATEX = NO -SEARCHENGINE = NO -GENERATE_HTML = YES -GENERATE_DOCSET = YES -DOCSET_FEEDNAME = "$PROJECT API Documentation" -DOCSET_BUNDLE_ID = org.brautaset.$PROJECT - -EOF - -# Run doxygen on the updated config file. -# doxygen creates a Makefile that does most of the heavy lifting. -$DOXYGEN $DOXYFILE - -# make will invoke docsetutil. Take a look at the Makefile to see how this is done. -make -C $TMPDIR/html install - -# Construct a temporary applescript file to tell Xcode to load a -# docset. -cat < $TMPDIR/loadDocSet.scpt -tell application "Xcode" - load documentation set with path "/Users/$USER/Library/Developer/Shared/Documentation/DocSets/org.brautaset.${PROJECT}.docset/" -end tell -EOF - -# Run the load-docset applescript command. -osascript $TMPDIR/loadDocSet.scpt diff --git a/third_party/objc/json-framework/LICENSE.md b/third_party/objc/json-framework/LICENSE.md deleted file mode 100644 index 2e3ec2035ff52..0000000000000 --- a/third_party/objc/json-framework/LICENSE.md +++ /dev/null @@ -1,24 +0,0 @@ -Copyright (C) 2007-2011 Stig Brautaset. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. -* Neither the name of the author nor the names of its contributors may be used - to endorse or promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/third_party/objc/json-framework/NEWS.md b/third_party/objc/json-framework/NEWS.md deleted file mode 100644 index 90e8e1eb55320..0000000000000 --- a/third_party/objc/json-framework/NEWS.md +++ /dev/null @@ -1,107 +0,0 @@ -3.1.1 (August 4th, 2012) -======================== - -Bugfix release. This release is special in that it mainly contains code by other people. Thanks guys! - -* Fix bug that could result in a long long overflow (Ole André Vadla RavnÃ¥s) -* Make SINGLETON thread safe (Alen Zhou) -* Updated .gitattributes to say that tests are binary files (Phill Baker) -* Fix string formatter warning in new XCode (Andy Brett) -* Fix issue that could lead to "bad access" or zombie errors (jonkean) -* Update links to API docs - - -3.1 (March 26th, 2012) -===================== - -Automatic Reference Counting ----------------------------- - -3.1 requires Xcode 4.2 to build, because previous versions did -not have ARC support. If you can't use Xcode 4.2, or for some reason -can't use ARC, you need to stick with version 3.0. - -To make this move simpler I decided to move to 64-bit only & remove -instance variables for properties. - -Miscellaneous -------------- - -* Added an optional comparator that is used when sorting keys. -* Be more memory-efficient when parsing long strings containing escaped characters. -* Add a Workspace that includes the sample projects, for ease of browsing. -* Report error for numbers with exponents outside range of -128 to 127. - - -3.0 (June 18th, 2011) -===================== - -JSON Stream Support -------------------- - -We now support parsing of documents split into several NSData chunks, -like those returned by *NSURLConnection*. This means you can start -parsing a JSON document before it is fully downloaded. Depending how you -configure the delegates you can chose to have the entire document -delivered to your process when it's finished parsing, or delivered -bit-by-bit as records on a particular level finishes downloading. For -more details see *SBJsonStreamParser* and *SBJsonStreamParserAdapter* in -the [API docs][api]. - -There is also support for *writing to* JSON streams. This means you can -write huge JSON documents to disk, or an HTTP destination, without -having to hold the entire structure in memory. You can use this to -generate a stream of tick data for a stock trading simulation, for -example. For more information see *SBJsonStreamWriter* in the [API -docs][api]. - -Parse and write UTF8-encoded NSData ------------------------------------ - -The internals of *SBJsonParser* and *SBJsonWriter* have been rewritten -to be NSData based. It is no longer necessary to convert data returned -by NSURLConnection into an NSString before feeding it to the parser. The -old NSString-oriented API methods still exists, but now converts their -inputs to NSData objects and delegates to the new methods. - -Project renamed to SBJson -------------------------- - -The project was renamed to avoid clashing with Apple's private -JSON.framework. (And to make it easier to Google for.) - -* If you copy the classes into your project then all you need to update -is to change the header inclusion from `#import "JSON.h"` to `#import -"SBJson.h"`. -* If you link to the library rather than copy the classes you have to -change the library you link to. On the Mac `JSON.framework` became -`SBJson.framework`. On iOS `libjson.a` became `libsbjson-ios.a`. In both -cases you now have to `#import ` in your code. - -API documentation integrated with Xcode ---------------------------------------- - -The *InstallDocumentation.sh* script allows you to generate [API -documentation][api] from the source and install it into Xcode, so it's -always at your fingertips. (This script requires [Doxygen][] to be -installed.) After running the script from the top-level directory, open -Xcode's documentation window and search for SBJson. (You might have to -close and re-open Xcode for the changes to take effect.) - -[api]: http://stig.github.com/json-framework/api/3.0/ -[Doxygen]: http://doxygen.org - -Example Projects ----------------- - -These can be found in the Examples folder in the distribution. - -* TweetStream: An exampleshowing how to use the new streaming -functionality to interact with Twitter's multi-document streams. This -also shows how to link to the iOS static lib rather than having to copy -the classes into your project. -* DisplayPretty: A small Mac example project showing how to link to an -external JSON framework rather than copying the sources into your -project. This is a fully functional (though simplistic) application that -takes JSON input from a text field and presents it nicely formatted into -another text field. diff --git a/third_party/objc/json-framework/SBJson.xcodeproj/project.pbxproj b/third_party/objc/json-framework/SBJson.xcodeproj/project.pbxproj deleted file mode 100644 index 92ec9e87ac892..0000000000000 --- a/third_party/objc/json-framework/SBJson.xcodeproj/project.pbxproj +++ /dev/null @@ -1,969 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 3BB5955C14EAA4B8001BE91E /* SortedFormatTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BB5955B14EAA4B8001BE91E /* SortedFormatTest.m */; }; - 3BB5955D14EAA4B8001BE91E /* SortedFormatTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BB5955B14EAA4B8001BE91E /* SortedFormatTest.m */; }; - BC12324B1391D5CC00131607 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = BC1232491391D5CC00131607 /* InfoPlist.strings */; }; - BC1232561391D5CC00131607 /* SBJson.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC12323D1391D5CC00131607 /* SBJson.framework */; }; - BC12325C1391D5CC00131607 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = BC12325A1391D5CC00131607 /* InfoPlist.strings */; }; - BC417FF413A1008F00C8BC49 /* ErrorTest.m in Sources */ = {isa = PBXBuildFile; fileRef = BC88522B1391D6DD00370E55 /* ErrorTest.m */; }; - BC417FF513A1008F00C8BC49 /* FormatTest.m in Sources */ = {isa = PBXBuildFile; fileRef = BC88522C1391D6DD00370E55 /* FormatTest.m */; }; - BC417FF613A1008F00C8BC49 /* JsonCheckerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = BC88522D1391D6DD00370E55 /* JsonCheckerTest.m */; }; - BC417FF813A1008F00C8BC49 /* JsonTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = BC88522F1391D6DD00370E55 /* JsonTestCase.m */; }; - BC417FF913A1008F00C8BC49 /* ProxyTest.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8852301391D6DD00370E55 /* ProxyTest.m */; }; - BC417FFA13A1008F00C8BC49 /* RoundTripTest.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8852311391D6DD00370E55 /* RoundTripTest.m */; }; - BC417FFB13A1008F00C8BC49 /* StreamParserIntegrationTest.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8852971391D6DE00370E55 /* StreamParserIntegrationTest.m */; }; - BC417FFC13A1008F00C8BC49 /* WriterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8852981391D6DE00370E55 /* WriterTest.m */; }; - BC88513F1391D6CD00370E55 /* NSObject+SBJson.h in Headers */ = {isa = PBXBuildFile; fileRef = BC8851251391D6CD00370E55 /* NSObject+SBJson.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BC8851401391D6CD00370E55 /* NSObject+SBJson.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8851261391D6CD00370E55 /* NSObject+SBJson.m */; }; - BC8851411391D6CD00370E55 /* SBJson.h in Headers */ = {isa = PBXBuildFile; fileRef = BC8851271391D6CD00370E55 /* SBJson.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BC8851421391D6CD00370E55 /* SBJsonParser.h in Headers */ = {isa = PBXBuildFile; fileRef = BC8851281391D6CD00370E55 /* SBJsonParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BC8851431391D6CD00370E55 /* SBJsonParser.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8851291391D6CD00370E55 /* SBJsonParser.m */; }; - BC8851441391D6CD00370E55 /* SBJsonStreamParser.h in Headers */ = {isa = PBXBuildFile; fileRef = BC88512A1391D6CD00370E55 /* SBJsonStreamParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BC8851451391D6CD00370E55 /* SBJsonStreamParser.m in Sources */ = {isa = PBXBuildFile; fileRef = BC88512B1391D6CD00370E55 /* SBJsonStreamParser.m */; }; - BC8851461391D6CD00370E55 /* SBJsonStreamParserAccumulator.h in Headers */ = {isa = PBXBuildFile; fileRef = BC88512C1391D6CD00370E55 /* SBJsonStreamParserAccumulator.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BC8851471391D6CD00370E55 /* SBJsonStreamParserAccumulator.m in Sources */ = {isa = PBXBuildFile; fileRef = BC88512D1391D6CD00370E55 /* SBJsonStreamParserAccumulator.m */; }; - BC8851481391D6CD00370E55 /* SBJsonStreamParserAdapter.h in Headers */ = {isa = PBXBuildFile; fileRef = BC88512E1391D6CD00370E55 /* SBJsonStreamParserAdapter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BC8851491391D6CD00370E55 /* SBJsonStreamParserAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = BC88512F1391D6CD00370E55 /* SBJsonStreamParserAdapter.m */; }; - BC88514A1391D6CD00370E55 /* SBJsonStreamParserState.h in Headers */ = {isa = PBXBuildFile; fileRef = BC8851301391D6CD00370E55 /* SBJsonStreamParserState.h */; }; - BC88514B1391D6CD00370E55 /* SBJsonStreamParserState.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8851311391D6CD00370E55 /* SBJsonStreamParserState.m */; }; - BC88514C1391D6CD00370E55 /* SBJsonStreamWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = BC8851321391D6CD00370E55 /* SBJsonStreamWriter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BC88514D1391D6CD00370E55 /* SBJsonStreamWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8851331391D6CD00370E55 /* SBJsonStreamWriter.m */; }; - BC88514E1391D6CD00370E55 /* SBJsonStreamWriterAccumulator.h in Headers */ = {isa = PBXBuildFile; fileRef = BC8851341391D6CD00370E55 /* SBJsonStreamWriterAccumulator.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BC88514F1391D6CD00370E55 /* SBJsonStreamWriterAccumulator.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8851351391D6CD00370E55 /* SBJsonStreamWriterAccumulator.m */; }; - BC8851501391D6CD00370E55 /* SBJsonStreamWriterState.h in Headers */ = {isa = PBXBuildFile; fileRef = BC8851361391D6CD00370E55 /* SBJsonStreamWriterState.h */; }; - BC8851511391D6CD00370E55 /* SBJsonStreamWriterState.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8851371391D6CD00370E55 /* SBJsonStreamWriterState.m */; }; - BC8851521391D6CD00370E55 /* SBJsonTokeniser.h in Headers */ = {isa = PBXBuildFile; fileRef = BC8851381391D6CD00370E55 /* SBJsonTokeniser.h */; }; - BC8851531391D6CD00370E55 /* SBJsonTokeniser.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8851391391D6CD00370E55 /* SBJsonTokeniser.m */; }; - BC8851541391D6CD00370E55 /* SBJsonWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = BC88513A1391D6CD00370E55 /* SBJsonWriter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BC8851551391D6CD00370E55 /* SBJsonWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = BC88513B1391D6CD00370E55 /* SBJsonWriter.m */; }; - BC8851561391D6CD00370E55 /* SBJsonUTF8Stream.h in Headers */ = {isa = PBXBuildFile; fileRef = BC88513C1391D6CD00370E55 /* SBJsonUTF8Stream.h */; }; - BC8851571391D6CD00370E55 /* SBJsonUTF8Stream.m in Sources */ = {isa = PBXBuildFile; fileRef = BC88513D1391D6CD00370E55 /* SBJsonUTF8Stream.m */; }; - BC8853271391D6DE00370E55 /* ErrorTest.m in Sources */ = {isa = PBXBuildFile; fileRef = BC88522B1391D6DD00370E55 /* ErrorTest.m */; }; - BC8853281391D6DE00370E55 /* FormatTest.m in Sources */ = {isa = PBXBuildFile; fileRef = BC88522C1391D6DD00370E55 /* FormatTest.m */; }; - BC8853291391D6DE00370E55 /* JsonCheckerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = BC88522D1391D6DD00370E55 /* JsonCheckerTest.m */; }; - BC88532A1391D6DE00370E55 /* JsonTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = BC88522F1391D6DD00370E55 /* JsonTestCase.m */; }; - BC88532B1391D6DE00370E55 /* ProxyTest.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8852301391D6DD00370E55 /* ProxyTest.m */; }; - BC88532C1391D6DE00370E55 /* RoundTripTest.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8852311391D6DD00370E55 /* RoundTripTest.m */; }; - BC8853911391D6DE00370E55 /* StreamParserIntegrationTest.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8852971391D6DE00370E55 /* StreamParserIntegrationTest.m */; }; - BC8853921391D6DE00370E55 /* WriterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8852981391D6DE00370E55 /* WriterTest.m */; }; - BCADB7CE139210C90057A705 /* SBJson.h in Headers */ = {isa = PBXBuildFile; fileRef = BC8851271391D6CD00370E55 /* SBJson.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BCADB7CF139210C90057A705 /* NSObject+SBJson.h in Headers */ = {isa = PBXBuildFile; fileRef = BC8851251391D6CD00370E55 /* NSObject+SBJson.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BCADB7D0139210C90057A705 /* SBJsonParser.h in Headers */ = {isa = PBXBuildFile; fileRef = BC8851281391D6CD00370E55 /* SBJsonParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BCADB7D1139210C90057A705 /* SBJsonStreamParser.h in Headers */ = {isa = PBXBuildFile; fileRef = BC88512A1391D6CD00370E55 /* SBJsonStreamParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BCADB7D2139210C90057A705 /* SBJsonStreamParserAccumulator.h in Headers */ = {isa = PBXBuildFile; fileRef = BC88512C1391D6CD00370E55 /* SBJsonStreamParserAccumulator.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BCADB7D3139210C90057A705 /* SBJsonStreamParserAdapter.h in Headers */ = {isa = PBXBuildFile; fileRef = BC88512E1391D6CD00370E55 /* SBJsonStreamParserAdapter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BCADB7D4139210C90057A705 /* SBJsonStreamParserState.h in Headers */ = {isa = PBXBuildFile; fileRef = BC8851301391D6CD00370E55 /* SBJsonStreamParserState.h */; }; - BCADB7D5139210C90057A705 /* SBJsonStreamWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = BC8851321391D6CD00370E55 /* SBJsonStreamWriter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BCADB7D6139210C90057A705 /* SBJsonStreamWriterAccumulator.h in Headers */ = {isa = PBXBuildFile; fileRef = BC8851341391D6CD00370E55 /* SBJsonStreamWriterAccumulator.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BCADB7D7139210C90057A705 /* SBJsonStreamWriterState.h in Headers */ = {isa = PBXBuildFile; fileRef = BC8851361391D6CD00370E55 /* SBJsonStreamWriterState.h */; }; - BCADB7D8139210C90057A705 /* SBJsonTokeniser.h in Headers */ = {isa = PBXBuildFile; fileRef = BC8851381391D6CD00370E55 /* SBJsonTokeniser.h */; }; - BCADB7D9139210C90057A705 /* SBJsonWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = BC88513A1391D6CD00370E55 /* SBJsonWriter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BCADB7DA139210C90057A705 /* SBJsonUTF8Stream.h in Headers */ = {isa = PBXBuildFile; fileRef = BC88513C1391D6CD00370E55 /* SBJsonUTF8Stream.h */; }; - BCC2626313920EE8003D9994 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC8853981391D74C00370E55 /* Foundation.framework */; }; - BCC2626413920F25003D9994 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC8853981391D74C00370E55 /* Foundation.framework */; }; - BCC2626A13920FC7003D9994 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC8853981391D74C00370E55 /* Foundation.framework */; }; - BCC2627613920FC7003D9994 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC8853981391D74C00370E55 /* Foundation.framework */; }; - BCC2627B13920FC7003D9994 /* libsbjson-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BCC2626913920FC7003D9994 /* libsbjson-ios.a */; }; - BCC2628113920FC7003D9994 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = BCC2627F13920FC7003D9994 /* InfoPlist.strings */; }; - BCC2628D13921035003D9994 /* NSObject+SBJson.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8851261391D6CD00370E55 /* NSObject+SBJson.m */; }; - BCC2628E13921035003D9994 /* SBJsonParser.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8851291391D6CD00370E55 /* SBJsonParser.m */; }; - BCC2628F13921035003D9994 /* SBJsonStreamParser.m in Sources */ = {isa = PBXBuildFile; fileRef = BC88512B1391D6CD00370E55 /* SBJsonStreamParser.m */; }; - BCC2629013921035003D9994 /* SBJsonStreamParserAccumulator.m in Sources */ = {isa = PBXBuildFile; fileRef = BC88512D1391D6CD00370E55 /* SBJsonStreamParserAccumulator.m */; }; - BCC2629113921035003D9994 /* SBJsonStreamParserAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = BC88512F1391D6CD00370E55 /* SBJsonStreamParserAdapter.m */; }; - BCC2629213921035003D9994 /* SBJsonStreamParserState.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8851311391D6CD00370E55 /* SBJsonStreamParserState.m */; }; - BCC2629313921035003D9994 /* SBJsonStreamWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8851331391D6CD00370E55 /* SBJsonStreamWriter.m */; }; - BCC2629413921035003D9994 /* SBJsonStreamWriterAccumulator.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8851351391D6CD00370E55 /* SBJsonStreamWriterAccumulator.m */; }; - BCC2629513921035003D9994 /* SBJsonStreamWriterState.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8851371391D6CD00370E55 /* SBJsonStreamWriterState.m */; }; - BCC2629613921035003D9994 /* SBJsonTokeniser.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8851391391D6CD00370E55 /* SBJsonTokeniser.m */; }; - BCC2629713921035003D9994 /* SBJsonWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = BC88513B1391D6CD00370E55 /* SBJsonWriter.m */; }; - BCC2629813921035003D9994 /* SBJsonUTF8Stream.m in Sources */ = {isa = PBXBuildFile; fileRef = BC88513D1391D6CD00370E55 /* SBJsonUTF8Stream.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - BC1232541391D5CC00131607 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BC1232331391D5CC00131607 /* Project object */; - proxyType = 1; - remoteGlobalIDString = BC12323C1391D5CC00131607; - remoteInfo = SBJson; - }; - BCC2627913920FC7003D9994 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BC1232331391D5CC00131607 /* Project object */; - proxyType = 1; - remoteGlobalIDString = BCC2626813920FC7003D9994; - remoteInfo = "sbjson-ios"; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 3BB5955B14EAA4B8001BE91E /* SortedFormatTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SortedFormatTest.m; sourceTree = ""; }; - BC12323D1391D5CC00131607 /* SBJson.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SBJson.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - BC1232481391D5CC00131607 /* SBJson-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SBJson-Info.plist"; sourceTree = ""; }; - BC12324A1391D5CC00131607 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - BC12324C1391D5CC00131607 /* SBJson-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SBJson-Prefix.pch"; sourceTree = ""; }; - BC1232521391D5CC00131607 /* SBJsonTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SBJsonTests.octest; sourceTree = BUILT_PRODUCTS_DIR; }; - BC1232591391D5CC00131607 /* SBJsonTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SBJsonTests-Info.plist"; sourceTree = ""; }; - BC12325B1391D5CC00131607 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - BC12325D1391D5CC00131607 /* SBJsonTests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SBJsonTests-Prefix.pch"; sourceTree = ""; }; - BC8851251391D6CD00370E55 /* NSObject+SBJson.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+SBJson.h"; sourceTree = ""; }; - BC8851261391D6CD00370E55 /* NSObject+SBJson.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+SBJson.m"; sourceTree = ""; }; - BC8851271391D6CD00370E55 /* SBJson.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJson.h; sourceTree = ""; }; - BC8851281391D6CD00370E55 /* SBJsonParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonParser.h; sourceTree = ""; }; - BC8851291391D6CD00370E55 /* SBJsonParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SBJsonParser.m; sourceTree = ""; }; - BC88512A1391D6CD00370E55 /* SBJsonStreamParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonStreamParser.h; sourceTree = ""; }; - BC88512B1391D6CD00370E55 /* SBJsonStreamParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SBJsonStreamParser.m; sourceTree = ""; }; - BC88512C1391D6CD00370E55 /* SBJsonStreamParserAccumulator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonStreamParserAccumulator.h; sourceTree = ""; }; - BC88512D1391D6CD00370E55 /* SBJsonStreamParserAccumulator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SBJsonStreamParserAccumulator.m; sourceTree = ""; }; - BC88512E1391D6CD00370E55 /* SBJsonStreamParserAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonStreamParserAdapter.h; sourceTree = ""; }; - BC88512F1391D6CD00370E55 /* SBJsonStreamParserAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SBJsonStreamParserAdapter.m; sourceTree = ""; }; - BC8851301391D6CD00370E55 /* SBJsonStreamParserState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonStreamParserState.h; sourceTree = ""; }; - BC8851311391D6CD00370E55 /* SBJsonStreamParserState.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SBJsonStreamParserState.m; sourceTree = ""; }; - BC8851321391D6CD00370E55 /* SBJsonStreamWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonStreamWriter.h; sourceTree = ""; }; - BC8851331391D6CD00370E55 /* SBJsonStreamWriter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SBJsonStreamWriter.m; sourceTree = ""; }; - BC8851341391D6CD00370E55 /* SBJsonStreamWriterAccumulator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonStreamWriterAccumulator.h; sourceTree = ""; }; - BC8851351391D6CD00370E55 /* SBJsonStreamWriterAccumulator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SBJsonStreamWriterAccumulator.m; sourceTree = ""; }; - BC8851361391D6CD00370E55 /* SBJsonStreamWriterState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonStreamWriterState.h; sourceTree = ""; }; - BC8851371391D6CD00370E55 /* SBJsonStreamWriterState.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SBJsonStreamWriterState.m; sourceTree = ""; }; - BC8851381391D6CD00370E55 /* SBJsonTokeniser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonTokeniser.h; sourceTree = ""; }; - BC8851391391D6CD00370E55 /* SBJsonTokeniser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SBJsonTokeniser.m; sourceTree = ""; }; - BC88513A1391D6CD00370E55 /* SBJsonWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonWriter.h; sourceTree = ""; }; - BC88513B1391D6CD00370E55 /* SBJsonWriter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SBJsonWriter.m; sourceTree = ""; }; - BC88513C1391D6CD00370E55 /* SBJsonUTF8Stream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonUTF8Stream.h; sourceTree = ""; }; - BC88513D1391D6CD00370E55 /* SBJsonUTF8Stream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SBJsonUTF8Stream.m; sourceTree = ""; }; - BC88522B1391D6DD00370E55 /* ErrorTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ErrorTest.m; sourceTree = ""; }; - BC88522C1391D6DD00370E55 /* FormatTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FormatTest.m; sourceTree = ""; }; - BC88522D1391D6DD00370E55 /* JsonCheckerTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JsonCheckerTest.m; sourceTree = ""; }; - BC88522E1391D6DD00370E55 /* JsonTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JsonTestCase.h; sourceTree = ""; }; - BC88522F1391D6DD00370E55 /* JsonTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JsonTestCase.m; sourceTree = ""; }; - BC8852301391D6DD00370E55 /* ProxyTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProxyTest.m; sourceTree = ""; }; - BC8852311391D6DD00370E55 /* RoundTripTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RoundTripTest.m; sourceTree = ""; }; - BC8852971391D6DE00370E55 /* StreamParserIntegrationTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StreamParserIntegrationTest.m; sourceTree = ""; }; - BC8852981391D6DE00370E55 /* WriterTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WriterTest.m; sourceTree = ""; }; - BC8853981391D74C00370E55 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - BCC2626913920FC7003D9994 /* libsbjson-ios.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libsbjson-ios.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - BCC2626D13920FC7003D9994 /* sbjson-ios-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "sbjson-ios-Prefix.pch"; sourceTree = ""; }; - BCC2627313920FC7003D9994 /* sbjson-iosTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "sbjson-iosTests.octest"; sourceTree = BUILT_PRODUCTS_DIR; }; - BCC2627E13920FC7003D9994 /* sbjson-iosTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "sbjson-iosTests-Info.plist"; sourceTree = ""; }; - BCC2628013920FC7003D9994 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - BCC2628213920FC7003D9994 /* sbjson-iosTests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "sbjson-iosTests-Prefix.pch"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - BC1232391391D5CC00131607 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - BCC2626313920EE8003D9994 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BC12324E1391D5CC00131607 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - BC1232561391D5CC00131607 /* SBJson.framework in Frameworks */, - BCC2626413920F25003D9994 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BCC2626613920FC7003D9994 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - BCC2626A13920FC7003D9994 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BCC2626F13920FC7003D9994 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - BCC2627613920FC7003D9994 /* Foundation.framework in Frameworks */, - BCC2627B13920FC7003D9994 /* libsbjson-ios.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - A0E92A8E16276E3F0091EDF6 /* Assets */ = { - isa = PBXGroup; - children = ( - ); - name = Assets; - sourceTree = ""; - }; - BC1232311391D5CC00131607 = { - isa = PBXGroup; - children = ( - BC8851231391D6CD00370E55 /* Classes */, - BC8851581391D6DD00370E55 /* Tests */, - BC1232461391D5CC00131607 /* SBJson */, - BC1232571391D5CC00131607 /* SBJsonTests */, - BCC2626B13920FC7003D9994 /* sbjson-ios */, - BCC2627C13920FC7003D9994 /* sbjson-iosTests */, - BC12323F1391D5CC00131607 /* Frameworks */, - BC12323E1391D5CC00131607 /* Products */, - ); - sourceTree = ""; - }; - BC12323E1391D5CC00131607 /* Products */ = { - isa = PBXGroup; - children = ( - BC12323D1391D5CC00131607 /* SBJson.framework */, - BC1232521391D5CC00131607 /* SBJsonTests.octest */, - BCC2626913920FC7003D9994 /* libsbjson-ios.a */, - BCC2627313920FC7003D9994 /* sbjson-iosTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - BC12323F1391D5CC00131607 /* Frameworks */ = { - isa = PBXGroup; - children = ( - BC8853981391D74C00370E55 /* Foundation.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - BC1232461391D5CC00131607 /* SBJson */ = { - isa = PBXGroup; - children = ( - BC1232471391D5CC00131607 /* Supporting Files */, - ); - path = SBJson; - sourceTree = ""; - }; - BC1232471391D5CC00131607 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - BC1232481391D5CC00131607 /* SBJson-Info.plist */, - BC1232491391D5CC00131607 /* InfoPlist.strings */, - BC12324C1391D5CC00131607 /* SBJson-Prefix.pch */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - BC1232571391D5CC00131607 /* SBJsonTests */ = { - isa = PBXGroup; - children = ( - BC1232581391D5CC00131607 /* Supporting Files */, - ); - path = SBJsonTests; - sourceTree = ""; - }; - BC1232581391D5CC00131607 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - BC1232591391D5CC00131607 /* SBJsonTests-Info.plist */, - BC12325A1391D5CC00131607 /* InfoPlist.strings */, - BC12325D1391D5CC00131607 /* SBJsonTests-Prefix.pch */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - BC8851231391D6CD00370E55 /* Classes */ = { - isa = PBXGroup; - children = ( - BC8851271391D6CD00370E55 /* SBJson.h */, - BC8851251391D6CD00370E55 /* NSObject+SBJson.h */, - BC8851261391D6CD00370E55 /* NSObject+SBJson.m */, - BCADB7DD139213960057A705 /* Parser */, - BCADB7DE139213A10057A705 /* Writer */, - ); - path = Classes; - sourceTree = ""; - }; - BC8851581391D6DD00370E55 /* Tests */ = { - isa = PBXGroup; - children = ( - A0E92A8E16276E3F0091EDF6 /* Assets */, - BC88522B1391D6DD00370E55 /* ErrorTest.m */, - BC88522C1391D6DD00370E55 /* FormatTest.m */, - BC88522D1391D6DD00370E55 /* JsonCheckerTest.m */, - BC88522E1391D6DD00370E55 /* JsonTestCase.h */, - BC88522F1391D6DD00370E55 /* JsonTestCase.m */, - BC8852301391D6DD00370E55 /* ProxyTest.m */, - BC8852311391D6DD00370E55 /* RoundTripTest.m */, - BC8852971391D6DE00370E55 /* StreamParserIntegrationTest.m */, - BC8852981391D6DE00370E55 /* WriterTest.m */, - 3BB5955B14EAA4B8001BE91E /* SortedFormatTest.m */, - ); - path = Tests; - sourceTree = ""; - }; - BCADB7DB139213450057A705 /* Private */ = { - isa = PBXGroup; - children = ( - BC8851361391D6CD00370E55 /* SBJsonStreamWriterState.h */, - BC8851371391D6CD00370E55 /* SBJsonStreamWriterState.m */, - ); - name = Private; - sourceTree = ""; - }; - BCADB7DD139213960057A705 /* Parser */ = { - isa = PBXGroup; - children = ( - BCADB7DF139213D70057A705 /* Private */, - BC8851281391D6CD00370E55 /* SBJsonParser.h */, - BC8851291391D6CD00370E55 /* SBJsonParser.m */, - BC88512A1391D6CD00370E55 /* SBJsonStreamParser.h */, - BC88512B1391D6CD00370E55 /* SBJsonStreamParser.m */, - BC88512C1391D6CD00370E55 /* SBJsonStreamParserAccumulator.h */, - BC88512D1391D6CD00370E55 /* SBJsonStreamParserAccumulator.m */, - BC88512E1391D6CD00370E55 /* SBJsonStreamParserAdapter.h */, - BC88512F1391D6CD00370E55 /* SBJsonStreamParserAdapter.m */, - ); - name = Parser; - sourceTree = ""; - }; - BCADB7DE139213A10057A705 /* Writer */ = { - isa = PBXGroup; - children = ( - BCADB7DB139213450057A705 /* Private */, - BC88513A1391D6CD00370E55 /* SBJsonWriter.h */, - BC88513B1391D6CD00370E55 /* SBJsonWriter.m */, - BC8851321391D6CD00370E55 /* SBJsonStreamWriter.h */, - BC8851331391D6CD00370E55 /* SBJsonStreamWriter.m */, - BC8851341391D6CD00370E55 /* SBJsonStreamWriterAccumulator.h */, - BC8851351391D6CD00370E55 /* SBJsonStreamWriterAccumulator.m */, - ); - name = Writer; - sourceTree = ""; - }; - BCADB7DF139213D70057A705 /* Private */ = { - isa = PBXGroup; - children = ( - BC8851301391D6CD00370E55 /* SBJsonStreamParserState.h */, - BC8851311391D6CD00370E55 /* SBJsonStreamParserState.m */, - BC8851381391D6CD00370E55 /* SBJsonTokeniser.h */, - BC8851391391D6CD00370E55 /* SBJsonTokeniser.m */, - BC88513C1391D6CD00370E55 /* SBJsonUTF8Stream.h */, - BC88513D1391D6CD00370E55 /* SBJsonUTF8Stream.m */, - ); - name = Private; - sourceTree = ""; - }; - BCC2626B13920FC7003D9994 /* sbjson-ios */ = { - isa = PBXGroup; - children = ( - BCC2626C13920FC7003D9994 /* Supporting Files */, - ); - path = "sbjson-ios"; - sourceTree = ""; - }; - BCC2626C13920FC7003D9994 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - BCC2626D13920FC7003D9994 /* sbjson-ios-Prefix.pch */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - BCC2627C13920FC7003D9994 /* sbjson-iosTests */ = { - isa = PBXGroup; - children = ( - BCC2627D13920FC7003D9994 /* Supporting Files */, - ); - path = "sbjson-iosTests"; - sourceTree = ""; - }; - BCC2627D13920FC7003D9994 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - BCC2627E13920FC7003D9994 /* sbjson-iosTests-Info.plist */, - BCC2627F13920FC7003D9994 /* InfoPlist.strings */, - BCC2628213920FC7003D9994 /* sbjson-iosTests-Prefix.pch */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - BC12323A1391D5CC00131607 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - BC88513F1391D6CD00370E55 /* NSObject+SBJson.h in Headers */, - BC8851421391D6CD00370E55 /* SBJsonParser.h in Headers */, - BC8851441391D6CD00370E55 /* SBJsonStreamParser.h in Headers */, - BC8851461391D6CD00370E55 /* SBJsonStreamParserAccumulator.h in Headers */, - BC8851481391D6CD00370E55 /* SBJsonStreamParserAdapter.h in Headers */, - BC88514C1391D6CD00370E55 /* SBJsonStreamWriter.h in Headers */, - BC88514E1391D6CD00370E55 /* SBJsonStreamWriterAccumulator.h in Headers */, - BC8851541391D6CD00370E55 /* SBJsonWriter.h in Headers */, - BC8851411391D6CD00370E55 /* SBJson.h in Headers */, - BC88514A1391D6CD00370E55 /* SBJsonStreamParserState.h in Headers */, - BC8851501391D6CD00370E55 /* SBJsonStreamWriterState.h in Headers */, - BC8851521391D6CD00370E55 /* SBJsonTokeniser.h in Headers */, - BC8851561391D6CD00370E55 /* SBJsonUTF8Stream.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BCC2626713920FC7003D9994 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - BCADB7CE139210C90057A705 /* SBJson.h in Headers */, - BCADB7D0139210C90057A705 /* SBJsonParser.h in Headers */, - BCADB7D9139210C90057A705 /* SBJsonWriter.h in Headers */, - BCADB7D1139210C90057A705 /* SBJsonStreamParser.h in Headers */, - BCADB7D3139210C90057A705 /* SBJsonStreamParserAdapter.h in Headers */, - BCADB7D5139210C90057A705 /* SBJsonStreamWriter.h in Headers */, - BCADB7CF139210C90057A705 /* NSObject+SBJson.h in Headers */, - BCADB7D2139210C90057A705 /* SBJsonStreamParserAccumulator.h in Headers */, - BCADB7D6139210C90057A705 /* SBJsonStreamWriterAccumulator.h in Headers */, - BCADB7D4139210C90057A705 /* SBJsonStreamParserState.h in Headers */, - BCADB7D7139210C90057A705 /* SBJsonStreamWriterState.h in Headers */, - BCADB7D8139210C90057A705 /* SBJsonTokeniser.h in Headers */, - BCADB7DA139210C90057A705 /* SBJsonUTF8Stream.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - BC12323C1391D5CC00131607 /* SBJson */ = { - isa = PBXNativeTarget; - buildConfigurationList = BC1232641391D5CC00131607 /* Build configuration list for PBXNativeTarget "SBJson" */; - buildPhases = ( - BC1232381391D5CC00131607 /* Sources */, - BC1232391391D5CC00131607 /* Frameworks */, - BC12323A1391D5CC00131607 /* Headers */, - BC12323B1391D5CC00131607 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SBJson; - productName = SBJson; - productReference = BC12323D1391D5CC00131607 /* SBJson.framework */; - productType = "com.apple.product-type.framework"; - }; - BC1232511391D5CC00131607 /* SBJsonTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = BC1232671391D5CC00131607 /* Build configuration list for PBXNativeTarget "SBJsonTests" */; - buildPhases = ( - BC12324D1391D5CC00131607 /* Sources */, - BC12324E1391D5CC00131607 /* Frameworks */, - BC12324F1391D5CC00131607 /* Resources */, - BC1232501391D5CC00131607 /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - BC1232551391D5CC00131607 /* PBXTargetDependency */, - ); - name = SBJsonTests; - productName = SBJsonTests; - productReference = BC1232521391D5CC00131607 /* SBJsonTests.octest */; - productType = "com.apple.product-type.bundle"; - }; - BCC2626813920FC7003D9994 /* sbjson-ios */ = { - isa = PBXNativeTarget; - buildConfigurationList = BCC2628713920FC7003D9994 /* Build configuration list for PBXNativeTarget "sbjson-ios" */; - buildPhases = ( - BCC2626513920FC7003D9994 /* Sources */, - BCC2626613920FC7003D9994 /* Frameworks */, - BCC2626713920FC7003D9994 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "sbjson-ios"; - productName = "sbjson-ios"; - productReference = BCC2626913920FC7003D9994 /* libsbjson-ios.a */; - productType = "com.apple.product-type.library.static"; - }; - BCC2627213920FC7003D9994 /* sbjson-iosTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = BCC2628A13920FC7003D9994 /* Build configuration list for PBXNativeTarget "sbjson-iosTests" */; - buildPhases = ( - BCC2626E13920FC7003D9994 /* Sources */, - BCC2626F13920FC7003D9994 /* Frameworks */, - BCC2627013920FC7003D9994 /* Resources */, - A0E92BF5162772BB0091EDF6 /* ShellScript */, - BCC2627113920FC7003D9994 /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - BCC2627A13920FC7003D9994 /* PBXTargetDependency */, - ); - name = "sbjson-iosTests"; - productName = "sbjson-iosTests"; - productReference = BCC2627313920FC7003D9994 /* sbjson-iosTests.octest */; - productType = "com.apple.product-type.bundle"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - BC1232331391D5CC00131607 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0420; - ORGANIZATIONNAME = "Stig Brautaset"; - }; - buildConfigurationList = BC1232361391D5CC00131607 /* Build configuration list for PBXProject "SBJson" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = BC1232311391D5CC00131607; - productRefGroup = BC12323E1391D5CC00131607 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - BC12323C1391D5CC00131607 /* SBJson */, - BC1232511391D5CC00131607 /* SBJsonTests */, - BCC2626813920FC7003D9994 /* sbjson-ios */, - BCC2627213920FC7003D9994 /* sbjson-iosTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - BC12323B1391D5CC00131607 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BC12324B1391D5CC00131607 /* InfoPlist.strings in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BC12324F1391D5CC00131607 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BC12325C1391D5CC00131607 /* InfoPlist.strings in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BCC2627013920FC7003D9994 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BCC2628113920FC7003D9994 /* InfoPlist.strings in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - A0E92BF5162772BB0091EDF6 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "", - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "mkdir -p \"${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Tests/\"\ncp -r \"${PROJECT_DIR}/Tests/Data/\" \"${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Tests/Data\"\ncp -r \"${PROJECT_DIR}/Tests/Stream/\" \"${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Tests/Stream\""; - }; - BC1232501391D5CC00131607 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n"; - }; - BCC2627113920FC7003D9994 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - BC1232381391D5CC00131607 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BC8851401391D6CD00370E55 /* NSObject+SBJson.m in Sources */, - BC8851431391D6CD00370E55 /* SBJsonParser.m in Sources */, - BC8851451391D6CD00370E55 /* SBJsonStreamParser.m in Sources */, - BC8851471391D6CD00370E55 /* SBJsonStreamParserAccumulator.m in Sources */, - BC8851491391D6CD00370E55 /* SBJsonStreamParserAdapter.m in Sources */, - BC88514B1391D6CD00370E55 /* SBJsonStreamParserState.m in Sources */, - BC88514D1391D6CD00370E55 /* SBJsonStreamWriter.m in Sources */, - BC88514F1391D6CD00370E55 /* SBJsonStreamWriterAccumulator.m in Sources */, - BC8851511391D6CD00370E55 /* SBJsonStreamWriterState.m in Sources */, - BC8851531391D6CD00370E55 /* SBJsonTokeniser.m in Sources */, - BC8851551391D6CD00370E55 /* SBJsonWriter.m in Sources */, - BC8851571391D6CD00370E55 /* SBJsonUTF8Stream.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BC12324D1391D5CC00131607 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BC8853271391D6DE00370E55 /* ErrorTest.m in Sources */, - BC8853281391D6DE00370E55 /* FormatTest.m in Sources */, - BC8853291391D6DE00370E55 /* JsonCheckerTest.m in Sources */, - BC88532A1391D6DE00370E55 /* JsonTestCase.m in Sources */, - BC88532B1391D6DE00370E55 /* ProxyTest.m in Sources */, - BC88532C1391D6DE00370E55 /* RoundTripTest.m in Sources */, - BC8853911391D6DE00370E55 /* StreamParserIntegrationTest.m in Sources */, - BC8853921391D6DE00370E55 /* WriterTest.m in Sources */, - 3BB5955C14EAA4B8001BE91E /* SortedFormatTest.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BCC2626513920FC7003D9994 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BCC2628D13921035003D9994 /* NSObject+SBJson.m in Sources */, - BCC2628E13921035003D9994 /* SBJsonParser.m in Sources */, - BCC2628F13921035003D9994 /* SBJsonStreamParser.m in Sources */, - BCC2629013921035003D9994 /* SBJsonStreamParserAccumulator.m in Sources */, - BCC2629113921035003D9994 /* SBJsonStreamParserAdapter.m in Sources */, - BCC2629213921035003D9994 /* SBJsonStreamParserState.m in Sources */, - BCC2629313921035003D9994 /* SBJsonStreamWriter.m in Sources */, - BCC2629413921035003D9994 /* SBJsonStreamWriterAccumulator.m in Sources */, - BCC2629513921035003D9994 /* SBJsonStreamWriterState.m in Sources */, - BCC2629613921035003D9994 /* SBJsonTokeniser.m in Sources */, - BCC2629713921035003D9994 /* SBJsonWriter.m in Sources */, - BCC2629813921035003D9994 /* SBJsonUTF8Stream.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BCC2626E13920FC7003D9994 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BC417FF413A1008F00C8BC49 /* ErrorTest.m in Sources */, - BC417FF513A1008F00C8BC49 /* FormatTest.m in Sources */, - BC417FF613A1008F00C8BC49 /* JsonCheckerTest.m in Sources */, - BC417FF813A1008F00C8BC49 /* JsonTestCase.m in Sources */, - BC417FF913A1008F00C8BC49 /* ProxyTest.m in Sources */, - BC417FFA13A1008F00C8BC49 /* RoundTripTest.m in Sources */, - BC417FFB13A1008F00C8BC49 /* StreamParserIntegrationTest.m in Sources */, - BC417FFC13A1008F00C8BC49 /* WriterTest.m in Sources */, - 3BB5955D14EAA4B8001BE91E /* SortedFormatTest.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - BC1232551391D5CC00131607 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = BC12323C1391D5CC00131607 /* SBJson */; - targetProxy = BC1232541391D5CC00131607 /* PBXContainerItemProxy */; - }; - BCC2627A13920FC7003D9994 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = BCC2626813920FC7003D9994 /* sbjson-ios */; - targetProxy = BCC2627913920FC7003D9994 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - BC1232491391D5CC00131607 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - BC12324A1391D5CC00131607 /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - BC12325A1391D5CC00131607 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - BC12325B1391D5CC00131607 /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - BCC2627F13920FC7003D9994 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - BCC2628013920FC7003D9994 /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - BC1232621391D5CC00131607 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - CLANG_ENABLE_OBJC_ARC = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(DEVELOPER_LIBRARY_DIR)/Frameworks", - ); - GCC_C_LANGUAGE_STANDARD = "compiler-default"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = ""; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_LABEL = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = ""; - ONLY_ACTIVE_ARCH = YES; - RUN_CLANG_STATIC_ANALYZER = YES; - SDKROOT = macosx; - }; - name = Debug; - }; - BC1232631391D5CC00131607 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - CLANG_ENABLE_OBJC_ARC = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(DEVELOPER_LIBRARY_DIR)/Frameworks", - ); - GCC_C_LANGUAGE_STANDARD = "compiler-default"; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_VERSION = ""; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_LABEL = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = ""; - RUN_CLANG_STATIC_ANALYZER = YES; - SDKROOT = macosx; - }; - name = Release; - }; - BC1232651391D5CC00131607 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 37; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 37; - FRAMEWORK_VERSION = A; - GCC_PREFIX_HEADER = "SBJson/SBJson-Prefix.pch"; - INFOPLIST_FILE = "SBJson/SBJson-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - VERSIONING_SYSTEM = "apple-generic"; - WRAPPER_EXTENSION = framework; - }; - name = Debug; - }; - BC1232661391D5CC00131607 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COPY_PHASE_STRIP = YES; - CURRENT_PROJECT_VERSION = 37; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 37; - FRAMEWORK_VERSION = A; - GCC_PREFIX_HEADER = "SBJson/SBJson-Prefix.pch"; - INFOPLIST_FILE = "SBJson/SBJson-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - VERSIONING_SYSTEM = "apple-generic"; - WRAPPER_EXTENSION = framework; - }; - name = Release; - }; - BC1232681391D5CC00131607 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COPY_PHASE_STRIP = NO; - GCC_PREFIX_HEADER = "SBJsonTests/SBJsonTests-Prefix.pch"; - INFOPLIST_FILE = "SBJsonTests/SBJsonTests-Info.plist"; - OTHER_LDFLAGS = ( - "-framework", - SenTestingKit, - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = octest; - }; - name = Debug; - }; - BC1232691391D5CC00131607 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_PREFIX_HEADER = "SBJsonTests/SBJsonTests-Prefix.pch"; - INFOPLIST_FILE = "SBJsonTests/SBJsonTests-Info.plist"; - OTHER_LDFLAGS = ( - "-framework", - SenTestingKit, - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = octest; - }; - name = Release; - }; - BCC2628813920FC7003D9994 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - DSTROOT = /tmp/sbjson_ios.dst; - GCC_PREFIX_HEADER = "sbjson-ios/sbjson-ios-Prefix.pch"; - HEADER_SEARCH_PATHS = ( - include/, - "$(BUILT_PRODUCTS_DIR)/usr/local/lib/include/", - ); - IPHONEOS_DEPLOYMENT_TARGET = 4.3; - ONLY_ACTIVE_ARCH = NO; - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_NAME = "$(TARGET_NAME)"; - PUBLIC_HEADERS_FOLDER_PATH = include/SBJson/; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - }; - name = Debug; - }; - BCC2628913920FC7003D9994 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - DSTROOT = /tmp/sbjson_ios.dst; - GCC_PREFIX_HEADER = "sbjson-ios/sbjson-ios-Prefix.pch"; - HEADER_SEARCH_PATHS = "$(TARGET_BUILD_DIR)/include/"; - IPHONEOS_DEPLOYMENT_TARGET = 4.3; - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_NAME = "$(TARGET_NAME)"; - PUBLIC_HEADERS_FOLDER_PATH = include/SBJson/; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - }; - name = Release; - }; - BCC2628B13920FC7003D9994 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(DEVELOPER_LIBRARY_DIR)/Frameworks", - ); - GCC_PREFIX_HEADER = "sbjson-iosTests/sbjson-iosTests-Prefix.pch"; - INFOPLIST_FILE = "sbjson-iosTests/sbjson-iosTests-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 4.3; - OTHER_LDFLAGS = ( - "-framework", - SenTestingKit, - "-all_load", - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - WRAPPER_EXTENSION = octest; - }; - name = Debug; - }; - BCC2628C13920FC7003D9994 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(DEVELOPER_LIBRARY_DIR)/Frameworks", - ); - GCC_PREFIX_HEADER = "sbjson-iosTests/sbjson-iosTests-Prefix.pch"; - INFOPLIST_FILE = "sbjson-iosTests/sbjson-iosTests-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 4.3; - OTHER_LDFLAGS = ( - "-framework", - SenTestingKit, - "-all_load", - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - WRAPPER_EXTENSION = octest; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - BC1232361391D5CC00131607 /* Build configuration list for PBXProject "SBJson" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BC1232621391D5CC00131607 /* Debug */, - BC1232631391D5CC00131607 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - BC1232641391D5CC00131607 /* Build configuration list for PBXNativeTarget "SBJson" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BC1232651391D5CC00131607 /* Debug */, - BC1232661391D5CC00131607 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - BC1232671391D5CC00131607 /* Build configuration list for PBXNativeTarget "SBJsonTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BC1232681391D5CC00131607 /* Debug */, - BC1232691391D5CC00131607 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - BCC2628713920FC7003D9994 /* Build configuration list for PBXNativeTarget "sbjson-ios" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BCC2628813920FC7003D9994 /* Debug */, - BCC2628913920FC7003D9994 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - BCC2628A13920FC7003D9994 /* Build configuration list for PBXNativeTarget "sbjson-iosTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BCC2628B13920FC7003D9994 /* Debug */, - BCC2628C13920FC7003D9994 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = BC1232331391D5CC00131607 /* Project object */; -} diff --git a/third_party/objc/json-framework/SBJson.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/third_party/objc/json-framework/SBJson.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 0776fcc34e35d..0000000000000 --- a/third_party/objc/json-framework/SBJson.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/third_party/objc/json-framework/SBJson.xcodeproj/project.xcworkspace/xcuserdata/linman-semerau.xcuserdatad/UserInterfaceState.xcuserstate b/third_party/objc/json-framework/SBJson.xcodeproj/project.xcworkspace/xcuserdata/linman-semerau.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index 8913bf985f530..0000000000000 Binary files a/third_party/objc/json-framework/SBJson.xcodeproj/project.xcworkspace/xcuserdata/linman-semerau.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/third_party/objc/json-framework/SBJson.xcworkspace/contents.xcworkspacedata b/third_party/objc/json-framework/SBJson.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 98cfd74cc4170..0000000000000 --- a/third_party/objc/json-framework/SBJson.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - diff --git a/third_party/objc/json-framework/SBJson/SBJson-Info.plist b/third_party/objc/json-framework/SBJson/SBJson-Info.plist deleted file mode 100644 index 41e8dab625beb..0000000000000 --- a/third_party/objc/json-framework/SBJson/SBJson-Info.plist +++ /dev/null @@ -1,30 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - org.brautaset.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 3.1.1 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSHumanReadableCopyright - Copyright © 2011 Stig Brautaset. All rights reserved. - NSPrincipalClass - - - diff --git a/third_party/objc/json-framework/SBJson/SBJson-Prefix.pch b/third_party/objc/json-framework/SBJson/SBJson-Prefix.pch deleted file mode 100644 index 56b8bf32b79fb..0000000000000 --- a/third_party/objc/json-framework/SBJson/SBJson-Prefix.pch +++ /dev/null @@ -1,7 +0,0 @@ -// -// Prefix header for all source files of the 'SBJson' target in the 'SBJson' project -// - -#ifdef __OBJC__ - #import -#endif diff --git a/third_party/objc/json-framework/SBJson/en.lproj/InfoPlist.strings b/third_party/objc/json-framework/SBJson/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28ff8f86a..0000000000000 --- a/third_party/objc/json-framework/SBJson/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/third_party/objc/json-framework/SBJsonTests/SBJsonTests-Info.plist b/third_party/objc/json-framework/SBJsonTests/SBJsonTests-Info.plist deleted file mode 100644 index d1b8e97654a24..0000000000000 --- a/third_party/objc/json-framework/SBJsonTests/SBJsonTests-Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - org.brautaset.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BNDL - CFBundleShortVersionString - 3.1.1 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - - diff --git a/third_party/objc/json-framework/SBJsonTests/SBJsonTests-Prefix.pch b/third_party/objc/json-framework/SBJsonTests/SBJsonTests-Prefix.pch deleted file mode 100644 index 289d1dcae8d0d..0000000000000 --- a/third_party/objc/json-framework/SBJsonTests/SBJsonTests-Prefix.pch +++ /dev/null @@ -1,8 +0,0 @@ -// -// Prefix header for all source files of the 'SBJsonTests' target in the 'SBJsonTests' project -// - -#ifdef __OBJC__ - #import - #import -#endif diff --git a/third_party/objc/json-framework/SBJsonTests/en.lproj/InfoPlist.strings b/third_party/objc/json-framework/SBJsonTests/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28ff8f86a..0000000000000 --- a/third_party/objc/json-framework/SBJsonTests/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/third_party/objc/json-framework/Tests/Data/comparatorsort/basic/input b/third_party/objc/json-framework/Tests/Data/comparatorsort/basic/input deleted file mode 100644 index 2b657858156f6..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/comparatorsort/basic/input +++ /dev/null @@ -1 +0,0 @@ -["one",2,{"foo":null,"Boo":false,"quux":true,"bar":[1, 2, []]},{}] diff --git a/third_party/objc/json-framework/Tests/Data/comparatorsort/basic/output b/third_party/objc/json-framework/Tests/Data/comparatorsort/basic/output deleted file mode 100644 index 60184b543d39f..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/comparatorsort/basic/output +++ /dev/null @@ -1,17 +0,0 @@ -[ - "one", - 2, - { - "bar": [ - 1, - 2, - [ - ] - ], - "Boo": false, - "foo": null, - "quux": true - }, - { - } -] diff --git a/third_party/objc/json-framework/Tests/Data/comparatorsort/json.org/a/input b/third_party/objc/json-framework/Tests/Data/comparatorsort/json.org/a/input deleted file mode 100644 index c8f1d8c61f9da..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/comparatorsort/json.org/a/input +++ /dev/null @@ -1,22 +0,0 @@ -{ - "glossary": { - "title": "example glossary", - "GlossDiv": { - "title": "S", - "GlossList": { - "GlossEntry": { - "ID": "SGML", - "SortAs": "SGML", - "GlossTerm": "Standard Generalized Markup Language", - "Acronym": "SGML", - "Abbrev": "ISO 8879:1986", - "GlossDef": { - "para": "A meta-markup language, used to create markup languages such as DocBook.", - "GlossSeeAlso": ["GML", "XML"] - }, - "GlossSee": "markup" - } - } - } - } -} diff --git a/third_party/objc/json-framework/Tests/Data/comparatorsort/json.org/a/output b/third_party/objc/json-framework/Tests/Data/comparatorsort/json.org/a/output deleted file mode 100644 index db268bf53d3ec..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/comparatorsort/json.org/a/output +++ /dev/null @@ -1,25 +0,0 @@ -{ - "glossary": { - "GlossDiv": { - "GlossList": { - "GlossEntry": { - "Abbrev": "ISO 8879:1986", - "Acronym": "SGML", - "GlossDef": { - "GlossSeeAlso": [ - "GML", - "XML" - ], - "para": "A meta-markup language, used to create markup languages such as DocBook." - }, - "GlossSee": "markup", - "GlossTerm": "Standard Generalized Markup Language", - "ID": "SGML", - "SortAs": "SGML" - } - }, - "title": "S" - }, - "title": "example glossary" - } -} diff --git a/third_party/objc/json-framework/Tests/Data/comparatorsort/rfc4627/a/input b/third_party/objc/json-framework/Tests/Data/comparatorsort/rfc4627/a/input deleted file mode 100644 index 8454dc27867fb..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/comparatorsort/rfc4627/a/input +++ /dev/null @@ -1,13 +0,0 @@ - { - "Image": { - "Width": 800, - "Height": 600, - "Title": "View from 15th Floor", - "Thumbnail": { - "Url": "http://www.example.com/image/481989943", - "Height": 125, - "Width": "100" - }, - "IDs": [116, 943, 234, 38793] - } - } \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/comparatorsort/rfc4627/a/output b/third_party/objc/json-framework/Tests/Data/comparatorsort/rfc4627/a/output deleted file mode 100644 index b668287a469d0..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/comparatorsort/rfc4627/a/output +++ /dev/null @@ -1,18 +0,0 @@ -{ - "Image": { - "Height": 600, - "IDs": [ - 116, - 943, - 234, - 38793 - ], - "Thumbnail": { - "Height": 125, - "Url": "http://www.example.com/image/481989943", - "Width": "100" - }, - "Title": "View from 15th Floor", - "Width": 800 - } -} diff --git a/third_party/objc/json-framework/Tests/Data/format/basic/input b/third_party/objc/json-framework/Tests/Data/format/basic/input deleted file mode 100644 index 2e69327bb7740..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/format/basic/input +++ /dev/null @@ -1 +0,0 @@ -["one",2,{"foo":null,"quux":true,"bar":[1, 2, []]},{}] diff --git a/third_party/objc/json-framework/Tests/Data/format/basic/output b/third_party/objc/json-framework/Tests/Data/format/basic/output deleted file mode 100644 index 7584dad338062..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/format/basic/output +++ /dev/null @@ -1,16 +0,0 @@ -[ - "one", - 2, - { - "bar": [ - 1, - 2, - [ - ] - ], - "foo": null, - "quux": true - }, - { - } -] diff --git a/third_party/objc/json-framework/Tests/Data/format/json.org/README b/third_party/objc/json-framework/Tests/Data/format/json.org/README deleted file mode 100644 index 5110cde5a3c06..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/format/json.org/README +++ /dev/null @@ -1 +0,0 @@ -Source: http://json.org/example.html \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/format/json.org/a/input b/third_party/objc/json-framework/Tests/Data/format/json.org/a/input deleted file mode 100644 index c8f1d8c61f9da..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/format/json.org/a/input +++ /dev/null @@ -1,22 +0,0 @@ -{ - "glossary": { - "title": "example glossary", - "GlossDiv": { - "title": "S", - "GlossList": { - "GlossEntry": { - "ID": "SGML", - "SortAs": "SGML", - "GlossTerm": "Standard Generalized Markup Language", - "Acronym": "SGML", - "Abbrev": "ISO 8879:1986", - "GlossDef": { - "para": "A meta-markup language, used to create markup languages such as DocBook.", - "GlossSeeAlso": ["GML", "XML"] - }, - "GlossSee": "markup" - } - } - } - } -} diff --git a/third_party/objc/json-framework/Tests/Data/format/json.org/a/output b/third_party/objc/json-framework/Tests/Data/format/json.org/a/output deleted file mode 100644 index db268bf53d3ec..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/format/json.org/a/output +++ /dev/null @@ -1,25 +0,0 @@ -{ - "glossary": { - "GlossDiv": { - "GlossList": { - "GlossEntry": { - "Abbrev": "ISO 8879:1986", - "Acronym": "SGML", - "GlossDef": { - "GlossSeeAlso": [ - "GML", - "XML" - ], - "para": "A meta-markup language, used to create markup languages such as DocBook." - }, - "GlossSee": "markup", - "GlossTerm": "Standard Generalized Markup Language", - "ID": "SGML", - "SortAs": "SGML" - } - }, - "title": "S" - }, - "title": "example glossary" - } -} diff --git a/third_party/objc/json-framework/Tests/Data/format/json.org/b/input b/third_party/objc/json-framework/Tests/Data/format/json.org/b/input deleted file mode 100644 index 5600991a4c7a0..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/format/json.org/b/input +++ /dev/null @@ -1,11 +0,0 @@ -{"menu": { - "id": "file", - "value": "File", - "popup": { - "menuitem": [ - {"value": "New", "onclick": "CreateNewDoc()"}, - {"value": "Open", "onclick": "OpenDoc()"}, - {"value": "Close", "onclick": "CloseDoc()"} - ] - } -}} diff --git a/third_party/objc/json-framework/Tests/Data/format/json.org/b/output b/third_party/objc/json-framework/Tests/Data/format/json.org/b/output deleted file mode 100644 index 05af1d760d61f..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/format/json.org/b/output +++ /dev/null @@ -1,22 +0,0 @@ -{ - "menu": { - "id": "file", - "popup": { - "menuitem": [ - { - "onclick": "CreateNewDoc()", - "value": "New" - }, - { - "onclick": "OpenDoc()", - "value": "Open" - }, - { - "onclick": "CloseDoc()", - "value": "Close" - } - ] - }, - "value": "File" - } -} diff --git a/third_party/objc/json-framework/Tests/Data/format/json.org/c/input b/third_party/objc/json-framework/Tests/Data/format/json.org/c/input deleted file mode 100644 index 9b820d853ffa7..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/format/json.org/c/input +++ /dev/null @@ -1,26 +0,0 @@ -{"widget": { - "debug": "on", - "window": { - "title": "Sample Konfabulator Widget", - "name": "main_window", - "width": 500, - "height": 500 - }, - "image": { - "src": "Images/Sun.png", - "name": "sun1", - "hOffset": 250, - "vOffset": 250, - "alignment": "center" - }, - "text": { - "data": "Click Here", - "size": 36, - "style": "bold", - "name": "text1", - "hOffset": 250, - "vOffset": 100, - "alignment": "center", - "onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;" - } -}} diff --git a/third_party/objc/json-framework/Tests/Data/format/json.org/c/output b/third_party/objc/json-framework/Tests/Data/format/json.org/c/output deleted file mode 100644 index 3b4c09ee86a0a..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/format/json.org/c/output +++ /dev/null @@ -1,28 +0,0 @@ -{ - "widget": { - "debug": "on", - "image": { - "alignment": "center", - "hOffset": 250, - "name": "sun1", - "src": "Images/Sun.png", - "vOffset": 250 - }, - "text": { - "alignment": "center", - "data": "Click Here", - "hOffset": 250, - "name": "text1", - "onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;", - "size": 36, - "style": "bold", - "vOffset": 100 - }, - "window": { - "height": 500, - "name": "main_window", - "title": "Sample Konfabulator Widget", - "width": 500 - } - } -} diff --git a/third_party/objc/json-framework/Tests/Data/format/json.org/d/input b/third_party/objc/json-framework/Tests/Data/format/json.org/d/input deleted file mode 100644 index d540b57f0df68..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/format/json.org/d/input +++ /dev/null @@ -1,88 +0,0 @@ -{"web-app": { - "servlet": [ - { - "servlet-name": "cofaxCDS", - "servlet-class": "org.cofax.cds.CDSServlet", - "init-param": { - "configGlossary:installationAt": "Philadelphia, PA", - "configGlossary:adminEmail": "ksm@pobox.com", - "configGlossary:poweredBy": "Cofax", - "configGlossary:poweredByIcon": "/images/cofax.gif", - "configGlossary:staticPath": "/content/static", - "templateProcessorClass": "org.cofax.WysiwygTemplate", - "templateLoaderClass": "org.cofax.FilesTemplateLoader", - "templatePath": "templates", - "templateOverridePath": "", - "defaultListTemplate": "listTemplate.htm", - "defaultFileTemplate": "articleTemplate.htm", - "useJSP": false, - "jspListTemplate": "listTemplate.jsp", - "jspFileTemplate": "articleTemplate.jsp", - "cachePackageTagsTrack": 200, - "cachePackageTagsStore": 200, - "cachePackageTagsRefresh": 60, - "cacheTemplatesTrack": 100, - "cacheTemplatesStore": 50, - "cacheTemplatesRefresh": 15, - "cachePagesTrack": 200, - "cachePagesStore": 100, - "cachePagesRefresh": 10, - "cachePagesDirtyRead": 10, - "searchEngineListTemplate": "forSearchEnginesList.htm", - "searchEngineFileTemplate": "forSearchEngines.htm", - "searchEngineRobotsDb": "WEB-INF/robots.db", - "useDataStore": true, - "dataStoreClass": "org.cofax.SqlDataStore", - "redirectionClass": "org.cofax.SqlRedirection", - "dataStoreName": "cofax", - "dataStoreDriver": "com.microsoft.jdbc.sqlserver.SQLServerDriver", - "dataStoreUrl": "jdbc:microsoft:sqlserver://LOCALHOST:1433;DatabaseName=goon", - "dataStoreUser": "sa", - "dataStorePassword": "dataStoreTestQuery", - "dataStoreTestQuery": "SET NOCOUNT ON;select test='test';", - "dataStoreLogFile": "/usr/local/tomcat/logs/datastore.log", - "dataStoreInitConns": 10, - "dataStoreMaxConns": 100, - "dataStoreConnUsageLimit": 100, - "dataStoreLogLevel": "debug", - "maxUrlLength": 500}}, - { - "servlet-name": "cofaxEmail", - "servlet-class": "org.cofax.cds.EmailServlet", - "init-param": { - "mailHost": "mail1", - "mailHostOverride": "mail2"}}, - { - "servlet-name": "cofaxAdmin", - "servlet-class": "org.cofax.cds.AdminServlet"}, - - { - "servlet-name": "fileServlet", - "servlet-class": "org.cofax.cds.FileServlet"}, - { - "servlet-name": "cofaxTools", - "servlet-class": "org.cofax.cms.CofaxToolsServlet", - "init-param": { - "templatePath": "toolstemplates/", - "log": 1, - "logLocation": "/usr/local/tomcat/logs/CofaxTools.log", - "logMaxSize": "", - "dataLog": 1, - "dataLogLocation": "/usr/local/tomcat/logs/dataLog.log", - "dataLogMaxSize": "", - "removePageCache": "/content/admin/remove?cache=pages&id=", - "removeTemplateCache": "/content/admin/remove?cache=templates&id=", - "fileTransferFolder": "/usr/local/tomcat/webapps/content/fileTransferFolder", - "lookInContext": 1, - "adminGroupID": 4, - "betaServer": true}}], - "servlet-mapping": { - "cofaxCDS": "/", - "cofaxEmail": "/cofaxutil/aemail/*", - "cofaxAdmin": "/admin/*", - "fileServlet": "/static/*", - "cofaxTools": "/tools/*"}, - - "taglib": { - "taglib-uri": "cofax.tld", - "taglib-location": "/WEB-INF/tlds/cofax.tld"}}} \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/format/json.org/d/output b/third_party/objc/json-framework/Tests/Data/format/json.org/d/output deleted file mode 100644 index 538bba2ac86d5..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/format/json.org/d/output +++ /dev/null @@ -1,100 +0,0 @@ -{ - "web-app": { - "servlet": [ - { - "init-param": { - "cachePackageTagsRefresh": 60, - "cachePackageTagsStore": 200, - "cachePackageTagsTrack": 200, - "cachePagesDirtyRead": 10, - "cachePagesRefresh": 10, - "cachePagesStore": 100, - "cachePagesTrack": 200, - "cacheTemplatesRefresh": 15, - "cacheTemplatesStore": 50, - "cacheTemplatesTrack": 100, - "configGlossary:adminEmail": "ksm@pobox.com", - "configGlossary:installationAt": "Philadelphia, PA", - "configGlossary:poweredBy": "Cofax", - "configGlossary:poweredByIcon": "/images/cofax.gif", - "configGlossary:staticPath": "/content/static", - "dataStoreClass": "org.cofax.SqlDataStore", - "dataStoreConnUsageLimit": 100, - "dataStoreDriver": "com.microsoft.jdbc.sqlserver.SQLServerDriver", - "dataStoreInitConns": 10, - "dataStoreLogFile": "/usr/local/tomcat/logs/datastore.log", - "dataStoreLogLevel": "debug", - "dataStoreMaxConns": 100, - "dataStoreName": "cofax", - "dataStorePassword": "dataStoreTestQuery", - "dataStoreTestQuery": "SET NOCOUNT ON;select test='test';", - "dataStoreUrl": "jdbc:microsoft:sqlserver://LOCALHOST:1433;DatabaseName=goon", - "dataStoreUser": "sa", - "defaultFileTemplate": "articleTemplate.htm", - "defaultListTemplate": "listTemplate.htm", - "jspFileTemplate": "articleTemplate.jsp", - "jspListTemplate": "listTemplate.jsp", - "maxUrlLength": 500, - "redirectionClass": "org.cofax.SqlRedirection", - "searchEngineFileTemplate": "forSearchEngines.htm", - "searchEngineListTemplate": "forSearchEnginesList.htm", - "searchEngineRobotsDb": "WEB-INF/robots.db", - "templateLoaderClass": "org.cofax.FilesTemplateLoader", - "templateOverridePath": "", - "templatePath": "templates", - "templateProcessorClass": "org.cofax.WysiwygTemplate", - "useDataStore": true, - "useJSP": false - }, - "servlet-class": "org.cofax.cds.CDSServlet", - "servlet-name": "cofaxCDS" - }, - { - "init-param": { - "mailHost": "mail1", - "mailHostOverride": "mail2" - }, - "servlet-class": "org.cofax.cds.EmailServlet", - "servlet-name": "cofaxEmail" - }, - { - "servlet-class": "org.cofax.cds.AdminServlet", - "servlet-name": "cofaxAdmin" - }, - { - "servlet-class": "org.cofax.cds.FileServlet", - "servlet-name": "fileServlet" - }, - { - "init-param": { - "adminGroupID": 4, - "betaServer": true, - "dataLog": 1, - "dataLogLocation": "/usr/local/tomcat/logs/dataLog.log", - "dataLogMaxSize": "", - "fileTransferFolder": "/usr/local/tomcat/webapps/content/fileTransferFolder", - "log": 1, - "logLocation": "/usr/local/tomcat/logs/CofaxTools.log", - "logMaxSize": "", - "lookInContext": 1, - "removePageCache": "/content/admin/remove?cache=pages&id=", - "removeTemplateCache": "/content/admin/remove?cache=templates&id=", - "templatePath": "toolstemplates/" - }, - "servlet-class": "org.cofax.cms.CofaxToolsServlet", - "servlet-name": "cofaxTools" - } - ], - "servlet-mapping": { - "cofaxAdmin": "/admin/*", - "cofaxCDS": "/", - "cofaxEmail": "/cofaxutil/aemail/*", - "cofaxTools": "/tools/*", - "fileServlet": "/static/*" - }, - "taglib": { - "taglib-location": "/WEB-INF/tlds/cofax.tld", - "taglib-uri": "cofax.tld" - } - } -} diff --git a/third_party/objc/json-framework/Tests/Data/format/json.org/e/input b/third_party/objc/json-framework/Tests/Data/format/json.org/e/input deleted file mode 100644 index 49980ca25bcc4..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/format/json.org/e/input +++ /dev/null @@ -1,27 +0,0 @@ -{"menu": { - "header": "SVG Viewer", - "items": [ - {"id": "Open"}, - {"id": "OpenNew", "label": "Open New"}, - null, - {"id": "ZoomIn", "label": "Zoom In"}, - {"id": "ZoomOut", "label": "Zoom Out"}, - {"id": "OriginalView", "label": "Original View"}, - null, - {"id": "Quality"}, - {"id": "Pause"}, - {"id": "Mute"}, - null, - {"id": "Find", "label": "Find..."}, - {"id": "FindAgain", "label": "Find Again"}, - {"id": "Copy"}, - {"id": "CopyAgain", "label": "Copy Again"}, - {"id": "CopySVG", "label": "Copy SVG"}, - {"id": "ViewSVG", "label": "View SVG"}, - {"id": "ViewSource", "label": "View Source"}, - {"id": "SaveAs", "label": "Save As"}, - null, - {"id": "Help"}, - {"id": "About", "label": "About Adobe CVG Viewer..."} - ] -}} diff --git a/third_party/objc/json-framework/Tests/Data/format/json.org/e/output b/third_party/objc/json-framework/Tests/Data/format/json.org/e/output deleted file mode 100644 index 114f8906b8205..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/format/json.org/e/output +++ /dev/null @@ -1,77 +0,0 @@ -{ - "menu": { - "header": "SVG Viewer", - "items": [ - { - "id": "Open" - }, - { - "id": "OpenNew", - "label": "Open New" - }, - null, - { - "id": "ZoomIn", - "label": "Zoom In" - }, - { - "id": "ZoomOut", - "label": "Zoom Out" - }, - { - "id": "OriginalView", - "label": "Original View" - }, - null, - { - "id": "Quality" - }, - { - "id": "Pause" - }, - { - "id": "Mute" - }, - null, - { - "id": "Find", - "label": "Find..." - }, - { - "id": "FindAgain", - "label": "Find Again" - }, - { - "id": "Copy" - }, - { - "id": "CopyAgain", - "label": "Copy Again" - }, - { - "id": "CopySVG", - "label": "Copy SVG" - }, - { - "id": "ViewSVG", - "label": "View SVG" - }, - { - "id": "ViewSource", - "label": "View Source" - }, - { - "id": "SaveAs", - "label": "Save As" - }, - null, - { - "id": "Help" - }, - { - "id": "About", - "label": "About Adobe CVG Viewer..." - } - ] - } -} diff --git a/third_party/objc/json-framework/Tests/Data/format/rfc4627/README b/third_party/objc/json-framework/Tests/Data/format/rfc4627/README deleted file mode 100644 index 2bbac3862c125..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/format/rfc4627/README +++ /dev/null @@ -1 +0,0 @@ -Source: http://www.ietf.org/rfc/rfc4627.txt?number=4627 \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/format/rfc4627/a/input b/third_party/objc/json-framework/Tests/Data/format/rfc4627/a/input deleted file mode 100644 index 8454dc27867fb..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/format/rfc4627/a/input +++ /dev/null @@ -1,13 +0,0 @@ - { - "Image": { - "Width": 800, - "Height": 600, - "Title": "View from 15th Floor", - "Thumbnail": { - "Url": "http://www.example.com/image/481989943", - "Height": 125, - "Width": "100" - }, - "IDs": [116, 943, 234, 38793] - } - } \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/format/rfc4627/a/output b/third_party/objc/json-framework/Tests/Data/format/rfc4627/a/output deleted file mode 100644 index b668287a469d0..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/format/rfc4627/a/output +++ /dev/null @@ -1,18 +0,0 @@ -{ - "Image": { - "Height": 600, - "IDs": [ - 116, - 943, - 234, - 38793 - ], - "Thumbnail": { - "Height": 125, - "Url": "http://www.example.com/image/481989943", - "Width": "100" - }, - "Title": "View from 15th Floor", - "Width": 800 - } -} diff --git a/third_party/objc/json-framework/Tests/Data/format/rfc4627/b/input b/third_party/objc/json-framework/Tests/Data/format/rfc4627/b/input deleted file mode 100644 index 29cc77620f898..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/format/rfc4627/b/input +++ /dev/null @@ -1,22 +0,0 @@ - [ - { - "precision": "zip", - "Latitude": 37.7668, - "Longitude": -122.3959, - "Address": "", - "City": "SAN FRANCISCO", - "State": "CA", - "Zip": "94107", - "Country": "US" - }, - { - "precision": "zip", - "Latitude": 37.371991, - "Longitude": -122.026020, - "Address": "", - "City": "SUNNYVALE", - "State": "CA", - "Zip": "94085", - "Country": "US" - } - ] diff --git a/third_party/objc/json-framework/Tests/Data/format/rfc4627/b/output b/third_party/objc/json-framework/Tests/Data/format/rfc4627/b/output deleted file mode 100644 index 42017b1644f48..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/format/rfc4627/b/output +++ /dev/null @@ -1,22 +0,0 @@ -[ - { - "Address": "", - "City": "SAN FRANCISCO", - "Country": "US", - "Latitude": 37.7668, - "Longitude": -122.3959, - "State": "CA", - "Zip": "94107", - "precision": "zip" - }, - { - "Address": "", - "City": "SUNNYVALE", - "Country": "US", - "Latitude": 37.371991, - "Longitude": -122.02602, - "State": "CA", - "Zip": "94085", - "precision": "zip" - } -] diff --git a/third_party/objc/json-framework/Tests/Data/invalid/array/eof-1/error b/third_party/objc/json-framework/Tests/Data/invalid/array/eof-1/error deleted file mode 100644 index a3eac87956869..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/array/eof-1/error +++ /dev/null @@ -1 +0,0 @@ -Unexpected end of input diff --git a/third_party/objc/json-framework/Tests/Data/invalid/array/eof-1/input b/third_party/objc/json-framework/Tests/Data/invalid/array/eof-1/input deleted file mode 100644 index 558ed37d93c5c..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/array/eof-1/input +++ /dev/null @@ -1 +0,0 @@ -[ diff --git a/third_party/objc/json-framework/Tests/Data/invalid/array/eof-2/error b/third_party/objc/json-framework/Tests/Data/invalid/array/eof-2/error deleted file mode 100644 index a3eac87956869..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/array/eof-2/error +++ /dev/null @@ -1 +0,0 @@ -Unexpected end of input diff --git a/third_party/objc/json-framework/Tests/Data/invalid/array/eof-2/input b/third_party/objc/json-framework/Tests/Data/invalid/array/eof-2/input deleted file mode 100644 index 7d85cb2ae85eb..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/array/eof-2/input +++ /dev/null @@ -1 +0,0 @@ -[1 diff --git a/third_party/objc/json-framework/Tests/Data/invalid/array/eof-3/error b/third_party/objc/json-framework/Tests/Data/invalid/array/eof-3/error deleted file mode 100644 index a3eac87956869..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/array/eof-3/error +++ /dev/null @@ -1 +0,0 @@ -Unexpected end of input diff --git a/third_party/objc/json-framework/Tests/Data/invalid/array/eof-3/input b/third_party/objc/json-framework/Tests/Data/invalid/array/eof-3/input deleted file mode 100644 index 2534919f5e838..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/array/eof-3/input +++ /dev/null @@ -1 +0,0 @@ -[[] diff --git a/third_party/objc/json-framework/Tests/Data/invalid/array/eof-4/error b/third_party/objc/json-framework/Tests/Data/invalid/array/eof-4/error deleted file mode 100644 index a3eac87956869..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/array/eof-4/error +++ /dev/null @@ -1 +0,0 @@ -Unexpected end of input diff --git a/third_party/objc/json-framework/Tests/Data/invalid/array/eof-4/input b/third_party/objc/json-framework/Tests/Data/invalid/array/eof-4/input deleted file mode 100644 index f950969295790..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/array/eof-4/input +++ /dev/null @@ -1 +0,0 @@ -["a] \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/invalid/boolean/false/error b/third_party/objc/json-framework/Tests/Data/invalid/boolean/false/error deleted file mode 100644 index 06dfb06eefab7..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/boolean/false/error +++ /dev/null @@ -1 +0,0 @@ -Expected 'false' after initial 'f' diff --git a/third_party/objc/json-framework/Tests/Data/invalid/boolean/false/input b/third_party/objc/json-framework/Tests/Data/invalid/boolean/false/input deleted file mode 100644 index 5257238fcbdb9..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/boolean/false/input +++ /dev/null @@ -1 +0,0 @@ -[failing diff --git a/third_party/objc/json-framework/Tests/Data/invalid/boolean/true/error b/third_party/objc/json-framework/Tests/Data/invalid/boolean/true/error deleted file mode 100644 index 14ff3b0fef22a..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/boolean/true/error +++ /dev/null @@ -1 +0,0 @@ -Expected 'true' after initial 't' diff --git a/third_party/objc/json-framework/Tests/Data/invalid/boolean/true/input b/third_party/objc/json-framework/Tests/Data/invalid/boolean/true/input deleted file mode 100644 index 52b9bc27568ad..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/boolean/true/input +++ /dev/null @@ -1 +0,0 @@ -[truth diff --git a/third_party/objc/json-framework/Tests/Data/invalid/depth/error b/third_party/objc/json-framework/Tests/Data/invalid/depth/error deleted file mode 100644 index 65cd336c50194..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/depth/error +++ /dev/null @@ -1 +0,0 @@ -Input depth exceeds max depth of 4 diff --git a/third_party/objc/json-framework/Tests/Data/invalid/depth/input b/third_party/objc/json-framework/Tests/Data/invalid/depth/input deleted file mode 100644 index 8748994248511..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/depth/input +++ /dev/null @@ -1 +0,0 @@ -[{"foo":[{"bar":[ diff --git a/third_party/objc/json-framework/Tests/Data/invalid/encoding/utf8/error b/third_party/objc/json-framework/Tests/Data/invalid/encoding/utf8/error deleted file mode 100644 index 6dcfd89957b7b..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/encoding/utf8/error +++ /dev/null @@ -1 +0,0 @@ -Broken Unicode encoding diff --git a/third_party/objc/json-framework/Tests/Data/invalid/encoding/utf8/input b/third_party/objc/json-framework/Tests/Data/invalid/encoding/utf8/input deleted file mode 100644 index d1d4699d55d34..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/encoding/utf8/input +++ /dev/null @@ -1 +0,0 @@ -["UTF-8 decoder capability and stress test\n----------------------------------------\n\nMarkus Kuhn - 2003-02-19\n\nThis test file can help you examine, how your UTF-8 decoder handles\nvarious types of correct, malformed, or otherwise interesting UTF-8\nsequences. This file is not meant to be a conformance test. It does\nnot prescribes any particular outcome and therefore there is no way to\n\"pass\" or \"fail\" this test file, even though the texts suggests a\npreferable decoder behaviour at some places. The aim is instead to\nhelp you think about and test the behaviour of your UTF-8 on a\nsystematic collection of unusual inputs. Experience so far suggests\nthat most first-time authors of UTF-8 decoders find at least one\nserious problem in their decoder by using this file.\n\nThe test lines below cover boundary conditions, malformed UTF-8\nsequences as well as correctly encoded UTF-8 sequences of Unicode code\npoints that should never occur in a correct UTF-8 file.\n\nAccording to ISO 10646-1:2000, sections D.7 and 2.3c, a device\nreceiving UTF-8 shall interpret a \"malformed sequence in the same way\nthat it interprets a character that is outside the adopted subset\" and\n\"characters that are not within the adopted subset shall be indicated\nto the user\" by a receiving device. A quite commonly used approach in\nUTF-8 decoders is to replace any malformed UTF-8 sequence by a\nreplacement character (U+FFFD), which looks a bit like an inverted\nquestion mark, or a similar symbol. It might be a good idea to\nvisually distinguish a malformed UTF-8 sequence from a correctly\nencoded Unicode character that is just not available in the current\nfont but otherwise fully legal, even though ISO 10646-1 doesn't\nmandate this. In any case, just ignoring malformed sequences or\nunavailable characters does not conform to ISO 10646, will make\ndebugging more difficult, and can lead to user confusion.\n\nPlease check, whether a malformed UTF-8 sequence is (1) represented at\nall, (2) represented by exactly one single replacement character (or\nequivalent signal), and (3) the following quotation mark after an\nillegal UTF-8 sequence is correctly displayed, i.e. proper\nresynchronization takes place immageately after any malformed\nsequence. This file says \"THE END\" in the last line, so if you don't\nsee that, your decoder crashed somehow before, which should always be\ncause for concern.\n\nAll lines in this file are exactly 79 characters long (plus the line\nfeed). In addition, all lines end with \"|\", except for the two test\nlines 2.1.1 and 2.2.1, which contain non-printable ASCII controls\nU+0000 and U+007F. If you display this file with a fixed-width font,\nthese \"|\" characters should all line up in column 79 (right margin).\nThis allows you to test quickly, whether your UTF-8 decoder finds the\ncorrect number of characters in every line, that is whether each\nmalformed sequences is replaced by a single replacement character.\n\nNote that as an alternative to the notion of malformed sequence used\nNote that as an alternative to the notion of malformed sequence used\npreferable) solution to represent each individual byte of a malformed\nsequence by a replacement character. If you follow this strategy in\nyour decoder, then please ignore the \"|\" column.\n\n\nHere come the tests: |\n |\n1 Some correct UTF-8 text |\n1 Some correct UTF-8 text |\nYou should see the Greek word 'kosme': \"κόσμε\" |\n |\n2 Boundary condition test cases |\n |\n2.1 First possible sequence of a certain length |\n |\n2.1.1 1 byte (U-00000000): \"NUL\" \n2.1.2 2 bytes (U-00000080): \"€\" |\n2.1.3 3 bytes (U-00000800): \"à €\" |\n2.1.4 4 bytes (U-00010000): \"ð€€\" |\n2.1.5 5 bytes (U-00200000): \"øˆ€€€\" |\n2.1.6 6 bytes (U-04000000): \"ü„€€€€\" |\n |\n2.2 Last possible sequence of a certain length |\n |\n2.2.1 1 byte (U-0000007F): \"\" \n2.2.2 2 bytes (U-000007FF): \"ß¿\" |\n2.2.3 3 bytes (U-0000FFFF): \"ï¿¿\" |\n2.2.4 4 bytes (U-001FFFFF): \"÷¿¿¿\" |\n2.2.5 5 bytes (U-03FFFFFF): \"û¿¿¿¿\" |\n2.2.6 6 bytes (U-7FFFFFFF): \"ý¿¿¿¿¿\" |\n |\n2.3 Other boundary conditions |\n |\n2.3.1 U-0000D7FF = ed 9f bf = \"퟿\" |\n2.3.2 U-0000E000 = ee 80 80 = \"\" |\n2.3.3 U-0000FFFD = ef bf bd = \"�\" |\n2.3.4 U-0010FFFF = f4 8f bf bf = \"ô¿¿\" |\n2.3.5 U-00110000 = f4 90 80 80 = \"ô€€\" |\n |\n3 Malformed sequences |\n |\n3.1 Unexpected continuation bytes |\n |\nEach unexpected continuation byte should be separately signalled as a |\nmalformed sequence of its own. |\n |\n3.1.1 First continuation byte 0x80: \"€\" |\n3.1.2 Last continuation byte 0xbf: \"¿\" |\n |\n3.1.3 2 continuation bytes: \"€¿\" |\n3.1.4 3 continuation bytes: \"€¿€\" |\n3.1.5 4 continuation bytes: \"€¿€¿\" |\n3.1.6 5 continuation bytes: \"€¿€¿€\" |\n3.1.7 6 continuation bytes: \"€¿€¿€¿\" |\n3.1.8 7 continuation bytes: \"€¿€¿€¿€\" |\n |\n3.1.9 Sequence of all 64 possible continuation bytes (0x80-0xbf): |\n |\n \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ |\n ‘’“”•–—˜™š›œžŸ |\n  ¡¢£¤¥¦§¨©ª«¬­®¯ |\n °±²³´µ¶·¸¹º»¼½¾¿\" |\n |\n3.2 Lonely start characters |\n |\n3.2.1 All 32 first bytes of 2-byte sequences (0xc0-0xdf), |\n each followed by a space character: |\n |\n \"À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï |\n Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß \" |\n |\n3.2.2 All 16 first bytes of 3-byte sequences (0xe0-0xef), |\n each followed by a space character: |\n |\n \"à á â ã ä å æ ç è é ê ë ì í î ï \" |\n |\n3.2.3 All 8 first bytes of 4-byte sequences (0xf0-0xf7), |\n each followed by a space character: |\n |\n \"ð ñ ò ó ô õ ö ÷ \" |\n |\n3.2.4 All 4 first bytes of 5-byte sequences (0xf8-0xfb), |\n each followed by a space character: |\n |\n \"ø ù ú û \" |\n |\n3.2.5 All 2 first bytes of 6-byte sequences (0xfc-0xfd), |\n each followed by a space character: |\n |\n \"ü ý \" |\n |\n3.3 Sequences with last continuation byte missing |\n |\nAll bytes of an incomplete sequence should be signalled as a single |\nmalformed sequence, i.e., you should see only a single replacement |\ncharacter in each of the next 10 tests. (Characters as in section 2) |\n |\n3.3.1 2-byte sequence with last byte missing (U+0000): \"À\" |\n3.3.2 3-byte sequence with last byte missing (U+0000): \"à€\" |\n3.3.3 4-byte sequence with last byte missing (U+0000): \"ð€€\" |\n3.3.4 5-byte sequence with last byte missing (U+0000): \"ø€€€\" |\n3.3.5 6-byte sequence with last byte missing (U+0000): \"ü€€€€\" |\n3.3.6 2-byte sequence with last byte missing (U-000007FF): \"ß\" |\n3.3.7 3-byte sequence with last byte missing (U-0000FFFF): \"ï¿\" |\n3.3.8 4-byte sequence with last byte missing (U-001FFFFF): \"÷¿¿\" |\n3.3.9 5-byte sequence with last byte missing (U-03FFFFFF): \"û¿¿¿\" |\n3.3.10 6-byte sequence with last byte missing (U-7FFFFFFF): \"ý¿¿¿¿\" |\n |\n3.4 Concatenation of incomplete sequences |\n |\nAll the 10 sequences of 3.3 concatenated, you should see 10 malformed |\nsequences being signalled: |\n |\n \"Àà€ð€€ø€€€ü€€€€ßï¿÷¿¿û¿¿¿ý¿¿¿¿\" |\n |\n3.5 Impossible bytes |\n |\nThe following two bytes cannot appear in a correct UTF-8 string |\n |\n3.5.1 fe = \"þ\" |\n3.5.2 ff = \"ÿ\" |\n3.5.3 fe fe ff ff = \"þþÿÿ\" |\n |\n4 Overlong sequences |\n |\nThe following sequences are not malformed according to the letter of |\nthe Unicode 2.0 standard. However, they are longer then necessary and |\na correct UTF-8 encoder is not allowed to produce them. A \"safe UTF-8 |\ndecoder\" should reject them just like malformed sequences for two |\nreasons: (1) It helps to debug applications if overlong sequences are |\nnot treated as valid representations of characters, because this helps |\nto spot problems more quickly. (2) Overlong sequences provide |\nalternative representations of characters, that could maliciously be |\nused to bypass filters that check only for ASCII characters. For |\ninstance, a 2-byte encoded line feed (LF) would not be caught by a |\nline counter that counts only 0x0a bytes, but it would still be |\nprocessed as a line feed by an unsafe UTF-8 decoder later in the |\npipeline. From a security point of view, ASCII compatibility of UTF-8 |\nsequences means also, that ASCII characters are *only* allowed to be |\nrepresented by ASCII bytes in the range 0x00-0x7f. To ensure this |\naspect of ASCII compatibility, use only \"safe UTF-8 decoders\" that |\nreject overlong UTF-8 sequences for which a shorter encoding exists. |\n |\n4.1 Examples of an overlong ASCII character |\n |\nWith a safe UTF-8 decoder, all of the following five overlong |\nrepresentations of the ASCII character slash (\"/\") should be rejected |\nlike a malformed UTF-8 sequence, for instance by substituting it with |\na replacement character. If you see a slash below, you do not have a |\nsafe UTF-8 decoder! |\n |\n4.1.1 U+002F = c0 af = \"À¯\" |\n4.1.2 U+002F = e0 80 af = \"à€¯\" |\n4.1.3 U+002F = f0 80 80 af = \"ð€€¯\" |\n4.1.4 U+002F = f8 80 80 80 af = \"ø€€€¯\" |\n4.1.5 U+002F = fc 80 80 80 80 af = \"ü€€€€¯\" |\n |\n4.2 Maximum overlong sequences |\n |\nBelow you see the highest Unicode value that is still resulting in an |\noverlong sequence if represented with the given number of bytes. This |\nis a boundary test for safe UTF-8 decoders. All five characters should |\nbe rejected like malformed UTF-8 sequences. |\n |\n4.2.1 U-0000007F = c1 bf = \"Á¿\" |\n4.2.2 U-000007FF = e0 9f bf = \"àŸ¿\" |\n4.2.3 U-0000FFFF = f0 8f bf bf = \"ð¿¿\" |\n4.2.4 U-001FFFFF = f8 87 bf bf bf = \"ø‡¿¿¿\" |\n4.2.5 U-03FFFFFF = fc 83 bf bf bf bf = \"üƒ¿¿¿¿\" |\n |\n4.3 Overlong representation of the NUL character |\n |\nThe following five sequences should also be rejected like malformed |\nUTF-8 sequences and should not be treated like the ASCII NUL |\ncharacter. |\n |\n4.3.1 U+0000 = c0 80 = \"À€\" |\n4.3.2 U+0000 = e0 80 80 = \"à€€\" |\n4.3.3 U+0000 = f0 80 80 80 = \"ð€€€\" |\n4.3.4 U+0000 = f8 80 80 80 80 = \"ø€€€€\" |\n4.3.5 U+0000 = fc 80 80 80 80 80 = \"ü€€€€€\" |\n |\n5 Illegal code positions |\n |\nThe following UTF-8 sequences should be rejected like malformed |\nsequences, because they never represent valid ISO 10646 characters and |\na UTF-8 decoder that accepts them might introduce security problems |\ncomparable to overlong UTF-8 sequences. |\n |\n5.1 Single UTF-16 surrogates |\n |\n5.1.1 U+D800 = ed a0 80 = \"í €\" |\n5.1.2 U+DB7F = ed ad bf = \"í­¿\" |\n5.1.3 U+DB80 = ed ae 80 = \"í®€\" |\n5.1.4 U+DBFF = ed af bf = \"í¯¿\" |\n5.1.5 U+DC00 = ed b0 80 = \"í°€\" |\n5.1.6 U+DF80 = ed be 80 = \"í¾€\" |\n5.1.7 U+DFFF = ed bf bf = \"í¿¿\" |\n |\n5.2 Paired UTF-16 surrogates |\n |\n5.2.1 U+D800 U+DC00 = ed a0 80 ed b0 80 = \"𐀀\" |\n5.2.2 U+D800 U+DFFF = ed a0 80 ed bf bf = \"𐏿\" |\n5.2.3 U+DB7F U+DC00 = ed ad bf ed b0 80 = \"í­¿í°€\" |\n5.2.4 U+DB7F U+DFFF = ed ad bf ed bf bf = \"í­¿í¿¿\" |\n5.2.5 U+DB80 U+DC00 = ed ae 80 ed b0 80 = \"󰀀\" |\n5.2.6 U+DB80 U+DFFF = ed ae 80 ed bf bf = \"󰏿\" |\n5.2.7 U+DBFF U+DC00 = ed af bf ed b0 80 = \"𐏿\" |\n5.2.8 U+DBFF U+DFFF = ed af bf ed bf bf = \"􏿿\" |\n |\n5.3 Other illegal code positions |\n |\n5.3.1 U+FFFE = ef bf be = \"￾\" |\n5.3.2 U+FFFF = ef bf bf = \"ï¿¿\" |\n |\nTHE END |\n"] diff --git a/third_party/objc/json-framework/Tests/Data/invalid/eof/error b/third_party/objc/json-framework/Tests/Data/invalid/eof/error deleted file mode 100644 index a3eac87956869..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/eof/error +++ /dev/null @@ -1 +0,0 @@ -Unexpected end of input diff --git a/third_party/objc/json-framework/Tests/Data/invalid/garbage/asterisk/error b/third_party/objc/json-framework/Tests/Data/invalid/garbage/asterisk/error deleted file mode 100644 index 0d8f963a7a693..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/garbage/asterisk/error +++ /dev/null @@ -1 +0,0 @@ -Illegal start of token [*] diff --git a/third_party/objc/json-framework/Tests/Data/invalid/garbage/asterisk/input b/third_party/objc/json-framework/Tests/Data/invalid/garbage/asterisk/input deleted file mode 100644 index f6bcc5bd67891..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/garbage/asterisk/input +++ /dev/null @@ -1 +0,0 @@ -[* diff --git a/third_party/objc/json-framework/Tests/Data/invalid/garbage/single-quote/error b/third_party/objc/json-framework/Tests/Data/invalid/garbage/single-quote/error deleted file mode 100644 index 3b20f6317de73..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/garbage/single-quote/error +++ /dev/null @@ -1 +0,0 @@ -Illegal start of token ['] diff --git a/third_party/objc/json-framework/Tests/Data/invalid/garbage/single-quote/input b/third_party/objc/json-framework/Tests/Data/invalid/garbage/single-quote/input deleted file mode 100644 index f2dd4d224d9b3..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/garbage/single-quote/input +++ /dev/null @@ -1 +0,0 @@ -[' diff --git a/third_party/objc/json-framework/Tests/Data/invalid/null/error b/third_party/objc/json-framework/Tests/Data/invalid/null/error deleted file mode 100644 index 6f82085eb55b9..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/null/error +++ /dev/null @@ -1 +0,0 @@ -Expected 'null' after initial 'n' diff --git a/third_party/objc/json-framework/Tests/Data/invalid/null/input b/third_party/objc/json-framework/Tests/Data/invalid/null/input deleted file mode 100644 index 4a04698db5525..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/null/input +++ /dev/null @@ -1 +0,0 @@ -[nill diff --git a/third_party/objc/json-framework/Tests/Data/invalid/number/leading-plus/error b/third_party/objc/json-framework/Tests/Data/invalid/number/leading-plus/error deleted file mode 100644 index 0b00748751e92..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/number/leading-plus/error +++ /dev/null @@ -1 +0,0 @@ -Leading + is illegal in number diff --git a/third_party/objc/json-framework/Tests/Data/invalid/number/leading-plus/input b/third_party/objc/json-framework/Tests/Data/invalid/number/leading-plus/input deleted file mode 100644 index 63cb3e797aba2..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/number/leading-plus/input +++ /dev/null @@ -1 +0,0 @@ -[+1 diff --git a/third_party/objc/json-framework/Tests/Data/invalid/number/leading-zero/error b/third_party/objc/json-framework/Tests/Data/invalid/number/leading-zero/error deleted file mode 100644 index dd41a0c565d67..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/number/leading-zero/error +++ /dev/null @@ -1 +0,0 @@ -Leading zero is illegal in number diff --git a/third_party/objc/json-framework/Tests/Data/invalid/number/leading-zero/input b/third_party/objc/json-framework/Tests/Data/invalid/number/leading-zero/input deleted file mode 100644 index 3a07129459360..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/number/leading-zero/input +++ /dev/null @@ -1 +0,0 @@ -[01 diff --git a/third_party/objc/json-framework/Tests/Data/invalid/number/no-digits-after-decimal/error b/third_party/objc/json-framework/Tests/Data/invalid/number/no-digits-after-decimal/error deleted file mode 100644 index 6c149d0c7e575..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/number/no-digits-after-decimal/error +++ /dev/null @@ -1 +0,0 @@ -No digits after decimal point diff --git a/third_party/objc/json-framework/Tests/Data/invalid/number/no-digits-after-decimal/input b/third_party/objc/json-framework/Tests/Data/invalid/number/no-digits-after-decimal/input deleted file mode 100644 index 894f9dbc5e37f..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/number/no-digits-after-decimal/input +++ /dev/null @@ -1 +0,0 @@ -[0. diff --git a/third_party/objc/json-framework/Tests/Data/invalid/number/no-digits-after-exponent-1/error b/third_party/objc/json-framework/Tests/Data/invalid/number/no-digits-after-exponent-1/error deleted file mode 100644 index 461d0d1fafb33..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/number/no-digits-after-exponent-1/error +++ /dev/null @@ -1 +0,0 @@ -No digits in exponent diff --git a/third_party/objc/json-framework/Tests/Data/invalid/number/no-digits-after-exponent-1/input b/third_party/objc/json-framework/Tests/Data/invalid/number/no-digits-after-exponent-1/input deleted file mode 100644 index 5d5119b111550..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/number/no-digits-after-exponent-1/input +++ /dev/null @@ -1 +0,0 @@ -[1e- diff --git a/third_party/objc/json-framework/Tests/Data/invalid/number/no-digits-after-exponent-2/error b/third_party/objc/json-framework/Tests/Data/invalid/number/no-digits-after-exponent-2/error deleted file mode 100644 index 461d0d1fafb33..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/number/no-digits-after-exponent-2/error +++ /dev/null @@ -1 +0,0 @@ -No digits in exponent diff --git a/third_party/objc/json-framework/Tests/Data/invalid/number/no-digits-after-exponent-2/input b/third_party/objc/json-framework/Tests/Data/invalid/number/no-digits-after-exponent-2/input deleted file mode 100644 index d3a79c2ba2d1a..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/number/no-digits-after-exponent-2/input +++ /dev/null @@ -1 +0,0 @@ -[1e diff --git a/third_party/objc/json-framework/Tests/Data/invalid/number/no-digits-after-exponent-3/error b/third_party/objc/json-framework/Tests/Data/invalid/number/no-digits-after-exponent-3/error deleted file mode 100644 index 461d0d1fafb33..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/number/no-digits-after-exponent-3/error +++ /dev/null @@ -1 +0,0 @@ -No digits in exponent diff --git a/third_party/objc/json-framework/Tests/Data/invalid/number/no-digits-after-exponent-3/input b/third_party/objc/json-framework/Tests/Data/invalid/number/no-digits-after-exponent-3/input deleted file mode 100644 index 81bb4fc4f6bf3..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/number/no-digits-after-exponent-3/input +++ /dev/null @@ -1 +0,0 @@ -[1e+ diff --git a/third_party/objc/json-framework/Tests/Data/invalid/number/no-digits-after-minus/error b/third_party/objc/json-framework/Tests/Data/invalid/number/no-digits-after-minus/error deleted file mode 100644 index 2b0eb1c28bb51..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/number/no-digits-after-minus/error +++ /dev/null @@ -1 +0,0 @@ -No digits after initial minus diff --git a/third_party/objc/json-framework/Tests/Data/invalid/number/no-digits-after-minus/input b/third_party/objc/json-framework/Tests/Data/invalid/number/no-digits-after-minus/input deleted file mode 100644 index 31a3b4053b008..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/number/no-digits-after-minus/input +++ /dev/null @@ -1 +0,0 @@ -[- diff --git a/third_party/objc/json-framework/Tests/Data/invalid/number/overflow-exponent-1/error b/third_party/objc/json-framework/Tests/Data/invalid/number/overflow-exponent-1/error deleted file mode 100644 index 4406ef98ad65b..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/number/overflow-exponent-1/error +++ /dev/null @@ -1 +0,0 @@ -Exponent out of range diff --git a/third_party/objc/json-framework/Tests/Data/invalid/number/overflow-exponent-1/input b/third_party/objc/json-framework/Tests/Data/invalid/number/overflow-exponent-1/input deleted file mode 100644 index 71d2fc273f9ed..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/number/overflow-exponent-1/input +++ /dev/null @@ -1 +0,0 @@ -[1e128] diff --git a/third_party/objc/json-framework/Tests/Data/invalid/number/overflow-exponent-2/error b/third_party/objc/json-framework/Tests/Data/invalid/number/overflow-exponent-2/error deleted file mode 100644 index 4406ef98ad65b..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/number/overflow-exponent-2/error +++ /dev/null @@ -1 +0,0 @@ -Exponent out of range diff --git a/third_party/objc/json-framework/Tests/Data/invalid/number/overflow-exponent-2/input b/third_party/objc/json-framework/Tests/Data/invalid/number/overflow-exponent-2/input deleted file mode 100644 index b386b91fd899e..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/number/overflow-exponent-2/input +++ /dev/null @@ -1 +0,0 @@ -[1e-129] diff --git a/third_party/objc/json-framework/Tests/Data/invalid/number/overflow-mantissa/error b/third_party/objc/json-framework/Tests/Data/invalid/number/overflow-mantissa/error deleted file mode 100644 index 226a8a5bc7549..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/number/overflow-mantissa/error +++ /dev/null @@ -1 +0,0 @@ -Precision is too high diff --git a/third_party/objc/json-framework/Tests/Data/invalid/number/overflow-mantissa/input b/third_party/objc/json-framework/Tests/Data/invalid/number/overflow-mantissa/input deleted file mode 100644 index 8e6e809a32ec8..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/number/overflow-mantissa/input +++ /dev/null @@ -1 +0,0 @@ -[123456789012345678901234567890123456789] diff --git a/third_party/objc/json-framework/Tests/Data/invalid/object/eof-1/error b/third_party/objc/json-framework/Tests/Data/invalid/object/eof-1/error deleted file mode 100644 index a3eac87956869..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/object/eof-1/error +++ /dev/null @@ -1 +0,0 @@ -Unexpected end of input diff --git a/third_party/objc/json-framework/Tests/Data/invalid/object/eof-1/input b/third_party/objc/json-framework/Tests/Data/invalid/object/eof-1/input deleted file mode 100644 index 98232c64fce93..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/object/eof-1/input +++ /dev/null @@ -1 +0,0 @@ -{ diff --git a/third_party/objc/json-framework/Tests/Data/invalid/object/eof-2/error b/third_party/objc/json-framework/Tests/Data/invalid/object/eof-2/error deleted file mode 100644 index a3eac87956869..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/object/eof-2/error +++ /dev/null @@ -1 +0,0 @@ -Unexpected end of input diff --git a/third_party/objc/json-framework/Tests/Data/invalid/object/eof-2/input b/third_party/objc/json-framework/Tests/Data/invalid/object/eof-2/input deleted file mode 100644 index 107e6265c64a8..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/object/eof-2/input +++ /dev/null @@ -1 +0,0 @@ -{"a" diff --git a/third_party/objc/json-framework/Tests/Data/invalid/object/eof-3/error b/third_party/objc/json-framework/Tests/Data/invalid/object/eof-3/error deleted file mode 100644 index a3eac87956869..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/object/eof-3/error +++ /dev/null @@ -1 +0,0 @@ -Unexpected end of input diff --git a/third_party/objc/json-framework/Tests/Data/invalid/object/eof-3/input b/third_party/objc/json-framework/Tests/Data/invalid/object/eof-3/input deleted file mode 100644 index f68f262696056..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/object/eof-3/input +++ /dev/null @@ -1 +0,0 @@ -{"a": diff --git a/third_party/objc/json-framework/Tests/Data/invalid/object/eof-4/error b/third_party/objc/json-framework/Tests/Data/invalid/object/eof-4/error deleted file mode 100644 index a3eac87956869..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/object/eof-4/error +++ /dev/null @@ -1 +0,0 @@ -Unexpected end of input diff --git a/third_party/objc/json-framework/Tests/Data/invalid/object/eof-4/input b/third_party/objc/json-framework/Tests/Data/invalid/object/eof-4/input deleted file mode 100644 index 8c3441c824f32..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/object/eof-4/input +++ /dev/null @@ -1 +0,0 @@ -{"a":{} diff --git a/third_party/objc/json-framework/Tests/Data/invalid/string/ctrl-chars/newline/error b/third_party/objc/json-framework/Tests/Data/invalid/string/ctrl-chars/newline/error deleted file mode 100644 index fcf86fe4cbff5..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/string/ctrl-chars/newline/error +++ /dev/null @@ -1 +0,0 @@ -Unescaped control character [0x0A] diff --git a/third_party/objc/json-framework/Tests/Data/invalid/string/ctrl-chars/newline/input b/third_party/objc/json-framework/Tests/Data/invalid/string/ctrl-chars/newline/input deleted file mode 100644 index 9b30aac3d8a4a..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/string/ctrl-chars/newline/input +++ /dev/null @@ -1,2 +0,0 @@ -[" - diff --git a/third_party/objc/json-framework/Tests/Data/invalid/string/ctrl-chars/tab/error b/third_party/objc/json-framework/Tests/Data/invalid/string/ctrl-chars/tab/error deleted file mode 100644 index b727ec3d18bda..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/string/ctrl-chars/tab/error +++ /dev/null @@ -1 +0,0 @@ -Unescaped control character [0x09] diff --git a/third_party/objc/json-framework/Tests/Data/invalid/string/ctrl-chars/tab/input b/third_party/objc/json-framework/Tests/Data/invalid/string/ctrl-chars/tab/input deleted file mode 100644 index ea5f696e5d41d..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/string/ctrl-chars/tab/input +++ /dev/null @@ -1 +0,0 @@ -[" " diff --git a/third_party/objc/json-framework/Tests/Data/invalid/string/invalid-hex-quad/error b/third_party/objc/json-framework/Tests/Data/invalid/string/invalid-hex-quad/error deleted file mode 100644 index 6cc5878d968d7..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/string/invalid-hex-quad/error +++ /dev/null @@ -1 +0,0 @@ -Invalid hex quad diff --git a/third_party/objc/json-framework/Tests/Data/invalid/string/invalid-hex-quad/input b/third_party/objc/json-framework/Tests/Data/invalid/string/invalid-hex-quad/input deleted file mode 100644 index aa681fc4bc11e..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/string/invalid-hex-quad/input +++ /dev/null @@ -1 +0,0 @@ -["\udefg diff --git a/third_party/objc/json-framework/Tests/Data/invalid/string/unicode-invalid-high-surrogate/error b/third_party/objc/json-framework/Tests/Data/invalid/string/unicode-invalid-high-surrogate/error deleted file mode 100644 index 4fe64718ffa9c..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/string/unicode-invalid-high-surrogate/error +++ /dev/null @@ -1 +0,0 @@ -Invalid high character in surrogate pair diff --git a/third_party/objc/json-framework/Tests/Data/invalid/string/unicode-invalid-high-surrogate/input b/third_party/objc/json-framework/Tests/Data/invalid/string/unicode-invalid-high-surrogate/input deleted file mode 100644 index 4a1d124fd1993..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/string/unicode-invalid-high-surrogate/input +++ /dev/null @@ -1 +0,0 @@ -["\udd1ef diff --git a/third_party/objc/json-framework/Tests/Data/invalid/string/unicode-invalid-low-surrogate/error b/third_party/objc/json-framework/Tests/Data/invalid/string/unicode-invalid-low-surrogate/error deleted file mode 100644 index 0cb209fbcb68c..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/string/unicode-invalid-low-surrogate/error +++ /dev/null @@ -1 +0,0 @@ -Invalid low character in surrogate pair diff --git a/third_party/objc/json-framework/Tests/Data/invalid/string/unicode-invalid-low-surrogate/input b/third_party/objc/json-framework/Tests/Data/invalid/string/unicode-invalid-low-surrogate/input deleted file mode 100644 index 99250212f5ac4..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/string/unicode-invalid-low-surrogate/input +++ /dev/null @@ -1 +0,0 @@ -["\ud834\u001e diff --git a/third_party/objc/json-framework/Tests/Data/invalid/string/unicode-missing-low-surrogate/error b/third_party/objc/json-framework/Tests/Data/invalid/string/unicode-missing-low-surrogate/error deleted file mode 100644 index 9f36b7883efdc..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/string/unicode-missing-low-surrogate/error +++ /dev/null @@ -1 +0,0 @@ -Missing low character in surrogate pair diff --git a/third_party/objc/json-framework/Tests/Data/invalid/string/unicode-missing-low-surrogate/input b/third_party/objc/json-framework/Tests/Data/invalid/string/unicode-missing-low-surrogate/input deleted file mode 100644 index dbf75bd6fb952..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/invalid/string/unicode-missing-low-surrogate/input +++ /dev/null @@ -1 +0,0 @@ -["\ud834foobar diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/README b/third_party/objc/json-framework/Tests/Data/jsonchecker/README deleted file mode 100644 index 425dc55a898d1..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/README +++ /dev/null @@ -1 +0,0 @@ -Source: http://json.org/JSON_checker/ \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail1.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail1.json deleted file mode 100644 index 6216b865f1021..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail1.json +++ /dev/null @@ -1 +0,0 @@ -"A JSON payload should be an object or array, not a string." \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail10.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail10.json deleted file mode 100644 index 5d8c0047bd522..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail10.json +++ /dev/null @@ -1 +0,0 @@ -{"Extra value after close": true} "misplaced quoted value" \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail11.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail11.json deleted file mode 100644 index 76eb95b4583c8..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail11.json +++ /dev/null @@ -1 +0,0 @@ -{"Illegal expression": 1 + 2} \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail12.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail12.json deleted file mode 100644 index 77580a4522d8c..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail12.json +++ /dev/null @@ -1 +0,0 @@ -{"Illegal invocation": alert()} \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail13.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail13.json deleted file mode 100644 index 379406b59bdb9..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail13.json +++ /dev/null @@ -1 +0,0 @@ -{"Numbers cannot have leading zeroes": 013} \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail14.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail14.json deleted file mode 100644 index 0ed366b38a34f..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail14.json +++ /dev/null @@ -1 +0,0 @@ -{"Numbers cannot be hex": 0x14} \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail15.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail15.json deleted file mode 100644 index fc8376b605da6..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail15.json +++ /dev/null @@ -1 +0,0 @@ -["Illegal backslash escape: \x15"] \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail16.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail16.json deleted file mode 100644 index 3fe21d4b53249..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail16.json +++ /dev/null @@ -1 +0,0 @@ -[\naked] \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail17.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail17.json deleted file mode 100644 index 62b9214aeda6d..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail17.json +++ /dev/null @@ -1 +0,0 @@ -["Illegal backslash escape: \017"] \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail18.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail18.json deleted file mode 100644 index edac92716f186..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail18.json +++ /dev/null @@ -1 +0,0 @@ -[[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]] \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail19.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail19.json deleted file mode 100644 index 3b9c46fa9a296..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail19.json +++ /dev/null @@ -1 +0,0 @@ -{"Missing colon" null} \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail2.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail2.json deleted file mode 100644 index 6b7c11e5a5653..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail2.json +++ /dev/null @@ -1 +0,0 @@ -["Unclosed array" \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail20.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail20.json deleted file mode 100644 index 27c1af3e72ee3..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail20.json +++ /dev/null @@ -1 +0,0 @@ -{"Double colon":: null} \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail21.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail21.json deleted file mode 100644 index 62474573b2160..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail21.json +++ /dev/null @@ -1 +0,0 @@ -{"Comma instead of colon", null} \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail22.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail22.json deleted file mode 100644 index a7752581bcf7f..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail22.json +++ /dev/null @@ -1 +0,0 @@ -["Colon instead of comma": false] \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail23.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail23.json deleted file mode 100644 index 494add1ca190e..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail23.json +++ /dev/null @@ -1 +0,0 @@ -["Bad value", truth] \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail24.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail24.json deleted file mode 100644 index caff239bfc362..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail24.json +++ /dev/null @@ -1 +0,0 @@ -['single quote'] \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail25.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail25.json deleted file mode 100644 index 8b7ad23e01031..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail25.json +++ /dev/null @@ -1 +0,0 @@ -[" tab character in string "] \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail26.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail26.json deleted file mode 100644 index 845d26a6a5439..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail26.json +++ /dev/null @@ -1 +0,0 @@ -["tab\ character\ in\ string\ "] \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail27.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail27.json deleted file mode 100644 index 6b01a2ca4a97e..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail27.json +++ /dev/null @@ -1,2 +0,0 @@ -["line -break"] \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail28.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail28.json deleted file mode 100644 index 621a0101c664a..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail28.json +++ /dev/null @@ -1,2 +0,0 @@ -["line\ -break"] \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail29.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail29.json deleted file mode 100644 index 47ec421bb6242..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail29.json +++ /dev/null @@ -1 +0,0 @@ -[0e] \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail3.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail3.json deleted file mode 100644 index 168c81eb78537..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail3.json +++ /dev/null @@ -1 +0,0 @@ -{unquoted_key: "keys must be quoted"} \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail30.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail30.json deleted file mode 100644 index 8ab0bc4b8b2c7..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail30.json +++ /dev/null @@ -1 +0,0 @@ -[0e+] \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail31.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail31.json deleted file mode 100644 index 1cce602b518fc..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail31.json +++ /dev/null @@ -1 +0,0 @@ -[0e+-1] \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail32.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail32.json deleted file mode 100644 index 45cba7396ff74..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail32.json +++ /dev/null @@ -1 +0,0 @@ -{"Comma instead if closing brace": true, \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail33.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail33.json deleted file mode 100644 index ca5eb19dc97f5..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail33.json +++ /dev/null @@ -1 +0,0 @@ -["mismatch"} \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail4.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail4.json deleted file mode 100644 index 9de168bf34e2e..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail4.json +++ /dev/null @@ -1 +0,0 @@ -["extra comma",] \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail5.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail5.json deleted file mode 100644 index ddf3ce3d24094..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail5.json +++ /dev/null @@ -1 +0,0 @@ -["double extra comma",,] \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail6.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail6.json deleted file mode 100644 index ed91580e1b1c1..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail6.json +++ /dev/null @@ -1 +0,0 @@ -[ , "<-- missing value"] \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail7.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail7.json deleted file mode 100644 index 8a96af3e4ee6c..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail7.json +++ /dev/null @@ -1 +0,0 @@ -["Comma after the close"], \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail8.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail8.json deleted file mode 100644 index b28479c6ecb21..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail8.json +++ /dev/null @@ -1 +0,0 @@ -["Extra close"]] \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail9.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/fail9.json deleted file mode 100644 index 5815574f363e5..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/fail9.json +++ /dev/null @@ -1 +0,0 @@ -{"Extra comma": true,} \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/pass1.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/pass1.json deleted file mode 100644 index 70e2685436928..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/pass1.json +++ /dev/null @@ -1,58 +0,0 @@ -[ - "JSON Test Pattern pass1", - {"object with 1 member":["array with 1 element"]}, - {}, - [], - -42, - true, - false, - null, - { - "integer": 1234567890, - "real": -9876.543210, - "e": 0.123456789e-12, - "E": 1.234567890E+34, - "": 23456789012E66, - "zero": 0, - "one": 1, - "space": " ", - "quote": "\"", - "backslash": "\\", - "controls": "\b\f\n\r\t", - "slash": "/ & \/", - "alpha": "abcdefghijklmnopqrstuvwyz", - "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ", - "digit": "0123456789", - "0123456789": "digit", - "special": "`1~!@#$%^&*()_+-={':[,]}|;.?", - "hex": "\u0123\u4567\u89AB\uCDEF\uabcd\uef4A", - "true": true, - "false": false, - "null": null, - "array":[ ], - "object":{ }, - "address": "50 St. James Street", - "url": "http://www.JSON.org/", - "comment": "// /* */": " ", - " s p a c e d " :[1,2 , 3 - -, - -4 , 5 , 6 ,7 ],"compact":[1,2,3,4,5,6,7], - "jsontext": "{\"object with 1 member\":[\"array with 1 element\"]}", - "quotes": "" \u0022 %22 0x22 034 "", - "\/\\\"\uCAFE\uBABE\uAB98\uFCDE\ubcda\uef4A\b\f\n\r\t`1~!@#$%^&*()_+-=[]{}|;:',./<>?" -: "A key can be any string" - }, - 0.5 ,98.6 -, -99.44 -, - -1066, -1e1, -0.1e1, -1e-1, -1e00,2e+00,2e-00 -,"rosebud"] \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/pass2.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/pass2.json deleted file mode 100644 index d3c63c7ad845e..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/pass2.json +++ /dev/null @@ -1 +0,0 @@ -[[[[[[[[[[[[[[[[[[["Not too deep"]]]]]]]]]]]]]]]]]]] \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/jsonchecker/pass3.json b/third_party/objc/json-framework/Tests/Data/jsonchecker/pass3.json deleted file mode 100644 index 4528d51f1ac61..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/jsonchecker/pass3.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "JSON Test Pattern pass3": { - "The outermost value": "must be an object or array.", - "In this test": "It is an object." - } -} diff --git a/third_party/objc/json-framework/Tests/Data/valid/array/input b/third_party/objc/json-framework/Tests/Data/valid/array/input deleted file mode 100644 index 15dd91992d2a6..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/array/input +++ /dev/null @@ -1,6 +0,0 @@ -[ -[], -["foo"], -["foo",["bar"]], -["foo",["bar",["quux"]]] -] \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/valid/array/output b/third_party/objc/json-framework/Tests/Data/valid/array/output deleted file mode 100644 index d3b834a96dd68..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/array/output +++ /dev/null @@ -1 +0,0 @@ -[[],["foo"],["foo",["bar"]],["foo",["bar",["quux"]]]] diff --git a/third_party/objc/json-framework/Tests/Data/valid/boolean/input b/third_party/objc/json-framework/Tests/Data/valid/boolean/input deleted file mode 100644 index b29ad08f1eebe..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/boolean/input +++ /dev/null @@ -1 +0,0 @@ -[true,false] diff --git a/third_party/objc/json-framework/Tests/Data/valid/boolean/output b/third_party/objc/json-framework/Tests/Data/valid/boolean/output deleted file mode 100644 index b29ad08f1eebe..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/boolean/output +++ /dev/null @@ -1 +0,0 @@ -[true,false] diff --git a/third_party/objc/json-framework/Tests/Data/valid/null/input b/third_party/objc/json-framework/Tests/Data/valid/null/input deleted file mode 100644 index 62864b313ddc4..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/null/input +++ /dev/null @@ -1 +0,0 @@ -[null] diff --git a/third_party/objc/json-framework/Tests/Data/valid/null/output b/third_party/objc/json-framework/Tests/Data/valid/null/output deleted file mode 100644 index 62864b313ddc4..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/null/output +++ /dev/null @@ -1 +0,0 @@ -[null] diff --git a/third_party/objc/json-framework/Tests/Data/valid/number/exponential/input b/third_party/objc/json-framework/Tests/Data/valid/number/exponential/input deleted file mode 100644 index 8a605aa7a719d..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/number/exponential/input +++ /dev/null @@ -1,8 +0,0 @@ -[ --333e-3, --333e1, --333e+3, -88.8e-2, -88.8e1, -88.8e+2 -] diff --git a/third_party/objc/json-framework/Tests/Data/valid/number/exponential/output b/third_party/objc/json-framework/Tests/Data/valid/number/exponential/output deleted file mode 100644 index 4409680f09454..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/number/exponential/output +++ /dev/null @@ -1 +0,0 @@ -[-0.333,-3330,-333000,0.888,888,8880] diff --git a/third_party/objc/json-framework/Tests/Data/valid/number/float/input b/third_party/objc/json-framework/Tests/Data/valid/number/float/input deleted file mode 100644 index 3a06805547546..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/number/float/input +++ /dev/null @@ -1,8 +0,0 @@ -[ -0.0001, -2.5, -4.4, -99.99, -720.17300000000000182, --0.0000 -] diff --git a/third_party/objc/json-framework/Tests/Data/valid/number/float/output b/third_party/objc/json-framework/Tests/Data/valid/number/float/output deleted file mode 100644 index 672b9ff2ea0da..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/number/float/output +++ /dev/null @@ -1 +0,0 @@ -[0.0001,2.5,4.4,99.99,720.17300000000000182,-0] diff --git a/third_party/objc/json-framework/Tests/Data/valid/number/integer/input b/third_party/objc/json-framework/Tests/Data/valid/number/integer/input deleted file mode 100644 index da08926a5c154..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/number/integer/input +++ /dev/null @@ -1,8 +0,0 @@ -[ --98877665544332211009988776655443322110, --1, -0, --0, -1, -98877665544332211009988776655443322110 -] diff --git a/third_party/objc/json-framework/Tests/Data/valid/number/integer/output b/third_party/objc/json-framework/Tests/Data/valid/number/integer/output deleted file mode 100644 index a8e8e2ba0b570..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/number/integer/output +++ /dev/null @@ -1 +0,0 @@ -[-98877665544332211009988776655443322110,-1,0,0,1,98877665544332211009988776655443322110] diff --git a/third_party/objc/json-framework/Tests/Data/valid/number/snowflake/README b/third_party/objc/json-framework/Tests/Data/valid/number/snowflake/README deleted file mode 100644 index 352ebd530fd70..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/number/snowflake/README +++ /dev/null @@ -1,3 +0,0 @@ -This test verifies Snowflake compatibility. See also: - -https://dev.twitter.com/docs/twitter-ids-json-and-snowflake diff --git a/third_party/objc/json-framework/Tests/Data/valid/number/snowflake/input b/third_party/objc/json-framework/Tests/Data/valid/number/snowflake/input deleted file mode 100644 index 8baf847b8b9b7..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/number/snowflake/input +++ /dev/null @@ -1,4 +0,0 @@ -{ - "id": 10765432100123456789, - "id_str": "10765432100123456789" -} diff --git a/third_party/objc/json-framework/Tests/Data/valid/number/snowflake/output b/third_party/objc/json-framework/Tests/Data/valid/number/snowflake/output deleted file mode 100644 index 8d68d6fc52417..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/number/snowflake/output +++ /dev/null @@ -1 +0,0 @@ -{"id":10765432100123456789,"id_str":"10765432100123456789"} diff --git a/third_party/objc/json-framework/Tests/Data/valid/object/input b/third_party/objc/json-framework/Tests/Data/valid/object/input deleted file mode 100644 index aefce173af20d..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/object/input +++ /dev/null @@ -1,6 +0,0 @@ -[ -{}, -{"foo":"bar"}, -{"foo":{"bar":"quux"}}, -{"foo":{"bar":{"quux":{}}}} -] \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/valid/object/output b/third_party/objc/json-framework/Tests/Data/valid/object/output deleted file mode 100644 index 820cf08ae5d63..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/object/output +++ /dev/null @@ -1 +0,0 @@ -[{},{"foo":"bar"},{"foo":{"bar":"quux"}},{"foo":{"bar":{"quux":{}}}}] diff --git a/third_party/objc/json-framework/Tests/Data/valid/string/ctrl-shorthand/input b/third_party/objc/json-framework/Tests/Data/valid/string/ctrl-shorthand/input deleted file mode 100644 index a70593c233a6f..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/string/ctrl-shorthand/input +++ /dev/null @@ -1,8 +0,0 @@ -[ -"\b", -"\t", -"\n", -"\f", -"\r", -" " -] \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/valid/string/ctrl-shorthand/output b/third_party/objc/json-framework/Tests/Data/valid/string/ctrl-shorthand/output deleted file mode 100644 index 1f9f739739e8c..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/string/ctrl-shorthand/output +++ /dev/null @@ -1 +0,0 @@ -["\b","\t","\n","\f","\r"," "] diff --git a/third_party/objc/json-framework/Tests/Data/valid/string/ctrl/input b/third_party/objc/json-framework/Tests/Data/valid/string/ctrl/input deleted file mode 100644 index 61d5bf80530ff..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/string/ctrl/input +++ /dev/null @@ -1,35 +0,0 @@ -[ -"\u0000", -"\u0001", -"\u0002", -"\u0003", -"\u0004", -"\u0005", -"\u0006", -"\u0007", -"\u0008", -"\u0009", -"\u000a", -"\u000b", -"\u000c", -"\u000d", -"\u000e", -"\u000f", -"\u0010", -"\u0011", -"\u0012", -"\u0013", -"\u0014", -"\u0015", -"\u0016", -"\u0017", -"\u0018", -"\u0019", -"\u001a", -"\u001b", -"\u001c", -"\u001d", -"\u001e", -"\u001f", -"\u0020" -] \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Data/valid/string/ctrl/output b/third_party/objc/json-framework/Tests/Data/valid/string/ctrl/output deleted file mode 100644 index 556305bfb9a6e..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/string/ctrl/output +++ /dev/null @@ -1 +0,0 @@ -["\u0000","\u0001","\u0002","\u0003","\u0004","\u0005","\u0006","\u0007","\b","\t","\n","\u000b","\f","\r","\u000e","\u000f","\u0010","\u0011","\u0012","\u0013","\u0014","\u0015","\u0016","\u0017","\u0018","\u0019","\u001a","\u001b","\u001c","\u001d","\u001e","\u001f"," "] diff --git a/third_party/objc/json-framework/Tests/Data/valid/string/escapes/input b/third_party/objc/json-framework/Tests/Data/valid/string/escapes/input deleted file mode 100644 index be52c35971482..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/string/escapes/input +++ /dev/null @@ -1,18 +0,0 @@ -[ -"", -" spaces ", -"/", -"\\ \" \\ \"", -"foo\"", -"foo\"\"", -"foo\"\"bar", -"foo\"bar", -"foo\\", -"foo\\\\bar", -"foo\\bar", -"foobar", -"with internal spaces", -"/unescaped/slashes", -"\/escaped\/slashes", -"\\/test\\/path" -] diff --git a/third_party/objc/json-framework/Tests/Data/valid/string/escapes/output b/third_party/objc/json-framework/Tests/Data/valid/string/escapes/output deleted file mode 100644 index 8a9bdb95583fa..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/string/escapes/output +++ /dev/null @@ -1 +0,0 @@ -[""," spaces ","/","\\ \" \\ \"","foo\"","foo\"\"","foo\"\"bar","foo\"bar","foo\\","foo\\\\bar","foo\\bar","foobar","with internal spaces","/unescaped/slashes","/escaped/slashes","\\/test\\/path"] diff --git a/third_party/objc/json-framework/Tests/Data/valid/string/simple/input b/third_party/objc/json-framework/Tests/Data/valid/string/simple/input deleted file mode 100644 index be52c35971482..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/string/simple/input +++ /dev/null @@ -1,18 +0,0 @@ -[ -"", -" spaces ", -"/", -"\\ \" \\ \"", -"foo\"", -"foo\"\"", -"foo\"\"bar", -"foo\"bar", -"foo\\", -"foo\\\\bar", -"foo\\bar", -"foobar", -"with internal spaces", -"/unescaped/slashes", -"\/escaped\/slashes", -"\\/test\\/path" -] diff --git a/third_party/objc/json-framework/Tests/Data/valid/string/simple/output b/third_party/objc/json-framework/Tests/Data/valid/string/simple/output deleted file mode 100644 index 8a9bdb95583fa..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/string/simple/output +++ /dev/null @@ -1 +0,0 @@ -[""," spaces ","/","\\ \" \\ \"","foo\"","foo\"\"","foo\"\"bar","foo\"bar","foo\\","foo\\\\bar","foo\\bar","foobar","with internal spaces","/unescaped/slashes","/escaped/slashes","\\/test\\/path"] diff --git a/third_party/objc/json-framework/Tests/Data/valid/string/unicode-captial-alpha/input b/third_party/objc/json-framework/Tests/Data/valid/string/unicode-captial-alpha/input deleted file mode 100644 index bc0a97e1902a2..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/string/unicode-captial-alpha/input +++ /dev/null @@ -1,3 +0,0 @@ -{ -"MATHEMATICAL ITALIC CAPITAL ALPHA": "\uD835\uDEE2" -} diff --git a/third_party/objc/json-framework/Tests/Data/valid/string/unicode-captial-alpha/output b/third_party/objc/json-framework/Tests/Data/valid/string/unicode-captial-alpha/output deleted file mode 100644 index 8b0f178734a93..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/string/unicode-captial-alpha/output +++ /dev/null @@ -1 +0,0 @@ -{"MATHEMATICAL ITALIC CAPITAL ALPHA":"ð›¢"} diff --git a/third_party/objc/json-framework/Tests/Data/valid/string/unicode-e-acute-and-ge-and-42/input b/third_party/objc/json-framework/Tests/Data/valid/string/unicode-e-acute-and-ge-and-42/input deleted file mode 100644 index 1b6924c341817..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/string/unicode-e-acute-and-ge-and-42/input +++ /dev/null @@ -1,3 +0,0 @@ -{ -"e-acute and greater-than-or-equal-to, and 42": "42\u00e942\u226542" -} diff --git a/third_party/objc/json-framework/Tests/Data/valid/string/unicode-e-acute-and-ge-and-42/output b/third_party/objc/json-framework/Tests/Data/valid/string/unicode-e-acute-and-ge-and-42/output deleted file mode 100644 index b4bcf0749d541..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/string/unicode-e-acute-and-ge-and-42/output +++ /dev/null @@ -1 +0,0 @@ -{"e-acute and greater-than-or-equal-to, and 42":"42é42≥42"} diff --git a/third_party/objc/json-framework/Tests/Data/valid/string/unicode-e-acute-and-ge/input b/third_party/objc/json-framework/Tests/Data/valid/string/unicode-e-acute-and-ge/input deleted file mode 100644 index 88ae48ca10355..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/string/unicode-e-acute-and-ge/input +++ /dev/null @@ -1,3 +0,0 @@ -{ -"e-acute and greater-than-or-equal-to": "\u00e9\u2265" -} diff --git a/third_party/objc/json-framework/Tests/Data/valid/string/unicode-e-acute-and-ge/output b/third_party/objc/json-framework/Tests/Data/valid/string/unicode-e-acute-and-ge/output deleted file mode 100644 index f34f3728206d3..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/string/unicode-e-acute-and-ge/output +++ /dev/null @@ -1 +0,0 @@ -{"e-acute and greater-than-or-equal-to":"é≥"} diff --git a/third_party/objc/json-framework/Tests/Data/valid/string/unicode-e-acute/input b/third_party/objc/json-framework/Tests/Data/valid/string/unicode-e-acute/input deleted file mode 100644 index a6046adaa4f89..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/string/unicode-e-acute/input +++ /dev/null @@ -1,3 +0,0 @@ -{ -"e-acute with upper-case hex":"\u00E9" -} diff --git a/third_party/objc/json-framework/Tests/Data/valid/string/unicode-e-acute/output b/third_party/objc/json-framework/Tests/Data/valid/string/unicode-e-acute/output deleted file mode 100644 index 408fb16ead289..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/string/unicode-e-acute/output +++ /dev/null @@ -1 +0,0 @@ -{"e-acute with upper-case hex":"é"} diff --git a/third_party/objc/json-framework/Tests/Data/valid/string/unicode-g-clef/input b/third_party/objc/json-framework/Tests/Data/valid/string/unicode-g-clef/input deleted file mode 100644 index fb51fae7d2193..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/string/unicode-g-clef/input +++ /dev/null @@ -1,3 +0,0 @@ -{ -"MUSICAL SYMBOL G CLEF": "\uD834\uDD1E" -} diff --git a/third_party/objc/json-framework/Tests/Data/valid/string/unicode-g-clef/output b/third_party/objc/json-framework/Tests/Data/valid/string/unicode-g-clef/output deleted file mode 100644 index 1a6869a4bbdbc..0000000000000 --- a/third_party/objc/json-framework/Tests/Data/valid/string/unicode-g-clef/output +++ /dev/null @@ -1 +0,0 @@ -{"MUSICAL SYMBOL G CLEF":"ð„ž"} diff --git a/third_party/objc/json-framework/Tests/ErrorTest.m b/third_party/objc/json-framework/Tests/ErrorTest.m deleted file mode 100644 index 210d6e9859d55..0000000000000 --- a/third_party/objc/json-framework/Tests/ErrorTest.m +++ /dev/null @@ -1,160 +0,0 @@ -/* - Copyright (C) 2007-2011 Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - * Neither the name of the author nor the names of its contributors - may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - */ - - -#import "JsonTestCase.h" - - -#define SBAssertStringContains(e, s) \ -STAssertTrue([e rangeOfString:s].location != NSNotFound, @"%@ vs %@", e, s) - -@interface ErrorTest : JsonTestCase -@end - -@implementation ErrorTest - -- (void)setUp { - [super setUp]; - parser.maxDepth = 4u; - writer.maxDepth = 4u; -} - -- (NSString*)otherFileName { - return @"error"; -} - -- (void)testData { - [self foreachTestInSuite:@"Tests/Data/invalid" apply:^(NSString *inpath, NSString *errpath) { - NSData *input = [NSData dataWithContentsOfFile:inpath options:0 error:nil]; - STAssertNotNil(input, inpath); - - NSString *error = [NSString stringWithContentsOfFile:errpath encoding:NSUTF8StringEncoding error:nil]; - STAssertNotNil(error, errpath); - - error = [error stringByReplacingOccurrencesOfString:@"\n" withString:@""]; - - STAssertNil([parser objectWithData:input], inpath); - STAssertEqualObjects(parser.error, error, @"%@: %@", inpath, input); - - }]; - - STAssertEquals(count, (NSUInteger)31, nil); -} - -- (void)testWriteRecursion { - // create a challenge! - NSMutableArray *a1 = [NSMutableArray array]; - NSMutableArray *a2 = [NSMutableArray arrayWithObject:a1]; - [a1 addObject:a2]; - - STAssertNil([writer stringWithObject:a1], nil); - STAssertEqualObjects(writer.error, @"Nested too deep", writer.error); -} - - -- (void)testUnsupportedObject { - - STAssertNil([writer stringWithObject:[NSData data]], nil); - STAssertNotNil(writer.error, nil); -} - -- (void)testNonStringDictionaryKey { - NSArray *keys = [NSArray arrayWithObjects:[NSNull null], - [NSNumber numberWithInt:1], - [NSArray array], - [NSDictionary dictionary], - nil]; - - for (id key in keys) { - NSDictionary *object = [NSDictionary dictionaryWithObject:@"1" forKey:key]; - STAssertEqualObjects([writer stringWithObject:object], nil, nil); - STAssertNotNil(writer.error, nil); - } -} - - -- (void)testScalar { - NSArray *fragments = [NSArray arrayWithObjects:@"foo", @"", [NSNull null], [NSNumber numberWithInt:1], [NSNumber numberWithBool:YES], nil]; - for (NSUInteger i = 0; i < [fragments count]; i++) { - NSString *fragment = [fragments objectAtIndex:i]; - - // We don't check the convenience category here, like we do for parsing, - // because the category is explicitly on the NSArray and NSDictionary objects. - // STAssertNil([fragment JSONRepresentation], nil); - - STAssertNil([writer stringWithObject:fragment], @"%@", fragment); - SBAssertStringContains(parser.error, @"Not valid type for JSON"); - } -} - -- (void)testInfinity { - NSArray *obj = [NSArray arrayWithObject:[NSNumber numberWithDouble:INFINITY]]; - STAssertNil([writer stringWithObject:obj], @"%@", obj); - SBAssertStringContains(parser.error, @"Infinity is not a valid number in JSON"); -} - -- (void)testNegativeInfinity { - NSArray *obj = [NSArray arrayWithObject:[NSNumber numberWithDouble:-INFINITY]]; - - STAssertNil([writer stringWithObject:obj], nil); - SBAssertStringContains(parser.error, @"Infinity is not a valid number in JSON"); -} - -- (void)testNaN { - NSArray *obj = [NSArray arrayWithObject:[NSDecimalNumber notANumber]]; - - STAssertNil([writer stringWithObject:obj], nil); - SBAssertStringContains(parser.error, @"NaN is not a valid number in JSON"); -} - -- (void)testNil { - STAssertNil([parser objectWithString:nil], nil); - STAssertEqualObjects(parser.error, @"Input was 'nil'", nil); - - STAssertNil([writer stringWithObject:nil], nil); - SBAssertStringContains(parser.error, @"Input was 'nil'"); - -} - -- (void)testWriteDepth { - writer.maxDepth = 2; - - NSArray *a1 = [NSArray array]; - NSArray *a2 = [NSArray arrayWithObject:a1]; - STAssertNotNil([writer stringWithObject:a2], nil); - - NSArray *a3 = [NSArray arrayWithObject:a2]; - STAssertNil([writer stringWithObject:a3], nil); - STAssertEqualObjects(writer.error, @"Nested too deep", writer.error); -} - -@end diff --git a/third_party/objc/json-framework/Tests/FormatTest.m b/third_party/objc/json-framework/Tests/FormatTest.m deleted file mode 100644 index e3224726cc7b0..0000000000000 --- a/third_party/objc/json-framework/Tests/FormatTest.m +++ /dev/null @@ -1,92 +0,0 @@ -/* - Copyright (C) 2011 Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - * Neither the name of the author nor the names of its contributors - may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - */ - - -#import "JsonTestCase.h" - -@interface FormatTest : JsonTestCase -@end - -@implementation FormatTest - -- (void)setUp { - [super setUp]; - writer.humanReadable = YES; - writer.sortKeys = YES; -} - - -- (void)testString { - [self foreachTestInSuite:@"Tests/Data/format" apply:^(NSString *inpath, NSString *outpath) { - NSError *error = nil; - NSString *input = [NSString stringWithContentsOfFile:inpath encoding:NSUTF8StringEncoding error:&error]; - STAssertNotNil(input, @"%@ - %@", inpath, error); - - NSString *output = [NSString stringWithContentsOfFile:outpath encoding:NSUTF8StringEncoding error:&error]; - STAssertNotNil(output, @"%@ - %@", outpath, error); - - id object = [parser objectWithString:input]; - STAssertNotNil(object, nil); - - NSString *json = [writer stringWithObject:object]; - STAssertNotNil(json, nil); - - json = [json stringByAppendingString:@"\n"]; - STAssertEqualObjects(json, output, nil); - }]; - - STAssertEquals(count, (NSUInteger)8, nil); -} - -- (void)testData { - [self foreachTestInSuite:@"Tests/Data/format" apply:^(NSString *inpath, NSString *outpath) { - NSError *error = nil; - NSData *input = [NSData dataWithContentsOfFile:inpath]; - STAssertNotNil(input, @"%@ - %@", inpath, error); - - id object = [parser objectWithData:input]; - STAssertNotNil(object, nil); - - NSData *json = [writer dataWithObject:object]; - STAssertNotNil(json, nil); - - NSData *output = [NSData dataWithContentsOfFile:outpath]; - STAssertNotNil(output, @"%@ - %@", outpath, error); - - output = [NSData dataWithBytes:output.bytes length:output.length-1]; - STAssertEqualObjects(json, output, nil); - }]; - - STAssertEquals(count, (NSUInteger)8, nil); -} - -@end diff --git a/third_party/objc/json-framework/Tests/JsonCheckerTest.m b/third_party/objc/json-framework/Tests/JsonCheckerTest.m deleted file mode 100644 index 9157b8d660db1..0000000000000 --- a/third_party/objc/json-framework/Tests/JsonCheckerTest.m +++ /dev/null @@ -1,90 +0,0 @@ -/* - Copyright (C) 2011 Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - * Neither the name of the author nor the names of its contributors - may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - */ - - -#import "JsonTestCase.h" - -@interface JsonCheckerTest : JsonTestCase -@end - -@implementation JsonCheckerTest - -- (void)setUp { - [super setUp]; - parser.maxDepth = 19; -} - -- (void)foreachFilePrefixedBy:(NSString*)prefix inSuite:(NSString*)suite apply:(void(^)(NSString*))block { - NSString *file; - NSString *rootPath = [[self class] pathForSuite:suite]; - NSDirectoryEnumerator *enumerator = [[NSFileManager defaultManager] enumeratorAtPath:rootPath]; - - while ((file = [enumerator nextObject])) { - if (![file hasPrefix:prefix]) - continue; - - NSString *path = [rootPath stringByAppendingPathComponent:file]; - if ([[NSFileManager defaultManager] isReadableFileAtPath:path]) { - block(path); - count++; - } - } -} - -- (void)testPass { - [self foreachFilePrefixedBy:@"pass" inSuite:@"Tests/Data/jsonchecker" apply:^(NSString* path) { - NSError *error = nil; - NSString *input = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:&error]; - STAssertNotNil(input, @"%@ - %@", path, error); - - id object = [parser objectWithString:input]; - STAssertNotNil(object, path); - STAssertNil(parser.error, path); - - }]; - STAssertEquals(count, (NSUInteger)3, nil); -} - -- (void)testFail { - [self foreachFilePrefixedBy:@"fail" inSuite:@"Tests/Data/jsonchecker" apply:^(NSString* path) { - NSError *error = nil; - NSString *input = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:&error]; - STAssertNotNil(input, @"%@ - %@", path, error); - - STAssertNil([parser objectWithString:input], @"%@ - %@", input, path); - STAssertNotNil(parser.error, @"%@ at %@", input, path); - }]; - - STAssertEquals(count, (NSUInteger)33, nil); -} - -@end diff --git a/third_party/objc/json-framework/Tests/JsonTestCase.h b/third_party/objc/json-framework/Tests/JsonTestCase.h deleted file mode 100644 index c1af88db59c5a..0000000000000 --- a/third_party/objc/json-framework/Tests/JsonTestCase.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - Copyright (C) 2011 Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - * Neither the name of the author nor the names of its contributors - may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - */ - - -#import - -typedef void (^ JsonTestCaseBlock)(NSString *, NSString *); - - -@interface JsonTestCase : SenTestCase { - SBJsonWriter * writer; - SBJsonParser * parser; - NSUInteger count; -} - -- (NSString*)otherFileName; - -- (void)foreachTestInSuite:(NSString *)suite apply:(JsonTestCaseBlock)block; - -/* - * If you want to get a valid path to enumerate over, this method - * deals with iOS vs Mac OSX. The path returned is guarenteed to - * work with NSFileManager enumeratorWithPath: - */ -+ (NSString *)pathForSuite:(NSString *)suite; - -@end diff --git a/third_party/objc/json-framework/Tests/JsonTestCase.m b/third_party/objc/json-framework/Tests/JsonTestCase.m deleted file mode 100644 index f3d6ec4ea5509..0000000000000 --- a/third_party/objc/json-framework/Tests/JsonTestCase.m +++ /dev/null @@ -1,89 +0,0 @@ -/* - Copyright (C) 2011 Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - * Neither the name of the author nor the names of its contributors - may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - */ - -#import "JsonTestCase.h" - - - -@implementation JsonTestCase - -- (void)setUp { - count = 0; - parser = [[SBJsonParser alloc] init]; - writer = [[SBJsonWriter alloc] init]; -} - -- (NSString*)otherFileName { - return @"output"; -} - -+ (NSString *)pathForSuite:(NSString *)suite { - // First, can we just find the files from a relative path (Mac OSX tests) - NSFileManager *manager = [NSFileManager new]; - BOOL isDir = NO; - if ([manager fileExistsAtPath:suite isDirectory:&isDir] && YES == isDir) { - return suite; - } else { - // Fall back to checking to see if the files are found in a bundle (fix for iOS tests) - for (NSBundle *bundle in [NSBundle allBundles]) { - NSString *path = [NSString stringWithFormat:@"%@/%@", [bundle resourcePath], suite]; - isDir = YES; - if (NO == [manager fileExistsAtPath:path isDirectory:&isDir] || NO == isDir) - continue; - - NSLog(@"Valid bundle path for suite '%@' : %@", suite, path); - return path; - } - } - - return nil; -} - -- (void)foreachTestInSuite:(NSString *)suite apply:(JsonTestCaseBlock)block { - NSFileManager *manager = [NSFileManager new]; - NSString *rootPath = [[self class] pathForSuite:suite]; - NSEnumerator *enumerator = [manager enumeratorAtPath:rootPath]; - - for (NSString *file in enumerator) { - NSString *path = [rootPath stringByAppendingPathComponent:file]; - NSString *inpath = [path stringByAppendingPathComponent:@"input"]; - - if ([manager isReadableFileAtPath:inpath]) { - NSString *outpath = [path stringByAppendingPathComponent:[self otherFileName]]; - STAssertTrue([manager isReadableFileAtPath:outpath], nil); - block(inpath, outpath); - count++; - } - } -} - -@end diff --git a/third_party/objc/json-framework/Tests/ProxyTest.m b/third_party/objc/json-framework/Tests/ProxyTest.m deleted file mode 100644 index 641288969ba1b..0000000000000 --- a/third_party/objc/json-framework/Tests/ProxyTest.m +++ /dev/null @@ -1,108 +0,0 @@ -/* - Copyright (C) 2009-2010 Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of the author nor the names of its contributors may be used - to endorse or promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import -#import - -#pragma mark Helper objects - -@interface True : NSObject -@end - -@implementation True -- (id)proxyForJson { - return [NSNumber numberWithBool:YES]; -} -@end - -@interface False : NSObject -@end - -@implementation False -- (id)proxyForJson { - return [NSNumber numberWithBool:NO]; -} -@end - -@interface Bool : NSObject -@end - -@implementation Bool -- (id)proxyForJson { - return [NSArray arrayWithObjects:[True new], [False new], nil]; -} -@end - -@implementation NSDate (Private) -- (id)proxyForJson { - return [NSArray arrayWithObject:[self description]]; -} -@end - -#pragma mark Tests - -@interface ProxyTest : SenTestCase { - SBJsonWriter * writer; -} -@end - - -@implementation ProxyTest - -- (void)setUp { - writer = [SBJsonWriter new]; -} - -- (void)testUnsupportedWithoutProxy { - STAssertNil([writer stringWithObject:[NSArray arrayWithObject:[NSObject new]]], nil); - STAssertEqualObjects(writer.error, @"JSON serialisation not supported for NSObject", nil); -} - -- (void)testUnsupportedWithProxy { - STAssertEqualObjects([writer stringWithObject:[NSArray arrayWithObject:[True new]]], @"[true]", nil); -} - -- (void)testUnsupportedWithProxyWithoutWrapper { - STAssertNil([writer stringWithObject:[True new]], nil); -} - -- (void)testUnsupportedWithNestedProxy { - STAssertEqualObjects([writer stringWithObject:[NSArray arrayWithObject:[Bool new]]], @"[[true,false]]", nil); -} - -- (void)testUnsupportedWithProxyAsCategory { - STAssertNotNil([writer stringWithObject:[NSArray arrayWithObject:[NSDate date]]], nil); -} - -- (void)testUnsupportedWithProxyAsCategoryWithoutWrapper { - STAssertNotNil([writer stringWithObject:[NSDate date]], nil); -} - - -@end diff --git a/third_party/objc/json-framework/Tests/RoundTripTest.m b/third_party/objc/json-framework/Tests/RoundTripTest.m deleted file mode 100644 index 3704b4c3b8290..0000000000000 --- a/third_party/objc/json-framework/Tests/RoundTripTest.m +++ /dev/null @@ -1,131 +0,0 @@ -/* - Copyright (C) 2011 Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - * Neither the name of the author nor the names of its contributors - may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - */ - - -#import "JsonTestCase.h" - -@interface RoundTripTest : JsonTestCase -@end - -@implementation RoundTripTest - -- (void)testString { - [self foreachTestInSuite:@"Tests/Data/valid" apply:^(NSString *inpath, NSString *outpath) { - NSError *error = nil; - NSString *input = [NSString stringWithContentsOfFile:inpath encoding:NSUTF8StringEncoding error:&error]; - STAssertNotNil(input, @"%@ - %@", inpath, error); - - NSString *output = [NSString stringWithContentsOfFile:outpath encoding:NSUTF8StringEncoding error:&error]; - STAssertNotNil(output, @"%@ - %@", outpath, error); - - id object = [parser objectWithString:input]; - STAssertNotNil(object, parser.error); - - NSString *json = [writer stringWithObject:object]; - STAssertNotNil(json, writer.error); - - json = [json stringByAppendingString:@"\n"]; - STAssertEqualObjects(json, output, @"%@ vs %@", json, output); - }]; - - STAssertEquals(count, (NSUInteger)17, nil); -} - - -- (void)testData { - [self foreachTestInSuite:@"Tests/Data/valid" apply:^(NSString *inpath, NSString *outpath) { - NSError *error = nil; - NSData *input = [NSData dataWithContentsOfFile:inpath]; - STAssertNotNil(input, @"%@ - %@", inpath, error); - - id object = [parser objectWithData:input]; - STAssertNotNil(object, nil); - - NSData *json = [writer dataWithObject:object]; - STAssertNotNil(json, nil); - - NSData *output = [NSData dataWithContentsOfFile:outpath]; - STAssertNotNil(output, @"%@ - %@", outpath, error); - - output = [NSData dataWithBytes:output.bytes length:output.length-1]; - STAssertEqualObjects(json, output, nil); - }]; - - STAssertEquals(count, (NSUInteger)17, nil); -} - - -- (void)testStringCategory { - [self foreachTestInSuite:@"Tests/Data/valid" apply:^(NSString *inpath, NSString *outpath) { - NSError *error = nil; - NSString *input = [NSString stringWithContentsOfFile:inpath encoding:NSUTF8StringEncoding error:&error]; - STAssertNotNil(input, @"%@ - %@", inpath, error); - - NSString *output = [NSString stringWithContentsOfFile:outpath encoding:NSUTF8StringEncoding error:&error]; - STAssertNotNil(output, @"%@ - %@", outpath, error); - - id object = [input JSONValue]; - STAssertNotNil(object, nil); - - NSString *json = [object JSONRepresentation]; - STAssertNotNil(json, nil); - - json = [json stringByAppendingString:@"\n"]; - STAssertEqualObjects(json, output, nil); - }]; - - STAssertEquals(count, (NSUInteger)17, nil); -} - -- (void)testDataCategory { - [self foreachTestInSuite:@"Tests/Data/valid" apply:^(NSString *inpath, NSString *outpath) { - NSError *error = nil; - NSData *input = [NSData dataWithContentsOfFile:inpath]; - STAssertNotNil(input, @"%@ - %@", inpath, error); - - NSString *output = [NSString stringWithContentsOfFile:outpath encoding:NSUTF8StringEncoding error:&error]; - STAssertNotNil(output, @"%@ - %@", outpath, error); - - id object = [input JSONValue]; - STAssertNotNil(object, nil); - - NSString *json = [object JSONRepresentation]; - STAssertNotNil(json, nil); - - json = [json stringByAppendingString:@"\n"]; - STAssertEqualObjects(json, output, nil); - }]; - - STAssertEquals(count, (NSUInteger)17, nil); -} - -@end diff --git a/third_party/objc/json-framework/Tests/SortedFormatTest.m b/third_party/objc/json-framework/Tests/SortedFormatTest.m deleted file mode 100644 index 5ebcbeb63babc..0000000000000 --- a/third_party/objc/json-framework/Tests/SortedFormatTest.m +++ /dev/null @@ -1,93 +0,0 @@ -/* - Copyright (C) 2011 Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - * Neither the name of the author nor the names of its contributors - may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - */ - -#import "JsonTestCase.h" - -@interface SortedFormatTest : JsonTestCase -@end - -@implementation SortedFormatTest - -- (void)setUp { - [super setUp]; - writer.humanReadable = YES; - writer.sortKeys = YES; - writer.sortKeysComparator = ^(id obj1, id obj2) { - return [obj1 compare:obj2 options:NSCaseInsensitiveSearch|NSLiteralSearch]; - }; -} - -- (void)testString { - [self foreachTestInSuite:@"Tests/Data/comparatorsort" apply:^(NSString *inpath, NSString *outpath) { - NSError *error = nil; - NSString *input = [NSString stringWithContentsOfFile:inpath encoding:NSUTF8StringEncoding error:&error]; - STAssertNotNil(input, @"%@ - %@", inpath, error); - - NSString *output = [NSString stringWithContentsOfFile:outpath encoding:NSUTF8StringEncoding error:&error]; - STAssertNotNil(output, @"%@ - %@", outpath, error); - - id object = [parser objectWithString:input]; - STAssertNotNil(object, nil); - - NSString *json = [writer stringWithObject:object]; - STAssertNotNil(json, nil); - - json = [json stringByAppendingString:@"\n"]; - STAssertEqualObjects(json, output, nil); - }]; - - STAssertEquals(count, (NSUInteger)3, nil); -} - -- (void)testData { - [self foreachTestInSuite:@"Tests/Data/comparatorsort" apply:^(NSString *inpath, NSString *outpath) { - NSError *error = nil; - NSData *input = [NSData dataWithContentsOfFile:inpath]; - STAssertNotNil(input, @"%@ - %@", inpath, error); - - id object = [parser objectWithData:input]; - STAssertNotNil(object, nil); - - NSData *json = [writer dataWithObject:object]; - STAssertNotNil(json, nil); - - NSData *output = [NSData dataWithContentsOfFile:outpath]; - STAssertNotNil(output, @"%@ - %@", outpath, error); - - output = [NSData dataWithBytes:output.bytes length:output.length-1]; - STAssertEqualObjects(json, output, nil); - }]; - - STAssertEquals(count, (NSUInteger)3, nil); -} - -@end diff --git a/third_party/objc/json-framework/Tests/Stream/xaa b/third_party/objc/json-framework/Tests/Stream/xaa deleted file mode 100644 index de13ad91b4c9d..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xaa +++ /dev/null @@ -1 +0,0 @@ -{"coordinates":null,"text":":) Our secret weapon is no alternative. Golda Meir","entities":{"user_mentions":[],"urls":[],"hashtags":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/www.socialoomph.com\" rel=\"nofollow\"\u003ESocialOomph\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:21 +0000 2010","truncated":false,"id_str":"12411897663979520","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":false,"description":"Young and Energetic. I just sold my first house and will be posting Tweets about my new career as a house flipper","listed_count":49,"profile_background_tile":false,"profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_images\/38409971\/problemsolver.jpg","profile_background_color":"C0DEED" \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xab b/third_party/objc/json-framework/Tests/Stream/xab deleted file mode 100644 index 44c8b0d033bc1..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xab +++ /dev/null @@ -1,2 +0,0 @@ -,"location":"Ontario Canada","profile_use_background_image":true,"profile_text_color":"4d1c12","followers_count":7991,"statuses_count":41594,"time_zone":"Quito","created_at":"Sun Sep 20 20:32:38 +0000 2009","friends_count":8789,"protected":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/426248904\/homes_normal.jpg","notifications":null,"profile_link_color":"055673","url":"http:\/\/www.the-problemsolver.com","name":"We Flip","id_str":"75869159","favourites_count":0,"screen_name":"house_flipper","id":75869159,"contributors_enabled":false,"lang":"en","utc_offset":-18000,"profile_sidebar_fill_color":"c1a38c"},"id":12411897663979520,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"RT @therealdjrell click (retweet) if you still up","entities":{"hashtags":[],"urls":[],"user_mentions":[{"indices":[3,17],"name":"Dj Rell OF BBC","screen_name":"therealdjrell","id_str":"180669193","id":180669193}]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"co \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xac b/third_party/objc/json-framework/Tests/Stream/xac deleted file mode 100644 index e76049175d604..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xac +++ /dev/null @@ -1 +0,0 @@ -ntributors":null,"retweet_count":null,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/www.htc.com\" rel=\"nofollow\"\u003E HTC Peep\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:21 +0000 2010","truncated":false,"id_str":"12411897680764928","user":{"following":null,"listed_count":4,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/179020444\/Picnik_collage.jpg","profile_sidebar_border_color":"3d3739","profile_use_background_image":true,"description":"BABY KNOWS WHAT SHE WANTS & ALWAYS GETS IT. :) ArizonaStateUni (DowntownPHX) '14 * 18 YrOld * Chicago is Home * FOLLOW ME & I'LL FOLLOW YOU! :) #TEAMLAKERS","statuses_count":2206,"time_zone":"Arizona","friends_count":115,"profile_background_color":"0f0604","location":"N 33\u00b027' 0'' \/ W 112\u00b04' 0''","profile_text_color":"66585a","followers_count":120,"contributors_enabled":false,"created_at":"Tue Apr 07 01:55:15 +0000 \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xad b/third_party/objc/json-framework/Tests/Stream/xad deleted file mode 100644 index 12c7952c29526..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xad +++ /dev/null @@ -1,2 +0,0 @@ -2009","protected":false,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1182977830\/FB1_normal.jpg","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"cf1919","url":"http:\/\/www.facebook.com\/profile.php?id=610064376","name":"Shayla Brown","id_str":"29351068","favourites_count":16,"screen_name":"BabyistheDream4","id":29351068,"show_all_inline_media":false,"lang":"en","geo_enabled":false,"utc_offset":-25200,"profile_sidebar_fill_color":"ffffff"},"id":12411897680764928,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"THT..boseenn..(\u02c7_\u02c7'!l)\u200b\u200e ..","entities":{"urls":[],"hashtags":[],"user_mentions":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/blackberry.com\/twitter\" rel=\"nofollow\"\u003ETwitter for BlackBerry\u00ae\u003C\/a\u003E","retweeted":false,"ge \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xae b/third_party/objc/json-framework/Tests/Stream/xae deleted file mode 100644 index 8b8cecdbaf618..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xae +++ /dev/null @@ -1 +0,0 @@ -o":null,"created_at":"Wed Dec 08 07:43:21 +0000 2010","truncated":false,"id_str":"12411897668177920","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"eb1a44","show_all_inline_media":false,"geo_enabled":false,"description":"\u2661 Simple and nice Lady \u2661..\u263a ","listed_count":3,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1290538325\/images\/themes\/theme1\/bg.png","profile_background_color":"e01660","location":"\u00dcT: -6.171394,106.868656","profile_use_background_image":true,"profile_text_color":"333333","followers_count":205,"statuses_count":6045,"time_zone":"Pacific Time (US & Canada)","created_at":"Thu Oct 29 06:35:04 +0000 2009","friends_count":232,"protected":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1145910676\/Picture_202584_normal.jpg","notifications":null,"profile_link_color":"CC3366","url":"http:\/\/null","name":"dila Zitria yuzar","id_str":"86008365","favourites_count":17 \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xaf b/third_party/objc/json-framework/Tests/Stream/xaf deleted file mode 100644 index 6f06fcb28a8f1..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xaf +++ /dev/null @@ -1,2 +0,0 @@ -,"screen_name":"dilaZitria","id":86008365,"contributors_enabled":false,"lang":"en","utc_offset":-28800,"profile_sidebar_fill_color":"e61e89"},"id":12411897668177920,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"\u6628\u591c\u3001\u6b53\u9001\u8fce\u4f1a\u306e\u4e8c\u6b21\u4f1a\u306e\u30b9\u30ca\u30c3\u30af\u306750\u66f2\u304f\u3089\u3044\u4e00\u4eba\u3067\u6c38\u9060\u306b\u6b4c\u3063\u3066\u305f\u3089\u3057\u3044www\u3042\u307e\u308a\u899a\u3048\u3066\u306a\u3044\u3093\u3060\u304c\u3001\u78ba\u304b\u306b\u5589\u306f\u75db\u3044\u306e\u3067\u3042\u308b\u3002","entities":{"hashtags":[],"urls":[],"user_mentions":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/www.movatwi.jp\" rel=\"nofollow\"\u003Ewww.movatwi.jp\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:21 +0000 2010","truncated":false," \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xag b/third_party/objc/json-framework/Tests/Stream/xag deleted file mode 100644 index a4aac62b1a7f6..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xag +++ /dev/null @@ -1 +0,0 @@ -id_str":"12411897668182016","user":{"following":null,"listed_count":12,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/92964430\/0287.jpg","profile_sidebar_border_color":"a8c7f7","profile_use_background_image":true,"description":"\u30f2\u30bf\u5c5e\u6027\u306f\u25cf\u25cf\u25cf\u25cf\u25cf(\u4eee\uff09\r\n\u5168\u529b\u8150\u6d3b\u52d5\u4e2d\uff01\uff01\r\n\u4e2d\u91ce\u8150\u5973\u30b7\u30b9\u30bf\u30fc\u30ba\u30fb\u8150\u7537\u587e\u306b\u6367\u3052\u308b\u30ed\u30fc\u30de\u30fc\u30f3\u30fc\u30b9\u3063\uff01","statuses_count":5862,"time_zone":"Tokyo","friends_count":314,"profile_background_color":"022330","location":"\u306a\u306b\u308f\uff01\u306a\u306b\u308f\uff01","profile_text_color":"333333","followers_count":245,"contributors_enabled":false,"created_at":"Tue Aug 11 08:24:20 +0000 2009","protected":false,"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/574158539\/roreapple_normal.jpg","follow_request_sent":null,"verified":false, \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xah b/third_party/objc/json-framework/Tests/Stream/xah deleted file mode 100644 index 362f1d5aae3c2..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xah +++ /dev/null @@ -1,2 +0,0 @@ -"notifications":null,"profile_link_color":"0084B4","url":"http:\/\/ameblo.jp\/roreapple\/","name":"\u30ed\u30ec\u308a\u3093\u3054","id_str":"64662506","favourites_count":42,"screen_name":"roreapple","id":64662506,"show_all_inline_media":false,"lang":"ja","geo_enabled":false,"utc_offset":32400,"profile_sidebar_fill_color":"C0DFEC"},"id":12411897668182016,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"Gaaa RT @nisa_sukin: Menanti gaunku... Muat gak yah,, hiks","entities":{"hashtags":[],"urls":[],"user_mentions":[{"indices":[8,19],"name":"Masitoh Hairunisa","screen_name":"nisa_sukin","id_str":"29117556","id":29117556}]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/www.ubertwitter.com\/bb\/download.php\" rel=\"nofollow\"\u003E\u00dcberTwitter\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:22 +000 \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xai b/third_party/objc/json-framework/Tests/Stream/xai deleted file mode 100644 index ce7d9a237ccbf..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xai +++ /dev/null @@ -1 +0,0 @@ -0 2010","truncated":false,"id_str":"12411901849903104","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":false,"description":"Happy wifey ;)","listed_count":0,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1291661299\/images\/themes\/theme1\/bg.png","profile_background_color":"C0DEED","location":"Here,there n everywhere","profile_use_background_image":true,"profile_text_color":"333333","followers_count":26,"statuses_count":255,"time_zone":null,"created_at":"Fri May 15 07:33:06 +0000 2009","friends_count":68,"protected":false,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1166898498\/209967688_normal.jpg","notifications":null,"profile_link_color":"0084B4","url":null,"name":"Dian Supramanik","id_str":"40197229","favourites_count":0,"screen_name":"supramanik","id":40197229,"contributors_enabled":false,"lang":"en","utc_offset":null,"profile_sidebar_fill_colo \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xaj b/third_party/objc/json-framework/Tests/Stream/xaj deleted file mode 100644 index 5cdddd960aad2..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xaj +++ /dev/null @@ -1,2 +0,0 @@ -r":"DDEEF6"},"id":12411901849903104,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"@FatboyRoberts Christ! I almost thought you were spam! My brain is melting, so I'll have to look at that tomorrow. Now: Brain death.","entities":{"urls":[],"hashtags":[],"user_mentions":[{"indices":[0,14],"name":"Fatboy Roberts","screen_name":"FatboyRoberts","id_str":"20921327","id":20921327}]},"in_reply_to_screen_name":"FatboyRoberts","in_reply_to_status_id_str":"12362450682773504","place":null,"contributors":null,"retweet_count":null,"in_reply_to_status_id":12362450682773504,"in_reply_to_user_id_str":"20921327","source":"\u003Ca href=\"http:\/\/www.tweetdeck.com\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:22 +0000 2010","truncated":false,"id_str":"12411901837320192","user":{"following":null,"listed_count":35,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1290538325\/images\/themes\/theme9\/bg \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xak b/third_party/objc/json-framework/Tests/Stream/xak deleted file mode 100644 index a09ddebd972c4..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xak +++ /dev/null @@ -1,2 +0,0 @@ -.gif","profile_sidebar_border_color":"ffffff","profile_use_background_image":false,"description":"Bad motherfucker, game journalist, taller than your boyfriend.","statuses_count":10032,"time_zone":"Pacific Time (US & Canada)","friends_count":148,"profile_background_color":"545454","location":"Portland, Oregon","profile_text_color":"878787","followers_count":716,"contributors_enabled":false,"created_at":"Thu Feb 07 02:55:38 +0000 2008","protected":false,"profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/688559405\/twinklestarsprites_normal.png","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"ad0000","url":"http:\/\/nex.vox.com\/","name":"Earnest Cavalli","id_str":"13189102","favourites_count":0,"screen_name":"ecavalli","id":13189102,"show_all_inline_media":true,"lang":"en","geo_enabled":true,"utc_offset":-28800,"profile_sidebar_fill_color":"1c1c1c"},"id":12411901837320192,"in_reply_to_user_id":20921327,"favorited":false} -{"coordinates":null,"text":"@crumpitout s \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xal b/third_party/objc/json-framework/Tests/Stream/xal deleted file mode 100644 index d3ab6f6192a56..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xal +++ /dev/null @@ -1 +0,0 @@ -hane.. we miss you with alesana\u00a1\u00a1 \ncome to mexico please :]\nwe love u :]\nxoxo","entities":{"hashtags":[],"urls":[],"user_mentions":[{"indices":[0,11],"name":"Shane Crump","screen_name":"crumpitout","id_str":"145315047","id":145315047}]},"in_reply_to_screen_name":"crumpitout","in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":"145315047","source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:22 +0000 2010","truncated":false,"id_str":"12411901854093312","user":{"following":null,"listed_count":0,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/149753364\/2mbdax.jpg","profile_sidebar_border_color":"ff00ff","profile_use_background_image":true,"description":"","statuses_count":338,"time_zone":"Mexico City","friends_count":114,"profile_background_color":"f50af5","location":"mexico, city","profile_text_color":"f009d5","followers_count" \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xam b/third_party/objc/json-framework/Tests/Stream/xam deleted file mode 100644 index 7ab96974db4b1..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xam +++ /dev/null @@ -1,2 +0,0 @@ -:31,"contributors_enabled":false,"created_at":"Sat Aug 29 23:25:10 +0000 2009","protected":false,"profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1126473913\/48906_1376585645_7669_q_normal.jpg","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"de13f0","url":"http:\/\/www.facebook.com\/profile.php?id=1376585645","name":"jezz sandoval","id_str":"69990626","favourites_count":0,"screen_name":"jezz_sandoval","id":69990626,"show_all_inline_media":true,"lang":"es","geo_enabled":false,"utc_offset":-21600,"profile_sidebar_fill_color":"08fc08"},"id":12411901854093312,"in_reply_to_user_id":145315047,"favorited":false} -{"coordinates":null,"text":"A new franchised business is opened every 8 minutes of every business day....Read more facts at http:\/\/ow.ly\/2ktXb","entities":{"urls":[{"expanded_url":null,"indices":[96,114],"url":"http:\/\/ow.ly\/2ktXb"}],"hashtags":[],"user_mentions":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contribut \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xan b/third_party/objc/json-framework/Tests/Stream/xan deleted file mode 100644 index be0c9082108fa..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xan +++ /dev/null @@ -1 +0,0 @@ -ors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/socialcreeper.com\" rel=\"nofollow\"\u003ESocialcreeper\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:22 +0000 2010","truncated":false,"id_str":"12411901854097408","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"5ED4DC","show_all_inline_media":false,"geo_enabled":false,"description":"No charge consulting services be your own boss work from home recession, proof businesses, available financing. our role is to help you and give you the best","listed_count":15,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1289607957\/images\/themes\/theme4\/bg.gif","profile_background_color":"0099B9","location":"new jersey","profile_use_background_image":true,"profile_text_color":"3C3940","followers_count":1918,"statuses_count":8216,"time_zone":"Eastern Time (US & Canada)","created_at \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xao b/third_party/objc/json-framework/Tests/Stream/xao deleted file mode 100644 index 328f27f5e723f..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xao +++ /dev/null @@ -1,2 +0,0 @@ -":"Wed Aug 04 08:30:19 +0000 2010","friends_count":2110,"protected":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1097183072\/franchise_normal.jpg","notifications":null,"profile_link_color":"0099B9","url":"http:\/\/www.facebook.com\/pages\/Advantage-Franchise-Consulting\/132423546795977?v=app_4949752878 ","name":"franchiseconsutling","id_str":"174584532","favourites_count":0,"screen_name":"consultingfree","id":174584532,"contributors_enabled":false,"lang":"en","utc_offset":-18000,"profile_sidebar_fill_color":"95E8EC"},"id":12411901854097408,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"La cruda es como la risa !","entities":{"hashtags":[],"urls":[],"user_mentions":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":null,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:22 +0000 2010","truncated":false,"id_str":"12 \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xap b/third_party/objc/json-framework/Tests/Stream/xap deleted file mode 100644 index 1bb58e790e9d9..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xap +++ /dev/null @@ -1 +0,0 @@ -411901875060736","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":false,"description":"La felicidad no es un estado de \u00e1nimo,sino una DECISI\u00d3N!","listed_count":1,"profile_background_tile":false,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/163795950\/cover.jpg","profile_background_color":"C0DEED","location":"","profile_use_background_image":true,"profile_text_color":"333333","followers_count":73,"statuses_count":1019,"time_zone":"Guadalajara","created_at":"Sun May 02 00:25:43 +0000 2010","friends_count":211,"protected":false,"profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1151825365\/40766_10150244183920072_565820071_14195871_5748381_n_normal.jpg","notifications":null,"profile_link_color":"0084B4","url":null,"name":"karmen beltr\u00e1n ","id_str":"139233639","favourites_count":2,"screen_name":"ka_beltran","id":139233639,"contributors_enabled":false," \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xaq b/third_party/objc/json-framework/Tests/Stream/xaq deleted file mode 100644 index 400133d719cdf..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xaq +++ /dev/null @@ -1,2 +0,0 @@ -lang":"es","utc_offset":-21600,"profile_sidebar_fill_color":"DDEEF6"},"id":12411901875060736,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"\u30d5\u30a9\u30ed\u30fc\u3057\u3066\u306d(^-^)\/ #followmejp #sougofollow #followdaibosyu \uff8a\uff9f\uff81\uff9d\uff7a \uff8a\uff9f\uff81\uff7d\uff9b \u7af6\u99ac \uff9b\uff84 \uff85\uff9d\uff8a\uff9e\uff70\uff7d\uff9e 1643128","entities":{"urls":[],"user_mentions":[],"hashtags":[{"text":"followmejp","indices":[14,25]},{"text":"sougofollow","indices":[26,38]},{"text":"followdaibosyu","indices":[39,54]}]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/www.movatwi.jp\" rel=\"nofollow\"\u003Ewww.movatwi.jp\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:23 +0000 2010","truncated":false,"id_str":"12411906056790016","user":{"follow_request_sent":null,"followin \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xar b/third_party/objc/json-framework/Tests/Stream/xar deleted file mode 100644 index 8df82f1b4cc48..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xar +++ /dev/null @@ -1,2 +0,0 @@ -g":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":false,"description":"","listed_count":7,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1291163542\/images\/themes\/theme1\/bg.png","profile_background_color":"C0DEED","location":"","profile_use_background_image":true,"profile_text_color":"333333","followers_count":1371,"statuses_count":5503,"time_zone":"Hawaii","created_at":"Thu Jul 29 13:53:49 +0000 2010","friends_count":1278,"protected":false,"profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1094558749\/_____normal.jpg","notifications":null,"profile_link_color":"0084B4","url":null,"name":"\u30e1\u30b0\u30df","id_str":"172346562","favourites_count":0,"screen_name":"megumi2258","id":172346562,"contributors_enabled":false,"lang":"ja","utc_offset":-36000,"profile_sidebar_fill_color":"DDEEF6"},"id":12411906056790016,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"Rant Forum: Sp \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xas b/third_party/objc/json-framework/Tests/Stream/xas deleted file mode 100644 index fe7684d035aa9..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xas +++ /dev/null @@ -1 +0,0 @@ -ike on \"HOT BED OF FOOTBALL.........MOST KNOWLEDGABLE SUPPORTERS BLAH BLAH BLAH!\" http:\/\/bit.ly\/hF9G1y #mufc #manutd","entities":{"hashtags":[{"text":"mufc","indices":[120,125]},{"text":"manutd","indices":[126,133]}],"urls":[{"expanded_url":null,"indices":[99,119],"url":"http:\/\/bit.ly\/hF9G1y"}],"user_mentions":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/twitterfeed.com\" rel=\"nofollow\"\u003Etwitterfeed\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:23 +0000 2010","truncated":false,"id_str":"12411906035818496","user":{"following":null,"listed_count":31,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_images\/151777477\/twitter-background.png","profile_sidebar_border_color":"990000","profile_use_background_image":true,"description":"Forum of the Uni \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xat b/third_party/objc/json-framework/Tests/Stream/xat deleted file mode 100644 index 829b9b5173dad..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xat +++ /dev/null @@ -1,2 +0,0 @@ -ted Rant blog visit www.unitedrant.co.uk\/forum for lively discussion.","statuses_count":6688,"time_zone":"London","friends_count":837,"profile_background_color":"000000","location":"Old Trafford","profile_text_color":"000000","followers_count":290,"contributors_enabled":false,"created_at":"Thu Jul 22 11:37:05 +0000 2010","protected":false,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1128154622\/twitter_new_badge_forum_normal.jpg","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"ccb100","url":"http:\/\/www.unitedrant.co.uk\/forum","name":"United Rant Forum","id_str":"169458574","favourites_count":0,"screen_name":"rant_forum","id":169458574,"show_all_inline_media":false,"lang":"en","geo_enabled":false,"utc_offset":0,"profile_sidebar_fill_color":"e00700"},"id":12411906035818496,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"Don't waste her time, if you still want to play around let her go. Its only fair. #MessageToMyBoys","entities \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xau b/third_party/objc/json-framework/Tests/Stream/xau deleted file mode 100644 index ed4a9191d6c8e..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xau +++ /dev/null @@ -1 +0,0 @@ -":{"hashtags":[{"text":"MessageToMyBoys","indices":[82,98]}],"urls":[],"user_mentions":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:23 +0000 2010","truncated":false,"id_str":"12411906069368832","user":{"following":null,"listed_count":2,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_images\/177052687\/3235134362_c0f681f914_o.jpg","profile_sidebar_border_color":"C0DEED","profile_use_background_image":true,"description":"I am an enigma, wrapped in a sesame and nestled in a riddle of some mystery.","statuses_count":5795,"time_zone":"Pretoria","friends_count":207,"profile_background_color":"C0DEED","location":"\u00dcT: -26.193627,28.041314","profile_text_color":"333333","followers_count":275,"contributors_enabled":false,"created_at":"Fri May 01 06:55:0 \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xav b/third_party/objc/json-framework/Tests/Stream/xav deleted file mode 100644 index 8b20e966fbf48..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xav +++ /dev/null @@ -1,2 +0,0 @@ -3 +0000 2009","protected":false,"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1183768439\/DSC06923_normal.JPG","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"0084B4","url":"http:\/\/www.mspmc.co.za","name":"Mafedi Selepe","id_str":"36901018","favourites_count":0,"screen_name":"MafediSelepe","id":36901018,"show_all_inline_media":false,"lang":"en","geo_enabled":true,"utc_offset":7200,"profile_sidebar_fill_color":"DDEEF6"},"id":12411906069368832,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"Ada setan. *katanyasih. RT @PROMOTEfor: #tanyaremaja (jaman sd) hal apa yg membuat km takut ke toilet sendirian ?","entities":{"urls":[],"hashtags":[{"text":"tanyaremaja","indices":[40,52]}],"user_mentions":[{"indices":[27,38],"name":"Hendra J.P.","screen_name":"PROMOTEfor","id_str":"112023841","id":112023841}]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xaw b/third_party/objc/json-framework/Tests/Stream/xaw deleted file mode 100644 index 2aa8c1a58c62a..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xaw +++ /dev/null @@ -1 +0,0 @@ -_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/www.ubertwitter.com\/bb\/download.php\" rel=\"nofollow\"\u003E\u00dcberTwitter\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:23 +0000 2010","truncated":false,"id_str":"12411906052587520","user":{"following":null,"listed_count":0,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/107674614\/1237098635915429223StudioFibonacci_Cartoon_Hillside_with_Butterfly_and_Flowers.svg.hi","profile_sidebar_border_color":"e61739","profile_use_background_image":true,"description":"229EB3B1 :)))\r\ni'm a big fans of @xtianbautista . \r\nAn ordinary girl with a big dreams. you will confuse if you know who really i am. ","statuses_count":2529,"time_zone":"Pacific Time (US & Canada)","friends_count":56,"profile_background_color":"B2DFDA","location":"Canada. \u00dcT: -6.224251,106.9222","profile_text_color":"e61010","followers_count":69,"contributors_enabled":fals \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xax b/third_party/objc/json-framework/Tests/Stream/xax deleted file mode 100644 index 26cd19a9235ac..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xax +++ /dev/null @@ -1,2 +0,0 @@ -e,"created_at":"Tue Feb 23 09:35:19 +0000 2010","protected":false,"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1174458315\/ajeng_normal.jpg","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"1ce1e8","url":null,"name":"Ajeng Lintang","id_str":"116697581","favourites_count":0,"screen_name":"AjengLD","id":116697581,"show_all_inline_media":false,"lang":"en","geo_enabled":false,"utc_offset":-28800,"profile_sidebar_fill_color":"e08db3"},"id":12411906052587520,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"\u958b\u62d3\u9ad8\u6821\u306e\u6821\u6b4c\u304c\u9244\u8155\u30a2\u30c8\u30e0\u3060\u3063\u305f\u4ef6","entities":{"urls":[],"hashtags":[],"user_mentions":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:23 +0000 2010","truncated":fa \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xay b/third_party/objc/json-framework/Tests/Stream/xay deleted file mode 100644 index 97583873d649e..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xay +++ /dev/null @@ -1 +0,0 @@ -lse,"id_str":"12411906035818497","user":{"following":null,"listed_count":0,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_images\/166881635\/sas.png","profile_sidebar_border_color":"C0DEED","profile_use_background_image":true,"description":"\u30d7\u30ed\u30b9\u30d4\u3067\u81ea\u5206\u4f5c\u3063\u305f\u3089\u5929\u72d7\u4e26\u307f\u306e\u8d70\u529b\u306b\u306a\u3063\u305f\u30fb\u30fb\u30fb\u308f\u3051\u3067\u3082\u306a\u304b\u3063\u305f\u30fb\u30fb\u30fb\u3068\u304b\u8a00\u3063\u3066\u4f5c\u308a\u76f4\u3057\u305f\u3089\u672c\u5f53\u306b\u5929\u72d7\u306b\u306a\u3063\u305f","statuses_count":1324,"time_zone":"Osaka","friends_count":24,"profile_background_color":"C0DEED","location":"\u65e7\u5730\u7344\u8857\u9053\u5165\u308a\u53e3\u4ed8\u8fd1","profile_text_color":"333333","followers_count":18,"contributors_enabled":false,"created_at":"Sat Oct 30 08:39:38 +0000 2010","protected":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1179158108\/ \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xaz b/third_party/objc/json-framework/Tests/Stream/xaz deleted file mode 100644 index aa71f6f7d88da..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xaz +++ /dev/null @@ -1,2 +0,0 @@ -52_normal.png","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"0084B4","url":null,"name":"\u53e4\u660e\u5730\u60a0\u99ac","id_str":"209976874","favourites_count":7,"screen_name":"Komeiji88","id":209976874,"show_all_inline_media":false,"lang":"ja","geo_enabled":true,"utc_offset":32400,"profile_sidebar_fill_color":"DDEEF6"},"id":12411906035818497,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"@KOOL_GANG \uc0b4\uc544\ub098\ub77c \uc6b0\ub9ac \uc5d0\uc774\uc2a4.","entities":{"urls":[],"hashtags":[],"user_mentions":[{"indices":[0,10],"name":"Kool Gang","screen_name":"KOOL_GANG","id_str":"173724958","id":173724958}]},"in_reply_to_screen_name":"KOOL_GANG","in_reply_to_status_id_str":"12410887285506048","place":null,"contributors":null,"retweet_count":null,"in_reply_to_status_id":12410887285506048,"in_reply_to_user_id_str":"173724958","source":"\u003Ca href=\"http:\/\/twtkr.com\" rel=\"nofollow\"\u003Etwtkr\u003C\/a\u003E","retweeted":false,"geo":null \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xba b/third_party/objc/json-framework/Tests/Stream/xba deleted file mode 100644 index 661d420a41c93..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xba +++ /dev/null @@ -1 +0,0 @@ -,"created_at":"Wed Dec 08 07:43:23 +0000 2010","truncated":false,"id_str":"12411906052591616","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":false,"description":"","listed_count":1,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1290538325\/images\/themes\/theme1\/bg.png","profile_background_color":"C0DEED","location":"\uc5f0\ud76c\uc8fc\ubbfc","profile_use_background_image":true,"profile_text_color":"333333","followers_count":34,"statuses_count":416,"time_zone":"Hawaii","created_at":"Thu Aug 19 06:08:37 +0000 2010","friends_count":36,"protected":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1106972912\/aa_normal.jpg","notifications":null,"profile_link_color":"0084B4","url":null,"name":"dub&beard","id_str":"180269638","favourites_count":1,"screen_name":"yaguwang","id":180269638,"contributors_enabled":false,"lang":"en","utc_offset":-36000,"profil \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xbb b/third_party/objc/json-framework/Tests/Stream/xbb deleted file mode 100644 index 6c439e5ed9809..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xbb +++ /dev/null @@ -1,2 +0,0 @@ -e_sidebar_fill_color":"DDEEF6"},"id":12411906052591616,"in_reply_to_user_id":173724958,"favorited":false} -{"coordinates":null,"text":"RT @Ricki_MINAJ: @TeemFollowBack @1109_2904 #teamfollowback twitter famous boy>>> @Ricki_MINAJ <<<","entities":{"urls":[],"hashtags":[{"text":"teamfollowback","indices":[44,59]}],"user_mentions":[{"indices":[3,15],"name":"Ricky Johnson","screen_name":"Ricki_MINAJ","id_str":"51198602","id":51198602},{"indices":[17,32],"name":"Teem Follow Back","screen_name":"TeemFollowBack","id_str":"185188539","id":185188539},{"indices":[33,43],"name":"Aprilian Angel","screen_name":"1109_2904","id_str":"92217048","id":92217048},{"indices":[91,103],"name":"Ricky Johnson","screen_name":"Ricki_MINAJ","id_str":"51198602","id":51198602}]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":null,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/seesmic.com\/app\" rel=\"nofollow\ \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xbc b/third_party/objc/json-framework/Tests/Stream/xbc deleted file mode 100644 index ed7c1018638d9..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xbc +++ /dev/null @@ -1 +0,0 @@ -"\u003ESeesmic Web\u003C\/a\u003E","retweeted_status":{"coordinates":null,"text":"@TeemFollowBack @1109_2904 #teamfollowback twitter famous boy>>> @Ricki_MINAJ <<<","entities":{"urls":[],"hashtags":[{"text":"teamfollowback","indices":[27,42]}],"user_mentions":[{"indices":[0,15],"name":"Teem Follow Back","screen_name":"TeemFollowBack","id_str":"185188539","id":185188539},{"indices":[16,26],"name":"Aprilian Angel","screen_name":"1109_2904","id_str":"92217048","id":92217048},{"indices":[74,86],"name":"Ricky Johnson","screen_name":"Ricki_MINAJ","id_str":"51198602","id":51198602}]},"in_reply_to_screen_name":"TeemFollowBack","in_reply_to_status_id_str":"12405913709191168","place":null,"contributors":null,"retweet_count":null,"in_reply_to_status_id":12405913709191168,"in_reply_to_user_id_str":"185188539","source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:04 +0000 2010","truncated":false,"id_str":"12411825870077952","user":{"follow_request_sent":null,"following":null,"verifie \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xbd b/third_party/objc/json-framework/Tests/Stream/xbd deleted file mode 100644 index 1a709bdaf4be9..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xbd +++ /dev/null @@ -1 +0,0 @@ -d":false,"profile_sidebar_border_color":"65B0DA","show_all_inline_media":false,"geo_enabled":false,"description":"I LOVE SWEET BABY JESUS..FASHION IS MY LIFE..MUSIC IS NEXT..THEN FOOD, LOL MY LIFE IS MY BRAND,SO I DRESS LIKE IT!!","listed_count":18,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/20055732\/a2f270d4e7d605ac34e48d0fc454b_3701.jpg","profile_background_color":"642D8B","location":"NEW YORK RIHANNA WORLD","profile_use_background_image":true,"profile_text_color":"3D1957","followers_count":1822,"statuses_count":12985,"time_zone":"Mountain Time (US & Canada)","created_at":"Fri Jun 26 19:51:29 +0000 2009","friends_count":1990,"protected":false,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1170133326\/jess_and_ricki_normal.jpg","notifications":null,"profile_link_color":"FF0000","url":"http:\/\/www.blogtv.com\/People\/koolzone","name":"Ricky Johnson","id_str":"51198602","favourites_count":6,"screen_name":"Ricki_MINAJ","id":5119 \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xbe b/third_party/objc/json-framework/Tests/Stream/xbe deleted file mode 100644 index ba04816f70927..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xbe +++ /dev/null @@ -1 +0,0 @@ -8602,"contributors_enabled":false,"lang":"en","utc_offset":-25200,"profile_sidebar_fill_color":"7AC3EE"},"id":12411825870077952,"in_reply_to_user_id":185188539,"favorited":false},"retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:23 +0000 2010","truncated":false,"id_str":"12411906035810304","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"3fdbe3","show_all_inline_media":false,"geo_enabled":true,"description":"\u2665 I am 12 years old \u2665 Simple \u2665 Cool Guy \u2665 Stitch \u2665 Sanurians \u2665 Tasya \u2665 Boys \u2665 Follow me and I will folback, Just Mention Me \u2665 Aprilian Angel \u2665","listed_count":16,"profile_background_tile":false,"profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_images\/169085711\/4___.jpg","profile_background_color":"25646b","location":"Jakarta","profile_use_background_image":false,"profile_text_color":"2579b0","followers_count":613,"statuses_count":9079,"time_zone":"Jakarta","created_at": \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xbf b/third_party/objc/json-framework/Tests/Stream/xbf deleted file mode 100644 index 7f8c5be3b8c0b..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xbf +++ /dev/null @@ -1,2 +0,0 @@ -"Tue Nov 24 06:49:28 +0000 2009","friends_count":563,"protected":false,"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1161334751\/75785_1659322691840_1500333081_1624686_3546893_n_normal.jpg","notifications":null,"profile_link_color":"40b892","url":null,"name":"Aprilian Angel","id_str":"92217048","favourites_count":27,"screen_name":"1109_2904","id":92217048,"contributors_enabled":false,"lang":"en","utc_offset":25200,"profile_sidebar_fill_color":"c3e1e3"},"id":12411906035810304,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"@naxvee ohhhh I DOOO :D","entities":{"urls":[],"user_mentions":[{"indices":[0,7],"name":"nax vee","screen_name":"naxvee","id_str":"22720749","id":22720749}],"hashtags":[]},"in_reply_to_screen_name":"naxvee","in_reply_to_status_id_str":"12411850935242752","place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":12411850935242752,"in_reply_to_user_id_str":"22720749","source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 0 \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xbg b/third_party/objc/json-framework/Tests/Stream/xbg deleted file mode 100644 index 6ff206a873d0e..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xbg +++ /dev/null @@ -1 +0,0 @@ -7:43:24 +0000 2010","truncated":false,"id_str":"12411910238502912","user":{"contributors_enabled":false,"following":null,"follow_request_sent":null,"verified":false,"profile_sidebar_border_color":"efff12","show_all_inline_media":false,"geo_enabled":false,"description":"i like to ponder. that is all.","profile_background_color":"760dff","location":"Straya","listed_count":5,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/124352628\/5576399.jpg","profile_text_color":"121eff","followers_count":145,"profile_use_background_image":true,"created_at":"Sun Feb 14 01:15:20 +0000 2010","protected":false,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1185036286\/Untitled_normal.png","statuses_count":3899,"notifications":null,"time_zone":"Hawaii","friends_count":146,"profile_link_color":"00ff00","url":"http:\/\/www.formspring.me\/lizzwilko","name":"I\u2665JohnnyDepp","id_str":"114068978","favourites_count":164,"screen_name":"TheLizzyEnd","id":114 \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xbh b/third_party/objc/json-framework/Tests/Stream/xbh deleted file mode 100644 index 87762087047b7..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xbh +++ /dev/null @@ -1,2 +0,0 @@ -068978,"lang":"en","utc_offset":-36000,"profile_sidebar_fill_color":"ff0558"},"id":12411910238502912,"in_reply_to_user_id":22720749,"favorited":false} -{"coordinates":null,"text":"#Nighttweeters hmu DM or txt <3","entities":{"urls":[],"hashtags":[{"text":"Nighttweeters","indices":[0,14]}],"user_mentions":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:24 +0000 2010","truncated":false,"id_str":"12411910242705408","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":false,"description":"Mexican|19|Raves|Electro,Dubstep,Trance|drinking|Working|Down To Earth|Straight Out|Girls|:) Txting|Webcam|Snakebites|\r\nSingle|Follow me & Ill Follow you :)","listed_count":5,"profile_background_tile":true,"profile_backgrou \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xbi b/third_party/objc/json-framework/Tests/Stream/xbi deleted file mode 100644 index f76ff60d52d52..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xbi +++ /dev/null @@ -1,2 +0,0 @@ -nd_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/130349966\/4638030806_55122db25e_o.jpg","profile_background_color":"C0DEED","location":"Fontana, Ca","profile_use_background_image":true,"profile_text_color":"333333","followers_count":250,"statuses_count":4189,"time_zone":"Alaska","created_at":"Tue Aug 03 05:28:53 +0000 2010","friends_count":463,"protected":false,"profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1184365797\/gothamcity-189-of-294_normal.png","notifications":null,"profile_link_color":"0084B4","url":"http:\/\/www.myspace.com\/fourlokoking","name":"Juan Felix","id_str":"174137258","favourites_count":0,"screen_name":"Lostboyyyy","id":174137258,"contributors_enabled":false,"lang":"en","utc_offset":-32400,"profile_sidebar_fill_color":"DDEEF6"},"id":12411910242705408,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"@amaeletronica D'Baginyus : S.A.K.I.T LOL --> RT oliiind: Hooo eksssss RT WilliamWilz: oliiind engga jelek :b http:\/\/boo.lol.vc\/lL \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xbj b/third_party/objc/json-framework/Tests/Stream/xbj deleted file mode 100644 index 725acc2a78d0b..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xbj +++ /dev/null @@ -1 +0,0 @@ -fE8","entities":{"urls":[{"expanded_url":null,"indices":[114,137],"url":"http:\/\/boo.lol.vc\/lLfE8"}],"hashtags":[],"user_mentions":[{"indices":[0,14],"name":"anderson avila","screen_name":"amaeletronica","id_str":"73257249","id":73257249}]},"in_reply_to_screen_name":"amaeletronica","in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":"73257249","source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:24 +0000 2010","truncated":false,"id_str":"12411910242697216","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":false,"description":null,"listed_count":0,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1291318259\/images\/themes\/theme1\/bg.png","profile_background_color":"C0DEED","location":null,"profile_use_background_image":true,"profile_text_color":"333333","follo \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xbk b/third_party/objc/json-framework/Tests/Stream/xbk deleted file mode 100644 index 3adbd2d20539a..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xbk +++ /dev/null @@ -1,2 +0,0 @@ -wers_count":4,"statuses_count":378,"time_zone":null,"created_at":"Sun Dec 05 17:31:14 +0000 2010","friends_count":0,"protected":false,"profile_image_url":"http:\/\/s.twimg.com\/a\/1291318259\/images\/default_profile_2_normal.png","notifications":null,"profile_link_color":"0084B4","url":null,"name":"irene aguilera","id_str":"223191796","favourites_count":0,"screen_name":"bunndeknalifa","id":223191796,"contributors_enabled":false,"lang":"en","utc_offset":null,"profile_sidebar_fill_color":"DDEEF6"},"id":12411910242697216,"in_reply_to_user_id":73257249,"favorited":false} -{"coordinates":null,"text":"Haha ejiyek lia mainannya gombal sekarang hahaRT @_ameliahudayana: yoiii RT @vanyaau: Rerun extravaganza","entities":{"urls":[],"hashtags":[],"user_mentions":[{"indices":[49,65],"name":"Amelia Hudayana","screen_name":"_ameliahudayana","id_str":"162588680","id":162588680},{"indices":[76,84],"name":"vanya Beti La Venus","screen_name":"vanyaau","id_str":"65334621","id":65334621}]},"in_reply_to_screen_name":null,"in_reply \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xbl b/third_party/objc/json-framework/Tests/Stream/xbl deleted file mode 100644 index ba7e2fd428f26..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xbl +++ /dev/null @@ -1 +0,0 @@ -_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"https:\/\/dabr.mobi\" rel=\"nofollow\"\u003EE = mc\u00b2\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:24 +0000 2010","truncated":false,"id_str":"12411910238511104","user":{"following":null,"listed_count":8,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_images\/62088481\/cup_cakes.JPG","profile_sidebar_border_color":"7e3091","profile_use_background_image":true,"description":"260695, 15th, FH, ALFAJAR JHS, MUHAMMADIYAH SHS, #THRH's HEART, A PART OF X.3, jazz addict, #AnakGalau\u2665 beti la gondrong venus GREET: vanyaau@hot xoxo :*","statuses_count":10309,"time_zone":"Pacific Time (US & Canada)","friends_count":287,"profile_background_color":"fa197e","location":"Planet venus~ fairy world","profile_text_color":"e8099a","followers_count":255,"contributors_enabled":fals \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xbm b/third_party/objc/json-framework/Tests/Stream/xbm deleted file mode 100644 index a63813efdd072..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xbm +++ /dev/null @@ -1,2 +0,0 @@ -e,"created_at":"Thu Aug 13 10:32:49 +0000 2009","protected":false,"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1176654063\/vanyac_normal.jpg","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"7135cc","url":"http:\/\/vanyaau.blogspot.com","name":"vanya Beti La Venus","id_str":"65334621","favourites_count":104,"screen_name":"vanyaau","id":65334621,"show_all_inline_media":false,"lang":"en","geo_enabled":false,"utc_offset":-28800,"profile_sidebar_fill_color":"d880f5"},"id":12411910238511104,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"Orange Soda.","entities":{"urls":[],"hashtags":[],"user_mentions":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:24 +0000 2010","truncated":false,"id_str":"12411910255288320","user":{"following":nul \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xbn b/third_party/objc/json-framework/Tests/Stream/xbn deleted file mode 100644 index e49ed4dcbba00..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xbn +++ /dev/null @@ -1 +0,0 @@ -l,"listed_count":23,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_images\/179350469\/PacManTee.jpg","profile_sidebar_border_color":"badcad","profile_use_background_image":true,"description":"Deadly Robot love Owner. Lifestyle Blogger. Designer. Poet. Collector. Grandson.","statuses_count":56123,"time_zone":"Eastern Time (US & Canada)","friends_count":196,"profile_background_color":"919191","location":"Atlanta","profile_text_color":"333333","followers_count":716,"contributors_enabled":false,"created_at":"Mon May 04 22:27:05 +0000 2009","protected":false,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1180397702\/KevinDRL_normal.jpg","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"0a0a0a","url":"http:\/\/www.deadlyrobotlove.com\/","name":"K\u2665vin, The Robot.","id_str":"37777826","favourites_count":4,"screen_name":"deadlyrobotlove","id":37777826,"show_all_inline_media":false,"lang":"en","geo_enabled": \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xbo b/third_party/objc/json-framework/Tests/Stream/xbo deleted file mode 100644 index 5ca1c071f18f6..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xbo +++ /dev/null @@ -1,2 +0,0 @@ -false,"utc_offset":-18000,"profile_sidebar_fill_color":"686e6e"},"id":12411910255288320,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"@chiru_hms DMCSjp RT denamamoto: I'd swim across the world for you... lol joking, there are sharks in there. http:\/\/zry.m2r.ru\/HPOon","entities":{"urls":[{"expanded_url":null,"indices":[109,132],"url":"http:\/\/zry.m2r.ru\/HPOon"}],"user_mentions":[{"indices":[0,10],"name":"chiru","screen_name":"chiru_hms","id_str":"114779568","id":114779568}],"hashtags":[]},"in_reply_to_screen_name":"chiru_hms","in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":"114779568","source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:24 +0000 2010","truncated":false,"id_str":"12411910259474432","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":false,"description \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xbp b/third_party/objc/json-framework/Tests/Stream/xbp deleted file mode 100644 index 99d1b9d2be5b8..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xbp +++ /dev/null @@ -1,2 +0,0 @@ -":"","listed_count":0,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1291318259\/images\/themes\/theme1\/bg.png","profile_background_color":"C0DEED","location":"","profile_use_background_image":true,"profile_text_color":"333333","followers_count":9,"statuses_count":575,"time_zone":null,"created_at":"Sun Dec 05 17:14:25 +0000 2010","friends_count":0,"protected":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1183205820\/twitterProfilePhoto_normal.jpg_normal.146","notifications":null,"profile_link_color":"0084B4","url":null,"name":"shanel thornton","id_str":"223186483","favourites_count":0,"screen_name":"frn_JBiebtrBR","id":223186483,"contributors_enabled":false,"lang":"en","utc_offset":null,"profile_sidebar_fill_color":"DDEEF6"},"id":12411910259474432,"in_reply_to_user_id":114779568,"favorited":false} -{"coordinates":null,"text":"\u039a\u03b1\u03bb\u03b7\u03bc\u03b5\u03c1\u03b1 \u03ba\u03b1\u03b9 \u03c5\u03c0\u03bf\u03bc\u03bf\u03bd\u03b7! \u039f\u03c \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xbq b/third_party/objc/json-framework/Tests/Stream/xbq deleted file mode 100644 index 8fe2dc87cae2f..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xbq +++ /dev/null @@ -1 +0,0 @@ -3\u03bf\u03b9 \u03b5\u03b9\u03c3\u03c4\u03b5 \u03ba\u03bf\u03bd\u03c4\u03b1 \u03bc\u03b7\u03bd \u03c0\u03b1\u03c1\u03b5\u03c4\u03b5 \u03b1\u03c5\u03c4\u03bf\u03ba\u03b9\u03bd\u03b7\u03c4\u03bf, \u03c0\u03bf\u03b4\u03b9\u03b1 \u03b7 \u03c0\u03bf\u03b4\u03b7\u03bb\u03b1\u03c4\u03bf..!","entities":{"urls":[],"hashtags":[],"user_mentions":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/twitter.com\/\" rel=\"nofollow\"\u003ETwitter for iPhone\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:24 +0000 2010","truncated":false,"id_str":"12411910234308608","user":{"following":null,"listed_count":10,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_images\/167969569\/bodypaint_floyd.jpg","profile_sidebar_border_color":"829D5E","profile_use_background_image":true,"description":" \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xbr b/third_party/objc/json-framework/Tests/Stream/xbr deleted file mode 100644 index a45fa41492d4b..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xbr +++ /dev/null @@ -1,2 +0,0 @@ -Summer Dream!","statuses_count":1932,"time_zone":"Athens","friends_count":240,"profile_background_color":"352726","location":"Currently Lost","profile_text_color":"3E4415","followers_count":235,"contributors_enabled":false,"created_at":"Thu Oct 28 22:40:07 +0000 2010","protected":false,"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1154617775\/IMG_3032_normal.JPG","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"0c1bc7","url":null,"name":"Psychophski","id_str":"209295433","favourites_count":33,"screen_name":"Psychophski","id":209295433,"show_all_inline_media":false,"lang":"en","geo_enabled":true,"utc_offset":7200,"profile_sidebar_fill_color":"336bcc"},"id":12411910234308608,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":{"coordinates":[0,0],"type":"Point"},"text":"to protest or not to protest...that is the question!","entities":{"urls":[],"hashtags":[],"user_mentions":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":n \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xbs b/third_party/objc/json-framework/Tests/Stream/xbs deleted file mode 100644 index 4a1eb7b91032b..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xbs +++ /dev/null @@ -1 +0,0 @@ -ull,"contributors":null,"retweet_count":null,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/www.tweetdeck.com\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E","retweeted":false,"geo":{"coordinates":[0,0],"type":"Point"},"created_at":"Wed Dec 08 07:43:24 +0000 2010","truncated":false,"id_str":"12411910251085824","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"aef5fa","show_all_inline_media":false,"geo_enabled":true,"description":"you'll never regret giving it your best, so go on and do it. ","listed_count":1,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1291750721\/images\/themes\/theme1\/bg.png","profile_background_color":"214542","location":"Washington","profile_use_background_image":true,"profile_text_color":"739e9f","followers_count":32,"statuses_count":516,"time_zone":null,"created_at":"Wed Sep 15 06:21:58 +0000 2010","friends_count":85,"protected":false,"profile_ \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xbt b/third_party/objc/json-framework/Tests/Stream/xbt deleted file mode 100644 index ab3682af28eb5..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xbt +++ /dev/null @@ -1,2 +0,0 @@ -image_url":"http:\/\/a2.twimg.com\/profile_images\/1155612338\/26_normal.jpg","notifications":null,"profile_link_color":"b4d9ad","url":null,"name":"Sarah Jane Burns","id_str":"190941250","favourites_count":0,"screen_name":"sarahjb93","id":190941250,"contributors_enabled":false,"lang":"en","utc_offset":null,"profile_sidebar_fill_color":"3b615d"},"id":12411910251085824,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"@soyFayo me puse peor hoy esta semana quiero recuperarme para que no se me complique u.u","entities":{"urls":[],"user_mentions":[{"indices":[0,8],"name":"Fayo","screen_name":"soyFayo","id_str":"72220601","id":72220601}],"hashtags":[]},"in_reply_to_screen_name":"soyFayo","in_reply_to_status_id_str":"12411227426787328","place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":12411227426787328,"in_reply_to_user_id_str":"72220601","source":"\u003Ca href=\"http:\/\/twittme.mobi\" rel=\"nofollow\"\u003Etwittme.mobi\u003C\/a\u003E","retweeted":false,"geo":null," \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xbu b/third_party/objc/json-framework/Tests/Stream/xbu deleted file mode 100644 index 78fd96f7d7efb..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xbu +++ /dev/null @@ -1 +0,0 @@ -created_at":"Wed Dec 08 07:43:24 +0000 2010","truncated":false,"id_str":"12411910230118400","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"fff8ad","show_all_inline_media":false,"geo_enabled":false,"description":"ESCRITORAILUSTRADORA, CARTONISTA,FISICA-MATEMATICAS,futura vulcanologa. Y ENAMORADA D LA VIDA Y SOY 100%UNAM Hija adoptiva de @marinataibo3 y @monicamateosV","listed_count":158,"profile_background_tile":false,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/137229680\/Fenix_ohen_small.jpg","profile_background_color":"FFF04D","location":"estado de Ebriedad M\u00e9xico ","profile_use_background_image":true,"profile_text_color":"333333","followers_count":2066,"statuses_count":60566,"time_zone":"Mexico City","created_at":"Sun Nov 15 02:51:14 +0000 2009","friends_count":1890,"protected":false,"profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1184479641\/imagesCANA8G7F_normal.jpg","notifications":null,"profile_l \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xbv b/third_party/objc/json-framework/Tests/Stream/xbv deleted file mode 100644 index bf2cee65b2b73..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xbv +++ /dev/null @@ -1,2 +0,0 @@ -ink_color":"0099CC","url":"http:\/\/cienciasartes.blogspot.com\/ ","name":"Luc\u00edaVillarrealLuna","id_str":"90079038","favourites_count":39,"screen_name":"pokemonera","id":90079038,"contributors_enabled":false,"lang":"es","utc_offset":-21600,"profile_sidebar_fill_color":"f6ffd1"},"id":12411910230118400,"in_reply_to_user_id":72220601,"favorited":false} -{"coordinates":null,"text":"@bonita_Niyah she gotta txt & tell kuz she dnt have a fb she da shy type so idk but she gon have 2 tell soon or lata","entities":{"urls":[],"user_mentions":[{"indices":[0,13],"name":"\ue32d. . . \ue144","screen_name":"bonita_Niyah","id_str":"123750163","id":123750163}],"hashtags":[]},"in_reply_to_screen_name":"bonita_Niyah","in_reply_to_status_id_str":"12408747867508737","place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":12408747867508737,"in_reply_to_user_id_str":"123750163","source":"\u003Ca href=\"http:\/\/www.ubertwitter.com\/bb\/download.php\" rel=\"nofollow\"\u003E\u00dcberTwitter\u003C\/a\u003E","re \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xbw b/third_party/objc/json-framework/Tests/Stream/xbw deleted file mode 100644 index e52236a29bf18..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xbw +++ /dev/null @@ -1 +0,0 @@ -tweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:24 +0000 2010","truncated":false,"id_str":"12411910255284224","user":{"contributors_enabled":false,"following":null,"follow_request_sent":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":true,"description":"I'M A DAUGHTER..A BESTFRIEND..A FRIEND..A SISTER..A COUSIN..A AUNTIE..A FIGHTER..A LOVER..A SINNER..A SAINT..I WILL TELL YOU 1 THING IM NOT A DOORMAT.. ","profile_background_color":"C0DEED","location":"Nwk NJ","listed_count":0,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1291318259\/images\/themes\/theme1\/bg.png","profile_text_color":"333333","followers_count":30,"profile_use_background_image":true,"created_at":"Fri Aug 13 03:42:52 +0000 2010","protected":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1101800168\/x2_24cd30d_normal.jpg","statuses_count":715,"notifications":null,"time_zone":"Eastern Time (US & Canada)","friends_count \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xbx b/third_party/objc/json-framework/Tests/Stream/xbx deleted file mode 100644 index 7b5a8cfc9178c..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xbx +++ /dev/null @@ -1,2 +0,0 @@ -":157,"profile_link_color":"0084B4","url":null,"name":"Iesha Bankston","id_str":"177814999","favourites_count":0,"screen_name":"Pretty_Esh_B","id":177814999,"lang":"en","utc_offset":-18000,"profile_sidebar_fill_color":"DDEEF6"},"id":12411910255284224,"in_reply_to_user_id":123750163,"favorited":false} -{"coordinates":null,"text":"galau ga enek tebengan hahaha RT @ridowidi: galau kok jek ttp twitteranRT @anityaardiyani: nambah2i galauku wae RT... http:\/\/mtw.tl\/lf6idh","entities":{"urls":[{"expanded_url":null,"indices":[118,138],"url":"http:\/\/mtw.tl\/lf6idh"}],"hashtags":[],"user_mentions":[{"indices":[33,42],"name":"ridho widi","screen_name":"ridowidi","id_str":"216939950","id":216939950},{"indices":[74,89],"name":"anitya ardiyani p","screen_name":"anityaardiyani","id_str":"77723022","id":77723022}]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/ \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xby b/third_party/objc/json-framework/Tests/Stream/xby deleted file mode 100644 index c686945ef57c7..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xby +++ /dev/null @@ -1 +0,0 @@ -m.tweete.net\" rel=\"nofollow\"\u003Em.tweete.net\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:25 +0000 2010","truncated":false,"id_str":"12411914441195520","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":true,"geo_enabled":true,"description":"","listed_count":0,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/176784334\/Shichibukai.jpg","profile_background_color":"C0DEED","location":"Indonesia","profile_use_background_image":true,"profile_text_color":"333333","followers_count":32,"statuses_count":433,"time_zone":"Jakarta","created_at":"Tue Nov 02 11:14:29 +0000 2010","friends_count":53,"protected":false,"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1179237591\/Image026_normal.jpg","notifications":null,"profile_link_color":"0084B4","url":null,"name":"Irwan Syah","id_str":"211117875","favourites_count":0,"screen_name":" \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xbz b/third_party/objc/json-framework/Tests/Stream/xbz deleted file mode 100644 index 41ecb834f4721..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xbz +++ /dev/null @@ -1,2 +0,0 @@ -irwan_akt","id":211117875,"contributors_enabled":false,"lang":"en","utc_offset":25200,"profile_sidebar_fill_color":"DDEEF6"},"id":12411914441195520,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"@nanafatemn7 \u77e5\u3089\u306d\u3048\u3088\uff57\uff57\uff57\u3044\u3044\u3058\u3083\u3093\u3002\u544a\u3063\u3061\u3083\u3048\uff01","entities":{"urls":[],"hashtags":[],"user_mentions":[{"indices":[0,12],"name":"\u306a\u306a\u30d5\u30a7\u30a4! \u795d\uff01\u5948\u3005\u3055\u3093\u7d05\u767d\u51fa\u5834\uff01","screen_name":"nanafatemn7","id_str":"155566960","id":155566960}]},"in_reply_to_screen_name":"nanafatemn7","in_reply_to_status_id_str":"12411662476775424","place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":12411662476775424,"in_reply_to_user_id_str":"155566960","source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:25 +0000 2010","truncated":false,"id_str":"12411914445393920","user":{"follow_request_sent":null,"following":null,"verified":f \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xca b/third_party/objc/json-framework/Tests/Stream/xca deleted file mode 100644 index b058410135727..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xca +++ /dev/null @@ -1 +0,0 @@ -alse,"profile_sidebar_border_color":"FFFFFF","show_all_inline_media":false,"geo_enabled":false,"description":"\u5909\u614b\u3067\u3059\u3002\u53d6\u308a\u6562\u3048\u305a\u9a12\u3044\u3067\u308b\u91ce\u90ce\u3067\u3059\u3002\u4e2d\uff13\u3002\u6b63\u76f4\u3001\u30a8\u30ed\u3044\u306e\u306f\u4ed5\u65b9\u306a\u3044\u3068\u601d\u3063\u3066\u307e\u3059\u3002\r\n\r\n\uff12\u6b21\u5143\u306f\u305d\u308c\u306a\u308a\u306b\u306f\u7406\u89e3\u51fa\u6765\u307e\u3059\u304c\u2026\r\n\r\n\u30dd\u30b1\u30e2\u30f3\u3084\u3063\u3066\u307e\u3059\r\n\r\n\r\n\u75db\u3044\u3067\u3059\u3051\u308c\u3069\r\n\r\n\u3088\u308d\u3057\u304f\u304a\u9858\u3044\u3057\u307e\u3059(\u7206)","listed_count":0,"profile_background_tile":false,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/124093074\/bg.jpg","profile_background_color":"000000","location":"\u30a8\u30f3\u30b8\u30e5\u30b7\u30c6\u30a3","profile_use_background_image":true,"profile_text_color":"b344b3","followers_count":24,"statuses_count":1547,"time_z \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xcb b/third_party/objc/json-framework/Tests/Stream/xcb deleted file mode 100644 index 030a98119d6a8..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xcb +++ /dev/null @@ -1,2 +0,0 @@ -one":"Osaka","created_at":"Fri Mar 19 08:48:17 +0000 2010","friends_count":55,"protected":false,"profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1182098397\/100813_1246340001_normal.jpg","notifications":null,"profile_link_color":"CC3300","url":null,"name":"\u30b7\u30fc\u30c9\u6a29\u0444","id_str":"124404959","favourites_count":2,"screen_name":"Sheadken","id":124404959,"contributors_enabled":false,"lang":"ja","utc_offset":32400,"profile_sidebar_fill_color":"F7DA93"},"id":12411914445393920,"in_reply_to_user_id":155566960,"favorited":false} -{"coordinates":null,"text":"\u7720\u3044\u30fb\u30fb\u30fb","entities":{"urls":[],"user_mentions":[],"hashtags":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:25 +0000 2010","truncated":false,"id_str":"12411914437009408","user":{"follow_request_sent":null,"foll \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xcc b/third_party/objc/json-framework/Tests/Stream/xcc deleted file mode 100644 index 49da381a14f80..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xcc +++ /dev/null @@ -1 +0,0 @@ -owing":null,"verified":false,"profile_sidebar_border_color":"ffcb47","show_all_inline_media":false,"geo_enabled":false,"description":"WORKING\u3001\u30dc\u30ab\u30ed\u3001\u30dc\u30fc\u30dc\u30dc\u3001DRRR\u597d\u304d\u3067\u3059\uff57(\u00b4\u03c9\uff40)","listed_count":0,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/179023784\/14533769_p9.png","profile_background_color":"ffd4ff","location":"\u5922\u306e\u4e2d\u266c","profile_use_background_image":true,"profile_text_color":"089629","followers_count":15,"statuses_count":465,"time_zone":"Hawaii","created_at":"Wed Oct 27 11:15:34 +0000 2010","friends_count":38,"protected":false,"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1161025943\/magnet_normal.jpg","notifications":null,"profile_link_color":"ff2499","url":"http:\/\/ameblo.jp\/work-ing\/","name":"\u5922\u65e5\u8a18\u266a","id_str":"208488936","favourites_count":0,"screen_name":"yumenonikki327","id":208488936,"contributors_enable \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xcd b/third_party/objc/json-framework/Tests/Stream/xcd deleted file mode 100644 index 6b2c31d2108cd..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xcd +++ /dev/null @@ -1,2 +0,0 @@ -d":false,"lang":"ja","utc_offset":-36000,"profile_sidebar_fill_color":"fdff82"},"id":12411914437009408,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"14.79 euro valt nog wel mee voor 8 dagen tijd","entities":{"urls":[],"hashtags":[],"user_mentions":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/www.tweetdeck.com\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:25 +0000 2010","truncated":false,"id_str":"12411914457980928","user":{"following":null,"listed_count":0,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1290538325\/images\/themes\/theme5\/bg.gif","profile_sidebar_border_color":"829D5E","profile_use_background_image":true,"description":"- -","statuses_count":3291,"time_zone":"Amsterdam","friends_count":71,"profile \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xce b/third_party/objc/json-framework/Tests/Stream/xce deleted file mode 100644 index fd7e417db74e0..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xce +++ /dev/null @@ -1,2 +0,0 @@ -_background_color":"352726","location":"Vlaardingen","profile_text_color":"3E4415","followers_count":67,"contributors_enabled":false,"created_at":"Mon Nov 23 07:34:26 +0000 2009","protected":false,"profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1160466321\/Foto0850_normal.jpg","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"D02B55","url":"http:\/\/www.priscillaa15.hyves.nl","name":"Priscilla v Vliet","id_str":"91959124","favourites_count":1,"screen_name":"xpriscil","id":91959124,"show_all_inline_media":false,"lang":"en","geo_enabled":false,"utc_offset":3600,"profile_sidebar_fill_color":"99CC33"},"id":12411914457980928,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"Is This A Serious Question? -___- (iamskippytv) RT @JBooqiie_DEC20 @iamSkippyTV what's ya oovoo","entities":{"hashtags":[],"urls":[],"user_mentions":[{"indices":[51,66],"name":"Joshua && Yhu ?!","screen_name":"JBooqiie_DEC20","id_str":"89241118","id":89241118},{"indices": \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xcf b/third_party/objc/json-framework/Tests/Stream/xcf deleted file mode 100644 index abefbbc050a2d..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xcf +++ /dev/null @@ -1 +0,0 @@ -[67,79],"name":"Skippy MaKenzi","screen_name":"iamSkippyTV","id_str":"30615809","id":30615809}]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/mobile.twitter.com\" rel=\"nofollow\"\u003EMobile Web\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:25 +0000 2010","truncated":false,"id_str":"12411914453782528","user":{"following":null,"listed_count":22,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/178920818\/iamskippytv.jpg","profile_sidebar_border_color":"eeeeee","profile_use_background_image":true,"description":"Youtube Video Blogger, Twitter Addict, Socialist, SKIPPY \u2665's BOYS! #TeamTaurus \u2649","statuses_count":36360,"time_zone":"Central Time (US & Canada)","friends_count":97,"profile_background_color":"3b3c3d","location":"CottenCandy & Rainbow Field" \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xcg b/third_party/objc/json-framework/Tests/Stream/xcg deleted file mode 100644 index f96a5f4df7247..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xcg +++ /dev/null @@ -1,2 +0,0 @@ -,"profile_text_color":"121112","followers_count":471,"contributors_enabled":false,"created_at":"Sun Apr 12 06:41:34 +0000 2009","protected":false,"profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1183274157\/IMG00169-20101205-0211_normal.jpg","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"889494","url":"http:\/\/itsmyurls.com\/skippy","name":"Skippy MaKenzi","id_str":"30615809","favourites_count":117,"screen_name":"iamSkippyTV","id":30615809,"show_all_inline_media":false,"lang":"en","geo_enabled":false,"utc_offset":-21600,"profile_sidebar_fill_color":"efefef"},"id":12411914453782528,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"nyasar gak yak?","entities":{"urls":[],"user_mentions":[],"hashtags":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/202.153.132.152\" rel=\"nof \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xch b/third_party/objc/json-framework/Tests/Stream/xch deleted file mode 100644 index eeaa8e9e1af90..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xch +++ /dev/null @@ -1 +0,0 @@ -ollow\"\u003EHP_Esia\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:25 +0000 2010","truncated":false,"id_str":"12411914428616705","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":false,"description":"be my self :)","listed_count":0,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1291064993\/images\/themes\/theme1\/bg.png","profile_background_color":"C0DEED","location":"","profile_use_background_image":true,"profile_text_color":"333333","followers_count":31,"statuses_count":875,"time_zone":"Pacific Time (US & Canada)","created_at":"Tue Sep 21 08:36:25 +0000 2010","friends_count":19,"protected":false,"profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1161524757\/IMG8943A_normal.jpg","notifications":null,"profile_link_color":"0084B4","url":null,"name":"Nnisa Lutfi Zuldah","id_str":"193220237","favourites_count":1,"screen_name":"zuld \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xci b/third_party/objc/json-framework/Tests/Stream/xci deleted file mode 100644 index b79bacc846c01..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xci +++ /dev/null @@ -1,2 +0,0 @@ -annisa","id":193220237,"contributors_enabled":false,"lang":"en","utc_offset":-28800,"profile_sidebar_fill_color":"DDEEF6"},"id":12411914428616705,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"@bayfm78 \u3046\u3093\u3001\u307e\u3041\u305d\u3046\u89e3\u91c8\u3059\u308b\u306a\u3089\u305d\u308c\u3067\u3082\u3044\u3044\u3093\u3058\u3083\u306a\u3044\u3002","entities":{"urls":[],"user_mentions":[{"indices":[0,8],"name":"\u304b\u305a\u304f\u3093\u3001\u3075\u3049\u3048\u3070","screen_name":"bayfm78","id_str":"21861792","id":21861792}],"hashtags":[]},"in_reply_to_screen_name":"bayfm78","in_reply_to_status_id_str":"12409691430715392","place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":12409691430715392,"in_reply_to_user_id_str":"21861792","source":"\u003Ca href=\"http:\/\/twtr.jp\" rel=\"nofollow\"\u003EKeitai Web\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:25 +0000 2010","truncated":false,"id_str":"12411914449588224","user":{"follow_re \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xcj b/third_party/objc/json-framework/Tests/Stream/xcj deleted file mode 100644 index 9245d710f9255..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xcj +++ /dev/null @@ -1 +0,0 @@ -quest_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":false,"description":"NAME:FENNEL SP:\u5341\u6bb5 ID:6294-9963 mixi\u30fbpixiv:\u5efb\u7409 mixi\u306f\u97f3\u30b2\u30fc\u30de\u30fc\u3057\u304b\u627f\u8a8d\u3057\u307e\u305b\u3093","listed_count":3,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1291661299\/images\/themes\/theme1\/bg.png","profile_background_color":"C0DEED","location":"","profile_use_background_image":true,"profile_text_color":"333333","followers_count":32,"statuses_count":760,"time_zone":"Tokyo","created_at":"Tue Feb 02 13:38:00 +0000 2010","friends_count":27,"protected":false,"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1174879155\/101116_1351_01000100010002_normal.jpg","notifications":null,"profile_link_color":"0084B4","url":null,"name":"\u3075\u3047\u3093\u306d\u308b","id_str":"110701310","favourites_count":0,"screen_name":"fennel62949963","id":110701 \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xck b/third_party/objc/json-framework/Tests/Stream/xck deleted file mode 100644 index b1d2a5ec3571a..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xck +++ /dev/null @@ -1,2 +0,0 @@ -310,"contributors_enabled":false,"lang":"ja","utc_offset":32400,"profile_sidebar_fill_color":"DDEEF6"},"id":12411914449588224,"in_reply_to_user_id":21861792,"favorited":false} -{"coordinates":null,"text":"RT @mrkie: RT @divamayday: 3daagse staking tnt is begonnen #geenrekeningen","entities":{"urls":[],"hashtags":[{"text":"geenrekeningen","indices":[59,74]}],"user_mentions":[{"indices":[3,9],"name":"Marky Mark","screen_name":"mrkie","id_str":"26185044","id":26185044},{"indices":[14,25],"name":"mayday","screen_name":"divamayday","id_str":"47942511","id":47942511}]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":1,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"web","retweeted_status":{"coordinates":null,"text":"RT @divamayday: 3daagse staking tnt is begonnen #geenrekeningen","entities":{"urls":[],"hashtags":[{"text":"geenrekeningen","indices":[48,63]}],"user_mentions":[{"indices":[3,14],"name":"mayday","screen_name":"divamay \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xcl b/third_party/objc/json-framework/Tests/Stream/xcl deleted file mode 100644 index a11528d80c3da..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xcl +++ /dev/null @@ -1 +0,0 @@ -day","id_str":"47942511","id":47942511}]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":1,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/motionobj.com\/simplytweet\" rel=\"nofollow\"\u003ESimplyTweet\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 05:09:22 +0000 2010","truncated":false,"id_str":"12373147395301376","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"BDDCAD","show_all_inline_media":true,"geo_enabled":false,"description":"Bodybuilding by obsession, Hairstylist by profession..... | '78 | iPhone | iMac | Las Vegas | Uncle | Brother | Son | Frienemy |","listed_count":2,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1290123564\/images\/themes\/theme16\/bg.gif","profile_background_color":"9AE4E8","location":"South Holland, Netherlands","profile_use_background_image":true,"profi \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xcm b/third_party/objc/json-framework/Tests/Stream/xcm deleted file mode 100644 index 1ac8e782e554f..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xcm +++ /dev/null @@ -1 +0,0 @@ -le_text_color":"333333","followers_count":152,"statuses_count":13146,"time_zone":"Amsterdam","created_at":"Tue Mar 24 05:30:55 +0000 2009","friends_count":146,"protected":false,"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1160078091\/IMG_0008_normal.JPG","notifications":null,"profile_link_color":"0084B4","url":null,"name":"Marky Mark","id_str":"26185044","favourites_count":176,"screen_name":"mrkie","id":26185044,"contributors_enabled":false,"lang":"en","utc_offset":3600,"profile_sidebar_fill_color":"DDFFCC"},"id":12373147395301376,"in_reply_to_user_id":null,"favorited":false},"retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:25 +0000 2010","truncated":false,"id_str":"12411914445398016","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":false,"description":"","listed_count":0,"profile_background_tile":false,"profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_image \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xcn b/third_party/objc/json-framework/Tests/Stream/xcn deleted file mode 100644 index 4cbd3bef99f7c..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xcn +++ /dev/null @@ -1,2 +0,0 @@ -s\/127910069\/mooi.jpg","profile_background_color":"C0DEED","location":"Alphen aan den Rijn","profile_use_background_image":true,"profile_text_color":"333333","followers_count":14,"statuses_count":647,"time_zone":null,"created_at":"Thu Jun 10 10:59:43 +0000 2010","friends_count":26,"protected":false,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/976722090\/KepCom-1412_normal.jpg","notifications":null,"profile_link_color":"0084B4","url":"http:\/\/sbarlingen.hyves.nl","name":"Sigrid van Barlingen","id_str":"154100166","favourites_count":0,"screen_name":"sbarlingen","id":154100166,"contributors_enabled":false,"lang":"en","utc_offset":null,"profile_sidebar_fill_color":"DDEEF6"},"id":12411914445398016,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"semangatttt,,,semngarr...","entities":{"urls":[],"hashtags":[],"user_mentions":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xco b/third_party/objc/json-framework/Tests/Stream/xco deleted file mode 100644 index fcbcc8b228cc6..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xco +++ /dev/null @@ -1 +0,0 @@ -_reply_to_user_id_str":null,"source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:26 +0000 2010","truncated":false,"id_str":"12411918614532097","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"085982","show_all_inline_media":false,"geo_enabled":false,"description":"nice girl :D","listed_count":0,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/178686370\/25390_1148602295676_1846165700_287303_5835946_n.jpg","profile_background_color":"004a82","location":"","profile_use_background_image":true,"profile_text_color":"095aab","followers_count":63,"statuses_count":859,"time_zone":"Alaska","created_at":"Tue Oct 12 12:39:08 +0000 2010","friends_count":281,"protected":false,"profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1182960469\/k_normal.jpg","notifications":null,"profile_link_color":"17a1eb","url":null,"name":"Reski Amelia","id_str":"201698354","favourites_count":1,"s \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xcp b/third_party/objc/json-framework/Tests/Stream/xcp deleted file mode 100644 index a8c1ab801c3e1..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xcp +++ /dev/null @@ -1,2 +0,0 @@ -creen_name":"kikotkikota","id":201698354,"contributors_enabled":false,"lang":"en","utc_offset":-32400,"profile_sidebar_fill_color":"6b1b10"},"id":12411918614532097,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"\u30de\u30b8\u9b3c\u755c RT @321waltz: 5\u6708\u304c\u30aa\u30fc\u30e9\u30b9\u306a\u306e\u306b\u6765\u9031\u672b\u307e\u3067\u306b\u632f\u308a\u8fbc\u307e\u305b\u308b\u4e8b\u52d9\u6240\u30de\u30b8\u9b3c\u755c \uff1eP\u69d8\u30bd\u30ed\u30b3\u30f3","entities":{"urls":[],"hashtags":[],"user_mentions":[{"indices":[8,17],"name":"\u4e00\u4e8c\u4e09\uff08\u308f\u308b\u3064\uff09","screen_name":"321waltz","id_str":"67910402","id":67910402}]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/tabtter.jp\" rel=\"nofollow\"\u003E\u30bf\u30d6\u30c3\u30bf\u30fc\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 0 \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xcq b/third_party/objc/json-framework/Tests/Stream/xcq deleted file mode 100644 index f69d0ab6868a0..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xcq +++ /dev/null @@ -1 +0,0 @@ -7:43:26 +0000 2010","truncated":false,"id_str":"12411918614532096","user":{"following":null,"listed_count":16,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_images\/160986641\/tumblr_l9vvhnwKu81qc006io1_500.jpg","profile_sidebar_border_color":"5ED4DC","profile_use_background_image":true,"description":"R23*U\u597d\u304d\uff9b\uff78\uff9d\u62c5*NSKD\u306f\u9752\u6625*\uff7c\uff79\uff9e\u3082\u597d\u304d\uff7c\uff9e\uff6c\uff9d*\u3084\u3076\u3072\u304b\u306f\u6b63\u7fa9*\u4f0a\u91ce\u5c3e\u541b\u306f\u7652\u3057*not\u4e8b\u52d9\u6240\u62c5\/\u9ebb\u91cc\u5b50\u69d8\u795e\u63a8\u3057*\uff82\uff72\uff9d\uff80\uff9c\uff70\u63a8\u3057\/\u6c34\u6a39\u5948\u3005\u69d8\u656c\u611b\/\uff8c\uff6b\uff9b\uff70\uff65\uff98\uff91\uff65RT\uff65\uff98\uff8c\uff9f\u306f\u304a\u6c17\u8efd\u306b\uff65\u4f46\u3057\u304b\u306a\u308a\uff73\uff7b\uff9e\uff72\u306e\u3067\u8981\u6ce8\u610f\/\u4e3b\u306b\u5e73\u65e5\u663c\u9593\u306b\u6d3b\u52d5\/\u5fc5\u8981\u306b\u5fdc\u3058\u3 \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xcr b/third_party/objc/json-framework/Tests/Stream/xcr deleted file mode 100644 index 50743f983770b..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xcr +++ /dev/null @@ -1,2 +0,0 @@ -066\uff8c\uff9e\uff9b\uff6f\uff78\u3057\u305f\u308a\u3057\u307e\u3059\/\u88cf\u8d64\u2192jasmine_yellow","statuses_count":16955,"time_zone":"Tokyo","friends_count":97,"profile_background_color":"0099B9","location":"\u307b\u307c\u795e\u5948\u5ddd","profile_text_color":"3C3940","followers_count":196,"contributors_enabled":false,"created_at":"Tue Mar 24 08:10:51 +0000 2009","protected":false,"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1180674943\/imageCASN4VYP_normal.jpg","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"00a3b8","url":null,"name":"\u3042\u3063\u304d\u30fc\u306a(\uff65\uff40-\u00b4)","id_str":"26199234","favourites_count":1131,"screen_name":"kmdakn","id":26199234,"show_all_inline_media":false,"lang":"ja","geo_enabled":false,"utc_offset":32400,"profile_sidebar_fill_color":"95E8EC"},"id":12411918614532096,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"pending intan maharani RT @soalCERITA: Nama Gebetan-mu Sewaktu SD? # \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xcs b/third_party/objc/json-framework/Tests/Stream/xcs deleted file mode 100644 index a6e6df064188c..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xcs +++ /dev/null @@ -1 +0,0 @@ -MasaSekolah :)","entities":{"urls":[],"hashtags":[{"text":"MasaSekolah","indices":[67,79]}],"user_mentions":[{"indices":[26,37],"name":"Soal Cerita","screen_name":"soalCERITA","id_str":"186345369","id":186345369}]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/m.tweete.net\" rel=\"nofollow\"\u003Em.tweete.net\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:26 +0000 2010","truncated":false,"id_str":"12411918635499520","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":true,"description":"i share my voice for my band @DestinyOfFuture | i share my life for allah swt | i share my heart for my 7","listed_count":2,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1290538325\/images\/themes \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xct b/third_party/objc/json-framework/Tests/Stream/xct deleted file mode 100644 index d79bf346f2fb2..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xct +++ /dev/null @@ -1,2 +0,0 @@ -\/theme1\/bg.png","profile_background_color":"C0DEED","location":"Pondok Gede,jakarta timur","profile_use_background_image":true,"profile_text_color":"333333","followers_count":328,"statuses_count":17575,"time_zone":"Pacific Time (US & Canada)","created_at":"Mon Aug 03 06:08:46 +0000 2009","friends_count":310,"protected":false,"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1156247995\/DiasDOF_normal.JPG","notifications":null,"profile_link_color":"0084B4","url":"http:\/\/www.myspace.com\/537395778","name":"Diaz Putra Pratama","id_str":"62451320","favourites_count":38,"screen_name":"Diassaurus","id":62451320,"contributors_enabled":false,"lang":"en","utc_offset":-28800,"profile_sidebar_fill_color":"DDEEF6"},"id":12411918635499520,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"haduh bsk bhs.inggris sama ips lagi","entities":{"urls":[],"hashtags":[],"user_mentions":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_ \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xcu b/third_party/objc/json-framework/Tests/Stream/xcu deleted file mode 100644 index 95f26ce27c097..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xcu +++ /dev/null @@ -1 +0,0 @@ -count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:26 +0000 2010","truncated":false,"id_str":"12411918639693824","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"eb387a","show_all_inline_media":false,"geo_enabled":true,"description":"just a little boy who growing up","listed_count":0,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_images\/132078393\/Conan8.jpg","profile_background_color":"f5f8fa","location":"Pamulang, Indonesia","profile_use_background_image":true,"profile_text_color":"c74052","followers_count":36,"statuses_count":60,"time_zone":"Pacific Time (US & Canada)","created_at":"Sat Aug 07 05:52:21 +0000 2010","friends_count":61,"protected":false,"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1097481287\/IMG1441A_normal.jpg","notifications":null,"profile_link_color":"a3e1f7","url":null,"na \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xcv b/third_party/objc/json-framework/Tests/Stream/xcv deleted file mode 100644 index 1de478616d983..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xcv +++ /dev/null @@ -1,2 +0,0 @@ -me":"Taufik Wicak","id_str":"175652995","favourites_count":0,"screen_name":"taufikwicak","id":175652995,"contributors_enabled":false,"lang":"en","utc_offset":-28800,"profile_sidebar_fill_color":"fcfeff"},"id":12411918639693824,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"LOL I THOUGHT U WANTED BIGGIE BACK RT @ChinkyEyedButta: #lemmeguess @YungBossez denying my baby??? Smh","entities":{"urls":[],"hashtags":[{"text":"lemmeguess","indices":[56,67]}],"user_mentions":[{"indices":[38,54],"name":"Piggy!","screen_name":"ChinkyEyedButta","id_str":"28321072","id":28321072},{"indices":[68,79],"name":"LARRY LIVE","screen_name":"YungBossez","id_str":"79103494","id":79103494}]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/www.echofon.com\/\" rel=\"nofollow\"\u003EEchofon\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xcw b/third_party/objc/json-framework/Tests/Stream/xcw deleted file mode 100644 index b6ec0d8020fe7..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xcw +++ /dev/null @@ -1 +0,0 @@ - Dec 08 07:43:26 +0000 2010","truncated":false,"id_str":"12411918652276736","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":false,"description":"BOSSNATION!!! THINK LIKE A BOSS.. MOVE LIKE A BOSS.. BECOME A BOSS!! WE MOVIN!!!! KIK: YungBossElz","listed_count":31,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/136340262\/IMG_0011_1_.JPG","profile_background_color":"C0DEED","location":"NYC","profile_use_background_image":true,"profile_text_color":"333333","followers_count":1450,"statuses_count":43647,"time_zone":"Quito","created_at":"Fri Oct 02 05:23:49 +0000 2009","friends_count":740,"protected":false,"profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1184354137\/YungBossez_normal.jpg","notifications":null,"profile_link_color":"0084B4","url":"http:\/\/www.apple.com","name":"LARRY LIVE","id_str":"79103494","favourites_count":18,"scree \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xcx b/third_party/objc/json-framework/Tests/Stream/xcx deleted file mode 100644 index 8cf181af9fd55..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xcx +++ /dev/null @@ -1,2 +0,0 @@ -n_name":"YungBossez","id":79103494,"contributors_enabled":false,"lang":"en","utc_offset":-18000,"profile_sidebar_fill_color":"DDEEF6"},"id":12411918652276736,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"@renzoom \u3044\u3084\u3001\u540c\u3058\u9ad8\u6821\u306a\u3089\u5802\u3005\u3068\u300c\u5148\u8f29\u300d\u3068\u547c\u3079\u308b\u6a29\u5229\u7372\u5f97\u3067\u3059\u3088!?\u6749\u7530\u2026\u5148\u8f29\u2026\u30db\u30ef\u30a2\u30a2\u30a2\u30a1\u30a1\u30a1\u30a2\u30a2\uff1c\u25cf\uff1e\/\/\/\/\uff1c\u25cf\uff1e\u306a\u3093\u306a\u3093\u3067\u3059\u304b\u604b\u30b7\u30e5\u30df\u306a\u3093\u3067\u3059\u304b\u3068\u304d\u3081\u304d\u30e1\u30e2\u30ea\u30a2\u30ebin\u5c0f\u5ddd\uff01\uff01\uff01\u653b\u7565\u30ad\u30e3\u30e9\u2192\u6749\u7530\u5148\u8f29Only","entities":{"hashtags":[],"urls":[],"user_mentions":[{"indices":[0,8],"name":"\u30ec\u30f3\u30ba\u30a3\u30fc","screen_name":"renzoom","id_str":"80027788","id":80027788}]},"in_reply_to_screen_name":"renzoom","in_reply_to_status_id_ \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xcy b/third_party/objc/json-framework/Tests/Stream/xcy deleted file mode 100644 index b6786948d7c7e..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xcy +++ /dev/null @@ -1 +0,0 @@ -str":"12386429707485184","place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":12386429707485184,"in_reply_to_user_id_str":"80027788","source":"\u003Ca href=\"http:\/\/twtr.jp\" rel=\"nofollow\"\u003EKeitai Web\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:26 +0000 2010","truncated":false,"id_str":"12411918631309312","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":false,"description":"\u3054\u98ef\u306e\u4e8b\u3070\u3063\u304b\u8003\u3048\u3066\u307e\u3059\u3002\u6f2b\u753b\u30fb\u30a2\u30cb\u30e1\u95a2\u9023\u306e\u30c4\u30a4\u30fc\u30c8\u591a\u3044\u3067\u3059\u3002","listed_count":1,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1290538325\/images\/themes\/theme1\/bg.png","profile_background_color":"C0DEED","location":"","profile_use_background_image":true,"profile_text_color":"333333","followers_count":23,"stat \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xcz b/third_party/objc/json-framework/Tests/Stream/xcz deleted file mode 100644 index 0b263554ed845..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xcz +++ /dev/null @@ -1,2 +0,0 @@ -uses_count":315,"time_zone":"Tokyo","created_at":"Thu Oct 21 00:46:18 +0000 2010","friends_count":41,"protected":false,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1149146122\/DVC00089_normal.jpg","notifications":null,"profile_link_color":"0084B4","url":null,"name":"\u30d2\u30c3\u30dd\u30ed\u7cfb\u30cb\u30e3\u30dd\u30fc\u30f3","id_str":"205496590","favourites_count":1,"screen_name":"OpporeGassen","id":205496590,"contributors_enabled":false,"lang":"ja","utc_offset":32400,"profile_sidebar_fill_color":"DDEEF6"},"id":12411918631309312,"in_reply_to_user_id":80027788,"favorited":false} -{"coordinates":null,"text":"\u7d20\u4eba\u767a\u8a00ww RT @AsrA924: \u300c\u98a8\u6708\u3055\u3093\u3001\u76ee\u7acb\u3064\u5ba3\u4f1d\u8003\u3048\u3066\uff01\u300d\u300c\u306f\u3044\uff1f\uff01\u300d\u300c\u3060\u304b\u3089\u3070\u3070\u30fc\u3093\u3068\u76ee\u7acb\u3063\u3061\u3083\u3046\u5ba3\u4f1d\uff01\u300d\u300c\u5bfe\u8c61\u306f\u2026\u300d\u300c\u307f\u3093\u306a\uff01\uff01\u300d\u300c\u307f\u3093\u306a\u306 \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xda b/third_party/objc/json-framework/Tests/Stream/xda deleted file mode 100644 index 8eae8bda6ff71..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xda +++ /dev/null @@ -1 +0,0 @@ -3\u3066\u8a00\u308f\u308c\u307e\u3057\u3066\u3082\u2026\u300d\u300c\u76ee\u7acb\u3064\u5ba3\u4f1d\u306f\u8ab0\u306b\u3068\u3063\u3066\u3082\u76ee\u7acb\u3064\u3067\u3057\u3087\uff01\uff01\u300d\u2026\u3060\u3081\u3060\u3053\u308a\u3083\u3002","entities":{"hashtags":[],"urls":[],"user_mentions":[{"indices":[10,18],"name":"\u98a8\u6708\u3042\u3059\u3089","screen_name":"AsrA924","id_str":"112167510","id":112167510}]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":null,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/www.echofon.com\/\" rel=\"nofollow\"\u003EEchofon\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:26 +0000 2010","truncated":false,"id_str":"12411918614528000","user":{"following":null,"listed_count":13,"profile_background_tile":true,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1291318259\/images\/themes\/theme14\/bg.gif","profile_sidebar_border_color" \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xdb b/third_party/objc/json-framework/Tests/Stream/xdb deleted file mode 100644 index 8be15d97b9f15..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xdb +++ /dev/null @@ -1 +0,0 @@ -:"eeeeee","profile_use_background_image":true,"description":"1983.07.04 \u55b6\u696d\u3002\u793e\u4f1a\u306e\u53b3\u3057\u3055\u3092\u52c9\u5f37\u4e2d\u3067\u3059\u3002\u9031\u672b\u306f\u611b\u8eca\u306e\u30ed\u30fc\u30c9\u30ec\u30fc\u30b5\u30fc\u3067\u30b5\u30a4\u30af\u30ea\u30f3\u30b0\uff01\u91ce\u7403\u3001\u5343\u8449\u30ed\u30c3\u30c6\u3001\u30c0\u30fc\u30c4\u3001\u97f3\u697d\u3001\u6620\u753b\u3001\u65c5\u884c\u3001\u81ea\u8ee2\u8eca\u65c5\u884c\u597d\u304d\u3067\u3059\u3002\u3088\u308d\u3057\u304f\u304a\u9858\u3044\u3057\u307e\u3059\u3002\u3042\u3063\u3001\u30c1\u30e7\u30c3\u30d1\u30fc\u597d\u304d\u3067\u3059\uff01","statuses_count":2392,"time_zone":"Tokyo","friends_count":483,"profile_background_color":"131516","location":"\u5343\u8449\u770c\u5e02\u5ddd\u5e02\u5999\u5178","profile_text_color":"333333","followers_count":291,"contributors_enabled":false,"created_at":"Mon Dec 21 10:04:09 +0000 2009","protected":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1183120212\/fukkyman_normal \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xdc b/third_party/objc/json-framework/Tests/Stream/xdc deleted file mode 100644 index cc46a96788a44..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xdc +++ /dev/null @@ -1,2 +0,0 @@ -.jpg","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"009999","url":null,"name":"\u3075\u3063\u304d\u30fc\u30de\u30f3","id_str":"98340517","favourites_count":32,"screen_name":"fukkyman","id":98340517,"show_all_inline_media":false,"lang":"ja","geo_enabled":true,"utc_offset":32400,"profile_sidebar_fill_color":"efefef"},"id":12411918614528000,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"@lengraciazz99 zz","entities":{"urls":[],"hashtags":[],"user_mentions":[{"indices":[0,14],"name":"Hellena Gracia \uff61\u25d5\u203f\u25d5\uff61","screen_name":"lengraciazz99","id_str":"127160903","id":127160903}]},"in_reply_to_screen_name":"lengraciazz99","in_reply_to_status_id_str":"12411745138122752","place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":12411745138122752,"in_reply_to_user_id_str":"127160903","source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:26 +0000 2010","truncated":false,"id_str":"124119186480906 \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xdd b/third_party/objc/json-framework/Tests/Stream/xdd deleted file mode 100644 index 8f71d1bd7a285..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xdd +++ /dev/null @@ -1 +0,0 @@ -24","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":true,"description":"hello , my name is john James Apillio , i like playing piano , i want to be a princepiano .. wkwk .. i'm single .. chatolic .. ","listed_count":0,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/176397228\/edit.JPG","profile_background_color":"C0DEED","location":"jakarta","profile_use_background_image":true,"profile_text_color":"333333","followers_count":55,"statuses_count":1882,"time_zone":"Pacific Time (US & Canada)","created_at":"Mon Oct 11 09:01:29 +0000 2010","friends_count":144,"protected":false,"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1174624371\/ME_normal.jpg","notifications":null,"profile_link_color":"0084B4","url":null,"name":"Frank james Aprillio","id_str":"201190413","favourites_count":3,"screen_name":"frankyakob","id":201190413,"contributors \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xde b/third_party/objc/json-framework/Tests/Stream/xde deleted file mode 100644 index 0752dedbddaae..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xde +++ /dev/null @@ -1,2 +0,0 @@ -_enabled":false,"lang":"en","utc_offset":-28800,"profile_sidebar_fill_color":"DDEEF6"},"id":12411918648090624,"in_reply_to_user_id":127160903,"favorited":false} -{"coordinates":null,"text":"mboh, aku wez mari nde kmpus, tp te jln2 sek aku mbek nevi santi, hehe RT @dindalovelove @dindydind gak enak tahh ... heh mole jam piro awak","entities":{"urls":[],"hashtags":[],"user_mentions":[{"indices":[74,88],"name":"winda hermawan ","screen_name":"dindalovelove","id_str":"93166570","id":93166570},{"indices":[89,99],"name":"Indri Rahmawati","screen_name":"dindydind","id_str":"77725423","id":77725423}]},"in_reply_to_screen_name":"dindalovelove","in_reply_to_status_id_str":"12411470138580992","place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":12411470138580992,"in_reply_to_user_id_str":"93166570","source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:27 +0000 2010","truncated":false,"id_str":"12411922821419009","user":{"follow_request_sent":null,"following":null,"verified":fal \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xdf b/third_party/objc/json-framework/Tests/Stream/xdf deleted file mode 100644 index aada9f9d53a93..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xdf +++ /dev/null @@ -1 +0,0 @@ -se,"profile_sidebar_border_color":"ffffff","show_all_inline_media":false,"geo_enabled":true,"description":"luv my family sooo much","listed_count":3,"profile_background_tile":false,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/130377756\/twittmn.jpg","profile_background_color":"ec7b3e","location":"Malang, Indonesia","profile_use_background_image":true,"profile_text_color":"030303","followers_count":99,"statuses_count":1744,"time_zone":"Jakarta","created_at":"Sun Sep 27 12:31:59 +0000 2009","friends_count":93,"protected":false,"profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1139037997\/36174_1534584098950_1665256568_1290462_4376492_n_normal.jpg","notifications":null,"profile_link_color":"07545e","url":null,"name":"Indri Rahmawati","id_str":"77725423","favourites_count":4,"screen_name":"dindydind","id":77725423,"contributors_enabled":false,"lang":"en","utc_offset":25200,"profile_sidebar_fill_color":"ec7b3e"},"id":12411922821419009,"in_reply_to_user_id":93166570,"f \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xdg b/third_party/objc/json-framework/Tests/Stream/xdg deleted file mode 100644 index 5c0dece77da94..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xdg +++ /dev/null @@ -1,2 +0,0 @@ -avorited":false} -{"coordinates":null,"text":"@AThousandFall conan para presidente de la rep\u00fablica","entities":{"urls":[],"hashtags":[],"user_mentions":[{"indices":[0,14],"name":"A Thousand Fall","screen_name":"AThousandFall","id_str":"108740471","id":108740471}]},"in_reply_to_screen_name":"AThousandFall","in_reply_to_status_id_str":"12391305862713344","place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":12391305862713344,"in_reply_to_user_id_str":"108740471","source":"\u003Ca href=\"http:\/\/www.echofon.com\/\" rel=\"nofollow\"\u003EEchofon\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:27 +0000 2010","truncated":false,"id_str":"12411922821419008","user":{"following":null,"listed_count":3,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_images\/178454607\/Gambit.jpg","profile_sidebar_border_color":"eeeeee","profile_use_background_image":true,"description":"","statuses_count":8135,"time_zone":null," \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xdh b/third_party/objc/json-framework/Tests/Stream/xdh deleted file mode 100644 index ae0894ce422c1..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xdh +++ /dev/null @@ -1,2 +0,0 @@ -friends_count":591,"profile_background_color":"131516","location":"El Paso Tx","profile_text_color":"333333","followers_count":250,"contributors_enabled":false,"created_at":"Tue Jun 02 22:52:44 +0000 2009","protected":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1180820352\/KingEly_normal.jpg","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"009999","url":"http:\/\/facebook.com\/elycharlescarrasco","name":"Ely","id_str":"44230583","favourites_count":0,"screen_name":"KingEly","id":44230583,"show_all_inline_media":false,"lang":"en","geo_enabled":true,"utc_offset":null,"profile_sidebar_fill_color":"efefef"},"id":12411922821419008,"in_reply_to_user_id":108740471,"favorited":false} -{"coordinates":null,"text":"Rated on LUUUX http:\/\/bit.ly\/eyvcXO","entities":{"hashtags":[],"urls":[{"expanded_url":null,"indices":[15,35],"url":"http:\/\/bit.ly\/eyvcXO"}],"user_mentions":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contr \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xdi b/third_party/objc/json-framework/Tests/Stream/xdi deleted file mode 100644 index 9b4c2b83ffdbe..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xdi +++ /dev/null @@ -1 +0,0 @@ -ibutors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/www.luuux.com\" rel=\"nofollow\"\u003Eluuux_app\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:27 +0000 2010","truncated":false,"id_str":"12411922834006016","user":{"following":null,"listed_count":0,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1290538325\/images\/themes\/theme1\/bg.png","profile_sidebar_border_color":"C0DEED","profile_use_background_image":true,"description":null,"statuses_count":8135,"time_zone":null,"friends_count":0,"profile_background_color":"C0DEED","location":null,"profile_text_color":"333333","followers_count":85,"contributors_enabled":false,"created_at":"Tue Sep 07 04:32:28 +0000 2010","protected":false,"profile_image_url":"http:\/\/s.twimg.com\/a\/1290538325\/images\/default_profile_0_normal.png","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"0084B4 \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xdj b/third_party/objc/json-framework/Tests/Stream/xdj deleted file mode 100644 index 9b830c977e59f..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xdj +++ /dev/null @@ -1,2 +0,0 @@ -","url":null,"name":"Lili","id_str":"187793438","favourites_count":0,"screen_name":"Dulceamor510","id":187793438,"show_all_inline_media":false,"lang":"en","geo_enabled":false,"utc_offset":null,"profile_sidebar_fill_color":"DDEEF6"},"id":12411922834006016,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"\u3080\u3001\u307f\u304f\u3057\u30fc\u3068\u3044\u3048\u3070\u3001\u304a\u663c\u9803\u306b\u4e45\u3005\u306b\u30c1\u30a7\u30c3\u30af\u3057\u305f\u3089\u3001\u306a\u3093\u304b\u300c\u30a2\u30a4\u30c9\u30eb\u3000\u516c\u5f0f\u30a2\u30ab\u30a6\u30f3\u30c8\u300d\u306a\u4eba\u304b\u3089\u8db3\u8de1\u304c\u3064\u3044\u3066\u305f\u3002\u3000\u306a\u306b\u304c\u3069\u3046\u306a\u3063\u3066\u50d5\u306e\u3068\u3053\u306b\u304d\u305f\u306e\u3084\u3089\u3002\u624b\u5f53\u305f\u308a\u6b21\u7b2c\u304b\u3002","entities":{"user_mentions":[],"urls":[],"hashtags":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id" \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xdk b/third_party/objc/json-framework/Tests/Stream/xdk deleted file mode 100644 index f294098d7cdc5..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xdk +++ /dev/null @@ -1 +0,0 @@ -:null,"in_reply_to_user_id_str":null,"source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:27 +0000 2010","truncated":false,"id_str":"12411922825613312","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"65B0DA","show_all_inline_media":false,"geo_enabled":false,"description":"\u30d5\u30a1\u30df\u30ea\u30fc\u30b9\u30c6\u30fc\u30b7\u30e7\u30f3\u306e\u7247\u65b9\u3002\u8a9e\u308a\u3060\u3057\u305f\u3089\u6b62\u307e\u3089\u306a\u3044\u305c\u266a\u3000\u30b2\u30fc\u30e0\u30fb\u30de\u30f3\u30ac\u30fb\u6620\u753b\u597d\u304d\u3067\u611a\u75f4\u3063\u305f\u30fc\uff08\uff1f\uff09\u57fa\u672c\u3001\u7d61\u3093\u3067\u4e0b\u3055\u3063\u305f\u3089\u30d5\u30a9\u30ed\u30fc\u3057\u307e\u3059\u3002\u767a\u8a00\u6570\u304c\u7570\u5e38\u3060\u3068\u826f\u304f\u8a00\u308f\u308c\u308b\u306e\u3067\u30d5\u30a9\u30ed\u30fc\u306f\u8a08\u753b\u7684\u306b\u2026\/360:KLINK2007\/PS3:KLINK2008\u203b2009\u5e7410\u670812\u65e5\u304b\u3089\u59cb\u3081\u307e\u3057\u305f", \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xdl b/third_party/objc/json-framework/Tests/Stream/xdl deleted file mode 100644 index 3835495d34bf5..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xdl +++ /dev/null @@ -1,2 +0,0 @@ -"listed_count":76,"profile_background_tile":true,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1291064993\/images\/themes\/theme10\/bg.gif","profile_background_color":"642D8B","location":"OITA CITY","profile_use_background_image":true,"profile_text_color":"5386b0","followers_count":594,"statuses_count":57250,"time_zone":"Osaka","created_at":"Mon Oct 12 03:37:07 +0000 2009","friends_count":363,"protected":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1135752368\/00141_03_12_13-19_11_16_normal.jpg","notifications":null,"profile_link_color":"FF0000","url":null,"name":"KLINK_JP","id_str":"81753861","favourites_count":352,"screen_name":"KLINK_JP","id":81753861,"contributors_enabled":false,"lang":"ja","utc_offset":32400,"profile_sidebar_fill_color":"642d8b"},"id":12411922825613312,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"\u3059\u3066\u304d\u306a\u51fa\u4f1a\u3044\u3068\u7d50\u5a5a\u7d39\u4ecb\u306f\u697d\u5929\u30b0\u30eb\u30fc\u30d7\u306e\u300c\u30aa \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xdm b/third_party/objc/json-framework/Tests/Stream/xdm deleted file mode 100644 index 630e8d459ea23..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xdm +++ /dev/null @@ -1 +0,0 @@ -\u30fc\u30cd\u30c3\u30c8\u300d\u3067\u266a \u4eca\u306a\u3089\u5165\u4f1a\u306710,000\u30dd\u30a4\u30f3\u30c8\u30d7\u30ec\u30bc\u30f3\u30c8\u4e2d\uff01\u307e\u305a\u306f\u3001\u201d\u7406\u60f3\u306e\u304a\u76f8\u624b\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u201d\u3092GET\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u300e\u30aa\u30fc\u30cd\u30c3\u30c8\u300f\u3092\u898b\u308b [\u697d\u5929] http:\/\/a.r10.to\/hBhJuv #sougofollow","entities":{"hashtags":[{"text":"sougofollow","indices":[121,133]}],"urls":[{"expanded_url":null,"indices":[98,120],"url":"http:\/\/a.r10.to\/hBhJuv"}],"user_mentions":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":null,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/www.vector.co.jp\/soft\/winnt\/net\/se483196.html\" rel=\"nofollow\"\u003ETWEET command\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:27 +0000 2010","truncated":false,"id_str":"1241192 \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xdn b/third_party/objc/json-framework/Tests/Stream/xdn deleted file mode 100644 index b86dda48ddd02..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xdn +++ /dev/null @@ -1 +0,0 @@ -2813026304","user":{"following":null,"listed_count":26,"profile_background_tile":true,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1290538325\/images\/themes\/theme11\/bg.gif","profile_sidebar_border_color":"CC3366","profile_use_background_image":true,"description":"\u3088\u308d\u3057\u304f\u304a\u9858\u3044\u3057\u307e\u3059\u2764","statuses_count":10429,"time_zone":"Tokyo","friends_count":2893,"profile_background_color":"FF6699","location":"\u4e09\u91cd","profile_text_color":"362720","followers_count":2830,"contributors_enabled":false,"created_at":"Sun Jun 20 02:54:09 +0000 2010","protected":false,"profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1134806221\/__10_normal.jpg","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"B40B43","url":null,"name":"\u3042\u3044\u306e","id_str":"157527482","favourites_count":0,"screen_name":"aino_kis","id":157527482,"show_all_inline_media":false,"lang":"ja","geo_enabled":false,"utc_offset":32400,"profile_sidebar_fi \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xdo b/third_party/objc/json-framework/Tests/Stream/xdo deleted file mode 100644 index 1438201ca597d..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xdo +++ /dev/null @@ -1,2 +0,0 @@ -ll_color":"E5507E"},"id":12411922813026304,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"RT @duck_of_d00m: \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0436\u0435\u043d\u0449\u0438\u043d\u044b \u0432 \u0441\u0435\u0442\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0438\u0448\u0443\u0442 \u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u043e\u043f\u044b\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432, \u0430 \u043c\u0443\u0436\u0447\u0438\u043d\u044b \u043e\u0431 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u043c.","entities":{"user_mentions":[{"indices":[3,16],"name":"Mitya Voskresensky","screen_name":"duck_of_d00m","id_str":"19416850","id":19416850}],"urls":[],"hashtags":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":null \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xdp b/third_party/objc/json-framework/Tests/Stream/xdp deleted file mode 100644 index d7ae82018dcd8..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xdp +++ /dev/null @@ -1 +0,0 @@ -,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"web","retweeted_status":{"coordinates":null,"text":"\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0436\u0435\u043d\u0449\u0438\u043d\u044b \u0432 \u0441\u0435\u0442\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0438\u0448\u0443\u0442 \u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u043e\u043f\u044b\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432, \u0430 \u043c\u0443\u0436\u0447\u0438\u043d\u044b \u043e\u0431 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u043c.","entities":{"user_mentions":[],"urls":[],"hashtags":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":7,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"https:\/\/chrome.google.com\/extensions \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xdq b/third_party/objc/json-framework/Tests/Stream/xdq deleted file mode 100644 index e560ec48bff6f..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xdq +++ /dev/null @@ -1 +0,0 @@ -\/detail\/encaiiljifbdbjlphpgpiimidegddhic\" rel=\"nofollow\"\u003EChromed Bird\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Tue Dec 07 18:45:38 +0000 2010","truncated":false,"id_str":"12216177023520768","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":false,"description":"\u0421\u0442\u0440\u0430\u0442\u0435\u0433 \u0432 \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0445 \u043c\u0435\u0434\u0438\u0430, \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u0432 Red Keds, \u043f\u0438\u0448\u0443 \u043e \u0440\u0435\u043a\u043b\u0430\u043c\u0435, \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0438 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u043d\u044b\u0445 \u0448\u0442\u0443\u043a\u0430\u0445. \u043f\u0438\u0448\u0438\u0442\u0435 \u0441\u044e\u0434\u0430 \u0432\u0430\u0448\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b http:\/\/www.formspring.me\/duckofd00m ","listed_count":131,"profil \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xdr b/third_party/objc/json-framework/Tests/Stream/xdr deleted file mode 100644 index 138dda19b77b7..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xdr +++ /dev/null @@ -1 +0,0 @@ -e_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1290538325\/images\/themes\/theme1\/bg.png","profile_background_color":"C0DEED","location":"Russia, Moscow","profile_use_background_image":true,"profile_text_color":"333333","followers_count":1471,"statuses_count":6946,"time_zone":"Moscow","created_at":"Fri Jan 23 22:07:58 +0000 2009","friends_count":72,"protected":false,"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1031969395\/duck_digital_duck_normal.png","notifications":null,"profile_link_color":"0084B4","url":"http:\/\/duckofdoom.ru","name":"Mitya Voskresensky","id_str":"19416850","favourites_count":0,"screen_name":"duck_of_d00m","id":19416850,"contributors_enabled":false,"lang":"en","utc_offset":10800,"profile_sidebar_fill_color":"DDEEF6"},"id":12216177023520768,"in_reply_to_user_id":null,"favorited":false},"retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:27 +0000 2010","truncated":false,"id_str":"12411922808840192","user":{"follow_request_sent":nul \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xds b/third_party/objc/json-framework/Tests/Stream/xds deleted file mode 100644 index 087b80f4b6099..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xds +++ /dev/null @@ -1,2 +0,0 @@ -l,"following":null,"verified":false,"profile_sidebar_border_color":"CC3366","show_all_inline_media":false,"geo_enabled":false,"description":"","listed_count":16,"profile_background_tile":true,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1291318259\/images\/themes\/theme11\/bg.gif","profile_background_color":"FF6699","location":"\u0421\u0430\u0440\u0430\u0442\u043e\u0432 ","profile_use_background_image":true,"profile_text_color":"362720","followers_count":87,"statuses_count":519,"time_zone":null,"created_at":"Fri Sep 18 17:59:18 +0000 2009","friends_count":53,"protected":false,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1104098446\/IMG_3584_normal.JPG","notifications":null,"profile_link_color":"B40B43","url":null,"name":"Olga Semina","id_str":"75342779","favourites_count":0,"screen_name":"callmelili","id":75342779,"contributors_enabled":false,"lang":"en","utc_offset":null,"profile_sidebar_fill_color":"E5507E"},"id":12411922808840192,"in_reply_to_user_id":null,"favorited":false} -{"c \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xdt b/third_party/objc/json-framework/Tests/Stream/xdt deleted file mode 100644 index 9920161e9d3bf..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xdt +++ /dev/null @@ -1 +0,0 @@ -oordinates":null,"text":"The Art of Corking Wine http:\/\/bit.ly\/11gGbb #winemaking","entities":{"urls":[{"expanded_url":null,"indices":[24,44],"url":"http:\/\/bit.ly\/11gGbb"}],"user_mentions":[],"hashtags":[{"text":"winemaking","indices":[45,56]}]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":null,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/www.ajaymatharu.com\/\" rel=\"nofollow\"\u003ETweet Old Post\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:28 +0000 2010","truncated":false,"id_str":"12411927032504320","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"BDDCAD","show_all_inline_media":false,"geo_enabled":false,"description":"Wine Creator is all about the wonderfully awesome hobby of making wine at home - something I've done personally for over 15 years and love sharing with others!","listed_count":307,"profil \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/Stream/xdu b/third_party/objc/json-framework/Tests/Stream/xdu deleted file mode 100644 index 387365fd2e618..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xdu +++ /dev/null @@ -1 +0,0 @@ -e_background_tile":true,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/7784250\/wine-bottles-free.jpg","profile_background_color":"9AE4E8","location":"","profile_use_background_image":true,"profile_text_color":"333333","followers_count":15657,"statuses_count":2191,"time_zone":"Central Time (US & Canada)","created_at":"Tue Apr 07 01:37:29 +0000 2009","friends_count":17140,"protected":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/126970064\/redWine_normal.jpg","notifications":null,"profile_link_color":"0084B4","url":"http:\/\/winecreator.com","name":"Wine Creator","id_str":"29347169","favourites_count":1,"screen_name":"winecreator","id":29347169,"contributors_enabled":false,"lang":"en","utc_offset":-21600,"profile_sidebar_fill_color":"DDFFCC"},"id":12411927032504320,"in_reply_to_user_id":null,"favorited":false} diff --git a/third_party/objc/json-framework/Tests/Stream/xxx b/third_party/objc/json-framework/Tests/Stream/xxx deleted file mode 100644 index 2df77f6444338..0000000000000 --- a/third_party/objc/json-framework/Tests/Stream/xxx +++ /dev/null @@ -1,49 +0,0 @@ -{"coordinates":null,"text":":) Our secret weapon is no alternative. Golda Meir","entities":{"user_mentions":[],"urls":[],"hashtags":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/www.socialoomph.com\" rel=\"nofollow\"\u003ESocialOomph\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:21 +0000 2010","truncated":false,"id_str":"12411897663979520","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":false,"description":"Young and Energetic. I just sold my first house and will be posting Tweets about my new career as a house flipper","listed_count":49,"profile_background_tile":false,"profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_images\/38409971\/problemsolver.jpg","profile_background_color":"C0DEED","location":"Ontario Canada","profile_use_background_image":true,"profile_text_color":"4d1c12","followers_count":7991,"statuses_count":41594,"time_zone":"Quito","created_at":"Sun Sep 20 20:32:38 +0000 2009","friends_count":8789,"protected":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/426248904\/homes_normal.jpg","notifications":null,"profile_link_color":"055673","url":"http:\/\/www.the-problemsolver.com","name":"We Flip","id_str":"75869159","favourites_count":0,"screen_name":"house_flipper","id":75869159,"contributors_enabled":false,"lang":"en","utc_offset":-18000,"profile_sidebar_fill_color":"c1a38c"},"id":12411897663979520,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"RT @therealdjrell click (retweet) if you still up","entities":{"hashtags":[],"urls":[],"user_mentions":[{"indices":[3,17],"name":"Dj Rell OF BBC","screen_name":"therealdjrell","id_str":"180669193","id":180669193}]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":null,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/www.htc.com\" rel=\"nofollow\"\u003E HTC Peep\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:21 +0000 2010","truncated":false,"id_str":"12411897680764928","user":{"following":null,"listed_count":4,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/179020444\/Picnik_collage.jpg","profile_sidebar_border_color":"3d3739","profile_use_background_image":true,"description":"BABY KNOWS WHAT SHE WANTS & ALWAYS GETS IT. :) ArizonaStateUni (DowntownPHX) '14 * 18 YrOld * Chicago is Home * FOLLOW ME & I'LL FOLLOW YOU! :) #TEAMLAKERS","statuses_count":2206,"time_zone":"Arizona","friends_count":115,"profile_background_color":"0f0604","location":"N 33\u00b027' 0'' \/ W 112\u00b04' 0''","profile_text_color":"66585a","followers_count":120,"contributors_enabled":false,"created_at":"Tue Apr 07 01:55:15 +0000 2009","protected":false,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1182977830\/FB1_normal.jpg","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"cf1919","url":"http:\/\/www.facebook.com\/profile.php?id=610064376","name":"Shayla Brown","id_str":"29351068","favourites_count":16,"screen_name":"BabyistheDream4","id":29351068,"show_all_inline_media":false,"lang":"en","geo_enabled":false,"utc_offset":-25200,"profile_sidebar_fill_color":"ffffff"},"id":12411897680764928,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"THT..boseenn..(\u02c7_\u02c7'!l)\u200b\u200e ..","entities":{"urls":[],"hashtags":[],"user_mentions":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/blackberry.com\/twitter\" rel=\"nofollow\"\u003ETwitter for BlackBerry\u00ae\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:21 +0000 2010","truncated":false,"id_str":"12411897668177920","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"eb1a44","show_all_inline_media":false,"geo_enabled":false,"description":"\u2661 Simple and nice Lady \u2661..\u263a ","listed_count":3,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1290538325\/images\/themes\/theme1\/bg.png","profile_background_color":"e01660","location":"\u00dcT: -6.171394,106.868656","profile_use_background_image":true,"profile_text_color":"333333","followers_count":205,"statuses_count":6045,"time_zone":"Pacific Time (US & Canada)","created_at":"Thu Oct 29 06:35:04 +0000 2009","friends_count":232,"protected":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1145910676\/Picture_202584_normal.jpg","notifications":null,"profile_link_color":"CC3366","url":"http:\/\/null","name":"dila Zitria yuzar","id_str":"86008365","favourites_count":17,"screen_name":"dilaZitria","id":86008365,"contributors_enabled":false,"lang":"en","utc_offset":-28800,"profile_sidebar_fill_color":"e61e89"},"id":12411897668177920,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"\u6628\u591c\u3001\u6b53\u9001\u8fce\u4f1a\u306e\u4e8c\u6b21\u4f1a\u306e\u30b9\u30ca\u30c3\u30af\u306750\u66f2\u304f\u3089\u3044\u4e00\u4eba\u3067\u6c38\u9060\u306b\u6b4c\u3063\u3066\u305f\u3089\u3057\u3044www\u3042\u307e\u308a\u899a\u3048\u3066\u306a\u3044\u3093\u3060\u304c\u3001\u78ba\u304b\u306b\u5589\u306f\u75db\u3044\u306e\u3067\u3042\u308b\u3002","entities":{"hashtags":[],"urls":[],"user_mentions":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/www.movatwi.jp\" rel=\"nofollow\"\u003Ewww.movatwi.jp\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:21 +0000 2010","truncated":false,"id_str":"12411897668182016","user":{"following":null,"listed_count":12,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/92964430\/0287.jpg","profile_sidebar_border_color":"a8c7f7","profile_use_background_image":true,"description":"\u30f2\u30bf\u5c5e\u6027\u306f\u25cf\u25cf\u25cf\u25cf\u25cf(\u4eee\uff09\r\n\u5168\u529b\u8150\u6d3b\u52d5\u4e2d\uff01\uff01\r\n\u4e2d\u91ce\u8150\u5973\u30b7\u30b9\u30bf\u30fc\u30ba\u30fb\u8150\u7537\u587e\u306b\u6367\u3052\u308b\u30ed\u30fc\u30de\u30fc\u30f3\u30fc\u30b9\u3063\uff01","statuses_count":5862,"time_zone":"Tokyo","friends_count":314,"profile_background_color":"022330","location":"\u306a\u306b\u308f\uff01\u306a\u306b\u308f\uff01","profile_text_color":"333333","followers_count":245,"contributors_enabled":false,"created_at":"Tue Aug 11 08:24:20 +0000 2009","protected":false,"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/574158539\/roreapple_normal.jpg","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"0084B4","url":"http:\/\/ameblo.jp\/roreapple\/","name":"\u30ed\u30ec\u308a\u3093\u3054","id_str":"64662506","favourites_count":42,"screen_name":"roreapple","id":64662506,"show_all_inline_media":false,"lang":"ja","geo_enabled":false,"utc_offset":32400,"profile_sidebar_fill_color":"C0DFEC"},"id":12411897668182016,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"Gaaa RT @nisa_sukin: Menanti gaunku... Muat gak yah,, hiks","entities":{"hashtags":[],"urls":[],"user_mentions":[{"indices":[8,19],"name":"Masitoh Hairunisa","screen_name":"nisa_sukin","id_str":"29117556","id":29117556}]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/www.ubertwitter.com\/bb\/download.php\" rel=\"nofollow\"\u003E\u00dcberTwitter\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:22 +0000 2010","truncated":false,"id_str":"12411901849903104","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":false,"description":"Happy wifey ;)","listed_count":0,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1291661299\/images\/themes\/theme1\/bg.png","profile_background_color":"C0DEED","location":"Here,there n everywhere","profile_use_background_image":true,"profile_text_color":"333333","followers_count":26,"statuses_count":255,"time_zone":null,"created_at":"Fri May 15 07:33:06 +0000 2009","friends_count":68,"protected":false,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1166898498\/209967688_normal.jpg","notifications":null,"profile_link_color":"0084B4","url":null,"name":"Dian Supramanik","id_str":"40197229","favourites_count":0,"screen_name":"supramanik","id":40197229,"contributors_enabled":false,"lang":"en","utc_offset":null,"profile_sidebar_fill_color":"DDEEF6"},"id":12411901849903104,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"@FatboyRoberts Christ! I almost thought you were spam! My brain is melting, so I'll have to look at that tomorrow. Now: Brain death.","entities":{"urls":[],"hashtags":[],"user_mentions":[{"indices":[0,14],"name":"Fatboy Roberts","screen_name":"FatboyRoberts","id_str":"20921327","id":20921327}]},"in_reply_to_screen_name":"FatboyRoberts","in_reply_to_status_id_str":"12362450682773504","place":null,"contributors":null,"retweet_count":null,"in_reply_to_status_id":12362450682773504,"in_reply_to_user_id_str":"20921327","source":"\u003Ca href=\"http:\/\/www.tweetdeck.com\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:22 +0000 2010","truncated":false,"id_str":"12411901837320192","user":{"following":null,"listed_count":35,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1290538325\/images\/themes\/theme9\/bg.gif","profile_sidebar_border_color":"ffffff","profile_use_background_image":false,"description":"Bad motherfucker, game journalist, taller than your boyfriend.","statuses_count":10032,"time_zone":"Pacific Time (US & Canada)","friends_count":148,"profile_background_color":"545454","location":"Portland, Oregon","profile_text_color":"878787","followers_count":716,"contributors_enabled":false,"created_at":"Thu Feb 07 02:55:38 +0000 2008","protected":false,"profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/688559405\/twinklestarsprites_normal.png","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"ad0000","url":"http:\/\/nex.vox.com\/","name":"Earnest Cavalli","id_str":"13189102","favourites_count":0,"screen_name":"ecavalli","id":13189102,"show_all_inline_media":true,"lang":"en","geo_enabled":true,"utc_offset":-28800,"profile_sidebar_fill_color":"1c1c1c"},"id":12411901837320192,"in_reply_to_user_id":20921327,"favorited":false} -{"coordinates":null,"text":"@crumpitout shane.. we miss you with alesana\u00a1\u00a1 \ncome to mexico please :]\nwe love u :]\nxoxo","entities":{"hashtags":[],"urls":[],"user_mentions":[{"indices":[0,11],"name":"Shane Crump","screen_name":"crumpitout","id_str":"145315047","id":145315047}]},"in_reply_to_screen_name":"crumpitout","in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":"145315047","source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:22 +0000 2010","truncated":false,"id_str":"12411901854093312","user":{"following":null,"listed_count":0,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/149753364\/2mbdax.jpg","profile_sidebar_border_color":"ff00ff","profile_use_background_image":true,"description":"","statuses_count":338,"time_zone":"Mexico City","friends_count":114,"profile_background_color":"f50af5","location":"mexico, city","profile_text_color":"f009d5","followers_count":31,"contributors_enabled":false,"created_at":"Sat Aug 29 23:25:10 +0000 2009","protected":false,"profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1126473913\/48906_1376585645_7669_q_normal.jpg","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"de13f0","url":"http:\/\/www.facebook.com\/profile.php?id=1376585645","name":"jezz sandoval","id_str":"69990626","favourites_count":0,"screen_name":"jezz_sandoval","id":69990626,"show_all_inline_media":true,"lang":"es","geo_enabled":false,"utc_offset":-21600,"profile_sidebar_fill_color":"08fc08"},"id":12411901854093312,"in_reply_to_user_id":145315047,"favorited":false} -{"coordinates":null,"text":"A new franchised business is opened every 8 minutes of every business day....Read more facts at http:\/\/ow.ly\/2ktXb","entities":{"urls":[{"expanded_url":null,"indices":[96,114],"url":"http:\/\/ow.ly\/2ktXb"}],"hashtags":[],"user_mentions":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/socialcreeper.com\" rel=\"nofollow\"\u003ESocialcreeper\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:22 +0000 2010","truncated":false,"id_str":"12411901854097408","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"5ED4DC","show_all_inline_media":false,"geo_enabled":false,"description":"No charge consulting services be your own boss work from home recession, proof businesses, available financing. our role is to help you and give you the best","listed_count":15,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1289607957\/images\/themes\/theme4\/bg.gif","profile_background_color":"0099B9","location":"new jersey","profile_use_background_image":true,"profile_text_color":"3C3940","followers_count":1918,"statuses_count":8216,"time_zone":"Eastern Time (US & Canada)","created_at":"Wed Aug 04 08:30:19 +0000 2010","friends_count":2110,"protected":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1097183072\/franchise_normal.jpg","notifications":null,"profile_link_color":"0099B9","url":"http:\/\/www.facebook.com\/pages\/Advantage-Franchise-Consulting\/132423546795977?v=app_4949752878 ","name":"franchiseconsutling","id_str":"174584532","favourites_count":0,"screen_name":"consultingfree","id":174584532,"contributors_enabled":false,"lang":"en","utc_offset":-18000,"profile_sidebar_fill_color":"95E8EC"},"id":12411901854097408,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"La cruda es como la risa !","entities":{"hashtags":[],"urls":[],"user_mentions":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":null,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:22 +0000 2010","truncated":false,"id_str":"12411901875060736","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":false,"description":"La felicidad no es un estado de \u00e1nimo,sino una DECISI\u00d3N!","listed_count":1,"profile_background_tile":false,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/163795950\/cover.jpg","profile_background_color":"C0DEED","location":"","profile_use_background_image":true,"profile_text_color":"333333","followers_count":73,"statuses_count":1019,"time_zone":"Guadalajara","created_at":"Sun May 02 00:25:43 +0000 2010","friends_count":211,"protected":false,"profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1151825365\/40766_10150244183920072_565820071_14195871_5748381_n_normal.jpg","notifications":null,"profile_link_color":"0084B4","url":null,"name":"karmen beltr\u00e1n ","id_str":"139233639","favourites_count":2,"screen_name":"ka_beltran","id":139233639,"contributors_enabled":false,"lang":"es","utc_offset":-21600,"profile_sidebar_fill_color":"DDEEF6"},"id":12411901875060736,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"\u30d5\u30a9\u30ed\u30fc\u3057\u3066\u306d(^-^)\/ #followmejp #sougofollow #followdaibosyu \uff8a\uff9f\uff81\uff9d\uff7a \uff8a\uff9f\uff81\uff7d\uff9b \u7af6\u99ac \uff9b\uff84 \uff85\uff9d\uff8a\uff9e\uff70\uff7d\uff9e 1643128","entities":{"urls":[],"user_mentions":[],"hashtags":[{"text":"followmejp","indices":[14,25]},{"text":"sougofollow","indices":[26,38]},{"text":"followdaibosyu","indices":[39,54]}]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/www.movatwi.jp\" rel=\"nofollow\"\u003Ewww.movatwi.jp\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:23 +0000 2010","truncated":false,"id_str":"12411906056790016","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":false,"description":"","listed_count":7,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1291163542\/images\/themes\/theme1\/bg.png","profile_background_color":"C0DEED","location":"","profile_use_background_image":true,"profile_text_color":"333333","followers_count":1371,"statuses_count":5503,"time_zone":"Hawaii","created_at":"Thu Jul 29 13:53:49 +0000 2010","friends_count":1278,"protected":false,"profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1094558749\/_____normal.jpg","notifications":null,"profile_link_color":"0084B4","url":null,"name":"\u30e1\u30b0\u30df","id_str":"172346562","favourites_count":0,"screen_name":"megumi2258","id":172346562,"contributors_enabled":false,"lang":"ja","utc_offset":-36000,"profile_sidebar_fill_color":"DDEEF6"},"id":12411906056790016,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"Rant Forum: Spike on \"HOT BED OF FOOTBALL.........MOST KNOWLEDGABLE SUPPORTERS BLAH BLAH BLAH!\" http:\/\/bit.ly\/hF9G1y #mufc #manutd","entities":{"hashtags":[{"text":"mufc","indices":[120,125]},{"text":"manutd","indices":[126,133]}],"urls":[{"expanded_url":null,"indices":[99,119],"url":"http:\/\/bit.ly\/hF9G1y"}],"user_mentions":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/twitterfeed.com\" rel=\"nofollow\"\u003Etwitterfeed\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:23 +0000 2010","truncated":false,"id_str":"12411906035818496","user":{"following":null,"listed_count":31,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_images\/151777477\/twitter-background.png","profile_sidebar_border_color":"990000","profile_use_background_image":true,"description":"Forum of the United Rant blog visit www.unitedrant.co.uk\/forum for lively discussion.","statuses_count":6688,"time_zone":"London","friends_count":837,"profile_background_color":"000000","location":"Old Trafford","profile_text_color":"000000","followers_count":290,"contributors_enabled":false,"created_at":"Thu Jul 22 11:37:05 +0000 2010","protected":false,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1128154622\/twitter_new_badge_forum_normal.jpg","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"ccb100","url":"http:\/\/www.unitedrant.co.uk\/forum","name":"United Rant Forum","id_str":"169458574","favourites_count":0,"screen_name":"rant_forum","id":169458574,"show_all_inline_media":false,"lang":"en","geo_enabled":false,"utc_offset":0,"profile_sidebar_fill_color":"e00700"},"id":12411906035818496,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"Don't waste her time, if you still want to play around let her go. Its only fair. #MessageToMyBoys","entities":{"hashtags":[{"text":"MessageToMyBoys","indices":[82,98]}],"urls":[],"user_mentions":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:23 +0000 2010","truncated":false,"id_str":"12411906069368832","user":{"following":null,"listed_count":2,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_images\/177052687\/3235134362_c0f681f914_o.jpg","profile_sidebar_border_color":"C0DEED","profile_use_background_image":true,"description":"I am an enigma, wrapped in a sesame and nestled in a riddle of some mystery.","statuses_count":5795,"time_zone":"Pretoria","friends_count":207,"profile_background_color":"C0DEED","location":"\u00dcT: -26.193627,28.041314","profile_text_color":"333333","followers_count":275,"contributors_enabled":false,"created_at":"Fri May 01 06:55:03 +0000 2009","protected":false,"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1183768439\/DSC06923_normal.JPG","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"0084B4","url":"http:\/\/www.mspmc.co.za","name":"Mafedi Selepe","id_str":"36901018","favourites_count":0,"screen_name":"MafediSelepe","id":36901018,"show_all_inline_media":false,"lang":"en","geo_enabled":true,"utc_offset":7200,"profile_sidebar_fill_color":"DDEEF6"},"id":12411906069368832,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"Ada setan. *katanyasih. RT @PROMOTEfor: #tanyaremaja (jaman sd) hal apa yg membuat km takut ke toilet sendirian ?","entities":{"urls":[],"hashtags":[{"text":"tanyaremaja","indices":[40,52]}],"user_mentions":[{"indices":[27,38],"name":"Hendra J.P.","screen_name":"PROMOTEfor","id_str":"112023841","id":112023841}]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/www.ubertwitter.com\/bb\/download.php\" rel=\"nofollow\"\u003E\u00dcberTwitter\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:23 +0000 2010","truncated":false,"id_str":"12411906052587520","user":{"following":null,"listed_count":0,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/107674614\/1237098635915429223StudioFibonacci_Cartoon_Hillside_with_Butterfly_and_Flowers.svg.hi","profile_sidebar_border_color":"e61739","profile_use_background_image":true,"description":"229EB3B1 :)))\r\ni'm a big fans of @xtianbautista . \r\nAn ordinary girl with a big dreams. you will confuse if you know who really i am. ","statuses_count":2529,"time_zone":"Pacific Time (US & Canada)","friends_count":56,"profile_background_color":"B2DFDA","location":"Canada. \u00dcT: -6.224251,106.9222","profile_text_color":"e61010","followers_count":69,"contributors_enabled":false,"created_at":"Tue Feb 23 09:35:19 +0000 2010","protected":false,"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1174458315\/ajeng_normal.jpg","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"1ce1e8","url":null,"name":"Ajeng Lintang","id_str":"116697581","favourites_count":0,"screen_name":"AjengLD","id":116697581,"show_all_inline_media":false,"lang":"en","geo_enabled":false,"utc_offset":-28800,"profile_sidebar_fill_color":"e08db3"},"id":12411906052587520,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"\u958b\u62d3\u9ad8\u6821\u306e\u6821\u6b4c\u304c\u9244\u8155\u30a2\u30c8\u30e0\u3060\u3063\u305f\u4ef6","entities":{"urls":[],"hashtags":[],"user_mentions":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:23 +0000 2010","truncated":false,"id_str":"12411906035818497","user":{"following":null,"listed_count":0,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_images\/166881635\/sas.png","profile_sidebar_border_color":"C0DEED","profile_use_background_image":true,"description":"\u30d7\u30ed\u30b9\u30d4\u3067\u81ea\u5206\u4f5c\u3063\u305f\u3089\u5929\u72d7\u4e26\u307f\u306e\u8d70\u529b\u306b\u306a\u3063\u305f\u30fb\u30fb\u30fb\u308f\u3051\u3067\u3082\u306a\u304b\u3063\u305f\u30fb\u30fb\u30fb\u3068\u304b\u8a00\u3063\u3066\u4f5c\u308a\u76f4\u3057\u305f\u3089\u672c\u5f53\u306b\u5929\u72d7\u306b\u306a\u3063\u305f","statuses_count":1324,"time_zone":"Osaka","friends_count":24,"profile_background_color":"C0DEED","location":"\u65e7\u5730\u7344\u8857\u9053\u5165\u308a\u53e3\u4ed8\u8fd1","profile_text_color":"333333","followers_count":18,"contributors_enabled":false,"created_at":"Sat Oct 30 08:39:38 +0000 2010","protected":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1179158108\/52_normal.png","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"0084B4","url":null,"name":"\u53e4\u660e\u5730\u60a0\u99ac","id_str":"209976874","favourites_count":7,"screen_name":"Komeiji88","id":209976874,"show_all_inline_media":false,"lang":"ja","geo_enabled":true,"utc_offset":32400,"profile_sidebar_fill_color":"DDEEF6"},"id":12411906035818497,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"@KOOL_GANG \uc0b4\uc544\ub098\ub77c \uc6b0\ub9ac \uc5d0\uc774\uc2a4.","entities":{"urls":[],"hashtags":[],"user_mentions":[{"indices":[0,10],"name":"Kool Gang","screen_name":"KOOL_GANG","id_str":"173724958","id":173724958}]},"in_reply_to_screen_name":"KOOL_GANG","in_reply_to_status_id_str":"12410887285506048","place":null,"contributors":null,"retweet_count":null,"in_reply_to_status_id":12410887285506048,"in_reply_to_user_id_str":"173724958","source":"\u003Ca href=\"http:\/\/twtkr.com\" rel=\"nofollow\"\u003Etwtkr\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:23 +0000 2010","truncated":false,"id_str":"12411906052591616","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":false,"description":"","listed_count":1,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1290538325\/images\/themes\/theme1\/bg.png","profile_background_color":"C0DEED","location":"\uc5f0\ud76c\uc8fc\ubbfc","profile_use_background_image":true,"profile_text_color":"333333","followers_count":34,"statuses_count":416,"time_zone":"Hawaii","created_at":"Thu Aug 19 06:08:37 +0000 2010","friends_count":36,"protected":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1106972912\/aa_normal.jpg","notifications":null,"profile_link_color":"0084B4","url":null,"name":"dub&beard","id_str":"180269638","favourites_count":1,"screen_name":"yaguwang","id":180269638,"contributors_enabled":false,"lang":"en","utc_offset":-36000,"profile_sidebar_fill_color":"DDEEF6"},"id":12411906052591616,"in_reply_to_user_id":173724958,"favorited":false} -{"coordinates":null,"text":"RT @Ricki_MINAJ: @TeemFollowBack @1109_2904 #teamfollowback twitter famous boy>>> @Ricki_MINAJ <<<","entities":{"urls":[],"hashtags":[{"text":"teamfollowback","indices":[44,59]}],"user_mentions":[{"indices":[3,15],"name":"Ricky Johnson","screen_name":"Ricki_MINAJ","id_str":"51198602","id":51198602},{"indices":[17,32],"name":"Teem Follow Back","screen_name":"TeemFollowBack","id_str":"185188539","id":185188539},{"indices":[33,43],"name":"Aprilian Angel","screen_name":"1109_2904","id_str":"92217048","id":92217048},{"indices":[91,103],"name":"Ricky Johnson","screen_name":"Ricki_MINAJ","id_str":"51198602","id":51198602}]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":null,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/seesmic.com\/app\" rel=\"nofollow\"\u003ESeesmic Web\u003C\/a\u003E","retweeted_status":{"coordinates":null,"text":"@TeemFollowBack @1109_2904 #teamfollowback twitter famous boy>>> @Ricki_MINAJ <<<","entities":{"urls":[],"hashtags":[{"text":"teamfollowback","indices":[27,42]}],"user_mentions":[{"indices":[0,15],"name":"Teem Follow Back","screen_name":"TeemFollowBack","id_str":"185188539","id":185188539},{"indices":[16,26],"name":"Aprilian Angel","screen_name":"1109_2904","id_str":"92217048","id":92217048},{"indices":[74,86],"name":"Ricky Johnson","screen_name":"Ricki_MINAJ","id_str":"51198602","id":51198602}]},"in_reply_to_screen_name":"TeemFollowBack","in_reply_to_status_id_str":"12405913709191168","place":null,"contributors":null,"retweet_count":null,"in_reply_to_status_id":12405913709191168,"in_reply_to_user_id_str":"185188539","source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:04 +0000 2010","truncated":false,"id_str":"12411825870077952","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"65B0DA","show_all_inline_media":false,"geo_enabled":false,"description":"I LOVE SWEET BABY JESUS..FASHION IS MY LIFE..MUSIC IS NEXT..THEN FOOD, LOL MY LIFE IS MY BRAND,SO I DRESS LIKE IT!!","listed_count":18,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/20055732\/a2f270d4e7d605ac34e48d0fc454b_3701.jpg","profile_background_color":"642D8B","location":"NEW YORK RIHANNA WORLD","profile_use_background_image":true,"profile_text_color":"3D1957","followers_count":1822,"statuses_count":12985,"time_zone":"Mountain Time (US & Canada)","created_at":"Fri Jun 26 19:51:29 +0000 2009","friends_count":1990,"protected":false,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1170133326\/jess_and_ricki_normal.jpg","notifications":null,"profile_link_color":"FF0000","url":"http:\/\/www.blogtv.com\/People\/koolzone","name":"Ricky Johnson","id_str":"51198602","favourites_count":6,"screen_name":"Ricki_MINAJ","id":51198602,"contributors_enabled":false,"lang":"en","utc_offset":-25200,"profile_sidebar_fill_color":"7AC3EE"},"id":12411825870077952,"in_reply_to_user_id":185188539,"favorited":false},"retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:23 +0000 2010","truncated":false,"id_str":"12411906035810304","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"3fdbe3","show_all_inline_media":false,"geo_enabled":true,"description":"\u2665 I am 12 years old \u2665 Simple \u2665 Cool Guy \u2665 Stitch \u2665 Sanurians \u2665 Tasya \u2665 Boys \u2665 Follow me and I will folback, Just Mention Me \u2665 Aprilian Angel \u2665","listed_count":16,"profile_background_tile":false,"profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_images\/169085711\/4___.jpg","profile_background_color":"25646b","location":"Jakarta","profile_use_background_image":false,"profile_text_color":"2579b0","followers_count":613,"statuses_count":9079,"time_zone":"Jakarta","created_at":"Tue Nov 24 06:49:28 +0000 2009","friends_count":563,"protected":false,"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1161334751\/75785_1659322691840_1500333081_1624686_3546893_n_normal.jpg","notifications":null,"profile_link_color":"40b892","url":null,"name":"Aprilian Angel","id_str":"92217048","favourites_count":27,"screen_name":"1109_2904","id":92217048,"contributors_enabled":false,"lang":"en","utc_offset":25200,"profile_sidebar_fill_color":"c3e1e3"},"id":12411906035810304,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"@naxvee ohhhh I DOOO :D","entities":{"urls":[],"user_mentions":[{"indices":[0,7],"name":"nax vee","screen_name":"naxvee","id_str":"22720749","id":22720749}],"hashtags":[]},"in_reply_to_screen_name":"naxvee","in_reply_to_status_id_str":"12411850935242752","place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":12411850935242752,"in_reply_to_user_id_str":"22720749","source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:24 +0000 2010","truncated":false,"id_str":"12411910238502912","user":{"contributors_enabled":false,"following":null,"follow_request_sent":null,"verified":false,"profile_sidebar_border_color":"efff12","show_all_inline_media":false,"geo_enabled":false,"description":"i like to ponder. that is all.","profile_background_color":"760dff","location":"Straya","listed_count":5,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/124352628\/5576399.jpg","profile_text_color":"121eff","followers_count":145,"profile_use_background_image":true,"created_at":"Sun Feb 14 01:15:20 +0000 2010","protected":false,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1185036286\/Untitled_normal.png","statuses_count":3899,"notifications":null,"time_zone":"Hawaii","friends_count":146,"profile_link_color":"00ff00","url":"http:\/\/www.formspring.me\/lizzwilko","name":"I\u2665JohnnyDepp","id_str":"114068978","favourites_count":164,"screen_name":"TheLizzyEnd","id":114068978,"lang":"en","utc_offset":-36000,"profile_sidebar_fill_color":"ff0558"},"id":12411910238502912,"in_reply_to_user_id":22720749,"favorited":false} -{"coordinates":null,"text":"#Nighttweeters hmu DM or txt <3","entities":{"urls":[],"hashtags":[{"text":"Nighttweeters","indices":[0,14]}],"user_mentions":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:24 +0000 2010","truncated":false,"id_str":"12411910242705408","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":false,"description":"Mexican|19|Raves|Electro,Dubstep,Trance|drinking|Working|Down To Earth|Straight Out|Girls|:) Txting|Webcam|Snakebites|\r\nSingle|Follow me & Ill Follow you :)","listed_count":5,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/130349966\/4638030806_55122db25e_o.jpg","profile_background_color":"C0DEED","location":"Fontana, Ca","profile_use_background_image":true,"profile_text_color":"333333","followers_count":250,"statuses_count":4189,"time_zone":"Alaska","created_at":"Tue Aug 03 05:28:53 +0000 2010","friends_count":463,"protected":false,"profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1184365797\/gothamcity-189-of-294_normal.png","notifications":null,"profile_link_color":"0084B4","url":"http:\/\/www.myspace.com\/fourlokoking","name":"Juan Felix","id_str":"174137258","favourites_count":0,"screen_name":"Lostboyyyy","id":174137258,"contributors_enabled":false,"lang":"en","utc_offset":-32400,"profile_sidebar_fill_color":"DDEEF6"},"id":12411910242705408,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"@amaeletronica D'Baginyus : S.A.K.I.T LOL --> RT oliiind: Hooo eksssss RT WilliamWilz: oliiind engga jelek :b http:\/\/boo.lol.vc\/lLfE8","entities":{"urls":[{"expanded_url":null,"indices":[114,137],"url":"http:\/\/boo.lol.vc\/lLfE8"}],"hashtags":[],"user_mentions":[{"indices":[0,14],"name":"anderson avila","screen_name":"amaeletronica","id_str":"73257249","id":73257249}]},"in_reply_to_screen_name":"amaeletronica","in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":"73257249","source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:24 +0000 2010","truncated":false,"id_str":"12411910242697216","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":false,"description":null,"listed_count":0,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1291318259\/images\/themes\/theme1\/bg.png","profile_background_color":"C0DEED","location":null,"profile_use_background_image":true,"profile_text_color":"333333","followers_count":4,"statuses_count":378,"time_zone":null,"created_at":"Sun Dec 05 17:31:14 +0000 2010","friends_count":0,"protected":false,"profile_image_url":"http:\/\/s.twimg.com\/a\/1291318259\/images\/default_profile_2_normal.png","notifications":null,"profile_link_color":"0084B4","url":null,"name":"irene aguilera","id_str":"223191796","favourites_count":0,"screen_name":"bunndeknalifa","id":223191796,"contributors_enabled":false,"lang":"en","utc_offset":null,"profile_sidebar_fill_color":"DDEEF6"},"id":12411910242697216,"in_reply_to_user_id":73257249,"favorited":false} -{"coordinates":null,"text":"Haha ejiyek lia mainannya gombal sekarang hahaRT @_ameliahudayana: yoiii RT @vanyaau: Rerun extravaganza","entities":{"urls":[],"hashtags":[],"user_mentions":[{"indices":[49,65],"name":"Amelia Hudayana","screen_name":"_ameliahudayana","id_str":"162588680","id":162588680},{"indices":[76,84],"name":"vanya Beti La Venus","screen_name":"vanyaau","id_str":"65334621","id":65334621}]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"https:\/\/dabr.mobi\" rel=\"nofollow\"\u003EE = mc\u00b2\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:24 +0000 2010","truncated":false,"id_str":"12411910238511104","user":{"following":null,"listed_count":8,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_images\/62088481\/cup_cakes.JPG","profile_sidebar_border_color":"7e3091","profile_use_background_image":true,"description":"260695, 15th, FH, ALFAJAR JHS, MUHAMMADIYAH SHS, #THRH's HEART, A PART OF X.3, jazz addict, #AnakGalau\u2665 beti la gondrong venus GREET: vanyaau@hot xoxo :*","statuses_count":10309,"time_zone":"Pacific Time (US & Canada)","friends_count":287,"profile_background_color":"fa197e","location":"Planet venus~ fairy world","profile_text_color":"e8099a","followers_count":255,"contributors_enabled":false,"created_at":"Thu Aug 13 10:32:49 +0000 2009","protected":false,"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1176654063\/vanyac_normal.jpg","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"7135cc","url":"http:\/\/vanyaau.blogspot.com","name":"vanya Beti La Venus","id_str":"65334621","favourites_count":104,"screen_name":"vanyaau","id":65334621,"show_all_inline_media":false,"lang":"en","geo_enabled":false,"utc_offset":-28800,"profile_sidebar_fill_color":"d880f5"},"id":12411910238511104,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"Orange Soda.","entities":{"urls":[],"hashtags":[],"user_mentions":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:24 +0000 2010","truncated":false,"id_str":"12411910255288320","user":{"following":null,"listed_count":23,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_images\/179350469\/PacManTee.jpg","profile_sidebar_border_color":"badcad","profile_use_background_image":true,"description":"Deadly Robot love Owner. Lifestyle Blogger. Designer. Poet. Collector. Grandson.","statuses_count":56123,"time_zone":"Eastern Time (US & Canada)","friends_count":196,"profile_background_color":"919191","location":"Atlanta","profile_text_color":"333333","followers_count":716,"contributors_enabled":false,"created_at":"Mon May 04 22:27:05 +0000 2009","protected":false,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1180397702\/KevinDRL_normal.jpg","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"0a0a0a","url":"http:\/\/www.deadlyrobotlove.com\/","name":"K\u2665vin, The Robot.","id_str":"37777826","favourites_count":4,"screen_name":"deadlyrobotlove","id":37777826,"show_all_inline_media":false,"lang":"en","geo_enabled":false,"utc_offset":-18000,"profile_sidebar_fill_color":"686e6e"},"id":12411910255288320,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"@chiru_hms DMCSjp RT denamamoto: I'd swim across the world for you... lol joking, there are sharks in there. http:\/\/zry.m2r.ru\/HPOon","entities":{"urls":[{"expanded_url":null,"indices":[109,132],"url":"http:\/\/zry.m2r.ru\/HPOon"}],"user_mentions":[{"indices":[0,10],"name":"chiru","screen_name":"chiru_hms","id_str":"114779568","id":114779568}],"hashtags":[]},"in_reply_to_screen_name":"chiru_hms","in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":"114779568","source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:24 +0000 2010","truncated":false,"id_str":"12411910259474432","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":false,"description":"","listed_count":0,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1291318259\/images\/themes\/theme1\/bg.png","profile_background_color":"C0DEED","location":"","profile_use_background_image":true,"profile_text_color":"333333","followers_count":9,"statuses_count":575,"time_zone":null,"created_at":"Sun Dec 05 17:14:25 +0000 2010","friends_count":0,"protected":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1183205820\/twitterProfilePhoto_normal.jpg_normal.146","notifications":null,"profile_link_color":"0084B4","url":null,"name":"shanel thornton","id_str":"223186483","favourites_count":0,"screen_name":"frn_JBiebtrBR","id":223186483,"contributors_enabled":false,"lang":"en","utc_offset":null,"profile_sidebar_fill_color":"DDEEF6"},"id":12411910259474432,"in_reply_to_user_id":114779568,"favorited":false} -{"coordinates":null,"text":"\u039a\u03b1\u03bb\u03b7\u03bc\u03b5\u03c1\u03b1 \u03ba\u03b1\u03b9 \u03c5\u03c0\u03bf\u03bc\u03bf\u03bd\u03b7! \u039f\u03c3\u03bf\u03b9 \u03b5\u03b9\u03c3\u03c4\u03b5 \u03ba\u03bf\u03bd\u03c4\u03b1 \u03bc\u03b7\u03bd \u03c0\u03b1\u03c1\u03b5\u03c4\u03b5 \u03b1\u03c5\u03c4\u03bf\u03ba\u03b9\u03bd\u03b7\u03c4\u03bf, \u03c0\u03bf\u03b4\u03b9\u03b1 \u03b7 \u03c0\u03bf\u03b4\u03b7\u03bb\u03b1\u03c4\u03bf..!","entities":{"urls":[],"hashtags":[],"user_mentions":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/twitter.com\/\" rel=\"nofollow\"\u003ETwitter for iPhone\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:24 +0000 2010","truncated":false,"id_str":"12411910234308608","user":{"following":null,"listed_count":10,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_images\/167969569\/bodypaint_floyd.jpg","profile_sidebar_border_color":"829D5E","profile_use_background_image":true,"description":"Summer Dream!","statuses_count":1932,"time_zone":"Athens","friends_count":240,"profile_background_color":"352726","location":"Currently Lost","profile_text_color":"3E4415","followers_count":235,"contributors_enabled":false,"created_at":"Thu Oct 28 22:40:07 +0000 2010","protected":false,"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1154617775\/IMG_3032_normal.JPG","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"0c1bc7","url":null,"name":"Psychophski","id_str":"209295433","favourites_count":33,"screen_name":"Psychophski","id":209295433,"show_all_inline_media":false,"lang":"en","geo_enabled":true,"utc_offset":7200,"profile_sidebar_fill_color":"336bcc"},"id":12411910234308608,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":{"coordinates":[0,0],"type":"Point"},"text":"to protest or not to protest...that is the question!","entities":{"urls":[],"hashtags":[],"user_mentions":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":null,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/www.tweetdeck.com\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E","retweeted":false,"geo":{"coordinates":[0,0],"type":"Point"},"created_at":"Wed Dec 08 07:43:24 +0000 2010","truncated":false,"id_str":"12411910251085824","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"aef5fa","show_all_inline_media":false,"geo_enabled":true,"description":"you'll never regret giving it your best, so go on and do it. ","listed_count":1,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1291750721\/images\/themes\/theme1\/bg.png","profile_background_color":"214542","location":"Washington","profile_use_background_image":true,"profile_text_color":"739e9f","followers_count":32,"statuses_count":516,"time_zone":null,"created_at":"Wed Sep 15 06:21:58 +0000 2010","friends_count":85,"protected":false,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1155612338\/26_normal.jpg","notifications":null,"profile_link_color":"b4d9ad","url":null,"name":"Sarah Jane Burns","id_str":"190941250","favourites_count":0,"screen_name":"sarahjb93","id":190941250,"contributors_enabled":false,"lang":"en","utc_offset":null,"profile_sidebar_fill_color":"3b615d"},"id":12411910251085824,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"@soyFayo me puse peor hoy esta semana quiero recuperarme para que no se me complique u.u","entities":{"urls":[],"user_mentions":[{"indices":[0,8],"name":"Fayo","screen_name":"soyFayo","id_str":"72220601","id":72220601}],"hashtags":[]},"in_reply_to_screen_name":"soyFayo","in_reply_to_status_id_str":"12411227426787328","place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":12411227426787328,"in_reply_to_user_id_str":"72220601","source":"\u003Ca href=\"http:\/\/twittme.mobi\" rel=\"nofollow\"\u003Etwittme.mobi\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:24 +0000 2010","truncated":false,"id_str":"12411910230118400","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"fff8ad","show_all_inline_media":false,"geo_enabled":false,"description":"ESCRITORAILUSTRADORA, CARTONISTA,FISICA-MATEMATICAS,futura vulcanologa. Y ENAMORADA D LA VIDA Y SOY 100%UNAM Hija adoptiva de @marinataibo3 y @monicamateosV","listed_count":158,"profile_background_tile":false,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/137229680\/Fenix_ohen_small.jpg","profile_background_color":"FFF04D","location":"estado de Ebriedad M\u00e9xico ","profile_use_background_image":true,"profile_text_color":"333333","followers_count":2066,"statuses_count":60566,"time_zone":"Mexico City","created_at":"Sun Nov 15 02:51:14 +0000 2009","friends_count":1890,"protected":false,"profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1184479641\/imagesCANA8G7F_normal.jpg","notifications":null,"profile_link_color":"0099CC","url":"http:\/\/cienciasartes.blogspot.com\/ ","name":"Luc\u00edaVillarrealLuna","id_str":"90079038","favourites_count":39,"screen_name":"pokemonera","id":90079038,"contributors_enabled":false,"lang":"es","utc_offset":-21600,"profile_sidebar_fill_color":"f6ffd1"},"id":12411910230118400,"in_reply_to_user_id":72220601,"favorited":false} -{"coordinates":null,"text":"@bonita_Niyah she gotta txt & tell kuz she dnt have a fb she da shy type so idk but she gon have 2 tell soon or lata","entities":{"urls":[],"user_mentions":[{"indices":[0,13],"name":"\ue32d. . . \ue144","screen_name":"bonita_Niyah","id_str":"123750163","id":123750163}],"hashtags":[]},"in_reply_to_screen_name":"bonita_Niyah","in_reply_to_status_id_str":"12408747867508737","place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":12408747867508737,"in_reply_to_user_id_str":"123750163","source":"\u003Ca href=\"http:\/\/www.ubertwitter.com\/bb\/download.php\" rel=\"nofollow\"\u003E\u00dcberTwitter\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:24 +0000 2010","truncated":false,"id_str":"12411910255284224","user":{"contributors_enabled":false,"following":null,"follow_request_sent":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":true,"description":"I'M A DAUGHTER..A BESTFRIEND..A FRIEND..A SISTER..A COUSIN..A AUNTIE..A FIGHTER..A LOVER..A SINNER..A SAINT..I WILL TELL YOU 1 THING IM NOT A DOORMAT.. ","profile_background_color":"C0DEED","location":"Nwk NJ","listed_count":0,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1291318259\/images\/themes\/theme1\/bg.png","profile_text_color":"333333","followers_count":30,"profile_use_background_image":true,"created_at":"Fri Aug 13 03:42:52 +0000 2010","protected":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1101800168\/x2_24cd30d_normal.jpg","statuses_count":715,"notifications":null,"time_zone":"Eastern Time (US & Canada)","friends_count":157,"profile_link_color":"0084B4","url":null,"name":"Iesha Bankston","id_str":"177814999","favourites_count":0,"screen_name":"Pretty_Esh_B","id":177814999,"lang":"en","utc_offset":-18000,"profile_sidebar_fill_color":"DDEEF6"},"id":12411910255284224,"in_reply_to_user_id":123750163,"favorited":false} -{"coordinates":null,"text":"galau ga enek tebengan hahaha RT @ridowidi: galau kok jek ttp twitteranRT @anityaardiyani: nambah2i galauku wae RT... http:\/\/mtw.tl\/lf6idh","entities":{"urls":[{"expanded_url":null,"indices":[118,138],"url":"http:\/\/mtw.tl\/lf6idh"}],"hashtags":[],"user_mentions":[{"indices":[33,42],"name":"ridho widi","screen_name":"ridowidi","id_str":"216939950","id":216939950},{"indices":[74,89],"name":"anitya ardiyani p","screen_name":"anityaardiyani","id_str":"77723022","id":77723022}]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/m.tweete.net\" rel=\"nofollow\"\u003Em.tweete.net\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:25 +0000 2010","truncated":false,"id_str":"12411914441195520","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":true,"geo_enabled":true,"description":"","listed_count":0,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/176784334\/Shichibukai.jpg","profile_background_color":"C0DEED","location":"Indonesia","profile_use_background_image":true,"profile_text_color":"333333","followers_count":32,"statuses_count":433,"time_zone":"Jakarta","created_at":"Tue Nov 02 11:14:29 +0000 2010","friends_count":53,"protected":false,"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1179237591\/Image026_normal.jpg","notifications":null,"profile_link_color":"0084B4","url":null,"name":"Irwan Syah","id_str":"211117875","favourites_count":0,"screen_name":"irwan_akt","id":211117875,"contributors_enabled":false,"lang":"en","utc_offset":25200,"profile_sidebar_fill_color":"DDEEF6"},"id":12411914441195520,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"@nanafatemn7 \u77e5\u3089\u306d\u3048\u3088\uff57\uff57\uff57\u3044\u3044\u3058\u3083\u3093\u3002\u544a\u3063\u3061\u3083\u3048\uff01","entities":{"urls":[],"hashtags":[],"user_mentions":[{"indices":[0,12],"name":"\u306a\u306a\u30d5\u30a7\u30a4! \u795d\uff01\u5948\u3005\u3055\u3093\u7d05\u767d\u51fa\u5834\uff01","screen_name":"nanafatemn7","id_str":"155566960","id":155566960}]},"in_reply_to_screen_name":"nanafatemn7","in_reply_to_status_id_str":"12411662476775424","place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":12411662476775424,"in_reply_to_user_id_str":"155566960","source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:25 +0000 2010","truncated":false,"id_str":"12411914445393920","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"FFFFFF","show_all_inline_media":false,"geo_enabled":false,"description":"\u5909\u614b\u3067\u3059\u3002\u53d6\u308a\u6562\u3048\u305a\u9a12\u3044\u3067\u308b\u91ce\u90ce\u3067\u3059\u3002\u4e2d\uff13\u3002\u6b63\u76f4\u3001\u30a8\u30ed\u3044\u306e\u306f\u4ed5\u65b9\u306a\u3044\u3068\u601d\u3063\u3066\u307e\u3059\u3002\r\n\r\n\uff12\u6b21\u5143\u306f\u305d\u308c\u306a\u308a\u306b\u306f\u7406\u89e3\u51fa\u6765\u307e\u3059\u304c\u2026\r\n\r\n\u30dd\u30b1\u30e2\u30f3\u3084\u3063\u3066\u307e\u3059\r\n\r\n\r\n\u75db\u3044\u3067\u3059\u3051\u308c\u3069\r\n\r\n\u3088\u308d\u3057\u304f\u304a\u9858\u3044\u3057\u307e\u3059(\u7206)","listed_count":0,"profile_background_tile":false,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/124093074\/bg.jpg","profile_background_color":"000000","location":"\u30a8\u30f3\u30b8\u30e5\u30b7\u30c6\u30a3","profile_use_background_image":true,"profile_text_color":"b344b3","followers_count":24,"statuses_count":1547,"time_zone":"Osaka","created_at":"Fri Mar 19 08:48:17 +0000 2010","friends_count":55,"protected":false,"profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1182098397\/100813_1246340001_normal.jpg","notifications":null,"profile_link_color":"CC3300","url":null,"name":"\u30b7\u30fc\u30c9\u6a29\u0444","id_str":"124404959","favourites_count":2,"screen_name":"Sheadken","id":124404959,"contributors_enabled":false,"lang":"ja","utc_offset":32400,"profile_sidebar_fill_color":"F7DA93"},"id":12411914445393920,"in_reply_to_user_id":155566960,"favorited":false} -{"coordinates":null,"text":"\u7720\u3044\u30fb\u30fb\u30fb","entities":{"urls":[],"user_mentions":[],"hashtags":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:25 +0000 2010","truncated":false,"id_str":"12411914437009408","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"ffcb47","show_all_inline_media":false,"geo_enabled":false,"description":"WORKING\u3001\u30dc\u30ab\u30ed\u3001\u30dc\u30fc\u30dc\u30dc\u3001DRRR\u597d\u304d\u3067\u3059\uff57(\u00b4\u03c9\uff40)","listed_count":0,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/179023784\/14533769_p9.png","profile_background_color":"ffd4ff","location":"\u5922\u306e\u4e2d\u266c","profile_use_background_image":true,"profile_text_color":"089629","followers_count":15,"statuses_count":465,"time_zone":"Hawaii","created_at":"Wed Oct 27 11:15:34 +0000 2010","friends_count":38,"protected":false,"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1161025943\/magnet_normal.jpg","notifications":null,"profile_link_color":"ff2499","url":"http:\/\/ameblo.jp\/work-ing\/","name":"\u5922\u65e5\u8a18\u266a","id_str":"208488936","favourites_count":0,"screen_name":"yumenonikki327","id":208488936,"contributors_enabled":false,"lang":"ja","utc_offset":-36000,"profile_sidebar_fill_color":"fdff82"},"id":12411914437009408,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"14.79 euro valt nog wel mee voor 8 dagen tijd","entities":{"urls":[],"hashtags":[],"user_mentions":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/www.tweetdeck.com\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:25 +0000 2010","truncated":false,"id_str":"12411914457980928","user":{"following":null,"listed_count":0,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1290538325\/images\/themes\/theme5\/bg.gif","profile_sidebar_border_color":"829D5E","profile_use_background_image":true,"description":"- -","statuses_count":3291,"time_zone":"Amsterdam","friends_count":71,"profile_background_color":"352726","location":"Vlaardingen","profile_text_color":"3E4415","followers_count":67,"contributors_enabled":false,"created_at":"Mon Nov 23 07:34:26 +0000 2009","protected":false,"profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1160466321\/Foto0850_normal.jpg","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"D02B55","url":"http:\/\/www.priscillaa15.hyves.nl","name":"Priscilla v Vliet","id_str":"91959124","favourites_count":1,"screen_name":"xpriscil","id":91959124,"show_all_inline_media":false,"lang":"en","geo_enabled":false,"utc_offset":3600,"profile_sidebar_fill_color":"99CC33"},"id":12411914457980928,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"Is This A Serious Question? -___- (iamskippytv) RT @JBooqiie_DEC20 @iamSkippyTV what's ya oovoo","entities":{"hashtags":[],"urls":[],"user_mentions":[{"indices":[51,66],"name":"Joshua && Yhu ?!","screen_name":"JBooqiie_DEC20","id_str":"89241118","id":89241118},{"indices":[67,79],"name":"Skippy MaKenzi","screen_name":"iamSkippyTV","id_str":"30615809","id":30615809}]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/mobile.twitter.com\" rel=\"nofollow\"\u003EMobile Web\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:25 +0000 2010","truncated":false,"id_str":"12411914453782528","user":{"following":null,"listed_count":22,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/178920818\/iamskippytv.jpg","profile_sidebar_border_color":"eeeeee","profile_use_background_image":true,"description":"Youtube Video Blogger, Twitter Addict, Socialist, SKIPPY \u2665's BOYS! #TeamTaurus \u2649","statuses_count":36360,"time_zone":"Central Time (US & Canada)","friends_count":97,"profile_background_color":"3b3c3d","location":"CottenCandy & Rainbow Field","profile_text_color":"121112","followers_count":471,"contributors_enabled":false,"created_at":"Sun Apr 12 06:41:34 +0000 2009","protected":false,"profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1183274157\/IMG00169-20101205-0211_normal.jpg","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"889494","url":"http:\/\/itsmyurls.com\/skippy","name":"Skippy MaKenzi","id_str":"30615809","favourites_count":117,"screen_name":"iamSkippyTV","id":30615809,"show_all_inline_media":false,"lang":"en","geo_enabled":false,"utc_offset":-21600,"profile_sidebar_fill_color":"efefef"},"id":12411914453782528,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"nyasar gak yak?","entities":{"urls":[],"user_mentions":[],"hashtags":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/202.153.132.152\" rel=\"nofollow\"\u003EHP_Esia\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:25 +0000 2010","truncated":false,"id_str":"12411914428616705","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":false,"description":"be my self :)","listed_count":0,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1291064993\/images\/themes\/theme1\/bg.png","profile_background_color":"C0DEED","location":"","profile_use_background_image":true,"profile_text_color":"333333","followers_count":31,"statuses_count":875,"time_zone":"Pacific Time (US & Canada)","created_at":"Tue Sep 21 08:36:25 +0000 2010","friends_count":19,"protected":false,"profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1161524757\/IMG8943A_normal.jpg","notifications":null,"profile_link_color":"0084B4","url":null,"name":"Nnisa Lutfi Zuldah","id_str":"193220237","favourites_count":1,"screen_name":"zuldannisa","id":193220237,"contributors_enabled":false,"lang":"en","utc_offset":-28800,"profile_sidebar_fill_color":"DDEEF6"},"id":12411914428616705,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"@bayfm78 \u3046\u3093\u3001\u307e\u3041\u305d\u3046\u89e3\u91c8\u3059\u308b\u306a\u3089\u305d\u308c\u3067\u3082\u3044\u3044\u3093\u3058\u3083\u306a\u3044\u3002","entities":{"urls":[],"user_mentions":[{"indices":[0,8],"name":"\u304b\u305a\u304f\u3093\u3001\u3075\u3049\u3048\u3070","screen_name":"bayfm78","id_str":"21861792","id":21861792}],"hashtags":[]},"in_reply_to_screen_name":"bayfm78","in_reply_to_status_id_str":"12409691430715392","place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":12409691430715392,"in_reply_to_user_id_str":"21861792","source":"\u003Ca href=\"http:\/\/twtr.jp\" rel=\"nofollow\"\u003EKeitai Web\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:25 +0000 2010","truncated":false,"id_str":"12411914449588224","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":false,"description":"NAME:FENNEL SP:\u5341\u6bb5 ID:6294-9963 mixi\u30fbpixiv:\u5efb\u7409 mixi\u306f\u97f3\u30b2\u30fc\u30de\u30fc\u3057\u304b\u627f\u8a8d\u3057\u307e\u305b\u3093","listed_count":3,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1291661299\/images\/themes\/theme1\/bg.png","profile_background_color":"C0DEED","location":"","profile_use_background_image":true,"profile_text_color":"333333","followers_count":32,"statuses_count":760,"time_zone":"Tokyo","created_at":"Tue Feb 02 13:38:00 +0000 2010","friends_count":27,"protected":false,"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1174879155\/101116_1351_01000100010002_normal.jpg","notifications":null,"profile_link_color":"0084B4","url":null,"name":"\u3075\u3047\u3093\u306d\u308b","id_str":"110701310","favourites_count":0,"screen_name":"fennel62949963","id":110701310,"contributors_enabled":false,"lang":"ja","utc_offset":32400,"profile_sidebar_fill_color":"DDEEF6"},"id":12411914449588224,"in_reply_to_user_id":21861792,"favorited":false} -{"coordinates":null,"text":"RT @mrkie: RT @divamayday: 3daagse staking tnt is begonnen #geenrekeningen","entities":{"urls":[],"hashtags":[{"text":"geenrekeningen","indices":[59,74]}],"user_mentions":[{"indices":[3,9],"name":"Marky Mark","screen_name":"mrkie","id_str":"26185044","id":26185044},{"indices":[14,25],"name":"mayday","screen_name":"divamayday","id_str":"47942511","id":47942511}]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":1,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"web","retweeted_status":{"coordinates":null,"text":"RT @divamayday: 3daagse staking tnt is begonnen #geenrekeningen","entities":{"urls":[],"hashtags":[{"text":"geenrekeningen","indices":[48,63]}],"user_mentions":[{"indices":[3,14],"name":"mayday","screen_name":"divamayday","id_str":"47942511","id":47942511}]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":1,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/motionobj.com\/simplytweet\" rel=\"nofollow\"\u003ESimplyTweet\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 05:09:22 +0000 2010","truncated":false,"id_str":"12373147395301376","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"BDDCAD","show_all_inline_media":true,"geo_enabled":false,"description":"Bodybuilding by obsession, Hairstylist by profession..... | '78 | iPhone | iMac | Las Vegas | Uncle | Brother | Son | Frienemy |","listed_count":2,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1290123564\/images\/themes\/theme16\/bg.gif","profile_background_color":"9AE4E8","location":"South Holland, Netherlands","profile_use_background_image":true,"profile_text_color":"333333","followers_count":152,"statuses_count":13146,"time_zone":"Amsterdam","created_at":"Tue Mar 24 05:30:55 +0000 2009","friends_count":146,"protected":false,"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1160078091\/IMG_0008_normal.JPG","notifications":null,"profile_link_color":"0084B4","url":null,"name":"Marky Mark","id_str":"26185044","favourites_count":176,"screen_name":"mrkie","id":26185044,"contributors_enabled":false,"lang":"en","utc_offset":3600,"profile_sidebar_fill_color":"DDFFCC"},"id":12373147395301376,"in_reply_to_user_id":null,"favorited":false},"retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:25 +0000 2010","truncated":false,"id_str":"12411914445398016","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":false,"description":"","listed_count":0,"profile_background_tile":false,"profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_images\/127910069\/mooi.jpg","profile_background_color":"C0DEED","location":"Alphen aan den Rijn","profile_use_background_image":true,"profile_text_color":"333333","followers_count":14,"statuses_count":647,"time_zone":null,"created_at":"Thu Jun 10 10:59:43 +0000 2010","friends_count":26,"protected":false,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/976722090\/KepCom-1412_normal.jpg","notifications":null,"profile_link_color":"0084B4","url":"http:\/\/sbarlingen.hyves.nl","name":"Sigrid van Barlingen","id_str":"154100166","favourites_count":0,"screen_name":"sbarlingen","id":154100166,"contributors_enabled":false,"lang":"en","utc_offset":null,"profile_sidebar_fill_color":"DDEEF6"},"id":12411914445398016,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"semangatttt,,,semngarr...","entities":{"urls":[],"hashtags":[],"user_mentions":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:26 +0000 2010","truncated":false,"id_str":"12411918614532097","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"085982","show_all_inline_media":false,"geo_enabled":false,"description":"nice girl :D","listed_count":0,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/178686370\/25390_1148602295676_1846165700_287303_5835946_n.jpg","profile_background_color":"004a82","location":"","profile_use_background_image":true,"profile_text_color":"095aab","followers_count":63,"statuses_count":859,"time_zone":"Alaska","created_at":"Tue Oct 12 12:39:08 +0000 2010","friends_count":281,"protected":false,"profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1182960469\/k_normal.jpg","notifications":null,"profile_link_color":"17a1eb","url":null,"name":"Reski Amelia","id_str":"201698354","favourites_count":1,"screen_name":"kikotkikota","id":201698354,"contributors_enabled":false,"lang":"en","utc_offset":-32400,"profile_sidebar_fill_color":"6b1b10"},"id":12411918614532097,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"\u30de\u30b8\u9b3c\u755c RT @321waltz: 5\u6708\u304c\u30aa\u30fc\u30e9\u30b9\u306a\u306e\u306b\u6765\u9031\u672b\u307e\u3067\u306b\u632f\u308a\u8fbc\u307e\u305b\u308b\u4e8b\u52d9\u6240\u30de\u30b8\u9b3c\u755c \uff1eP\u69d8\u30bd\u30ed\u30b3\u30f3","entities":{"urls":[],"hashtags":[],"user_mentions":[{"indices":[8,17],"name":"\u4e00\u4e8c\u4e09\uff08\u308f\u308b\u3064\uff09","screen_name":"321waltz","id_str":"67910402","id":67910402}]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/tabtter.jp\" rel=\"nofollow\"\u003E\u30bf\u30d6\u30c3\u30bf\u30fc\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:26 +0000 2010","truncated":false,"id_str":"12411918614532096","user":{"following":null,"listed_count":16,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_images\/160986641\/tumblr_l9vvhnwKu81qc006io1_500.jpg","profile_sidebar_border_color":"5ED4DC","profile_use_background_image":true,"description":"R23*U\u597d\u304d\uff9b\uff78\uff9d\u62c5*NSKD\u306f\u9752\u6625*\uff7c\uff79\uff9e\u3082\u597d\u304d\uff7c\uff9e\uff6c\uff9d*\u3084\u3076\u3072\u304b\u306f\u6b63\u7fa9*\u4f0a\u91ce\u5c3e\u541b\u306f\u7652\u3057*not\u4e8b\u52d9\u6240\u62c5\/\u9ebb\u91cc\u5b50\u69d8\u795e\u63a8\u3057*\uff82\uff72\uff9d\uff80\uff9c\uff70\u63a8\u3057\/\u6c34\u6a39\u5948\u3005\u69d8\u656c\u611b\/\uff8c\uff6b\uff9b\uff70\uff65\uff98\uff91\uff65RT\uff65\uff98\uff8c\uff9f\u306f\u304a\u6c17\u8efd\u306b\uff65\u4f46\u3057\u304b\u306a\u308a\uff73\uff7b\uff9e\uff72\u306e\u3067\u8981\u6ce8\u610f\/\u4e3b\u306b\u5e73\u65e5\u663c\u9593\u306b\u6d3b\u52d5\/\u5fc5\u8981\u306b\u5fdc\u3058\u3066\uff8c\uff9e\uff9b\uff6f\uff78\u3057\u305f\u308a\u3057\u307e\u3059\/\u88cf\u8d64\u2192jasmine_yellow","statuses_count":16955,"time_zone":"Tokyo","friends_count":97,"profile_background_color":"0099B9","location":"\u307b\u307c\u795e\u5948\u5ddd","profile_text_color":"3C3940","followers_count":196,"contributors_enabled":false,"created_at":"Tue Mar 24 08:10:51 +0000 2009","protected":false,"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1180674943\/imageCASN4VYP_normal.jpg","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"00a3b8","url":null,"name":"\u3042\u3063\u304d\u30fc\u306a(\uff65\uff40-\u00b4)","id_str":"26199234","favourites_count":1131,"screen_name":"kmdakn","id":26199234,"show_all_inline_media":false,"lang":"ja","geo_enabled":false,"utc_offset":32400,"profile_sidebar_fill_color":"95E8EC"},"id":12411918614532096,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"pending intan maharani RT @soalCERITA: Nama Gebetan-mu Sewaktu SD? #MasaSekolah :)","entities":{"urls":[],"hashtags":[{"text":"MasaSekolah","indices":[67,79]}],"user_mentions":[{"indices":[26,37],"name":"Soal Cerita","screen_name":"soalCERITA","id_str":"186345369","id":186345369}]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/m.tweete.net\" rel=\"nofollow\"\u003Em.tweete.net\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:26 +0000 2010","truncated":false,"id_str":"12411918635499520","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":true,"description":"i share my voice for my band @DestinyOfFuture | i share my life for allah swt | i share my heart for my 7","listed_count":2,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1290538325\/images\/themes\/theme1\/bg.png","profile_background_color":"C0DEED","location":"Pondok Gede,jakarta timur","profile_use_background_image":true,"profile_text_color":"333333","followers_count":328,"statuses_count":17575,"time_zone":"Pacific Time (US & Canada)","created_at":"Mon Aug 03 06:08:46 +0000 2009","friends_count":310,"protected":false,"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1156247995\/DiasDOF_normal.JPG","notifications":null,"profile_link_color":"0084B4","url":"http:\/\/www.myspace.com\/537395778","name":"Diaz Putra Pratama","id_str":"62451320","favourites_count":38,"screen_name":"Diassaurus","id":62451320,"contributors_enabled":false,"lang":"en","utc_offset":-28800,"profile_sidebar_fill_color":"DDEEF6"},"id":12411918635499520,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"haduh bsk bhs.inggris sama ips lagi","entities":{"urls":[],"hashtags":[],"user_mentions":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:26 +0000 2010","truncated":false,"id_str":"12411918639693824","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"eb387a","show_all_inline_media":false,"geo_enabled":true,"description":"just a little boy who growing up","listed_count":0,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_images\/132078393\/Conan8.jpg","profile_background_color":"f5f8fa","location":"Pamulang, Indonesia","profile_use_background_image":true,"profile_text_color":"c74052","followers_count":36,"statuses_count":60,"time_zone":"Pacific Time (US & Canada)","created_at":"Sat Aug 07 05:52:21 +0000 2010","friends_count":61,"protected":false,"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1097481287\/IMG1441A_normal.jpg","notifications":null,"profile_link_color":"a3e1f7","url":null,"name":"Taufik Wicak","id_str":"175652995","favourites_count":0,"screen_name":"taufikwicak","id":175652995,"contributors_enabled":false,"lang":"en","utc_offset":-28800,"profile_sidebar_fill_color":"fcfeff"},"id":12411918639693824,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"LOL I THOUGHT U WANTED BIGGIE BACK RT @ChinkyEyedButta: #lemmeguess @YungBossez denying my baby??? Smh","entities":{"urls":[],"hashtags":[{"text":"lemmeguess","indices":[56,67]}],"user_mentions":[{"indices":[38,54],"name":"Piggy!","screen_name":"ChinkyEyedButta","id_str":"28321072","id":28321072},{"indices":[68,79],"name":"LARRY LIVE","screen_name":"YungBossez","id_str":"79103494","id":79103494}]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/www.echofon.com\/\" rel=\"nofollow\"\u003EEchofon\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:26 +0000 2010","truncated":false,"id_str":"12411918652276736","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":false,"description":"BOSSNATION!!! THINK LIKE A BOSS.. MOVE LIKE A BOSS.. BECOME A BOSS!! WE MOVIN!!!! KIK: YungBossElz","listed_count":31,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/136340262\/IMG_0011_1_.JPG","profile_background_color":"C0DEED","location":"NYC","profile_use_background_image":true,"profile_text_color":"333333","followers_count":1450,"statuses_count":43647,"time_zone":"Quito","created_at":"Fri Oct 02 05:23:49 +0000 2009","friends_count":740,"protected":false,"profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1184354137\/YungBossez_normal.jpg","notifications":null,"profile_link_color":"0084B4","url":"http:\/\/www.apple.com","name":"LARRY LIVE","id_str":"79103494","favourites_count":18,"screen_name":"YungBossez","id":79103494,"contributors_enabled":false,"lang":"en","utc_offset":-18000,"profile_sidebar_fill_color":"DDEEF6"},"id":12411918652276736,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"@renzoom \u3044\u3084\u3001\u540c\u3058\u9ad8\u6821\u306a\u3089\u5802\u3005\u3068\u300c\u5148\u8f29\u300d\u3068\u547c\u3079\u308b\u6a29\u5229\u7372\u5f97\u3067\u3059\u3088!?\u6749\u7530\u2026\u5148\u8f29\u2026\u30db\u30ef\u30a2\u30a2\u30a2\u30a1\u30a1\u30a1\u30a2\u30a2\uff1c\u25cf\uff1e\/\/\/\/\uff1c\u25cf\uff1e\u306a\u3093\u306a\u3093\u3067\u3059\u304b\u604b\u30b7\u30e5\u30df\u306a\u3093\u3067\u3059\u304b\u3068\u304d\u3081\u304d\u30e1\u30e2\u30ea\u30a2\u30ebin\u5c0f\u5ddd\uff01\uff01\uff01\u653b\u7565\u30ad\u30e3\u30e9\u2192\u6749\u7530\u5148\u8f29Only","entities":{"hashtags":[],"urls":[],"user_mentions":[{"indices":[0,8],"name":"\u30ec\u30f3\u30ba\u30a3\u30fc","screen_name":"renzoom","id_str":"80027788","id":80027788}]},"in_reply_to_screen_name":"renzoom","in_reply_to_status_id_str":"12386429707485184","place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":12386429707485184,"in_reply_to_user_id_str":"80027788","source":"\u003Ca href=\"http:\/\/twtr.jp\" rel=\"nofollow\"\u003EKeitai Web\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:26 +0000 2010","truncated":false,"id_str":"12411918631309312","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":false,"description":"\u3054\u98ef\u306e\u4e8b\u3070\u3063\u304b\u8003\u3048\u3066\u307e\u3059\u3002\u6f2b\u753b\u30fb\u30a2\u30cb\u30e1\u95a2\u9023\u306e\u30c4\u30a4\u30fc\u30c8\u591a\u3044\u3067\u3059\u3002","listed_count":1,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1290538325\/images\/themes\/theme1\/bg.png","profile_background_color":"C0DEED","location":"","profile_use_background_image":true,"profile_text_color":"333333","followers_count":23,"statuses_count":315,"time_zone":"Tokyo","created_at":"Thu Oct 21 00:46:18 +0000 2010","friends_count":41,"protected":false,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1149146122\/DVC00089_normal.jpg","notifications":null,"profile_link_color":"0084B4","url":null,"name":"\u30d2\u30c3\u30dd\u30ed\u7cfb\u30cb\u30e3\u30dd\u30fc\u30f3","id_str":"205496590","favourites_count":1,"screen_name":"OpporeGassen","id":205496590,"contributors_enabled":false,"lang":"ja","utc_offset":32400,"profile_sidebar_fill_color":"DDEEF6"},"id":12411918631309312,"in_reply_to_user_id":80027788,"favorited":false} -{"coordinates":null,"text":"\u7d20\u4eba\u767a\u8a00ww RT @AsrA924: \u300c\u98a8\u6708\u3055\u3093\u3001\u76ee\u7acb\u3064\u5ba3\u4f1d\u8003\u3048\u3066\uff01\u300d\u300c\u306f\u3044\uff1f\uff01\u300d\u300c\u3060\u304b\u3089\u3070\u3070\u30fc\u3093\u3068\u76ee\u7acb\u3063\u3061\u3083\u3046\u5ba3\u4f1d\uff01\u300d\u300c\u5bfe\u8c61\u306f\u2026\u300d\u300c\u307f\u3093\u306a\uff01\uff01\u300d\u300c\u307f\u3093\u306a\u3063\u3066\u8a00\u308f\u308c\u307e\u3057\u3066\u3082\u2026\u300d\u300c\u76ee\u7acb\u3064\u5ba3\u4f1d\u306f\u8ab0\u306b\u3068\u3063\u3066\u3082\u76ee\u7acb\u3064\u3067\u3057\u3087\uff01\uff01\u300d\u2026\u3060\u3081\u3060\u3053\u308a\u3083\u3002","entities":{"hashtags":[],"urls":[],"user_mentions":[{"indices":[10,18],"name":"\u98a8\u6708\u3042\u3059\u3089","screen_name":"AsrA924","id_str":"112167510","id":112167510}]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":null,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/www.echofon.com\/\" rel=\"nofollow\"\u003EEchofon\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:26 +0000 2010","truncated":false,"id_str":"12411918614528000","user":{"following":null,"listed_count":13,"profile_background_tile":true,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1291318259\/images\/themes\/theme14\/bg.gif","profile_sidebar_border_color":"eeeeee","profile_use_background_image":true,"description":"1983.07.04 \u55b6\u696d\u3002\u793e\u4f1a\u306e\u53b3\u3057\u3055\u3092\u52c9\u5f37\u4e2d\u3067\u3059\u3002\u9031\u672b\u306f\u611b\u8eca\u306e\u30ed\u30fc\u30c9\u30ec\u30fc\u30b5\u30fc\u3067\u30b5\u30a4\u30af\u30ea\u30f3\u30b0\uff01\u91ce\u7403\u3001\u5343\u8449\u30ed\u30c3\u30c6\u3001\u30c0\u30fc\u30c4\u3001\u97f3\u697d\u3001\u6620\u753b\u3001\u65c5\u884c\u3001\u81ea\u8ee2\u8eca\u65c5\u884c\u597d\u304d\u3067\u3059\u3002\u3088\u308d\u3057\u304f\u304a\u9858\u3044\u3057\u307e\u3059\u3002\u3042\u3063\u3001\u30c1\u30e7\u30c3\u30d1\u30fc\u597d\u304d\u3067\u3059\uff01","statuses_count":2392,"time_zone":"Tokyo","friends_count":483,"profile_background_color":"131516","location":"\u5343\u8449\u770c\u5e02\u5ddd\u5e02\u5999\u5178","profile_text_color":"333333","followers_count":291,"contributors_enabled":false,"created_at":"Mon Dec 21 10:04:09 +0000 2009","protected":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1183120212\/fukkyman_normal.jpg","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"009999","url":null,"name":"\u3075\u3063\u304d\u30fc\u30de\u30f3","id_str":"98340517","favourites_count":32,"screen_name":"fukkyman","id":98340517,"show_all_inline_media":false,"lang":"ja","geo_enabled":true,"utc_offset":32400,"profile_sidebar_fill_color":"efefef"},"id":12411918614528000,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"@lengraciazz99 zz","entities":{"urls":[],"hashtags":[],"user_mentions":[{"indices":[0,14],"name":"Hellena Gracia \uff61\u25d5\u203f\u25d5\uff61","screen_name":"lengraciazz99","id_str":"127160903","id":127160903}]},"in_reply_to_screen_name":"lengraciazz99","in_reply_to_status_id_str":"12411745138122752","place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":12411745138122752,"in_reply_to_user_id_str":"127160903","source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:26 +0000 2010","truncated":false,"id_str":"12411918648090624","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":true,"description":"hello , my name is john James Apillio , i like playing piano , i want to be a princepiano .. wkwk .. i'm single .. chatolic .. ","listed_count":0,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/176397228\/edit.JPG","profile_background_color":"C0DEED","location":"jakarta","profile_use_background_image":true,"profile_text_color":"333333","followers_count":55,"statuses_count":1882,"time_zone":"Pacific Time (US & Canada)","created_at":"Mon Oct 11 09:01:29 +0000 2010","friends_count":144,"protected":false,"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1174624371\/ME_normal.jpg","notifications":null,"profile_link_color":"0084B4","url":null,"name":"Frank james Aprillio","id_str":"201190413","favourites_count":3,"screen_name":"frankyakob","id":201190413,"contributors_enabled":false,"lang":"en","utc_offset":-28800,"profile_sidebar_fill_color":"DDEEF6"},"id":12411918648090624,"in_reply_to_user_id":127160903,"favorited":false} -{"coordinates":null,"text":"mboh, aku wez mari nde kmpus, tp te jln2 sek aku mbek nevi santi, hehe RT @dindalovelove @dindydind gak enak tahh ... heh mole jam piro awak","entities":{"urls":[],"hashtags":[],"user_mentions":[{"indices":[74,88],"name":"winda hermawan ","screen_name":"dindalovelove","id_str":"93166570","id":93166570},{"indices":[89,99],"name":"Indri Rahmawati","screen_name":"dindydind","id_str":"77725423","id":77725423}]},"in_reply_to_screen_name":"dindalovelove","in_reply_to_status_id_str":"12411470138580992","place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":12411470138580992,"in_reply_to_user_id_str":"93166570","source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:27 +0000 2010","truncated":false,"id_str":"12411922821419009","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"ffffff","show_all_inline_media":false,"geo_enabled":true,"description":"luv my family sooo much","listed_count":3,"profile_background_tile":false,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/130377756\/twittmn.jpg","profile_background_color":"ec7b3e","location":"Malang, Indonesia","profile_use_background_image":true,"profile_text_color":"030303","followers_count":99,"statuses_count":1744,"time_zone":"Jakarta","created_at":"Sun Sep 27 12:31:59 +0000 2009","friends_count":93,"protected":false,"profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1139037997\/36174_1534584098950_1665256568_1290462_4376492_n_normal.jpg","notifications":null,"profile_link_color":"07545e","url":null,"name":"Indri Rahmawati","id_str":"77725423","favourites_count":4,"screen_name":"dindydind","id":77725423,"contributors_enabled":false,"lang":"en","utc_offset":25200,"profile_sidebar_fill_color":"ec7b3e"},"id":12411922821419009,"in_reply_to_user_id":93166570,"favorited":false} -{"coordinates":null,"text":"@AThousandFall conan para presidente de la rep\u00fablica","entities":{"urls":[],"hashtags":[],"user_mentions":[{"indices":[0,14],"name":"A Thousand Fall","screen_name":"AThousandFall","id_str":"108740471","id":108740471}]},"in_reply_to_screen_name":"AThousandFall","in_reply_to_status_id_str":"12391305862713344","place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":12391305862713344,"in_reply_to_user_id_str":"108740471","source":"\u003Ca href=\"http:\/\/www.echofon.com\/\" rel=\"nofollow\"\u003EEchofon\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:27 +0000 2010","truncated":false,"id_str":"12411922821419008","user":{"following":null,"listed_count":3,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_images\/178454607\/Gambit.jpg","profile_sidebar_border_color":"eeeeee","profile_use_background_image":true,"description":"","statuses_count":8135,"time_zone":null,"friends_count":591,"profile_background_color":"131516","location":"El Paso Tx","profile_text_color":"333333","followers_count":250,"contributors_enabled":false,"created_at":"Tue Jun 02 22:52:44 +0000 2009","protected":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1180820352\/KingEly_normal.jpg","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"009999","url":"http:\/\/facebook.com\/elycharlescarrasco","name":"Ely","id_str":"44230583","favourites_count":0,"screen_name":"KingEly","id":44230583,"show_all_inline_media":false,"lang":"en","geo_enabled":true,"utc_offset":null,"profile_sidebar_fill_color":"efefef"},"id":12411922821419008,"in_reply_to_user_id":108740471,"favorited":false} -{"coordinates":null,"text":"Rated on LUUUX http:\/\/bit.ly\/eyvcXO","entities":{"hashtags":[],"urls":[{"expanded_url":null,"indices":[15,35],"url":"http:\/\/bit.ly\/eyvcXO"}],"user_mentions":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/www.luuux.com\" rel=\"nofollow\"\u003Eluuux_app\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:27 +0000 2010","truncated":false,"id_str":"12411922834006016","user":{"following":null,"listed_count":0,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1290538325\/images\/themes\/theme1\/bg.png","profile_sidebar_border_color":"C0DEED","profile_use_background_image":true,"description":null,"statuses_count":8135,"time_zone":null,"friends_count":0,"profile_background_color":"C0DEED","location":null,"profile_text_color":"333333","followers_count":85,"contributors_enabled":false,"created_at":"Tue Sep 07 04:32:28 +0000 2010","protected":false,"profile_image_url":"http:\/\/s.twimg.com\/a\/1290538325\/images\/default_profile_0_normal.png","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"0084B4","url":null,"name":"Lili","id_str":"187793438","favourites_count":0,"screen_name":"Dulceamor510","id":187793438,"show_all_inline_media":false,"lang":"en","geo_enabled":false,"utc_offset":null,"profile_sidebar_fill_color":"DDEEF6"},"id":12411922834006016,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"\u3080\u3001\u307f\u304f\u3057\u30fc\u3068\u3044\u3048\u3070\u3001\u304a\u663c\u9803\u306b\u4e45\u3005\u306b\u30c1\u30a7\u30c3\u30af\u3057\u305f\u3089\u3001\u306a\u3093\u304b\u300c\u30a2\u30a4\u30c9\u30eb\u3000\u516c\u5f0f\u30a2\u30ab\u30a6\u30f3\u30c8\u300d\u306a\u4eba\u304b\u3089\u8db3\u8de1\u304c\u3064\u3044\u3066\u305f\u3002\u3000\u306a\u306b\u304c\u3069\u3046\u306a\u3063\u3066\u50d5\u306e\u3068\u3053\u306b\u304d\u305f\u306e\u3084\u3089\u3002\u624b\u5f53\u305f\u308a\u6b21\u7b2c\u304b\u3002","entities":{"user_mentions":[],"urls":[],"hashtags":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":0,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"web","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:27 +0000 2010","truncated":false,"id_str":"12411922825613312","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"65B0DA","show_all_inline_media":false,"geo_enabled":false,"description":"\u30d5\u30a1\u30df\u30ea\u30fc\u30b9\u30c6\u30fc\u30b7\u30e7\u30f3\u306e\u7247\u65b9\u3002\u8a9e\u308a\u3060\u3057\u305f\u3089\u6b62\u307e\u3089\u306a\u3044\u305c\u266a\u3000\u30b2\u30fc\u30e0\u30fb\u30de\u30f3\u30ac\u30fb\u6620\u753b\u597d\u304d\u3067\u611a\u75f4\u3063\u305f\u30fc\uff08\uff1f\uff09\u57fa\u672c\u3001\u7d61\u3093\u3067\u4e0b\u3055\u3063\u305f\u3089\u30d5\u30a9\u30ed\u30fc\u3057\u307e\u3059\u3002\u767a\u8a00\u6570\u304c\u7570\u5e38\u3060\u3068\u826f\u304f\u8a00\u308f\u308c\u308b\u306e\u3067\u30d5\u30a9\u30ed\u30fc\u306f\u8a08\u753b\u7684\u306b\u2026\/360:KLINK2007\/PS3:KLINK2008\u203b2009\u5e7410\u670812\u65e5\u304b\u3089\u59cb\u3081\u307e\u3057\u305f","listed_count":76,"profile_background_tile":true,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1291064993\/images\/themes\/theme10\/bg.gif","profile_background_color":"642D8B","location":"OITA CITY","profile_use_background_image":true,"profile_text_color":"5386b0","followers_count":594,"statuses_count":57250,"time_zone":"Osaka","created_at":"Mon Oct 12 03:37:07 +0000 2009","friends_count":363,"protected":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1135752368\/00141_03_12_13-19_11_16_normal.jpg","notifications":null,"profile_link_color":"FF0000","url":null,"name":"KLINK_JP","id_str":"81753861","favourites_count":352,"screen_name":"KLINK_JP","id":81753861,"contributors_enabled":false,"lang":"ja","utc_offset":32400,"profile_sidebar_fill_color":"642d8b"},"id":12411922825613312,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"\u3059\u3066\u304d\u306a\u51fa\u4f1a\u3044\u3068\u7d50\u5a5a\u7d39\u4ecb\u306f\u697d\u5929\u30b0\u30eb\u30fc\u30d7\u306e\u300c\u30aa\u30fc\u30cd\u30c3\u30c8\u300d\u3067\u266a \u4eca\u306a\u3089\u5165\u4f1a\u306710,000\u30dd\u30a4\u30f3\u30c8\u30d7\u30ec\u30bc\u30f3\u30c8\u4e2d\uff01\u307e\u305a\u306f\u3001\u201d\u7406\u60f3\u306e\u304a\u76f8\u624b\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u201d\u3092GET\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u300e\u30aa\u30fc\u30cd\u30c3\u30c8\u300f\u3092\u898b\u308b [\u697d\u5929] http:\/\/a.r10.to\/hBhJuv #sougofollow","entities":{"hashtags":[{"text":"sougofollow","indices":[121,133]}],"urls":[{"expanded_url":null,"indices":[98,120],"url":"http:\/\/a.r10.to\/hBhJuv"}],"user_mentions":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":null,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/www.vector.co.jp\/soft\/winnt\/net\/se483196.html\" rel=\"nofollow\"\u003ETWEET command\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:27 +0000 2010","truncated":false,"id_str":"12411922813026304","user":{"following":null,"listed_count":26,"profile_background_tile":true,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1290538325\/images\/themes\/theme11\/bg.gif","profile_sidebar_border_color":"CC3366","profile_use_background_image":true,"description":"\u3088\u308d\u3057\u304f\u304a\u9858\u3044\u3057\u307e\u3059\u2764","statuses_count":10429,"time_zone":"Tokyo","friends_count":2893,"profile_background_color":"FF6699","location":"\u4e09\u91cd","profile_text_color":"362720","followers_count":2830,"contributors_enabled":false,"created_at":"Sun Jun 20 02:54:09 +0000 2010","protected":false,"profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1134806221\/__10_normal.jpg","follow_request_sent":null,"verified":false,"notifications":null,"profile_link_color":"B40B43","url":null,"name":"\u3042\u3044\u306e","id_str":"157527482","favourites_count":0,"screen_name":"aino_kis","id":157527482,"show_all_inline_media":false,"lang":"ja","geo_enabled":false,"utc_offset":32400,"profile_sidebar_fill_color":"E5507E"},"id":12411922813026304,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"RT @duck_of_d00m: \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0436\u0435\u043d\u0449\u0438\u043d\u044b \u0432 \u0441\u0435\u0442\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0438\u0448\u0443\u0442 \u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u043e\u043f\u044b\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432, \u0430 \u043c\u0443\u0436\u0447\u0438\u043d\u044b \u043e\u0431 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u043c.","entities":{"user_mentions":[{"indices":[3,16],"name":"Mitya Voskresensky","screen_name":"duck_of_d00m","id_str":"19416850","id":19416850}],"urls":[],"hashtags":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":null,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"web","retweeted_status":{"coordinates":null,"text":"\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0436\u0435\u043d\u0449\u0438\u043d\u044b \u0432 \u0441\u0435\u0442\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0438\u0448\u0443\u0442 \u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u043e\u043f\u044b\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432, \u0430 \u043c\u0443\u0436\u0447\u0438\u043d\u044b \u043e\u0431 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u043c.","entities":{"user_mentions":[],"urls":[],"hashtags":[]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":7,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"https:\/\/chrome.google.com\/extensions\/detail\/encaiiljifbdbjlphpgpiimidegddhic\" rel=\"nofollow\"\u003EChromed Bird\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Tue Dec 07 18:45:38 +0000 2010","truncated":false,"id_str":"12216177023520768","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"C0DEED","show_all_inline_media":false,"geo_enabled":false,"description":"\u0421\u0442\u0440\u0430\u0442\u0435\u0433 \u0432 \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0445 \u043c\u0435\u0434\u0438\u0430, \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u0432 Red Keds, \u043f\u0438\u0448\u0443 \u043e \u0440\u0435\u043a\u043b\u0430\u043c\u0435, \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0438 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u043d\u044b\u0445 \u0448\u0442\u0443\u043a\u0430\u0445. \u043f\u0438\u0448\u0438\u0442\u0435 \u0441\u044e\u0434\u0430 \u0432\u0430\u0448\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b http:\/\/www.formspring.me\/duckofd00m ","listed_count":131,"profile_background_tile":false,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1290538325\/images\/themes\/theme1\/bg.png","profile_background_color":"C0DEED","location":"Russia, Moscow","profile_use_background_image":true,"profile_text_color":"333333","followers_count":1471,"statuses_count":6946,"time_zone":"Moscow","created_at":"Fri Jan 23 22:07:58 +0000 2009","friends_count":72,"protected":false,"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1031969395\/duck_digital_duck_normal.png","notifications":null,"profile_link_color":"0084B4","url":"http:\/\/duckofdoom.ru","name":"Mitya Voskresensky","id_str":"19416850","favourites_count":0,"screen_name":"duck_of_d00m","id":19416850,"contributors_enabled":false,"lang":"en","utc_offset":10800,"profile_sidebar_fill_color":"DDEEF6"},"id":12216177023520768,"in_reply_to_user_id":null,"favorited":false},"retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:27 +0000 2010","truncated":false,"id_str":"12411922808840192","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"CC3366","show_all_inline_media":false,"geo_enabled":false,"description":"","listed_count":16,"profile_background_tile":true,"profile_background_image_url":"http:\/\/s.twimg.com\/a\/1291318259\/images\/themes\/theme11\/bg.gif","profile_background_color":"FF6699","location":"\u0421\u0430\u0440\u0430\u0442\u043e\u0432 ","profile_use_background_image":true,"profile_text_color":"362720","followers_count":87,"statuses_count":519,"time_zone":null,"created_at":"Fri Sep 18 17:59:18 +0000 2009","friends_count":53,"protected":false,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1104098446\/IMG_3584_normal.JPG","notifications":null,"profile_link_color":"B40B43","url":null,"name":"Olga Semina","id_str":"75342779","favourites_count":0,"screen_name":"callmelili","id":75342779,"contributors_enabled":false,"lang":"en","utc_offset":null,"profile_sidebar_fill_color":"E5507E"},"id":12411922808840192,"in_reply_to_user_id":null,"favorited":false} -{"coordinates":null,"text":"The Art of Corking Wine http:\/\/bit.ly\/11gGbb #winemaking","entities":{"urls":[{"expanded_url":null,"indices":[24,44],"url":"http:\/\/bit.ly\/11gGbb"}],"user_mentions":[],"hashtags":[{"text":"winemaking","indices":[45,56]}]},"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"place":null,"contributors":null,"retweet_count":null,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"source":"\u003Ca href=\"http:\/\/www.ajaymatharu.com\/\" rel=\"nofollow\"\u003ETweet Old Post\u003C\/a\u003E","retweeted":false,"geo":null,"created_at":"Wed Dec 08 07:43:28 +0000 2010","truncated":false,"id_str":"12411927032504320","user":{"follow_request_sent":null,"following":null,"verified":false,"profile_sidebar_border_color":"BDDCAD","show_all_inline_media":false,"geo_enabled":false,"description":"Wine Creator is all about the wonderfully awesome hobby of making wine at home - something I've done personally for over 15 years and love sharing with others!","listed_count":307,"profile_background_tile":true,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/7784250\/wine-bottles-free.jpg","profile_background_color":"9AE4E8","location":"","profile_use_background_image":true,"profile_text_color":"333333","followers_count":15657,"statuses_count":2191,"time_zone":"Central Time (US & Canada)","created_at":"Tue Apr 07 01:37:29 +0000 2009","friends_count":17140,"protected":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/126970064\/redWine_normal.jpg","notifications":null,"profile_link_color":"0084B4","url":"http:\/\/winecreator.com","name":"Wine Creator","id_str":"29347169","favourites_count":1,"screen_name":"winecreator","id":29347169,"contributors_enabled":false,"lang":"en","utc_offset":-21600,"profile_sidebar_fill_color":"DDFFCC"},"id":12411927032504320,"in_reply_to_user_id":null,"favorited":false} diff --git a/third_party/objc/json-framework/Tests/StreamParserIntegrationTest.m b/third_party/objc/json-framework/Tests/StreamParserIntegrationTest.m deleted file mode 100644 index 15bf5e44b99af..0000000000000 --- a/third_party/objc/json-framework/Tests/StreamParserIntegrationTest.m +++ /dev/null @@ -1,132 +0,0 @@ -/* - Copyright (c) 2010, Stig Brautaset. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - Neither the name of the the author nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - -#import -#import - -#import "JsonTestCase.h" - -@interface StreamParserIntegrationTest : SenTestCase < SBJsonStreamParserAdapterDelegate> { - SBJsonStreamParser *parser; - SBJsonStreamParserAdapter *adapter; - NSUInteger arrayCount, objectCount; - NSDirectoryEnumerator *files; - NSString *path; -} -@end - -@implementation StreamParserIntegrationTest - -- (void)setUp { - adapter = [SBJsonStreamParserAdapter new]; - adapter.delegate = self; - - parser = [SBJsonStreamParser new]; - parser.delegate = adapter; - parser.supportMultipleDocuments = YES; - - arrayCount = objectCount = 0u; - - NSString *suite = @"Tests/Stream/"; - path = [JsonTestCase pathForSuite:suite]; - files = [[NSFileManager defaultManager] enumeratorAtPath:path]; - -} - -- (void)parser:(SBJsonStreamParser *)parser foundArray:(NSArray *)array { - arrayCount++; -} - -- (void)parser:(SBJsonStreamParser *)parser foundObject:(NSDictionary *)dict { - objectCount++; -} - -/* - This test reads a 100k chunk of data downloaded from - http://stream.twitter.com/1/statuses/sample.json - and split into 1k files. It simulates streaming by parsing - this data incrementally. - */ -- (void)testMultipleDocuments { - NSString *fileName; - while ((fileName = [files nextObject])) { - NSString *file = [path stringByAppendingPathComponent:fileName]; - - // Don't accidentally test directories. That would be bad. - BOOL isDir = NO; - if (NO == [[NSFileManager defaultManager] fileExistsAtPath:file isDirectory:&isDir] || YES == isDir) - continue; - - NSData *data = [NSData dataWithContentsOfMappedFile:file]; - STAssertNotNil(data, nil); - - STAssertEquals([parser parse:data], SBJsonStreamParserWaitingForData, @"%@ - %@", file, parser.error); - } - STAssertEquals(arrayCount, (NSUInteger)0, nil); - STAssertEquals(objectCount, (NSUInteger)98, nil); -} - -- (void)parseArrayOfObjects { - [parser parse:[NSData dataWithBytes:"[" length:1]]; - for (int i = 1;; i++) { - char *utf8 = "{\"foo\":[],\"bar\":[]}"; - [parser parse:[NSData dataWithBytes:utf8 length:strlen(utf8)]]; - if (i == 100) - break; - [parser parse:[NSData dataWithBytes:"," length:1]]; - } - [parser parse:[NSData dataWithBytes:"]" length:1]]; -} - -- (void)testSingleArray { - [self parseArrayOfObjects]; - STAssertEquals(arrayCount, (NSUInteger)1, nil); - STAssertEquals(objectCount, (NSUInteger)0, nil); -} - -- (void)testSkipArray { - adapter.levelsToSkip = 1; - [self parseArrayOfObjects]; - STAssertEquals(arrayCount, (NSUInteger)0, nil); - STAssertEquals(objectCount, (NSUInteger)100, nil); -} - -- (void)testSkipArrayAndObject { - adapter.levelsToSkip = 2; - [self parseArrayOfObjects]; - STAssertEquals(arrayCount, (NSUInteger)200, nil); - STAssertEquals(objectCount, (NSUInteger)0, nil); -} - - -@end \ No newline at end of file diff --git a/third_party/objc/json-framework/Tests/WriterTest.m b/third_party/objc/json-framework/Tests/WriterTest.m deleted file mode 100644 index 4616d7e4db9b0..0000000000000 --- a/third_party/objc/json-framework/Tests/WriterTest.m +++ /dev/null @@ -1,80 +0,0 @@ -/* - Copyright (C) 2010 Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of the author nor the names of its contributors may be used - to endorse or promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - -#import -#import - -@interface WriterTest : SenTestCase { - SBJsonWriter * writer; -} -@end - -@implementation WriterTest - -- (void)setUp { - writer = [SBJsonWriter new]; -} - -- (void)testInfinity { - STAssertEqualObjects(@"[0]", [writer stringWithObject:[NSArray arrayWithObject:[NSNumber numberWithDouble:0.0]]], nil); - STAssertEqualObjects(@"[-0]", [writer stringWithObject:[NSArray arrayWithObject:[NSNumber numberWithDouble:-0.0]]], nil); - - STAssertEqualObjects(@"[0]", [writer stringWithObject:[NSArray arrayWithObject:[NSNumber numberWithFloat:(float)0.0]]], nil); - STAssertEqualObjects(@"[-0]", [writer stringWithObject:[NSArray arrayWithObject:[NSNumber numberWithFloat:(float)-0.0]]], nil); - - STAssertEqualObjects(@"[0]", [writer stringWithObject:[NSArray arrayWithObject:[NSNumber numberWithInt:0]]], nil); - STAssertEqualObjects(@"[0]", [writer stringWithObject:[NSArray arrayWithObject:[NSNumber numberWithInt:-0]]], nil); - - STAssertEqualObjects(@"[0]", [writer stringWithObject:[NSArray arrayWithObject:[NSDecimalNumber numberWithDouble:0]]], nil); - STAssertEqualObjects(@"[0]", [writer stringWithObject:[NSArray arrayWithObject:[NSDecimalNumber numberWithDouble:-0]]], nil); - - STAssertEqualObjects(@"[0]", [writer stringWithObject:[NSArray arrayWithObject:[NSDecimalNumber numberWithFloat:0]]], nil); - STAssertEqualObjects(@"[0]", [writer stringWithObject:[NSArray arrayWithObject:[NSDecimalNumber numberWithFloat:-0]]], nil); -} - -- (void)testTimeInterval { - NSTimeInterval interval = 319670801.45073098; // seconds since epoc - NSNumber *number = [NSNumber numberWithDouble:interval]; - NSArray *array = [NSArray arrayWithObject:number]; - - STAssertEqualObjects(@"[319670801.45073098]", [writer stringWithObject:array], nil); -} - - -- (void)testWriteToStream { - SBJsonStreamWriter *streamWriter = [[SBJsonStreamWriter alloc] init]; - - STAssertTrue([streamWriter writeArray:[NSArray array]], nil); - - STAssertFalse([streamWriter writeArray:[NSArray array]], nil); - STAssertEqualObjects(streamWriter.error, @"Stream is closed", nil); -} - -@end diff --git a/third_party/objc/json-framework/sbjson-ios/sbjson-ios-Prefix.pch b/third_party/objc/json-framework/sbjson-ios/sbjson-ios-Prefix.pch deleted file mode 100644 index f78b76b46b31a..0000000000000 --- a/third_party/objc/json-framework/sbjson-ios/sbjson-ios-Prefix.pch +++ /dev/null @@ -1,7 +0,0 @@ -// -// Prefix header for all source files of the 'sbjson-ios' target in the 'sbjson-ios' project -// - -#ifdef __OBJC__ - #import -#endif diff --git a/third_party/objc/json-framework/sbjson-iosTests/en.lproj/InfoPlist.strings b/third_party/objc/json-framework/sbjson-iosTests/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28ff8f86a..0000000000000 --- a/third_party/objc/json-framework/sbjson-iosTests/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/third_party/objc/json-framework/sbjson-iosTests/sbjson-iosTests-Info.plist b/third_party/objc/json-framework/sbjson-iosTests/sbjson-iosTests-Info.plist deleted file mode 100644 index d1b8e97654a24..0000000000000 --- a/third_party/objc/json-framework/sbjson-iosTests/sbjson-iosTests-Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - org.brautaset.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BNDL - CFBundleShortVersionString - 3.1.1 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - - diff --git a/third_party/objc/json-framework/sbjson-iosTests/sbjson-iosTests-Prefix.pch b/third_party/objc/json-framework/sbjson-iosTests/sbjson-iosTests-Prefix.pch deleted file mode 100644 index 9c4d5b10392db..0000000000000 --- a/third_party/objc/json-framework/sbjson-iosTests/sbjson-iosTests-Prefix.pch +++ /dev/null @@ -1,8 +0,0 @@ -// -// Prefix header for all source files of the 'sbjson-iosTests' target in the 'sbjson-iosTests' project -// - -#ifdef __OBJC__ - #import - #import -#endif