Masood Malekghassemi | df1e07e | 2016-02-02 14:17:14 -0800 | [diff] [blame] | 1 | %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 Zeng | 12dfdc3 | 2016-04-26 22:05:41 -0700 | [diff] [blame] | 41 | #ifdef GPR_WINDOWS |
Masood Malekghassemi | df1e07e | 2016-02-02 14:17:14 -0800 | [diff] [blame] | 42 | |
| 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 Malekghassemi | d013912 | 2016-02-16 21:08:49 -0800 | [diff] [blame] | 55 | #ifdef __cplusplus |
| 56 | extern "C" { |
| 57 | #endif /* __cpluslus */ |
| 58 | |
Masood Malekghassemi | df1e07e | 2016-02-02 14:17:14 -0800 | [diff] [blame] | 59 | void pygrpc_load_imports(HMODULE library); |
| 60 | |
Masood Malekghassemi | d013912 | 2016-02-16 21:08:49 -0800 | [diff] [blame] | 61 | #ifdef __cplusplus |
| 62 | } |
| 63 | #endif /* __cpluslus */ |
| 64 | |
Yuchen Zeng | 12dfdc3 | 2016-04-26 22:05:41 -0700 | [diff] [blame] | 65 | #else /* !GPR_WINDOWS */ |
Masood Malekghassemi | df1e07e | 2016-02-02 14:17:14 -0800 | [diff] [blame] | 66 | |
Masood Malekghassemi | 93cc06a | 2016-05-13 14:25:35 -0700 | [diff] [blame] | 67 | #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 Malekghassemi | df1e07e | 2016-02-02 14:17:14 -0800 | [diff] [blame] | 72 | #include <grpc/support/alloc.h> |
| 73 | #include <grpc/support/slice.h> |
| 74 | #include <grpc/support/time.h> |
| 75 | #include <grpc/status.h> |
Masood Malekghassemi | df1e07e | 2016-02-02 14:17:14 -0800 | [diff] [blame] | 76 | |
Yuchen Zeng | 12dfdc3 | 2016-04-26 22:05:41 -0700 | [diff] [blame] | 77 | #endif /* !GPR_WINDOWS */ |
Masood Malekghassemi | df1e07e | 2016-02-02 14:17:14 -0800 | [diff] [blame] | 78 | |
| 79 | #endif |