mirror of
https://github.com/unclechu/gRPC-haskell.git
synced 2024-11-26 21:19:43 +01:00
update to work with latest grpc
This commit is contained in:
parent
17303329fb
commit
20693583d9
3 changed files with 24 additions and 26 deletions
|
@ -1,11 +1,13 @@
|
|||
#include <grpc/grpc.h>
|
||||
|
||||
grpc_event *grpc_completion_queue_next_(grpc_completion_queue *cq, gpr_timespec *deadline) {
|
||||
grpc_completion_queue_next(cq, *deadline);
|
||||
grpc_event grpc_completion_queue_next_(grpc_completion_queue *cq,
|
||||
gpr_timespec *deadline,
|
||||
void *reserved) {
|
||||
return grpc_completion_queue_next(cq, *deadline, reserved);
|
||||
}
|
||||
|
||||
grpc_event* grpc_completion_queue_pluck_(grpc_completion_queue *cq, void *tag, gpr_timespec *deadline) {
|
||||
grpc_completion_queue_pluck(cq, tag, *deadline);
|
||||
grpc_event grpc_completion_queue_pluck_(grpc_completion_queue *cq, void *tag,
|
||||
gpr_timespec *deadline,
|
||||
void *reserved) {
|
||||
return grpc_completion_queue_pluck(cq, tag, *deadline, reserved);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -15,8 +15,8 @@ extra-source-files: cbits, include
|
|||
|
||||
library
|
||||
build-depends:
|
||||
base >=4.7 && <4.8
|
||||
, clock >=0.4 && <0.5
|
||||
base
|
||||
, clock
|
||||
c-sources:
|
||||
cbits/grpc_haskell.c
|
||||
exposed-modules:
|
||||
|
@ -39,7 +39,7 @@ library
|
|||
test-suite test
|
||||
build-depends:
|
||||
base
|
||||
, QuickCheck >= 2.7 && < 2.8
|
||||
, QuickCheck
|
||||
default-language: Haskell2010
|
||||
ghc-options: -Wall -fwarn-incomplete-patterns -O2 -threaded -rtsopts
|
||||
hs-source-dirs: tests
|
||||
|
|
|
@ -34,7 +34,6 @@ data Arg = Arg { argKey :: String, argValue :: ArgValue }
|
|||
data ArgValue = ArgString String | ArgInt Int
|
||||
|
||||
{#enum grpc_call_error as CallError {underscoreToCase} deriving (Eq)#}
|
||||
{#enum grpc_op_error as OpError {underscoreToCase} deriving (Eq)#}
|
||||
|
||||
{#pointer *grpc_byte_buffer as ByteBuffer newtype #}
|
||||
{#pointer *grpc_byte_buffer_reader as ByteBufferReader newtype #}
|
||||
|
@ -47,22 +46,19 @@ data ArgValue = ArgString String | ArgInt Int
|
|||
{#fun grpc_init as ^ {} -> `()'#}
|
||||
{#fun grpc_shutdown as ^ {} -> `()'#}
|
||||
|
||||
{#fun grpc_completion_queue_create as ^ {} -> `CompletionQueue'#}
|
||||
{#fun grpc_completion_queue_create as ^ {`Ptr ()'} -> `CompletionQueue'#}
|
||||
|
||||
{#fun grpc_completion_queue_next_ as ^ {`CompletionQueue', `CTimeSpecPtr'} -> `Event'#}
|
||||
{#fun grpc_completion_queue_pluck_ as ^ {`CompletionQueue', `Ptr ()'} -> `Event'#}
|
||||
|
||||
{#fun grpc_event_finish as ^ {`Event'} -> `()'#}
|
||||
{#fun grpc_completion_queue_pluck_ as ^ {`CompletionQueue', `Ptr ()', `CTimeSpecPtr'} -> `Event'#}
|
||||
|
||||
{#fun grpc_completion_queue_shutdown as ^ {`CompletionQueue'} -> `()'#}
|
||||
{#fun grpc_completion_queue_destroy as ^ {`CompletionQueue'} -> `()'#}
|
||||
|
||||
{#fun grpc_channel_create_call_ as ^ {`Channel', `CompletionQueue', `String', `String', `CTimeSpecPtr'} -> `Call'#}
|
||||
{#fun grpc_channel_create as ^ {`String', `ChannelArgsPtr'} -> `Channel'#}
|
||||
{#fun grpc_insecure_channel_create as ^ {`String', `ChannelArgsPtr', `Ptr ()'} -> `Channel'#}
|
||||
{#fun grpc_channel_destroy as ^ {`Channel'} -> `()'#}
|
||||
|
||||
{#fun grpc_call_start_batch as ^ {`Call', `Op', `Int', `Ptr ()'} -> `CallError'#}
|
||||
{#fun grpc_call_cancel as ^ {`Call'} -> `()'#}
|
||||
{#fun grpc_call_cancel_with_status as ^ {`Call', `StatusCode', `String'} -> `()'#}
|
||||
{#fun grpc_call_start_batch as ^ {`Call', `Op', `Int', `Ptr ()', `Ptr ()'} -> `CallError'#}
|
||||
{#fun grpc_call_cancel as ^ {`Call', `Ptr ()'} -> `()'#}
|
||||
{#fun grpc_call_cancel_with_status as ^ {`Call', `StatusCode', `String', `Ptr ()'} -> `()'#}
|
||||
{#fun grpc_call_destroy as ^ {`Call'} -> `()'#}
|
||||
|
||||
|
|
Loading…
Reference in a new issue