d***@netzero.com
2004-11-23 18:30:27 UTC
Based on previous feedbacks and suggestions, I've updated design of the new Calendar dict and the Outlook-BITPIM-mapping as follows:
Outlook BITPIM
Subject description:'string'
Location location:'string'
Importance priority: int # 1-10, 1=highest priority
Start start: { date: (y,m,d), time: (h,m) }
End end: { date: (y,m,d), time: (h,m) }
IsRecurring repeat: # more on this later
ReminderSet alarm:int # key present if T, absent if F
ReminderMinutesBeforeStart alarm:int # minutes before start time
Categories categories:['string']
AllDayEvent if T: time components are absent in 'start' & 'end'.
EntryID serials: { serial1:'string' }
FolderID serials: { sourceuniqueid:'string' }
serials: { sourcetype: 'outlook' }
Body notes:'string'
ringtone:'string' # name of ringtone
wallpaper:'string' # name of wallpaper
'repeat': { # only one type (key) should be present for each event
'daily': { 'interval': int, 'dow': ['sun', ..., 'sat'] }
'monthly': { 'interval': int, 'dom': int }
'monthlynth': { 'interval': int, 'instance': int, 'dow': ['sun'..'sat'] }
'weekly': { 'interval': int, 'dow': ['sun'..'sat']
'yearly': { 'dom': int, 'moy': int }
'yearlynth': { 'instance': int, 'dow': ['sun'..'sat'], 'moy': int }
# optional
'suppressed': [(y,m,d)] # days excluded from this recurring event
}
Filtering paramters: (startdate, enddate, categories)
Users can either 'Replace' or 'Add' outlook events into BITPIM.
Preview pane will be available for users to select Outlook calendar foler,
view events pending for import, set filtering parameters, and OK or CANCEL.
conversion code:
This proposed approach allows existing com_phone* calendar code to work with the new (and existing) BP Calendar code:
com_phone:
class Profile:
+ BP_Calendar_Version=1 # default to existing Calendar data structure version=1
gui:
class MainWindow(wx.Frame):
def OnDataGetPhoneResults(self, exception, results):
...
# calendar
if results['sync'].has_key('calendar'):
v=results['sync']['calendar']
if v=='MERGE': raise Exception("Not implemented")
+ results['calendar_version']=self.phoneprofile.BP_Calendar_Version
self.calendarwidget.populatefs(results)
self.calendarwidget.populate(results)
....
def OnDataSendPhone(self, _):
...
### Calendar
v=dlg.GetCalendarSetting()
if v!=dlg.NOTREQUESTED:
merge=True
if v==dlg.OVERWRITE: merge=False
+ data['calendar_version']=self.phoneprofile.BP_Calendar_Version
self.calendarwidget.getdata(data)
todo.append( (self.wt.writecalendar, "Calendar", merge) )
...
Based on the Version value, appropriate conversion will be done on the calendar data.
As always, questions & comments are welcome.
-Joe Pham
________________________________________________________________
NetZero Platinum $9.95.
NetZero HiSpeed $14.95.
Sign up Today at http://www.netzero.net or
Visit Sam Goody, Suncoast or MediaPlay Stores.
Outlook BITPIM
Subject description:'string'
Location location:'string'
Importance priority: int # 1-10, 1=highest priority
Start start: { date: (y,m,d), time: (h,m) }
End end: { date: (y,m,d), time: (h,m) }
IsRecurring repeat: # more on this later
ReminderSet alarm:int # key present if T, absent if F
ReminderMinutesBeforeStart alarm:int # minutes before start time
Categories categories:['string']
AllDayEvent if T: time components are absent in 'start' & 'end'.
EntryID serials: { serial1:'string' }
FolderID serials: { sourceuniqueid:'string' }
serials: { sourcetype: 'outlook' }
Body notes:'string'
ringtone:'string' # name of ringtone
wallpaper:'string' # name of wallpaper
'repeat': { # only one type (key) should be present for each event
'daily': { 'interval': int, 'dow': ['sun', ..., 'sat'] }
'monthly': { 'interval': int, 'dom': int }
'monthlynth': { 'interval': int, 'instance': int, 'dow': ['sun'..'sat'] }
'weekly': { 'interval': int, 'dow': ['sun'..'sat']
'yearly': { 'dom': int, 'moy': int }
'yearlynth': { 'instance': int, 'dow': ['sun'..'sat'], 'moy': int }
# optional
'suppressed': [(y,m,d)] # days excluded from this recurring event
}
Filtering paramters: (startdate, enddate, categories)
Users can either 'Replace' or 'Add' outlook events into BITPIM.
Preview pane will be available for users to select Outlook calendar foler,
view events pending for import, set filtering parameters, and OK or CANCEL.
conversion code:
This proposed approach allows existing com_phone* calendar code to work with the new (and existing) BP Calendar code:
com_phone:
class Profile:
+ BP_Calendar_Version=1 # default to existing Calendar data structure version=1
gui:
class MainWindow(wx.Frame):
def OnDataGetPhoneResults(self, exception, results):
...
# calendar
if results['sync'].has_key('calendar'):
v=results['sync']['calendar']
if v=='MERGE': raise Exception("Not implemented")
+ results['calendar_version']=self.phoneprofile.BP_Calendar_Version
self.calendarwidget.populatefs(results)
self.calendarwidget.populate(results)
....
def OnDataSendPhone(self, _):
...
### Calendar
v=dlg.GetCalendarSetting()
if v!=dlg.NOTREQUESTED:
merge=True
if v==dlg.OVERWRITE: merge=False
+ data['calendar_version']=self.phoneprofile.BP_Calendar_Version
self.calendarwidget.getdata(data)
todo.append( (self.wt.writecalendar, "Calendar", merge) )
...
Based on the Version value, appropriate conversion will be done on the calendar data.
As always, questions & comments are welcome.
-Joe Pham
________________________________________________________________
NetZero Platinum $9.95.
NetZero HiSpeed $14.95.
Sign up Today at http://www.netzero.net or
Visit Sam Goody, Suncoast or MediaPlay Stores.