A proposal for the core library connection interfaces. Ignore the fact that we cant connect multiple devices easily yet, one day we will (honest !).
First a bit of a refresher background. There are basically three ways to get a rapi connection with the public interface of librapi2. rapi_connection_from_path() rapi_connection_from_info() CeRapiInit() The third is needed with the first two but can also stand on it's own. All these are based on synce_info_new() in libsynce. The behaviour of synce_info_new(char *filename) varies depending on what *dccm we're using, and therefore so do the rapi functions. With odccm you'll always get the first device sent by GetConnectedDevices. With vdccm a NULL filename gets the last connected device, or requires a full path to the config file. I don't propose to get rid of these, but add a more consistent interface. SynceInfo * synce_info_new_from_name(const *char device_name) would use the device_name direct with odccm, or construct a full path for vdccm internally. If the named device is not found you get a NULL. We could still allow a NULL device_name to get the old behaviour. RapiConnection * rapi_connection_from_name() would then use this new libsynce function. rapi_connection_from_info() and stand-alone CeRapiInit could stay as is. All this is quite easy to implement, just wanted to see what any interested voices had to say. Ta Mark ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ SynCE-Devel mailing list SynCE-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synce-devel