Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
hdicoreRegistration.h
Go to the documentation of this file.
1
7#ifndef __HDI_CORE_REGISTRATION__
8#define __HDI_CORE_REGISTRATION__
9
10#include "hdicoreTypes.h"
11
12namespace hdi
13{
14 namespace plat
15 {
16 class Registration;
17 }
18
19 namespace core
20 {
21 class DictionaryPref;
22
23 namespace crypt
24 {
25 namespace aes
26 {
27 class Key;
28 class InitVector;
29 }
30 }
31
36 {
37 public:
50
59
65 virtual ~Registration();
66
76 virtual Registration& operator=(const Registration& rhs_);
77
85 virtual bool isEmpty() const;
86
103 static bool load(
104 const std::string& path_,
105 const crypt::aes::Key& key_,
106 const crypt::aes::InitVector& iv_,
107 const bool create_,
108 Registration& reg__
109 );
110
121 virtual bool save(
122 const std::string& path_,
123 const crypt::aes::Key& key_,
124 const crypt::aes::InitVector& iv_
125 ) const;
126
140 virtual bool reload(
141 const std::string& path_,
142 const crypt::aes::Key& key_,
143 const crypt::aes::InitVector& iv_
144 );
145
153 virtual std::string appSerial() const;
154
171 virtual bool setAppSerial(const std::string& serial_);
172
180 virtual std::string name() const;
181
190 virtual bool setName(const std::string& name_);
191
199 virtual std::string company() const;
200
209 virtual bool setCompany(const std::string& company_);
210
218 virtual std::string pluginSerial() const;
219
228 virtual bool setPluginSerial(const std::string& serial_);
229
237 virtual std::string pluginUpgradeSerial() const;
238
247 virtual bool setPluginUpgradeSerial(const std::string& serial_);
248
256 virtual bool demoMode() const;
257
267 virtual void setDemoMode(const bool isDemo_);
268
276 virtual bool demoModePersistent() const;
277
285 virtual void setDemoModePersistent(const bool isDemo_);
286
294 virtual int32_t versionNumber() const;
295
304 virtual bool setVersionNumber(const int32_t version_);
305
313 virtual std::string versionString() const;
314
323 virtual bool setVersionString(const std::string& version_);
324
332 virtual std::unique_ptr<DictionaryPref> userData() const;
333
334
335 private:
339 void* __data;
340 };
341
342 typedef std::unique_ptr<Registration> RegistrationUP;
343 typedef std::shared_ptr<Registration> RegistrationSP;
344 typedef std::weak_ptr<Registration> RegistrationWP;
345 }
346}
347
348#endif
349// __HDI_CORE_REGISTRATION__
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 &reg__)
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 &reg_)
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.