aqhome: make datafile a virtual class. Add datafile_direct.
this is to allow for cached data file handling later.
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include "aqhome/data/storage_p.h"
|
||||
#include "aqhome/data/storage_readxml.h"
|
||||
#include "aqhome/data/storage_writexml.h"
|
||||
#include "aqhome/data/datafile_direct.h"
|
||||
|
||||
#include <gwenhywfar/debug.h>
|
||||
#include <gwenhywfar/xml.h>
|
||||
@@ -353,7 +354,7 @@ int AQH_Storage_Fini(AQH_STORAGE *sto)
|
||||
AQH_DataFile_List_Del(df);
|
||||
rv=AQH_DataFile_Close(df);
|
||||
if (rv<0) {
|
||||
DBG_INFO(AQH_LOGDOMAIN, "Error closing file \"%s\"", AQH_DataFile_GetFileName(df));
|
||||
DBG_INFO(AQH_LOGDOMAIN, "Error closing file \"%lu\"", AQH_DataFile_GetValueId(df));
|
||||
errors++;
|
||||
}
|
||||
AQH_DataFile_free(df);
|
||||
@@ -625,7 +626,7 @@ AQH_DATAFILE *_openOrCreateDataFileByValueId(AQH_STORAGE *sto, uint64_t valueId)
|
||||
int rv;
|
||||
|
||||
nameBuf=_getDataFilePathForValueId(sto, valueId);
|
||||
df=AQH_DataFile_new(GWEN_Buffer_GetStart(nameBuf), valueId);
|
||||
df=AQH_DataFileDirect_new(GWEN_Buffer_GetStart(nameBuf), valueId);
|
||||
|
||||
rv=GWEN_Directory_GetPath(GWEN_Buffer_GetStart(nameBuf),
|
||||
GWEN_PATH_FLAGS_CHECKROOT |
|
||||
|
||||
Reference in New Issue
Block a user