-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
55 additions
and
0 deletions.
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
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 |