Files
aqhomecontrol/aqhome/ipc/msg_ipc_result.h

44 lines
1.3 KiB
C

/****************************************************************************
* This file is part of the project AqHome.
* AqHome (c) by 2023 Martin Preuss, all rights reserved.
*
* The license for this file can be found in the file COPYING which you
* should have received along with this file.
****************************************************************************/
#ifndef AQH_MSG_IPC_RESULT_H
#define AQH_MSG_IPC_RESULT_H
#include <aqhome/api.h>
#include <aqhome/ipc/nodes/ipc_nodes.h>
#include <aqhome/msg/msg_node.h>
#include <gwenhywfar/msg.h>
#include <gwenhywfar/buffer.h>
#define AQH_IPC_PROTOCOL_RESULT_ID 0
#define AQH_IPC_PROTOCOL_RESULT_VERSION 1
#define AQH_MSG_IPC_SUCCESS 0
#define AQH_MSG_IPC_ERROR_GENERIC 1
#define AQH_MSG_IPC_ERROR_INVALID 2
#define AQH_MSG_IPC_ERROR_EXISTS 3
#define AQH_MSG_IPC_ERROR_NODATA 4
#define AQH_MSG_IPC_ERROR_BADDATA 5
#define AQH_MSG_IPC_ERROR_PERMS 6
#define AQH_MSG_IPC_ERROR_NOTFOUND 7
AQHOME_API GWEN_MSG *AQH_ResultIpcMsg_new(uint16_t code, uint32_t msgId, uint32_t refMsgId, uint32_t resultCode);
AQHOME_API uint32_t AQH_ResultIpcMsg_GetResultCode(const GWEN_MSG *msg);
AQHOME_API void AQH_ResultIpcMsg_DumpToBuffer(const GWEN_MSG *msg, GWEN_BUFFER *dbuf, const char *sText);
#endif