blob: 96c5b02bc2e903d437ba679b49ca3e1420b4956e [file] [log] [blame]
Masood Malekghassemi743c10c2015-06-16 18:05:27 -07001# Copyright 2015, Google Inc.
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met:
7#
8# * Redistributions of source code must retain the above copyright
9# notice, this list of conditions and the following disclaimer.
10# * Redistributions in binary form must reproduce the above
11# copyright notice, this list of conditions and the following disclaimer
12# in the documentation and/or other materials provided with the
13# distribution.
14# * Neither the name of Google Inc. nor the names of its
15# contributors may be used to endorse or promote products derived from
16# this software without specific prior written permission.
17#
18# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
Masood Malekghassemi743c10c2015-06-16 18:05:27 -070030
31cdef class Timespec:
32
Masood Malekghassemi116982e2015-12-11 15:53:38 -080033 cdef gpr_timespec c_time
Masood Malekghassemi743c10c2015-06-16 18:05:27 -070034
35
36cdef class CallDetails:
37
Masood Malekghassemi116982e2015-12-11 15:53:38 -080038 cdef grpc_call_details c_details
Masood Malekghassemi743c10c2015-06-16 18:05:27 -070039
40
41cdef class OperationTag:
42
43 cdef object user_tag
44 cdef list references
45 # This allows CompletionQueue to notify the Python Server object that the
46 # underlying GRPC core server has shutdown
Masood Malekghassemi116982e2015-12-11 15:53:38 -080047 cdef Server shutting_down_server
48 cdef Call operation_call
Masood Malekghassemi743c10c2015-06-16 18:05:27 -070049 cdef CallDetails request_call_details
50 cdef Metadata request_metadata
51 cdef Operations batch_operations
52 cdef bint is_new_request
53
54
55cdef class Event:
56
Masood Malekghassemi116982e2015-12-11 15:53:38 -080057 cdef readonly grpc_completion_type type
Masood Malekghassemi743c10c2015-06-16 18:05:27 -070058 cdef readonly bint success
59 cdef readonly object tag
60
Masood Malekghassemi743c10c2015-06-16 18:05:27 -070061 # For Server.request_call
Masood Malekghassemiaed42a82015-12-07 16:35:40 -080062 cdef readonly bint is_new_request
Masood Malekghassemi743c10c2015-06-16 18:05:27 -070063 cdef readonly CallDetails request_call_details
64 cdef readonly Metadata request_metadata
65
Ken Paysonea1b16f2016-07-07 16:44:33 -070066 # For server calls
67 cdef readonly Call operation_call
68
Masood Malekghassemi743c10c2015-06-16 18:05:27 -070069 # For Call.start_batch
70 cdef readonly Operations batch_operations
71
72
73cdef class ByteBuffer:
74
Masood Malekghassemi116982e2015-12-11 15:53:38 -080075 cdef grpc_byte_buffer *c_byte_buffer
Masood Malekghassemi743c10c2015-06-16 18:05:27 -070076
77
78cdef class SslPemKeyCertPair:
79
Masood Malekghassemi116982e2015-12-11 15:53:38 -080080 cdef grpc_ssl_pem_key_cert_pair c_pair
Masood Malekghassemi743c10c2015-06-16 18:05:27 -070081 cdef readonly object private_key, certificate_chain
82
83
84cdef class ChannelArg:
85
Masood Malekghassemi116982e2015-12-11 15:53:38 -080086 cdef grpc_arg c_arg
Masood Malekghassemi743c10c2015-06-16 18:05:27 -070087 cdef readonly object key, value
88
89
90cdef class ChannelArgs:
91
Masood Malekghassemi116982e2015-12-11 15:53:38 -080092 cdef grpc_channel_args c_args
Masood Malekghassemi743c10c2015-06-16 18:05:27 -070093 cdef list args
94
95
96cdef class Metadatum:
97
Masood Malekghassemi116982e2015-12-11 15:53:38 -080098 cdef grpc_metadata c_metadata
Masood Malekghassemi743c10c2015-06-16 18:05:27 -070099 cdef object _key, _value
100
101
102cdef class Metadata:
103
Masood Malekghassemi116982e2015-12-11 15:53:38 -0800104 cdef grpc_metadata_array c_metadata_array
Masood Malekghassemi743c10c2015-06-16 18:05:27 -0700105 cdef object metadata
106
107
108cdef class Operation:
109
Masood Malekghassemi116982e2015-12-11 15:53:38 -0800110 cdef grpc_op c_op
Masood Malekghassemi743c10c2015-06-16 18:05:27 -0700111 cdef ByteBuffer _received_message
112 cdef Metadata _received_metadata
Masood Malekghassemi116982e2015-12-11 15:53:38 -0800113 cdef grpc_status_code _received_status_code
Masood Malekghassemi743c10c2015-06-16 18:05:27 -0700114 cdef char *_received_status_details
115 cdef size_t _received_status_details_capacity
116 cdef int _received_cancelled
117 cdef readonly bint is_valid
118 cdef object references
119
120
121cdef class Operations:
122
Masood Malekghassemi116982e2015-12-11 15:53:38 -0800123 cdef grpc_op *c_ops
Masood Malekghassemi743c10c2015-06-16 18:05:27 -0700124 cdef size_t c_nops
125 cdef list operations
126
Masood Malekghassemi93cc06a2016-05-13 14:25:35 -0700127
128cdef class CompressionOptions:
129
130 cdef grpc_compression_options c_options