NVProperty generic key value store using the MCU flash area.

Dependents:   Turtle_RadioShuttle

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers NVPropertyProviderInterface.h Source File

NVPropertyProviderInterface.h

00001 /*
00002  * This is an unpublished work copyright
00003  * (c) 2019 Helmut Tschemernjak
00004  * 30826 Garbsen (Hannover) Germany
00005  *
00006  *
00007  * Use is granted to registered RadioShuttle licensees only.
00008  * Licensees must own a valid serial number and product code.
00009  * Details see: www.radioshuttle.de
00010  */
00011 
00012 #ifndef __NVPROPERTYPROVIDERINTERFACE__
00013 #define __NVPROPERTYPROVIDERINTERFACE__
00014 
00015 class NVPropertyProviderInterface {
00016 public:
00017     virtual ~NVPropertyProviderInterface() { }
00018     
00019     virtual int GetProperty(int key) = 0;
00020     virtual int64_t GetProperty64(int key) = 0;
00021     virtual const char *GetPropertyStr(int key) = 0;
00022     virtual int GetPropertyBlob(int key, const void *blob, int *size) = 0;
00023     virtual int SetProperty(int key, int64_t value, int type) = 0;
00024     virtual int SetPropertyStr(int key, const char *str, int type) = 0;
00025     virtual int SetPropertyBlob(int key, const void *blob, int size, int type) = 0;
00026     virtual int EraseProperty(int key) = 0;
00027     virtual int ReorgProperties(void) = 0;
00028     virtual int OpenPropertyStore(bool forWrite = false) = 0;
00029     virtual int ClosePropertyStore(bool flush = false) = 0;
00030 };
00031 
00032 #endif // __NVPROPERTYPROVIDERINTERFACE__