Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
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 
12 namespace hdi
13 {
14  namespace plugin
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:
49  Registration();
50 
58  Registration(const Registration& reg_);
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 aiSerial() const;
154 
168  virtual bool setAISerial(const std::string& serial_);
169 
177  virtual std::string name() const;
178 
187  virtual bool setName(const std::string& name_);
188 
196  virtual std::string company() const;
197 
206  virtual bool setCompany(const std::string& company_);
207 
215  virtual std::string pluginSerial() const;
216 
225  virtual bool setPluginSerial(const std::string& serial_);
226 
234  virtual std::string pluginUpgradeSerial() const;
235 
244  virtual bool setPluginUpgradeSerial(const std::string& serial_);
245 
253  virtual bool demoMode() const;
254 
264  virtual void setDemoMode(const bool isDemo_);
265 
273  virtual bool demoModePersistent() const;
274 
282  virtual void setDemoModePersistent(const bool isDemo_);
283 
291  virtual int32_t versionNumber() const;
292 
301  virtual bool setVersionNumber(const int32_t version_);
302 
310  virtual std::string versionString() const;
311 
320  virtual bool setVersionString(const std::string& version_);
321 
329  virtual std::auto_ptr<DictionaryPref> userData() const;
330 
331 
332  private:
336  void* __data;
337  };
338 
339  typedef std::auto_ptr<Registration> RegistrationAP;
340  }
341 }
342 
343 #endif
344 // __HDI_CORE_REGISTRATION__
virtual ~Registration()
Destructs a Registration object.
virtual bool demoMode() const
Gets whether the product (plugin) is in demo mode.
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 setVersionString(const std::string &version_)
Sets the version string for the registration data.
virtual bool setPluginUpgradeSerial(const std::string &serial_)
Sets the value of the product (plugin) upgrade serial.
Wraps around an AES key's raw data for some added conveniences.
Definition: hdicoreCrypt.h:117
virtual void setDemoMode(const bool isDemo_)
Sets whether the product (plugin) is in demo mode.
virtual std::string aiSerial() const
Gets the value of the Illustrator serial number element.
virtual std::string name() const
Gets the value of the user name element.
virtual bool demoModePersistent() const
Gets whether the product (plugin) is in demo mode (persistently!)
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 void setDemoModePersistent(const bool isDemo_)
Sets whether the product (plugin) is in demo mode (persistently!)
virtual bool setPluginSerial(const std::string &serial_)
Sets the value of the product (plugin) serial number.
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.
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.
Registration()
Constructs an empty Registration object.
virtual std::string company() const
Gets the value of the company name element.
Definition: hdicoreaiArray.h:12
virtual int32_t versionNumber() const
Gets the number version for the registration data.
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 ...
Aids in user registration by reading/writing and de/encrypting the JSON data in a given file...
Definition: hdicoreRegistration.h:35
virtual std::string versionString() const
Gets the version string for the registration data.
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 bool setAISerial(const std::string &serial_)
Sets the value of the Illustrator serial number element.
virtual std::auto_ptr< DictionaryPref > userData() const
Gets the dictionary for storing user data.
virtual bool setCompany(const std::string &company_)
Sets the value of the company name element.
Wraps around an AES initialization vector's raw data for some added conveniences. ...
Definition: hdicoreCrypt.h:263
virtual bool setName(const std::string &name_)
Sets the value of the user name element.