Re: ContactDb implementation



-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160



- ----- Original Message -----
From: Matt Davey
Time: 29-01-07 10:31
> [David: is it just me, or do you seem to be posting messages with messed
> up Reply-To headers?]
>
> On Sun, 28 Jan 2007 22:52:34 EST., David Desrosiers wrote:
>> On Sun, 2007-01-28 at 17:07 +0100, Tom Billiet wrote:
>>> Does gnome-pilot offer a function like "get_pda_version(pilot_id)" or
>>> something similar? I can't find it.
>> The SysInfo struct in libpisock will be able to do that for you..
>
> This is available during a sync, but Tom's problem is that he needs
> to register a db with gnome-pilot when the application starts, and
> at that stage a sync is not available.
Well, yes and no.
When you do just a normal sync, the registering will only be done
every time a conduit is started. So when you sync twice, every conduit
is registered (and unregisterd) twice. So in this point of view this
would be possible.
The problem is the registering also happens when you open the
preferences dialog in the applet. At that point no sync is happening.
You actually don't need to know there which database to register, as
it doesn't matter, but you do need to know the version as the
preferences dialog will not be the same if you're syncing with
contactdb or addressdb.
>
> The 'romversion' is available as part of the stored per-device 'pilot'
> configuration structure, so you can probably retrieve that, but the
> problem is that you could have more than one pilot device defined, one
> OS5 and one OS3, and you'd want to register for both ContactsDb-Padd and
> AddressDb...
I think this is the way to do it, as the conduits will be registered
separately for every pilot (just tried it with both and m100 and z22).
There are however 3 problems:
1) I have no idea how to retrieve this config structure (it's stored
in ~/.gnome2/gnome-pilot.d/gpilotd, but I guess there must be already
a function available to read this? I see there is also a list of
databases available in the file Pilotcache$pilotid)
2) Is this information also available when you sync for the first time?
3) All the problems David raised :-)
>
> David laid out the version info that should be checked at runtime
> with more detail than I'm aware of.
>
> What I'd hoped was that 'AddressDb' would be available as a 'fake' Db
> on OS5.  If that is the case, then you could register for AddressDb,
> but switch to using Contact-Padd at runtime if appropriate.
This is the fact, a face addressDb is available (that's actually why
the addressconduit still works with os5 pda's)
But a switch at runtime is not that easy. As you just register the
conduit with a specific Db id to gnome-pilot, and it will look if that
database is available and begin calling all the function in the
conduit with gtk-signals.
>
> If that is not workable, then we should probably extend the gnome-pilot
> conduit API to allow a conduit to register for more than one database,
> or else for a 'special' dummy database that has semantics 'run once per
> sync'.  This should be doable.  The conduit would be responsible for not
> running more than once per sync even if called twice for different DBs.
Maybe, but I don't see me doing it. I've never worked with gtk before
and the signalling functions are still somewhat "black-magic" too me ;-)

Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFvfymkhN5jyFqyH4RA2dpAJ0R4GyTv+/NjeOtchvO6qjG49z8WQCfc3tt
mYl4fBotP8kzOXmA+gzmkMQ=
=+TQK
-----END PGP SIGNATURE-----




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]