PrevNextUpHome SophiaFramework UNIVERSE 5.3

7.2. Setting up the License Code to the Source Code

Setting up License Code

Set the license code at the *license = "heap://"; statement in the SFCApplet::Boot function generated by the SophiaFramework Appwizard.

* Write one of the following statements in the SFCApplet::Boot function.

Example 7.1. Format for the license code in SFCApplet::Boot function

heap://license_code
heap://license_code/
heap://license_code#cache:none
heap://license_code#cache:unified
heap://license_code#cache:separate
heap://license_code#cache:none/
heap://license_code#cache:unified/
heap://license_code#cache:separate/

Example 7.2. SFCApplet::Boot function: before setting the license code

SFCApplet::FactorySPP SFCApplet::Boot(AEECLSID id, SFXAnsiStringPtr license)
{
    *license = "heap://";

   // the following varies depending on the application
    return (id == AEECLSID_HELLOWORLD) ? (&HelloWorld::Factory) : (null);
}

Example 7.3. SFCApplet::Boot function: after setting the license code

SFCApplet::FactorySPP SFCApplet::Boot(AEECLSID id, SFXAnsiStringPtr license)
{
    *license = "heap://"
      "TIXDRQXNU5WHU8Y3Z9WOHWQR6Z3VPSDHDV5CR1S4XASPWLUHWAS7Z5Z2TGS3XMSAT3UPUQTLTARCYPSF"
      "UEJZ6ROSJWGUQSEYKR6V2U4VESMTQLHKZ6X7Y2VKXHWIX3XBU0Z7VHWHXIZBSGT5SPU3XLX0Z1Y4R3TC"
      "U6WGT9WHWIVNYHYCUCR9T3SMTEWPRNVAX1Y4VPW2YCY9YQV5R7Z9UIVHT6SDUPU2SIW6VCRCWBR2S4WQ"
      "UPYFWCYGT4VIT1WHXGYPTQSFYPWNV3ULRNWFW7RBRFVKUKS2YQSQYHW1TPUPXBZ6UEY2WOYKR7S3TAU4"
      "TQS6UHVFVEVLU3R5SDSKW7RPTNTPVQU2T4R8Z4VLUGEW3U98TLDR8";

    // This part varies depending on the application
    return (id == AEECLSID_HELLOWORLD) ? (&HelloWorld::Factory) : (null);
}
[Note] License Code

"TIXDRQXNU5WHU8Y3Z9WOHW .................. U2T4R8Z4VLUGEW3U98TLDR8/" is the license code for HelloWorld application.

The license code must correspond to the ClassID for application.

As the license code is very long and can be splitted by using the double quotation marks, it is usually written in multiple lines like the above.

Cache Option

A cache option is used in the license code to distinguish ARM7 from ARM9 / ARM11 / Snapdragon.

The ARM7 device such as A5304T may freeze if "cache:none" is not set.

Three kinds of cache options are available.

Example 7.4. Three kinds of cache options

heap://license_code#cache:none
heap://license_code#cache:unified
heap://license_code#cache:separate

In case of the ARM9 / ARM11 / Snapdragon device, set no cache options or "cache:separate."

  none unified separate undefined
ARM9 / ARM11 / Snapdragon Series X O O O
ARM7 series O X X X

Example 7.5. Set up the license code for the ARM9 / ARM11 / Snapdragon device

*license = "heap://"
    "TB5U78VCX9TFS0UAT9Z9V3YNY7R7X6TEUAX2XQH9R1X4VKXFRIZ9SKVKSIYJYDUAUQVEX6UMUQTEVNSG"
    "GZ7T1SMVPT5VLYKVHTFWIEZ0Y3XIW7UQUKS1TAXBW1Y0V9UNGXMVMSARNSCT0R6RISHYIXJY7Y1VHUGZ"
    "AUAZ8RMUBXMVFW0VNU5XDRJSLPX9X4YCXHXFRFRJS6XQUCVPWEZ9UGYATCFV1TDWLRBW1Y0S6BY2XMZ6"
    "YIVHBWEV2WFSJHYCYASPUNDR9Y8VDU9XBVETBSNT5SPVDY5SIR4X3RMU8V2TNYPWMXBXMXGYCTHYCX1U"
    "3S7YQYIRJW3TLZAUO2W4XCVGYEYQR4S9T7XF6TFUEV8WB21";

Example 7.6. Set up the license code for the ARM7 device

*license = "heap://"
    "TB5U78VCX9TFS0UAT9Z9V3YNY7R7X6TEUAX2XQH9R1X4VKXFRIZ9SKVKSIYJYDUAUQVEX6UMUQTEVNSG"
    "GZ7T1SMVPT5VLYKVHTFWIEZ0Y3XIW7UQUKS1TAXBW1Y0V9UNGXMVMSARNSCT0R6RISHYIXJY7Y1VHUGZ"
    "AUAZ8RMUBXMVFW0VNU5XDRJSLPX9X4YCXHXFRFRJS6XQUCVPWEZ9UGYATCFV1TDWLRBW1Y0S6BY2XMZ6"
    "YIVHBWEV2WFSJHYCYASPUNDR9Y8VDU9XBVETBSNT5SPVDY5SIR4X3RMU8V2TNYPWMXBXMXGYCTHYCX1U"
    "3S7YQYIRJW3TLZAUO2W4XCVGYEYQR4S9T7XF6TFUEV8WB21#cache:none";