OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef MOJO_EDK_EMBEDDER_NAMED_PLATFORM_HANDLE_UTILS_H_ |
| 6 #define MOJO_EDK_EMBEDDER_NAMED_PLATFORM_HANDLE_UTILS_H_ |
| 7 |
| 8 #include "build/build_config.h" |
| 9 #include "mojo/edk/embedder/scoped_platform_handle.h" |
| 10 #include "mojo/edk/system/system_impl_export.h" |
| 11 |
| 12 namespace mojo { |
| 13 namespace edk { |
| 14 |
| 15 struct NamedPlatformHandle; |
| 16 |
| 17 // Creates a client platform handle from |handle|. This may block until |handle| |
| 18 // is ready to receive connections. |
| 19 MOJO_SYSTEM_IMPL_EXPORT ScopedPlatformHandle |
| 20 CreateClientHandle(const NamedPlatformHandle& handle); |
| 21 |
| 22 // Creates a server platform handle from |handle|. On Windows, if |
| 23 // |enforce_uniqueness| is true, this will fail if another pipe with the same |
| 24 // name exists. On other platforms, |enforce_uniqueness| must be false. |
| 25 MOJO_SYSTEM_IMPL_EXPORT ScopedPlatformHandle |
| 26 CreateServerHandle(const NamedPlatformHandle& handle, bool enforce_uniqueness); |
| 27 |
| 28 } // namespace edk |
| 29 } // namespace mojo |
| 30 |
| 31 #endif // MOJO_EDK_EMBEDDER_NAMED_PLATFORM_HANDLE_UTILS_H_ |
OLD | NEW |