------ Original Message ------
On 08/10/01, 07:54:05, Dharanendra S Pandit <[EMAIL PROTECTED]>
wrote regarding [OCF] Help sought:
> Hi *.*,
> I have a problem here. My requirement goes like this.
> 1. I will be using two Card Readers connected to two different COM
ports,
> COM1 and COM2.
> 2. My Card Service objects should be able to talk to either of these
> cards inserted in both the COM ports depending on my business logic.
> 3. I have a controlling object that will decide to which card must the
> CardService communicate.
> How will I acheive this?
You have misunderstood the way OCF works.
You do not choose which card a CardService communicates. OCF does this.
You register your CardServiceFactory with OCF, and that factory must look
at the card to see if any of the CardServices (yours) the factory
supplies can work with the card. If they can, then it must return the
class of the CardService implementation to OCF.
Then your application can request the specific card service from BOTH
readers, and the one that succeeds is the one you use.
Cheers
---
> 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.