summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorIngo Huerner <ingo.huerner@xse.de>2013-11-26 14:57:52 +0100
committerIngo Huerner <ingo.huerner@xse.de>2013-11-26 14:57:52 +0100
commitcc29af37f108676ba6cdac4ac0531f6b7db9c263 (patch)
treed8b53415bc60302e6e202278e9c39d03b817e45e /include
parentacb1055872cae0940eb4d3f3c9e256a984ac81ce (diff)
downloadpersistence-client-library-cc29af37f108676ba6cdac4ac0531f6b7db9c263.tar.gz
Corrected error codes in doxygen function doc; corrected problem with return value when using write key function for shared values
Diffstat (limited to 'include')
-rw-r--r--include/persistence_client_custom.h57
-rw-r--r--include/persistence_client_library.h7
-rw-r--r--include/persistence_client_library_error_def.h5
-rw-r--r--include/persistence_client_library_file.h64
-rw-r--r--include/persistence_client_library_key.h76
5 files changed, 123 insertions, 86 deletions
diff --git a/include/persistence_client_custom.h b/include/persistence_client_custom.h
index 3fc894e..56f5904 100644
--- a/include/persistence_client_custom.h
+++ b/include/persistence_client_custom.h
@@ -1,21 +1,23 @@
#ifndef PERSISTENCE_CLIENT_LIBRARY_CUSTOM_H
#define PERSISTENCE_CLIENT_LIBRARY_CUSTOM_H
-/****************************************************
- * persistence_custom.h
- * Created on: 09-Jul-2012 11:38:03
- * Implementation of the Interface PersCustom
- * Original author: ihuerner, G.Sagnes
- *
- * \file persistence_client_custom.h
- * \brief Implementation of the Interface PersCustom
- *
- * \par Responsibility
- * - SW-Subsystem: EG-SI
- * - SW-Domain: Persistence
- * - Interface Visibility: Protected
- * \par change history
- * \verbatim
+/******************************************************************************
+ * Project Persistency
+ * (c) copyright 2012
+ * Company XS Embedded GmbH
+ *****************************************************************************/
+/******************************************************************************
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed
+ * with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+******************************************************************************/
+ /**
+ * @file persistence_client_custom.h
+ * @ingroup Persistence client library
+ * @author Ingo Huerner (XSe) / Guy Sagnes (Continental)
+ * @brief Header of the persistence client library custom plugin.
+ * Library provides an plugin API to extend persistence client library
+ * @par change history
* Date Author Version Description
* 2013.06.26 ihuerner 1.5.0.0 added description of parameters
* 2013.01.06 ihuerner 1.4.0.0 plugin_handle_open and plugin_set_data changed from char* to const char*
@@ -23,9 +25,8 @@
* 2012.10.16 gsagnes 1.2.0.0 add get_size, create_backup, restore_backup
* 2012.10.04 gsagnes 1.1.0.0 add deinitialisation functionality (call during shutdown)
* 2012.07.14 ihuerner 1.0.0.0 Initial version of the interface
- * \endverbatim
- *
- ****************************************************/
+ */
+
/** \ingroup GEN_PERS_CLIENTLIB_INTERFACE API document
* \{
@@ -51,14 +52,14 @@ The lower significant byte is equal 0 for released version only
*
* @param backup_id Name of the backup / identifier
*
- * @return positive value: backup success (size of backup, bytes); negative value: error
+ * @return positive value (0 or greater): backup success (size of backup, bytes); negative value: error
*/
int plugin_create_backup(const char* backup_id);
/**
* @brief deinitialize plugin (during shutdown)
*
- * @return positive value: init success; negative value: error
+ * @return positive value (0 or greater): init success; negative value: error
*/
int plugin_deinit();
@@ -67,7 +68,7 @@ int plugin_deinit();
*
* @param path the path to the data to delete
*
- * @return positive value: delete success; negative value: error
+ * @return positive value (0 or greater): delete success; negative value: error
*/
int plugin_delete_data(const char* path);
@@ -77,7 +78,7 @@ int plugin_delete_data(const char* path);
* @param backup_id Name of the backup / identifier
* @param size size of the buffer to return the identifier
*
- * @return positive value: success, length of identifier; negative value: error
+ * @return positive value (0 or greater): success, length of identifier; negative value: error
*/
int plugin_get_backup(char* backup_id, int size);
@@ -86,7 +87,7 @@ int plugin_get_backup(char* backup_id, int size);
*
* @param path the path to the data
*
- * @return positive value: the size; negative value: error code
+ * @return positive value (0 or greater): the size; negative value: error code
*/
int plugin_get_size(const char* path);
@@ -97,7 +98,7 @@ int plugin_get_size(const char* path);
* @param buffer the buffer to store data
* @param size the number of bytes to get data
*
- * @return positive value: size data read in bytes; negative value: error
+ * @return positive value (0 or greater): size data read in bytes; negative value: error
*/
int plugin_get_data(const char* path, char* buffer, int size);
@@ -106,7 +107,7 @@ int plugin_get_data(const char* path, char* buffer, int size);
*
* @param handle the handle to close
*
- * @return positive value: successfully closed; negative value: error
+ * @return positive value (0 or greater): successfully closed; negative value: error
*/
int plugin_handle_close(int handle);
@@ -117,7 +118,7 @@ int plugin_handle_close(int handle);
* @param buffer the buffer to store data
* @param size the number of bytes to get data
*
- * @return positive value: size data read in bytes; negative value: error
+ * @return positive value (0 or greater): size data read in bytes; negative value: error
*/
int plugin_handle_get_data(int handle, char* buffer, int size);
@@ -128,7 +129,7 @@ int plugin_handle_get_data(int handle, char* buffer, int size);
* @param flag open flags
* @param mode the open mode
*
- * @return positive value: handle; negative value: error
+ * @return positive value (0 or greater): handle; negative value: error
*/
int plugin_handle_open(const char* path, int flag, int mode);
@@ -155,7 +156,7 @@ int plugin_init();
*
* @param backup_id Name of the backup / identifier
*
- * @return positive value: backup success (size of backup, bytes); negative value: error
+ * @return positive value (0 or greater): backup success (size of backup, bytes); negative value: error
*/
int plugin_restore_backup(const char* backup_id);
diff --git a/include/persistence_client_library.h b/include/persistence_client_library.h
index dbddfe8..4370158 100644
--- a/include/persistence_client_library.h
+++ b/include/persistence_client_library.h
@@ -65,8 +65,9 @@ extern "C" {
* @param shutdownMode shutdown mode ::PCL_SHUTDOWN_TYPE_FAST or ::PCL_SHUTDOWN_TYPE_NORMAL
*
* @return positive value: success;
- * On error a negative value will be returned with th follwoing error codes:
- * ::EPERS_LOCKFS, ::EPERS_NOT_INITIALIZED, ::EPERS_INIT_DBUS_MAINLOOP,
+ * On error a negative value will be returned with th following error codes:
+ * ::EPERS_NOT_INITIALIZED, ::EPERS_INIT_DBUS_MAINLOOP,
+ * ::EPERS_REGISTER_LIFECYCLE, ::EPERS_REGISTER_ADMIN
*/
int pclInitLibrary(const char* appname, int shutdownMode);
@@ -78,7 +79,7 @@ int pclInitLibrary(const char* appname, int shutdownMode);
* @attention This function is currently N O T part of the GENIVI compliance specification
*
* @return positive value: success;
- * On error a negative value will be returned with th follwoing error codes: ::EPERS_LOCKFS
+ * On error a negative value will be returned.
*/
int pclDeinitLibrary(void);
diff --git a/include/persistence_client_library_error_def.h b/include/persistence_client_library_error_def.h
index f23c6da..8a4a63f 100644
--- a/include/persistence_client_library_error_def.h
+++ b/include/persistence_client_library_error_def.h
@@ -27,7 +27,7 @@
extern "C" {
#endif
-// common error, for this error errno will be set
+/// common error, for this error errno will be set
#define EPERS_COMMON (-1)
/// file system is locked
#define EPERS_LOCKFS (-2)
@@ -103,7 +103,8 @@ extern "C" {
#define EPERS_REGISTER_ADMIN (-36)
// registration on this key is not allowed
#define EPERS_NOTIFY_NOT_ALLOWED (-37)
-
+// the requested resource is not a file
+#define EPERS_RESOURCE_NO_FILE (-38)
#ifdef __cplusplus
}
diff --git a/include/persistence_client_library_file.h b/include/persistence_client_library_file.h
index 5f26eef..c357714 100644
--- a/include/persistence_client_library_file.h
+++ b/include/persistence_client_library_file.h
@@ -44,8 +44,10 @@ extern "C" {
*
* @param fd the file descriptor to close
*
- * @return zero on success. On error a negative value will be returned with th follwoing error codes:
- * ::EPERS_LOCKFS, ::EPERS_MAXHANDLE
+ * @return zero on success.
+ * On error a negative value will be returned with th following error codes:
+ * ::EPERS_MAXHANDLE ::EPERS_COMMON
+ * If ::EPERS_COMMON will be returned errno will be set.
*/
int pclFileClose(int fd);
@@ -56,7 +58,8 @@ int pclFileClose(int fd);
*
* @param fd the POSIX file descriptor
*
- * @return positive value. On error the negative value -1 will be returned
+ * @return positive value (0 or greater). On error ::EPERS_NOT_INITIALIZED, ::EPERS_COMMON
+ * If ::EPERS_COMMON will be returned errno will be set.
*/
int pclFileGetSize(int fd);
@@ -85,9 +88,11 @@ void* pclFileMapData(void* addr, long size, long offset, int fd);
* @param user_no the user ID; user_no=0 can not be used as user-ID beacause ‘0’ is defined as System/node
* @param seat_no the seat number
*
- * @return positive value: the POSIX file descriptor;
- * On error a negative value will be returned with th follwoing error codes:
- * EPERS_LOCKFS, EPERS_MAXHANDLE, EPERS_NOKEY, EPERS_NOKEYDATA, EPERS_NOPRCTABLE or EPERS_COMMON,
+ * @return positive value (0 or greater): the POSIX file descriptor;
+ * On error a negative value will be returned with th following error codes:
+ * ::EPERS_LOCKFS, ::EPERS_MAXHANDLE, ::EPERS_NOKEY, ::EPERS_NOKEYDATA,
+ * ::EPERS_NOPRCTABLE, ::EPERS_NOT_INITIALIZED, ::EPERS_COMMON
+ * If ::EPERS_COMMON will be returned errno will be set.
*/
int pclFileOpen(unsigned int ldbid, const char* resource_id, unsigned int user_no, unsigned int seat_no);
@@ -100,9 +105,10 @@ int pclFileOpen(unsigned int ldbid, const char* resource_id, unsigned int user_n
* @param buffer buffer to read the data
* @param buffer_size the size buffer for reading
*
- * @return positive value: the size read;
- * On error a negative value will be returned with th follwoing error codes:
- * EPERS_LOCKFS or EPERS_COMMON
+ * @return positive value (0 or greater): the size read;
+ * On error a negative value will be returned with th following error codes:
+ * ::EPERS_NOT_INITIALIZED, ::EPERS_LOCKFS, ::EPERS_COMMON.
+ * If ::EPERS_COMMON will be returned errno will be set
*/
int pclFileReadData(int fd, void * buffer, int buffer_size);
@@ -116,9 +122,10 @@ int pclFileReadData(int fd, void * buffer, int buffer_size);
* @param user_no the user ID; user_no=0 can not be used as user-ID beacause ‘0’ is defined as System/node
* @param seat_no the seat number
*
- * @return positive value: success;
- * On error a negative value will be returned with th follwoing error codes:
- * EPERS_LOCKFS or EPERS_COMMON
+ * @return positive value (0 or greater): success;
+ * On error a negative value will be returned with th following error codes:
+ * ::EPERS_NOT_INITIALIZED, ::EPERS_LOCKFS, ::EPERS_COMMON.
+ * If ::EPERS_COMMON will be returned errno will be set
*/
int pclFileRemove(unsigned int ldbid, const char* resource_id, unsigned int user_no, unsigned int seat_no);
@@ -137,9 +144,10 @@ int pclFileRemove(unsigned int ldbid, const char* resource_id, unsigned int user
SEEK_END
The offset is set to the size of the file plus offset bytes.
*
- * @return positive value: resulting offset location;
- * On error a negative value will be returned with th follwoing error codes:
- * EPERS_LOCKFS or EPERS_COMMON
+ * @return positive value (0 or greater): resulting offset location;
+ * On error a negative value will be returned with th following error codes:
+ * ::EPERS_LOCKFS, ::EPERS_NOT_INITIALIZED, ::EPERS_COMMON.
+ * If ::EPERS_COMMON will be returned errno will be set
*/
int pclFileSeek(int fd, long int offset, int whence);
@@ -152,8 +160,9 @@ int pclFileSeek(int fd, long int offset, int whence);
* @param size the size in bytes to unmap
*
* @return on success 0;
- * On error a negative value will be returned with th follwoing error codes:
- * EPERS_LOCKFS or EPERS_COMMON
+ * On error a negative value will be returned with th following error codes:
+ * ::EPERS_LOCKFS, EPERS_NOT_INITIALIZED, ::EPERS_COMMON.
+ * If ::EPERS_COMMON will be returned errno will be set
*/
int pclFileUnmapData(void* address, long size);
@@ -166,9 +175,10 @@ int pclFileUnmapData(void* address, long size);
* @param buffer the buffer to write
* @param buffer_size the size of the buffer to write in bytes
*
- * @return positive value: bytes written;
- * On error a negative value will be returned with th follwoing error codes:
- * EPERS_LOCKFS or EPERS_COMMON
+ * @return positive value (0 or greater): bytes written;
+ * On error a negative value will be returned with th following error codes:
+ * ::EPERS_LOCKFS, ::EPERS_NOT_INITIALIZED or ::EPERS_COMMON
+ * If ::EPERS_COMMON will be returned errno will be set.
*/
int pclFileWriteData(int fd, const void * buffer, int buffer_size);
@@ -186,9 +196,10 @@ int pclFileWriteData(int fd, const void * buffer, int buffer_size);
*
* @note the allocated memory for the path string will be freed in pclFileReleasePath
*
- * @return positive value on success, which must be used when pclFileReleasePath will be called
- * On error a negative value will be returned with th follwoing error codes:
- * EPERS_LOCKFS or EPERS_COMMON
+ * @return positive value (0 or greater) on success, which must be used when pclFileReleasePath will be called
+ * On error a negative value will be returned with th following error codes:
+ * ::EPERS_LOCKFS or ::EPERS_COMMON
+ * If ::EPERS_COMMON will be returned errno will be set.
*/
int pclFileCreatePath(unsigned int ldbid, const char* resource_id, unsigned int user_no, unsigned int seat_no, char** path, unsigned int* size);
@@ -200,9 +211,10 @@ int pclFileCreatePath(unsigned int ldbid, const char* resource_id, unsigned int
*
* @note the allocated memory in pclFileCreatePath for the path will freed in the function
*
- * @return positive value: success;
- * On error a negative value will be returned with th follwoing error codes:
- * EPERS_LOCKFS or EPERS_COMMON
+ * @return positive value (0 or greater): success;
+ * On error a negative value will be returned with th following error codes:
+ * ::EPERS_LOCKFS or ::EPERS_COMMON
+ * If ::EPERS_COMMON will be returned errno will be set.
*/
int pclFileReleasePath(int pathPandle);
diff --git a/include/persistence_client_library_key.h b/include/persistence_client_library_key.h
index facad06..fa9fa16 100644
--- a/include/persistence_client_library_key.h
+++ b/include/persistence_client_library_key.h
@@ -85,8 +85,8 @@ typedef struct _pclNotification_s
*
* @param notifyStruct structure for notifcation
*
- * @return positive value: success;
- * On error a negative value will be returned with the following error codes: ::EPERS_LOCKFS
+ * @return positive value (0 or greater): success;
+ * On error a negative value will be returned with the following error codes: ::EPERS_LOCKFS
*/
typedef int(* pclChangeNotifyCallback_t)(pclNotification_s * notifyStruct);
@@ -103,8 +103,9 @@ typedef int(* pclChangeNotifyCallback_t)(pclNotification_s * notifyStruct);
* @param user_no the user ID; user_no=0 can not be used as user-ID beacause ‘0’ is defined as System/node
* @param seat_no the seat number
*
- * @return positive value: success; On error a negative value will be returned with the following error codes:
- * ::EPERS_LOCKFS ::EPERS_NOTIFY_SIG
+ * @return positive value (0 or greater) : success;
+ * On error a negative value will be returned with the following error codes:
+ * ::EPERS_LOCKFS, ::EPERS_NOTIFY_SIG, ::EPERS_NOT_INITIALIZED, ::EPERS_BADPOL
*/
int pclKeyDelete(unsigned int ldbid, const char* resource_id, unsigned int user_no, unsigned int seat_no);
@@ -118,8 +119,10 @@ int pclKeyDelete(unsigned int ldbid, const char* resource_id, unsigned int user_
* @param user_no the user ID; user_no=0 can not be used as user-ID beacause ‘0’ is defined as System/node
* @param seat_no the seat number
*
- * @return positive value: the size; On error a negative value will be returned with the following error codes:
+ * @return positive value (0 or greater): the size;
+ * On error a negative value will be returned with the following error codes:
* ::EPERS_LOCKFS, ::EPERS_BADPOL, ::EPERS_NOKEY, ::EPERS_NOKEYDATA or ::EPERS_NOPRCTABLE
+ * ::EPERS_NOT_INITIALIZED
*/
int pclKeyGetSize(unsigned int ldbid, const char* resource_id, unsigned int user_no, unsigned int seat_no);
@@ -128,8 +131,9 @@ int pclKeyGetSize(unsigned int ldbid, const char* resource_id, unsigned int user
*
* @param key_handle key value handle return by key_handle_open()
*
- * @return positive value: success; On error a negative value will be returned with the following error codes:
- * ::EPERS_LOCKFS
+ * @return positive value (0 or greater): success;
+ * On error a negative value will be returned with the following error codes:
+ * ::EPERS_LOCKFS ::EPERS_MAXHANDLE ::EPERS_NOPLUGINFUNCT ::EPERS_NOT_INITIALIZED
*/
int pclKeyHandleClose(int key_handle);
@@ -140,8 +144,10 @@ int pclKeyHandleClose(int key_handle);
*
* @param key_handle key value handle return by key_handle_open()
*
- * @return positive value: the size; On error a negative value will be returned with the following error codes:
- * ::EPERS_LOCKFS
+ * @return positive value (0 or greater): the size;
+ * On error a negative value will be returned with the following error codes:
+ * ::EPERS_NOT_INITIALIZED ::EPERS_LOCKFS ::EPERS_NOPLUGINFUNCT ::EPERS_MAXHANDLE
+ * ::EPERS_NOKEY ::EPERS_DB_KEY_SIZE ::EPERS_NOPRCTABLE
*/
int pclKeyHandleGetSize(int key_handle);
@@ -155,9 +161,9 @@ int pclKeyHandleGetSize(int key_handle);
* @param user_no the user ID; user_no=0 can not be used as user-ID beacause ‘0’ is defined as System/node
* @param seat_no the seat number
*
- * @return positive value: the key handle to access the value;
+ * @return positive value (0 or greater): the key handle to access the value;
* On error a negative value will be returned with the following error codes:
- * ::EPERS_LOCKFS
+ * ::EPERS_NOT_INITIALIZED ::EPERS_NOPLUGINFUNCT ::
*/
int pclKeyHandleOpen(unsigned int ldbid, const char* resource_id, unsigned int user_no, unsigned int seat_no);
@@ -170,8 +176,9 @@ int pclKeyHandleOpen(unsigned int ldbid, const char* resource_id, unsigned int u
* @param buffer the buffer for persistent data
* @param buffer_size size of buffer for reading
*
- * @return positive value: the bytes read; On error a negative value will be returned with the following error codes:
- * ::EPERS_LOCKFS
+ * @return positive value (0 or greater): the bytes read;
+ * On error a negative value will be returned with the following error codes:
+ * ::EPERS_NOT_INITIALIZED ::EPERS_NOPLUGINFUNCT ::EPERS_MAXHANDLE
*/
int pclKeyHandleReadData(int key_handle, unsigned char* buffer, int buffer_size);
@@ -183,22 +190,28 @@ int pclKeyHandleReadData(int key_handle, unsigned char* buffer, int buffer_size)
* @param key_handle key value handle return by key_handle_open()
* @param callback notification callback
*
- * @return positive value: registration OK; On error a negative value will be returned with the following error codes:
- * ::EPERS_LOCKFS ::EPERS_MAXHANDLE ::EPERS_NOTIFY_NOT_ALLOWED
+ * @return positive value (0 or greater): registration OK;
+ * On error a negative value will be returned with the following error codes:
+ * ::EPERS_NOT_INITIALIZED ::EPERS_MAXHANDLE ::EPERS_NOTIFY_NOT_ALLOWED
*/
int pclKeyHandleRegisterNotifyOnChange(int key_handle, pclChangeNotifyCallback_t callback);
+
+
/**
* @brief unregister a change notification for persistent data
*
* @param key_handle key value handle return by key_handle_open()
* @param callback notification callback
*
- * @return positive value: registration OK; On error a negative value will be returned with the following error codes:
- * ::EPERS_LOCKFS ::EPERS_MAXHANDLE ::EPERS_NOTIFY_NOT_ALLOWED
+ * @return positive value (0 or greater): registration OK;
+ * On error a negative value will be returned with the following error codes:
+ * ::EPERS_NOT_INITIALIZED ::EPERS_LOCKFS ::EPERS_MAXHANDLE ::EPERS_NOTIFY_NOT_ALLOWED
*/
int pclKeyHandleUnRegisterNotifyOnChange(int key_handle, pclChangeNotifyCallback_t callback);
+
+
/**
* @brief writes persistent data identified by key handle
*
@@ -207,8 +220,10 @@ int pclKeyHandleUnRegisterNotifyOnChange(int key_handle, pclChangeNotifyCallback
* @param buffer_size the number of bytes to write (default max size is set to 16kB)
* use environment variable PERS_MAX_KEY_VAL_DATA_SIZE to modify default size in bytes
*
- * @return positive value: the bytes written; On error a negative value will be returned with the following error codes:
- * ::EPERS_LOCKFS ::EPERS_MAX_BUFF_SIZE ::EPERS_NOTIFY_SIG
+ * @return positive value (0 or greater): the bytes written;
+ * On error a negative value will be returned with the following error codes:
+ * ::EPERS_LOCKFS ::EPERS_MAX_BUFF_SIZE ::EPERS_NOTIFY_SIG ::EPERS_DB_VALUE_SIZE ::EPERS_DB_KEY_SIZE
+ * ::EPERS_NOPRCTABLE ::EPERS_DB_VALUE_SIZE
*/
int pclKeyHandleWriteData(int key_handle, unsigned char* buffer, int buffer_size);
@@ -224,8 +239,9 @@ int pclKeyHandleWriteData(int key_handle, unsigned char* buffer, int buffer_size
* @param buffer the buffer to read the persistent data
* @param buffer_size size of buffer for reading
*
- * @return positive value: the bytes read; On error a negative value will be returned with th follwoing error codes:
- * ::EPERS_LOCKFS
+ * @return positive value (0 or greater): the bytes read;
+ * On error a negative value will be returned with th following error codes:
+ * ::EPERS_LOCKFS ::EPERS_NOT_INITIALIZED ::EPERS_BADPOL ::EPERS_NOPLUGINFUNCT
*/
int pclKeyReadData(unsigned int ldbid, const char* resource_id, unsigned int user_no, unsigned int seat_no, unsigned char* buffer, int buffer_size);
@@ -240,8 +256,9 @@ int pclKeyReadData(unsigned int ldbid, const char* resource_id, unsigned int use
* @param seat_no the seat number
* @param callback notification callback
*
- * @return positive value: registration OK; On error a negative value will be returned with the following error codes:
- * ::EPERS_RES_NO_KEY ::EPERS_NOKEYDATA ::EPERS_NOPRCTABLE ::EPERS_NOTIFY_NOT_ALLOWED
+ * @return positive value (0 or greater): registration OK;
+ * On error a negative value will be returned with the following error codes:
+ * ::EPERS_RES_NO_KEY ::EPERS_NOKEYDATA ::EPERS_NOPRCTABLE ::EPERS_NOTIFY_NOT_ALLOWED
*/
int pclKeyRegisterNotifyOnChange(unsigned int ldbid, const char* resource_id, unsigned int user_no, unsigned int seat_no, pclChangeNotifyCallback_t callback);
@@ -256,11 +273,14 @@ int pclKeyRegisterNotifyOnChange(unsigned int ldbid, const char* resource_id, un
* @param seat_no the seat number
* @param callback notification callback
*
- * @return positive value: registration OK; On error a negative value will be returned with the following error codes:
- * ::EPERS_RES_NO_KEY ::EPERS_NOKEYDATA ::EPERS_NOPRCTABLE ::EPERS_NOTIFY_NOT_ALLOWED
+ * @return positive value (0 or greater): registration OK;
+ * On error a negative value will be returned with the following error codes:
+ * ::EPERS_RES_NO_KEY ::EPERS_NOKEYDATA ::EPERS_NOPRCTABLE ::EPERS_NOTIFY_NOT_ALLOWED
*/
int pclKeyUnRegisterNotifyOnChange( unsigned int ldbid, const char * resource_id, unsigned int user_no, unsigned int seat_no, pclChangeNotifyCallback_t callback);
+
+
/**
* @brief writes persistent data identified by ldbid and resource_id
*
@@ -272,11 +292,13 @@ int pclKeyUnRegisterNotifyOnChange( unsigned int ldbid, const char * resource_
* @param buffer_size the number of bytes to write (default max size is set to 16kB)
* use environment variable PERS_MAX_KEY_VAL_DATA_SIZE to modify default size in bytes
*
- * @return positive value: the bytes written; On error a negative value will be returned with the following error codes:
- * ::EPERS_LOCKFS ::EPERS_NOTIFY_NOT_ALLOWED
+ * @return positive value (0 or greater): the bytes written;
+ * On error a negative value will be returned with the following error codes:
+ * ::EPERS_LOCKFS ::EPERS_BADPOL ::EPERS_BUFLIMIT ::EPERS_DB_VALUE_SIZE ::EPERS_DB_KEY_SIZE ::EPERS_NOTIFY_SIG
*/
int pclKeyWriteData(unsigned int ldbid, const char* resource_id, unsigned int user_no, unsigned int seat_no, unsigned char* buffer, int buffer_size);
+
/** \} */
#ifdef __cplusplus