Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
3f8962c5
Commit
3f8962c5
authored
10 years ago
by
Jan Tattermusch
Browse files
Options
Downloads
Patches
Plain Diff
removal of unused methods in extension library
parent
337a2ddb
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/csharp/ext/grpc_csharp_ext.c
+34
-202
34 additions, 202 deletions
src/csharp/ext/grpc_csharp_ext.c
with
34 additions
and
202 deletions
src/csharp/ext/grpc_csharp_ext.c
+
34
−
202
View file @
3f8962c5
...
...
@@ -201,18 +201,6 @@ grpcsharp_completion_queue_create(void) {
return
grpc_completion_queue_create
();
}
GPR_EXPORT
grpc_event
*
GPR_CALLTYPE
grpcsharp_completion_queue_next
(
grpc_completion_queue
*
cq
,
gpr_timespec
deadline
)
{
return
grpc_completion_queue_next
(
cq
,
deadline
);
}
GPR_EXPORT
grpc_event
*
GPR_CALLTYPE
grpcsharp_completion_queue_pluck
(
grpc_completion_queue
*
cq
,
void
*
tag
,
gpr_timespec
deadline
)
{
return
grpc_completion_queue_pluck
(
cq
,
tag
,
deadline
);
}
GPR_EXPORT
void
GPR_CALLTYPE
grpcsharp_completion_queue_shutdown
(
grpc_completion_queue
*
cq
)
{
grpc_completion_queue_shutdown
(
cq
);
...
...
@@ -271,101 +259,6 @@ GPR_EXPORT grpc_call *GPR_CALLTYPE grpcsharp_channel_create_call(grpc_channel *c
return
grpc_channel_create_call
(
channel
,
cq
,
method
,
host
,
deadline
);
}
GPR_EXPORT
grpc_call
*
GPR_CALLTYPE
grpcsharp_channel_create_call_old
(
grpc_channel
*
channel
,
const
char
*
method
,
const
char
*
host
,
gpr_timespec
deadline
)
{
return
grpc_channel_create_call_old
(
channel
,
method
,
host
,
deadline
);
}
/* Event */
GPR_EXPORT
void
GPR_CALLTYPE
grpcsharp_event_finish
(
grpc_event
*
event
)
{
grpc_event_finish
(
event
);
}
GPR_EXPORT
grpc_completion_type
GPR_CALLTYPE
grpcsharp_event_type
(
const
grpc_event
*
event
)
{
return
event
->
type
;
}
GPR_EXPORT
grpc_op_error
GPR_CALLTYPE
grpcsharp_event_op_complete
(
const
grpc_event
*
event
)
{
GPR_ASSERT
(
event
->
type
==
GRPC_OP_COMPLETE
);
return
event
->
data
.
op_complete
;
}
GPR_EXPORT
grpc_op_error
GPR_CALLTYPE
grpcsharp_event_write_accepted
(
const
grpc_event
*
event
)
{
GPR_ASSERT
(
event
->
type
==
GRPC_WRITE_ACCEPTED
);
return
event
->
data
.
invoke_accepted
;
}
GPR_EXPORT
grpc_op_error
GPR_CALLTYPE
grpcsharp_event_finish_accepted
(
const
grpc_event
*
event
)
{
GPR_ASSERT
(
event
->
type
==
GRPC_FINISH_ACCEPTED
);
return
event
->
data
.
finish_accepted
;
}
GPR_EXPORT
grpc_status_code
GPR_CALLTYPE
grpcsharp_event_finished_status
(
const
grpc_event
*
event
)
{
GPR_ASSERT
(
event
->
type
==
GRPC_FINISHED
);
return
event
->
data
.
finished
.
status
;
}
GPR_EXPORT
const
char
*
GPR_CALLTYPE
grpcsharp_event_finished_details
(
const
grpc_event
*
event
)
{
GPR_ASSERT
(
event
->
type
==
GRPC_FINISHED
);
return
event
->
data
.
finished
.
details
;
}
GPR_EXPORT
gpr_intptr
GPR_CALLTYPE
grpcsharp_event_read_length
(
const
grpc_event
*
event
)
{
GPR_ASSERT
(
event
->
type
==
GRPC_READ
);
if
(
!
event
->
data
.
read
)
{
return
-
1
;
}
return
grpc_byte_buffer_length
(
event
->
data
.
read
);
}
/*
* Copies data from read event to a buffer. Fatal error occurs if
* buffer is too small.
*/
GPR_EXPORT
void
GPR_CALLTYPE
grpcsharp_event_read_copy_to_buffer
(
const
grpc_event
*
event
,
char
*
buffer
,
size_t
buffer_len
)
{
grpc_byte_buffer_reader
*
reader
;
gpr_slice
slice
;
size_t
offset
=
0
;
GPR_ASSERT
(
event
->
type
==
GRPC_READ
);
reader
=
grpc_byte_buffer_reader_create
(
event
->
data
.
read
);
GPR_ASSERT
(
event
->
data
.
read
);
while
(
grpc_byte_buffer_reader_next
(
reader
,
&
slice
))
{
size_t
len
=
GPR_SLICE_LENGTH
(
slice
);
GPR_ASSERT
(
offset
+
len
<=
buffer_len
);
memcpy
(
buffer
+
offset
,
GPR_SLICE_START_PTR
(
slice
),
GPR_SLICE_LENGTH
(
slice
));
offset
+=
len
;
gpr_slice_unref
(
slice
);
}
grpc_byte_buffer_reader_destroy
(
reader
);
}
GPR_EXPORT
grpc_call
*
GPR_CALLTYPE
grpcsharp_event_call
(
const
grpc_event
*
event
)
{
/* we only allow this for newly incoming server calls. */
GPR_ASSERT
(
event
->
type
==
GRPC_SERVER_RPC_NEW
);
return
event
->
call
;
}
GPR_EXPORT
const
char
*
GPR_CALLTYPE
grpcsharp_event_server_rpc_new_method
(
const
grpc_event
*
event
)
{
GPR_ASSERT
(
event
->
type
==
GRPC_SERVER_RPC_NEW
);
return
event
->
data
.
server_rpc_new
.
method
;
}
/* Timespec */
GPR_EXPORT
gpr_timespec
GPR_CALLTYPE
gprsharp_now
(
void
)
{
return
gpr_now
();
}
...
...
@@ -380,31 +273,6 @@ GPR_EXPORT gpr_int32 GPR_CALLTYPE gprsharp_sizeof_timespec(void) {
/* Call */
GPR_EXPORT
grpc_call_error
GPR_CALLTYPE
grpcsharp_call_add_metadata_old
(
grpc_call
*
call
,
grpc_metadata
*
metadata
,
gpr_uint32
flags
)
{
return
grpc_call_add_metadata_old
(
call
,
metadata
,
flags
);
}
GPR_EXPORT
grpc_call_error
GPR_CALLTYPE
grpcsharp_call_invoke_old
(
grpc_call
*
call
,
grpc_completion_queue
*
cq
,
void
*
metadata_read_tag
,
void
*
finished_tag
,
gpr_uint32
flags
)
{
return
grpc_call_invoke_old
(
call
,
cq
,
metadata_read_tag
,
finished_tag
,
flags
);
}
GPR_EXPORT
grpc_call_error
GPR_CALLTYPE
grpcsharp_call_server_accept_old
(
grpc_call
*
call
,
grpc_completion_queue
*
cq
,
void
*
finished_tag
)
{
return
grpc_call_server_accept_old
(
call
,
cq
,
finished_tag
);
}
GPR_EXPORT
grpc_call_error
GPR_CALLTYPE
grpcsharp_call_server_end_initial_metadata_old
(
grpc_call
*
call
,
gpr_uint32
flags
)
{
return
grpc_call_server_end_initial_metadata_old
(
call
,
flags
);
}
GPR_EXPORT
grpc_call_error
GPR_CALLTYPE
grpcsharp_call_cancel
(
grpc_call
*
call
)
{
return
grpc_call_cancel
(
call
);
}
...
...
@@ -415,30 +283,6 @@ grpcsharp_call_cancel_with_status(grpc_call *call, grpc_status_code status,
return
grpc_call_cancel_with_status
(
call
,
status
,
description
);
}
GPR_EXPORT
grpc_call_error
GPR_CALLTYPE
grpcsharp_call_start_write_old
(
grpc_call
*
call
,
grpc_byte_buffer
*
byte_buffer
,
void
*
tag
,
gpr_uint32
flags
)
{
return
grpc_call_start_write_old
(
call
,
byte_buffer
,
tag
,
flags
);
}
GPR_EXPORT
grpc_call_error
GPR_CALLTYPE
grpcsharp_call_start_write_status_old
(
grpc_call
*
call
,
grpc_status_code
status_code
,
const
char
*
status_message
,
void
*
tag
)
{
return
grpc_call_start_write_status_old
(
call
,
status_code
,
status_message
,
tag
);
}
GPR_EXPORT
grpc_call_error
GPR_CALLTYPE
grpcsharp_call_writes_done_old
(
grpc_call
*
call
,
void
*
tag
)
{
return
grpc_call_writes_done_old
(
call
,
tag
);
}
GPR_EXPORT
grpc_call_error
GPR_CALLTYPE
grpcsharp_call_start_read_old
(
grpc_call
*
call
,
void
*
tag
)
{
return
grpc_call_start_read_old
(
call
,
tag
);
}
GPR_EXPORT
void
GPR_CALLTYPE
grpcsharp_call_destroy
(
grpc_call
*
call
)
{
grpc_call_destroy
(
call
);
}
...
...
@@ -453,48 +297,6 @@ grpcsharp_call_start_write_from_copied_buffer(grpc_call *call,
grpc_byte_buffer_destroy
(
byte_buffer
);
}
/* Server */
GPR_EXPORT
grpc_call_error
GPR_CALLTYPE
grpcsharp_server_request_call_old
(
grpc_server
*
server
,
void
*
tag_new
)
{
return
grpc_server_request_call_old
(
server
,
tag_new
);
}
GPR_EXPORT
grpc_server
*
GPR_CALLTYPE
grpcsharp_server_create
(
grpc_completion_queue
*
cq
,
const
grpc_channel_args
*
args
)
{
return
grpc_server_create
(
cq
,
args
);
}
GPR_EXPORT
int
GPR_CALLTYPE
grpcsharp_server_add_http2_port
(
grpc_server
*
server
,
const
char
*
addr
)
{
return
grpc_server_add_http2_port
(
server
,
addr
);
}
GPR_EXPORT
int
GPR_CALLTYPE
grpcsharp_server_add_secure_http2_port
(
grpc_server
*
server
,
const
char
*
addr
)
{
return
grpc_server_add_secure_http2_port
(
server
,
addr
);
}
GPR_EXPORT
void
GPR_CALLTYPE
grpcsharp_server_start
(
grpc_server
*
server
)
{
grpc_server_start
(
server
);
}
GPR_EXPORT
void
GPR_CALLTYPE
grpcsharp_server_shutdown
(
grpc_server
*
server
)
{
grpc_server_shutdown
(
server
);
}
GPR_EXPORT
void
GPR_CALLTYPE
grpcsharp_server_shutdown_and_notify
(
grpc_server
*
server
,
void
*
tag
)
{
grpc_server_shutdown_and_notify
(
server
,
tag
);
}
GPR_EXPORT
void
GPR_CALLTYPE
grpcsharp_server_destroy
(
grpc_server
*
server
)
{
grpc_server_destroy
(
server
);
}
/* New API Experiments */
GPR_EXPORT
grpc_call_error
GPR_CALLTYPE
grpcsharp_call_start_unary
(
grpc_call
*
call
,
callback_funcptr
callback
,
const
char
*
send_buffer
,
size_t
send_buffer_len
)
{
...
...
@@ -692,6 +494,40 @@ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_start_serverside(grpc_cal
return
grpc_call_start_batch
(
call
,
ops
,
sizeof
(
ops
)
/
sizeof
(
ops
[
0
]),
ctx
);
}
/* Server */
GPR_EXPORT
grpc_server
*
GPR_CALLTYPE
grpcsharp_server_create
(
grpc_completion_queue
*
cq
,
const
grpc_channel_args
*
args
)
{
return
grpc_server_create
(
cq
,
args
);
}
GPR_EXPORT
int
GPR_CALLTYPE
grpcsharp_server_add_http2_port
(
grpc_server
*
server
,
const
char
*
addr
)
{
return
grpc_server_add_http2_port
(
server
,
addr
);
}
GPR_EXPORT
int
GPR_CALLTYPE
grpcsharp_server_add_secure_http2_port
(
grpc_server
*
server
,
const
char
*
addr
)
{
return
grpc_server_add_secure_http2_port
(
server
,
addr
);
}
GPR_EXPORT
void
GPR_CALLTYPE
grpcsharp_server_start
(
grpc_server
*
server
)
{
grpc_server_start
(
server
);
}
GPR_EXPORT
void
GPR_CALLTYPE
grpcsharp_server_shutdown
(
grpc_server
*
server
)
{
grpc_server_shutdown
(
server
);
}
GPR_EXPORT
void
GPR_CALLTYPE
grpcsharp_server_shutdown_and_notify
(
grpc_server
*
server
,
void
*
tag
)
{
grpc_server_shutdown_and_notify
(
server
,
tag
);
}
GPR_EXPORT
void
GPR_CALLTYPE
grpcsharp_server_destroy
(
grpc_server
*
server
)
{
grpc_server_destroy
(
server
);
}
GPR_EXPORT
grpc_call_error
GPR_CALLTYPE
grpcsharp_server_request_call
(
grpc_server
*
server
,
grpc_completion_queue
*
cq
,
callback_funcptr
callback
)
{
...
...
@@ -704,7 +540,3 @@ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_server_request_call(grpc_serve
&
(
ctx
->
server_rpc_new
.
request_metadata
),
cq
,
ctx
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment