On Tue, 13 Jul 1999, Jason Freund wrote:
> For the past ~1.5yrs, they were supposedly planning on this -- but all I
> have heard is that it kept getting delayed, so I don't know the status. But
> PalmCentral is in the beta stages for delivering realtime custom unlock keys
> via RegCode, so I suspect they will be ready any week now.
yes.. i proposed a Java based system to PalmCentral a while back,
basically a "plug-in" architecture.. developers write a simple
Java class (which implements a particular interface).. and send
it to the reseller..
the reseller then simply plugs it in.. a plugin call is made
(dynamic class loading) and wola.. everything works.. maybe
PGHQ can do this? (as it is custom - regardless if you use
regcode or not).
here are some sample classes:
Function.java
---
public interface Function
{
public int generateCode(String userID);
}
---
Testing.java // this is what all developers write (this is ALL)!
---
public class Testing
implements Function
{
public int generateCode(String userID)
{
short result;
result = (short)0x0000;
for (int i=0; (i < userID.length()) && (userID.charAt(i) != ' '); i++)
{
result += (byte)userID.charAt(i);
}
return (int)result;
}
}
---
i have two other classes, one for the class loader (which is
pretty much standard to Java) and the other being the main
program..
PGHQ or PalmCentral could write a Java servlet that has
something like this in it:
---
try {
myFunc = (Function)(loader.loadClass(args[0],true).newInstance());
System.out.println(args[0]);
System.out.println("userID: " + args[1]);
System.out.println("regCode: " + myFunc.generateCode(args[1]));
}
catch (Exception e) {
}
---
ie: a simple bit of output could be:
---
unix% java RegCode LodeRunner THIS_IS_A_TEST
RegCode v0.0
(c) Aaron Ardiri
LodeRunner
userID: THIS_IS_A_TEST
regCode: 2667
---
the first parameter "LodeRunner" is the class i wish to load,
i have written my own .java file for this.. and the userID
is "THIS_IS_A_TEST"..
it should not be too hard to integrate into a simple
HTML / CGI call to extract the regCode of "2667" from
the output.
i have this system running, and it is how i generate my
codes for my products.
comments anyone? if PGHQ or PalmCentral contact me on this,
i would have no problem in helping them get it implemented
on their sites!
i dont like the current real-time ... i dont like having
"unlocked" executables.. (too easy to distribute) and i
want my customers to have an online order!
Java has the ability to load classes dynamically.. so this
would be perfect.. all PGHQ and PalmCentral would have to
do is have a database of the programs that have the appropriate
reg code systems..
developers would NOT have to give them the source code!
the .class file would be good enough! (and you can obfuscate it
too!) :>
> And I agree with you that it would be great for developers to be able to get
> realtime sales data and summaries in addition to the daily CSV files.
realtime = faster processing (people get code ASAP)
CSV = good for backups.. keep track of everything.
cheers.
az.
--
Aaron Ardiri
Lecturer http://www.hig.se/~ardiri/
University-College i G�vle mailto:[EMAIL PROTECTED]
SE 801 76 G�vle SWEDEN
Tel: +46 26 64 87 38 Fax: +46 26 64 87 88
Mob: +46 70 352 8192 A/H: +46 26 10 16 11