Here is the updated patches with the suggestions from Chris.
Index: src/record.cc
===================================================================
RCS file: /cvsroot/barry/barry/src/record.cc,v
retrieving revision 1.21
diff -u -r1.21 record.cc
--- src/record.cc 11 May 2007 19:58:20 -0000 1.21
+++ src/record.cc 18 May 2007 02:40:52 -0000
@@ -741,6 +741,10 @@
MobilePhone.clear();
Pager.clear();
PIN.clear();
+ Radio.clear();
+ WorkPhone2.clear();
+ HomePhone2.clear();
+ OtherPhone.clear();
FirstName.clear();
LastName.clear();
Company.clear();
@@ -754,9 +758,23 @@
Country.clear();
Title.clear();
PublicKey.clear();
+ URL.clear();
+ Prefix.clear();
+ HomeAddress1.clear();
+ HomeAddress2.clear();
+ HomeAddress3.clear();
Notes.clear();
-
- GroupLinks.clear();
+ UserDefined1.clear();
+ UserDefined2.clear();
+ UserDefined3.clear();
+ UserDefined4.clear();
+ HomeCity.clear();
+ HomeProvince.clear();
+ HomePostalCode.clear();
+ HomeCountry.clear();
+ Image.clear();
+
+ GroupLinks.clear();
Unknowns.clear();
m_FirstNameSeen = false;
@@ -1019,7 +1037,7 @@
// calendar field codes
#define CALFC_APPT_TYPE_FLAG 0x01
#define CALFC_SUBJECT 0x02
-#define CALFC_NOTES 0x03
+#define CALFC_NOTES 0x03
#define CALFC_LOCATION 0x04
#define CALFC_NOTIFICATION_TIME 0x05
#define CALFC_START_TIME 0x06
@@ -1029,6 +1047,7 @@
#define CALFC_NOTIFICATION_DATA 0x1a
#define CALFC_FREEBUSY_FLAG 0x1c
#define CALFC_TIMEZONE_CODE 0x1e // only seems to show up if recurring
+#define CALFC_CLASS_FLAG 0x28 // private flag from outlook
#define CALFC_ALLDAYEVENT_FLAG 0xff
#define CALFC_END 0xffff
@@ -1039,7 +1058,6 @@
{ CALFC_NOTIFICATION_TIME,"Notification Time",0,0, 0, 0, &Calendar::NotificationTime },
{ CALFC_START_TIME, "Start Time", 0, 0, 0, 0, &Calendar::StartTime },
{ CALFC_END_TIME, "End Time", 0, 0, 0, 0, &Calendar::EndTime },
- { CALFC_FREEBUSY_FLAG, "Free/Busy", 0, 0, &Calendar::FreeBusy, 0, 0 },
{ CALFC_END, "End of List",0, 0, 0, 0, 0 }
};
@@ -1127,6 +1145,20 @@
throw Error("Calendar::ParseField: not enough data in time zone code field");
}
return begin;
+
+ case CALFC_FREEBUSY_FLAG:
+ FreeBusyFlag = (FreeBusyFlagType)field->u.raw[0];
+ if( FreeBusyFlag > OutOfOffice ) {
+ throw Error("Calendar::ParseField: FreeBusyFlag out of range" );
+ }
+ return begin;
+
+ case CALFC_CLASS_FLAG:
+ ClassFlag = (ClassFlagType)field->u.raw[0];
+ if( ClassFlag > Private ) {
+ throw Error("Calendar::ParseField: ClassFlag out of range" );
+ }
+ return begin;
}
// if still not handled, add to the Unknowns list
@@ -1355,6 +1387,8 @@
"Thu", "Fri", "Sat" };
static const char *MonthNames[] = { "Jan", "Feb", "Mar", "Apr",
"May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
+ static const char *ClassTypes[] = { "Public", "Confidential", "Private" };
+ static const char *FreeBusy[] = { "Free", "Tentative", "Busy", "Out of Office" };
// FIXME - need a "check all data" function that make sure that all
// recurrence data is within range. Then call that before using
@@ -1363,6 +1397,8 @@
os << "Calendar entry: 0x" << setbase(16) << RecordId
<< " (" << (unsigned int)RecType << ")\n";
os << " All Day Event: " << (AllDayEvent ? "yes" : "no") << "\n";
+ os << " Class: " << ClassTypes[ClassFlag] << "\n";
+ os << " Free/Busy: " << FreeBusy[FreeBusyFlag] << "\n";
// cycle through the type table
for( const FieldLink<Calendar> *b = CalendarFieldLinks;
@@ -1452,6 +1488,7 @@
}
+
///////////////////////////////////////////////////////////////////////////////
// ServiceBookConfig class
Index: src/record.h
===================================================================
RCS file: /cvsroot/barry/barry/src/record.h,v
retrieving revision 1.19
diff -u -r1.19 record.h
--- src/record.h 11 May 2007 19:58:20 -0000 1.19
+++ src/record.h 18 May 2007 02:41:19 -0000
@@ -362,11 +362,43 @@
std::string Subject;
std::string Notes;
std::string Location;
- std::string FreeBusy;
time_t NotificationTime;
time_t StartTime;
time_t EndTime;
+ ///
+ /// 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
+ ///
+ enum FreeBusyFlagType {
+ Free = 0,
+ Tentative,
+ Busy,
+ OutOfOffice
+ };
+ FreeBusyFlagType FreeBusyFlag;
+
+ ///
+ /// 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
+ ///
+ enum ClassFlagType {
+ Public = 0,
+ Confidential,
+ Private
+ };
+
+ ClassFlagType ClassFlag;
+
///
/// Recurring data
///
@@ -389,18 +421,8 @@
//< set: WeekDays
};
- ///
- /// Free Busy Flag
- ///
- /// This lists the available settings found in the device.
- ///
- enum FreeBusyFlag {
- Free = 0,
- Tentative,
- Busy,
- OutOfOffice
- };
-
+
+
bool Recurring;
RecurringCodeType RecurringType;
unsigned short Interval; // must be >= 1
pgpTsoZRdWfQU.pgp
Description: PGP signature
------------------------------------------------------------------------- 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
