summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorihuerner <ihuerner@b9707d8c-442e-47db-affb-152dabb2260b>2012-11-26 12:08:10 +0000
committerihuerner <ihuerner@b9707d8c-442e-47db-affb-152dabb2260b>2012-11-26 12:08:10 +0000
commit7f213d45ab22253ec8c4642745b1c82a5aa3a656 (patch)
tree4820843a2329d20bf9ab49a046af818fa5912ff5 /include
parent395d1211223bee7dd48e0880e8cdb9d03f45244f (diff)
downloadpersistence-client-library-7f213d45ab22253ec8c4642745b1c82a5aa3a656.tar.gz
New release 0.3.0; license change to MPLv2, for more changes see ChangeLog
Diffstat (limited to 'include')
-rw-r--r--include/persistence_client_library_error_def.h26
-rw-r--r--include/persistence_client_library_file.h26
-rw-r--r--include/persistence_client_library_key.h30
3 files changed, 23 insertions, 59 deletions
diff --git a/include/persistence_client_library_error_def.h b/include/persistence_client_library_error_def.h
index 5df6e0f..f3c4e0d 100644
--- a/include/persistence_client_library_error_def.h
+++ b/include/persistence_client_library_error_def.h
@@ -7,23 +7,9 @@
* Company XS Embedded GmbH
*****************************************************************************/
/******************************************************************************
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the "Software"),
- to deal in the Software without restriction, including without limitation
- the rights to use, copy, modify, merge, publish, distribute, sublicense,
- and/or sell copies of the Software, and to permit persons to whom the
- Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
- OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 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_library_error_def.h
@@ -87,6 +73,12 @@
#define EPERS_FILEREMOVE (-25)
/// err code to signalize last entry in DB
#define EPERS_LAST_ENTRY_IN_DB (-26)
+/// internal database error
+#define EPERS_DB_ERROR_INTERNAL (-27)
+/// db key size is to long
+#define EPERS_DB_KEY_SIZE (-28)
+/// db value size is to long
+#define EPERS_DB_VALUE_SIZE (-29)
/**
diff --git a/include/persistence_client_library_file.h b/include/persistence_client_library_file.h
index a2a373a..06b0700 100644
--- a/include/persistence_client_library_file.h
+++ b/include/persistence_client_library_file.h
@@ -7,23 +7,9 @@
* Company XS Embedded GmbH
*****************************************************************************/
/******************************************************************************
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the "Software"),
- to deal in the Software without restriction, including without limitation
- the rights to use, copy, modify, merge, publish, distribute, sublicense,
- and/or sell copies of the Software, and to permit persons to whom the
- Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
- OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 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_library_file.h
@@ -45,7 +31,7 @@ extern "C" {
#endif
-#define PERSIST_FILEAPI_INTERFACE_VERSION (0x01000000U)
+#define PERSIST_FILEAPI_INTERFACE_VERSION (0x01030000U)
@@ -114,7 +100,7 @@ int file_open(unsigned char ldbid, char* resource_id, unsigned char user_no, uns
* On error a negative value will be returned with th follwoing error codes:
* EPERS_LOCKFS or EPERS_COMMON
*/
-int file_read_data(int fd, void * buffer, unsigned long buffer_size);
+int file_read_data(int fd, void * buffer, int buffer_size);
@@ -180,7 +166,7 @@ int file_unmap_data(void* address, long size);
* On error a negative value will be returned with th follwoing error codes:
* EPERS_LOCKFS or EPERS_COMMON
*/
-int file_write_data(int fd, const void * buffer, unsigned long buffer_size);
+int file_write_data(int fd, const void * buffer, int buffer_size);
diff --git a/include/persistence_client_library_key.h b/include/persistence_client_library_key.h
index 23cc01e..becee04 100644
--- a/include/persistence_client_library_key.h
+++ b/include/persistence_client_library_key.h
@@ -7,23 +7,9 @@
* Company XS Embedded GmbH
*****************************************************************************/
/******************************************************************************
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the "Software"),
- to deal in the Software without restriction, including without limitation
- the rights to use, copy, modify, merge, publish, distribute, sublicense,
- and/or sell copies of the Software, and to permit persons to whom the
- Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
- OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 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_library_key.h
@@ -46,7 +32,7 @@ extern "C" {
#endif
-#define PERSIST_KEYVALUEAPI_INTERFACE_VERSION (0x01000000U)
+#define PERSIST_KEYVALUEAPI_INTERFACE_VERSION (0x01030000U)
@@ -126,7 +112,7 @@ int key_handle_open(unsigned char ldbid, char* resource_id, unsigned char user_n
* @return positive value: the bytes read; On error a negative value will be returned with th follwoing error codes:
*
*/
-int key_handle_read_data(int key_handle, unsigned char* buffer, unsigned long buffer_size);
+int key_handle_read_data(int key_handle, unsigned char* buffer, int buffer_size);
@@ -151,7 +137,7 @@ int key_handle_register_notify_on_change(int key_handle);
*
* @return positive value: the bytes written; On error a negative value will be returned with th follwoing error codes:
*/
-int key_handle_write_data(int key_handle, unsigned char* buffer, unsigned long buffer_size);
+int key_handle_write_data(int key_handle, unsigned char* buffer, int buffer_size);
@@ -167,7 +153,7 @@ int key_handle_write_data(int key_handle, unsigned char* buffer, unsigned long b
*
* @return positive value: the bytes read; On error a negative value will be returned with th follwoing error codes:
*/
-int key_read_data(unsigned char ldbid, char* resource_id, unsigned char user_no, unsigned char seat_no, unsigned char* buffer, unsigned long buffer_size);
+int key_read_data(unsigned char ldbid, char* resource_id, unsigned char user_no, unsigned char seat_no, unsigned char* buffer, int buffer_size);
@@ -198,7 +184,7 @@ int key_register_notify_on_change(unsigned char ldbid, char* resource_id, unsign
*
* @return positive value: the bytes written; On error a negative value will be returned with th follwoing error codes:
*/
-int key_write_data(unsigned char ldbid, char* resource_id, unsigned char user_no, unsigned char seat_no, unsigned char* buffer, unsigned long buffer_size);
+int key_write_data(unsigned char ldbid, char* resource_id, unsigned char user_no, unsigned char seat_no, unsigned char* buffer, int buffer_size);
#ifdef __cplusplus