7#ifndef __HDI_CORE_REGISTRATION__
8#define __HDI_CORE_REGISTRATION__
104 const std::string& path_,
122 const std::string& path_,
141 const std::string& path_,
180 virtual std::string
name()
const;
190 virtual bool setName(
const std::string& name_);
332 virtual std::unique_ptr<DictionaryPref>
userData()
const;
342 typedef std::unique_ptr<Registration> RegistrationUP;
343 typedef std::shared_ptr<Registration> RegistrationSP;
344 typedef std::weak_ptr<Registration> RegistrationWP;
Aids in user registration by reading/writing and de/encrypting the JSON data in a given file.
Definition: hdicoreRegistration.h:36
virtual void setDemoModePersistent(const bool isDemo_)
Sets whether the product (plugin) is in demo mode (persistently!)
virtual bool save(const std::string &path_, const crypt::aes::Key &key_, const crypt::aes::InitVector &iv_) const
Writes (encrypted) JSON registration data to a file.
virtual bool demoModePersistent() const
Gets whether the product (plugin) is in demo mode (persistently!)
virtual std::string versionString() const
Gets the version string for the registration data.
virtual bool setPluginSerial(const std::string &serial_)
Sets the value of the product (plugin) serial number.
static bool load(const std::string &path_, const crypt::aes::Key &key_, const crypt::aes::InitVector &iv_, const bool create_, Registration ®__)
Convenience method to create a Registration object from (encrypted) JSON data in a file.
virtual std::string company() const
Gets the value of the company name element.
Registration(const Registration ®_)
Constructs a new Registration object from an existing Registration object (copy constructor)
virtual void setDemoMode(const bool isDemo_)
Sets whether the product (plugin) is in demo mode.
virtual bool setPluginUpgradeSerial(const std::string &serial_)
Sets the value of the product (plugin) upgrade serial.
virtual bool reload(const std::string &path_, const crypt::aes::Key &key_, const crypt::aes::InitVector &iv_)
Reloads the registration data from disk (as it is kept in memory at runtime, this might be necessary ...
virtual bool setCompany(const std::string &company_)
Sets the value of the company name element.
virtual std::unique_ptr< DictionaryPref > userData() const
Gets the dictionary for storing user data.
virtual bool setVersionString(const std::string &version_)
Sets the version string for the registration data.
virtual bool setAppSerial(const std::string &serial_)
Sets the value of the parent application serial number element.
virtual std::string pluginUpgradeSerial() const
Gets the value of the product (plugin) upgrade serial.
virtual std::string pluginSerial() const
Gets the value of the product (plugin) serial.
virtual bool setVersionNumber(const int32_t version_)
Sets the number version for the registration data.
virtual bool setName(const std::string &name_)
Sets the value of the user name element.
Registration()
Constructs an empty Registration object.
virtual ~Registration()
Destructs a Registration object.
virtual std::string name() const
Gets the value of the user name element.
virtual int32_t versionNumber() const
Gets the number version for the registration data.
virtual bool demoMode() const
Gets whether the product (plugin) is in demo mode.
virtual Registration & operator=(const Registration &rhs_)
Assigns one Registration object to another.
virtual bool isEmpty() const
Gets whether the target Registration object is empty (constructed with the default ctor)
virtual std::string appSerial() const
Gets the value of the parent application serial number element.
Wraps around an AES initialization vector's raw data for some added conveniences.
Definition: hdicoreCrypt.h:305
Wraps around an AES key's raw data for some added conveniences.
Definition: hdicoreCrypt.h:157
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.