Bug 869291 - 0003. Handle CP message. r=vicamo

This commit is contained in:
Chuck Lee 2013-07-03 11:30:17 +08:00
Родитель 9559d281ba
Коммит b808ec13b4
1 изменённых файлов: 9 добавлений и 2 удалений

Просмотреть файл

@ -28,6 +28,12 @@ XPCOMUtils.defineLazyGetter(this, "SL", function () {
return SL;
});
XPCOMUtils.defineLazyGetter(this, "CP", function () {
let CP = {};
Cu.import("resource://gre/modules/CpPduHelper.jsm", CP);
return CP;
});
XPCOMUtils.defineLazyServiceGetter(this, "gSystemMessenger",
"@mozilla.org/system-message-internal;1",
"nsISystemMessagesInternal");
@ -92,9 +98,10 @@ this.WapPushManager = {
} else if (contentType === "text/vnd.wap.sl" ||
contentType === "application/vnd.wap.slc") {
msg = SL.PduHelper.parse(data, contentType);
} else if (contentType === "text/vnd.wap.connectivity-xml" ||
contentType === "application/vnd.wap.connectivity-wbxml") {
msg = CP.PduHelper.parse(data, contentType);
} else {
// TODO: Bug 869291 - Support Receiving WAP-Push-CP
// Unsupported type, provide raw data.
msg = {
contentType: contentType,