![]() |
Tuya iOS Smart Life App SDK 5.15.0
|
#import <ThingEncryptImageKVStorage.h>
Class Methods | |
(instancetype) | + UNAVAILABLE_ATTRIBUTE |
(instancetype) | + UNAVAILABLE_ATTRIBUTE |
(instancetype) | + UNAVAILABLE_ATTRIBUTE |
(instancetype) | + UNAVAILABLE_ATTRIBUTE |
Properties | |
NSString * | path |
The path of this storage. More... | |
NSString * | dataDirectory |
The data path of this storage. More... | |
BOOL | errorLogsEnabled |
Set YES to enable error logs for debug. More... | |
ThingKVStorage is a key-value storage based on sqlite and file system. Thingpically, you should not use this class directly.
@discussion The designated initializer for ThingKVStorage is initWithPath:
. After initialized, a directory is created based on the path
to hold key-value data. Once initialized you should not read or write this directory without the instance.
Definition at line 42 of file ThingEncryptImageKVStorage.h.
- (nullable NSString *) cachePathForKey: | (nonnull NSString *) | key |
The cache path for key
key | A string identifying the value |
- (nullable NSString *) cachePathForKey: | (nonnull NSString *) | key |
The cache path for key
key | A string identifying the value |
- (nullable NSString *) cachePathForKey: | (nonnull NSString *) | key |
The cache path for key
key | A string identifying the value |
- (nullable NSString *) cachePathForKey: | (nonnull NSString *) | key |
The cache path for key
key | A string identifying the value |
- (nullable ThingEncryptKVStorageItem *) getItemForKey: | (NSString *) | key |
- (nullable ThingEncryptKVStorageItem *) getItemForKey: | (NSString *) | key |
- (nullable ThingEncryptKVStorageItem *) getItemForKey: | (NSString *) | key |
- (nullable ThingEncryptKVStorageItem *) getItemForKey: | (NSString *) | key |
- (int) getItemsCount |
Get total item count.
- (int) getItemsCount |
Get total item count.
- (int) getItemsCount |
Get total item count.
- (int) getItemsCount |
Get total item count.
- (int) getItemsSize |
Get item value's total size in bytes.
- (int) getItemsSize |
Get item value's total size in bytes.
- (int) getItemsSize |
Get item value's total size in bytes.
- (int) getItemsSize |
Get item value's total size in bytes.
- (nullable NSData *) getItemValueForKey: | (NSString *) | key |
Get item value with a specified key.
key | A specified key. |
- (nullable NSData *) getItemValueForKey: | (NSString *) | key |
Get item value with a specified key.
key | A specified key. |
- (nullable NSData *) getItemValueForKey: | (NSString *) | key |
Get item value with a specified key.
key | A specified key. |
- (nullable NSData *) getItemValueForKey: | (NSString *) | key |
Get item value with a specified key.
key | A specified key. |
- (nullable NSDictionary< NSString *, NSData * > *) getItemValueForKeys: | (NSArray< NSString * > *) | keys |
Get items value with an array of keys.
keys | An array of specified keys. |
- (nullable NSDictionary< NSString *, NSData * > *) getItemValueForKeys: | (NSArray< NSString * > *) | keys |
Get items value with an array of keys.
keys | An array of specified keys. |
- (nullable NSDictionary< NSString *, NSData * > *) getItemValueForKeys: | (NSArray< NSString * > *) | keys |
Get items value with an array of keys.
keys | An array of specified keys. |
- (nullable NSDictionary< NSString *, NSData * > *) getItemValueForKeys: | (NSArray< NSString * > *) | keys |
Get items value with an array of keys.
keys | An array of specified keys. |
- (nullable instancetype) initWithPath: | (NSString *) | NS_DESIGNATED_INITIALIZER |
The designated initializer.
path | Full path of a directory in which the storage will write data. If the directory is not exists, it will try to create one, otherwise it will read the data in this directory. |
- (nullable instancetype) initWithPath: | (NSString *) | NS_DESIGNATED_INITIALIZER |
The designated initializer.
path | Full path of a directory in which the storage will write data. If the directory is not exists, it will try to create one, otherwise it will read the data in this directory. |
- (nullable instancetype) initWithPath: | (NSString *) | NS_DESIGNATED_INITIALIZER |
The designated initializer.
path | Full path of a directory in which the storage will write data. If the directory is not exists, it will try to create one, otherwise it will read the data in this directory. |
- (nullable instancetype) initWithPath: | (NSString *) | NS_DESIGNATED_INITIALIZER |
The designated initializer.
path | Full path of a directory in which the storage will write data. If the directory is not exists, it will try to create one, otherwise it will read the data in this directory. |
- (BOOL) itemExistsForKey: | (NSString *) | key |
- (BOOL) itemExistsForKey: | (NSString *) | key |
- (BOOL) itemExistsForKey: | (NSString *) | key |
- (BOOL) itemExistsForKey: | (NSString *) | key |
- (BOOL) removeAllItems |
Remove all items in background queue.
@discussion This method will remove the files and sqlite database to a trash folder, and then clear the folder in background queue.
- (BOOL) removeAllItems |
Remove all items in background queue.
@discussion This method will remove the files and sqlite database to a trash folder, and then clear the folder in background queue.
- (BOOL) removeAllItems |
Remove all items in background queue.
@discussion This method will remove the files and sqlite database to a trash folder, and then clear the folder in background queue.
- (BOOL) removeAllItems |
Remove all items in background queue.
@discussion This method will remove the files and sqlite database to a trash folder, and then clear the folder in background queue.
- (BOOL) removeItemForKey: | (NSString *) | key |
- (BOOL) removeItemForKey: | (NSString *) | key |
- (BOOL) removeItemForKey: | (NSString *) | key |
- (BOOL) removeItemForKey: | (NSString *) | key |
- (BOOL) removeItemForKeys: | (NSArray< NSString * > *) | keys |
Remove items with an array of keys.
keys | An array of specified keys. |
- (BOOL) removeItemForKeys: | (NSArray< NSString * > *) | keys |
Remove items with an array of keys.
keys | An array of specified keys. |
- (BOOL) removeItemForKeys: | (NSArray< NSString * > *) | keys |
Remove items with an array of keys.
keys | An array of specified keys. |
- (BOOL) removeItemForKeys: | (NSArray< NSString * > *) | keys |
Remove items with an array of keys.
keys | An array of specified keys. |
- (BOOL) removeItemsAtPath: | (NSString *) | path |
Remove all items under the given path in background queue.
- (BOOL) removeItemsAtPath: | (NSString *) | path |
Remove all items under the given path in background queue.
- (BOOL) removeItemsAtPath: | (NSString *) | path |
Remove all items under the given path in background queue.
- (BOOL) removeItemsAtPath: | (NSString *) | path |
Remove all items under the given path in background queue.
- (BOOL) removeItemsEarlierThanTime: | (int) | time |
Remove all items which last access time is earlier than a specified timestamp.
time | The specified unix timestamp. |
- (BOOL) removeItemsEarlierThanTime: | (int) | time |
Remove all items which last access time is earlier than a specified timestamp.
time | The specified unix timestamp. |
- (BOOL) removeItemsEarlierThanTime: | (int) | time |
Remove all items which last access time is earlier than a specified timestamp.
time | The specified unix timestamp. |
- (BOOL) removeItemsEarlierThanTime: | (int) | time |
Remove all items which last access time is earlier than a specified timestamp.
time | The specified unix timestamp. |
- (BOOL) removeItemsToFitSize: | (int) | maxSize |
Remove items to make the total size not larger than a specified size. The least recently used (LRU) items will be removed first.
maxSize | The specified size in bytes. |
- (BOOL) removeItemsToFitSize: | (int) | maxSize |
Remove items to make the total size not larger than a specified size. The least recently used (LRU) items will be removed first.
maxSize | The specified size in bytes. |
- (BOOL) removeItemsToFitSize: | (int) | maxSize |
Remove items to make the total size not larger than a specified size. The least recently used (LRU) items will be removed first.
maxSize | The specified size in bytes. |
- (BOOL) removeItemsToFitSize: | (int) | maxSize |
Remove items to make the total size not larger than a specified size. The least recently used (LRU) items will be removed first.
maxSize | The specified size in bytes. |
- (BOOL) saveItem: | (ThingEncryptKVStorageItem *) | item |
=============================================================================
Save an item or update the item with 'key' if it already exists.
@discussion This method will save the item.key, item.value, item.filename and item.extendedData to disk or sqlite, other properties will be ignored. item.key and item.value should not be empty (nil or zero length). the item.filename should not be empty.
item | An item. |
- (BOOL) saveItem: | (ThingEncryptKVStorageItem *) | item |
=============================================================================
Save an item or update the item with 'key' if it already exists.
@discussion This method will save the item.key, item.value, item.filename and item.extendedData to disk or sqlite, other properties will be ignored. item.key and item.value should not be empty (nil or zero length). the item.filename should not be empty.
item | An item. |
- (BOOL) saveItem: | (ThingEncryptKVStorageItem *) | item |
=============================================================================
Save an item or update the item with 'key' if it already exists.
@discussion This method will save the item.key, item.value, item.filename and item.extendedData to disk or sqlite, other properties will be ignored. item.key and item.value should not be empty (nil or zero length). the item.filename should not be empty.
item | An item. |
- (BOOL) saveItem: | (ThingEncryptKVStorageItem *) | item |
=============================================================================
Save an item or update the item with 'key' if it already exists.
@discussion This method will save the item.key, item.value, item.filename and item.extendedData to disk or sqlite, other properties will be ignored. item.key and item.value should not be empty (nil or zero length). the item.filename should not be empty.
item | An item. |
- (BOOL) saveItemWithKey: | (NSString *) | key | |
value: | (NSData *) | value | |
Save an item or update the item with 'key' if it already exists.
key | The key, should not be empty (nil or zero length). |
value | The key, should not be empty (nil or zero length). |
- (BOOL) saveItemWithKey: | (NSString *) | key | |
value: | (NSData *) | value | |
Save an item or update the item with 'key' if it already exists.
key | The key, should not be empty (nil or zero length). |
value | The key, should not be empty (nil or zero length). |
- (BOOL) saveItemWithKey: | (NSString *) | key | |
value: | (NSData *) | value | |
Save an item or update the item with 'key' if it already exists.
key | The key, should not be empty (nil or zero length). |
value | The key, should not be empty (nil or zero length). |
- (BOOL) saveItemWithKey: | (NSString *) | key | |
value: | (NSData *) | value | |
Save an item or update the item with 'key' if it already exists.
key | The key, should not be empty (nil or zero length). |
value | The key, should not be empty (nil or zero length). |
- (BOOL) saveItemWithKey: | (NSString *) | key | |
value: | (NSData *) | value | |
filename: | (nullable NSString *) | filename | |
extendedData: | (nullable NSData *) | extendedData | |
Save an item or update the item with 'key' if it already exists. the filename
should not be empty.
key | The key, should not be empty (nil or zero length). |
value | The key, should not be empty (nil or zero length). |
filename | The filename. |
extendedData | The extended data for this item (pass nil to ignore it). |
- (BOOL) saveItemWithKey: | (NSString *) | key | |
value: | (NSData *) | value | |
filename: | (nullable NSString *) | filename | |
extendedData: | (nullable NSData *) | extendedData | |
Save an item or update the item with 'key' if it already exists. the filename
should not be empty.
key | The key, should not be empty (nil or zero length). |
value | The key, should not be empty (nil or zero length). |
filename | The filename. |
extendedData | The extended data for this item (pass nil to ignore it). |
- (BOOL) saveItemWithKey: | (NSString *) | key | |
value: | (NSData *) | value | |
filename: | (nullable NSString *) | filename | |
extendedData: | (nullable NSData *) | extendedData | |
Save an item or update the item with 'key' if it already exists. the filename
should not be empty.
key | The key, should not be empty (nil or zero length). |
value | The key, should not be empty (nil or zero length). |
filename | The filename. |
extendedData | The extended data for this item (pass nil to ignore it). |
- (BOOL) saveItemWithKey: | (NSString *) | key | |
value: | (NSData *) | value | |
filename: | (nullable NSString *) | filename | |
extendedData: | (nullable NSData *) | extendedData | |
Save an item or update the item with 'key' if it already exists. the filename
should not be empty.
key | The key, should not be empty (nil or zero length). |
value | The key, should not be empty (nil or zero length). |
filename | The filename. |
extendedData | The extended data for this item (pass nil to ignore it). |
+ (instancetype) UNAVAILABLE_ATTRIBUTE |
- (instancetype) UNAVAILABLE_ATTRIBUTE |
+ (instancetype) UNAVAILABLE_ATTRIBUTE |
- (instancetype) UNAVAILABLE_ATTRIBUTE |
+ (instancetype) UNAVAILABLE_ATTRIBUTE |
- (instancetype) UNAVAILABLE_ATTRIBUTE |
+ (instancetype) UNAVAILABLE_ATTRIBUTE |
- (instancetype) UNAVAILABLE_ATTRIBUTE |
|
readnonatomicassign |
The data path of this storage.
Definition at line 50 of file ThingEncryptImageKVStorage.h.
|
readwritenonatomicassign |
Set YES
to enable error logs for debug.
Definition at line 51 of file ThingEncryptImageKVStorage.h.
|
readnonatomicassign |
The path of this storage.
=============================================================================
=============================================================================
=============================================================================
=============================================================================
Definition at line 49 of file ThingEncryptImageKVStorage.h.