Skip to content

Commit 2f0ba9f

Browse files
committed
made block readonly set method public
1 parent ed11647 commit 2f0ba9f

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

src/Flux/flxStorage.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ class flxStorageBlock
126126
virtual bool writeBytes(const char * tag, const uint8_t* data, size_t len) = 0;
127127

128128
virtual flxStorage::flxStorageKind_t kind(void)=0;
129+
virtual void setReadOnly(bool) = 0;
129130

130131
// Overloaded versions
131132
bool write(const char *tag, bool data)

src/Flux/flxStorageESP32Pref.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ class flxStorageESP32Block : public flxStorageBlock {
7171
return flxStorage::flxStorageKindInternal;
7272
}
7373

74+
void setReadOnly(bool readonly)
75+
{
76+
_readOnly=readonly;
77+
}
78+
7479
private:
7580
friend flxStorageESP32Pref;
7681

@@ -82,10 +87,6 @@ class flxStorageESP32Block : public flxStorageBlock {
8287
_prefs = pPrefs;
8388
}
8489

85-
void setReadOnly(bool readonly)
86-
{
87-
_readOnly=readonly;
88-
}
8990
};
9091

9192
//------------------------------------------------------------------------------

src/Flux/flxStorageJSONPref.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ class flxStorageJSONBlock : public flxStorageBlock
7272
return flxStorage::flxStorageKindExternal;
7373
}
7474

75+
void setReadOnly(bool readonly)
76+
{
77+
_readOnly = readonly;
78+
}
79+
7580
private:
7681
friend flxStorageJSONPref;
7782

@@ -84,10 +89,7 @@ class flxStorageJSONBlock : public flxStorageBlock
8489
_jSection = jsonSection;
8590
}
8691

87-
void setReadOnly(bool readonly)
88-
{
89-
_readOnly = readonly;
90-
}
92+
9193
};
9294

9395
//------------------------------------------------------------------------------

0 commit comments

Comments
 (0)