~raof/mir/provide-event-fd

« back to all changes in this revision

Viewing changes to src/client/rpc/make_rpc_channel.h

  • Committer: Christopher James Halse Rogers
  • Date: 2015-05-13 04:32:32 UTC
  • Revision ID: christopher.halse.rogers@canonical.com-20150513043232-ehdsuwokd7ys1d4w
Make MirBasicRpcChannel the lowest-common-denominator type.

Rather than dynamic_cast<>ing in multiple places, just return a MirBasicRpcChannel
from ConnectionConfiguration and ensure that MirBasicRpcChannel provides all the
interfaces the code needs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
#include <memory>
22
22
 
23
 
namespace google { namespace protobuf { class RpcChannel; } }
24
 
 
25
23
namespace mir
26
24
{
27
25
namespace client
34
32
namespace rpc
35
33
{
36
34
class RpcReport;
 
35
class MirBasicRpcChannel;
37
36
 
38
 
std::shared_ptr<google::protobuf::RpcChannel>
 
37
std::shared_ptr<MirBasicRpcChannel>
39
38
make_rpc_channel(std::string const& name,
40
39
                 std::shared_ptr<SurfaceMap> const& map,
41
40
                 std::shared_ptr<DisplayConfiguration> const& disp_conf,