OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
viettrungluu
2016/02/02 00:07:36
This file should also live under //mojo/public/pla
Forrest Reiling
2016/02/10 20:16:08
Done.
| |
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_PLATFORM_HANDLE_PLATFORM_HANDLE_FUNCTIONS_H_ | |
6 #define MOJO_PLATFORM_HANDLE_PLATFORM_HANDLE_FUNCTIONS_H_ | |
7 | |
8 #include "mojo/public/c/system/types.h" | |
9 | |
10 using MojoPlatformHandle = int; // Unix file descriptor | |
viettrungluu
2016/02/02 00:07:36
This header should be compilable as C, so you shou
Forrest Reiling
2016/02/10 20:16:08
Done.
| |
11 | |
12 extern "C" { | |
viettrungluu
2016/02/02 00:07:36
And wrap this line in #ifdef __cplusplus (and ditt
Forrest Reiling
2016/02/10 20:16:09
Done.
| |
13 | |
14 // Wraps |platform_handle| in a MojoHandle so that it can transported, returns | |
15 // true on success. This takes ownership of |platform_handle|, regardless of | |
viettrungluu
2016/02/02 00:07:36
It so doesn't return "true".
Forrest Reiling
2016/02/10 20:16:09
Done.
| |
16 // whether this succeeds. | |
17 MojoResult MojoCreatePlatformHandleWrapper(MojoPlatformHandle platform_handle, | |
18 MojoHandle* wrapper); | |
19 | |
20 MojoResult MojoExtractPlatformHandle(MojoHandle wrapper, | |
viettrungluu
2016/02/02 00:07:36
This could use a comment too.
Forrest Reiling
2016/02/10 20:16:08
Done.
| |
21 MojoPlatformHandle* platform_handle); | |
22 | |
23 } // extern "C" | |
24 | |
25 #endif // MOJO_PLATFORM_HANDLE_PLATFORM_HANDLE_FUNCTIONS_H_ | |
OLD | NEW |