OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * |
| 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are |
| 6 * met: |
| 7 * |
| 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above |
| 11 * copyright notice, this list of conditions and the following disclaimer |
| 12 * in the documentation and/or other materials provided with the |
| 13 * distribution. |
| 14 * * Neither the name of Google Inc. nor the names of its |
| 15 * contributors may be used to endorse or promote products derived from |
| 16 * this software without specific prior written permission. |
| 17 * |
| 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ |
| 30 |
| 31 #include "config.h" |
| 32 #include "SocketStreamHandle.h" |
| 33 |
| 34 #if ENABLE(WEB_SOCKETS) |
| 35 |
| 36 #include "Logging.h" |
| 37 #include "NotImplemented.h" |
| 38 #include "SocketStreamHandleClient.h" |
| 39 #include "WebData.h" |
| 40 #include "WebKit.h" |
| 41 #include <wtf/PassOwnPtr.h> |
| 42 |
| 43 using namespace WebKit; |
| 44 |
| 45 namespace WebCore { |
| 46 |
| 47 class SocketStreamHandleInternal { |
| 48 public: |
| 49 static PassOwnPtr<SocketStreamHandleInternal> create(SocketStreamHandle* handle) |
| 50 { |
| 51 return new SocketStreamHandleInternal(handle); |
| 52 } |
| 53 virtual ~SocketStreamHandleInternal(); |
| 54 |
| 55 // TODO(ukai): implement this. |
| 56 |
| 57 private: |
| 58 explicit SocketStreamHandleInternal(SocketStreamHandle*); |
| 59 |
| 60 SocketStreamHandle* m_handle; |
| 61 }; |
| 62 |
| 63 SocketStreamHandleInternal::SocketStreamHandleInternal(SocketStreamHandle* handle) |
| 64 : m_handle(handle) |
| 65 { |
| 66 } |
| 67 |
| 68 SocketStreamHandleInternal::~SocketStreamHandleInternal() |
| 69 { |
| 70 m_handle = 0; |
| 71 } |
| 72 |
| 73 // SocketStreamHandle ---------------------------------------------------------- |
| 74 |
| 75 SocketStreamHandle::SocketStreamHandle(const KURL& url, SocketStreamHandleClient* client) |
| 76 : SocketStreamHandleBase(url, client) |
| 77 { |
| 78 m_internal = SocketStreamHandleInternal::create(this); |
| 79 notImplemented(); |
| 80 } |
| 81 |
| 82 SocketStreamHandle::~SocketStreamHandle() |
| 83 { |
| 84 setClient(0); |
| 85 m_internal.clear(); |
| 86 } |
| 87 |
| 88 int SocketStreamHandle::platformSend(const char* buf, int len) |
| 89 { |
| 90 notImplemented(); |
| 91 return 0; |
| 92 } |
| 93 |
| 94 void SocketStreamHandle::platformClose() |
| 95 { |
| 96 notImplemented(); |
| 97 } |
| 98 |
| 99 void SocketStreamHandle::didReceiveAuthenticationChallenge(const AuthenticationChallenge& challenge) |
| 100 { |
| 101 notImplemented(); |
| 102 } |
| 103 |
| 104 void SocketStreamHandle::receivedCredential(const AuthenticationChallenge& challenge, const Credential& credential) |
| 105 { |
| 106 notImplemented(); |
| 107 } |
| 108 |
| 109 void SocketStreamHandle::receivedRequestToContinueWithoutCredential(const AuthenticationChallenge& challenge) |
| 110 { |
| 111 notImplemented(); |
| 112 } |
| 113 |
| 114 void SocketStreamHandle::receivedCancellation(const AuthenticationChallenge& challenge) |
| 115 { |
| 116 notImplemented(); |
| 117 } |
| 118 |
| 119 } // namespace WebCore |
| 120 |
| 121 #endif // ENABLE(WEB_SOCKETS) |
OLD | NEW |