The Method getCardType should check wether this factory knows that type
of card or not.
An implementation that "knows" cards with the ATR 0x3b 0xf0 0x11 0x00
0xff 0x00 (the JCWDE sends this ATR!) could look like this:

    protected CardType getCardType(CardID cardID, CardServiceScheduler
scheduler)
    {
        try {
            if (cardID.equals(new CardID(jcwdeATR))){   // check if we
know that type of card.
                services_.addElement(xxxCardService.class); // yes ->
add services to vector of supported services
                return new CardType("3bf01100ff00".hashCode()); //
return a new CardType-object
            }
        } catch (CardTerminalException cte) {System.out.println(cte);}
        return CardType.UNSUPPORTED; // we dont know that kind of card,
so we dont support it.

    }
 
The method getClasses() should then return an Enumeration with all the
supported cardservices.

This implemention is due to Silvain Ferey!

Regards, Robert


Paul Sheridan wrote:
> 
> Sorry to bother you again,
> But is there somewhere I can get a OCF 1.2 example of applet proxy and associated 
>factory ?  how do I implement a getCardType method rather than the knows() one etc.
> ?
> 
> Best Regards,
> Paul
> 
> _____________________________________
> 
> Get your free E-mail at http://www.ireland.com
> 
> ---
> > Visit the OpenCard web site at http://www.opencard.org/ for more
> > information on OpenCard---binaries, source code, documents.
> > This list is being archived at http://www.opencard.org/archive/opencard/
> 
> ! To unsubscribe from the [EMAIL PROTECTED] mailing list send an email
> ! to
> !                           [EMAIL PROTECTED]
> ! containing the word
> !                           unsubscribe
> ! in the body.
begin:vcard 
n:Panzer;Robert
tel;cell:+49-172-5248375
tel;fax:+49-5251-606697
tel;home:+49-5254-12469
tel;work:+49-5251-606680
x-mozilla-html:TRUE
org:University of Paderborn;Dept. for CS
adr:;;Schlo�strasse 49;Paderborn;;33104;Germany
version:2.1
email;internet:[EMAIL PROTECTED]
x-mozilla-cpt:;18112
fn:Robert Panzer
end:vcard

Reply via email to