blob: d0f60dc0a507984177f1032916d374b853cbe3d7 [file] [log] [blame]
Masood Malekghassemidf1e07e2016-02-02 14:17:14 -08001%YAML 1.2
2--- |
3 /*
4 *
5 * Copyright 2016, Google Inc.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions are
10 * met:
11 *
12 * * Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * * Redistributions in binary form must reproduce the above
15 * copyright notice, this list of conditions and the following disclaimer
16 * in the documentation and/or other materials provided with the
17 * distribution.
18 * * Neither the name of Google Inc. nor the names of its
19 * contributors may be used to endorse or promote products derived from
20 * this software without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 *
34 */
35
36 #ifndef PYGRPC_CYTHON_WINDOWS_IMPORTS_H_
37 #define PYGRPC_CYTHON_WINDOWS_IMPORTS_H_
38
39 #include <grpc/support/port_platform.h>
40
Yuchen Zeng12dfdc32016-04-26 22:05:41 -070041 #ifdef GPR_WINDOWS
Masood Malekghassemidf1e07e2016-02-02 14:17:14 -080042
43 #include <windows.h>
44
45 %for header in sorted(set(api.header for api in c_apis)):
46 #include <${'/'.join(header.split('/')[1:])}>
47 %endfor
48
49 %for api in c_apis:
50 typedef ${api.return_type}(*${api.name}_type)(${api.arguments});
51 extern ${api.name}_type ${api.name}_import;
52 #define ${api.name} ${api.name}_import
53 %endfor
54
Masood Malekghassemid0139122016-02-16 21:08:49 -080055 #ifdef __cplusplus
56 extern "C" {
57 #endif /* __cpluslus */
58
Masood Malekghassemidf1e07e2016-02-02 14:17:14 -080059 void pygrpc_load_imports(HMODULE library);
60
Masood Malekghassemid0139122016-02-16 21:08:49 -080061 #ifdef __cplusplus
62 }
63 #endif /* __cpluslus */
64
Yuchen Zeng12dfdc32016-04-26 22:05:41 -070065 #else /* !GPR_WINDOWS */
Masood Malekghassemidf1e07e2016-02-02 14:17:14 -080066
Masood Malekghassemi93cc06a2016-05-13 14:25:35 -070067 #include <grpc/byte_buffer.h>
68 #include <grpc/byte_buffer_reader.h>
69 #include <grpc/compression.h>
70 #include <grpc/grpc.h>
71 #include <grpc/grpc_security.h>
Masood Malekghassemidf1e07e2016-02-02 14:17:14 -080072 #include <grpc/support/alloc.h>
73 #include <grpc/support/slice.h>
74 #include <grpc/support/time.h>
75 #include <grpc/status.h>
Masood Malekghassemidf1e07e2016-02-02 14:17:14 -080076
Yuchen Zeng12dfdc32016-04-26 22:05:41 -070077 #endif /* !GPR_WINDOWS */
Masood Malekghassemidf1e07e2016-02-02 14:17:14 -080078
79 #endif