KNX IoT
KNX IoT Point API stack implementation
oc_storage.h
Go to the documentation of this file.
1 /*
2 // Copyright (c) 2016 Intel Corporation
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 */
20 #ifndef OC_STORAGE_H
21 #define OC_STORAGE_H
22 
23 #include <stddef.h>
24 #include <stdint.h>
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
38 int oc_storage_config(const char *store);
39 
48 long oc_storage_read(const char *store, uint8_t *buf, size_t size);
49 
58 long oc_storage_write(const char *store, uint8_t *buf, size_t size);
59 
66 int oc_storage_erase(const char *store);
67 
68 #ifdef __cplusplus
69 }
70 #endif
71 
72 #endif /* OC_STORAGE_H */
int oc_storage_erase(const char *store)
erase a stored file
long oc_storage_write(const char *store, uint8_t *buf, size_t size)
write to storage
long oc_storage_read(const char *store, uint8_t *buf, size_t size)
read from the storage
int oc_storage_config(const char *store)
open the storage NOTE: For embedded devices, this function doesn't do anything.