47 const std::string& key,
48 const std::string&
value)
67 std::string
id()
const {
return id_; }
72 virtual void setId(
const std::string&
id)
final { id_ =
id; }
This abstract class is an API we need to implement from plugin side.
virtual bool preferenceMapHasKey(const std::string &key)=0
If a preference can be stored as per accountId, this function should return True.
virtual std::map< std::string, std::string > getHandlerDetails()=0
Returns a map with handler's name, iconPath, and pluginId.
virtual void setId(const std::string &id) final
Should be called by the PreferenceHandler creator to set the plugins id_ variable.
virtual ~PreferenceHandler()
virtual void resetPreferenceAttributes(const std::string &accountId)=0
Reset stored preferences for given accountId.
std::string id() const
Returns the dataPath of the plugin that created this PreferenceHandler.
virtual void setPreferenceAttribute(const std::string &accountId, const std::string &key, const std::string &value)=0
If a preference can have different values depending on accountId, those values should be stored in th...
void emitSignal(Args... args)