Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
mir_connection_api.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2014 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser General Public License version 3,
6  * as published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com>
17  */
18 
19 #ifndef MIR_CLIENT_MIR_CONNECTION_API_H_
20 #define MIR_CLIENT_MIR_CONNECTION_API_H_
21 
22 #include "mir_toolkit/mir_wait.h"
23 
24 #include <string>
25 #include <memory>
26 
27 namespace mir
28 {
29 namespace client
30 {
31 class ConnectionConfiguration;
32 
34 {
35 public:
36  virtual ~MirConnectionAPI() = default;
37 
38  virtual MirWaitHandle* connect(
39  char const* socket_file,
40  char const* name,
41  mir_connected_callback callback,
42  void* context) = 0;
43 
44  virtual void release(MirConnection* connection) = 0;
45 
46  virtual std::unique_ptr<ConnectionConfiguration> configuration(std::string const& socket) = 0;
47 
48 protected:
49  MirConnectionAPI() = default;
50  MirConnectionAPI(MirConnectionAPI const&) = default;
51  MirConnectionAPI& operator=(MirConnectionAPI const&) = default;
52 };
53 
54 }
55 }
56 
58 
59 #endif
All things Mir.
Definition: aging_buffer.h:24
void(* mir_connected_callback)(MirConnection *connection, void *client_context)
Callback to be passed when issuing a mir_connect request.
Definition: client_types.h:64
mir::client::MirConnectionAPI * mir_connection_api_impl
Definition: mir_connection_api.h:57
virtual void release(MirConnection *connection)=0
Definition: mir_wait_handle.h:31
virtual ~MirConnectionAPI()=default
virtual MirWaitHandle * connect(char const *socket_file, char const *name, mir_connected_callback callback, void *context)=0
MirConnectionAPI & operator=(MirConnectionAPI const &)=default
Definition: mir_connection.h:72
Definition: mir_connection_api.h:33
virtual std::unique_ptr< ConnectionConfiguration > configuration(std::string const &socket)=0

Copyright © 2012,2013 Canonical Ltd.
Generated on Fri Oct 10 14:07:14 UTC 2014