On Wed, May 16, 2007 at 05:58:11AM -0600, Brian Edginton wrote:
> Here is a patch to add FreeBusy and Class information to Calendar and add
> some
> of the clear() I missed in Contact.
Thanks very much for your work on this. Some comments:
> + ///
> + /// Free Busy Flag
> + ///
> + /// This lists the available settings found in the device.
> + /// This list is based on information from MS Outlook 2007
> + /// (Free ==0 and Busy == 2)
> + /// This is FBTYPE in RFC2445 and is defined as
> + /// FREE, BUSY, BUSY-UNAVAILABLE and BUSY-TENTATIVE
> + ///
> +
> + char FreeBusyFlag;
I hesitate adding a field without at least some enums to define
what values are valid.
If you're looking at the recurring data in the Calendar class as a
guide on how to do this, please erase your memory. :-) That's
my horrible attempt at a recurrence API and I intend to fix that... I only
did it that way because I couldn't think of something better at the
time. Bad excuse I know, but I don't want to keep going in that direction.
As I use my own library for things like the opensync plugin,
it quickly becomes clear that the Calendar class needs to be more
bullet proof.
So when you remove the enums later on:
> - ///
> - /// Free Busy Flag
> - ///
> - /// This lists the available settings found in the device.
> - ///
> - enum FreeBusyFlag {
> - Free = 0,
> - Tentative,
> - Busy,
> - OutOfOffice
> - };
... I think this is a mistake. The enum should be FreeBusyFlagType,
and the FreeBusyFlag itself should be of that type.
Either that, or we need some member functions, such as SetBusy(),
SetFree(), etc. I think the enum will do for now.
> + /// This list is based on information from MS Outlook 2007
I'm curious why Outlook is being used as a reference for the Blackberry.
Maybe I'm just dense. :-) I just don't understand why it's in the comments.
> + ///
> + /// Class Flag
> + ///
> + /// This is also called classification in Evolution and it
> + /// is the equivilant of public or private in outlook
> + /// Private is set to 0x2 in Outlook
> + /// RFC2445 CLASS is PUBLIC, PRIVATE, CONFIDENTIAL
> + ///
> +
> + char ClassType;
What are the valid numeric values for ClassType? We need enums here too.
The goal is to separate the values we use in the record.h classes
from the values we find in the device. If the device uses a value
of 0 to mark an appointment as "free", it is fine if we use the same
value, but it must not be the same code. Because a future version
of the Blackberry might use a different value to mark "Free" in its
database, but applications that rely on Barry shouldn't have to care.
Free is still Free, and as long as they use the proper enums, it
will all just work. The library takes care of the translation.
The code in record.h is visible to the application, so has to be
careful not to do anything device-specific. The code in record.cc
is in the library, and can do device specific things, as long as
it matches the API in record.h
record.cc:
> @@ -741,6 +741,10 @@
> MobilePhone.clear();
> Pager.clear();
> PIN.clear();
> + Radio.clear();
> + WorkPhone2.clear();
> + HomePhone2.clear();
> + OtherPhone.clear();
[snip]
Good catch!
Btw, Barry uses tabs instead of spaces... if you could match your
patches to the existing coding style, that would be much appreciated. :-)
Thanks!
- Chris
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Barry-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/barry-devel