Mir
Public Member Functions | List of all members
mir::client::rpc::MirProtobufRpcChannel Class Reference

#include <mir_protobuf_rpc_channel.h>

Inheritance diagram for mir::client::rpc::MirProtobufRpcChannel:
[legend]

Public Member Functions

 MirProtobufRpcChannel (std::unique_ptr< StreamTransport > transport, std::shared_ptr< SurfaceMap > const &surface_map, std::shared_ptr< DisplayConfiguration > const &disp_config, std::shared_ptr< RpcReport > const &rpc_report, std::shared_ptr< LifecycleControl > const &lifecycle_control, std::shared_ptr< EventSink > const &event_sink)
 
 ~MirProtobufRpcChannel ()=default
 
void on_data_available () override
 Called by the Transport when data is available for reading. More...
 
void on_disconnected () override
 Called by the Transport when the connection to the server has been broken. More...
 
Fd watch_fd () const override
 Get a poll()able file descriptor. More...
 
bool dispatch (mir::dispatch::FdEvents events) override
 Dispatch one pending event. More...
 
mir::dispatch::FdEvents relevant_events () const override
 The set of file-descriptor events this Dispatchable handles. More...
 
- Public Member Functions inherited from mir::client::rpc::MirBasicRpcChannel
 MirBasicRpcChannel ()
 
 ~MirBasicRpcChannel ()
 
- Public Member Functions inherited from mir::client::rpc::StreamTransport::Observer
 Observer ()=default
 
virtual ~Observer ()=default
 
 Observer (Observer const &)=delete
 
Observeroperator= (Observer const &)=delete
 
- Public Member Functions inherited from mir::dispatch::Dispatchable
 Dispatchable ()=default
 
virtual ~Dispatchable ()=default
 
Dispatchableoperator= (Dispatchable const &)=delete
 
 Dispatchable (Dispatchable const &)=delete
 

Additional Inherited Members

- Protected Member Functions inherited from mir::client::rpc::MirBasicRpcChannel
mir::protobuf::wire::Invocation invocation_for (google::protobuf::MethodDescriptor const *method, google::protobuf::Message const *request, size_t num_side_channel_fds)
 
int next_id ()
 

Constructor & Destructor Documentation

mir::client::rpc::MirProtobufRpcChannel::MirProtobufRpcChannel ( std::unique_ptr< StreamTransport transport,
std::shared_ptr< SurfaceMap > const &  surface_map,
std::shared_ptr< DisplayConfiguration > const &  disp_config,
std::shared_ptr< RpcReport > const &  rpc_report,
std::shared_ptr< LifecycleControl > const &  lifecycle_control,
std::shared_ptr< EventSink > const &  event_sink 
)
mir::client::rpc::MirProtobufRpcChannel::~MirProtobufRpcChannel ( )
default

Member Function Documentation

bool mir::client::rpc::MirProtobufRpcChannel::dispatch ( mir::dispatch::FdEvents  events)
overridevirtual

Dispatch one pending event.

Parameters
[in]eventThe set of events current on the file-descriptor
Returns
False iff no more events will be produced by this Dispatchable. Dispatch should no longer be called.
Note
This will dispatch at most one event. If there are multiple events specified in event (eg: readable | remote_closed) then dispatch will process only one.
It is harmless to call dispatch() with an event that does not contain any of the events from relevant_events(). The function will do nothing in such a case.
An implementation of dispatch() MUST handle FdEvent::error, if only to return false and terminate further event dispatch.

Implements mir::dispatch::Dispatchable.

void mir::client::rpc::MirProtobufRpcChannel::on_data_available ( )
overridevirtual

Called by the Transport when data is available for reading.

Implements mir::client::rpc::StreamTransport::Observer.

void mir::client::rpc::MirProtobufRpcChannel::on_disconnected ( )
overridevirtual

Called by the Transport when the connection to the server has been broken.

Note
This is not guaranteed to be triggered exactly once; it may not fire during destruction of the Transport, or it may fire multiple times.

Implements mir::client::rpc::StreamTransport::Observer.

md::FdEvents mir::client::rpc::MirProtobufRpcChannel::relevant_events ( ) const
overridevirtual

The set of file-descriptor events this Dispatchable handles.

Implements mir::dispatch::Dispatchable.

mir::Fd mir::client::rpc::MirProtobufRpcChannel::watch_fd ( ) const
overridevirtual

Get a poll()able file descriptor.

Returns
A file descriptor usable with poll() or equivalent function calls. relevant_events() contains the set of event types to watch for.

Implements mir::dispatch::Dispatchable.


The documentation for this class was generated from the following files:

Copyright © 2012,2013 Canonical Ltd.
Generated on Tue Mar 24 16:15:19 UTC 2015