19 #ifndef MIR_CLIENT_CONNECTION_H 20 #define MIR_CLIENT_CONNECTION_H 22 #include <mir_toolkit/mir_connection.h> 37 Connection() =
default;
38 explicit Connection(MirConnection* connection) : self{connection, deleter} {}
40 operator MirConnection*()
const {
return self.get(); }
42 void reset() {
self.reset(); }
45 static void deleter(MirConnection* connection) { mir_connection_release(connection); }
46 std::shared_ptr<MirConnection>
self;
50 void mir_connection_release(Connection
const& connection) =
delete;
54 #endif //MIR_CLIENT_CONNECTION_H