Matt Basta 2013-01-02 15:51:15 -05:00
Родитель c0cbb126c1
Коммит 794a122179
1 изменённых файлов: 22 добавлений и 9 удалений

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

@ -7,6 +7,9 @@ from ..constants import DESCRIPTION_TYPES
from ..specprocessor import Spec, LITERAL_TYPE from ..specprocessor import Spec, LITERAL_TYPE
_FULL_PERMISSIONS = ("readonly", "readwrite", "readcreate", "createonly")
class WebappSpec(Spec): class WebappSpec(Spec):
"""This object parses and subsequently validates webapp manifest files.""" """This object parses and subsequently validates webapp manifest files."""
@ -15,16 +18,26 @@ class WebappSpec(Spec):
"https://developer.mozilla.org/en/OpenWebApps/The_Manifest") "https://developer.mozilla.org/en/OpenWebApps/The_Manifest")
MIN_REQUIRED_ICON_SIZE = 128 MIN_REQUIRED_ICON_SIZE = 128
PERMISSIONS = ("alarm", "backgroundservice", "bluetooth", "browser", PERMISSIONS = (
"camera", "contacts", "desktop-notification", "alarms", "attention", "audio-channel-normal", "audio-channel-content",
"device-storage", "fmradio", "geolocation", "audio-channel-notification", "audio-channel-alarm",
"mobileconnection", "power", "push", "settings", "sms", "audio-channel-ringer", "audio-channel-telephony",
"storage", "systemclock", "network-http", "network-tcp", "audio-channel-publicnotification", "background-sensors",
"telephony", "wake-lock-screen", "webapps-manage", "wifi") "backgroundservice", "bluetooth", "browser", "camera", "contacts",
"desktop-notification", "device-storage:apps", "device-storage:music",
"device-storage:pictures", "device-storage:sdcard",
"device-storage:videos", "embed-apps", "fmradio", "geolocation",
"idle", "mobileconnection", "network-events", "networkstats-manage",
"open-remote-window", "permissions", "power", "settings", "sms",
"storage", "systemXHR", "tcp-socket", "telephony", "time", "voicemail",
"webapps-manage", "wifi-manage")
PERMISSIONS_ACCESS = { PERMISSIONS_ACCESS = {
"contacts": ("readonly", "readwrite", "readcreate", "createonly"), "contacts": _FULL_PERMISSIONS,
"device-storage": "device-storage:apps": _FULL_PERMISSIONS,
("readonly", "readwrite", "readcreate", "createonly"), "device-storage:music": _FULL_PERMISSIONS,
"device-storage:pictures": _FULL_PERMISSIONS,
"device-storage:sdcards": _FULL_PERMISSIONS,
"device-storage:videos": _FULL_PERMISSIONS,
"settings": ("readonly", "readwrite"), "settings": ("readonly", "readwrite"),
} }