Digital Art Zone

 
     
Plugin registration / serial number question
Posted: 08 November 2012 01:28 PM   [ Ignore ]
Member
Rank
Total Posts:  27
Joined  2010-09-22

I’d like to write a single plugin that can have subsets of functionality individually unlocked via serial number.  For instance, a user initially purchases plugin featureset 1.  When they register the plugin with the provided serial number, only featureset 1 is activated.  Later they purchase featureset 2, and are given a second serial number.  After adding this serial number to the plugin registration featureset 2 is unlocked. 

Is this approach possible in the plugin registration/serial number framework, or would I be better off creating separate plugins for each featureset?  I see in the SDK docs that it is possible to have multiple registration prefixes for a single plugin.  However I’m not sure if this means that the plugin can carry multiple serial numbers, or just a single one from either prefix.  I also don’t see anywhere from within the SDK to ask what serial number(s) my plugin is currently registered with. 

Thanks

 

Profile
 
 
Posted: 09 November 2012 12:09 PM   [ Ignore ]   [ # 1 ]
Member
Rank
Total Posts:  106
Joined  2010-12-31
shoei321 - 08 November 2012 01:28 PM

I’d like to write a single plugin that can have subsets of functionality individually unlocked via serial number.  For instance, a user initially purchases plugin featureset 1.  When they register the plugin with the provided serial number, only featureset 1 is activated.  Later they purchase featureset 2, and are given a second serial number.  After adding this serial number to the plugin registration featureset 2 is unlocked. 

Is this approach possible in the plugin registration/serial number framework, or would I be better off creating separate plugins for each featureset?  I see in the SDK docs that it is possible to have multiple registration prefixes for a single plugin.  However I’m not sure if this means that the plugin can carry multiple serial numbers, or just a single one from either prefix.  I also don’t see anywhere from within the SDK to ask what serial number(s) my plugin is currently registered with. 

Thanks

As far as the current registration scheme works, you will need a plugin for each featureset.

You can create one plugin that is the core and then have the other featureset plugins be stubs.  In your code, where you determine what featureset should be allowed, you would use DzPluginMgr to find the plugin by name.  You would then ask if it is registered.  If you are worried you could also use DzClassFactory to instantiate a class that exists in the other plugin and call a method on it to ensure that it for sure is your plugin.

Profile