Plugin registration / serial number question

shoei321shoei321 Posts: 113

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

Comments

  • dtammdtamm Posts: 126
    edited November 2012

    shoei321 said:
    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.

    Post edited by dtamm on
Sign In or Register to comment.