43
edits
| Mohitkanwal (talk | contribs)  (→50x handling workflow:  new section) | Mohitkanwal (talk | contribs)  | ||
| Line 8: | Line 8: | ||
| == 50x handling workflow == | == 50x handling workflow == | ||
| ===Online Mode=== | |||
| AddItem/Adopt Item  | |||
| * '''calCachedCalendar::adoptItem''' calls up caldav::doAdoptItem and passes "aListener" which inserts the item into the cache. | |||
| * caldav::doAdoptItem sends the item info to the server and passes "aListener" to getUpdatedItem() which invokes it | |||
| * getUpdatedItem() invokes "aListener" and it creates an event in the cache | |||
| ===50x Error Mode=== | |||
| * '''calCachedCalendar::adoptItem''' calls up caldav::doAdoptItem and passes "aListener" which inserts the item into the cache. | |||
| * caldav::doAdoptItem sends request to server and passes it "addListener" | |||
| * the request fails coz of 50x error and "addListener" is invoked | |||
| * "addListener" invokes adoptItemOrUseCache() and passes it "aListener" and useCache set to 'false' | |||
| * adoptItemOrUseCache invokes adoptOfflineItem() and passes it "aListener" | |||
| * adoptOfflineItem() invokes "aListener" with a success code | |||
| ===Reconcile Mode=== | |||
| * reconcileAddedItems calls up addItemOrUseCache with useCache set to 'true' and passes in "addListener" | |||
| * addItemOrUseCache calls up caldav::addItem and passes in "addListener" | |||
| * if the server update is successful, addListener is invoked with success and it removes the offline flag from the item | |||
| * | |||
edits