From 1ae51ff94d0f1f27a4e4cc657371578db13c3ca1 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 8 Feb 2019 20:26:14 +0100 Subject: Make code compile again (fix bitrot dating back from 2013). --- src/message.h | 103 ++++++++++++++++++++++++++++++---------------------------- 1 file changed, 54 insertions(+), 49 deletions(-) (limited to 'src/message.h') diff --git a/src/message.h b/src/message.h index 6e1804d..ea1c444 100644 --- a/src/message.h +++ b/src/message.h @@ -25,81 +25,86 @@ * along with Munia; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifndef __MUNIA_MESSAGE_H__ -#define __MUNIA_MESSAGE_H__ +#pragma once #include #include #include "task.h" -namespace cmd { - typedef enum { - observe, - unobserve, - update, - move, - create, - remove, - login, - logout, - error, - } cmd_t; +namespace cmd +{ +typedef enum { + observe, + unobserve, + update, + move, + create, + remove, + login, + logout, + error, +} cmd_t; }; -typedef struct { - std::string user; - std::string password; +typedef struct +{ + std::string user; + std::string password; } login_t; -typedef struct { - taskid_t id; +typedef struct +{ + taskid_t id; } observe_t; -typedef struct { - taskid_t id; +typedef struct +{ + taskid_t id; } unobserve_t; -typedef struct { - taskid_t id; - taskid_t parentid; +typedef struct +{ + taskid_t id; + taskid_t parentid; } create_t; -typedef struct { - taskid_t id; +typedef struct +{ + taskid_t id; } remove_t; -typedef struct { - taskid_t id; - taskid_t parentid; +typedef struct +{ + taskid_t id; + taskid_t parentid; } move_t; -typedef struct { - taskid_t id; - std::string name; - std::string value; +typedef struct +{ + taskid_t id; + std::string name; + std::string value; } update_t; -typedef struct { - cmd::cmd_t cmd; +typedef struct +{ + cmd::cmd_t cmd; - observe_t observe; - unobserve_t unobserve; - create_t create; - remove_t remove; - move_t move; - update_t update; - login_t login; + observe_t observe; + unobserve_t unobserve; + create_t create; + remove_t remove; + move_t move; + update_t update; + login_t login; - TaskIdList nodes; + TaskIdList nodes; - // tagret node id (observed task id) used for transmissions only. - taskid_t tid; - -} message_t; + // tagret node id (observed task id) used for transmissions only. + taskid_t tid; +} message_t; typedef std::list MessageList; - -#endif/*__MUNIA_MESSAGE_H__*/ -- cgit v1.2.3