Modify isolate_driver.py to always generate a wrapping .isolate.
[chromium-blink-merge.git] / sandbox / mac / xpc.h
blob33d3945e387cf2116705dce227bead9393c24909
1 // Copyright 2014 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.
5 // This file provides forward declarations for XPC symbols that are not
6 // present in the 10.6 SDK. It uses generate_stubs to produce code to
7 // dynamically load the libxpc.dylib library and set up a stub table, with
8 // the same names as the real XPC functions.
10 #ifndef SANDBOX_MAC_XPC_H_
11 #define SANDBOX_MAC_XPC_H_
13 #include <AvailabilityMacros.h>
14 #include <mach/mach.h>
16 #include "sandbox/sandbox_export.h"
18 // Declares XPC object types. This includes <xpc/xpc.h> if available.
19 #include "sandbox/mac/xpc_stubs_header.fragment"
21 #if !defined(MAC_OS_X_VERSION_10_7) || \
22 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
24 // C++ library loader.
25 #include "sandbox/mac/xpc_stubs.h"
27 extern "C" {
28 // Signatures for XPC public functions that are loaded by xpc_stubs.h.
29 #include "sandbox/mac/xpc_stubs.sig"
30 // Signatures for private XPC functions.
31 #include "sandbox/mac/xpc_private_stubs.sig"
32 } // extern "C"
34 #else
36 // Signatures for private XPC functions.
37 extern "C" {
38 #include "sandbox/mac/xpc_private_stubs.sig"
39 } // extern "C"
41 #endif
43 namespace sandbox {
45 // Dynamically loads the XPC library.
46 bool SANDBOX_EXPORT InitializeXPC();
48 } // namespace sandbox
50 #endif // SANDBOX_MAC_XPC_H_