mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-16 22:04:36 +00:00
Bug 357397: adopting to revised wcap API
This commit is contained in:
parent
a4f616bacb
commit
ad7e277a69
@ -229,12 +229,9 @@
|
||||
try {
|
||||
var wcapCalendar = aItem.calendar.QueryInterface(
|
||||
Components.interfaces.calIWcapCalendar);
|
||||
var attendees = aItem.getAttendees({});
|
||||
for each(var attendee in attendees) {
|
||||
if (attendee.id == wcapCalendar.ownerId) {
|
||||
return attendee.participationStatus;
|
||||
}
|
||||
}
|
||||
var att = wcapCalendar.getInvitedAttendee(aItem);
|
||||
if (att)
|
||||
return att.participationStatus;
|
||||
} catch(e) {}
|
||||
return null;
|
||||
]]></body>
|
||||
@ -247,12 +244,13 @@
|
||||
try {
|
||||
var wcapCalendar = aItem.calendar.QueryInterface(
|
||||
Components.interfaces.calIWcapCalendar);
|
||||
var attendees = aItem.getAttendees({});
|
||||
for each(var attendee in attendees) {
|
||||
if (attendee.id == wcapCalendar.ownerId) {
|
||||
attendee.participationStatus = aStatus;
|
||||
var att = wcapCalendar.getInvitedAttendee(aItem);
|
||||
if (att) {
|
||||
att_ = att.clone();
|
||||
att_.participationStatus = aStatus;
|
||||
aItem.removeAttendee(att);
|
||||
aItem.addAttendee(att_);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} catch(e) {}
|
||||
return false;
|
||||
|
@ -125,8 +125,9 @@ InvitationsManager.prototype = {
|
||||
try {
|
||||
var wcapCalendar = calendar.QueryInterface(
|
||||
Components.interfaces.calIWcapCalendar);
|
||||
wcapCalendar = wcapCalendar.session.getCalendarByCalId(
|
||||
wcapCalendar.session.wrappedJSObject.defaultCalId);
|
||||
if (!wcapCalendar.isOwnedCalendar) {
|
||||
continue;
|
||||
}
|
||||
var listener = {
|
||||
mInvitationsManager: this,
|
||||
QueryInterface: function(aIID) {
|
||||
@ -187,7 +188,7 @@ InvitationsManager.prototype = {
|
||||
if (!Components.isSuccessCode(aStatus)) {
|
||||
return;
|
||||
}
|
||||
for each (item in aItems) {
|
||||
for each (var item in aItems) {
|
||||
this.mInvitationsManager.addItem(item);
|
||||
}
|
||||
},
|
||||
@ -458,12 +459,9 @@ InvitationsManager.prototype = {
|
||||
try {
|
||||
var wcapCalendar = item.calendar.QueryInterface(
|
||||
Components.interfaces.calIWcapCalendar);
|
||||
var attendees = item.getAttendees({});
|
||||
for each(var attendee in attendees) {
|
||||
if (attendee.id == wcapCalendar.ownerId) {
|
||||
return attendee.participationStatus;
|
||||
}
|
||||
}
|
||||
var attendee = wcapCalendar.getInvitedAttendee(item);
|
||||
if (attendee)
|
||||
return attendee.participationStatus;
|
||||
} catch(e) {}
|
||||
return null;
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user