@@ -171,7 +171,7 @@ std::string get_socketpath() {
171171}
172172
173173
174- I3Connection::I3Connection (const std::string& socket_path) : m_main_socket(i3_connect(socket_path)), m_event_socket(-1 ), m_subscriptions(0 ), m_socket_path(socket_path) {
174+ connection::connection (const std::string& socket_path) : m_main_socket(i3_connect(socket_path)), m_event_socket(-1 ), m_subscriptions(0 ), m_socket_path(socket_path) {
175175#define i3IPC_TYPE_STR " i3's event"
176176 signal_event.connect ([this ](EventType event_type, const std::shared_ptr<const buf_t >& buf) {
177177 switch (event_type) {
@@ -240,18 +240,18 @@ I3Connection::I3Connection(const std::string& socket_path) : m_main_socket(i3_c
240240 });
241241#undef i3IPC_TYPE_STR
242242}
243- I3Connection ::~I3Connection () {
243+ connection ::~connection () {
244244 i3_disconnect (m_main_socket);
245245 if (m_event_socket > 0 )
246246 i3_disconnect (m_event_socket);
247247}
248248
249249
250- void I3Connection ::prepare_to_event_handling () {
250+ void connection ::prepare_to_event_handling () {
251251 m_event_socket = i3_connect (m_socket_path);
252252 this ->subscribe (m_subscriptions);
253253}
254- void I3Connection ::handle_event () {
254+ void connection ::handle_event () {
255255 if (m_event_socket <= 0 ) {
256256 throw std::runtime_error (" event_socket_fd <= 0" );
257257 }
@@ -261,7 +261,7 @@ void I3Connection::handle_event() {
261261}
262262
263263
264- bool I3Connection ::subscribe (const int32_t events) {
264+ bool connection ::subscribe (const int32_t events) {
265265#define i3IPC_TYPE_STR " SUBSCRIBE"
266266 if (m_event_socket <= 0 ) {
267267 m_subscriptions |= events;
@@ -304,7 +304,7 @@ bool I3Connection::subscribe(const int32_t events) {
304304}
305305
306306
307- version_t I3Connection ::get_version () const {
307+ version_t connection ::get_version () const {
308308#define i3IPC_TYPE_STR " GET_VERSION"
309309 auto buf = i3_msg (m_main_socket, ClientMessageType::GET_VERSION);
310310 Json::Value root;
@@ -322,7 +322,7 @@ version_t I3Connection::get_version() const {
322322}
323323
324324
325- std::shared_ptr<container_t > I3Connection ::get_tree () const {
325+ std::shared_ptr<container_t > connection ::get_tree () const {
326326#define i3IPC_TYPE_STR " GET_TREE"
327327 auto buf = i3_msg (m_main_socket, ClientMessageType::GET_TREE);
328328 Json::Value root;
@@ -332,7 +332,7 @@ std::shared_ptr<container_t> I3Connection::get_tree() const {
332332}
333333
334334
335- std::vector<output_t > I3Connection ::get_outputs () const {
335+ std::vector<output_t > connection ::get_outputs () const {
336336#define i3IPC_TYPE_STR " GET_OUTPUTS"
337337 auto buf = i3_msg (m_main_socket, ClientMessageType::GET_OUTPUTS);
338338 Json::Value root;
@@ -350,7 +350,7 @@ std::vector<output_t> I3Connection::get_outputs() const {
350350}
351351
352352
353- std::vector<workspace_t > I3Connection ::get_workspaces () const {
353+ std::vector<workspace_t > connection ::get_workspaces () const {
354354#define i3IPC_TYPE_STR " GET_WORKSPACES"
355355 auto buf = i3_msg (m_main_socket, ClientMessageType::GET_WORKSPACES);
356356 Json::Value root;
@@ -368,7 +368,7 @@ std::vector<workspace_t> I3Connection::get_workspaces() const {
368368}
369369
370370
371- bool I3Connection ::send_command (const std::string& command) const {
371+ bool connection ::send_command (const std::string& command) const {
372372#define i3IPC_TYPE_STR " COMMAND"
373373 auto buf = i3_msg (m_main_socket, ClientMessageType::COMMAND, command);
374374 Json::Value root;
0 commit comments