// // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.6.2 // - protoc v7.34.1 // source: org/signal/chat/calling.proto package calling import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.64.0 or later. const _ = grpc.SupportPackageIsVersion9 const ( Calling_GetCallingRelays_FullMethodName = "/org.signal.chat.calling.Calling/GetCallingRelays" ) // CallingClient is the client API for Calling service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. // // Provides methods for getting credentials and relay options for one-on-one // calls. type CallingClient interface { // Retrieves TURN credentials and relay options for one-on-one calls. GetCallingRelays(ctx context.Context, in *GetCallingRelaysRequest, opts ...grpc.CallOption) (*GetCallingRelaysResponse, error) } type callingClient struct { cc grpc.ClientConnInterface } func NewCallingClient(cc grpc.ClientConnInterface) CallingClient { return &callingClient{cc} } func (c *callingClient) GetCallingRelays(ctx context.Context, in *GetCallingRelaysRequest, opts ...grpc.CallOption) (*GetCallingRelaysResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetCallingRelaysResponse) err := c.cc.Invoke(ctx, Calling_GetCallingRelays_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // CallingServer is the server API for Calling service. // All implementations must embed UnimplementedCallingServer // for forward compatibility. // // Provides methods for getting credentials and relay options for one-on-one // calls. type CallingServer interface { // Retrieves TURN credentials and relay options for one-on-one calls. GetCallingRelays(context.Context, *GetCallingRelaysRequest) (*GetCallingRelaysResponse, error) mustEmbedUnimplementedCallingServer() } // UnimplementedCallingServer must be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedCallingServer struct{} func (UnimplementedCallingServer) GetCallingRelays(context.Context, *GetCallingRelaysRequest) (*GetCallingRelaysResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetCallingRelays not implemented") } func (UnimplementedCallingServer) mustEmbedUnimplementedCallingServer() {} func (UnimplementedCallingServer) testEmbeddedByValue() {} // UnsafeCallingServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to CallingServer will // result in compilation errors. type UnsafeCallingServer interface { mustEmbedUnimplementedCallingServer() } func RegisterCallingServer(s grpc.ServiceRegistrar, srv CallingServer) { // If the following call panics, it indicates UnimplementedCallingServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { t.testEmbeddedByValue() } s.RegisterService(&Calling_ServiceDesc, srv) } func _Calling_GetCallingRelays_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetCallingRelaysRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CallingServer).GetCallingRelays(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Calling_GetCallingRelays_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CallingServer).GetCallingRelays(ctx, req.(*GetCallingRelaysRequest)) } return interceptor(ctx, in, info, handler) } // Calling_ServiceDesc is the grpc.ServiceDesc for Calling service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Calling_ServiceDesc = grpc.ServiceDesc{ ServiceName: "org.signal.chat.calling.Calling", HandlerType: (*CallingServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetCallingRelays", Handler: _Calling_GetCallingRelays_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "org/signal/chat/calling.proto", }