[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [coldsync-hackers] plugins (dynamic library) and search paths.
On Thu, 16 Aug 2001, Fred Gylys-Colwell wrote:
> search paths: I would like to have the .coldsyncrc file have a "search path"
> so that I do not need to specify full path for each conduit. The default path
> would be the same place that the default plugins get installed. Would anyone
> else find this useful? (I haven't actually done anything on this one yet.)
Yes. IMHO the way to do this would be to have an "options" block
in .coldsyncrc:
options {
path: /usr/local/sbin:/usr/local/libexec/conduits
}
or something. Obviously it'd be nice to be able to add to the path, rather
than just set it once and for all.
In any case, if I were doing it right now, I'd probably have the
parser create a linked list, put it in the configuration struct, and allow
run_conduit() to look at the list. If you want to do something like this,
go for it.
> plugins: I have added a routine that loads a library (using dlopen etc.) so
> that I can recompile my plugin without re-installing coldsync. It works under
> linux, but I would need help getting it to compile on other platforms. Should
> I clean it up and post a patch? To make it really clean, some of the data
> structures in "coldsync.h" would have to be visible to the plugin, like in
> include/pconn/something.h.
That can probably be arranged. What needs to be visible?
I originally conceived of conduits as being dlopen()able shared
libraries, but eventually decided to have them run as separate processes.
That way, if a conduit dumps core, it doesn't bring down the entire
application with it. Also, an external conduit can be setuid without
requiring the entire application to be setuid. Plus, IIRC, inter-process
pipes are more portable than dlopen(), though I could be wrong.
Having said this, I guess you could still make a case for shared
objects.
> Perhaps I have the wrong end of the stick on the second idea. Can a conduit
> talk to the palm directly? I want to use high level routines like DlpOpenDB,
> but that needs a PConnection. It looks like only one PConnection is created at
> the beginning, not one per conduit.
Sync conduits can use SPC. This is basically a DLP request with a
header in front. ColdSync relays this to the Palm, and relays the response
back to the conduit.
Obviously, this involves more processing and isn't as efficient as
the built-in generic conduit.
> Are there any examples of Sync conduits
> out there?
Take a look at "conduits/copy-appinfo".
--
Andrew Arensburger Actually, these _do_ represent the
arensb@ooblick.com opinions of ooblick.com!
Generic Tagline V 6.01
This message was sent through the coldsync-hackers mailing list. To remove
yourself from this mailing list, send a message to majordomo@thedotin.net
with the words "unsubscribe coldsync-hackers" in the message body. For more
information on Coldsync, send mail to coldsync-hackers-owner@thedotin.net.