summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorDisch, Simon <Simon.Disch@xse.de>2015-02-24 15:03:45 +0100
committerDisch, Simon <Simon.Disch@xse.de>2015-02-24 15:03:45 +0100
commit53b0ea706358f87b1c7fa63659b3b2799448f510 (patch)
treefda0d16878405a6ef408a31e681f2f017ca13f25 /inc
parent62b1fadc6711a7152961086d92d1ef4d876768b2 (diff)
downloadpersistence-common-object-53b0ea706358f87b1c7fa63659b3b2799448f510.tar.gz
latest version of key-value-store (updated database structure, using mmap for database access, added recovery mechanism)
Diffstat (limited to 'inc')
-rw-r--r--inc/protected/persComDbAccess.h11
-rw-r--r--inc/protected/persComErrors.h2
2 files changed, 11 insertions, 2 deletions
diff --git a/inc/protected/persComDbAccess.h b/inc/protected/persComDbAccess.h
index 0a169fd..2b79640 100644
--- a/inc/protected/persComDbAccess.h
+++ b/inc/protected/persComDbAccess.h
@@ -44,14 +44,21 @@ extern "C"
*/
/* maximum data size for a key type resourceID */
#define PERS_DB_MAX_LENGTH_KEY_NAME 128 /**< Max. length of the key identifier */
-#define PERS_DB_MAX_SIZE_KEY_DATA 16384 /**< Max. size of the key entry (slot definition) */
-/** \} */
+#define PERS_DB_MAX_SIZE_KEY_DATA 8028 /**< Max. size of the key entry (slot definition) */
+/** \} */
/** \defgroup PERS_DB_ACCESS_FUNCTIONS Functions
* \{
*/
+ /**
+ * \brief returns the max DB key data size
+ *
+ * \return the size
+ */
+int persComDbgetMaxKeyValueSize(void);
+
/**
* \brief Obtain a handler to DB indicated by dbPathname
diff --git a/inc/protected/persComErrors.h b/inc/protected/persComErrors.h
index ca447bb..34bf729 100644
--- a/inc/protected/persComErrors.h
+++ b/inc/protected/persComErrors.h
@@ -55,6 +55,8 @@ extern "C"
#define PERS_COM_ERR_ACCESS_DENIED (PERS_COM_ERROR_CODE - 7) //!< Insufficient rights to perform opperation
#define PERS_COM_ERR_OUT_OF_MEMORY (PERS_COM_ERROR_CODE - 8) //!< Not enough resources for an opperation
+#define PERS_COM_ERR_READONLY (PERS_COM_ERROR_CODE - 9) //!< Database was opened in readonly mode and cannot be written
+
/* IPC specific error codes */
#define PERS_COM_IPC_ERR_PCL_NOT_AVAILABLE (PERS_COM_ERROR_CODE - 255) //!< PCL client not available (application was killed)
/* end of IPC specific error codes */