Samsung / TizenFX

C# Device APIs for Tizen

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Expose existing keys via other means than an Exception in Data manager.

Mrnikbobjeff opened this issue · comments

DataManager acts as an Interop wrapper for ckm. Ckm itself exposes the existence of keys via an error code. Currently, you either have to check all aliases on every key set to check whether the alias already exists, and remove it if it does before setting it again OR catch the exception, delete the key and try again. I would request three changes in total:

  1. Change the return type to be a HashSet for the GetAliases method. This is achievable by writing a new class which simply takes the type of collection to be used as a template parameter. Have the current implementation extend that class with the template argument type list. This way existing code is not changed for other uses, but we can easily plug a new collection type in where appropriate. Also make sure to not decay the return type as is the case now.
  2. Expose a way to override existing keys. Ideally by exposing an overload allowing exactly that.
  3. Expose a way to check for key existence. Ckm has error codes for both existing an nonexistent keys. Simply add functions use these error codes to return a book.

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days