Files
aqhomecontrol/aqhome/events2/fdobject.h
2025-01-09 01:42:19 +01:00

39 lines
975 B
C

/****************************************************************************
* This file is part of the project Gwenhywfar.
* Gwenhywfar (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_FDOBJECT_H
#define AQH_FDOBJECT_H
#include <aqhome/events2/object.h>
enum {
AQH_FDOBJECT_FDMODE_READ=1,
AQH_FDOBJECT_FDMODE_WRITE
};
enum {
AQH_FDOBJECT_SIGNAL_ISREADY=AQH_OBJECT_SIGNAL_LAST
};
AQHOME_API AQH_OBJECT *AQH_FdObject_new(AQH_EVENT_LOOP *eventLoop, int fd, int mode);
AQHOME_API int AQH_FdObject_GetFdMode(const AQH_OBJECT *o);
AQHOME_API void AQH_FdObject_SetFdMode(AQH_OBJECT *o, int i);
AQHOME_API int AQH_FdObject_GetFd(const AQH_OBJECT *o);
AQHOME_API int AQH_FdObject_Read(AQH_OBJECT *o, uint8_t *ptrBuffer, uint32_t lenBuffer);
#endif