aqhome: more work on transformation to event2/ipc2.
This commit is contained in:
59
apps/aqhome-data/server.h
Normal file
59
apps/aqhome-data/server.h
Normal file
@@ -0,0 +1,59 @@
|
||||
/****************************************************************************
|
||||
* This file is part of the project AqHome.
|
||||
* AqHome (c) by 2025 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 AQHOME_DATA_SERVER_H
|
||||
#define AQHOME_DATA_SERVER_H
|
||||
|
||||
|
||||
#include <aqhome/data/storage.h>
|
||||
#include <aqhome/events2/object.h>
|
||||
#include <aqhome/ipc2/msgrequest.h>
|
||||
|
||||
|
||||
#define AQH_ENDPOINT_FLAGS_WANTUPDATES 0x0001
|
||||
|
||||
#define AQH_ENDPOINT_PERMS_LISTVALUES 0x0001
|
||||
#define AQH_ENDPOINT_PERMS_READVALUE 0x0002
|
||||
#define AQH_ENDPOINT_PERMS_ADDVALUE 0x0004
|
||||
|
||||
#define AQH_ENDPOINT_PERMS_LISTDATA 0x0010
|
||||
#define AQH_ENDPOINT_PERMS_READDATA 0x0020
|
||||
#define AQH_ENDPOINT_PERMS_ADDDATA 0x0040
|
||||
#define AQH_ENDPOINT_PERMS_SETDATA 0x0080
|
||||
|
||||
#define AQH_ENDPOINT_PERMS_LISTDEVICES 0x0100
|
||||
#define AQH_ENDPOINT_PERMS_READDEVICE 0x0200
|
||||
#define AQH_ENDPOINT_PERMS_ADDDEVICE 0x0400
|
||||
#define AQH_ENDPOINT_PERMS_MODDEVICE 0x0800
|
||||
|
||||
|
||||
|
||||
AQH_OBJECT *AqHomeDataServer_new(AQH_EVENT_LOOP *eventLoop);
|
||||
int AqHomeDataServer_Init(AQH_OBJECT *o, int argc, char **argv);
|
||||
|
||||
int AqHomeDataServer_GetTimeout(const AQH_OBJECT *o);
|
||||
int AqHomeDataServer_GetClientNum(const AQH_OBJECT *o);
|
||||
|
||||
|
||||
void AqHomeDataServer_CleanupClients(AQH_OBJECT *o);
|
||||
void AqHomeDataServer_HandleClientMsgs(AQH_OBJECT *o);
|
||||
|
||||
AQH_MSG_REQUEST *AqHomeDataServer_GetRequestTree(const AQH_OBJECT *o);
|
||||
void AqHomeDataServer_AddRequestToTree(AQH_OBJECT *o, AQH_MSG_REQUEST *rq);
|
||||
void AqHomeDataServer_CleanupRequests(AQH_OBJECT *o);
|
||||
|
||||
int AqHomeDataServer_LockStorage(AQH_OBJECT *o);
|
||||
int AqHomeDataServer_UnlockStorage(AQH_OBJECT *o);
|
||||
int AqHomeDataServer_WriteStorageIfChanged(AQH_OBJECT *o);
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user