diff options
Diffstat (limited to 'mojo/edk/system/ports/node_delegate.h')
-rw-r--r-- | mojo/edk/system/ports/node_delegate.h | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/mojo/edk/system/ports/node_delegate.h b/mojo/edk/system/ports/node_delegate.h deleted file mode 100644 index 8547302..0000000 --- a/mojo/edk/system/ports/node_delegate.h +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2016 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef MOJO_EDK_SYSTEM_PORTS_NODE_DELEGATE_H_ -#define MOJO_EDK_SYSTEM_PORTS_NODE_DELEGATE_H_ - -#include <stddef.h> - -#include "mojo/edk/system/ports/message.h" -#include "mojo/edk/system/ports/name.h" -#include "mojo/edk/system/ports/port_ref.h" - -namespace mojo { -namespace edk { -namespace ports { - -class NodeDelegate { - public: - virtual ~NodeDelegate() {} - - // Port names should be difficult to guess. - virtual void GenerateRandomPortName(PortName* port_name) = 0; - - // Allocate a message, including a header that can be used by the Node - // implementation. |num_header_bytes| will be aligned. The newly allocated - // memory need not be zero-filled. - virtual void AllocMessage(size_t num_header_bytes, - ScopedMessage* message) = 0; - - // Forward a message asynchronously to the specified node. This method MUST - // NOT synchronously call any methods on Node. - virtual void ForwardMessage(const NodeName& node, ScopedMessage message) = 0; - - // Broadcast a message to all nodes. - virtual void BroadcastMessage(ScopedMessage message) = 0; - - // Indicates that the port's status has changed recently. Use Node::GetStatus - // to query the latest status of the port. Note, this event could be spurious - // if another thread is simultaneously modifying the status of the port. - virtual void PortStatusChanged(const PortRef& port_ref) = 0; -}; - -} // namespace ports -} // namespace edk -} // namespace mojo - -#endif // MOJO_EDK_SYSTEM_PORTS_NODE_DELEGATE_H_ |