On Fri, Apr 29, 2011 at 11:39 PM, Eduardo Beloni
<bel...@ossystems.com.br> wrote:
> Hello,
>
> We've been working in the smart card redirection.
>So far, our tests have produced great results, so we think it is time
>to ask you to take a look and test it. Here is the branch:
>
> https://github.com/OSSystems/FreeRDP/tree/wip%2Fsmartcard
>
> Please comment on the API integration, debugging issues or anything else you 
> may think of.
>

Hello Eduardo,


from rdpdr_types.h:

#ifdef WITH_SCARD
       void (*scard_wait_finished_ready)();
       IRP * (*scard_next_finished)();
       uint32 (*scard_create) ();
#endif

The scard plugin needs the callbacks to the plugin VirtualChannelWrite
functions, because of
the threads, which needs to write independently into the channel.

What about this:
rdpdr_main/VirtualChannelEntry(PCHANNEL_ENTRY_POINTS):

        plugin->ep.pVirtualChannelInit(&plugin->chan_plugin.init_handle,
&plugin->channel_def, 1,
                VIRTUAL_CHANNEL_VERSION_WIN2000, InitEvent);
        /** HACK: somehow the threads in the smartcard layer need to write IRP
        packets into the virtual channel. Currently this is not
        possible. I made an extension to that he smartcard layer knows
        the plugin
        TODO: decides how to do it in a proper way.
        */
        scard_service=devman_get_service_by_type(plugin->devman,
RDPDR_DTYP_SMARTCARD);
        if (scard_service) {
                // 1 == INIT
                printf("scard_service!\n");
                scard_service->scard_main_set_param(1,plugin);
        }

Thus I only have in rdpdr_types.h:

uint32 (*scard_main_set_param) (int function,void* data);

Which is the only communication function into the scard layer.

This would avoid to have rdpdr_scard.c in the rdpdr layer.
(The irp callbacks -and rdpdr_scard.c- can be all in the smartcard directory).
But of course this then needs a SERVICE* scard_service=NULL as
"shortcut" in rdpdr_main.c.

But that's only an idea.

regards,

Martin

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Freerdp-devel mailing list
Freerdp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freerdp-devel

Reply via email to