[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-pim
Subject: AW: [Kde-pim] Needed extra features in KPilotDeviceLink?
From: "Reinhold Kainhofer" <reinhold () kainhofer ! com>
Date: 2002-04-07 21:52:45
[Download RAW message or body]
> Would a function
>
> Q(Ptr|Value)List<DBInfo> &KPilotDeviceLink::databaseList()
>
> be useful?
In my project manager conduits (MultiDB-conduit.cc) which needs to sync all
databases of a certain type/creatorID, I use the approach (similar to the
one you use in the vcal conduit) of a slot syncNextDB, which uses
fHandle->getNextDatabase(++dbnr, &dbinfo/*, cardno*/) to get the next
database. If the type/ID match, I start the sync with a slot
syncNextRecord(), otherwise a timer calls syncNextDB again to process the
next db. This way I avoid storing a list of databases that need to be
synced. So, I don't really need such a function. However a slight
modification (optional argument?) which gives all databases of a certain
type/CreatorID would be quite handy. Then I wouldn't need to check that
explicitely in my function, and syncNextDB would only be called on the
necessary databases (probably not such a speedup as it may sound, since the
databaseList function needs to do the type/CreatorID check then).
However, my approach (where the test is done in a virtual function) has the
advantage that child classes can implement a different function and select
databases to sync based on whatever criterion they need.
Reinhold
_______________________________________________
kde-pim mailing list
kde-pim@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic