Whitespace fixes
[barry.git] / TODO
blobd9c1e35143764503dabc0ba5550140b7483360ef
1 This file contains features that need work.  If you wish to tackle
2 any of them, please post a quick message to the mailing list of your
3 intentions, in order to avoid duplication of effort.
5 If you would like help or more information on any of these items,
6 please ask on the mailing list as well.
8 - Chris
9 <cdfrey@foursquare.net>
13 Reverse engineer date/time functions
14 ------------------------------------
15 The date/time calculations in src/time.cc:Message2Time() are still not
16 completely understood.  There is an explanation of sorts in an email
17 from Brian Edginton on the mailing list, but there are odd constants, etc.
18 Need to understand it fully and document it.
20 Mail from Brian Edginton on the topic:
21 http://sourceforge.net/mailarchive/message.php?msg_id=200706291619.05854.edge%40edginton.net
24 Fix GUI configure script to run a check for libtar
25 --------------------------------------------------
26 Currently, the autoconf scripts only take an argument on the command line
27 for the location of libtar, and assumes its location otherwise.
28 There should be an actual test for this, that tries linking against
29 libtar, and stops the configure script if not available.
32 An automated test suite
33 -----------------------
34 Testing Barry will be a challenge, since an actual device is required
35 for a large bulk of tests.  Ideally, it should be easy for someone to
36 make a full backup of their device, donate it to science, and then
37 restore their settings and data, since not everyone has a pure device
38 for testing.
40 Things that need automated testing:
42         - test all possible compile options (finished, see test/)
43         - test parsing of all supported records
44         - test building of all supported records
45         - test backup and restore, of random sets of databases, as well
46                 as the "all databases" set
47         - test LDAP / LDIF conversions
48         - test test Boost serialization backups and restore
49         - make sure it is possible to create records with the same
50                 SHA1 sums, purely programmatically
51         - test syncing of all fields, including international data / charsets
52         - test password support, and password safety catch (bad passwd X times)
53         - test modem functionality
55 Estimated time: open ended
59 Flesh out the Troubleshooting web doc
60 -------------------------------------
61 Every stumbling block that users run into should either be fixed
62 in the code or binary package, or documented in a Troubleshooting
63 document.  This troubleshooting document is already started, but
64 contributions are welcome from all users!
68 Fix i18n bug in current 0.22 opensync plugin
69 --------------------------------------------
70 For some reason, contacts with international characters in the names
71 do not come through properly during the sync.  The names are truncated
72 at the character.
74 It appears consistent that the Blackberry uses the CP1252 charset,
75 a.k.a. WINDOWS-1252, which is like ISO-8859-1, except that characters
76 0x80 to 0x9F are used as characters instead of escape codes.
78 This knowledge needs to be passed on to opensync in the data format.
79 This may be as simple as adding a proper charset field to the vCard data,
80 but it definitely needs testing and a patch.
82 See this mailing list thread:
83 http://sourceforge.net/mailarchive/message.php?msg_id=20080418033504.GA12750%40foursquare.net
85 Estimated time: a few dedicated hours in the best case
89 Porting opensync plugin to opensync 0.40
90 ----------------------------------------
91 There's two options to this item:
93         - simple way
94         - proper way
96 The difference between opensync 0.22 and 0.40 involves some API changes.
97 You should be able to note the changes in the example plugin code once
98 0.40 is released.
100 The simple way involves merely updating Barry's opensync plugin to match
101 the new API.  This shouldn't be too difficult, but you may run across
102 some small surprises.
104 The proper way involves:
106         - switching from the vcard/vevent formats to the opensync XML
107                 formats
108         - switching from storing state information in text files to
109                 storing it in the built in database (optional)
110         - making use of the new opensync time APIs to properly support
111                 timezones for all time operations
113 Switching away from text based vcard and vevent formats will remove
114 the burden of raw data parsing and formatting from the plugin itself,
115 and make use of the more tested opensync library.  Any bugs fixed
116 in opensync's parsers will automatically fix bugs in the Barry plugin.
118 Switching state storage formats may allow for greater flexibility
119 in supporting multiple devices.  This needs more research, but it
120 is the "way things are done" in opensync, and likely worth moving
121 in that direction.
123 Support for timezones will likely stress the opensync API as well as
124 the Barry API, but definitely needs to be done for completeness on both
125 sides of the equation.
127 Estimated time:   simple way: 10 hours if lucky
128                   proper way: open ended
132 Adding support for Tasks database to opensync plugin
133 ----------------------------------------------------
134 This will require research into the proper vformat for tasks.  If
135 the above port to 0.40 is complete, then use the XML format.  If not,
136 then find the appropriate v-format.
138 Estimated time: 16 hours
139 Depending on: ideally, wait for 0.40 XML format support
143 Adding support for Memos (notes) to opensync plugin
144 ---------------------------------------------------
145 Same as above, for Tasks.  If done together, may be able to save some time.
147 Estimated time: 16 hours
148 Depending on: ideally, wait for 0.40 XML format support
152 Adding support for recurring calendar items to opensync plugin
153 --------------------------------------------------------------
154 See vCalendar::RecurToBarryCal() in the opensync sources, and compare
155 with RecurToVCal().  See also iCal format RFC's.
156 http://tools.ietf.org/html/rfc2445
160 Reverse engineering java loader protocol
161 ----------------------------------------
162 This has not been done by any opensource Blackberry project out there,
163 to my knowledge, and would be most useful to Blackberry application
164 developers.
166 If you are a Blackberry app developer, this may interest you.
168 Estimated time: open ended
172 Multi-program Database and Modem Access
173 ---------------------------------------
174 The architectural challenge:
176         As Barry is not a single application, how do you access the
177         database while pppob is using the modem?
179 There are two viable ways of dealing with this.  One involves placing
180 a (hopefully thin) driver in the kernel, and the other involves using
181 a daemon and RPC calls.
183 My preference is to implement this using RPC calls if needed, and hammer
184 out all the implementation details in user space.  Once they are well
185 understood, a smaller kernel driver hook may be more easily written
186 that supports routing messages according to socket or application
187 needs.  For example, one application may register an interest in
188 database messages, another in javaloader messages, and another in the
189 multiple modem socket messages.
191 There is currently no support for this RPC daemon, but threading
192 support already exists.
194 Estimated tasks:
195         - design suitable RPC system
196         - implement support in the Barry library so it works
197                 with and without a daemon, using the same API
198 Estimated time: open ended
202 Add bluetooth serial support
203 ----------------------------
204 It is reported that it is possible to access the database through
205 Bluetooth using the older Blackberry serial protocol.  XmBlackBerry
206 has support for this and may be used as a reference.
208 The goal here would be to hide the bluetooth access behind the
209 same Barry library API, so that syncing with the opensync plugin
210 would be seamless whether plugged in via USB or Bluetooth.
212 Estimated tasks:
213         - research and design serial protocol stack to reuse as much
214                 library code as possible
215 Estimated time: unknown
219 Add internationalization (i18n) support to the backup GUI and tools
220 -------------------------------------------------------------------
221 Translations are needed for the GUI and command line tool prompts, as
222 well as support in the code for this translation.
224 Estimated tasks:
225         - update the code to support i18n
226         - translate to languages of interest
228 Estimated time: unknown
232 Write simple GUI for streamlining sync setup and action
233 -------------------------------------------------------
234 Syncing setup and operation is currently a tedious, complicated task.
235 A GUI that performed all the detailed setup and configuration work,
236 for a Blackberry-specific sync, using opensync libraries and plugins
237 for Evolution, Sunbird, etc, would be very helpful.
239 This would be much easier for an experienced GUI programmer, but there is
240 a learning curve for the opensync API.
242 Estimated tasks:
243         - document the settings required for Blackberry, and
244                 all intended plugins required
245         - write application that:
246                 - does the opensync configuration through the opensync
247                         API directly
248                 - scans the USB bus for available Blackberry devices using
249                         Barry
250                 - lives in the system tray watching for Blackberry devices
251         - if aiming for super ease of use, script a source build of
252                 all needed opensync components and install in private
253                 area to avoid conflict with system
254 Estimated time: unknown
255 Note: Depending how fast HAL, OpenSync, and Conduit are implemented,
256         this may never be needed... but if it existed today, there's a
257         lot of users who would be very happy...
261 Document the USB protocol
262 -------------------------
263 Currently the only english documentation for the Blackberry protocol
264 is the webpage by the Cassis project (found at
265 http://off.net/cassis/protocol-description.html).
267 The USB protocol is not nearly so well documented.  The best documentation
268 available can be found in the Barry header files: protocol.h and
269 protostructs.h.
271 Translating the code into documentation (into a wiki, that will hopefully
272 soon be available) is a great way to get involved in the project and
273 learn a lot about the Blackberry from a low level.
275 Unfortunately, Jedi mind tricks don't often work when trying to convince
276 people to write documentation for me... :-)
278 Estimated tasks:
279         - write, write, write
280 Estimated time: 40 hours (documentation expands to fill available time...)
284 Code cleanup
285 ------------
286 Code can always be improved.  There are two big ways to help:
288         - write an application using the Barry library
289         - improve the Barry library itself and send patches
291 By writing an application, you can provide crucial feedback on the ease
292 of use of the Barry API.  I'm very eager for such feedback.
294 Secondly, there is currently a lot of code ducplication in the record
295 classes, and a careful refactoring is required.  I would be open to a class
296 hierarchy, with possibly private or protected inheritance.  My primary
297 concern is object safety when using the record classes as objects in
298 STL containers, with a secondary concern to make it easier to
299 abstractly work with a record.  This implies a careful mix of
300 virtual functions and a generic record base class.  Patches in this
301 area will be thoughtfully considered.
303 Estimated tasks (refactoring):
304         - design safe hierarchy
305         - move common code to base class
306         - make sure all record classes use the common record API
307         - test
308 Estimated time: 7 hours
312 C API wrapper
313 -------------
314 For those that write applications in C, a C API wrapper has been started
315 in the cbarry.h header.  It has not yet been implemented, but should be
316 straightforward.
318 Estimated tasks:
319         - finish some API design work (head not fully complete)
320         - implement all functions (about 50)
321         - write test application, or test suite, for C API
322 Estimated time: unknown
326 Python wrappers and example code
327 --------------------------------
328 For those that write applications in Python, a SWIG wrapper has been
329 started by H Miz Jones.  This is partially functional, and involves
330 working with the Barry API, and may introduce changes to it depending
331 how hard it is to translate things to the Python world.
333 The SWIG wrapper scripts have not yet been publically released, but
334 please contact me if you are interested.
336 Estimated tasks:
337         - finish C++ / Python integration (possible template issues)
338         - finish SWIG wrapper
339 Estimated time: unknown
343 Command line backup and restore
344 -------------------------------
345 The only command line backup currently available is the one in btool,
346 using the -f and -s switches.  This does not backup exact data from
347 the device, but parses it, stores it in the Boost serialization format,
348 and then reverses the process for restore.  This is a great test
349 for the Barry library, but not so great for backup, since not all
350 databases can be parsed.
352 There is already an exact backup and restore interface with the GUI, but
353 there is a lot of useful functionality trapped in a layer of GUI
354 that could be just as useful from the command line.  Tasks such as a nightly
355 cron backup of any Blackberry devices attached to the system would be more
356 easily done via command line.
358 You could add command line arguments to the barrybackup program to skip
359 the GUI (tricky and possibly error prone), or you could pull the backup
360 functionality into a standalone command line utility (more work, but smarter
361 in the long run).  This is mostly a code refactoring job, consisting of
362 all working code that's already there, and I know there are people
363 who would thank you. :-)
365 Note: see also the perl scripts in contrib/
367 Estimated tasks:
368         - split out tar and backup functionality code into shared library
369         - write and test command line tool
370 Estimated time: 6 hours
374 Misc Low Level Todo Items:
375 --------------------------
376 - test whether sorting of contact records is required before
377         uploading data to the device... test whether it is ok
378         to upload a GroupLink item in the middle of a contact
379         upload, even before all the groups have been sent...
380         if ok, remove the sorting code from Contact, Message, and
381         Calendar classes