/****************************************************************************
 * 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 AQHOME_STORAGE_U_OBJECTS_P_H
#define AQHOME_STORAGE_U_OBJECTS_P_H


#include "./u_objects.h"

#include <gwenhywfar/stringlist.h>


typedef struct AQH_URLHANDLER_OBJECTS AQH_URLHANDLER_OBJECTS;
struct AQH_URLHANDLER_OBJECTS {
  uint32_t neededPermsList;
  uint32_t neededPermsAdd;
  uint32_t neededPermsDel;
  uint32_t neededPermsEdit; /* e.g. AQHOME_HTTP_PERMS_EDIT_ROOM */

  char *urlForObjectList;

  AQH_OBJECTSHTTPURLHANDLER_ADDOREDITOBJECT_FN addOrEditObjectFn;
  AQH_OBJECTSHTTPURLHANDLER_FINDOBJECTBYIDANDRETURNASDB_FN findObjectByIdAndReturnAsDbFn;
  AQH_OBJECTSHTTPURLHANDLER_WRITEADDPAGE_FN writeAddPageFn;
  AQH_OBJECTSHTTPURLHANDLER_WRITEEDITPAGE_FN writeEditPageFn;
  AQH_OBJECTSHTTPURLHANDLER_LISTOBJECTSINTOBUFFER_FN listObjectsIntoBufferFn;
};


#endif


