© 2009 OMTP Ltd. All rights reserved. OMTP and OMTP BONDI are registered trademarks of OMTP Ltd.
module bondi { typedef sequence<DOMString> StringArray; typedef sequence<octet> ByteArray; typedef sequence<short> ShortArray; typedef sequence<long> LongArray; typedef sequence<float> FloatArray; typedef Object Map; [NoInterfaceObject, Callback] interface SuccessCallback { void onSuccess (in Object ob); }; [NoInterfaceObject, Callback] interface ErrorCallback { void onError (in GenericError error); }; interface GenericError { readonly attribute unsigned short code; }; interface DeviceAPIError : GenericError { const unsigned short UNKNOWN_ERROR = 10000; const unsigned short INVALID_ARGUMENT_ERROR = 10001; const unsigned short NOT_FOUND_ERROR = 10002; const unsigned short PENDING_OPERATION_ERROR = 10003; const unsigned short IO_ERROR = 10004; const unsigned short NOT_SUPPORTED_ERROR = 10005; }; interface SecurityError : GenericError { const unsigned short PERMISSION_DENIED_ERROR = 20000; }; interface PendingOperation { boolean cancel (); }; [NoInterfaceObject] interface bondi { PendingOperation requestFeature (in SuccessCallback successCallback, in ErrorCallback errorCallback, in DOMString name) raises (DeviceAPIError, SecurityError); }; module appconfig { interface AppConfigManager { DOMString get (in DOMString key) raises (SecurityError); void set (in DOMString key, in DOMString value) raises (SecurityError); }; }; module applauncher { [NoInterfaceObject, Callback] interface AppLauncherSuccessCallback { void onSuccess (in StringArray obj); }; interface AppLauncherManager { PendingOperation launchApplication (in SuccessCallback successCallback, in ErrorCallback errorCallback, in DOMString appURI, [Optional] in StringArray params) raises (SecurityError, DeviceAPIError); PendingOperation getInstalledApplications (in AppLauncherSuccessCallback successCallback, in ErrorCallback errorCallback) raises (DeviceAPIError); DOMString getDefaultApplication (in DOMString mimeType) raises (DeviceAPIError); }; }; module camera { typedef sequence<Camera> CameraArray; typedef sequence<unsigned short> FeatureArray; typedef sequence<any> FeatureValueArray; [NoInterfaceObject, Callback] interface CameraSuccessCallback { void onSuccess ([Optional] in DOMString file); }; [NoInterfaceObject, Callback] interface ViewFinderSuccessCallback { void onSuccess (in DOMString uri); }; interface CameraError : GenericError { const unsigned short CAMERA_ALREADY_IN_USE_ERROR = 0; const unsigned short CAMERA_FEATURE_NOT_SUPPORTED_ERROR = 1; const unsigned short CAMERA_VIEWFINDER_SHOW_ERROR = 2; const unsigned short CAMERA_CAPTURE_ERROR = 3; }; interface CameraResolution { attribute unsigned long horizontal; attribute unsigned long vertical; }; interface CameraManager { CameraArray getCameras () raises (SecurityError); }; interface Camera { const unsigned short QUALITY = 0; const unsigned short RESOLUTION_VIDEO = 1; const unsigned short RESOLUTION_PICTURE = 2; const unsigned short ZOOM_LEVEL_OPTICAL = 3; const unsigned short ZOOM_LEVEL_DIGITAL = 4; const unsigned short BRIGHTNESS = 5; const unsigned short WHITE_BALANCE_MODE = 6; const unsigned short CONTRAST = 7; const unsigned short NIGHT_MODE = 8; const unsigned short FOCUS_MODE = 9; const unsigned short FOCUS = 10; const unsigned short FLASH = 11; const unsigned short LIGHT = 12; const unsigned short FRAME_RATE = 13; const unsigned short AUDIO = 14; readonly attribute unsigned short id; readonly attribute DOMString name; FeatureArray getSupportedFeatureKeys (); FeatureValueArray getSupportedFeatureValues (in unsigned short featureKey) raises (DeviceAPIError, CameraError); unsigned short getMaximumFeatureValue (in unsigned short featureKey) raises (DeviceAPIError, CameraError); unsigned short getMinimumFeatureValue (in unsigned short featureKey) raises (DeviceAPIError, CameraError); any getFeatureValue (in unsigned short featureKey) raises (DeviceAPIError, CameraError); void setFeatureValue (in unsigned short featureKey, in any featureValue) raises (DeviceAPIError, CameraError); PendingOperation startViewFinderStreaming (in ViewFinderSuccessCallback successCallback, in ErrorCallback errorCallback) raises (SecurityError, CameraError); void stopViewFinderStreaming () raises (SecurityError); PendingOperation takePicture (in CameraSuccessCallback successCallback, in ErrorCallback errorCallback) raises (SecurityError, DeviceAPIError, CameraError); PendingOperation beginRecording (in CameraSuccessCallback successCallback, in ErrorCallback errorCallback) raises (SecurityError, DeviceAPIError, CameraError); void endRecording (in CameraSuccessCallback successCallback, in ErrorCallback errorCallback) raises (DeviceAPIError, CameraError); }; }; module commlog { typedef sequence<SMS> SMSArray; typedef sequence<MMS> MMSArray; typedef sequence<Email> EmailArray; typedef sequence<Call> CallArray; [NoInterfaceObject, Callback] interface CommLogSMSSuccessCallback { void onSuccess (in SMSArray obj); }; [NoInterfaceObject, Callback] interface CommLogMMSSuccessCallback { void onSuccess (in MMSArray obj); }; [NoInterfaceObject, Callback] interface CommLogEmailSuccessCallback { void onSuccess (in EmailArray obj); }; [NoInterfaceObject, Callback] interface CommLogCallSuccessCallback { void onSuccess (in CallArray obj); }; interface CommLogManager { const unsigned short INBOX_FOLDER = 0; const unsigned short OUTBOX_FOLDER = 1; const unsigned short SENT_FOLDER = 2; const unsigned short DRAFT_FOLDER = 3; const unsigned short MISSED_CALLS_FOLDER = 0; const unsigned short RECEIVED_CALLS_FOLDER = 1; const unsigned short INITIATED_CALLS_FOLDER = 2; PendingOperation getSMSLog (in CommLogSMSSuccessCallback successCallback, in ErrorCallback errorCallback, in ShortArray messageFolders, [Optional] in Map filter) raises (SecurityError, DeviceAPIError); PendingOperation getMMSLog (in CommLogMMSSuccessCallback successCallback, in ErrorCallback errorCallback, in ShortArray messageFolders, [Optional] in Map filter) raises (SecurityError, DeviceAPIError); PendingOperation getEmailLog (in CommLogEmailSuccessCallback successCallback, in ErrorCallback errorCallback, in ShortArray messageFolders, [Optional] in Map filter) raises (SecurityError, DeviceAPIError); PendingOperation getCallLog (in CommLogCallSuccessCallback successCallback, in ErrorCallback errorCallback, in ShortArray callFolder, [Optional] in Map filter) raises (SecurityError, DeviceAPIError); StringArray getSMSSupportedPropertyKeys (); StringArray getMMSSupportedPropertyKeys (); StringArray getEmailSupportedPropertyKeys (); StringArray getCallSupportedPropertyKeys (); }; [Callback] interface Call { readonly attribute DOMString phoneNumber; readonly attribute Date startTime; readonly attribute unsigned long duration; readonly attribute DOMString id; readonly attribute unsigned short folder; }; }; module devicestatus { [NoInterfaceObject, Callback] interface PropertyChangeSuccessCallback { void onPropertyChange (in PropertyRef property, in Object newValue); }; interface DeviceStatusError : GenericError { const unsigned short READ_ONLY_PROPERTY_ERROR = 1; }; interface DeviceStatusManager { StringArray listVocabularies (); void setDefaultVocabulary (in DOMString vocabulary) raises (DeviceAPIError); StringArray listAspects (); StringArray getComponents (in AspectName aspect) raises (DeviceAPIError); StringArray listProperties (in AspectName aspect) raises (DeviceAPIError); Object getPropertyValue (in PropertyRef prop) raises (SecurityError, DeviceAPIError); void setPropertyValue (in PropertyRef pref, in Object value) raises (SecurityError, DeviceAPIError, DeviceStatusError); unsigned long watchPropertyChange (in PropertyRef pref, in PropertyChangeSuccessCallback listener, in Map options) raises (SecurityError, DeviceAPIError); void clearPropertyChange (in unsigned long watchHandler) raises (DeviceAPIError); }; interface AspectName { attribute DOMString aspect; attribute DOMString vocabulary; }; interface PropertyRef { attribute DOMString vocabulary; attribute DOMString component; attribute DOMString aspect; attribute DOMString property; }; }; module filesystem { typedef sequence<File> FileArray; [NoInterfaceObject, Callback] interface FileSystemSuccessCallback { void onSuccess (in File file); }; interface FileSystemManager { readonly attribute unsigned long maxPathLength; DOMString getDefaultLocation (in DOMString specifier, in unsigned long minFreeSpace) raises (DeviceAPIError); StringArray getRootLocations (); File resolve (in DOMString location) raises (SecurityError, DeviceAPIError); void registerEventListener (in FileSystemListener listener) raises (DeviceAPIError); void unregisterEventListener (in FileSystemListener listener) raises (DeviceAPIError); }; interface FileSystemListener { void mountEvent (in DOMString location); void unmountEvent (in DOMString location); }; interface File { readonly attribute File parent; readonly attribute boolean readOnly; readonly attribute boolean isFile; readonly attribute boolean isDirectory; readonly attribute Date created; readonly attribute Date modified; readonly attribute DOMString path; readonly attribute DOMString name; readonly attribute DOMString absolutePath; readonly attribute unsigned long fileSize; readonly attribute Map metadata; FileArray listFiles () raises (SecurityError, DeviceAPIError); FileStream open (in DOMString mode, in DOMString encoding) raises (SecurityError, DeviceAPIError); PendingOperation copyTo (in FileSystemSuccessCallback successCallback, in ErrorCallback errorCallback, in DOMString filePath, in boolean overwrite) raises (SecurityError, DeviceAPIError); PendingOperation moveTo (in FileSystemSuccessCallback successCallback, in ErrorCallback errorCallback, in DOMString filePath, in boolean overwrite) raises (SecurityError, DeviceAPIError); File createDirectory (in DOMString dirPath) raises (SecurityError, DeviceAPIError); File createFile (in DOMString filePath) raises (SecurityError, DeviceAPIError); File resolve (in DOMString filePath) raises (SecurityError, DeviceAPIError); boolean deleteDirectory (in boolean recursive) raises (SecurityError, DeviceAPIError); boolean deleteFile () raises (SecurityError, DeviceAPIError); }; interface FileStream { readonly attribute boolean eof; attribute unsigned long position setraises (DeviceAPIError); readonly attribute unsigned long bytesAvailable; void close (); DOMString read (in unsigned long charCount) raises (DeviceAPIError); ByteArray readBytes (in unsigned long byteCount) raises (DeviceAPIError); DOMString readBase64 (in unsigned long byteCount) raises (DeviceAPIError); void write (in DOMString stringData) raises (DeviceAPIError); void writeBytes (in ByteArray byteData) raises (DeviceAPIError); void writeBase64 (in DOMString base64Data) raises (DeviceAPIError); }; }; module geolocation { [NoInterfaceObject, Callback] interface PositionSuccessCallback { void handleEvent (in Position position); }; [NoInterfaceObject, Callback] interface PositionErrorCallback { void handleEvent (in PositionError error); }; interface Geolocation { void getCurrentPosition (in PositionSuccessCallback successCallback, [Optional] in PositionErrorCallback errorCallback, [Optional] in PositionOptions options) raises (SecurityError, DeviceAPIError); long watchPosition (in PositionSuccessCallback successCallback, [Optional] in PositionErrorCallback errorCallback, [Optional] in PositionOptions options) raises (SecurityError, DeviceAPIError); void clearWatch (in long id); }; interface Coordinates { readonly attribute double latitude; readonly attribute double longitude; readonly attribute double altitude; readonly attribute double accuracy; readonly attribute double altitudeAccuracy; readonly attribute double heading; readonly attribute double speed; }; interface Position { readonly attribute long timestamp; readonly attribute Coordinates coords; }; interface PositionError { const unsigned short UNKNOWN_ERROR = 0; const unsigned short POSITION_UNAVAILABLE_ERROR = 2; const unsigned short TIMEOUT_ERROR = 3; readonly attribute unsigned short code; readonly attribute DOMString message; }; [NoInterfaceObject, Callback] interface PositionOptions { attribute long timeout; attribute long maximumAge; attribute boolean enableHighAccuracy; }; }; module messaging { typedef sequence<MMSSlide> MMSSlideArray; interface MessagingError : GenericError { const unsigned short OUT_OF_COVERAGE_ERROR = 1; const unsigned short MMS_VIDEO_SLIDE_ERROR = 2; const unsigned short MMS_MESSAGE_SIZE_EXCEEDED_ERROR = 3; }; interface MessagingManager { const unsigned short INBOX_FOLDER = 0; const unsigned short OUTBOX_FOLDER = 1; const unsigned short SENT_FOLDER = 2; const unsigned short DRAFTS_FOLDER = 3; SMS createSMS ([Optional] in Map smsParams) raises (DeviceAPIError); MMS createMMS ([Optional] in Map mmsParams) raises (DeviceAPIError); Email createEmail ([Optional] in Map emailParams) raises (DeviceAPIError); PendingOperation sendSMS (in SuccessCallback successCallback, in ErrorCallback errorCallback, in SMS sms) raises (SecurityError, DeviceAPIError, MessagingError); PendingOperation sendMMS (in SuccessCallback successCallback, in ErrorCallback errorCallback, in MMS mms) raises (SecurityError, DeviceAPIError, MessagingError); PendingOperation sendEmail (in SuccessCallback successCallback, in ErrorCallback errorCallback, in Email email) raises (SecurityError, DeviceAPIError, MessagingError); PendingOperation getAvailableEmailAccounts (in SuccessCallback successCallback, in ErrorCallback errorCallback) raises (SecurityError, DeviceAPIError); }; interface SMS { readonly attribute DOMString id; readonly attribute Date datetime; attribute DOMString body setraises (DeviceAPIError); attribute boolean store setraises (DeviceAPIError); readonly attribute unsigned short folder; readonly attribute boolean read; Object getProperty (in DOMString propertyName) raises (DeviceAPIError); void setProperty (in DOMString propertyName, in DOMString propertyValue) raises (DeviceAPIError); StringArray getRecipients (); DOMString getRecipient (in unsigned short index) raises (DeviceAPIError); void appendRecipient (in DOMString phoneNumber) raises (DeviceAPIError); void clearRecipients (); }; interface MMSSlide { attribute unsigned long duration; attribute File image setraises (MessagingError); attribute unsigned long imageBegin; attribute unsigned long imageEnd; attribute File audio setraises (MessagingError); attribute unsigned long audioBegin; attribute unsigned long audioEnd; attribute DOMString text setraises (MessagingError); attribute unsigned long textBegin; attribute unsigned long textEnd; attribute File video setraises (MessagingError); attribute unsigned long videoBegin; attribute unsigned long videoEnd; }; interface MMS { const unsigned short MULTIPART_MIXED = 0; const unsigned short MULTIPART_RELATED = 1; readonly attribute DOMString id; readonly attribute Date datetime; attribute DOMString multipartMixedBody setraises (DeviceAPIError); attribute boolean store setraises (DeviceAPIError); readonly attribute unsigned long folder; attribute DOMString subject setraises (DeviceAPIError); readonly attribute boolean read; attribute unsigned short messageType; attribute MMSSlideArray slides; Object getProperty (in DOMString propertyName) raises (DeviceAPIError); void setProperty (in DOMString propertyName, in Object propertyValue) raises (DeviceAPIError); StringArray getRecipients (); DOMString getRecipient (in unsigned long index) raises (DeviceAPIError); void appendRecipient (in DOMString phoneNumber) raises (DeviceAPIError); void clearRecipients (); FileArray getAttachments (); File getAttachment (in unsigned short index) raises (DeviceAPIError); void appendAttachment (in File myAttachment) raises (SecurityError, DeviceAPIError); void clearAttachments () raises (DeviceAPIError); }; interface Email { readonly attribute DOMString id; readonly attribute Date datetime; attribute DOMString from setraises (DeviceAPIError); attribute DOMString body setraises (DeviceAPIError); attribute boolean store setraises (DeviceAPIError); readonly attribute unsigned short folder; attribute DOMString subject setraises (DeviceAPIError); readonly attribute boolean read; DOMString getProperty (in DOMString propertyName) raises (DeviceAPIError); void setProperty (in DOMString propertyName, in DOMString propertyValue) raises (DeviceAPIError); StringArray getToList (); DOMString getTo (in unsigned short index) raises (DeviceAPIError); StringArray getCCList (); DOMString getCC (in unsigned short index) raises (DeviceAPIError); StringArray getBCCList (); DOMString getBCC (in unsigned short index) raises (DeviceAPIError); void appendTo (in DOMString emailAddress) raises (DeviceAPIError); void clearTo (); void appendCC (in DOMString emailAddress) raises (DeviceAPIError); void clearCC (); void appendBCC (in DOMString emailAddress) raises (DeviceAPIError); void clearBCC (); FileArray getAttachments (); File getAttachment (in unsigned short index) raises (DeviceAPIError); void appendAttachment (in File myAttachment) raises (SecurityError, DeviceAPIError); void clearAttachments (); }; }; module gallery { typedef sequence<Gallery> GalleryArray; typedef sequence<MediaItem> MediaItemArray; interface GalleryError : GenericError { const unsigned short GALLERY_OPEN_ERROR = 1; const unsigned short GALLERY_NOT_OPEN_ERROR = 2; }; interface GalleryManager { GalleryArray getGalleries (); }; interface Gallery { const unsigned short MEDIA_ITEM_TYPE_UNDEFINED = 0; const unsigned short MEDIA_ITEM_TYPE_AUDIO = 1; const unsigned short MEDIA_ITEM_TYPE_VIDEO = 2; const unsigned short MEDIA_ITEM_TYPE_IMAGE = 3; const unsigned short MEDIA_SORT_NONE = 0; const unsigned short MEDIA_SORT_BY_FILENAME = 1; const unsigned short MEDIA_SORT_BY_FILEDATE = 2; const unsigned short MEDIA_SORT_BY_TYPE = 3; const unsigned short MEDIA_SORT_BY_TITLE = 20; const unsigned short MEDIA_SORT_BY_AUTHOR = 21; const unsigned short MEDIA_SORT_BY_ALBUM = 22; const unsigned short MEDIA_SORT_BY_DATE = 23; const unsigned short MEDIA_SORT_ASCENDING = 0; const unsigned short MEDIA_SORT_DESCENDING = 1; readonly attribute Map info; unsigned long getNumberOfMediaItems () raises (SecurityError, GalleryError); PendingOperation open (in SuccessCallback successCallback, in ErrorCallback errorCallback) raises (SecurityError, DeviceAPIError, GalleryError); PendingOperation refresh (in SuccessCallback successCallback, in ErrorCallback errorCallback) raises (SecurityError, DeviceAPIError, GalleryError); void close () raises (DeviceAPIError, GalleryError); PendingOperation changeView (in SuccessCallback successCallback, in ErrorCallback errorCallback, in Map viewOptions) raises (SecurityError, DeviceAPIError, GalleryError); MediaItemArray getMediaItems () raises (SecurityError, DeviceAPIError, GalleryError); MediaItem getMediaItemById (in unsigned long itemId) raises (SecurityError, DeviceAPIError, GalleryError); }; interface MediaItem { readonly attribute unsigned long id; readonly attribute long type; readonly attribute DOMString mimeType; readonly attribute DOMString fileName; readonly attribute Map metadata; }; }; module ui { typedef sequence<MenuItem> Menu; [NoInterfaceObject, Callback] interface WidgetActivateCallback { void onActivate (); }; [NoInterfaceObject, Callback] interface WidgetDeactivateCallback { void onDeactivate (); }; [NoInterfaceObject, Callback] interface WidgetKeyPressCallback { void onKeyPress (in unsigned short keyCode); }; [NoInterfaceObject, Callback] interface WidgetOrientationChangeCallback { void onOrientationChange (); }; [NoInterfaceObject, Callback] interface WidgetMenuSelectCallback { void onSelect (); }; interface UIManager { const unsigned short LEFT_SOFT_KEY = 0; const unsigned short RIGHT_SOFT_KEY = 1; const unsigned short NAVIGATION_CURSOR = 0; const unsigned short NAVIGATION_TABBED = 1; const unsigned short INFINITE_DURATION = 0; const unsigned short ORIENTATION_0 = 0; const unsigned short ORIENTATION_90 = 90; const unsigned short ORIENTATION_180 = 180; const unsigned short ORIENTATION_270 = 270; attribute boolean isActive setraises (DeviceAPIError); attribute unsigned short navigationMode setraises (DeviceAPIError); readonly attribute boolean isRotationSupported; attribute unsigned short displayOrientation; attribute boolean softKeysVisible setraises (DeviceAPIError); attribute boolean statusBarVisible setraises (DeviceAPIError); MenuItem getSoftKey (in unsigned short id) raises (DeviceAPIError); void setOnActivate (in WidgetActivateCallback handler) raises (DeviceAPIError); void setOnDeactivate (in WidgetDeactivateCallback handler) raises (DeviceAPIError); void setOnKeyPress (in WidgetKeyPressCallback handler) raises (DeviceAPIError); void beep (in unsigned long duration, in unsigned short frequency); void startVibrate (in unsigned long duration, in unsigned short intensity); void stopVibrate (); void setOnOrientationChange (in WidgetOrientationChangeCallback handler) raises (DeviceAPIError); void lightOn (in unsigned long duration, in unsigned short intensity, in boolean fadeIn); void lightOff (in boolean fadeOut); }; interface MenuItem { readonly attribute unsigned long id; attribute DOMString text; readonly attribute Menu menuItems; void setOnSelect (in WidgetMenuSelectCallback handler) raises (DeviceAPIError); MenuItem getMenuItemById (in unsigned long id); MenuItem appendMenuItem (in unsigned long id, in DOMString text, in WidgetMenuSelectCallback onSelect) raises (DeviceAPIError); void removeMenuItem (in unsigned long id) raises (DeviceAPIError); void removeAllMenuItems (); }; }; module pim { module contact { typedef sequence<AddressBook> AddressBookArray; typedef sequence<Contact> ContactsArray; [NoInterfaceObject, Callback] interface ContactArraySuccessCallback { void onSuccess (in ContactsArray contacts); }; interface ContactManager { AddressBookArray getAddressBooks () raises (SecurityError); }; interface AddressBook { Contact createContact ([Optional] in Map options) raises (SecurityError, DeviceAPIError); PendingOperation addContact (in SuccessCallback successCallback, in ErrorCallback errorCallback, in Contact contact) raises (SecurityError, DeviceAPIError); PendingOperation updateContact (in SuccessCallback successCallback, in ErrorCallback errorCallback, in Contact contact) raises (SecurityError, DeviceAPIError); PendingOperation deleteContact (in SuccessCallback successCallback, in ErrorCallback errorCallback, in Contact contact) raises (SecurityError, DeviceAPIError); PendingOperation deleteAllContacts (in SuccessCallback successCallback, in ErrorCallback errorCallback) raises (SecurityError, DeviceAPIError); PendingOperation findContacts (in ContactArraySuccessCallback successCallback, in ErrorCallback errorCallback, in Map filter) raises (SecurityError, DeviceAPIError); }; interface Contact { attribute DOMString id; attribute DOMString name; attribute DOMString nickname; attribute Map address; attribute File photo; attribute DOMString telephone; attribute DOMString email; Object getProperty (in DOMString propertyName) raises (DeviceAPIError); StringArray getSupportedPropertyKeys (); void setProperty (in DOMString propertyName, in Object propertyValue) raises (DeviceAPIError); }; }; module task { typedef sequence<TaskList> TaskListArray; typedef sequence<Task> TaskArray; [NoInterfaceObject, Callback] interface TaskArraySuccessCallback { void onSuccess (in TaskArray tasks); }; interface TaskManager { const unsigned short HIGH_PRIORITY = 0; const unsigned short MEDIUM_PRIORITY = 1; const unsigned short LOW_PRIORITY = 2; const unsigned short STATUS_DONE = 0; const unsigned short STATUS_PENDING = 1; const unsigned short STATUS_ONGOING = 2; TaskListArray getTaskLists () raises (SecurityError); }; interface TaskList { Task createTask ([Optional] in Map options) raises (SecurityError, DeviceAPIError); void addTask (in Task task) raises (SecurityError, DeviceAPIError); void updateTask (in Task task) raises (SecurityError, DeviceAPIError); void deleteTask (in Task task) raises (SecurityError, DeviceAPIError); PendingOperation clearTasks (in SuccessCallback successCallback, in ErrorCallback errorCallback) raises (SecurityError, DeviceAPIError); PendingOperation findTasks (in TaskArraySuccessCallback successCallback, in ErrorCallback errorCallback, [Optional] in Map filter) raises (SecurityError, DeviceAPIError); }; interface Task { attribute DOMString id; attribute unsigned short priority; attribute DOMString note; attribute DOMString summary; attribute Date due; attribute unsigned short status; Object getProperty (in DOMString propertyName) raises (DeviceAPIError); StringArray getSupportedPropertyKeys (); void setProperty (in DOMString propertyName, in Object propertyValue) raises (DeviceAPIError); }; }; module calendar { typedef sequence<Event> EventsArray; typedef sequence<Calendar> CalendarArray; [NoInterfaceObject, Callback] interface EventsArraySuccessCallback { void onSuccess (in EventsArray obj); }; interface CalendarManager { const unsigned short NO_RECURRENCE = 0; const unsigned short DAILY_RECURRENCE = 1; const unsigned short WEEKLY_RECURRENCE = 2; const unsigned short MONTHLY_RECURRENCE = 3; const unsigned short YEARLY_RECURRENCE = 4; CalendarArray getCalendars () raises (SecurityError); }; interface Calendar { Event createEvent ([Optional] in Map options) raises (SecurityError, DeviceAPIError); void addEvent (in Event event) raises (SecurityError, DeviceAPIError); void updateEvent (in Event event) raises (SecurityError, DeviceAPIError); void deleteEvent (in Event event) raises (SecurityError, DeviceAPIError); PendingOperation clearEvents (in SuccessCallback successCallback, in ErrorCallback errorCallback) raises (SecurityError, DeviceAPIError); PendingOperation findEvents (in SuccessCallback successCallback, in ErrorCallback errorCallback, [Optional] in Map filter) raises (SecurityError, DeviceAPIError); }; interface Event { attribute DOMString id; attribute DOMString description; attribute DOMString summary; attribute Date startTime; attribute Date endTime; attribute DOMString location; attribute unsigned short recurrence; Object getProperty (in DOMString propertyName) raises (DeviceAPIError); StringArray getSupportedPropertyKeys (); void setProperty (in DOMString propertyName, in Object propertyValue) raises (DeviceAPIError); }; }; }; };