Commit 35ccea03 authored by Razvan Maries's avatar Razvan Maries
Browse files

Backed out 3 changesets (bug 15399486) for build bustages on nsISocketTransport.h. CLOSED TREE

Backed out changeset 81bed88d0adf (bug 15399486)
Backed out changeset 8bf24bdf431f (bug 15399486)
Backed out changeset ef4e49b3701d (bug 15399486)
parent d7be14b9
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -28,12 +28,8 @@ struct LoadURIOptions;
 * It provides methods and attributes to direct an object to navigate to a new
 * location, stop or restart an in process load, or determine where the object
 * has previously gone.
 *
 * Even though this is builtinclass, most of the interface is also implemented
 * in RemoteWebNavigation, so if this interface changes, the implementation
 * there may also need to change.
 */
[scriptable, builtinclass, uuid(3ade79d4-8cb9-4952-b18d-4f9b63ca0d31)]
[scriptable, uuid(3ade79d4-8cb9-4952-b18d-4f9b63ca0d31)]
interface nsIWebNavigation : nsISupports
{
  /**
+0 −221
Original line number Diff line number Diff line
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */

#include "MockedSocketTransport.h"

using namespace mozilla::net;

namespace mozilla {
namespace dom {

NS_IMPL_ISUPPORTS(MockedSocketTransport, nsISocketTransport, nsITransport)

// static
already_AddRefed<MockedSocketTransport> MockedSocketTransport::Create() {
  RefPtr<MockedSocketTransport> transport = new MockedSocketTransport();
  return transport.forget();
}

NS_IMETHODIMP
MockedSocketTransport::SetKeepaliveEnabled(bool) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::SetKeepaliveVals(int32_t, int32_t) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::GetSecurityCallbacks(nsIInterfaceRequestor**) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::SetSecurityCallbacks(nsIInterfaceRequestor*) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::OpenInputStream(uint32_t, uint32_t, uint32_t,
                                       nsIInputStream**) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::OpenOutputStream(uint32_t, uint32_t, uint32_t,
                                        nsIOutputStream**) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::Close(nsresult) { return NS_ERROR_NOT_IMPLEMENTED; }

NS_IMETHODIMP
MockedSocketTransport::SetEventSink(nsITransportEventSink*, nsIEventTarget*) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::Bind(NetAddr*) { return NS_ERROR_NOT_IMPLEMENTED; }

NS_IMETHODIMP
MockedSocketTransport::GetFirstRetryError(nsresult*) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::GetEchConfigUsed(bool*) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::SetEchConfig(const nsACString&) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::ResolvedByTRR(bool*) { return NS_ERROR_NOT_IMPLEMENTED; }

NS_IMETHODIMP
MockedSocketTransport::GetOriginAttributes(mozilla::OriginAttributes*) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::GetKeepaliveEnabled(bool*) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::GetSendBufferSize(uint32_t*) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::SetSendBufferSize(uint32_t) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::GetPort(int32_t*) { return NS_ERROR_NOT_IMPLEMENTED; }

NS_IMETHODIMP
MockedSocketTransport::GetPeerAddr(mozilla::net::NetAddr*) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::GetSelfAddr(mozilla::net::NetAddr*) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::GetScriptablePeerAddr(nsINetAddr**) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::GetScriptableSelfAddr(nsINetAddr**) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::GetSecurityInfo(nsISupports**) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::IsAlive(bool*) { return NS_ERROR_NOT_IMPLEMENTED; }

NS_IMETHODIMP
MockedSocketTransport::GetConnectionFlags(uint32_t*) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::SetConnectionFlags(uint32_t) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::GetTlsFlags(uint32_t*) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::SetTlsFlags(uint32_t) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::GetRecvBufferSize(uint32_t*) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::SetRecvBufferSize(uint32_t) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::GetResetIPFamilyPreference(bool*) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::SetOriginAttributes(const mozilla::OriginAttributes&) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::GetScriptableOriginAttributes(
    JSContext* aCx, JS::MutableHandle<JS::Value>) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::SetScriptableOriginAttributes(JSContext* aCx,
                                                     JS::Handle<JS::Value>) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::GetHost(nsACString&) { return NS_ERROR_NOT_IMPLEMENTED; }

NS_IMETHODIMP
MockedSocketTransport::GetTimeout(uint32_t, uint32_t*) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::SetTimeout(uint32_t, uint32_t) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::SetReuseAddrPort(bool) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::SetLinger(bool, int16_t) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
MockedSocketTransport::GetQoSBits(uint8_t*) { return NS_ERROR_NOT_IMPLEMENTED; }

NS_IMETHODIMP
MockedSocketTransport::SetQoSBits(uint8_t) { return NS_ERROR_NOT_IMPLEMENTED; }

NS_IMETHODIMP
MockedSocketTransport::SetFastOpenCallback(TCPFastOpen*) {
  return NS_ERROR_NOT_IMPLEMENTED;
}

}  // namespace dom
}  // namespace mozilla
+0 −36
Original line number Diff line number Diff line
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */

#ifndef DOM_PRESENTATION_MOCKEDSOCKETTRANSPORT_H_
#define DOM_PRESENTATION_MOCKEDSOCKETTRANSPORT_H_

#include "nsISocketTransport.h"

namespace mozilla {
namespace dom {

// For testing purposes, we need a mocked socket transport that doesn't do
// anything. It has to be implemented in C++ because nsISocketTransport is
// builtinclass because it contains nostdcall methods.

class MockedSocketTransport final : public nsISocketTransport {
 public:
  NS_DECL_THREADSAFE_ISUPPORTS
  NS_DECL_NSITRANSPORT
  NS_DECL_NSISOCKETTRANSPORT

  MockedSocketTransport() = default;

  static already_AddRefed<MockedSocketTransport> Create();

 protected:
  virtual ~MockedSocketTransport() = default;
};

}  // namespace dom
}  // namespace mozilla

#endif  // DOM_PRESENTATION_MOCKEDSOCKETTRANSPORT_H_
+0 −6
Original line number Diff line number Diff line
@@ -5,12 +5,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

Classes = [
    {
        'cid': '{a2b5ef38-a650-4bee-b488-3739f1f3afe7}',
        'contract_ids': ['@mozilla.org/presentation/mockedsockettransport;1'],
        'headers': ['/dom/presentation/MockedSocketTransport.h'],
        'type': 'mozilla::dom::MockedSocketTransport',
    },
    {
        'cid': '{dd2bbf2f-3399-4389-8f5f-d382afb8b2d6}',
        'contract_ids': ['@mozilla.org/presentation/datachanneltransport;1'],
+0 −2
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ EXPORTS.mozilla.dom += [
    "ipc/PresentationChild.h",
    "ipc/PresentationIPCService.h",
    "ipc/PresentationParent.h",
    "MockedSocketTransport.h",
    "Presentation.h",
    "PresentationAvailability.h",
    "PresentationCallbacks.h",
@@ -45,7 +44,6 @@ UNIFIED_SOURCES += [
    "ipc/PresentationContentSessionInfo.cpp",
    "ipc/PresentationIPCService.cpp",
    "ipc/PresentationParent.cpp",
    "MockedSocketTransport.cpp",
    "Presentation.cpp",
    "PresentationAvailability.cpp",
    "PresentationCallbacks.cpp",
Loading