-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RSDK-9556 Forward declarations for grpc Client stuff #341
Merged
Merged
Changes from 24 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
6bd64aa
update response metadata and timestamp/duration
lia-viam c245126
Merge branch 'main' of github.com:viamrobotics/viam-cpp-sdk into misc…
lia-viam 7c76e43
insulate grpc client context
lia-viam 0729e87
clean up resource_manager includes
lia-viam 73aa00d
name to/from
lia-viam 75d6d3a
class to struct
lia-viam 1d26302
insulate resource and utils
lia-viam 2fa362f
symmetric ws
lia-viam 924bd86
remove spurious ret
lia-viam ecf734b
formatting and defaulted ctors
lia-viam c768df8
de-insulate grpc client context
lia-viam 6a2710f
Merge branch 'main' into misc-proto-update
lia-viam b18f477
put grpc includes back
lia-viam a20fb42
generate header for grpc client fwd
lia-viam c223260
use add
lia-viam 557eefe
Merge branch 'misc-proto-update' into client-fwd
lia-viam 6978fdf
use explicit ctor/assign
lia-viam f59997f
initialize unique_ptr
lia-viam 7d26e94
Merge branch 'misc-proto-update' into client-fwd
lia-viam 772efcb
client context out of utils
lia-viam fc38fff
commit configure input file
lia-viam de2c1ef
Merge branch 'main' of github.com:viamrobotics/viam-cpp-sdk into clie…
lia-viam 0262a08
use the typedef
lia-viam 77f060c
use client reader fwd
lia-viam 66b3b30
fix installation of generated file
lia-viam aa531ec
Merge branch 'main' into client-fwd
lia-viam File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#pragma once | ||
|
||
#cmakedefine VIAMCPPSDK_GRPCXX_LEGACY_CLIENT_FWD | ||
|
||
#ifndef VIAMCPPSDK_GRPCXX_LEGACY_CLIENT_FWD | ||
|
||
// Forward declaration file for grpc ClientContext and ClientReaderInterface<T>. | ||
// This file provides includes for recent (>= 1.32.0) versions of grpc. | ||
|
||
namespace grpc { | ||
|
||
class ClientContext; | ||
|
||
template <typename> | ||
class ClientReaderInterface; | ||
|
||
} // namespace grpc | ||
|
||
namespace viam { | ||
namespace sdk { | ||
|
||
using GrpcClientContext = ::grpc::ClientContext; | ||
|
||
template <typename T> | ||
using GrpcClientReaderInterface = ::grpc::ClientReaderInterface<T>; | ||
|
||
} // namespace sdk | ||
} // namespace viam | ||
|
||
#else | ||
|
||
// Forward declaration file for grpc ClientContext and ClientReaderInterface<T>. | ||
// This file provides includes for the oldest supported versions of grpc (< 1.32.0). | ||
|
||
namespace grpc_impl { | ||
|
||
class ClientContext; | ||
|
||
template <typename> | ||
class ClientReaderInterface; | ||
|
||
} // namespace grpc_impl | ||
|
||
namespace viam { | ||
namespace sdk { | ||
|
||
using GrpcClientContext = ::grpc_impl::ClientContext; | ||
|
||
template <typename T> | ||
using GrpcClientReaderInterface = ::grpc_impl::ClientReaderInterface<T>; | ||
|
||
} // namespace sdk | ||
} // namespace viam | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(q) why is the namespace
grpc
here butgrpc_impl
in theelse
case below?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In recent versions of grpc the classes are defined in
namespace grpc
, but in the oldest two versions we support the class definitions are innamespace grpc_impl
andtypedef
'd intonamespace grpc
, which is incompatible with forward declaring the classes innamespace grpc