1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
4 <Module name="MediaServer" id="::MediaServer">
5 <webidl> module MediaServer {
6 [NoInterfaceObject] interface MediaServerManagerObject {
7 readonly attribute <ref>MediaServerManager</ref> mediaserver;
10 <ref>Tizen</ref> implements <ref>MediaServerManagerObject</ref>;
12 [NoInterfaceObject] interface MediaServerManager {
13 void scanNetwork(<ref>MediaServerFoundServerCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
16 [NoInterfaceObject] interface MediaServer {
17 readonly attribute DOMString id;
18 readonly attribute DOMString friendlyName;
19 readonly attribute object root;
21 void browse(DOMString containerId, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
22 void find(DOMString containerId, DOMString searchFilter, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
25 [NoInterfaceObject] interface MediaServerError {
26 const unsigned short GENERIC = 1;
27 attribute unsigned short code;
28 attribute DOMString message;
31 [Callback=FunctionOnly, NoInterfaceObject] interface MediaServerFoundServerCallback {
32 void onsuccess(<ref>MediaServer</ref> value);
35 [Callback=FunctionOnly, NoInterfaceObject] interface MediaServerBrowseFindCallback {
36 void onsuccess(sequence< object > value);
39 [Callback=FunctionOnly, NoInterfaceObject] interface MediaServerErrorCallback {
40 void onfailure(<ref>MediaServerError</ref> error);
42 <Interface name="MediaServerManagerObject" id="::MediaServerManagerObject">
43 <webidl>[NoInterfaceObject] interface MediaServerManagerObject {
44 readonly attribute <ref>MediaServerManager</ref> mediaserver;
46 <ExtendedAttributeList>
47 <ExtendedAttribute name="NoInterfaceObject">
48 <webidl>NoInterfaceObject</webidl>
50 </ExtendedAttributeList>
51 <Attribute readonly="readonly" name="mediaserver" id="::MediaServerManagerObject::mediaserver">
52 <webidl> readonly attribute <ref>MediaServerManager</ref> mediaserver;</webidl>
53 <Type name="MediaServerManager"/>
56 <Implements name1="Tizen" name2="MediaServerManagerObject">
57 <webidl><ref>Tizen</ref> implements <ref>MediaServerManagerObject</ref>;</webidl>
59 <Interface name="MediaServerManager" id="::MediaServerManager">
60 <webidl>[NoInterfaceObject] interface MediaServerManager {
61 void scanNetwork(<ref>MediaServerFoundServerCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
63 <ExtendedAttributeList>
64 <ExtendedAttribute name="NoInterfaceObject">
65 <webidl>NoInterfaceObject</webidl>
67 </ExtendedAttributeList>
68 <Operation name="scanNetwork" id="::MediaServerManager::scanNetwork">
69 <webidl> void scanNetwork(<ref>MediaServerFoundServerCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);</webidl>
72 <Argument name="successCallback">
73 <Type name="MediaServerFoundServerCallback"/>
75 <Argument optional="optional" name="errorCallback">
76 <Type name="MediaServerErrorCallback"/>
81 <Interface name="MediaServer" id="::MediaServer">
82 <webidl>[NoInterfaceObject] interface MediaServer {
83 readonly attribute DOMString id;
84 readonly attribute DOMString friendlyName;
85 readonly attribute object root;
87 void browse(DOMString containerId, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
88 void find(DOMString containerId, DOMString searchFilter, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
90 <ExtendedAttributeList>
91 <ExtendedAttribute name="NoInterfaceObject">
92 <webidl>NoInterfaceObject</webidl>
94 </ExtendedAttributeList>
95 <Attribute readonly="readonly" name="id" id="::MediaServer::id">
96 <webidl> readonly attribute DOMString id;</webidl>
97 <Type type="DOMString"/>
99 <Attribute readonly="readonly" name="friendlyName" id="::MediaServer::friendlyName">
100 <webidl> readonly attribute DOMString friendlyName;</webidl>
101 <Type type="DOMString"/>
103 <Attribute readonly="readonly" name="root" id="::MediaServer::root">
104 <webidl> readonly attribute object root;</webidl>
105 <Type type="object"/>
107 <Operation name="browse" id="::MediaServer::browse">
108 <webidl> void browse(DOMString containerId, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);</webidl>
111 <Argument name="containerId">
112 <Type type="DOMString"/>
114 <Argument name="sortMode">
115 <Type type="DOMString"/>
117 <Argument name="count">
118 <Type type="unsigned long"/>
120 <Argument name="offset">
121 <Type type="unsigned long"/>
123 <Argument name="successCallback">
124 <Type name="MediaServerBrowseFindCallback"/>
126 <Argument optional="optional" name="errorCallback">
127 <Type name="MediaServerErrorCallback"/>
131 <Operation name="find" id="::MediaServer::find">
132 <webidl> void find(DOMString containerId, DOMString searchFilter, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);</webidl>
135 <Argument name="containerId">
136 <Type type="DOMString"/>
138 <Argument name="searchFilter">
139 <Type type="DOMString"/>
141 <Argument name="sortMode">
142 <Type type="DOMString"/>
144 <Argument name="count">
145 <Type type="unsigned long"/>
147 <Argument name="offset">
148 <Type type="unsigned long"/>
150 <Argument name="successCallback">
151 <Type name="MediaServerBrowseFindCallback"/>
153 <Argument optional="optional" name="errorCallback">
154 <Type name="MediaServerErrorCallback"/>
159 <Interface name="MediaServerError" id="::MediaServerError">
160 <webidl>[NoInterfaceObject] interface MediaServerError {
161 const unsigned short GENERIC = 1;
162 attribute unsigned short code;
163 attribute DOMString message;
165 <ExtendedAttributeList>
166 <ExtendedAttribute name="NoInterfaceObject">
167 <webidl>NoInterfaceObject</webidl>
169 </ExtendedAttributeList>
170 <Const name="GENERIC" value="1" id="::MediaServerError::GENERIC">
171 <webidl> const unsigned short GENERIC = 1;</webidl>
172 <Type type="unsigned short"/>
174 <Attribute name="code" id="::MediaServerError::code">
175 <webidl> attribute unsigned short code;</webidl>
176 <Type type="unsigned short"/>
178 <Attribute name="message" id="::MediaServerError::message">
179 <webidl> attribute DOMString message;</webidl>
180 <Type type="DOMString"/>
183 <Interface name="MediaServerFoundServerCallback" id="::MediaServerFoundServerCallback">
184 <webidl>[Callback=FunctionOnly, NoInterfaceObject] interface MediaServerFoundServerCallback {
185 void onsuccess(<ref>MediaServer</ref> value);
187 <ExtendedAttributeList>
188 <ExtendedAttribute name="Callback" value="FunctionOnly">
189 <webidl>Callback</webidl>
191 <ExtendedAttribute name="NoInterfaceObject">
192 <webidl> NoInterfaceObject</webidl>
194 </ExtendedAttributeList>
195 <Operation name="onsuccess" id="::MediaServerFoundServerCallback::onsuccess">
196 <webidl> void onsuccess(<ref>MediaServer</ref> value);</webidl>
199 <Argument name="value">
200 <Type name="MediaServer"/>
205 <Interface name="MediaServerBrowseFindCallback" id="::MediaServerBrowseFindCallback">
206 <webidl>[Callback=FunctionOnly, NoInterfaceObject] interface MediaServerBrowseFindCallback {
207 void onsuccess(sequence< object > value);
209 <ExtendedAttributeList>
210 <ExtendedAttribute name="Callback" value="FunctionOnly">
211 <webidl>Callback</webidl>
213 <ExtendedAttribute name="NoInterfaceObject">
214 <webidl> NoInterfaceObject</webidl>
216 </ExtendedAttributeList>
217 <Operation name="onsuccess" id="::MediaServerBrowseFindCallback::onsuccess">
218 <webidl> void onsuccess(sequence< object > value);</webidl>
221 <Argument name="value">
222 <Type type="sequence">
223 <Type type="object"/>
229 <Interface name="MediaServerErrorCallback" id="::MediaServerErrorCallback">
230 <webidl>[Callback=FunctionOnly, NoInterfaceObject] interface MediaServerErrorCallback {
231 void onfailure(<ref>MediaServerError</ref> error);
233 <ExtendedAttributeList>
234 <ExtendedAttribute name="Callback" value="FunctionOnly">
235 <webidl>Callback</webidl>
237 <ExtendedAttribute name="NoInterfaceObject">
238 <webidl> NoInterfaceObject</webidl>
240 </ExtendedAttributeList>
241 <Operation name="onfailure" id="::MediaServerErrorCallback::onfailure">
242 <webidl> void onfailure(<ref>MediaServerError</ref> error);</webidl>
245 <Argument name="error">
246 <Type name="MediaServerError"/>
252 <Module name="Locale" id="::Locale">
253 <webidl> module Locale {
255 interface LocaleManagerObject {
256 readonly attribute <ref>Locale</ref> locale;
259 <ref>Tizen</ref> implements <ref>LocaleManagerObject</ref>;
261 callback LocaleChangedCallback = void (DOMString newLocale);
269 void setLocale(DOMString newLocale);
271 void localeChanged(<ref>LocaleChangedCallback</ref> cb);
274 <Interface name="LocaleManagerObject" id="::LocaleManagerObject">
275 <webidl>[NoInterfaceObject]
276 interface LocaleManagerObject {
277 readonly attribute <ref>Locale</ref> locale;
285 def-api-feature http://tizen.org/api/vehicle
286 brief Allows access to the vehicle API
290 <ExtendedAttributeList>
291 <ExtendedAttribute name="NoInterfaceObject">
292 <webidl>NoInterfaceObject</webidl>
294 </ExtendedAttributeList>
295 <Attribute readonly="readonly" name="locale" id="::LocaleManagerObject::locale">
296 <webidl> readonly attribute <ref>Locale</ref> locale;</webidl>
297 <Type name="Locale"/>
300 <Implements name1="Tizen" name2="LocaleManagerObject">
301 <webidl><ref>Tizen</ref> implements <ref>LocaleManagerObject</ref>;</webidl>
303 <Callback name="LocaleChangedCallback" id="::LocaleChangedCallback">
304 <webidl>callback LocaleChangedCallback = void (DOMString newLocale);</webidl>
307 <Argument name="newLocale">
308 <Type type="DOMString"/>
312 <Interface name="Locale" id="::Locale">
313 <webidl>[NoInterfaceObject]
318 void setLocale(DOMString newLocale);
320 void localeChanged(<ref>LocaleChangedCallback</ref> cb);
323 <ExtendedAttributeList>
324 <ExtendedAttribute name="NoInterfaceObject">
325 <webidl>NoInterfaceObject</webidl>
327 </ExtendedAttributeList>
328 <Operation name="getLocale" id="::Locale::getLocale">
329 <webidl> void getLocale();</webidl>
333 brief gets the current locale
334 returns current locale in ISO 639-2 format (ie en_US for english US)
341 <Operation name="setLocale" id="::Locale::setLocale">
342 <webidl> void setLocale(DOMString newLocale);</webidl>
346 brief sets the system locale
347 param newLocale locale to set in ISO 639-2 format
353 <Argument name="newLocale">
354 <Type type="DOMString"/>
358 <Operation name="localeChanged" id="::Locale::localeChanged">
359 <webidl> void localeChanged(<ref>LocaleChangedCallback</ref> cb);</webidl>
363 brief subscribe to locale changes.
364 param cb callback to be called when this even occurs.
371 <Type name="LocaleChangedCallback"/>
377 <Module name="Vehicle" id="::Vehicle">
378 <webidl> module Vehicle {
380 interface VehicleManagerObject {
381 readonly attribute <ref>Vehicle</ref> vehicle;
383 <ref>Tizen</ref> implements <ref>VehicleManagerObject</ref>;
387 interface VehiclePropertyType: <ref>Event</ref> {
388 attribute <ref>DOMTimeStamp</ref> time;
389 attribute short zone;
390 attribute DOMString source;
394 interface VehiclePropertyError {
395 const unsigned short PERMISSION_DENIED = 1;
396 const unsigned short PROPERTY_UNAVAILABLE = 2;
397 const unsigned short TIMEOUT = 3;
398 const unsigned short UNKNOWN = 10;
400 attribute unsigned short code;
402 attribute DOMString message;
405 callback VehiclePropertyCallback = void (<ref>VehiclePropertyType</ref> value);
407 callback VehiclePropertyErrorCallback = void (<ref>VehiclePropertyError</ref> error);
409 callback VehiclePropertyListCallback = void (sequence<<ref>VehiclePropertyType</ref>> values);
411 callback SupportedPropertiesCallback = void (sequence<DOMString> properties);
417 const unsigned short ZONE_None = 0;
418 const unsigned short ZONE_Front = 1;
419 const unsigned short ZONE_Middle = 0x10;
420 const unsigned short ZONE_Right = 0x100;
421 const unsigned short ZONE_Left = 0x1000;
422 const unsigned short ZONE_Rear = 0x10000;
423 const unsigned short ZONE_Center = 0x10000;
425 sequence<DOMString> supported();
427 any get(DOMString objectType, optional short zone);
430 void subscribe(DOMString objectType, <ref>VehiclePropertyCallback</ref> successCallback, optional unsigned short zone, optional <ref>VehiclePropertyErrorCallback</ref> errorCallback);
432 void set(DOMString objectType, <ref>VehiclePropertyType</ref> value, optional <ref>VehiclePropertyErrorCallback</ref> errorCallback);
434 void getHistory(DOMString objectType, unsigned short zone, Date startTime, Date endTime, <ref>VehiclePropertyListCallback</ref> successCallback, optional <ref>VehiclePropertyErrorCallback</ref> errorCallback);
436 sequence<unsigned short> listZones(DOMString objectType);
440 interface VehicleSpeed : <ref>VehiclePropertyType</ref> {
442 attribute unsigned long vehicleSpeed;
446 interface EngineSpeed : <ref>VehiclePropertyType</ref> {
448 attribute unsigned long engineSpeed;
452 interface VehiclePowerMode : <ref>VehiclePropertyType</ref> {
453 const unsigned short VEHICLEPOWERMODE_OFF = 0;
454 const unsigned short VEHICLEPOWERMODE_ACCESSORY1 = 1;
455 const unsigned short VEHICLEPOWERMODE_ACCESSORY2 = 2;
456 const unsigned short VEHICLEPOWERMODE_RUN = 3;
458 attribute octet vehiclePowerMode;
462 interface TripMeter : <ref>VehiclePropertyType</ref> {
464 attribute sequence<unsigned long> tripMeters;
468 interface Acceleration : <ref>VehiclePropertyType</ref> {
470 attribute unsigned long x;
472 attribute unsigned long y;
474 attribute unsigned long z;
478 interface Transmission : <ref>VehiclePropertyType</ref> {
479 const unsigned short TRANSMISSIONPOSITION_NEUTRAL = 0;
480 const unsigned short TRANSMISSIONPOSITION_FIRST = 1;
481 const unsigned short TRANSMISSIONPOSITION_SECOND = 2;
482 const unsigned short TRANSMISSIONPOSITION_THIRD = 3;
483 const unsigned short TRANSMISSIONPOSITION_FORTH = 4;
484 const unsigned short TRANSMISSIONPOSITION_FIFTH = 5;
485 const unsigned short TRANSMISSIONPOSITION_SIXTH = 6;
486 const unsigned short TRANSMISSIONPOSITION_SEVENTH = 7;
487 const unsigned short TRANSMISSIONPOSITION_EIGHTH = 8;
488 const unsigned short TRANSMISSIONPOSITION_NINTH = 9;
489 const unsigned short TRANSMISSIONPOSITION_TENTH = 10;
490 const unsigned short TRANSMISSIONPOSITION_CVT = 64;
491 const unsigned short TRANSMISSIONPOSITION_REVERSE = 128;
492 const unsigned short TRANSMISSIONPOSITION_PARK = 255;
493 const unsigned short TRANSMISSIONMODE_NORMAL = 0;
494 const unsigned short TRANSMISSIONMODE_SPORT = 1;
495 const unsigned short TRANSMISSIONMODE_ECONOMY = 2;
496 const unsigned short TRANSMISSIONMODE_OEMCUSTOM1 = 3;
497 const unsigned short TRANSMISSIONMODE_OEMCUSTOM2 = 4;
499 attribute octet gearPosition;
501 attribute octet mode;
505 interface CruiseControlStatus : <ref>VehiclePropertyType</ref> {
507 attribute boolean activated;
509 attribute unsigned short speed;
513 interface WheelBrake : <ref>VehiclePropertyType</ref> {
515 attribute boolean engaged;
519 interface LightStatus : <ref>VehiclePropertyType</ref> {
521 attribute boolean head;
523 attribute boolean rightTurn;
525 attribute boolean leftTurn;
527 attribute boolean brake;
529 attribute boolean fog;
531 attribute boolean hazard;
533 attribute boolean parking;
535 attribute boolean highBeam;
539 interface InteriorLightStatus : <ref>VehiclePropertyType</ref> {
541 attribute boolean passenger;
543 attribute boolean driver;
545 attribute boolean center;
549 interface Horn : <ref>VehiclePropertyType</ref> {
551 attribute boolean on;
555 interface Fuel : <ref>VehiclePropertyType</ref> {
557 attribute unsigned short level;
559 attribute unsigned short range;
561 attribute unsigned short instantConsumption;
563 attribute unsigned short instantEconomy;
565 attribute unsigned short averageEconomy;
569 interface EngineOil : <ref>VehiclePropertyType</ref> {
571 attribute unsigned short remaining;
573 attribute long temperature;
575 attribute unsigned short pressure;
579 interface Location : <ref>VehiclePropertyType</ref> {
581 attribute double latitude;
583 attribute double longitude;
585 attribute double altitude;
587 attribute unsigned short direction;
591 interface ExteriorBrightness : <ref>VehiclePropertyType</ref> {
593 attribute unsigned long exteriorBrightness;
597 interface Temperature : <ref>VehiclePropertyType</ref> {
599 attribute short interior;
601 attribute short exterior;
605 interface RainSensor : <ref>VehiclePropertyType</ref> {
607 attribute unsigned short rainSensor;
611 interface WindshieldWiper : <ref>VehiclePropertyType</ref> {
612 const unsigned short WIPERSPEED_OFF = 0;
613 const unsigned short WIPERSPEED_SLOWEST= 1;
614 const unsigned short WIPERSPEED_FASTEST = 5;
615 const unsigned short WIPERSPEED_AUTO = 10;
617 attribute unsigned short windshieldWiper;
620 dictionary DefrostDictionary {
621 unsigned short window;
626 interface HVAC : <ref>VehiclePropertyType</ref> {
627 const unsigned short AIRFLOWDIRECTION_FRONTPANEL = 0;
628 const unsigned short AIRFLOWDIRECTION_FLOORDUCT= 1;
629 const unsigned short AIRFLOWDIRECTION_FRONT = 0x02;
630 const unsigned short AIRFLOWDIRECTION_DEFROSTER = 0x04;
632 attribute unsigned short airflowDirection;
634 attribute unsigned short fanSpeed;
636 attribute unsigned short targetTemperature;
638 attribute boolean airConditioning;
640 attribute boolean airRecirculation;
642 attribute boolean heater;
644 attribute <ref>DefrostDictionary</ref> defrost;
646 attribute boolean steeringWheelHeater;
648 attribute boolean seatHeater;
650 attribute boolean seatCooler;
654 interface WindowStatus : <ref>VehiclePropertyType</ref> {
655 const unsigned short WINDOWLOCATION_DRIVER= 0;
656 const unsigned short WINDOWLOCATION_PASSENGER = 1;
657 const unsigned short WINDOWLOCATION_LEFTREAR = 2;
658 const unsigned short WINDOWLOCATION_RIGHTREAR = 3;
659 const unsigned short WINDOWLOCATION_REAR = 4;
661 attribute object WindowStatus;
665 interface Sunroof : <ref>VehiclePropertyType</ref> {
667 attribute unsigned short openness;
669 attribute unsigned short tilt;
673 interface ConvertibleRoof : <ref>VehiclePropertyType</ref> {
675 attribute unsigned short openness;
679 interface VehicleId : <ref>VehiclePropertyType</ref> {
681 attribute DOMString WMI;
683 attribute DOMString VIN;
687 interface Size : <ref>VehiclePropertyType</ref> {
689 attribute unsigned long width;
691 attribute unsigned long height;
693 attribute unsigned long length;
697 interface FuelInfo : <ref>VehiclePropertyType</ref> {
698 const unsigned short FUELTYPE_GASOLINE = 0;
699 const unsigned short FUELTYPE_HIGH_OCTANE= 1;
700 const unsigned short FUELTYPE_DIESEL = 2;
701 const unsigned short FUELTYPE_ELECTRIC = 3;
702 const unsigned short FUELTYPE_HYDROGEN = 4;
703 const unsigned short REFUELPOSITION_LEFT = 0;
704 const unsigned short REFUELPOSITION_RIGHT= 1;
705 const unsigned short REFUELPOSITION_FRONT = 2;
706 const unsigned short REFUELPOSITION_REAR = 3;
708 attribute unsigned short type;
710 attribute unsigned short refuelPosition;
714 interface VehicleType : <ref>VehiclePropertyType</ref> {
715 const unsigned short VEHICLETYPE_SEDAN = 0;
716 const unsigned short VEHICLETYPE_COUPE= 1;
717 const unsigned short VEHICLETYPE_CABRIOLE = 2;
718 const unsigned short VEHICLETYPE_ROADSTER = 3;
719 const unsigned short VEHICLETYPE_SUV = 4;
720 const unsigned short VEHICLETYPE_TRUCK = 5;
722 attribute unsigned short type;
726 interface Doors : <ref>VehiclePropertyType</ref> {
728 attribute sequence<unsigned short> doorsPerRow;
732 interface TransmissionGearType : <ref>VehiclePropertyType</ref> {
733 const unsigned short TRANSMISSIONGEARTYPE_AUTO=0;
734 const unsigned short TRANSMISSIONGEARTYPE_MANUAL=1;
735 const unsigned short TRANSMISSIONGEARTYPE_CV=2;
737 attribute unsigned short transmissionGearType;
741 interface WheelInformation : <ref>VehiclePropertyType</ref> {
743 attribute unsigned short frontWheelRadius;
745 attribute unsigned short rearWheelRadius;
747 attribute unsigned long wheelTrack;
749 attribute boolean ABS;
753 interface Odometer : <ref>VehiclePropertyType</ref> {
755 attribute unsigned long odometer;
759 interface Fluid : <ref>VehiclePropertyType</ref> {
761 attribute unsigned short transmission;
763 attribute unsigned short brake;
765 attribute unsigned short washer;
769 interface Battery : <ref>VehiclePropertyType</ref> {
771 attribute double voltage;
773 attribute double current;
777 interface TirePressure : <ref>VehiclePropertyType</ref> {
779 attribute double leftFront;
781 attribute double rightFront;
783 attribute double leftRear;
785 attribute double rightRear;
789 interface TireTemperature : <ref>VehiclePropertyType</ref> {
791 attribute double leftFront;
793 attribute double rightFront;
795 attribute double leftRear;
797 attribute double rightRear;
801 interface SecurityAlert : <ref>VehiclePropertyType</ref> {
803 attribute boolean securityAlert;
807 interface ParkingBrake : <ref>VehiclePropertyType</ref> {
809 attribute boolean parkingBrake;
813 interface ParkingLight : <ref>VehiclePropertyType</ref> {
815 attribute boolean parkingLight;
819 interface HazardLight : <ref>VehiclePropertyType</ref> {
821 attribute boolean hazardLight;
825 interface AntilockBrakingSystem : <ref>VehiclePropertyType</ref> {
827 attribute boolean antilockBrakingSystem;
831 interface TractionControlSystem : <ref>VehiclePropertyType</ref> {
833 attribute boolean tractionControlSystem;
837 interface VehicleTopSpeedLimit : <ref>VehiclePropertyType</ref> {
839 attribute unsigned short vehicleTopSpeedLimit;
843 interface AirbagStatus : <ref>VehiclePropertyType</ref> {
844 const unsigned short AIRBAGLOCATION_DRIVER = 0;
845 const unsigned short AIRBAGLOCATION_PASSENGER= 1;
846 const unsigned short AIRBAGLOCATION_LEFTSIDE = 2;
847 const unsigned short AIRBAGLOCATION_RIGHTSIDE = 3;
848 const unsigned short AIRBAGSTATUS_INACTIVE = 0;
849 const unsigned short AIRBAGSTATUS_ACTIVE = 1;
850 const unsigned short AIRBAGSTATUS_DEPLOYED = 2;
852 attribute object airbagStatus;
856 interface DoorStatus : <ref>VehiclePropertyType</ref> {
857 const unsigned short DOORLOCATION_DRIVER= 0;
858 const unsigned short DOORLOCATION_PASSENGER = 1;
859 const unsigned short DOORLOCATION_LEFTREAR = 2;
860 const unsigned short DOORLOCATION_RIGHTREAR = 3;
861 const unsigned short DOORLOCATION_TRUNK = 4;
862 const unsigned short DOORLOCATION_FUELCAP = 5;
863 const unsigned short DOORLOCATION_HOOD = 6;
864 const unsigned short DOORSTATUS_CLOSED = 0;
865 const unsigned short DOORSTATUS_OPEN = 1;
866 const unsigned short DOORSTATUS_AJAR = 2;
868 attribute object doorStatus;
870 attribute object doorLockStatus;
872 attribute boolean childLockStatus;
876 interface SeatBeltStatus : <ref>VehiclePropertyType</ref> {
877 const unsigned short SEATBELTLOCATION_DRIVER= 0;
878 const unsigned short SEATBELTLOCATION_MIDDLEFRONT = 1;
879 const unsigned short SEATBELTLOCATION_PASSENGER = 2;
880 const unsigned short SEATBELTLOCATION_LEFTREAR = 3;
881 const unsigned short SEATBELTLOCATION_MIDDLEREAR = 4;
882 const unsigned short SEATBELTLOCATION_RIGHTREAR = 5;
884 attribute object seatBeltStatus;
888 interface OccupantStatus : <ref>VehiclePropertyType</ref> {
889 const unsigned short OCCUPANTLOCATION_DRIVER = 0;
890 const unsigned short OCCUPANTLOCATION_FRONTMIDDLE = 1;
891 const unsigned short OCCUPANTLOCATION_PASSENGER= 2;
892 const unsigned short OCCUPANTLOCATION_LEFTREAR = 3;
893 const unsigned short OCCUPANTLOCATION_MIDDLEREAR = 4;
894 const unsigned short OCCUPANTLOCATION_RIGHTREAR = 5;
895 const unsigned short OCCUPANTSTATUS_VACANT = 0;
896 const unsigned short OCCUPANTSTATUS_CHILD = 1;
897 const unsigned short OCCUPANTSTATUS_ADULT = 2;
899 attribute object occupantStatus;
903 interface ObstacleDistance : <ref>VehiclePropertyType</ref> {
904 const unsigned short DISTANCESENSORLOCATION_LEFTFRONT = 0;
905 const unsigned short DISTANCESENSORLOCATION_RIGHTFRONT = 1;
906 const unsigned short DISTANCESENSORLOCATION_LEFTREAR = 2;
907 const unsigned short DISTANCESENSORLOCATION_RIGHTREAR = 3;
908 const unsigned short DISTANCESENSORLOCATION_LEFTBLINDSPOT = 4;
909 const unsigned short DISTANCESENSORLOCATION_RIGHTBLINDSPOT = 5;
911 attribute object obstacleDistance;
914 <Interface name="VehicleManagerObject" id="::VehicleManagerObject">
915 <webidl>[NoInterfaceObject]
916 interface VehicleManagerObject {
917 readonly attribute <ref>Vehicle</ref> vehicle;
925 <def-api-feature identifier="http://tizen.org/api/vehicle">
933 Allows access to the vehicle API
938 <ExtendedAttributeList>
939 <ExtendedAttribute name="NoInterfaceObject">
940 <webidl>NoInterfaceObject</webidl>
942 </ExtendedAttributeList>
943 <Attribute readonly="readonly" name="vehicle" id="::VehicleManagerObject::vehicle">
944 <webidl> readonly attribute <ref>Vehicle</ref> vehicle;</webidl>
945 <Type name="Vehicle"/>
948 <Implements name1="Tizen" name2="VehicleManagerObject">
949 <webidl><ref>Tizen</ref> implements <ref>VehicleManagerObject</ref>;</webidl>
951 <Interface name="VehiclePropertyType" id="::VehiclePropertyType">
952 <webidl>[NoInterfaceObject]
953 interface VehiclePropertyType: <ref>Event</ref> {
954 attribute <ref>DOMTimeStamp</ref> time;
955 attribute short zone;
956 attribute DOMString source;
958 <ExtendedAttributeList>
959 <ExtendedAttribute name="NoInterfaceObject">
960 <webidl>NoInterfaceObject</webidl>
962 </ExtendedAttributeList>
963 <InterfaceInheritance>
965 </InterfaceInheritance>
966 <Attribute name="time" id="::VehiclePropertyType::time">
967 <webidl> attribute <ref>DOMTimeStamp</ref> time;</webidl>
975 time at which the vehicle generated the property
978 <Type name="DOMTimeStamp"/>
980 <Attribute name="zone" id="::VehiclePropertyType::zone">
981 <webidl> attribute short zone;</webidl>
984 <Attribute name="source" id="::VehiclePropertyType::source">
985 <webidl> attribute DOMString source;</webidl>
986 <Type type="DOMString"/>
989 <Interface name="VehiclePropertyError" id="::VehiclePropertyError">
990 <webidl>[NoInterfaceObject]
991 interface VehiclePropertyError {
992 const unsigned short PERMISSION_DENIED = 1;
993 const unsigned short PROPERTY_UNAVAILABLE = 2;
994 const unsigned short TIMEOUT = 3;
995 const unsigned short UNKNOWN = 10;
997 attribute unsigned short code;
999 attribute DOMString message;
1001 <ExtendedAttributeList>
1002 <ExtendedAttribute name="NoInterfaceObject">
1003 <webidl>NoInterfaceObject</webidl>
1004 </ExtendedAttribute>
1005 </ExtendedAttributeList>
1006 <Const name="PERMISSION_DENIED" value="1" id="::VehiclePropertyError::PERMISSION_DENIED">
1007 <webidl> const unsigned short PERMISSION_DENIED = 1;</webidl>
1008 <Type type="unsigned short"/>
1010 <Const name="PROPERTY_UNAVAILABLE" value="2" id="::VehiclePropertyError::PROPERTY_UNAVAILABLE">
1011 <webidl> const unsigned short PROPERTY_UNAVAILABLE = 2;</webidl>
1012 <Type type="unsigned short"/>
1014 <Const name="TIMEOUT" value="3" id="::VehiclePropertyError::TIMEOUT">
1015 <webidl> const unsigned short TIMEOUT = 3;</webidl>
1016 <Type type="unsigned short"/>
1018 <Const name="UNKNOWN" value="10" id="::VehiclePropertyError::UNKNOWN">
1019 <webidl> const unsigned short UNKNOWN = 10;</webidl>
1020 <Type type="unsigned short"/>
1022 <Attribute name="code" id="::VehiclePropertyError::code">
1023 <webidl> attribute unsigned short code;</webidl>
1028 MUST return error code.
1032 <Type type="unsigned short"/>
1034 <Attribute name="message" id="::VehiclePropertyError::message">
1035 <webidl> attribute DOMString message;</webidl>
1040 MUST return error message
1044 <Type type="DOMString"/>
1047 <Callback name="VehiclePropertyCallback" id="::VehiclePropertyCallback">
1048 <webidl>callback VehiclePropertyCallback = void (<ref>VehiclePropertyType</ref> value);</webidl>
1051 <Argument name="value">
1052 <Type name="VehiclePropertyType"/>
1056 <Callback name="VehiclePropertyErrorCallback" id="::VehiclePropertyErrorCallback">
1057 <webidl>callback VehiclePropertyErrorCallback = void (<ref>VehiclePropertyError</ref> error);</webidl>
1060 <Argument name="error">
1061 <Type name="VehiclePropertyError"/>
1065 <Callback name="VehiclePropertyListCallback" id="::VehiclePropertyListCallback">
1066 <webidl>callback VehiclePropertyListCallback = void (sequence<<ref>VehiclePropertyType</ref>> values);</webidl>
1069 <Argument name="values">
1070 <Type type="sequence">
1071 <Type name="VehiclePropertyType"/>
1076 <Callback name="SupportedPropertiesCallback" id="::SupportedPropertiesCallback">
1077 <webidl>callback SupportedPropertiesCallback = void (sequence<DOMString> properties);</webidl>
1080 <Argument name="properties">
1081 <Type type="sequence">
1082 <Type type="DOMString"/>
1087 <Interface name="Vehicle" id="::Vehicle">
1088 <webidl>[NoInterfaceObject]
1091 const unsigned short ZONE_None = 0;
1092 const unsigned short ZONE_Front = 1;
1093 const unsigned short ZONE_Middle = 0x10;
1094 const unsigned short ZONE_Right = 0x100;
1095 const unsigned short ZONE_Left = 0x1000;
1096 const unsigned short ZONE_Rear = 0x10000;
1097 const unsigned short ZONE_Center = 0x10000;
1099 sequence<DOMString> supported();
1101 any get(DOMString objectType, optional short zone);
1104 void subscribe(DOMString objectType, <ref>VehiclePropertyCallback</ref> successCallback, optional unsigned short zone, optional <ref>VehiclePropertyErrorCallback</ref> errorCallback);
1106 void set(DOMString objectType, <ref>VehiclePropertyType</ref> value, optional <ref>VehiclePropertyErrorCallback</ref> errorCallback);
1108 void getHistory(DOMString objectType, unsigned short zone, Date startTime, Date endTime, <ref>VehiclePropertyListCallback</ref> successCallback, optional <ref>VehiclePropertyErrorCallback</ref> errorCallback);
1110 sequence<unsigned short> listZones(DOMString objectType);
1112 <ExtendedAttributeList>
1113 <ExtendedAttribute name="NoInterfaceObject">
1114 <webidl>NoInterfaceObject</webidl>
1115 </ExtendedAttribute>
1116 </ExtendedAttributeList>
1117 <Const name="ZONE_None" value="0" id="::Vehicle::ZONE_None">
1118 <webidl> const unsigned short ZONE_None = 0;</webidl>
1119 <Type type="unsigned short"/>
1121 <Const name="ZONE_Front" value="1" id="::Vehicle::ZONE_Front">
1122 <webidl> const unsigned short ZONE_Front = 1;</webidl>
1123 <Type type="unsigned short"/>
1125 <Const name="ZONE_Middle" value="0x10" id="::Vehicle::ZONE_Middle">
1126 <webidl> const unsigned short ZONE_Middle = 0x10;</webidl>
1127 <Type type="unsigned short"/>
1129 <Const name="ZONE_Right" value="0x100" id="::Vehicle::ZONE_Right">
1130 <webidl> const unsigned short ZONE_Right = 0x100;</webidl>
1131 <Type type="unsigned short"/>
1133 <Const name="ZONE_Left" value="0x1000" id="::Vehicle::ZONE_Left">
1134 <webidl> const unsigned short ZONE_Left = 0x1000;</webidl>
1135 <Type type="unsigned short"/>
1137 <Const name="ZONE_Rear" value="0x10000" id="::Vehicle::ZONE_Rear">
1138 <webidl> const unsigned short ZONE_Rear = 0x10000;</webidl>
1139 <Type type="unsigned short"/>
1141 <Const name="ZONE_Center" value="0x10000" id="::Vehicle::ZONE_Center">
1142 <webidl> const unsigned short ZONE_Center = 0x10000;</webidl>
1143 <Type type="unsigned short"/>
1145 <Operation name="supported" id="::Vehicle::supported">
1146 <webidl> sequence<DOMString> supported();</webidl>
1149 returns supported object types
1152 <Type type="sequence">
1153 <Type type="DOMString"/>
1157 <Operation name="get" id="::Vehicle::get">
1158 <webidl> any get(DOMString objectType, optional short zone);</webidl>
1161 fetch the current value for 'objectType'.
1167 object representing the requested 'objectType'
1172 <Argument name="objectType">
1175 is the requested property to be retrieved.
1178 <Type type="DOMString"/>
1180 <Argument optional="optional" name="zone">
1183 specify the zone in which this object type is in
1186 <Type type="short"/>
1190 <Operation name="subscribe" id="::Vehicle::subscribe">
1191 <webidl> void subscribe(DOMString objectType, <ref>VehiclePropertyCallback</ref> successCallback, optional unsigned short zone, optional <ref>VehiclePropertyErrorCallback</ref> errorCallback);</webidl>
1194 subscribe to the given property and get callbacks when it changes
1199 <Argument name="objectType">
1205 <Type type="DOMString"/>
1207 <Argument name="successCallback">
1210 callback will be called when the "objectType" changes
1213 <Type name="VehiclePropertyCallback"/>
1215 <Argument optional="optional" name="zone">
1216 <Type type="unsigned short"/>
1218 <Argument optional="optional" name="errorCallback">
1221 callback if error has been called.
1224 <Type name="VehiclePropertyErrorCallback"/>
1228 <Operation name="set" id="::Vehicle::set">
1229 <webidl> void set(DOMString objectType, <ref>VehiclePropertyType</ref> value, optional <ref>VehiclePropertyErrorCallback</ref> errorCallback);</webidl>
1232 set the given objectType to value
1237 <Argument name="objectType">
1243 <Type type="DOMString"/>
1245 <Argument name="value">
1248 value to set, should contain zone information ie "zone" : 0
1251 <Type name="VehiclePropertyType"/>
1253 <Argument optional="optional" name="errorCallback">
1256 callback if error has been called.
1259 <Type name="VehiclePropertyErrorCallback"/>
1263 <Operation name="getHistory" id="::Vehicle::getHistory">
1264 <webidl> void getHistory(DOMString objectType, unsigned short zone, Date startTime, Date endTime, <ref>VehiclePropertyListCallback</ref> successCallback, optional <ref>VehiclePropertyErrorCallback</ref> errorCallback);</webidl>
1267 get values for a given objectType within a certain past time period between 'startTime' and 'endTime'
1272 <Argument name="objectType">
1275 object type to request
1278 <Type type="DOMString"/>
1280 <Argument name="zone">
1283 in which the objectType is located or 0 if no zone.
1286 <Type type="unsigned short"/>
1288 <Argument name="startTime">
1291 starting period of time.
1296 <Argument name="endTime">
1299 ending period of time.
1304 <Argument name="successCallback">
1307 Callback with the result of the method call
1310 <Type name="VehiclePropertyListCallback"/>
1312 <Argument optional="optional" name="errorCallback">
1315 Callback if an error has occurred.
1318 <Type name="VehiclePropertyErrorCallback"/>
1322 <Operation name="listZones" id="::Vehicle::listZones">
1323 <webidl> sequence<unsigned short> listZones(DOMString objectType);</webidl>
1324 <Type type="sequence">
1325 <Type type="unsigned short"/>
1328 <Argument name="objectType">
1329 <Type type="DOMString"/>
1334 <Interface name="VehicleSpeed" id="::VehicleSpeed">
1335 <webidl>[NoInterfaceObject]
1336 interface VehicleSpeed : <ref>VehiclePropertyType</ref> {
1338 attribute unsigned long vehicleSpeed;
1340 <ExtendedAttributeList>
1341 <ExtendedAttribute name="NoInterfaceObject">
1342 <webidl>NoInterfaceObject</webidl>
1343 </ExtendedAttribute>
1344 </ExtendedAttributeList>
1345 <InterfaceInheritance>
1346 <Name name="VehiclePropertyType"/>
1347 </InterfaceInheritance>
1348 <Attribute name="vehicleSpeed" id="::VehicleSpeed::vehicleSpeed">
1349 <webidl> attribute unsigned long vehicleSpeed;</webidl>
1357 Must return Vehicle Speed in kilometers per hour.
1360 <Type type="unsigned long"/>
1363 <Interface name="EngineSpeed" id="::EngineSpeed">
1364 <webidl>[NoInterfaceObject]
1365 interface EngineSpeed : <ref>VehiclePropertyType</ref> {
1367 attribute unsigned long engineSpeed;
1369 <ExtendedAttributeList>
1370 <ExtendedAttribute name="NoInterfaceObject">
1371 <webidl>NoInterfaceObject</webidl>
1372 </ExtendedAttribute>
1373 </ExtendedAttributeList>
1374 <InterfaceInheritance>
1375 <Name name="VehiclePropertyType"/>
1376 </InterfaceInheritance>
1377 <Attribute name="engineSpeed" id="::EngineSpeed::engineSpeed">
1378 <webidl> attribute unsigned long engineSpeed;</webidl>
1386 Must return Engine Speed in rotations per minute.
1389 <Type type="unsigned long"/>
1392 <Interface name="VehiclePowerMode" id="::VehiclePowerMode">
1393 <webidl>[NoInterfaceObject]
1394 interface VehiclePowerMode : <ref>VehiclePropertyType</ref> {
1395 const unsigned short VEHICLEPOWERMODE_OFF = 0;
1396 const unsigned short VEHICLEPOWERMODE_ACCESSORY1 = 1;
1397 const unsigned short VEHICLEPOWERMODE_ACCESSORY2 = 2;
1398 const unsigned short VEHICLEPOWERMODE_RUN = 3;
1400 attribute octet vehiclePowerMode;
1402 <ExtendedAttributeList>
1403 <ExtendedAttribute name="NoInterfaceObject">
1404 <webidl>NoInterfaceObject</webidl>
1405 </ExtendedAttribute>
1406 </ExtendedAttributeList>
1407 <InterfaceInheritance>
1408 <Name name="VehiclePropertyType"/>
1409 </InterfaceInheritance>
1410 <Const name="VEHICLEPOWERMODE_OFF" value="0" id="::VehiclePowerMode::VEHICLEPOWERMODE_OFF">
1411 <webidl> const unsigned short VEHICLEPOWERMODE_OFF = 0;</webidl>
1412 <Type type="unsigned short"/>
1414 <Const name="VEHICLEPOWERMODE_ACCESSORY1" value="1" id="::VehiclePowerMode::VEHICLEPOWERMODE_ACCESSORY1">
1415 <webidl> const unsigned short VEHICLEPOWERMODE_ACCESSORY1 = 1;</webidl>
1416 <Type type="unsigned short"/>
1418 <Const name="VEHICLEPOWERMODE_ACCESSORY2" value="2" id="::VehiclePowerMode::VEHICLEPOWERMODE_ACCESSORY2">
1419 <webidl> const unsigned short VEHICLEPOWERMODE_ACCESSORY2 = 2;</webidl>
1420 <Type type="unsigned short"/>
1422 <Const name="VEHICLEPOWERMODE_RUN" value="3" id="::VehiclePowerMode::VEHICLEPOWERMODE_RUN">
1423 <webidl> const unsigned short VEHICLEPOWERMODE_RUN = 3;</webidl>
1424 <Type type="unsigned short"/>
1426 <Attribute name="vehiclePowerMode" id="::VehiclePowerMode::vehiclePowerMode">
1427 <webidl> attribute octet vehiclePowerMode;</webidl>
1435 Must return Vehicle Power mode (see VEHICLEPOWERMODE)
1438 <Type type="octet"/>
1441 <Interface name="TripMeter" id="::TripMeter">
1442 <webidl>[NoInterfaceObject]
1443 interface TripMeter : <ref>VehiclePropertyType</ref> {
1445 attribute sequence<unsigned long> tripMeters;
1447 <ExtendedAttributeList>
1448 <ExtendedAttribute name="NoInterfaceObject">
1449 <webidl>NoInterfaceObject</webidl>
1450 </ExtendedAttribute>
1451 </ExtendedAttributeList>
1452 <InterfaceInheritance>
1453 <Name name="VehiclePropertyType"/>
1454 </InterfaceInheritance>
1455 <Attribute name="tripMeters" id="::TripMeter::tripMeters">
1456 <webidl> attribute sequence<unsigned long> tripMeters;</webidl>
1464 Must return trip meters. Changing any items in the array will reset the item's value to '0'.
1467 <Type type="sequence">
1468 <Type type="unsigned long"/>
1472 <Interface name="Acceleration" id="::Acceleration">
1473 <webidl>[NoInterfaceObject]
1474 interface Acceleration : <ref>VehiclePropertyType</ref> {
1476 attribute unsigned long x;
1478 attribute unsigned long y;
1480 attribute unsigned long z;
1482 <ExtendedAttributeList>
1483 <ExtendedAttribute name="NoInterfaceObject">
1484 <webidl>NoInterfaceObject</webidl>
1485 </ExtendedAttribute>
1486 </ExtendedAttributeList>
1487 <InterfaceInheritance>
1488 <Name name="VehiclePropertyType"/>
1489 </InterfaceInheritance>
1490 <Attribute name="x" id="::Acceleration::x">
1491 <webidl> attribute unsigned long x;</webidl>
1499 Must return acceleration on the "X" axis as 1/1000 G (gravitational force).
1502 <Type type="unsigned long"/>
1504 <Attribute name="y" id="::Acceleration::y">
1505 <webidl> attribute unsigned long y;</webidl>
1513 Must return acceleration on the "Y" axis as 1/1000 G (gravitational force).
1516 <Type type="unsigned long"/>
1518 <Attribute name="z" id="::Acceleration::z">
1519 <webidl> attribute unsigned long z;</webidl>
1527 Must return acceleration on the "Z" axis as 1/1000 G (gravitational force).
1530 <Type type="unsigned long"/>
1533 <Interface name="Transmission" id="::Transmission">
1534 <webidl>[NoInterfaceObject]
1535 interface Transmission : <ref>VehiclePropertyType</ref> {
1536 const unsigned short TRANSMISSIONPOSITION_NEUTRAL = 0;
1537 const unsigned short TRANSMISSIONPOSITION_FIRST = 1;
1538 const unsigned short TRANSMISSIONPOSITION_SECOND = 2;
1539 const unsigned short TRANSMISSIONPOSITION_THIRD = 3;
1540 const unsigned short TRANSMISSIONPOSITION_FORTH = 4;
1541 const unsigned short TRANSMISSIONPOSITION_FIFTH = 5;
1542 const unsigned short TRANSMISSIONPOSITION_SIXTH = 6;
1543 const unsigned short TRANSMISSIONPOSITION_SEVENTH = 7;
1544 const unsigned short TRANSMISSIONPOSITION_EIGHTH = 8;
1545 const unsigned short TRANSMISSIONPOSITION_NINTH = 9;
1546 const unsigned short TRANSMISSIONPOSITION_TENTH = 10;
1547 const unsigned short TRANSMISSIONPOSITION_CVT = 64;
1548 const unsigned short TRANSMISSIONPOSITION_REVERSE = 128;
1549 const unsigned short TRANSMISSIONPOSITION_PARK = 255;
1550 const unsigned short TRANSMISSIONMODE_NORMAL = 0;
1551 const unsigned short TRANSMISSIONMODE_SPORT = 1;
1552 const unsigned short TRANSMISSIONMODE_ECONOMY = 2;
1553 const unsigned short TRANSMISSIONMODE_OEMCUSTOM1 = 3;
1554 const unsigned short TRANSMISSIONMODE_OEMCUSTOM2 = 4;
1556 attribute octet gearPosition;
1558 attribute octet mode;
1560 <ExtendedAttributeList>
1561 <ExtendedAttribute name="NoInterfaceObject">
1562 <webidl>NoInterfaceObject</webidl>
1563 </ExtendedAttribute>
1564 </ExtendedAttributeList>
1565 <InterfaceInheritance>
1566 <Name name="VehiclePropertyType"/>
1567 </InterfaceInheritance>
1568 <Const name="TRANSMISSIONPOSITION_NEUTRAL" value="0" id="::Transmission::TRANSMISSIONPOSITION_NEUTRAL">
1569 <webidl> const unsigned short TRANSMISSIONPOSITION_NEUTRAL = 0;</webidl>
1570 <Type type="unsigned short"/>
1572 <Const name="TRANSMISSIONPOSITION_FIRST" value="1" id="::Transmission::TRANSMISSIONPOSITION_FIRST">
1573 <webidl> const unsigned short TRANSMISSIONPOSITION_FIRST = 1;</webidl>
1574 <Type type="unsigned short"/>
1576 <Const name="TRANSMISSIONPOSITION_SECOND" value="2" id="::Transmission::TRANSMISSIONPOSITION_SECOND">
1577 <webidl> const unsigned short TRANSMISSIONPOSITION_SECOND = 2;</webidl>
1578 <Type type="unsigned short"/>
1580 <Const name="TRANSMISSIONPOSITION_THIRD" value="3" id="::Transmission::TRANSMISSIONPOSITION_THIRD">
1581 <webidl> const unsigned short TRANSMISSIONPOSITION_THIRD = 3;</webidl>
1582 <Type type="unsigned short"/>
1584 <Const name="TRANSMISSIONPOSITION_FORTH" value="4" id="::Transmission::TRANSMISSIONPOSITION_FORTH">
1585 <webidl> const unsigned short TRANSMISSIONPOSITION_FORTH = 4;</webidl>
1586 <Type type="unsigned short"/>
1588 <Const name="TRANSMISSIONPOSITION_FIFTH" value="5" id="::Transmission::TRANSMISSIONPOSITION_FIFTH">
1589 <webidl> const unsigned short TRANSMISSIONPOSITION_FIFTH = 5;</webidl>
1590 <Type type="unsigned short"/>
1592 <Const name="TRANSMISSIONPOSITION_SIXTH" value="6" id="::Transmission::TRANSMISSIONPOSITION_SIXTH">
1593 <webidl> const unsigned short TRANSMISSIONPOSITION_SIXTH = 6;</webidl>
1594 <Type type="unsigned short"/>
1596 <Const name="TRANSMISSIONPOSITION_SEVENTH" value="7" id="::Transmission::TRANSMISSIONPOSITION_SEVENTH">
1597 <webidl> const unsigned short TRANSMISSIONPOSITION_SEVENTH = 7;</webidl>
1598 <Type type="unsigned short"/>
1600 <Const name="TRANSMISSIONPOSITION_EIGHTH" value="8" id="::Transmission::TRANSMISSIONPOSITION_EIGHTH">
1601 <webidl> const unsigned short TRANSMISSIONPOSITION_EIGHTH = 8;</webidl>
1602 <Type type="unsigned short"/>
1604 <Const name="TRANSMISSIONPOSITION_NINTH" value="9" id="::Transmission::TRANSMISSIONPOSITION_NINTH">
1605 <webidl> const unsigned short TRANSMISSIONPOSITION_NINTH = 9;</webidl>
1606 <Type type="unsigned short"/>
1608 <Const name="TRANSMISSIONPOSITION_TENTH" value="10" id="::Transmission::TRANSMISSIONPOSITION_TENTH">
1609 <webidl> const unsigned short TRANSMISSIONPOSITION_TENTH = 10;</webidl>
1610 <Type type="unsigned short"/>
1612 <Const name="TRANSMISSIONPOSITION_CVT" value="64" id="::Transmission::TRANSMISSIONPOSITION_CVT">
1613 <webidl> const unsigned short TRANSMISSIONPOSITION_CVT = 64;</webidl>
1614 <Type type="unsigned short"/>
1616 <Const name="TRANSMISSIONPOSITION_REVERSE" value="128" id="::Transmission::TRANSMISSIONPOSITION_REVERSE">
1617 <webidl> const unsigned short TRANSMISSIONPOSITION_REVERSE = 128;</webidl>
1618 <Type type="unsigned short"/>
1620 <Const name="TRANSMISSIONPOSITION_PARK" value="255" id="::Transmission::TRANSMISSIONPOSITION_PARK">
1621 <webidl> const unsigned short TRANSMISSIONPOSITION_PARK = 255;</webidl>
1622 <Type type="unsigned short"/>
1624 <Const name="TRANSMISSIONMODE_NORMAL" value="0" id="::Transmission::TRANSMISSIONMODE_NORMAL">
1625 <webidl> const unsigned short TRANSMISSIONMODE_NORMAL = 0;</webidl>
1626 <Type type="unsigned short"/>
1628 <Const name="TRANSMISSIONMODE_SPORT" value="1" id="::Transmission::TRANSMISSIONMODE_SPORT">
1629 <webidl> const unsigned short TRANSMISSIONMODE_SPORT = 1;</webidl>
1630 <Type type="unsigned short"/>
1632 <Const name="TRANSMISSIONMODE_ECONOMY" value="2" id="::Transmission::TRANSMISSIONMODE_ECONOMY">
1633 <webidl> const unsigned short TRANSMISSIONMODE_ECONOMY = 2;</webidl>
1634 <Type type="unsigned short"/>
1636 <Const name="TRANSMISSIONMODE_OEMCUSTOM1" value="3" id="::Transmission::TRANSMISSIONMODE_OEMCUSTOM1">
1637 <webidl> const unsigned short TRANSMISSIONMODE_OEMCUSTOM1 = 3;</webidl>
1638 <Type type="unsigned short"/>
1640 <Const name="TRANSMISSIONMODE_OEMCUSTOM2" value="4" id="::Transmission::TRANSMISSIONMODE_OEMCUSTOM2">
1641 <webidl> const unsigned short TRANSMISSIONMODE_OEMCUSTOM2 = 4;</webidl>
1642 <Type type="unsigned short"/>
1644 <Attribute name="gearPosition" id="::Transmission::gearPosition">
1645 <webidl> attribute octet gearPosition;</webidl>
1653 Must return transmission gear position (see TRANSMISSIONPOSITION)
1656 <Type type="octet"/>
1658 <Attribute name="mode" id="::Transmission::mode">
1659 <webidl> attribute octet mode;</webidl>
1667 Must return transmission Mode (see
1670 <Type type="octet"/>
1673 <Interface name="CruiseControlStatus" id="::CruiseControlStatus">
1674 <webidl>[NoInterfaceObject]
1675 interface CruiseControlStatus : <ref>VehiclePropertyType</ref> {
1677 attribute boolean activated;
1679 attribute unsigned short speed;
1681 <ExtendedAttributeList>
1682 <ExtendedAttribute name="NoInterfaceObject">
1683 <webidl>NoInterfaceObject</webidl>
1684 </ExtendedAttribute>
1685 </ExtendedAttributeList>
1686 <InterfaceInheritance>
1687 <Name name="VehiclePropertyType"/>
1688 </InterfaceInheritance>
1689 <Attribute name="activated" id="::CruiseControlStatus::activated">
1690 <webidl> attribute boolean activated;</webidl>
1698 Must return whether or not the Cruise Control system is active (true) or inactive (false)
1701 <Type type="boolean"/>
1703 <Attribute name="speed" id="::CruiseControlStatus::speed">
1704 <webidl> attribute unsigned short speed;</webidl>
1712 Must return target Cruise Control speed in kilometers per hour (kph).
1715 <Type type="unsigned short"/>
1718 <Interface name="WheelBrake" id="::WheelBrake">
1719 <webidl>[NoInterfaceObject]
1720 interface WheelBrake : <ref>VehiclePropertyType</ref> {
1722 attribute boolean engaged;
1724 <ExtendedAttributeList>
1725 <ExtendedAttribute name="NoInterfaceObject">
1726 <webidl>NoInterfaceObject</webidl>
1727 </ExtendedAttribute>
1728 </ExtendedAttributeList>
1729 <InterfaceInheritance>
1730 <Name name="VehiclePropertyType"/>
1731 </InterfaceInheritance>
1732 <Attribute name="engaged" id="::WheelBrake::engaged">
1733 <webidl> attribute boolean engaged;</webidl>
1741 Must return Wheel Brake status: Engaged = true, disengaged = false
1744 <Type type="boolean"/>
1747 <Interface name="LightStatus" id="::LightStatus">
1748 <webidl>[NoInterfaceObject]
1749 interface LightStatus : <ref>VehiclePropertyType</ref> {
1751 attribute boolean head;
1753 attribute boolean rightTurn;
1755 attribute boolean leftTurn;
1757 attribute boolean brake;
1759 attribute boolean fog;
1761 attribute boolean hazard;
1763 attribute boolean parking;
1765 attribute boolean highBeam;
1767 <ExtendedAttributeList>
1768 <ExtendedAttribute name="NoInterfaceObject">
1769 <webidl>NoInterfaceObject</webidl>
1770 </ExtendedAttribute>
1771 </ExtendedAttributeList>
1772 <InterfaceInheritance>
1773 <Name name="VehiclePropertyType"/>
1774 </InterfaceInheritance>
1775 <Attribute name="head" id="::LightStatus::head">
1776 <webidl> attribute boolean head;</webidl>
1784 Must return headlight status: on = true, off = false.
1787 <Type type="boolean"/>
1789 <Attribute name="rightTurn" id="::LightStatus::rightTurn">
1790 <webidl> attribute boolean rightTurn;</webidl>
1798 Must return right turn signal status: on = true, off = false.
1801 <Type type="boolean"/>
1803 <Attribute name="leftTurn" id="::LightStatus::leftTurn">
1804 <webidl> attribute boolean leftTurn;</webidl>
1812 Must return left turn signal status: on = true, off = false.
1815 <Type type="boolean"/>
1817 <Attribute name="brake" id="::LightStatus::brake">
1818 <webidl> attribute boolean brake;</webidl>
1826 Must return brake signal light status: on = true, off = false.
1829 <Type type="boolean"/>
1831 <Attribute name="fog" id="::LightStatus::fog">
1832 <webidl> attribute boolean fog;</webidl>
1840 Must return fog light status: on = true, off = false.
1843 <Type type="boolean"/>
1845 <Attribute name="hazard" id="::LightStatus::hazard">
1846 <webidl> attribute boolean hazard;</webidl>
1854 Must return hazard light status: on = true, off = false.
1857 <Type type="boolean"/>
1859 <Attribute name="parking" id="::LightStatus::parking">
1860 <webidl> attribute boolean parking;</webidl>
1868 Must return parking light status: on = true, off = false.
1871 <Type type="boolean"/>
1873 <Attribute name="highBeam" id="::LightStatus::highBeam">
1874 <webidl> attribute boolean highBeam;</webidl>
1882 Must return high beam status: on = true, off = false.
1885 <Type type="boolean"/>
1888 <Interface name="InteriorLightStatus" id="::InteriorLightStatus">
1889 <webidl>[NoInterfaceObject]
1890 interface InteriorLightStatus : <ref>VehiclePropertyType</ref> {
1892 attribute boolean passenger;
1894 attribute boolean driver;
1896 attribute boolean center;
1898 <ExtendedAttributeList>
1899 <ExtendedAttribute name="NoInterfaceObject">
1900 <webidl>NoInterfaceObject</webidl>
1901 </ExtendedAttribute>
1902 </ExtendedAttributeList>
1903 <InterfaceInheritance>
1904 <Name name="VehiclePropertyType"/>
1905 </InterfaceInheritance>
1906 <Attribute name="passenger" id="::InteriorLightStatus::passenger">
1907 <webidl> attribute boolean passenger;</webidl>
1915 Must return passenger interior light status: on = true, off = false
1918 <Type type="boolean"/>
1920 <Attribute name="driver" id="::InteriorLightStatus::driver">
1921 <webidl> attribute boolean driver;</webidl>
1929 Must return driver interior light status: on = true, off = false
1932 <Type type="boolean"/>
1934 <Attribute name="center" id="::InteriorLightStatus::center">
1935 <webidl> attribute boolean center;</webidl>
1943 Must return center interior light status: on = true, off = false
1946 <Type type="boolean"/>
1949 <Interface name="Horn" id="::Horn">
1950 <webidl>[NoInterfaceObject]
1951 interface Horn : <ref>VehiclePropertyType</ref> {
1953 attribute boolean on;
1955 <ExtendedAttributeList>
1956 <ExtendedAttribute name="NoInterfaceObject">
1957 <webidl>NoInterfaceObject</webidl>
1958 </ExtendedAttribute>
1959 </ExtendedAttributeList>
1960 <InterfaceInheritance>
1961 <Name name="VehiclePropertyType"/>
1962 </InterfaceInheritance>
1963 <Attribute name="on" id="::Horn::on">
1964 <webidl> attribute boolean on;</webidl>
1972 Must return horn status: on = true, off = false
1975 <Type type="boolean"/>
1978 <Interface name="Fuel" id="::Fuel">
1979 <webidl>[NoInterfaceObject]
1980 interface Fuel : <ref>VehiclePropertyType</ref> {
1982 attribute unsigned short level;
1984 attribute unsigned short range;
1986 attribute unsigned short instantConsumption;
1988 attribute unsigned short instantEconomy;
1990 attribute unsigned short averageEconomy;
1992 <ExtendedAttributeList>
1993 <ExtendedAttribute name="NoInterfaceObject">
1994 <webidl>NoInterfaceObject</webidl>
1995 </ExtendedAttribute>
1996 </ExtendedAttributeList>
1997 <InterfaceInheritance>
1998 <Name name="VehiclePropertyType"/>
1999 </InterfaceInheritance>
2000 <Attribute name="level" id="::Fuel::level">
2001 <webidl> attribute unsigned short level;</webidl>
2009 Must return fuel level as a percentage of fullness.
2012 <Type type="unsigned short"/>
2014 <Attribute name="range" id="::Fuel::range">
2015 <webidl> attribute unsigned short range;</webidl>
2023 Must return estimated fuel range in kilometers.
2026 <Type type="unsigned short"/>
2028 <Attribute name="instantConsumption" id="::Fuel::instantConsumption">
2029 <webidl> attribute unsigned short instantConsumption;</webidl>
2037 Must return instant fuel consumption in milliliters of fuel per second.
2040 <Type type="unsigned short"/>
2042 <Attribute name="instantEconomy" id="::Fuel::instantEconomy">
2043 <webidl> attribute unsigned short instantEconomy;</webidl>
2051 Must return instant fuel 'economy' in kilometers per liter of fuel.
2054 <Type type="unsigned short"/>
2056 <Attribute name="averageEconomy" id="::Fuel::averageEconomy">
2057 <webidl> attribute unsigned short averageEconomy;</webidl>
2065 Must return average fuel 'economy' in kilometers per liter of fuel since last reset. Setting this to any value should reset the counter to '0'
2068 <Type type="unsigned short"/>
2071 <Interface name="EngineOil" id="::EngineOil">
2072 <webidl>[NoInterfaceObject]
2073 interface EngineOil : <ref>VehiclePropertyType</ref> {
2075 attribute unsigned short remaining;
2077 attribute long temperature;
2079 attribute unsigned short pressure;
2081 <ExtendedAttributeList>
2082 <ExtendedAttribute name="NoInterfaceObject">
2083 <webidl>NoInterfaceObject</webidl>
2084 </ExtendedAttribute>
2085 </ExtendedAttributeList>
2086 <InterfaceInheritance>
2087 <Name name="VehiclePropertyType"/>
2088 </InterfaceInheritance>
2089 <Attribute name="remaining" id="::EngineOil::remaining">
2090 <webidl> attribute unsigned short remaining;</webidl>
2098 Must return remaining engine oil as percentage of fullness.
2101 <Type type="unsigned short"/>
2103 <Attribute name="temperature" id="::EngineOil::temperature">
2104 <webidl> attribute long temperature;</webidl>
2112 Must return Engine Oil Temperature in Celcius.
2117 <Attribute name="pressure" id="::EngineOil::pressure">
2118 <webidl> attribute unsigned short pressure;</webidl>
2126 Must return Engine Oil Pressure in kPa.
2129 <Type type="unsigned short"/>
2132 <Interface name="Location" id="::Location">
2133 <webidl>[NoInterfaceObject]
2134 interface Location : <ref>VehiclePropertyType</ref> {
2136 attribute double latitude;
2138 attribute double longitude;
2140 attribute double altitude;
2142 attribute unsigned short direction;
2144 <ExtendedAttributeList>
2145 <ExtendedAttribute name="NoInterfaceObject">
2146 <webidl>NoInterfaceObject</webidl>
2147 </ExtendedAttribute>
2148 </ExtendedAttributeList>
2149 <InterfaceInheritance>
2150 <Name name="VehiclePropertyType"/>
2151 </InterfaceInheritance>
2152 <Attribute name="latitude" id="::Location::latitude">
2153 <webidl> attribute double latitude;</webidl>
2161 Must return latitude in Deg.Min (-180, +180)
2164 <Type type="double"/>
2166 <Attribute name="longitude" id="::Location::longitude">
2167 <webidl> attribute double longitude;</webidl>
2175 Must return longitude in Deg.Min (-90, +90)
2178 <Type type="double"/>
2180 <Attribute name="altitude" id="::Location::altitude">
2181 <webidl> attribute double altitude;</webidl>
2189 Must return altitude in meters above sea-level (0).
2192 <Type type="double"/>
2194 <Attribute name="direction" id="::Location::direction">
2195 <webidl> attribute unsigned short direction;</webidl>
2203 Must return direction in Degrees (0-360)
2206 <Type type="unsigned short"/>
2209 <Interface name="ExteriorBrightness" id="::ExteriorBrightness">
2210 <webidl>[NoInterfaceObject]
2211 interface ExteriorBrightness : <ref>VehiclePropertyType</ref> {
2213 attribute unsigned long exteriorBrightness;
2215 <ExtendedAttributeList>
2216 <ExtendedAttribute name="NoInterfaceObject">
2217 <webidl>NoInterfaceObject</webidl>
2218 </ExtendedAttribute>
2219 </ExtendedAttributeList>
2220 <InterfaceInheritance>
2221 <Name name="VehiclePropertyType"/>
2222 </InterfaceInheritance>
2223 <Attribute name="exteriorBrightness" id="::ExteriorBrightness::exteriorBrightness">
2224 <webidl> attribute unsigned long exteriorBrightness;</webidl>
2232 Must return the brightness outside the vehicle in lux.
2235 <Type type="unsigned long"/>
2238 <Interface name="Temperature" id="::Temperature">
2239 <webidl>[NoInterfaceObject]
2240 interface Temperature : <ref>VehiclePropertyType</ref> {
2242 attribute short interior;
2244 attribute short exterior;
2246 <ExtendedAttributeList>
2247 <ExtendedAttribute name="NoInterfaceObject">
2248 <webidl>NoInterfaceObject</webidl>
2249 </ExtendedAttribute>
2250 </ExtendedAttributeList>
2251 <InterfaceInheritance>
2252 <Name name="VehiclePropertyType"/>
2253 </InterfaceInheritance>
2254 <Attribute name="interior" id="::Temperature::interior">
2255 <webidl> attribute short interior;</webidl>
2263 Must return the temperature of the interior of the vehicle in celcius.
2266 <Type type="short"/>
2268 <Attribute name="exterior" id="::Temperature::exterior">
2269 <webidl> attribute short exterior;</webidl>
2277 Must return the temperature of the exterior of the vehicle in celcius.
2280 <Type type="short"/>
2283 <Interface name="RainSensor" id="::RainSensor">
2284 <webidl>[NoInterfaceObject]
2285 interface RainSensor : <ref>VehiclePropertyType</ref> {
2287 attribute unsigned short rainSensor;
2289 <ExtendedAttributeList>
2290 <ExtendedAttribute name="NoInterfaceObject">
2291 <webidl>NoInterfaceObject</webidl>
2292 </ExtendedAttribute>
2293 </ExtendedAttributeList>
2294 <InterfaceInheritance>
2295 <Name name="VehiclePropertyType"/>
2296 </InterfaceInheritance>
2297 <Attribute name="rainSensor" id="::RainSensor::rainSensor">
2298 <webidl> attribute unsigned short rainSensor;</webidl>
2306 Must return level of rain intensity 0: No Rain - 10: Heaviest Rain.
2309 <Type type="unsigned short"/>
2312 <Interface name="WindshieldWiper" id="::WindshieldWiper">
2313 <webidl>[NoInterfaceObject]
2314 interface WindshieldWiper : <ref>VehiclePropertyType</ref> {
2315 const unsigned short WIPERSPEED_OFF = 0;
2316 const unsigned short WIPERSPEED_SLOWEST= 1;
2317 const unsigned short WIPERSPEED_FASTEST = 5;
2318 const unsigned short WIPERSPEED_AUTO = 10;
2320 attribute unsigned short windshieldWiper;
2322 <ExtendedAttributeList>
2323 <ExtendedAttribute name="NoInterfaceObject">
2324 <webidl>NoInterfaceObject</webidl>
2325 </ExtendedAttribute>
2326 </ExtendedAttributeList>
2327 <InterfaceInheritance>
2328 <Name name="VehiclePropertyType"/>
2329 </InterfaceInheritance>
2330 <Const name="WIPERSPEED_OFF" value="0" id="::WindshieldWiper::WIPERSPEED_OFF">
2331 <webidl> const unsigned short WIPERSPEED_OFF = 0;</webidl>
2332 <Type type="unsigned short"/>
2334 <Const name="WIPERSPEED_SLOWEST" value="1" id="::WindshieldWiper::WIPERSPEED_SLOWEST">
2335 <webidl> const unsigned short WIPERSPEED_SLOWEST= 1;</webidl>
2336 <Type type="unsigned short"/>
2338 <Const name="WIPERSPEED_FASTEST" value="5" id="::WindshieldWiper::WIPERSPEED_FASTEST">
2339 <webidl> const unsigned short WIPERSPEED_FASTEST = 5;</webidl>
2340 <Type type="unsigned short"/>
2342 <Const name="WIPERSPEED_AUTO" value="10" id="::WindshieldWiper::WIPERSPEED_AUTO">
2343 <webidl> const unsigned short WIPERSPEED_AUTO = 10;</webidl>
2344 <Type type="unsigned short"/>
2346 <Attribute name="windshieldWiper" id="::WindshieldWiper::windshieldWiper">
2347 <webidl> attribute unsigned short windshieldWiper;</webidl>
2355 Must return Level of windshield whiper speed (see WIPERSPEED)
2358 <Type type="unsigned short"/>
2361 <Dictionary name="DefrostDictionary" id="::DefrostDictionary">
2362 <webidl>dictionary DefrostDictionary {
2363 unsigned short window;
2366 <DictionaryMember name="window" id="::DefrostDictionary::window">
2367 <webidl> unsigned short window;</webidl>
2368 <Type type="unsigned short"/>
2370 <DictionaryMember name="defrost" id="::DefrostDictionary::defrost">
2371 <webidl> boolean defrost;</webidl>
2372 <Type type="boolean"/>
2375 <Interface name="HVAC" id="::HVAC">
2376 <webidl>[NoInterfaceObject]
2377 interface HVAC : <ref>VehiclePropertyType</ref> {
2378 const unsigned short AIRFLOWDIRECTION_FRONTPANEL = 0;
2379 const unsigned short AIRFLOWDIRECTION_FLOORDUCT= 1;
2380 const unsigned short AIRFLOWDIRECTION_FRONT = 0x02;
2381 const unsigned short AIRFLOWDIRECTION_DEFROSTER = 0x04;
2383 attribute unsigned short airflowDirection;
2385 attribute unsigned short fanSpeed;
2387 attribute unsigned short targetTemperature;
2389 attribute boolean airConditioning;
2391 attribute boolean airRecirculation;
2393 attribute boolean heater;
2395 attribute <ref>DefrostDictionary</ref> defrost;
2397 attribute boolean steeringWheelHeater;
2399 attribute boolean seatHeater;
2401 attribute boolean seatCooler;
2403 <ExtendedAttributeList>
2404 <ExtendedAttribute name="NoInterfaceObject">
2405 <webidl>NoInterfaceObject</webidl>
2406 </ExtendedAttribute>
2407 </ExtendedAttributeList>
2408 <InterfaceInheritance>
2409 <Name name="VehiclePropertyType"/>
2410 </InterfaceInheritance>
2411 <Const name="AIRFLOWDIRECTION_FRONTPANEL" value="0" id="::HVAC::AIRFLOWDIRECTION_FRONTPANEL">
2412 <webidl> const unsigned short AIRFLOWDIRECTION_FRONTPANEL = 0;</webidl>
2413 <Type type="unsigned short"/>
2415 <Const name="AIRFLOWDIRECTION_FLOORDUCT" value="1" id="::HVAC::AIRFLOWDIRECTION_FLOORDUCT">
2416 <webidl> const unsigned short AIRFLOWDIRECTION_FLOORDUCT= 1;</webidl>
2417 <Type type="unsigned short"/>
2419 <Const name="AIRFLOWDIRECTION_FRONT" value="0x02" id="::HVAC::AIRFLOWDIRECTION_FRONT">
2420 <webidl> const unsigned short AIRFLOWDIRECTION_FRONT = 0x02;</webidl>
2421 <Type type="unsigned short"/>
2423 <Const name="AIRFLOWDIRECTION_DEFROSTER" value="0x04" id="::HVAC::AIRFLOWDIRECTION_DEFROSTER">
2424 <webidl> const unsigned short AIRFLOWDIRECTION_DEFROSTER = 0x04;</webidl>
2425 <Type type="unsigned short"/>
2427 <Attribute name="airflowDirection" id="::HVAC::airflowDirection">
2428 <webidl> attribute unsigned short airflowDirection;</webidl>
2436 Must return airflow direction. See
2439 <Type type="unsigned short"/>
2441 <Attribute name="fanSpeed" id="::HVAC::fanSpeed">
2442 <webidl> attribute unsigned short fanSpeed;</webidl>
2450 Must return speed of the fan (0-7)
2453 <Type type="unsigned short"/>
2455 <Attribute name="targetTemperature" id="::HVAC::targetTemperature">
2456 <webidl> attribute unsigned short targetTemperature;</webidl>
2464 Must return target desired temperature in celcius.
2467 <Type type="unsigned short"/>
2469 <Attribute name="airConditioning" id="::HVAC::airConditioning">
2470 <webidl> attribute boolean airConditioning;</webidl>
2478 Must return air conditioning on (true) / off (false).
2481 <Type type="boolean"/>
2483 <Attribute name="airRecirculation" id="::HVAC::airRecirculation">
2484 <webidl> attribute boolean airRecirculation;</webidl>
2492 Must return air recirculation on (true) / off (false).
2495 <Type type="boolean"/>
2497 <Attribute name="heater" id="::HVAC::heater">
2498 <webidl> attribute boolean heater;</webidl>
2506 Must return heater on (true) / off (false).
2509 <Type type="boolean"/>
2511 <Attribute name="defrost" id="::HVAC::defrost">
2512 <webidl> attribute <ref>DefrostDictionary</ref> defrost;</webidl>
2520 Must return the defrost status of all windows equiped with defrosters. This will return a dictionary of DefrostDictionary that represents
2523 each window and its defrost status.
2526 <Type name="DefrostDictionary"/>
2528 <Attribute name="steeringWheelHeater" id="::HVAC::steeringWheelHeater">
2529 <webidl> attribute boolean steeringWheelHeater;</webidl>
2537 Must return air recirculation on (true) / off (false).
2540 <Type type="boolean"/>
2542 <Attribute name="seatHeater" id="::HVAC::seatHeater">
2543 <webidl> attribute boolean seatHeater;</webidl>
2551 Must return seat heater status: on (true) / off (false).
2554 <Type type="boolean"/>
2556 <Attribute name="seatCooler" id="::HVAC::seatCooler">
2557 <webidl> attribute boolean seatCooler;</webidl>
2565 Must return seat heater status: on (true) / off (false).
2568 <Type type="boolean"/>
2571 <Interface name="WindowStatus" id="::WindowStatus">
2572 <webidl>[NoInterfaceObject]
2573 interface WindowStatus : <ref>VehiclePropertyType</ref> {
2574 const unsigned short WINDOWLOCATION_DRIVER= 0;
2575 const unsigned short WINDOWLOCATION_PASSENGER = 1;
2576 const unsigned short WINDOWLOCATION_LEFTREAR = 2;
2577 const unsigned short WINDOWLOCATION_RIGHTREAR = 3;
2578 const unsigned short WINDOWLOCATION_REAR = 4;
2580 attribute object WindowStatus;
2582 <ExtendedAttributeList>
2583 <ExtendedAttribute name="NoInterfaceObject">
2584 <webidl>NoInterfaceObject</webidl>
2585 </ExtendedAttribute>
2586 </ExtendedAttributeList>
2587 <InterfaceInheritance>
2588 <Name name="VehiclePropertyType"/>
2589 </InterfaceInheritance>
2590 <Const name="WINDOWLOCATION_DRIVER" value="0" id="::WindowStatus::WINDOWLOCATION_DRIVER">
2591 <webidl> const unsigned short WINDOWLOCATION_DRIVER= 0;</webidl>
2592 <Type type="unsigned short"/>
2594 <Const name="WINDOWLOCATION_PASSENGER" value="1" id="::WindowStatus::WINDOWLOCATION_PASSENGER">
2595 <webidl> const unsigned short WINDOWLOCATION_PASSENGER = 1;</webidl>
2596 <Type type="unsigned short"/>
2598 <Const name="WINDOWLOCATION_LEFTREAR" value="2" id="::WindowStatus::WINDOWLOCATION_LEFTREAR">
2599 <webidl> const unsigned short WINDOWLOCATION_LEFTREAR = 2;</webidl>
2600 <Type type="unsigned short"/>
2602 <Const name="WINDOWLOCATION_RIGHTREAR" value="3" id="::WindowStatus::WINDOWLOCATION_RIGHTREAR">
2603 <webidl> const unsigned short WINDOWLOCATION_RIGHTREAR = 3;</webidl>
2604 <Type type="unsigned short"/>
2606 <Const name="WINDOWLOCATION_REAR" value="4" id="::WindowStatus::WINDOWLOCATION_REAR">
2607 <webidl> const unsigned short WINDOWLOCATION_REAR = 4;</webidl>
2608 <Type type="unsigned short"/>
2610 <Attribute name="WindowStatus" id="::WindowStatus::WindowStatus">
2611 <webidl> attribute object WindowStatus;</webidl>
2619 Must return window status for each window location. object returned is a
2620 dictionary { unsigned short windowlocation, unsigned short percentage opened }
2623 <Type type="object"/>
2626 <Interface name="Sunroof" id="::Sunroof">
2627 <webidl>[NoInterfaceObject]
2628 interface Sunroof : <ref>VehiclePropertyType</ref> {
2630 attribute unsigned short openness;
2632 attribute unsigned short tilt;
2634 <ExtendedAttributeList>
2635 <ExtendedAttribute name="NoInterfaceObject">
2636 <webidl>NoInterfaceObject</webidl>
2637 </ExtendedAttribute>
2638 </ExtendedAttributeList>
2639 <InterfaceInheritance>
2640 <Name name="VehiclePropertyType"/>
2641 </InterfaceInheritance>
2642 <Attribute name="openness" id="::Sunroof::openness">
2643 <webidl> attribute unsigned short openness;</webidl>
2651 Must return window status for sunroof openness percentage.
2654 <Type type="unsigned short"/>
2656 <Attribute name="tilt" id="::Sunroof::tilt">
2657 <webidl> attribute unsigned short tilt;</webidl>
2665 Must return tilt status for sunroof percentage.
2668 <Type type="unsigned short"/>
2671 <Interface name="ConvertibleRoof" id="::ConvertibleRoof">
2672 <webidl>[NoInterfaceObject]
2673 interface ConvertibleRoof : <ref>VehiclePropertyType</ref> {
2675 attribute unsigned short openness;
2677 <ExtendedAttributeList>
2678 <ExtendedAttribute name="NoInterfaceObject">
2679 <webidl>NoInterfaceObject</webidl>
2680 </ExtendedAttribute>
2681 </ExtendedAttributeList>
2682 <InterfaceInheritance>
2683 <Name name="VehiclePropertyType"/>
2684 </InterfaceInheritance>
2685 <Attribute name="openness" id="::ConvertibleRoof::openness">
2686 <webidl> attribute unsigned short openness;</webidl>
2694 Must return window status for sunroof openness percentage.
2697 <Type type="unsigned short"/>
2700 <Interface name="VehicleId" id="::VehicleId">
2701 <webidl>[NoInterfaceObject]
2702 interface VehicleId : <ref>VehiclePropertyType</ref> {
2704 attribute DOMString WMI;
2706 attribute DOMString VIN;
2708 <ExtendedAttributeList>
2709 <ExtendedAttribute name="NoInterfaceObject">
2710 <webidl>NoInterfaceObject</webidl>
2711 </ExtendedAttribute>
2712 </ExtendedAttributeList>
2713 <InterfaceInheritance>
2714 <Name name="VehiclePropertyType"/>
2715 </InterfaceInheritance>
2716 <Attribute name="WMI" id="::VehicleId::WMI">
2717 <webidl> attribute DOMString WMI;</webidl>
2725 MUST return World Manufacturer Identifier (WMI)
2726 WMI is defined by SAE ISO 3780:2009. 3 characters.
2729 <Type type="DOMString"/>
2731 <Attribute name="VIN" id="::VehicleId::VIN">
2732 <webidl> attribute DOMString VIN;</webidl>
2740 MUST return Vehicle Identification Number (VIN) as defined by ISO 3779. 17 characters.
2743 <Type type="DOMString"/>
2746 <Interface name="Size" id="::Size">
2747 <webidl>[NoInterfaceObject]
2748 interface Size : <ref>VehiclePropertyType</ref> {
2750 attribute unsigned long width;
2752 attribute unsigned long height;
2754 attribute unsigned long length;
2756 <ExtendedAttributeList>
2757 <ExtendedAttribute name="NoInterfaceObject">
2758 <webidl>NoInterfaceObject</webidl>
2759 </ExtendedAttribute>
2760 </ExtendedAttributeList>
2761 <InterfaceInheritance>
2762 <Name name="VehiclePropertyType"/>
2763 </InterfaceInheritance>
2764 <Attribute name="width" id="::Size::width">
2765 <webidl> attribute unsigned long width;</webidl>
2773 MUST return width of vehicle in mm
2776 <Type type="unsigned long"/>
2778 <Attribute name="height" id="::Size::height">
2779 <webidl> attribute unsigned long height;</webidl>
2787 MUST return height of vehicle in mm
2790 <Type type="unsigned long"/>
2792 <Attribute name="length" id="::Size::length">
2793 <webidl> attribute unsigned long length;</webidl>
2801 MUST return length of vehicle in mm
2804 <Type type="unsigned long"/>
2807 <Interface name="FuelInfo" id="::FuelInfo">
2808 <webidl>[NoInterfaceObject]
2809 interface FuelInfo : <ref>VehiclePropertyType</ref> {
2810 const unsigned short FUELTYPE_GASOLINE = 0;
2811 const unsigned short FUELTYPE_HIGH_OCTANE= 1;
2812 const unsigned short FUELTYPE_DIESEL = 2;
2813 const unsigned short FUELTYPE_ELECTRIC = 3;
2814 const unsigned short FUELTYPE_HYDROGEN = 4;
2815 const unsigned short REFUELPOSITION_LEFT = 0;
2816 const unsigned short REFUELPOSITION_RIGHT= 1;
2817 const unsigned short REFUELPOSITION_FRONT = 2;
2818 const unsigned short REFUELPOSITION_REAR = 3;
2820 attribute unsigned short type;
2822 attribute unsigned short refuelPosition;
2824 <ExtendedAttributeList>
2825 <ExtendedAttribute name="NoInterfaceObject">
2826 <webidl>NoInterfaceObject</webidl>
2827 </ExtendedAttribute>
2828 </ExtendedAttributeList>
2829 <InterfaceInheritance>
2830 <Name name="VehiclePropertyType"/>
2831 </InterfaceInheritance>
2832 <Const name="FUELTYPE_GASOLINE" value="0" id="::FuelInfo::FUELTYPE_GASOLINE">
2833 <webidl> const unsigned short FUELTYPE_GASOLINE = 0;</webidl>
2834 <Type type="unsigned short"/>
2836 <Const name="FUELTYPE_HIGH_OCTANE" value="1" id="::FuelInfo::FUELTYPE_HIGH_OCTANE">
2837 <webidl> const unsigned short FUELTYPE_HIGH_OCTANE= 1;</webidl>
2838 <Type type="unsigned short"/>
2840 <Const name="FUELTYPE_DIESEL" value="2" id="::FuelInfo::FUELTYPE_DIESEL">
2841 <webidl> const unsigned short FUELTYPE_DIESEL = 2;</webidl>
2842 <Type type="unsigned short"/>
2844 <Const name="FUELTYPE_ELECTRIC" value="3" id="::FuelInfo::FUELTYPE_ELECTRIC">
2845 <webidl> const unsigned short FUELTYPE_ELECTRIC = 3;</webidl>
2846 <Type type="unsigned short"/>
2848 <Const name="FUELTYPE_HYDROGEN" value="4" id="::FuelInfo::FUELTYPE_HYDROGEN">
2849 <webidl> const unsigned short FUELTYPE_HYDROGEN = 4;</webidl>
2850 <Type type="unsigned short"/>
2852 <Const name="REFUELPOSITION_LEFT" value="0" id="::FuelInfo::REFUELPOSITION_LEFT">
2853 <webidl> const unsigned short REFUELPOSITION_LEFT = 0;</webidl>
2854 <Type type="unsigned short"/>
2856 <Const name="REFUELPOSITION_RIGHT" value="1" id="::FuelInfo::REFUELPOSITION_RIGHT">
2857 <webidl> const unsigned short REFUELPOSITION_RIGHT= 1;</webidl>
2858 <Type type="unsigned short"/>
2860 <Const name="REFUELPOSITION_FRONT" value="2" id="::FuelInfo::REFUELPOSITION_FRONT">
2861 <webidl> const unsigned short REFUELPOSITION_FRONT = 2;</webidl>
2862 <Type type="unsigned short"/>
2864 <Const name="REFUELPOSITION_REAR" value="3" id="::FuelInfo::REFUELPOSITION_REAR">
2865 <webidl> const unsigned short REFUELPOSITION_REAR = 3;</webidl>
2866 <Type type="unsigned short"/>
2868 <Attribute name="type" id="::FuelInfo::type">
2869 <webidl> attribute unsigned short type;</webidl>
2877 MUST return type of fuel. integer 0-4 (see
2880 <Type type="unsigned short"/>
2882 <Attribute name="refuelPosition" id="::FuelInfo::refuelPosition">
2883 <webidl> attribute unsigned short refuelPosition;</webidl>
2891 MUST return position of refuling (see
2894 <Type type="unsigned short"/>
2897 <Interface name="VehicleType" id="::VehicleType">
2898 <webidl>[NoInterfaceObject]
2899 interface VehicleType : <ref>VehiclePropertyType</ref> {
2900 const unsigned short VEHICLETYPE_SEDAN = 0;
2901 const unsigned short VEHICLETYPE_COUPE= 1;
2902 const unsigned short VEHICLETYPE_CABRIOLE = 2;
2903 const unsigned short VEHICLETYPE_ROADSTER = 3;
2904 const unsigned short VEHICLETYPE_SUV = 4;
2905 const unsigned short VEHICLETYPE_TRUCK = 5;
2907 attribute unsigned short type;
2909 <ExtendedAttributeList>
2910 <ExtendedAttribute name="NoInterfaceObject">
2911 <webidl>NoInterfaceObject</webidl>
2912 </ExtendedAttribute>
2913 </ExtendedAttributeList>
2914 <InterfaceInheritance>
2915 <Name name="VehiclePropertyType"/>
2916 </InterfaceInheritance>
2917 <Const name="VEHICLETYPE_SEDAN" value="0" id="::VehicleType::VEHICLETYPE_SEDAN">
2918 <webidl> const unsigned short VEHICLETYPE_SEDAN = 0;</webidl>
2919 <Type type="unsigned short"/>
2921 <Const name="VEHICLETYPE_COUPE" value="1" id="::VehicleType::VEHICLETYPE_COUPE">
2922 <webidl> const unsigned short VEHICLETYPE_COUPE= 1;</webidl>
2923 <Type type="unsigned short"/>
2925 <Const name="VEHICLETYPE_CABRIOLE" value="2" id="::VehicleType::VEHICLETYPE_CABRIOLE">
2926 <webidl> const unsigned short VEHICLETYPE_CABRIOLE = 2;</webidl>
2927 <Type type="unsigned short"/>
2929 <Const name="VEHICLETYPE_ROADSTER" value="3" id="::VehicleType::VEHICLETYPE_ROADSTER">
2930 <webidl> const unsigned short VEHICLETYPE_ROADSTER = 3;</webidl>
2931 <Type type="unsigned short"/>
2933 <Const name="VEHICLETYPE_SUV" value="4" id="::VehicleType::VEHICLETYPE_SUV">
2934 <webidl> const unsigned short VEHICLETYPE_SUV = 4;</webidl>
2935 <Type type="unsigned short"/>
2937 <Const name="VEHICLETYPE_TRUCK" value="5" id="::VehicleType::VEHICLETYPE_TRUCK">
2938 <webidl> const unsigned short VEHICLETYPE_TRUCK = 5;</webidl>
2939 <Type type="unsigned short"/>
2941 <Attribute name="type" id="::VehicleType::type">
2942 <webidl> attribute unsigned short type;</webidl>
2950 MUST return type of Vehicle. Integer 0-5 (see
2953 <Type type="unsigned short"/>
2956 <Interface name="Doors" id="::Doors">
2957 <webidl>[NoInterfaceObject]
2958 interface Doors : <ref>VehiclePropertyType</ref> {
2960 attribute sequence<unsigned short> doorsPerRow;
2962 <ExtendedAttributeList>
2963 <ExtendedAttribute name="NoInterfaceObject">
2964 <webidl>NoInterfaceObject</webidl>
2965 </ExtendedAttribute>
2966 </ExtendedAttributeList>
2967 <InterfaceInheritance>
2968 <Name name="VehiclePropertyType"/>
2969 </InterfaceInheritance>
2970 <Attribute name="doorsPerRow" id="::Doors::doorsPerRow">
2971 <webidl> attribute sequence<unsigned short> doorsPerRow;</webidl>
2979 MUST return Number of doors in each row. The index represents the row. Position '0'
2980 represents the first row, '1' the second row etc.
2981 Example a common mini-van may have Doors[0] = 2 doors,
2982 Doors[1] = 1 (side door), Doors[2] = 1 (trunk).
2985 <Type type="sequence">
2986 <Type type="unsigned short"/>
2990 <Interface name="TransmissionGearType" id="::TransmissionGearType">
2991 <webidl>[NoInterfaceObject]
2992 interface TransmissionGearType : <ref>VehiclePropertyType</ref> {
2993 const unsigned short TRANSMISSIONGEARTYPE_AUTO=0;
2994 const unsigned short TRANSMISSIONGEARTYPE_MANUAL=1;
2995 const unsigned short TRANSMISSIONGEARTYPE_CV=2;
2997 attribute unsigned short transmissionGearType;
2999 <ExtendedAttributeList>
3000 <ExtendedAttribute name="NoInterfaceObject">
3001 <webidl>NoInterfaceObject</webidl>
3002 </ExtendedAttribute>
3003 </ExtendedAttributeList>
3004 <InterfaceInheritance>
3005 <Name name="VehiclePropertyType"/>
3006 </InterfaceInheritance>
3007 <Const name="TRANSMISSIONGEARTYPE_AUTO" value="0" id="::TransmissionGearType::TRANSMISSIONGEARTYPE_AUTO">
3008 <webidl> const unsigned short TRANSMISSIONGEARTYPE_AUTO=0;</webidl>
3009 <Type type="unsigned short"/>
3011 <Const name="TRANSMISSIONGEARTYPE_MANUAL" value="1" id="::TransmissionGearType::TRANSMISSIONGEARTYPE_MANUAL">
3012 <webidl> const unsigned short TRANSMISSIONGEARTYPE_MANUAL=1;</webidl>
3013 <Type type="unsigned short"/>
3015 <Const name="TRANSMISSIONGEARTYPE_CV" value="2" id="::TransmissionGearType::TRANSMISSIONGEARTYPE_CV">
3016 <webidl> const unsigned short TRANSMISSIONGEARTYPE_CV=2;</webidl>
3017 <Type type="unsigned short"/>
3019 <Attribute name="transmissionGearType" id="::TransmissionGearType::transmissionGearType">
3020 <webidl> attribute unsigned short transmissionGearType;</webidl>
3024 TransmissionGearType
3028 MUST return transmission gear type of either Automatic, Manual or Constant Variable (CV). See
3031 <Type type="unsigned short"/>
3034 <Interface name="WheelInformation" id="::WheelInformation">
3035 <webidl>[NoInterfaceObject]
3036 interface WheelInformation : <ref>VehiclePropertyType</ref> {
3038 attribute unsigned short frontWheelRadius;
3040 attribute unsigned short rearWheelRadius;
3042 attribute unsigned long wheelTrack;
3044 attribute boolean ABS;
3046 <ExtendedAttributeList>
3047 <ExtendedAttribute name="NoInterfaceObject">
3048 <webidl>NoInterfaceObject</webidl>
3049 </ExtendedAttribute>
3050 </ExtendedAttributeList>
3051 <InterfaceInheritance>
3052 <Name name="VehiclePropertyType"/>
3053 </InterfaceInheritance>
3054 <Attribute name="frontWheelRadius" id="::WheelInformation::frontWheelRadius">
3055 <webidl> attribute unsigned short frontWheelRadius;</webidl>
3063 MUST return Radius of Front Wheel(s) in mm.
3066 <Type type="unsigned short"/>
3068 <Attribute name="rearWheelRadius" id="::WheelInformation::rearWheelRadius">
3069 <webidl> attribute unsigned short rearWheelRadius;</webidl>
3077 MUST return Radius of Rear Wheel(s) in mm.
3080 <Type type="unsigned short"/>
3082 <Attribute name="wheelTrack" id="::WheelInformation::wheelTrack">
3083 <webidl> attribute unsigned long wheelTrack;</webidl>
3091 MUST return Wheel Track in mm.
3094 <Type type="unsigned long"/>
3096 <Attribute name="ABS" id="::WheelInformation::ABS">
3097 <webidl> attribute boolean ABS;</webidl>
3105 MUST return Antilock Brake System status: on = true, off = false.
3108 <Type type="boolean"/>
3111 <Interface name="Odometer" id="::Odometer">
3112 <webidl>[NoInterfaceObject]
3113 interface Odometer : <ref>VehiclePropertyType</ref> {
3115 attribute unsigned long odometer;
3117 <ExtendedAttributeList>
3118 <ExtendedAttribute name="NoInterfaceObject">
3119 <webidl>NoInterfaceObject</webidl>
3120 </ExtendedAttribute>
3121 </ExtendedAttributeList>
3122 <InterfaceInheritance>
3123 <Name name="VehiclePropertyType"/>
3124 </InterfaceInheritance>
3125 <Attribute name="odometer" id="::Odometer::odometer">
3126 <webidl> attribute unsigned long odometer;</webidl>
3134 MUST return Distance traveled in km
3137 <Type type="unsigned long"/>
3140 <Interface name="Fluid" id="::Fluid">
3141 <webidl>[NoInterfaceObject]
3142 interface Fluid : <ref>VehiclePropertyType</ref> {
3144 attribute unsigned short transmission;
3146 attribute unsigned short brake;
3148 attribute unsigned short washer;
3150 <ExtendedAttributeList>
3151 <ExtendedAttribute name="NoInterfaceObject">
3152 <webidl>NoInterfaceObject</webidl>
3153 </ExtendedAttribute>
3154 </ExtendedAttributeList>
3155 <InterfaceInheritance>
3156 <Name name="VehiclePropertyType"/>
3157 </InterfaceInheritance>
3158 <Attribute name="transmission" id="::Fluid::transmission">
3159 <webidl> attribute unsigned short transmission;</webidl>
3167 MUST return Transmission fluid level percentage. 0-100.
3170 <Type type="unsigned short"/>
3172 <Attribute name="brake" id="::Fluid::brake">
3173 <webidl> attribute unsigned short brake;</webidl>
3181 MUST return Brake fluid level percentage. 0-100.
3184 <Type type="unsigned short"/>
3186 <Attribute name="washer" id="::Fluid::washer">
3187 <webidl> attribute unsigned short washer;</webidl>
3195 MUST return Washer fluid level percentage. 0-100.
3198 <Type type="unsigned short"/>
3201 <Interface name="Battery" id="::Battery">
3202 <webidl>[NoInterfaceObject]
3203 interface Battery : <ref>VehiclePropertyType</ref> {
3205 attribute double voltage;
3207 attribute double current;
3209 <ExtendedAttributeList>
3210 <ExtendedAttribute name="NoInterfaceObject">
3211 <webidl>NoInterfaceObject</webidl>
3212 </ExtendedAttribute>
3213 </ExtendedAttributeList>
3214 <InterfaceInheritance>
3215 <Name name="VehiclePropertyType"/>
3216 </InterfaceInheritance>
3217 <Attribute name="voltage" id="::Battery::voltage">
3218 <webidl> attribute double voltage;</webidl>
3226 MUST return battery voltage.
3229 <Type type="double"/>
3231 <Attribute name="current" id="::Battery::current">
3232 <webidl> attribute double current;</webidl>
3240 MUST return battery current in Amperes
3243 <Type type="double"/>
3246 <Interface name="TirePressure" id="::TirePressure">
3247 <webidl>[NoInterfaceObject]
3248 interface TirePressure : <ref>VehiclePropertyType</ref> {
3250 attribute double leftFront;
3252 attribute double rightFront;
3254 attribute double leftRear;
3256 attribute double rightRear;
3258 <ExtendedAttributeList>
3259 <ExtendedAttribute name="NoInterfaceObject">
3260 <webidl>NoInterfaceObject</webidl>
3261 </ExtendedAttribute>
3262 </ExtendedAttributeList>
3263 <InterfaceInheritance>
3264 <Name name="VehiclePropertyType"/>
3265 </InterfaceInheritance>
3266 <Attribute name="leftFront" id="::TirePressure::leftFront">
3267 <webidl> attribute double leftFront;</webidl>
3275 MUST return left front tire pressure in kPa.
3278 <Type type="double"/>
3280 <Attribute name="rightFront" id="::TirePressure::rightFront">
3281 <webidl> attribute double rightFront;</webidl>
3289 MUST return right front tire pressure in kPa.
3292 <Type type="double"/>
3294 <Attribute name="leftRear" id="::TirePressure::leftRear">
3295 <webidl> attribute double leftRear;</webidl>
3303 MUST return left rear tire pressure in kPa.
3306 <Type type="double"/>
3308 <Attribute name="rightRear" id="::TirePressure::rightRear">
3309 <webidl> attribute double rightRear;</webidl>
3317 MUST return right rear tire pressure in kPa.
3320 <Type type="double"/>
3323 <Interface name="TireTemperature" id="::TireTemperature">
3324 <webidl>[NoInterfaceObject]
3325 interface TireTemperature : <ref>VehiclePropertyType</ref> {
3327 attribute double leftFront;
3329 attribute double rightFront;
3331 attribute double leftRear;
3333 attribute double rightRear;
3335 <ExtendedAttributeList>
3336 <ExtendedAttribute name="NoInterfaceObject">
3337 <webidl>NoInterfaceObject</webidl>
3338 </ExtendedAttribute>
3339 </ExtendedAttributeList>
3340 <InterfaceInheritance>
3341 <Name name="VehiclePropertyType"/>
3342 </InterfaceInheritance>
3343 <Attribute name="leftFront" id="::TireTemperature::leftFront">
3344 <webidl> attribute double leftFront;</webidl>
3352 MUST return left front tire temperature in Celcius.
3355 <Type type="double"/>
3357 <Attribute name="rightFront" id="::TireTemperature::rightFront">
3358 <webidl> attribute double rightFront;</webidl>
3366 MUST return right front tire temperature in Celcius.
3369 <Type type="double"/>
3371 <Attribute name="leftRear" id="::TireTemperature::leftRear">
3372 <webidl> attribute double leftRear;</webidl>
3380 MUST return left rear tire temperature in Celcius.
3383 <Type type="double"/>
3385 <Attribute name="rightRear" id="::TireTemperature::rightRear">
3386 <webidl> attribute double rightRear;</webidl>
3394 MUST return right rear tire temperature in Celcius.
3397 <Type type="double"/>
3400 <Interface name="SecurityAlert" id="::SecurityAlert">
3401 <webidl>[NoInterfaceObject]
3402 interface SecurityAlert : <ref>VehiclePropertyType</ref> {
3404 attribute boolean securityAlert;
3406 <ExtendedAttributeList>
3407 <ExtendedAttribute name="NoInterfaceObject">
3408 <webidl>NoInterfaceObject</webidl>
3409 </ExtendedAttribute>
3410 </ExtendedAttributeList>
3411 <InterfaceInheritance>
3412 <Name name="VehiclePropertyType"/>
3413 </InterfaceInheritance>
3414 <Attribute name="securityAlert" id="::SecurityAlert::securityAlert">
3415 <webidl> attribute boolean securityAlert;</webidl>
3426 <Type type="boolean"/>
3429 <Interface name="ParkingBrake" id="::ParkingBrake">
3430 <webidl>[NoInterfaceObject]
3431 interface ParkingBrake : <ref>VehiclePropertyType</ref> {
3433 attribute boolean parkingBrake;
3435 <ExtendedAttributeList>
3436 <ExtendedAttribute name="NoInterfaceObject">
3437 <webidl>NoInterfaceObject</webidl>
3438 </ExtendedAttribute>
3439 </ExtendedAttributeList>
3440 <InterfaceInheritance>
3441 <Name name="VehiclePropertyType"/>
3442 </InterfaceInheritance>
3443 <Attribute name="parkingBrake" id="::ParkingBrake::parkingBrake">
3444 <webidl> attribute boolean parkingBrake;</webidl>
3449 must return status of parking brake: Engaged = true, Disengaged = false.
3453 <Type type="boolean"/>
3456 <Interface name="ParkingLight" id="::ParkingLight">
3457 <webidl>[NoInterfaceObject]
3458 interface ParkingLight : <ref>VehiclePropertyType</ref> {
3460 attribute boolean parkingLight;
3462 <ExtendedAttributeList>
3463 <ExtendedAttribute name="NoInterfaceObject">
3464 <webidl>NoInterfaceObject</webidl>
3465 </ExtendedAttribute>
3466 </ExtendedAttributeList>
3467 <InterfaceInheritance>
3468 <Name name="VehiclePropertyType"/>
3469 </InterfaceInheritance>
3470 <Attribute name="parkingLight" id="::ParkingLight::parkingLight">
3471 <webidl> attribute boolean parkingLight;</webidl>
3476 must return status of parking light: Engaged = true, Disengaged = false.
3480 <Type type="boolean"/>
3483 <Interface name="HazardLight" id="::HazardLight">
3484 <webidl>[NoInterfaceObject]
3485 interface HazardLight : <ref>VehiclePropertyType</ref> {
3487 attribute boolean hazardLight;
3489 <ExtendedAttributeList>
3490 <ExtendedAttribute name="NoInterfaceObject">
3491 <webidl>NoInterfaceObject</webidl>
3492 </ExtendedAttribute>
3493 </ExtendedAttributeList>
3494 <InterfaceInheritance>
3495 <Name name="VehiclePropertyType"/>
3496 </InterfaceInheritance>
3497 <Attribute name="hazardLight" id="::HazardLight::hazardLight">
3498 <webidl> attribute boolean hazardLight;</webidl>
3503 must return status of hazard light: Engaged = true, Disengaged = false.
3507 <Type type="boolean"/>
3510 <Interface name="AntilockBrakingSystem" id="::AntilockBrakingSystem">
3511 <webidl>[NoInterfaceObject]
3512 interface AntilockBrakingSystem : <ref>VehiclePropertyType</ref> {
3514 attribute boolean antilockBrakingSystem;
3516 <ExtendedAttributeList>
3517 <ExtendedAttribute name="NoInterfaceObject">
3518 <webidl>NoInterfaceObject</webidl>
3519 </ExtendedAttribute>
3520 </ExtendedAttributeList>
3521 <InterfaceInheritance>
3522 <Name name="VehiclePropertyType"/>
3523 </InterfaceInheritance>
3524 <Attribute name="antilockBrakingSystem" id="::AntilockBrakingSystem::antilockBrakingSystem">
3525 <webidl> attribute boolean antilockBrakingSystem;</webidl>
3529 AntilockBrakingSystem
3533 MUST return whether Antilock Braking System is Idle (false) or Engaged (true)
3536 <Type type="boolean"/>
3539 <Interface name="TractionControlSystem" id="::TractionControlSystem">
3540 <webidl>[NoInterfaceObject]
3541 interface TractionControlSystem : <ref>VehiclePropertyType</ref> {
3543 attribute boolean tractionControlSystem;
3545 <ExtendedAttributeList>
3546 <ExtendedAttribute name="NoInterfaceObject">
3547 <webidl>NoInterfaceObject</webidl>
3548 </ExtendedAttribute>
3549 </ExtendedAttributeList>
3550 <InterfaceInheritance>
3551 <Name name="VehiclePropertyType"/>
3552 </InterfaceInheritance>
3553 <Attribute name="tractionControlSystem" id="::TractionControlSystem::tractionControlSystem">
3554 <webidl> attribute boolean tractionControlSystem;</webidl>
3558 TractionControlSystem
3562 MUST return whether Traction Control System is Off (false) or On (true)
3565 <Type type="boolean"/>
3568 <Interface name="VehicleTopSpeedLimit" id="::VehicleTopSpeedLimit">
3569 <webidl>[NoInterfaceObject]
3570 interface VehicleTopSpeedLimit : <ref>VehiclePropertyType</ref> {
3572 attribute unsigned short vehicleTopSpeedLimit;
3574 <ExtendedAttributeList>
3575 <ExtendedAttribute name="NoInterfaceObject">
3576 <webidl>NoInterfaceObject</webidl>
3577 </ExtendedAttribute>
3578 </ExtendedAttributeList>
3579 <InterfaceInheritance>
3580 <Name name="VehiclePropertyType"/>
3581 </InterfaceInheritance>
3582 <Attribute name="vehicleTopSpeedLimit" id="::VehicleTopSpeedLimit::vehicleTopSpeedLimit">
3583 <webidl> attribute unsigned short vehicleTopSpeedLimit;</webidl>
3587 VehicleTopSpeedLimit
3591 MUST returns top rated speed in km/h. 0 = no limit
3594 <Type type="unsigned short"/>
3597 <Interface name="AirbagStatus" id="::AirbagStatus">
3598 <webidl>[NoInterfaceObject]
3599 interface AirbagStatus : <ref>VehiclePropertyType</ref> {
3600 const unsigned short AIRBAGLOCATION_DRIVER = 0;
3601 const unsigned short AIRBAGLOCATION_PASSENGER= 1;
3602 const unsigned short AIRBAGLOCATION_LEFTSIDE = 2;
3603 const unsigned short AIRBAGLOCATION_RIGHTSIDE = 3;
3604 const unsigned short AIRBAGSTATUS_INACTIVE = 0;
3605 const unsigned short AIRBAGSTATUS_ACTIVE = 1;
3606 const unsigned short AIRBAGSTATUS_DEPLOYED = 2;
3608 attribute object airbagStatus;
3610 <ExtendedAttributeList>
3611 <ExtendedAttribute name="NoInterfaceObject">
3612 <webidl>NoInterfaceObject</webidl>
3613 </ExtendedAttribute>
3614 </ExtendedAttributeList>
3615 <InterfaceInheritance>
3616 <Name name="VehiclePropertyType"/>
3617 </InterfaceInheritance>
3618 <Const name="AIRBAGLOCATION_DRIVER" value="0" id="::AirbagStatus::AIRBAGLOCATION_DRIVER">
3619 <webidl> const unsigned short AIRBAGLOCATION_DRIVER = 0;</webidl>
3620 <Type type="unsigned short"/>
3622 <Const name="AIRBAGLOCATION_PASSENGER" value="1" id="::AirbagStatus::AIRBAGLOCATION_PASSENGER">
3623 <webidl> const unsigned short AIRBAGLOCATION_PASSENGER= 1;</webidl>
3624 <Type type="unsigned short"/>
3626 <Const name="AIRBAGLOCATION_LEFTSIDE" value="2" id="::AirbagStatus::AIRBAGLOCATION_LEFTSIDE">
3627 <webidl> const unsigned short AIRBAGLOCATION_LEFTSIDE = 2;</webidl>
3628 <Type type="unsigned short"/>
3630 <Const name="AIRBAGLOCATION_RIGHTSIDE" value="3" id="::AirbagStatus::AIRBAGLOCATION_RIGHTSIDE">
3631 <webidl> const unsigned short AIRBAGLOCATION_RIGHTSIDE = 3;</webidl>
3632 <Type type="unsigned short"/>
3634 <Const name="AIRBAGSTATUS_INACTIVE" value="0" id="::AirbagStatus::AIRBAGSTATUS_INACTIVE">
3635 <webidl> const unsigned short AIRBAGSTATUS_INACTIVE = 0;</webidl>
3636 <Type type="unsigned short"/>
3638 <Const name="AIRBAGSTATUS_ACTIVE" value="1" id="::AirbagStatus::AIRBAGSTATUS_ACTIVE">
3639 <webidl> const unsigned short AIRBAGSTATUS_ACTIVE = 1;</webidl>
3640 <Type type="unsigned short"/>
3642 <Const name="AIRBAGSTATUS_DEPLOYED" value="2" id="::AirbagStatus::AIRBAGSTATUS_DEPLOYED">
3643 <webidl> const unsigned short AIRBAGSTATUS_DEPLOYED = 2;</webidl>
3644 <Type type="unsigned short"/>
3646 <Attribute name="airbagStatus" id="::AirbagStatus::airbagStatus">
3647 <webidl> attribute object airbagStatus;</webidl>
3655 MUST returns a dictionary of Airbag (byte) and Status (byte) (see
3658 <Type type="object"/>
3661 <Interface name="DoorStatus" id="::DoorStatus">
3662 <webidl>[NoInterfaceObject]
3663 interface DoorStatus : <ref>VehiclePropertyType</ref> {
3664 const unsigned short DOORLOCATION_DRIVER= 0;
3665 const unsigned short DOORLOCATION_PASSENGER = 1;
3666 const unsigned short DOORLOCATION_LEFTREAR = 2;
3667 const unsigned short DOORLOCATION_RIGHTREAR = 3;
3668 const unsigned short DOORLOCATION_TRUNK = 4;
3669 const unsigned short DOORLOCATION_FUELCAP = 5;
3670 const unsigned short DOORLOCATION_HOOD = 6;
3671 const unsigned short DOORSTATUS_CLOSED = 0;
3672 const unsigned short DOORSTATUS_OPEN = 1;
3673 const unsigned short DOORSTATUS_AJAR = 2;
3675 attribute object doorStatus;
3677 attribute object doorLockStatus;
3679 attribute boolean childLockStatus;
3681 <ExtendedAttributeList>
3682 <ExtendedAttribute name="NoInterfaceObject">
3683 <webidl>NoInterfaceObject</webidl>
3684 </ExtendedAttribute>
3685 </ExtendedAttributeList>
3686 <InterfaceInheritance>
3687 <Name name="VehiclePropertyType"/>
3688 </InterfaceInheritance>
3689 <Const name="DOORLOCATION_DRIVER" value="0" id="::DoorStatus::DOORLOCATION_DRIVER">
3690 <webidl> const unsigned short DOORLOCATION_DRIVER= 0;</webidl>
3691 <Type type="unsigned short"/>
3693 <Const name="DOORLOCATION_PASSENGER" value="1" id="::DoorStatus::DOORLOCATION_PASSENGER">
3694 <webidl> const unsigned short DOORLOCATION_PASSENGER = 1;</webidl>
3695 <Type type="unsigned short"/>
3697 <Const name="DOORLOCATION_LEFTREAR" value="2" id="::DoorStatus::DOORLOCATION_LEFTREAR">
3698 <webidl> const unsigned short DOORLOCATION_LEFTREAR = 2;</webidl>
3699 <Type type="unsigned short"/>
3701 <Const name="DOORLOCATION_RIGHTREAR" value="3" id="::DoorStatus::DOORLOCATION_RIGHTREAR">
3702 <webidl> const unsigned short DOORLOCATION_RIGHTREAR = 3;</webidl>
3703 <Type type="unsigned short"/>
3705 <Const name="DOORLOCATION_TRUNK" value="4" id="::DoorStatus::DOORLOCATION_TRUNK">
3706 <webidl> const unsigned short DOORLOCATION_TRUNK = 4;</webidl>
3707 <Type type="unsigned short"/>
3709 <Const name="DOORLOCATION_FUELCAP" value="5" id="::DoorStatus::DOORLOCATION_FUELCAP">
3710 <webidl> const unsigned short DOORLOCATION_FUELCAP = 5;</webidl>
3711 <Type type="unsigned short"/>
3713 <Const name="DOORLOCATION_HOOD" value="6" id="::DoorStatus::DOORLOCATION_HOOD">
3714 <webidl> const unsigned short DOORLOCATION_HOOD = 6;</webidl>
3715 <Type type="unsigned short"/>
3717 <Const name="DOORSTATUS_CLOSED" value="0" id="::DoorStatus::DOORSTATUS_CLOSED">
3718 <webidl> const unsigned short DOORSTATUS_CLOSED = 0;</webidl>
3719 <Type type="unsigned short"/>
3721 <Const name="DOORSTATUS_OPEN" value="1" id="::DoorStatus::DOORSTATUS_OPEN">
3722 <webidl> const unsigned short DOORSTATUS_OPEN = 1;</webidl>
3723 <Type type="unsigned short"/>
3725 <Const name="DOORSTATUS_AJAR" value="2" id="::DoorStatus::DOORSTATUS_AJAR">
3726 <webidl> const unsigned short DOORSTATUS_AJAR = 2;</webidl>
3727 <Type type="unsigned short"/>
3729 <Attribute name="doorStatus" id="::DoorStatus::doorStatus">
3730 <webidl> attribute object doorStatus;</webidl>
3738 MUST returns dictionary of Door (byte) and Status (byte). See
3741 <Type type="object"/>
3743 <Attribute name="doorLockStatus" id="::DoorStatus::doorLockStatus">
3744 <webidl> attribute object doorLockStatus;</webidl>
3752 MUST returns dictionary of Door (byte) and Status (bool locked = true, unlocked = false). See
3755 <Type type="object"/>
3757 <Attribute name="childLockStatus" id="::DoorStatus::childLockStatus">
3758 <webidl> attribute boolean childLockStatus;</webidl>
3766 MUST returns Child lock status of rear doors. active = true, inactive = false.
3767 Setting this to 'true' will prevent the rear doors from being opened
3771 <Type type="boolean"/>
3774 <Interface name="SeatBeltStatus" id="::SeatBeltStatus">
3775 <webidl>[NoInterfaceObject]
3776 interface SeatBeltStatus : <ref>VehiclePropertyType</ref> {
3777 const unsigned short SEATBELTLOCATION_DRIVER= 0;
3778 const unsigned short SEATBELTLOCATION_MIDDLEFRONT = 1;
3779 const unsigned short SEATBELTLOCATION_PASSENGER = 2;
3780 const unsigned short SEATBELTLOCATION_LEFTREAR = 3;
3781 const unsigned short SEATBELTLOCATION_MIDDLEREAR = 4;
3782 const unsigned short SEATBELTLOCATION_RIGHTREAR = 5;
3784 attribute object seatBeltStatus;
3786 <ExtendedAttributeList>
3787 <ExtendedAttribute name="NoInterfaceObject">
3788 <webidl>NoInterfaceObject</webidl>
3789 </ExtendedAttribute>
3790 </ExtendedAttributeList>
3791 <InterfaceInheritance>
3792 <Name name="VehiclePropertyType"/>
3793 </InterfaceInheritance>
3794 <Const name="SEATBELTLOCATION_DRIVER" value="0" id="::SeatBeltStatus::SEATBELTLOCATION_DRIVER">
3795 <webidl> const unsigned short SEATBELTLOCATION_DRIVER= 0;</webidl>
3796 <Type type="unsigned short"/>
3798 <Const name="SEATBELTLOCATION_MIDDLEFRONT" value="1" id="::SeatBeltStatus::SEATBELTLOCATION_MIDDLEFRONT">
3799 <webidl> const unsigned short SEATBELTLOCATION_MIDDLEFRONT = 1;</webidl>
3800 <Type type="unsigned short"/>
3802 <Const name="SEATBELTLOCATION_PASSENGER" value="2" id="::SeatBeltStatus::SEATBELTLOCATION_PASSENGER">
3803 <webidl> const unsigned short SEATBELTLOCATION_PASSENGER = 2;</webidl>
3804 <Type type="unsigned short"/>
3806 <Const name="SEATBELTLOCATION_LEFTREAR" value="3" id="::SeatBeltStatus::SEATBELTLOCATION_LEFTREAR">
3807 <webidl> const unsigned short SEATBELTLOCATION_LEFTREAR = 3;</webidl>
3808 <Type type="unsigned short"/>
3810 <Const name="SEATBELTLOCATION_MIDDLEREAR" value="4" id="::SeatBeltStatus::SEATBELTLOCATION_MIDDLEREAR">
3811 <webidl> const unsigned short SEATBELTLOCATION_MIDDLEREAR = 4;</webidl>
3812 <Type type="unsigned short"/>
3814 <Const name="SEATBELTLOCATION_RIGHTREAR" value="5" id="::SeatBeltStatus::SEATBELTLOCATION_RIGHTREAR">
3815 <webidl> const unsigned short SEATBELTLOCATION_RIGHTREAR = 5;</webidl>
3816 <Type type="unsigned short"/>
3818 <Attribute name="seatBeltStatus" id="::SeatBeltStatus::seatBeltStatus">
3819 <webidl> attribute object seatBeltStatus;</webidl>
3827 MUST returns dictionary of Seat Belt (byte, see SEATBELTLOCATION) and Status (bool: Fasten = true, Unfastened = false)
3830 <Type type="object"/>
3833 <Interface name="OccupantStatus" id="::OccupantStatus">
3834 <webidl>[NoInterfaceObject]
3835 interface OccupantStatus : <ref>VehiclePropertyType</ref> {
3836 const unsigned short OCCUPANTLOCATION_DRIVER = 0;
3837 const unsigned short OCCUPANTLOCATION_FRONTMIDDLE = 1;
3838 const unsigned short OCCUPANTLOCATION_PASSENGER= 2;
3839 const unsigned short OCCUPANTLOCATION_LEFTREAR = 3;
3840 const unsigned short OCCUPANTLOCATION_MIDDLEREAR = 4;
3841 const unsigned short OCCUPANTLOCATION_RIGHTREAR = 5;
3842 const unsigned short OCCUPANTSTATUS_VACANT = 0;
3843 const unsigned short OCCUPANTSTATUS_CHILD = 1;
3844 const unsigned short OCCUPANTSTATUS_ADULT = 2;
3846 attribute object occupantStatus;
3848 <ExtendedAttributeList>
3849 <ExtendedAttribute name="NoInterfaceObject">
3850 <webidl>NoInterfaceObject</webidl>
3851 </ExtendedAttribute>
3852 </ExtendedAttributeList>
3853 <InterfaceInheritance>
3854 <Name name="VehiclePropertyType"/>
3855 </InterfaceInheritance>
3856 <Const name="OCCUPANTLOCATION_DRIVER" value="0" id="::OccupantStatus::OCCUPANTLOCATION_DRIVER">
3857 <webidl> const unsigned short OCCUPANTLOCATION_DRIVER = 0;</webidl>
3858 <Type type="unsigned short"/>
3860 <Const name="OCCUPANTLOCATION_FRONTMIDDLE" value="1" id="::OccupantStatus::OCCUPANTLOCATION_FRONTMIDDLE">
3861 <webidl> const unsigned short OCCUPANTLOCATION_FRONTMIDDLE = 1;</webidl>
3862 <Type type="unsigned short"/>
3864 <Const name="OCCUPANTLOCATION_PASSENGER" value="2" id="::OccupantStatus::OCCUPANTLOCATION_PASSENGER">
3865 <webidl> const unsigned short OCCUPANTLOCATION_PASSENGER= 2;</webidl>
3866 <Type type="unsigned short"/>
3868 <Const name="OCCUPANTLOCATION_LEFTREAR" value="3" id="::OccupantStatus::OCCUPANTLOCATION_LEFTREAR">
3869 <webidl> const unsigned short OCCUPANTLOCATION_LEFTREAR = 3;</webidl>
3870 <Type type="unsigned short"/>
3872 <Const name="OCCUPANTLOCATION_MIDDLEREAR" value="4" id="::OccupantStatus::OCCUPANTLOCATION_MIDDLEREAR">
3873 <webidl> const unsigned short OCCUPANTLOCATION_MIDDLEREAR = 4;</webidl>
3874 <Type type="unsigned short"/>
3876 <Const name="OCCUPANTLOCATION_RIGHTREAR" value="5" id="::OccupantStatus::OCCUPANTLOCATION_RIGHTREAR">
3877 <webidl> const unsigned short OCCUPANTLOCATION_RIGHTREAR = 5;</webidl>
3878 <Type type="unsigned short"/>
3880 <Const name="OCCUPANTSTATUS_VACANT" value="0" id="::OccupantStatus::OCCUPANTSTATUS_VACANT">
3881 <webidl> const unsigned short OCCUPANTSTATUS_VACANT = 0;</webidl>
3882 <Type type="unsigned short"/>
3884 <Const name="OCCUPANTSTATUS_CHILD" value="1" id="::OccupantStatus::OCCUPANTSTATUS_CHILD">
3885 <webidl> const unsigned short OCCUPANTSTATUS_CHILD = 1;</webidl>
3886 <Type type="unsigned short"/>
3888 <Const name="OCCUPANTSTATUS_ADULT" value="2" id="::OccupantStatus::OCCUPANTSTATUS_ADULT">
3889 <webidl> const unsigned short OCCUPANTSTATUS_ADULT = 2;</webidl>
3890 <Type type="unsigned short"/>
3892 <Attribute name="occupantStatus" id="::OccupantStatus::occupantStatus">
3893 <webidl> attribute object occupantStatus;</webidl>
3901 MUST returns dictionary of Occupant (byte see OCCUPANTLOCATION) and Status (byte, see
3904 <Type type="object"/>
3907 <Interface name="ObstacleDistance" id="::ObstacleDistance">
3908 <webidl>[NoInterfaceObject]
3909 interface ObstacleDistance : <ref>VehiclePropertyType</ref> {
3910 const unsigned short DISTANCESENSORLOCATION_LEFTFRONT = 0;
3911 const unsigned short DISTANCESENSORLOCATION_RIGHTFRONT = 1;
3912 const unsigned short DISTANCESENSORLOCATION_LEFTREAR = 2;
3913 const unsigned short DISTANCESENSORLOCATION_RIGHTREAR = 3;
3914 const unsigned short DISTANCESENSORLOCATION_LEFTBLINDSPOT = 4;
3915 const unsigned short DISTANCESENSORLOCATION_RIGHTBLINDSPOT = 5;
3917 attribute object obstacleDistance;
3919 <ExtendedAttributeList>
3920 <ExtendedAttribute name="NoInterfaceObject">
3921 <webidl>NoInterfaceObject</webidl>
3922 </ExtendedAttribute>
3923 </ExtendedAttributeList>
3924 <InterfaceInheritance>
3925 <Name name="VehiclePropertyType"/>
3926 </InterfaceInheritance>
3927 <Const name="DISTANCESENSORLOCATION_LEFTFRONT" value="0" id="::ObstacleDistance::DISTANCESENSORLOCATION_LEFTFRONT">
3928 <webidl> const unsigned short DISTANCESENSORLOCATION_LEFTFRONT = 0;</webidl>
3929 <Type type="unsigned short"/>
3931 <Const name="DISTANCESENSORLOCATION_RIGHTFRONT" value="1" id="::ObstacleDistance::DISTANCESENSORLOCATION_RIGHTFRONT">
3932 <webidl> const unsigned short DISTANCESENSORLOCATION_RIGHTFRONT = 1;</webidl>
3933 <Type type="unsigned short"/>
3935 <Const name="DISTANCESENSORLOCATION_LEFTREAR" value="2" id="::ObstacleDistance::DISTANCESENSORLOCATION_LEFTREAR">
3936 <webidl> const unsigned short DISTANCESENSORLOCATION_LEFTREAR = 2;</webidl>
3937 <Type type="unsigned short"/>
3939 <Const name="DISTANCESENSORLOCATION_RIGHTREAR" value="3" id="::ObstacleDistance::DISTANCESENSORLOCATION_RIGHTREAR">
3940 <webidl> const unsigned short DISTANCESENSORLOCATION_RIGHTREAR = 3;</webidl>
3941 <Type type="unsigned short"/>
3943 <Const name="DISTANCESENSORLOCATION_LEFTBLINDSPOT" value="4" id="::ObstacleDistance::DISTANCESENSORLOCATION_LEFTBLINDSPOT">
3944 <webidl> const unsigned short DISTANCESENSORLOCATION_LEFTBLINDSPOT = 4;</webidl>
3945 <Type type="unsigned short"/>
3947 <Const name="DISTANCESENSORLOCATION_RIGHTBLINDSPOT" value="5" id="::ObstacleDistance::DISTANCESENSORLOCATION_RIGHTBLINDSPOT">
3948 <webidl> const unsigned short DISTANCESENSORLOCATION_RIGHTBLINDSPOT = 5;</webidl>
3949 <Type type="unsigned short"/>
3951 <Attribute name="obstacleDistance" id="::ObstacleDistance::obstacleDistance">
3952 <webidl> attribute object obstacleDistance;</webidl>
3960 MUST returns dictionary of Distance Sensor (byte, see DISTANCESENSORLOCATION) and distance (double) in m.
3963 <Type type="object"/>
3967 <Module name="Speech" id="::Speech">
3968 <webidl> module Speech {
3970 interface SpeechManagerObject {
3971 readonly attribute <ref>SpeechManager</ref> speech;
3973 <ref>Tizen</ref> implements <ref>SpeechManagerObject</ref>;
3977 interface SpeechManager {
3978 void vocalizeString(DOMString speakString);
3982 interface SpeechRecognition : <ref>EventTarget</ref> {
3983 attribute <ref>SpeechGrammarList</ref> grammars;
3984 attribute DOMString lang;
3985 attribute boolean continuous;
3986 attribute boolean interimResults;
3987 attribute unsigned long maxAlternatives;
3988 attribute DOMString serviceURI;
3994 attribute <ref>EventHandler</ref> onaudiostart;
3995 attribute <ref>EventHandler</ref> onsoundstart;
3996 attribute <ref>EventHandler</ref> onspeechstart;
3997 attribute <ref>EventHandler</ref> onspeechend;
3998 attribute <ref>EventHandler</ref> onsoundend;
3999 attribute <ref>EventHandler</ref> onaudioend;
4000 attribute <ref>EventHandler</ref> onresult;
4001 attribute <ref>EventHandler</ref> onnomatch;
4002 attribute <ref>EventHandler</ref> onerror;
4003 attribute <ref>EventHandler</ref> onstart;
4004 attribute <ref>EventHandler</ref> onend;
4008 "no-speech",
4009 "aborted",
4010 "audio-capture",
4011 "network",
4012 "not-allowed",
4013 "service-not-allowed",
4014 "bad-grammar",
4015 "language-not-supported"
4018 interface SpeechRecognitionError : <ref>Event</ref> {
4019 readonly attribute <ref>ErrorCode</ref> error;
4020 readonly attribute DOMString message;
4023 interface SpeechRecognitionAlternative {
4024 readonly attribute DOMString transcript;
4025 readonly attribute float confidence;
4028 interface SpeechRecognitionResult {
4029 readonly attribute unsigned long length;
4030 getter <ref>SpeechRecognitionAlternative</ref> item(unsigned long index);
4031 readonly attribute boolean final;
4034 interface SpeechRecognitionResultList {
4035 readonly attribute unsigned long length;
4036 getter <ref>SpeechRecognitionResult</ref> item(unsigned long index);
4039 interface SpeechRecognitionEvent : <ref>Event</ref> {
4040 readonly attribute unsigned long resultIndex;
4041 readonly attribute <ref>SpeechRecognitionResultList</ref> results;
4042 readonly attribute any interpretation;
4043 readonly attribute <ref>Document</ref> emma;
4047 interface SpeechGrammar {
4048 attribute DOMString src;
4049 attribute float weight;
4053 interface SpeechGrammarList {
4054 readonly attribute unsigned long length;
4055 getter <ref>SpeechGrammar</ref> item(unsigned long index);
4056 void addFromURI(DOMString src, optional float weight);
4057 void addFromString(DOMString string, optional float weight);
4060 <Interface name="SpeechManagerObject" id="::SpeechManagerObject">
4061 <webidl> [NoInterfaceObject]
4062 interface SpeechManagerObject {
4063 readonly attribute <ref>SpeechManager</ref> speech;
4065 <ExtendedAttributeList>
4066 <ExtendedAttribute name="NoInterfaceObject">
4067 <webidl>NoInterfaceObject</webidl>
4068 </ExtendedAttribute>
4069 </ExtendedAttributeList>
4070 <Attribute readonly="readonly" name="speech" id="::SpeechManagerObject::speech">
4071 <webidl> readonly attribute <ref>SpeechManager</ref> speech;</webidl>
4072 <Type name="SpeechManager"/>
4075 <Implements name1="Tizen" name2="SpeechManagerObject">
4076 <webidl> <ref>Tizen</ref> implements <ref>SpeechManagerObject</ref>;</webidl>
4078 <Interface name="SpeechManager" id="::SpeechManager">
4079 <webidl> [NoInterfaceObject]
4080 interface SpeechManager {
4081 void vocalizeString(DOMString speakString);
4083 <ExtendedAttributeList>
4084 <ExtendedAttribute name="NoInterfaceObject">
4085 <webidl>NoInterfaceObject</webidl>
4086 </ExtendedAttribute>
4087 </ExtendedAttributeList>
4088 <Operation name="vocalizeString" id="::SpeechManager::vocalizeString">
4089 <webidl> void vocalizeString(DOMString speakString);</webidl>
4092 <Argument name="speakString">
4093 <Type type="DOMString"/>
4098 <Interface name="SpeechRecognition" id="::SpeechRecognition">
4099 <webidl> [Constructor]
4100 interface SpeechRecognition : <ref>EventTarget</ref> {
4101 attribute <ref>SpeechGrammarList</ref> grammars;
4102 attribute DOMString lang;
4103 attribute boolean continuous;
4104 attribute boolean interimResults;
4105 attribute unsigned long maxAlternatives;
4106 attribute DOMString serviceURI;
4112 attribute <ref>EventHandler</ref> onaudiostart;
4113 attribute <ref>EventHandler</ref> onsoundstart;
4114 attribute <ref>EventHandler</ref> onspeechstart;
4115 attribute <ref>EventHandler</ref> onspeechend;
4116 attribute <ref>EventHandler</ref> onsoundend;
4117 attribute <ref>EventHandler</ref> onaudioend;
4118 attribute <ref>EventHandler</ref> onresult;
4119 attribute <ref>EventHandler</ref> onnomatch;
4120 attribute <ref>EventHandler</ref> onerror;
4121 attribute <ref>EventHandler</ref> onstart;
4122 attribute <ref>EventHandler</ref> onend;
4124 <ExtendedAttributeList>
4125 <ExtendedAttribute name="Constructor">
4126 <webidl>Constructor</webidl>
4127 </ExtendedAttribute>
4128 </ExtendedAttributeList>
4129 <InterfaceInheritance>
4130 <Name name="EventTarget"/>
4131 </InterfaceInheritance>
4132 <Attribute name="grammars" id="::SpeechRecognition::grammars">
4133 <webidl> attribute <ref>SpeechGrammarList</ref> grammars;</webidl>
4134 <Type name="SpeechGrammarList"/>
4136 <Attribute name="lang" id="::SpeechRecognition::lang">
4137 <webidl> attribute DOMString lang;</webidl>
4138 <Type type="DOMString"/>
4140 <Attribute name="continuous" id="::SpeechRecognition::continuous">
4141 <webidl> attribute boolean continuous;</webidl>
4142 <Type type="boolean"/>
4144 <Attribute name="interimResults" id="::SpeechRecognition::interimResults">
4145 <webidl> attribute boolean interimResults;</webidl>
4146 <Type type="boolean"/>
4148 <Attribute name="maxAlternatives" id="::SpeechRecognition::maxAlternatives">
4149 <webidl> attribute unsigned long maxAlternatives;</webidl>
4150 <Type type="unsigned long"/>
4152 <Attribute name="serviceURI" id="::SpeechRecognition::serviceURI">
4153 <webidl> attribute DOMString serviceURI;</webidl>
4154 <Type type="DOMString"/>
4156 <Operation name="start" id="::SpeechRecognition::start">
4157 <webidl> void start();</webidl>
4161 <Operation name="stop" id="::SpeechRecognition::stop">
4162 <webidl> void stop();</webidl>
4166 <Operation name="abort" id="::SpeechRecognition::abort">
4167 <webidl> void abort();</webidl>
4171 <Attribute name="onaudiostart" id="::SpeechRecognition::onaudiostart">
4172 <webidl> attribute <ref>EventHandler</ref> onaudiostart;</webidl>
4173 <Type name="EventHandler"/>
4175 <Attribute name="onsoundstart" id="::SpeechRecognition::onsoundstart">
4176 <webidl> attribute <ref>EventHandler</ref> onsoundstart;</webidl>
4177 <Type name="EventHandler"/>
4179 <Attribute name="onspeechstart" id="::SpeechRecognition::onspeechstart">
4180 <webidl> attribute <ref>EventHandler</ref> onspeechstart;</webidl>
4181 <Type name="EventHandler"/>
4183 <Attribute name="onspeechend" id="::SpeechRecognition::onspeechend">
4184 <webidl> attribute <ref>EventHandler</ref> onspeechend;</webidl>
4185 <Type name="EventHandler"/>
4187 <Attribute name="onsoundend" id="::SpeechRecognition::onsoundend">
4188 <webidl> attribute <ref>EventHandler</ref> onsoundend;</webidl>
4189 <Type name="EventHandler"/>
4191 <Attribute name="onaudioend" id="::SpeechRecognition::onaudioend">
4192 <webidl> attribute <ref>EventHandler</ref> onaudioend;</webidl>
4193 <Type name="EventHandler"/>
4195 <Attribute name="onresult" id="::SpeechRecognition::onresult">
4196 <webidl> attribute <ref>EventHandler</ref> onresult;</webidl>
4197 <Type name="EventHandler"/>
4199 <Attribute name="onnomatch" id="::SpeechRecognition::onnomatch">
4200 <webidl> attribute <ref>EventHandler</ref> onnomatch;</webidl>
4201 <Type name="EventHandler"/>
4203 <Attribute name="onerror" id="::SpeechRecognition::onerror">
4204 <webidl> attribute <ref>EventHandler</ref> onerror;</webidl>
4205 <Type name="EventHandler"/>
4207 <Attribute name="onstart" id="::SpeechRecognition::onstart">
4208 <webidl> attribute <ref>EventHandler</ref> onstart;</webidl>
4209 <Type name="EventHandler"/>
4211 <Attribute name="onend" id="::SpeechRecognition::onend">
4212 <webidl> attribute <ref>EventHandler</ref> onend;</webidl>
4213 <Type name="EventHandler"/>
4216 <Enum name="ErrorCode" id="::ErrorCode">
4217 <webidl> enum ErrorCode {
4218 "no-speech",
4219 "aborted",
4220 "audio-capture",
4221 "network",
4222 "not-allowed",
4223 "service-not-allowed",
4224 "bad-grammar",
4225 "language-not-supported"
4227 <EnumValue stringvalue="no-speech">
4228 <webidl> "no-speech</webidl>
4230 <EnumValue stringvalue="aborted">
4231 <webidl> "aborted</webidl>
4233 <EnumValue stringvalue="audio-capture">
4234 <webidl> "audio-capture</webidl>
4236 <EnumValue stringvalue="network">
4237 <webidl> "network</webidl>
4239 <EnumValue stringvalue="not-allowed">
4240 <webidl> "not-allowed</webidl>
4242 <EnumValue stringvalue="service-not-allowed">
4243 <webidl> "service-not-allowed</webidl>
4245 <EnumValue stringvalue="bad-grammar">
4246 <webidl> "bad-grammar</webidl>
4248 <EnumValue stringvalue="language-not-supported">
4249 <webidl> "language-not-supported</webidl>
4252 <Interface name="SpeechRecognitionError" id="::SpeechRecognitionError">
4253 <webidl> interface SpeechRecognitionError : <ref>Event</ref> {
4254 readonly attribute <ref>ErrorCode</ref> error;
4255 readonly attribute DOMString message;
4257 <InterfaceInheritance>
4258 <Name name="Event"/>
4259 </InterfaceInheritance>
4260 <Attribute readonly="readonly" name="error" id="::SpeechRecognitionError::error">
4261 <webidl> readonly attribute <ref>ErrorCode</ref> error;</webidl>
4262 <Type name="ErrorCode"/>
4264 <Attribute readonly="readonly" name="message" id="::SpeechRecognitionError::message">
4265 <webidl> readonly attribute DOMString message;</webidl>
4266 <Type type="DOMString"/>
4269 <Interface name="SpeechRecognitionAlternative" id="::SpeechRecognitionAlternative">
4270 <webidl> interface SpeechRecognitionAlternative {
4271 readonly attribute DOMString transcript;
4272 readonly attribute float confidence;
4274 <Attribute readonly="readonly" name="transcript" id="::SpeechRecognitionAlternative::transcript">
4275 <webidl> readonly attribute DOMString transcript;</webidl>
4276 <Type type="DOMString"/>
4278 <Attribute readonly="readonly" name="confidence" id="::SpeechRecognitionAlternative::confidence">
4279 <webidl> readonly attribute float confidence;</webidl>
4280 <Type type="float"/>
4283 <Interface name="SpeechRecognitionResult" id="::SpeechRecognitionResult">
4284 <webidl> interface SpeechRecognitionResult {
4285 readonly attribute unsigned long length;
4286 getter <ref>SpeechRecognitionAlternative</ref> item(unsigned long index);
4287 readonly attribute boolean final;
4289 <Attribute readonly="readonly" name="length" id="::SpeechRecognitionResult::length">
4290 <webidl> readonly attribute unsigned long length;</webidl>
4291 <Type type="unsigned long"/>
4293 <Operation getter="getter" name="item" id="::SpeechRecognitionResult::item">
4294 <webidl> getter <ref>SpeechRecognitionAlternative</ref> item(unsigned long index);</webidl>
4295 <Type name="SpeechRecognitionAlternative"/>
4297 <Argument name="index">
4298 <Type type="unsigned long"/>
4302 <Attribute readonly="readonly" name="final" id="::SpeechRecognitionResult::final">
4303 <webidl> readonly attribute boolean final;</webidl>
4304 <Type type="boolean"/>
4307 <Interface name="SpeechRecognitionResultList" id="::SpeechRecognitionResultList">
4308 <webidl> interface SpeechRecognitionResultList {
4309 readonly attribute unsigned long length;
4310 getter <ref>SpeechRecognitionResult</ref> item(unsigned long index);
4312 <Attribute readonly="readonly" name="length" id="::SpeechRecognitionResultList::length">
4313 <webidl> readonly attribute unsigned long length;</webidl>
4314 <Type type="unsigned long"/>
4316 <Operation getter="getter" name="item" id="::SpeechRecognitionResultList::item">
4317 <webidl> getter <ref>SpeechRecognitionResult</ref> item(unsigned long index);</webidl>
4318 <Type name="SpeechRecognitionResult"/>
4320 <Argument name="index">
4321 <Type type="unsigned long"/>
4326 <Interface name="SpeechRecognitionEvent" id="::SpeechRecognitionEvent">
4327 <webidl> interface SpeechRecognitionEvent : <ref>Event</ref> {
4328 readonly attribute unsigned long resultIndex;
4329 readonly attribute <ref>SpeechRecognitionResultList</ref> results;
4330 readonly attribute any interpretation;
4331 readonly attribute <ref>Document</ref> emma;
4333 <InterfaceInheritance>
4334 <Name name="Event"/>
4335 </InterfaceInheritance>
4336 <Attribute readonly="readonly" name="resultIndex" id="::SpeechRecognitionEvent::resultIndex">
4337 <webidl> readonly attribute unsigned long resultIndex;</webidl>
4338 <Type type="unsigned long"/>
4340 <Attribute readonly="readonly" name="results" id="::SpeechRecognitionEvent::results">
4341 <webidl> readonly attribute <ref>SpeechRecognitionResultList</ref> results;</webidl>
4342 <Type name="SpeechRecognitionResultList"/>
4344 <Attribute readonly="readonly" name="interpretation" id="::SpeechRecognitionEvent::interpretation">
4345 <webidl> readonly attribute any interpretation;</webidl>
4348 <Attribute readonly="readonly" name="emma" id="::SpeechRecognitionEvent::emma">
4349 <webidl> readonly attribute <ref>Document</ref> emma;</webidl>
4350 <Type name="Document"/>
4353 <Interface name="SpeechGrammar" id="::SpeechGrammar">
4354 <webidl> [Constructor]
4355 interface SpeechGrammar {
4356 attribute DOMString src;
4357 attribute float weight;
4359 <ExtendedAttributeList>
4360 <ExtendedAttribute name="Constructor">
4361 <webidl>Constructor</webidl>
4362 </ExtendedAttribute>
4363 </ExtendedAttributeList>
4364 <Attribute name="src" id="::SpeechGrammar::src">
4365 <webidl> attribute DOMString src;</webidl>
4366 <Type type="DOMString"/>
4368 <Attribute name="weight" id="::SpeechGrammar::weight">
4369 <webidl> attribute float weight;</webidl>
4370 <Type type="float"/>
4373 <Interface name="SpeechGrammarList" id="::SpeechGrammarList">
4374 <webidl> [Constructor]
4375 interface SpeechGrammarList {
4376 readonly attribute unsigned long length;
4377 getter <ref>SpeechGrammar</ref> item(unsigned long index);
4378 void addFromURI(DOMString src, optional float weight);
4379 void addFromString(DOMString string, optional float weight);
4381 <ExtendedAttributeList>
4382 <ExtendedAttribute name="Constructor">
4383 <webidl>Constructor</webidl>
4384 </ExtendedAttribute>
4385 </ExtendedAttributeList>
4386 <Attribute readonly="readonly" name="length" id="::SpeechGrammarList::length">
4387 <webidl> readonly attribute unsigned long length;</webidl>
4388 <Type type="unsigned long"/>
4390 <Operation getter="getter" name="item" id="::SpeechGrammarList::item">
4391 <webidl> getter <ref>SpeechGrammar</ref> item(unsigned long index);</webidl>
4392 <Type name="SpeechGrammar"/>
4394 <Argument name="index">
4395 <Type type="unsigned long"/>
4399 <Operation name="addFromURI" id="::SpeechGrammarList::addFromURI">
4400 <webidl> void addFromURI(DOMString src, optional float weight);</webidl>
4403 <Argument name="src">
4404 <Type type="DOMString"/>
4406 <Argument optional="optional" name="weight">
4407 <Type type="float"/>
4411 <Operation name="addFromString" id="::SpeechGrammarList::addFromString">
4412 <webidl> void addFromString(DOMString string, optional float weight);</webidl>
4415 <Argument name="string">
4416 <Type type="DOMString"/>
4418 <Argument optional="optional" name="weight">
4419 <Type type="float"/>
4425 <Module name="MediaServer" id="::MediaServer">
4426 <webidl>module MediaServer {
4430 partial interface Navigator {
4431 readonly attribute <ref>MediaServerManager</ref> mediaserver;
4437 interface MediaServerManager {
4439 <ref>scanNetwork</ref>(<ref>MediaServerFoundServerCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
4445 interface MediaServer {
4447 readonly attribute DOMString id;
4449 readonly attribute DOMString friendlyName;
4451 readonly attribute object root;
4453 <ref>browse</ref>(DOMString containerId, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
4455 <ref>find</ref>(DOMString containerId, DOMString searchFilter, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
4461 interface MediaServerError {
4462 const unsigned short GENERIC = 1;
4464 attribute unsigned short code;
4466 attribute DOMString message;
4471 callback MediaServerFoundServerCallback = void (<ref>MediaServer</ref> value);
4473 callback MediaServerBrowseFindCallback = void (sequence<object> value);
4475 callback MediaServerErrorCallback = void (<ref>MediaServerError</ref> error);
4484 <def-api-feature identifier="http://tizen.org/api/mediaserver">
4487 Allows access to the mediaserver API
4492 <Interface name="Navigator" partial="partial" id="::MediaServer::Navigator">
4493 <webidl>partial interface Navigator {
4494 readonly attribute <ref>MediaServerManager</ref> mediaserver;
4496 <Attribute readonly="readonly" name="mediaserver" id="::MediaServer::Navigator::mediaserver">
4497 <webidl> readonly attribute <ref>MediaServerManager</ref> mediaserver;</webidl>
4498 <Type name="MediaServerManager"/>
4501 <Interface name="MediaServerManager" id="::MediaServer::MediaServerManager">
4502 <webidl>[NoInterfaceObject]
4503 interface MediaServerManager {
4505 <ref>scanNetwork</ref>(<ref>MediaServerFoundServerCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
4507 <ExtendedAttributeList>
4508 <ExtendedAttribute name="NoInterfaceObject">
4509 <webidl>NoInterfaceObject</webidl>
4510 </ExtendedAttribute>
4511 </ExtendedAttributeList>
4513 <webidl> <ref>scanNetwork</ref>(<ref>MediaServerFoundServerCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);</webidl>
4516 Scans local network for MediaServers.
4519 <Type name="scanNetwork"/>
4521 <Argument name="successCallback">
4524 callback invoqued for each MediaServer discovered.
4527 <Type name="MediaServerFoundServerCallback"/>
4529 <Argument optional="optional" name="errorCallback">
4534 <Type name="MediaServerErrorCallback"/>
4539 <Interface name="MediaServer" id="::MediaServer::MediaServer">
4540 <webidl>[NoInterfaceObject]
4541 interface MediaServer {
4543 readonly attribute DOMString id;
4545 readonly attribute DOMString friendlyName;
4547 readonly attribute object root;
4549 <ref>browse</ref>(DOMString containerId, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
4551 <ref>find</ref>(DOMString containerId, DOMString searchFilter, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
4553 <ExtendedAttributeList>
4554 <ExtendedAttribute name="NoInterfaceObject">
4555 <webidl>NoInterfaceObject</webidl>
4556 </ExtendedAttribute>
4557 </ExtendedAttributeList>
4558 <Attribute readonly="readonly" name="id" id="::MediaServer::MediaServer::id">
4559 <webidl> readonly attribute DOMString id;</webidl>
4567 An opaque unique ID.
4570 <Type type="DOMString"/>
4572 <Attribute readonly="readonly" name="friendlyName" id="::MediaServer::MediaServer::friendlyName">
4573 <webidl> readonly attribute DOMString friendlyName;</webidl>
4581 A user-friendly name for the device.
4584 <Type type="DOMString"/>
4586 <Attribute readonly="readonly" name="root" id="::MediaServer::MediaServer::root">
4587 <webidl> readonly attribute object root;</webidl>
4595 Media Server root folder.
4598 <Type type="object"/>
4601 <webidl> <ref>browse</ref>(DOMString containerId, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);</webidl>
4604 Browses for media item under a given MediaContainer.
4607 <Type name="browse"/>
4609 <Argument name="containerId">
4614 <Type type="DOMString"/>
4616 <Argument name="sortMode">
4621 <Type type="DOMString"/>
4623 <Argument name="count">
4628 <Type type="unsigned long"/>
4630 <Argument name="offset">
4635 <Type type="unsigned long"/>
4637 <Argument name="successCallback">
4642 <Type name="MediaServerBrowseFindCallback"/>
4644 <Argument optional="optional" name="errorCallback">
4649 <Type name="MediaServerErrorCallback"/>
4654 <webidl> <ref>find</ref>(DOMString containerId, DOMString searchFilter, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);</webidl>
4657 Searches for media item under a given MediaContainer.
4662 <Argument name="containerId">
4667 <Type type="DOMString"/>
4669 <Argument name="searchFilter">
4674 <Type type="DOMString"/>
4676 <Argument name="sortMode">
4681 <Type type="DOMString"/>
4683 <Argument name="count">
4688 <Type type="unsigned long"/>
4690 <Argument name="offset">
4695 <Type type="unsigned long"/>
4697 <Argument name="successCallback">
4702 <Type name="MediaServerBrowseFindCallback"/>
4704 <Argument optional="optional" name="errorCallback">
4709 <Type name="MediaServerErrorCallback"/>
4714 <Interface name="MediaServerError" id="::MediaServer::MediaServerError">
4715 <webidl>[NoInterfaceObject]
4716 interface MediaServerError {
4717 const unsigned short GENERIC = 1;
4719 attribute unsigned short code;
4721 attribute DOMString message;
4723 <ExtendedAttributeList>
4724 <ExtendedAttribute name="NoInterfaceObject">
4725 <webidl>NoInterfaceObject</webidl>
4726 </ExtendedAttribute>
4727 </ExtendedAttributeList>
4728 <Const name="GENERIC" value="1" id="::MediaServer::MediaServerError::GENERIC">
4729 <webidl> const unsigned short GENERIC = 1;</webidl>
4730 <Type type="unsigned short"/>
4732 <Attribute name="code" id="::MediaServer::MediaServerError::code">
4733 <webidl> attribute unsigned short code;</webidl>
4738 MUST return error code.
4742 <Type type="unsigned short"/>
4744 <Attribute name="message" id="::MediaServer::MediaServerError::message">
4745 <webidl> attribute DOMString message;</webidl>
4750 MUST return error message
4754 <Type type="DOMString"/>
4757 <Callback name="MediaServerFoundServerCallback" id="::MediaServer::MediaServerFoundServerCallback">
4758 <webidl>callback MediaServerFoundServerCallback = void (<ref>MediaServer</ref> value);</webidl>
4761 <Argument name="value">
4762 <Type name="MediaServer"/>
4766 <Callback name="MediaServerBrowseFindCallback" id="::MediaServer::MediaServerBrowseFindCallback">
4767 <webidl>callback MediaServerBrowseFindCallback = void (sequence<object> value);</webidl>
4770 <Argument name="value">
4771 <Type type="sequence">
4772 <Type type="object"/>
4777 <Callback name="MediaServerErrorCallback" id="::MediaServer::MediaServerErrorCallback">
4778 <webidl>callback MediaServerErrorCallback = void (<ref>MediaServerError</ref> error);</webidl>
4781 <Argument name="error">
4782 <Type name="MediaServerError"/>
4787 <Module name="Alarm" id="::Alarm">
4788 <webidl>module Alarm {
4790 typedef DOMString AlarmId;
4794 [NoInterfaceObject] interface AlarmManagerObject {
4795 readonly attribute <ref>AlarmManager</ref> alarm;
4797 <ref>Tizen</ref> implements <ref>AlarmManagerObject</ref>;
4800 [NoInterfaceObject] interface AlarmManager {
4802 const long PERIOD_MINUTE = 60;
4805 const long PERIOD_HOUR = 3600;
4808 const long PERIOD_DAY = 86400;
4811 const long PERIOD_WEEK = 604800;
4814 void add(<ref>Alarm</ref> alarm, <ref>ApplicationId</ref> applicationId, optional <ref>ApplicationControl</ref>? appControl) raises(<ref>WebAPIException</ref>);
4817 void remove(<ref>AlarmId</ref> id) raises(<ref>WebAPIException</ref>);
4820 void removeAll() raises(<ref>WebAPIException</ref>);
4823 <ref>Alarm</ref> get(<ref>AlarmId</ref> id) raises(<ref>WebAPIException</ref>);
4826 <ref>Alarm</ref>[] getAll() raises(<ref>WebAPIException</ref>);
4830 [NoInterfaceObject] interface Alarm {
4832 readonly attribute <ref>AlarmId</ref>? id;
4835 [Constructor(long delay, optional long? period)]
4837 interface AlarmRelative : <ref>Alarm</ref> {
4839 readonly attribute long delay;
4842 readonly attribute long? period;
4845 long? getRemainingSeconds() raises(<ref>WebAPIException</ref>);
4848 [Constructor(Date date),
4850 Constructor(Date date, <ref>ByDayValue</ref>[] daysOfTheWeek),
4852 Constructor(Date date, long period)]
4854 interface AlarmAbsolute : <ref>Alarm</ref> {
4856 readonly attribute Date date;
4859 readonly attribute long? period;
4862 readonly attribute <ref>ByDayValue</ref>[] daysOfTheWeek;
4865 Date? getNextScheduledDate() raises(<ref>WebAPIException</ref>);
4870 This API provides the functionality for scheduling the system alarm.
4871 It allows you to run other applications and have them perform operations at the specific time.
4872 You can schedule an alarm to go off once or to repeat at specific intervals.
4876 Each application has its own individual alarm storage, that is, applications cannot view or edit alarms set by other applications.
4879 Once an alarm goes off, it will be removed from the alarm storage automatically.
4880 <em>AlarmManager</em> provides methods to manage alarms such as adding and removing.
4881 For more information on the Alarm features, see <a href="../../org.tizen.web.appprogramming/html/guide/app_guide/alarm.htm">Alarm Guide</a>.
4888 <Typedef name="AlarmId" id="::Alarm::AlarmId">
4889 <webidl> typedef DOMString AlarmId;</webidl>
4892 An alarm identifier.
4898 <Type type="DOMString"/>
4900 <Interface name="AlarmManagerObject" id="::Alarm::AlarmManagerObject">
4901 <webidl> [NoInterfaceObject] interface AlarmManagerObject {
4902 readonly attribute <ref>AlarmManager</ref> alarm;
4906 This interface defines what is instantiated by the <em>Tizen </em>object from the Tizen Platform.
4907 There will be a <em>tizen.alarm </em>object that allows access to the functionality of the Alarm API.
4913 <ExtendedAttributeList>
4914 <ExtendedAttribute name="NoInterfaceObject">
4915 <webidl>NoInterfaceObject</webidl>
4916 </ExtendedAttribute>
4917 </ExtendedAttributeList>
4918 <Attribute readonly="readonly" name="alarm" id="::Alarm::AlarmManagerObject::alarm">
4919 <webidl> readonly attribute <ref>AlarmManager</ref> alarm;</webidl>
4920 <Type name="AlarmManager"/>
4923 <Implements name1="Tizen" name2="AlarmManagerObject">
4924 <webidl> <ref>Tizen</ref> implements <ref>AlarmManagerObject</ref>;</webidl>
4926 <Interface name="AlarmManager" id="::Alarm::AlarmManager">
4927 <webidl> [NoInterfaceObject] interface AlarmManager {
4929 const long PERIOD_MINUTE = 60;
4932 const long PERIOD_HOUR = 3600;
4935 const long PERIOD_DAY = 86400;
4938 const long PERIOD_WEEK = 604800;
4941 void add(<ref>Alarm</ref> alarm, <ref>ApplicationId</ref> applicationId, optional <ref>ApplicationControl</ref>? appControl) raises(<ref>WebAPIException</ref>);
4944 void remove(<ref>AlarmId</ref> id) raises(<ref>WebAPIException</ref>);
4947 void removeAll() raises(<ref>WebAPIException</ref>);
4950 <ref>Alarm</ref> get(<ref>AlarmId</ref> id) raises(<ref>WebAPIException</ref>);
4953 <ref>Alarm</ref>[] getAll() raises(<ref>WebAPIException</ref>);
4957 This interface provides methods to manage alarms.
4963 <ExtendedAttributeList>
4964 <ExtendedAttribute name="NoInterfaceObject">
4965 <webidl>NoInterfaceObject</webidl>
4966 </ExtendedAttribute>
4967 </ExtendedAttributeList>
4968 <Const name="PERIOD_MINUTE" value="60" id="::Alarm::AlarmManager::PERIOD_MINUTE">
4969 <webidl> const long PERIOD_MINUTE = 60;</webidl>
4972 The period of a minute.
4973 It defines the number of seconds per minute.
4981 <Const name="PERIOD_HOUR" value="3600" id="::Alarm::AlarmManager::PERIOD_HOUR">
4982 <webidl> const long PERIOD_HOUR = 3600;</webidl>
4985 The period of an hour.
4986 It defines the number of seconds per hour.
4994 <Const name="PERIOD_DAY" value="86400" id="::Alarm::AlarmManager::PERIOD_DAY">
4995 <webidl> const long PERIOD_DAY = 86400;</webidl>
4998 The period of a day.
4999 It defines the number of seconds per day.
5007 <Const name="PERIOD_WEEK" value="604800" id="::Alarm::AlarmManager::PERIOD_WEEK">
5008 <webidl> const long PERIOD_WEEK = 604800;</webidl>
5011 The period of a week.
5012 It defines the number of seconds in a week.
5020 <Operation name="add" id="::Alarm::AlarmManager::add">
5021 <webidl> void add(<ref>Alarm</ref> alarm, <ref>ApplicationId</ref> applicationId, optional <ref>ApplicationControl</ref>? appControl) raises(<ref>WebAPIException</ref>);</webidl>
5024 Adds an alarm to the storage.
5028 Set an alarm with the application ID to be run. You should definitely provide the application ID to run
5029 and the <a href=" ../../org.tizen.web.appprogramming/html/guide/app_guide/application_service.htm">application control </a>information if it is necessary.
5030 For more information about the application contorl, see <a href="../../org.tizen.web.device.apireference/tizen/application.html">The Application API</a>.
5040 http://tizen.org/privilege/alarm
5042 <Code> // Triggers an alarm on a given date/time
5043 var alarm = new tizen.AlarmAbsolute(new Date(2014, 10, 4, 8, 0));
5044 var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/view");
5045 tizen.alarm.add(alarm, tizen.application.getCurrentApplication().appInfo.id, appControl);
5046 console.log("Alarm added with id: " + alarm.id);
5051 <Argument name="alarm">
5054 An alarm to add. It can be either <em>AlarmRelative </em> or <em>AlarmAbsolute</em>.
5057 <Type name="Alarm"/>
5059 <Argument name="applicationId">
5062 The application ID to run when the alarm is triggered.
5065 <Type name="ApplicationId"/>
5067 <Argument optional="optional" name="appControl">
5070 The data structure describing application control details.
5073 <Type name="ApplicationControl" nullable="nullable"/>
5077 <RaiseException name="WebAPIException">
5080 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
5083 with error type InvalidValuesError, if any input parameter does not contain a valid value.
5086 with error type SecurityError, if the application does not have the privilege to call this method.
5089 with error type UnknownError, if any other error occurs.
5095 <Operation name="remove" id="::Alarm::AlarmManager::remove">
5096 <webidl> void remove(<ref>AlarmId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
5099 Removes an alarm from the storage.
5103 If an alarm goes off, it will be removed from the storage automatically.
5113 http://tizen.org/privilege/alarm
5115 <Code> var alarms = tizen.alarm.getAll();
5117 // Removes the first alarm
5118 if (alarms.length > 0) {
5120 tizen.alarm.remove(alarms[0].id);
5121 console.log("Successfully removed the first alarm.");
5123 console.log("Failed to remove the first alarm.");
5130 <Argument name="id">
5133 The ID of the alarm to remove
5136 <Type name="AlarmId"/>
5140 <RaiseException name="WebAPIException">
5143 with error type NotFoundError, if this alarm identifier cannot be found in the storage.
5146 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
5149 with error type InvalidValuesError, if any input parameter does not contain a valid value.
5152 with error type SecurityError, if the application does not have the privilege to call this method.
5155 with error type UnknownError, if the method cannot be completed because of an unknown error.
5161 <Operation name="removeAll" id="::Alarm::AlarmManager::removeAll">
5162 <webidl> void removeAll() raises(<ref>WebAPIException</ref>);</webidl>
5165 Removes all alarms added by an application.
5169 Because each application has its own alarm storage, this method removes alarms only added by the calling application.
5179 http://tizen.org/privilege/alarm
5181 <Code> tizen.alarm.removeAll();
5182 console.log("remove all registered alarms in the storage.");
5188 <RaiseException name="WebAPIException">
5191 with error type SecurityError, if the application does not have the privilege to call this method.
5194 with error type UnknownError, if the method cannot be completed because of an unknown error.
5200 <Operation name="get" id="::Alarm::AlarmManager::get">
5201 <webidl> <ref>Alarm</ref> get(<ref>AlarmId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
5204 Returns an alarm as per the specified identifier.
5209 <Code> // Sets an alarm
5210 var date = new Date();
5211 date.setHours(date.getHours()+1);
5212 var abs_alarm = new tizen.AlarmAbsolute(date);
5215 tizen.alarm.add(abs_alarm, tizen.application.getCurrentApplication().appInfo.id);
5218 var alarm = tizen.alarm.get(abs_alarm.id);
5219 console.log("The alarm will trigger at " + alarm.getNextScheduledDate());
5225 Alarm An alarm object with the specified ID.
5230 <Argument name="id">
5233 The alarm ID to retrieve.
5236 <Type name="AlarmId"/>
5240 <RaiseException name="WebAPIException">
5243 with error type NotFoundError, if this alarm identifier cannot be found in the storage.
5246 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
5249 with error type InvalidValuesError, if any input parameter does not contain a valid value.
5252 with error type UnknownError, if the method cannot be completed because of an unknown error.
5258 <Operation name="getAll" id="::Alarm::AlarmManager::getAll">
5259 <webidl> <ref>Alarm</ref>[] getAll() raises(<ref>WebAPIException</ref>);</webidl>
5262 Retrieves all alarms in an application storage..
5266 Alarms that have already been triggered are removed automatically from the storage.
5272 <Code> var alarms = tizen.alarm.getAll();
5273 console.log(alarms.length + " alarms present in the storage.");
5279 Alarm[] All Alarm objects.
5282 <Type name="Alarm"/>
5286 <RaiseException name="WebAPIException">
5289 with error type UnknownError, if the method cannot be completed because of an unknown error.
5296 <Interface name="Alarm" id="::Alarm::Alarm">
5297 <webidl> [NoInterfaceObject] interface Alarm {
5299 readonly attribute <ref>AlarmId</ref>? id;
5303 This interface is an abstract interface for alarm types.
5309 <ExtendedAttributeList>
5310 <ExtendedAttribute name="NoInterfaceObject">
5311 <webidl>NoInterfaceObject</webidl>
5312 </ExtendedAttribute>
5313 </ExtendedAttributeList>
5314 <Attribute readonly="readonly" name="id" id="::Alarm::Alarm::id">
5315 <webidl> readonly attribute <ref>AlarmId</ref>? id;</webidl>
5318 The alarm identifier.
5324 <Type name="AlarmId" nullable="nullable"/>
5327 <Interface name="AlarmRelative" id="::Alarm::AlarmRelative">
5328 <webidl> [Constructor(long delay, optional long? period)]
5330 interface AlarmRelative : <ref>Alarm</ref> {
5332 readonly attribute long delay;
5335 readonly attribute long? period;
5338 long? getRemainingSeconds() raises(<ref>WebAPIException</ref>);
5342 This interface provides the relative alarm, which occurs at a fixed interval in future.
5346 This alarm triggers after a duration mentioned in <em>delay</em> attribute from the moment the alarm is added.
5347 If a <em>period</em> is provided, the alarm keeps triggering for the given interval.
5353 <Code> // Gets the current application id.
5354 var appId = tizen.application.getCurrentApplication().appInfo.id;
5356 // Sets an alarm in 3 hours from now
5357 var alarm1 = new tizen.AlarmRelative(3 * tizen.alarm.PERIOD_HOUR);
5358 tizen.alarm.add(alarm1, appId);
5360 // Sets an alarm in one hour, recurring after every 2 minutes
5361 var alarm2 = new tizen.AlarmRelative(tizen.alarm.PERIOD_HOUR, 2 * tizen.alarm.PERIOD_MINUTE);
5362 tizen.alarm.add(alarm2, appId);
5365 <ExtendedAttributeList>
5366 <ExtendedAttribute name="Constructor">
5367 <webidl>Constructor(long delay, optional long? period)</webidl>
5369 <Argument name="delay">
5372 <Argument optional="optional" name="period">
5373 <Type type="long" nullable="nullable"/>
5376 </ExtendedAttribute>
5377 </ExtendedAttributeList>
5378 <InterfaceInheritance>
5379 <Name name="Alarm"/>
5380 </InterfaceInheritance>
5381 <Attribute readonly="readonly" name="delay" id="::Alarm::AlarmRelative::delay">
5382 <webidl> readonly attribute long delay;</webidl>
5385 An attribute to store the difference in time (in seconds) between when an alarm is added and it is triggered.
5393 <Attribute readonly="readonly" name="period" id="::Alarm::AlarmRelative::period">
5394 <webidl> readonly attribute long? period;</webidl>
5397 An attribute to store the duration in seconds between each trigger of an alarm.
5398 By default, this attribute is set to <var>null</var>, indicating that this alarm does not repeat.
5404 <Type type="long" nullable="nullable"/>
5406 <Operation name="getRemainingSeconds" id="::Alarm::AlarmRelative::getRemainingSeconds">
5407 <webidl> long? getRemainingSeconds() raises(<ref>WebAPIException</ref>);</webidl>
5410 Returns duration in seconds before the next alarm is triggered.
5414 If the alarm has expired, this method returns <var>null</var>.
5420 <Code> // Gets the current application id.
5421 var appId = tizen.application.getCurrentApplication().appInfo.id;
5423 // Sets an alarm in 3 hours from now
5424 var alarm = new tizen.AlarmRelative(3 * tizen.alarm.PERIOD_HOUR);
5425 tizen.alarm.add(alarm, appId);
5427 var sec = alarm.getRemainingSeconds();
5428 console.log("remaining time is " + sec);
5431 <Type type="long" nullable="nullable">
5434 long The duration before the next alarm trigger.
5440 <RaiseException name="WebAPIException">
5443 with error type UnknownError, if the method cannot be completed because of an unknown error.
5450 <Interface name="AlarmAbsolute" id="::Alarm::AlarmAbsolute">
5451 <webidl> [Constructor(Date date),
5453 Constructor(Date date, <ref>ByDayValue</ref>[] daysOfTheWeek),
5455 Constructor(Date date, long period)]
5457 interface AlarmAbsolute : <ref>Alarm</ref> {
5459 readonly attribute Date date;
5462 readonly attribute long? period;
5465 readonly attribute <ref>ByDayValue</ref>[] daysOfTheWeek;
5468 Date? getNextScheduledDate() raises(<ref>WebAPIException</ref>);
5472 This interface provides an absolute alarm, which triggers at a specified absolute date.
5476 If a <em>period</em> is provided, the alarm keeps triggering for the given interval. If the <em>daysOfTheWeek</em> array is not empty, the alarm triggers every week, for the given days, at the time defined by <em>date</em> attribute.
5482 <Code> // Gets the current application id.
5483 var appId = tizen.application.getCurrentApplication().appInfo.id;
5485 // Sets an alarm on January 1st 2014 08:00
5486 var date = new Date(2014, 0, 1, 8, 0);
5487 var alarm1 = new tizen.AlarmAbsolute(date);
5488 tizen.alarm.add(alarm1, appId);
5490 // Sets an alarm on January 1st 2014 08:00, repeating every 2 days
5491 var alarm2 = new tizen.AlarmAbsolute(date, 2 * tizen.alarm.PERIOD_DAY);
5492 tizen.alarm.add(alarm2, appId);
5494 // Sets an alarm occurring on every Saturday and Sunday, at 08:00, starting from January 1st 2014
5495 var alarm3 = new tizen.AlarmAbsolute(date, ["SA", "SU"]);
5496 tizen.alarm.add(alarm3, appId);
5499 <ExtendedAttributeList>
5500 <ExtendedAttribute name="Constructor">
5501 <webidl>Constructor(Date date)</webidl>
5503 <Argument name="date">
5507 </ExtendedAttribute>
5508 <ExtendedAttribute name="Constructor">
5509 <webidl> Constructor(Date date, <ref>ByDayValue</ref>[] daysOfTheWeek)</webidl>
5511 <Argument name="date">
5514 <Argument name="daysOfTheWeek">
5516 <Type name="ByDayValue"/>
5520 </ExtendedAttribute>
5521 <ExtendedAttribute name="Constructor">
5522 <webidl> Constructor(Date date, long period)</webidl>
5524 <Argument name="date">
5527 <Argument name="period">
5531 </ExtendedAttribute>
5532 </ExtendedAttributeList>
5533 <InterfaceInheritance>
5534 <Name name="Alarm"/>
5535 </InterfaceInheritance>
5536 <Attribute readonly="readonly" name="date" id="::Alarm::AlarmAbsolute::date">
5537 <webidl> readonly attribute Date date;</webidl>
5540 An attribute to store the absolute date/time when the alarm is initially triggered.
5544 This attribute is precise to the second. Milliseconds will be ignored.
5553 <Attribute readonly="readonly" name="period" id="::Alarm::AlarmAbsolute::period">
5554 <webidl> readonly attribute long? period;</webidl>
5557 An attribute to store the duration in seconds between each trigger of the alarm.
5561 By default, this attribute is set to <var>null</var>, indicating that this alarm does not repeat.
5562 The <em>period</em> and <em>daysOfTheWeek</em> attributes are mutually exclusive.
5569 <Type type="long" nullable="nullable"/>
5571 <Attribute readonly="readonly" name="daysOfTheWeek" id="::Alarm::AlarmAbsolute::daysOfTheWeek">
5572 <webidl> readonly attribute <ref>ByDayValue</ref>[] daysOfTheWeek;</webidl>
5575 An attribute to store the days of the week associated with the recurrence rule.
5579 By default, this attribute is set to an empty array.
5580 The <em>period</em> and <em>daysOfTheWeek</em> attributes are mutually exclusive.
5588 <Type name="ByDayValue"/>
5591 <Operation name="getNextScheduledDate" id="::Alarm::AlarmAbsolute::getNextScheduledDate">
5592 <webidl> Date? getNextScheduledDate() raises(<ref>WebAPIException</ref>);</webidl>
5595 Returns the date / time of the next alarm trigger.
5599 If the alarm has expired, this method returns <var>null</var>. The returned date is precise to the second.
5605 <Code> // Gets the current application id.
5606 var appId = tizen.application.getCurrentApplication().appInfo.id;
5608 // Sets an alarm on January 1st 2014 08:00
5609 var date = new Date(2014, 0, 1, 8, 0);
5610 var alarm1 = new tizen.AlarmAbsolute(date);
5611 tizen.alarm.add(alarm1, appId);
5613 var date = alarm1.getNextScheduledDate();
5614 console.log("next scheduled time is " + date);
5617 <Type type="Date" nullable="nullable">
5620 Date The date/time of the next alarm trigger.
5626 <RaiseException name="WebAPIException">
5629 with error type UnknownError, if the method cannot be completed because of an unknown error.
5637 <Module name="Application" id="::Application">
5638 <webidl>module Application {
5640 typedef DOMString ApplicationId;
5642 typedef DOMString ApplicationContextId;
5644 [NoInterfaceObject] interface ApplicationManagerObject {
5645 readonly attribute <ref>ApplicationManager</ref> application;
5647 <ref>Tizen</ref> implements <ref>ApplicationManagerObject</ref>;
5649 [NoInterfaceObject] interface ApplicationManager {
5651 <ref>Application</ref> getCurrentApplication() raises(<ref>WebAPIException</ref>);
5653 void kill(<ref>ApplicationContextId</ref> contextId,
5654 optional <ref>SuccessCallback</ref>? successCallback,
5655 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5657 void launch(<ref>ApplicationId</ref> id,
5658 optional <ref>SuccessCallback</ref>? successCallback,
5659 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5661 void launchAppControl(<ref>ApplicationControl</ref> appControl,
5662 optional <ref>ApplicationId</ref>? id,
5663 optional <ref>SuccessCallback</ref>? successCallback,
5664 optional <ref>ErrorCallback</ref>? errorCallback,
5665 optional <ref>ApplicationControlDataArrayReplyCallback</ref>? replyCallback) raises(<ref>WebAPIException</ref>);
5667 void findAppControl(<ref>ApplicationControl</ref> appControl,
5668 <ref>FindAppControlSuccessCallback</ref> successCallback,
5669 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5671 void getAppsContext(<ref>ApplicationContextArraySuccessCallback</ref> successCallback,
5672 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5674 <ref>ApplicationContext</ref> getAppContext(optional <ref>ApplicationContextId</ref>? contextId) raises(<ref>WebAPIException</ref>);
5676 void getAppsInfo(<ref>ApplicationInformationArraySuccessCallback</ref> successCallback,
5677 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5679 <ref>ApplicationInformation</ref> getAppInfo(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);
5681 <ref>ApplicationCertificate</ref>[] getAppCerts(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);
5683 DOMString getAppSharedURI(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);
5685 <ref>ApplicationMetaData</ref>[] getAppMetaData(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);
5687 long addAppInfoEventListener(<ref>ApplicationInformationEventCallback</ref> eventCallback) raises(<ref>WebAPIException</ref>);
5689 void removeAppInfoEventListener(long watchId) raises(<ref>WebAPIException</ref>);
5693 [NoInterfaceObject] interface Application {
5695 readonly attribute <ref>ApplicationInformation</ref> appInfo;
5697 readonly attribute <ref>ApplicationContextId</ref> contextId;
5699 void exit() raises(<ref>WebAPIException</ref>);
5701 void hide() raises(<ref>WebAPIException</ref>);
5703 <ref>RequestedApplicationControl</ref> getRequestedAppControl() raises(<ref>WebAPIException</ref>);
5707 [NoInterfaceObject] interface ApplicationInformation {
5709 readonly attribute <ref>ApplicationId</ref> id;
5711 readonly attribute DOMString name;
5713 readonly attribute DOMString iconPath;
5715 readonly attribute DOMString version;
5717 readonly attribute boolean show;
5719 readonly attribute DOMString[] categories;
5721 readonly attribute Date installDate;
5723 readonly attribute long size raises(<ref>WebAPIException</ref>);
5725 readonly attribute <ref>PackageId</ref> packageId;
5728 [NoInterfaceObject] interface ApplicationContext {
5730 readonly attribute <ref>ApplicationContextId</ref> id;
5732 readonly attribute <ref>ApplicationId</ref> appId;
5736 [Constructor(DOMString key, DOMString[] value)]
5737 interface ApplicationControlData {
5739 attribute DOMString key;
5741 attribute DOMString[] value;
5745 [Constructor(DOMString operation, optional DOMString? uri,
5746 optional DOMString? mime, optional DOMString? category,
5747 optional <ref>ApplicationControlData</ref>[]? data)]
5748 interface ApplicationControl {
5750 attribute DOMString operation;
5752 attribute DOMString? uri;
5754 attribute DOMString? mime;
5756 attribute DOMString? category;
5758 attribute <ref>ApplicationControlData</ref>[] data;
5762 [NoInterfaceObject] interface RequestedApplicationControl {
5764 readonly attribute <ref>ApplicationControl</ref> appControl;
5766 readonly attribute <ref>ApplicationId</ref> callerAppId;
5768 void replyResult(optional <ref>ApplicationControlData</ref>[]? data) raises(<ref>WebAPIException</ref>);
5770 void replyFailure() raises(<ref>WebAPIException</ref>);
5775 [NoInterfaceObject] interface ApplicationCertificate {
5777 readonly attribute DOMString type;
5779 readonly attribute DOMString value;
5784 [NoInterfaceObject] interface ApplicationMetaData {
5786 readonly attribute DOMString key;
5788 readonly attribute DOMString value;
5793 [Callback=FunctionOnly, NoInterfaceObject] interface ApplicationInformationArraySuccessCallback {
5794 void onsuccess(<ref>ApplicationInformation</ref>[] informationArray);
5797 [Callback=FunctionOnly, NoInterfaceObject] interface FindAppControlSuccessCallback {
5798 void onsuccess(<ref>ApplicationInformation</ref>[] informationArray, <ref>ApplicationControl</ref> appControl);
5801 [Callback=FunctionOnly, NoInterfaceObject] interface ApplicationContextArraySuccessCallback {
5802 void onsuccess(<ref>ApplicationContext</ref>[] contexts);
5805 [Callback, NoInterfaceObject] interface ApplicationControlDataArrayReplyCallback {
5806 void onsuccess(optional <ref>ApplicationControlData</ref>[]? data);
5811 [Callback, NoInterfaceObject] interface ApplicationInformationEventCallback {
5812 void oninstalled(<ref>ApplicationInformation</ref> info);
5814 void onupdated(<ref>ApplicationInformation</ref> info);
5816 void onuninstalled(<ref>ApplicationId</ref> id);
5822 This API provides a way to launch other applications and access
5823 application management.
5827 The <em>ApplicationManager</em> interface also provides methods to launch other applications
5828 explicitly and implicitly through the <em>ApplicationControl</em> interface.
5829 The <em>ApplicationControl</em> interface consists of an operation, URI, and MIME type
5830 and also describes an action to be performed by other
5831 applications and can carry the result from the subsequent application.
5832 The <em>ApplicationManager</em> interface also provides methods to handle the application
5833 lifecycle, to access the installed applications on the device, and to let
5834 an application be notified of a change in the application list.
5837 The <em>Application</em> interface defines the current application's information and
5838 the basic operations for current application such as exit or hide.
5841 For more information on the Application features, see <a href="../../org.tizen.web.appprogramming/html/guide/app_guide/application.htm">Application Guide</a>.
5848 <Typedef name="ApplicationId" id="::Application::ApplicationId">
5849 <webidl> typedef DOMString ApplicationId;</webidl>
5852 The unique ID for an installed application.
5858 <Type type="DOMString"/>
5860 <Typedef name="ApplicationContextId" id="::Application::ApplicationContextId">
5861 <webidl> typedef DOMString ApplicationContextId;</webidl>
5864 The unique ID for a running application.
5870 <Type type="DOMString"/>
5872 <Interface name="ApplicationManagerObject" id="::Application::ApplicationManagerObject">
5873 <webidl> [NoInterfaceObject] interface ApplicationManagerObject {
5874 readonly attribute <ref>ApplicationManager</ref> application;
5878 This interface defines what is instantiated by the <em>Tizen </em>object by the Tizen Platform.
5882 There will be a <em>tizen.application </em>object that allows access to Application API functionality.
5889 <ExtendedAttributeList>
5890 <ExtendedAttribute name="NoInterfaceObject">
5891 <webidl>NoInterfaceObject</webidl>
5892 </ExtendedAttribute>
5893 </ExtendedAttributeList>
5894 <Attribute readonly="readonly" name="application" id="::Application::ApplicationManagerObject::application">
5895 <webidl> readonly attribute <ref>ApplicationManager</ref> application;</webidl>
5896 <Type name="ApplicationManager"/>
5899 <Implements name1="Tizen" name2="ApplicationManagerObject">
5900 <webidl> <ref>Tizen</ref> implements <ref>ApplicationManagerObject</ref>;</webidl>
5902 <Interface name="ApplicationManager" id="::Application::ApplicationManager">
5903 <webidl> [NoInterfaceObject] interface ApplicationManager {
5905 <ref>Application</ref> getCurrentApplication() raises(<ref>WebAPIException</ref>);
5907 void kill(<ref>ApplicationContextId</ref> contextId,
5908 optional <ref>SuccessCallback</ref>? successCallback,
5909 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5911 void launch(<ref>ApplicationId</ref> id,
5912 optional <ref>SuccessCallback</ref>? successCallback,
5913 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5915 void launchAppControl(<ref>ApplicationControl</ref> appControl,
5916 optional <ref>ApplicationId</ref>? id,
5917 optional <ref>SuccessCallback</ref>? successCallback,
5918 optional <ref>ErrorCallback</ref>? errorCallback,
5919 optional <ref>ApplicationControlDataArrayReplyCallback</ref>? replyCallback) raises(<ref>WebAPIException</ref>);
5921 void findAppControl(<ref>ApplicationControl</ref> appControl,
5922 <ref>FindAppControlSuccessCallback</ref> successCallback,
5923 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5925 void getAppsContext(<ref>ApplicationContextArraySuccessCallback</ref> successCallback,
5926 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5928 <ref>ApplicationContext</ref> getAppContext(optional <ref>ApplicationContextId</ref>? contextId) raises(<ref>WebAPIException</ref>);
5930 void getAppsInfo(<ref>ApplicationInformationArraySuccessCallback</ref> successCallback,
5931 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5933 <ref>ApplicationInformation</ref> getAppInfo(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);
5935 <ref>ApplicationCertificate</ref>[] getAppCerts(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);
5937 DOMString getAppSharedURI(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);
5939 <ref>ApplicationMetaData</ref>[] getAppMetaData(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);
5941 long addAppInfoEventListener(<ref>ApplicationInformationEventCallback</ref> eventCallback) raises(<ref>WebAPIException</ref>);
5943 void removeAppInfoEventListener(long watchId) raises(<ref>WebAPIException</ref>);
5948 This section defines the application manager interface.
5954 <ExtendedAttributeList>
5955 <ExtendedAttribute name="NoInterfaceObject">
5956 <webidl>NoInterfaceObject</webidl>
5957 </ExtendedAttribute>
5958 </ExtendedAttributeList>
5959 <Operation name="getCurrentApplication" id="::Application::ApplicationManager::getCurrentApplication">
5960 <webidl> <ref>Application</ref> getCurrentApplication() raises(<ref>WebAPIException</ref>);</webidl>
5963 Gets the <em>Application </em>object defining the current application.
5968 <Code> var app = tizen.application.getCurrentApplication();
5969 console.log("Current application's app id is " + app.appInfo.id);
5972 <Type name="Application">
5975 Application The data structure that defines current application.
5981 <RaiseException name="WebAPIException">
5984 with error type UnknownError, if the application cannot be retrieved because of an unknown error.
5990 <Operation name="kill" id="::Application::ApplicationManager::kill">
5991 <webidl> void kill(<ref>ApplicationContextId</ref> contextId,
5992 optional <ref>SuccessCallback</ref>? successCallback,
5993 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
5996 Kills an application with the specified application context ID.
6000 The <em>ErrorCallback() </em>is launched with these error types:
6004 NotFoundError - If the context is not found with specified context ID. </li>
6006 InvalidValuesError - If any of the input parameters contain an invalid value
6007 or if the specified context ID matches the context ID of the calling application. </li>
6009 UnknownError - If any other error occurs. </li>
6019 http://tizen.org/privilege/appmanager.kill
6021 <Code> function onKillSuccess() {
6022 console.log("Application terminated successfully");
6025 function onRunningAppsContext(contexts) {
6026 // let's assume that the application "targetApp0.main" has been installed.
6027 var targetId = "targetApp0.main";
6029 for (var i = 0; i < contexts.length; i++) {
6030 if (contexts[i].appId == targetId) {
6031 tizen.application.kill(contexts[i].id, onKillSuccess);
6036 tizen.application.getAppsContext(onRunningAppsContext);
6041 <Argument name="contextId">
6044 The identifier of the application to kill
6047 <Type name="ApplicationContextId"/>
6049 <Argument optional="optional" name="successCallback">
6052 The method to invoke when an application is killed successfully.
6055 <Type name="SuccessCallback" nullable="nullable"/>
6057 <Argument optional="optional" name="errorCallback">
6060 The method to invoke when an error occurs.
6063 <Type name="ErrorCallback" nullable="nullable"/>
6067 <RaiseException name="WebAPIException">
6070 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6073 with error type SecurityError, if the application does not have the privilege to call this method.
6079 <Operation name="launch" id="::Application::ApplicationManager::launch">
6080 <webidl> void launch(<ref>ApplicationId</ref> id,
6081 optional <ref>SuccessCallback</ref>? successCallback,
6082 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
6085 Launches an application with the given application ID.
6089 The <em>ErrorCallback()</em> is launched with these error types:
6093 NotFoundError - If the application is not found with given ID. </li>
6095 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
6097 UnknownError - If any other error occurs. </li>
6107 http://tizen.org/privilege/application.launch
6109 <Code> function onsuccess() {
6110 console.log("The application has launched successfully");
6113 // let's assume that application "targetApp0.main" has been installed
6114 tizen.application.launch("targetApp0.main", onsuccess);
6119 <Argument name="id">
6122 A unique string representing application ID.
6125 <Type name="ApplicationId"/>
6127 <Argument optional="optional" name="successCallback">
6130 The method to call when the invocation ends successfully.
6133 <Type name="SuccessCallback" nullable="nullable"/>
6135 <Argument optional="optional" name="errorCallback">
6138 The method to call when an error occurs.
6141 <Type name="ErrorCallback" nullable="nullable"/>
6145 <RaiseException name="WebAPIException">
6148 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6151 with error type SecurityError, if the application does not have the privilege to call this method.
6157 <Operation name="launchAppControl" id="::Application::ApplicationManager::launchAppControl">
6158 <webidl> void launchAppControl(<ref>ApplicationControl</ref> appControl,
6159 optional <ref>ApplicationId</ref>? id,
6160 optional <ref>SuccessCallback</ref>? successCallback,
6161 optional <ref>ErrorCallback</ref>? errorCallback,
6162 optional <ref>ApplicationControlDataArrayReplyCallback</ref>? replyCallback) raises(<ref>WebAPIException</ref>);</webidl>
6165 Launches an application with the specified application control.
6169 An application can launch other applications with the application control,
6170 and get back the results from the launched applications.
6173 The application control consists of an operation, URI, and MIME type, and describes
6174 the request to be performed by the newly launched application. The
6175 application control is passed to the <em>launchAppControl()</em> method to launch an
6176 application. The system tries to find the proper application
6177 to perform the requested application control, then launches the selected application.
6180 The application control request is passed to the newly launched application
6181 and it can be accessed by <em>getRequestedAppControl() </em>method. The passed
6182 application control contains the reason the application was launched and
6183 information about what the application is doing. The launched application
6184 can send a result to the caller application with the <em>replyResult() </em>method of
6185 <em>RequestedApplicationControl</em> interface.
6188 The <em>ErrorCallback() </em>is launched with these error types:
6192 NotFoundError - If system cannot find the application that matches the specified application control. </li>
6194 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
6196 UnknownError: If any other error occurs. </li>
6206 http://tizen.org/privilege/application.launch
6208 <Code> var appControl = new tizen.ApplicationControl(
6209 "http://tizen.org/appcontrol/operation/pick",
6211 "image/jpeg",
6214 var appControlReplyCallback = {
6215 // callee sent a reply
6216 onsuccess: function(data) {
6217 for (var i = 0; i < data.length; i++) {
6218 if (data[i].key == "http://tizen.org/appcontrol/data/selected") {
6219 console.log('Selected image is ' + data[i].value[0]);
6223 // callee returned failure
6224 onfailure: function() {
6225 console.log('The launch application control failed');
6229 tizen.application.launchAppControl(
6232 function() {console.log("launch application control succeed"); },
6233 function(e) {console.log("launch application control failed. reason: " + e.message); },
6234 appControlReplyCallback );
6239 <Argument name="appControl">
6242 The data structure describing application control details.
6245 <Type name="ApplicationControl"/>
6247 <Argument optional="optional" name="id">
6250 An identifier of the application to be launched. If the ID is <var>null </var>or not specified, then the system tries to find the application to be launched for the requested application control.
6253 <Type name="ApplicationId" nullable="nullable"/>
6255 <Argument optional="optional" name="successCallback">
6258 The method to call when the invocation ends successfully.
6261 <Type name="SuccessCallback" nullable="nullable"/>
6263 <Argument optional="optional" name="errorCallback">
6266 The method to invoke when an error occurs.
6269 <Type name="ErrorCallback" nullable="nullable"/>
6271 <Argument optional="optional" name="replyCallback">
6274 The method to invoke when the application gets back results from the launched application.
6277 <Type name="ApplicationControlDataArrayReplyCallback" nullable="nullable"/>
6281 <RaiseException name="WebAPIException">
6284 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6287 with error type SecurityError, if the application does not have the privilege to call this method.
6293 <Operation name="findAppControl" id="::Application::ApplicationManager::findAppControl">
6294 <webidl> void findAppControl(<ref>ApplicationControl</ref> appControl,
6295 <ref>FindAppControlSuccessCallback</ref> successCallback,
6296 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
6299 Finds application information can be launched with the given application control.
6303 An application can get a list of other applications can be launched with the application control.
6306 The <em>ErrorCallback()<em> is launched with these error types:
6310 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
6312 UnknownError - If any other error occurs. </li>
6318 <Code> var appControl = new tizen.ApplicationControl(
6319 "http://tizen.org/appcontrol/operation/pick",
6321 "image/jpeg",
6324 function successCB(appInfos, appControl)
6326 // em>appControl/em> is same object with the value passed as first parameter to em>findAppControl()/em>
6327 var appControlReplyCallback = {
6328 // callee sent a reply
6329 onsuccess: function(data) {
6330 for (var i = 0; i < data.length; i++) {
6331 if (data[i].key == "http://tizen.org/appcontrol/data/selected") {
6332 console.log('Selected image is ' + data[i].value[0]);
6336 // callee returned failure
6337 onfailure: function() {
6338 console.log('The launch application control failed');
6342 var appId = appInfos[0].id; // select first app's id
6344 tizen.application.launchAppControl(
6347 function() {console.log("launch application control succeed"); },
6348 function(e) {console.log("launch application control failed. reason: " + e.message); },
6349 appControlReplyCallback );
6352 tizen.application.findAppControl(appControl, successCB);
6357 <Argument name="appControl">
6360 A data structure describing application control details.
6363 <Type name="ApplicationControl"/>
6365 <Argument name="successCallback">
6368 The method to call that returns a list of application information.
6371 <Type name="FindAppControlSuccessCallback"/>
6373 <Argument optional="optional" name="errorCallback">
6376 The method to call when an error occurs.
6379 <Type name="ErrorCallback" nullable="nullable"/>
6383 <RaiseException name="WebAPIException">
6386 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6392 <Operation name="getAppsContext" id="::Application::ApplicationManager::getAppsContext">
6393 <webidl> void getAppsContext(<ref>ApplicationContextArraySuccessCallback</ref> successCallback,
6394 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
6397 Gets a list of application contexts for applications that are currently running on a device.
6398 The information contained for each application corresponds to the application state at the time when the list was generated.
6402 The <em>errorCallback()</em> is launched with this error type:
6406 UnknownError - If an unknown error occurs. </li>
6412 <Code> function onRunningAppsContext(contexts) {
6413 for (var i = 0; i < contexts.length; i++)
6414 console.log("ID : " + contexts[i].id);
6417 tizen.application.getAppsContext(onRunningAppsContext);
6422 <Argument name="successCallback">
6425 The method to call when the invocation ends successfully.
6428 <Type name="ApplicationContextArraySuccessCallback"/>
6430 <Argument optional="optional" name="errorCallback">
6433 The method to call when an error occurs.
6436 <Type name="ErrorCallback" nullable="nullable"/>
6440 <RaiseException name="WebAPIException">
6443 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6449 <Operation name="getAppContext" id="::Application::ApplicationManager::getAppContext">
6450 <webidl> <ref>ApplicationContext</ref> getAppContext(optional <ref>ApplicationContextId</ref>? contextId) raises(<ref>WebAPIException</ref>);</webidl>
6453 Gets the application context for the specified application context ID.
6454 If the ID is set to<var> null</var> or is not set at all, the method returns the application context of the current application.
6455 The list of running applications and their application IDs is obtained with <em>getAppsContext()</em>.
6460 <Code> var appContext = tizen.application.getAppContext(null);
6461 console.log("Application context retrieved for app " + appContext.appId);
6464 <Type name="ApplicationContext">
6467 ApplicationContext A data structure that lists running application details.
6472 <Argument optional="optional" name="contextId">
6475 A string representing an application context ID. If the ID is not provided, the application context of the calling application will be returned.
6478 <Type name="ApplicationContextId" nullable="nullable"/>
6482 <RaiseException name="WebAPIException">
6485 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6488 with error type NotFoundError, if the application context is not found with provided ID.
6491 with error type UnknownError, if the application context cannot be retrieved because of an unknown error.
6497 <Operation name="getAppsInfo" id="::Application::ApplicationManager::getAppsInfo">
6498 <webidl> void getAppsInfo(<ref>ApplicationInformationArraySuccessCallback</ref> successCallback,
6499 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
6502 Gets the list of installed application's information on a device.
6503 The information contained on each application corresponds to the application state at the moment when the list was generated.
6507 The <em>errorCallback()</em> is launched with this error type:
6511 UnknownError - If an unknown error occurs. </li>
6517 <Code> function onListInstalledApps(applications) {
6518 for (var i = 0; i < applications.length; i++)
6519 console.log("ID : " + applications[i].id);
6522 tizen.application.getAppsInfo(onListInstalledApps);
6527 <Argument name="successCallback">
6530 The method to call when the invocation ends successfully.
6533 <Type name="ApplicationInformationArraySuccessCallback"/>
6535 <Argument optional="optional" name="errorCallback">
6538 The method to call when an error occurs.
6541 <Type name="ErrorCallback" nullable="nullable"/>
6545 <RaiseException name="WebAPIException">
6548 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6554 <Operation name="getAppInfo" id="::Application::ApplicationManager::getAppInfo">
6555 <webidl> <ref>ApplicationInformation</ref> getAppInfo(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);</webidl>
6558 Gets application information for a specified application ID.
6562 If the ID is set to <var>null</var> or not set at all, it returns application information for the current application.
6563 The list of installed applications and their application IDs is obtained with <em>getAppsInfo()</em>.
6569 <Code> var appInfo = tizen.application.getAppInfo(null);
6570 console.log("Current application name : " + appInfo.name);
6573 <Type name="ApplicationInformation">
6576 ApplicationInformation The information of an application.
6581 <Argument optional="optional" name="id">
6584 A string representing application ID. If the ID is not provided, the application information of the calling application will be returned.
6587 <Type name="ApplicationId" nullable="nullable"/>
6591 <RaiseException name="WebAPIException">
6594 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6597 with error type NotFoundError, if the application is not found with specified ID.
6600 with error type UnknownError, if the application cannot be retrieved because of an unknown error.
6606 <Operation name="getAppCerts" id="::Application::ApplicationManager::getAppCerts">
6607 <webidl> <ref>ApplicationCertificate</ref>[] getAppCerts(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);</webidl>
6610 Gets application certificates for a specified application ID.
6614 If the ID is set to <var>null</var> or not set at all, it returns application certificates for the current application.
6617 The certificate types are listed below
6621 AUTHOR_ROOT - Author Root Certificate </li>
6623 AUTHOR_INTERMEDIATE - Author Intermediate Certificate </li>
6625 AUTHOR_SIGNER - Author Signer Certificate </li>
6627 DISTRIBUTOR_ROOT - Distributor Root Certificate </li>
6629 DISTRIBUTOR_INTERMEDIATE - Distributor Intermediate Certificate </li>
6631 DISTRIBUTOR_SIGNER - Distributor Signer Certificate </li>
6633 DISTRIBUTOR2_ROOT - Distributor2 Root Certificate </li>
6635 DISTRIBUTOR2_INTERMEDIATE - Distributor2 Intermediate Certificate </li>
6637 DISTRIBUTOR2_SIGNER - Distributor2 Signer Certificate </li>
6647 http://tizen.org/privilege/appmanager.certificate
6649 <Code> var appCerts = tizen.application.getAppCerts(null);
6651 for (var i = 0; i < appCerts.length; i++) {
6652 console.log("#" + i + " type:" + appCerts[i].type);
6653 console.log("#" + i + " value:" + appCerts[i].value);
6660 ApplicationCertificate[] Array of certificate information of a specified application
6663 <Type name="ApplicationCertificate"/>
6666 <Argument optional="optional" name="id">
6669 A string representing application ID. If the ID is not provided, the application certificate of the calling application will be returned.
6672 <Type name="ApplicationId" nullable="nullable"/>
6676 <RaiseException name="WebAPIException">
6679 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6682 with error type SecurityError, if the application does not have the privilege to call this method.
6685 with error type NotFoundError, if the application is not found with specified ID.
6688 with error type UnknownError, if the application cannot be retrieved because of an unknown error.
6694 <Operation name="getAppSharedURI" id="::Application::ApplicationManager::getAppSharedURI">
6695 <webidl> DOMString getAppSharedURI(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);</webidl>
6698 Gets URI of read-only shared directory of application for a specified application ID.
6702 The shared directory is used to export data to other applications.
6703 If the ID is set to <var>null</var> or not set at all, it returns shared directory URI for the current application.
6709 <Code> var sharedDir = tizen.application.getAppSharedURI(null);
6710 console.log("shared directory : " + sharedDir);
6713 <Type type="DOMString">
6716 DOMString The shared directory URI of application
6721 <Argument optional="optional" name="id">
6724 A string representing application ID. If the ID is not provided, the shared directory URI of the calling application will be returned.
6727 <Type name="ApplicationId" nullable="nullable"/>
6731 <RaiseException name="WebAPIException">
6734 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6737 with error type NotFoundError, if the application is not found with specified ID.
6740 with error type UnknownError, if the application cannot be retrieved because of an unknown error.
6746 <Operation name="getAppMetaData" id="::Application::ApplicationManager::getAppMetaData">
6747 <webidl> <ref>ApplicationMetaData</ref>[] getAppMetaData(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);</webidl>
6750 Gets application meta data array for a specified application ID.
6754 If the ID is set to <var>null</var> or not set at all, it returns application meta data array for the current application.
6764 http://tizen.org/privilege/application.info
6766 <Code> var metaDataArray = tizen.application.getAppMetaData(null);
6767 console.log("size of metadata : " + metaDataArray.length);
6774 ApplicationMetaData[] Array of meta data of a specified application. If there are no meta data for a specified application,
6775 empty array will be returned
6778 <Type name="ApplicationMetaData"/>
6781 <Argument optional="optional" name="id">
6784 A string representing application ID. If the ID is not provided, the application metadata array of the calling application will be returned.
6787 <Type name="ApplicationId" nullable="nullable"/>
6791 <RaiseException name="WebAPIException">
6794 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6797 with error type SecurityError, if the application does not have the privilege to call this method.
6800 with error type NotFoundError, if the application is not found with specified ID.
6803 with error type UnknownError, if the application cannot be retrieved because of an unknown error.
6809 <Operation name="addAppInfoEventListener" id="::Application::ApplicationManager::addAppInfoEventListener">
6810 <webidl> long addAppInfoEventListener(<ref>ApplicationInformationEventCallback</ref> eventCallback) raises(<ref>WebAPIException</ref>);</webidl>
6813 Adds a listener for receiving any notification for changes in the list of the installed applications
6818 It install a callback that is triggered every time a change occurs on
6819 the list of installed applications on a device. This change may
6820 be occurred by a new installation, uninstallation, or update of an application.
6823 When executed, the implementation must immediately return a listener
6824 ID that identifies the listener. After returning the ID, the change
6825 detection operation is started asynchronously.
6828 The <em>ApplicationInformationEventCallback </em>must be invoked every time a new
6829 application is installed, removed, or updated.
6832 The change detection must continue until the <em>removeAppInfoEventListener()</em> method is called
6833 with the corresponding listener identifier.
6839 <Code> var appEventCallback = {
6840 oninstalled: function(appInfo) {
6841 console.log('The application ' + appInfo.name + ' is installed');
6843 onupdated: function(appInfo) {
6844 console.log('The application ' + appInfo.name + ' is updated');
6846 onuninstalled: function(appid) {
6847 console.log('The application ' + appid + ' is uninstalled');
6850 var watchId = tizen.application.addAppInfoEventListener(appEventCallback);
6856 long ID of the listener that can be used to remove the listener later.
6861 <Argument name="eventCallback">
6864 The method to call when a change on the installed applications is made.
6867 <Type name="ApplicationInformationEventCallback"/>
6871 <RaiseException name="WebAPIException">
6874 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6877 with error type UnknownError, if fails to add listener because of an unknown error.
6883 <Operation name="removeAppInfoEventListener" id="::Application::ApplicationManager::removeAppInfoEventListener">
6884 <webidl> void removeAppInfoEventListener(long watchId) raises(<ref>WebAPIException</ref>);</webidl>
6887 Removes the listener to stop receiving notifications for changes on the list of installed
6888 applications on a device.
6893 <Code> tizen.application.removeAppInfoEventListener(watchId);
6898 <Argument name="watchId">
6901 An ID that identifies the listener.
6908 <RaiseException name="WebAPIException">
6911 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6914 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
6917 with error type NotFoundError, if the listener is not found with specified ID.
6920 with error type UnknownError, if fails to remove listener because of an unknown error.
6927 <Interface name="Application" id="::Application::Application">
6928 <webidl> [NoInterfaceObject] interface Application {
6930 readonly attribute <ref>ApplicationInformation</ref> appInfo;
6932 readonly attribute <ref>ApplicationContextId</ref> contextId;
6934 void exit() raises(<ref>WebAPIException</ref>);
6936 void hide() raises(<ref>WebAPIException</ref>);
6938 <ref>RequestedApplicationControl</ref> getRequestedAppControl() raises(<ref>WebAPIException</ref>);
6942 This interface defines the current application's information and
6943 the basic operations (such as exit or hide) for the current application .
6949 <ExtendedAttributeList>
6950 <ExtendedAttribute name="NoInterfaceObject">
6951 <webidl>NoInterfaceObject</webidl>
6952 </ExtendedAttribute>
6953 </ExtendedAttributeList>
6954 <Attribute readonly="readonly" name="appInfo" id="::Application::Application::appInfo">
6955 <webidl> readonly attribute <ref>ApplicationInformation</ref> appInfo;</webidl>
6958 An attribute to store the application information for the current application.
6964 <Type name="ApplicationInformation"/>
6966 <Attribute readonly="readonly" name="contextId" id="::Application::Application::contextId">
6967 <webidl> readonly attribute <ref>ApplicationContextId</ref> contextId;</webidl>
6970 An attribute to store the ID of a running application.
6976 <Type name="ApplicationContextId"/>
6978 <Operation name="exit" id="::Application::Application::exit">
6979 <webidl> void exit() raises(<ref>WebAPIException</ref>);</webidl>
6982 Exits the current application.
6987 <Code> var app = tizen.application.getCurrentApplication();
6995 <RaiseException name="WebAPIException">
6998 with error type UnknownError, if any other error occurs.
7004 <Operation name="hide" id="::Application::Application::hide">
7005 <webidl> void hide() raises(<ref>WebAPIException</ref>);</webidl>
7008 Hides the current application.
7013 <Code> var app = tizen.application.getCurrentApplication();
7021 <RaiseException name="WebAPIException">
7024 with error type UnknownError, if any other error occurs.
7030 <Operation name="getRequestedAppControl" id="::Application::Application::getRequestedAppControl">
7031 <webidl> <ref>RequestedApplicationControl</ref> getRequestedAppControl() raises(<ref>WebAPIException</ref>);</webidl>
7034 Gets the requested application control passed to the current application.
7038 Gets the requested application control that contains the application control
7039 passed by the <em>launchAppControl()</em> method from the calling application.
7040 The requested application control contains the reason the application
7041 was launched and what it has to perform. For example, an application
7042 might be launched to display an image on a page by other
7043 application's request. In all of these cases, the application is
7044 responsible for checking the contents of the application control and responding
7045 appropriately when it is launched.
7051 <Code> var reqAppControl = tizen.application.getCurrentApplication().getRequestedAppControl();
7053 if (reqAppControl) {
7054 console.log("Requester AppID : " + reqAppControl.callerAppId);
7058 <Type name="RequestedApplicationControl">
7061 RequestedApplicationControl The details of an requested application control
7067 <RaiseException name="WebAPIException">
7070 with error type UnknownError, if the application control cannot be retrieved because of an unknown error.
7077 <Interface name="ApplicationInformation" id="::Application::ApplicationInformation">
7078 <webidl> [NoInterfaceObject] interface ApplicationInformation {
7080 readonly attribute <ref>ApplicationId</ref> id;
7082 readonly attribute DOMString name;
7084 readonly attribute DOMString iconPath;
7086 readonly attribute DOMString version;
7088 readonly attribute boolean show;
7090 readonly attribute DOMString[] categories;
7092 readonly attribute Date installDate;
7094 readonly attribute long size raises(<ref>WebAPIException</ref>);
7096 readonly attribute <ref>PackageId</ref> packageId;
7100 This interface defines the general information available to an installed application.
7106 <ExtendedAttributeList>
7107 <ExtendedAttribute name="NoInterfaceObject">
7108 <webidl>NoInterfaceObject</webidl>
7109 </ExtendedAttribute>
7110 </ExtendedAttributeList>
7111 <Attribute readonly="readonly" name="id" id="::Application::ApplicationInformation::id">
7112 <webidl> readonly attribute <ref>ApplicationId</ref> id;</webidl>
7115 An attribute to store the identifier of an application for application management.
7121 <Type name="ApplicationId"/>
7123 <Attribute readonly="readonly" name="name" id="::Application::ApplicationInformation::name">
7124 <webidl> readonly attribute DOMString name;</webidl>
7127 An attribute to store the name of an application.
7133 <Type type="DOMString"/>
7135 <Attribute readonly="readonly" name="iconPath" id="::Application::ApplicationInformation::iconPath">
7136 <webidl> readonly attribute DOMString iconPath;</webidl>
7139 An attribute to store the icon path of an application.
7145 <Type type="DOMString"/>
7147 <Attribute readonly="readonly" name="version" id="::Application::ApplicationInformation::version">
7148 <webidl> readonly attribute DOMString version;</webidl>
7151 An attribute to store the version of an application.
7157 <Type type="DOMString"/>
7159 <Attribute readonly="readonly" name="show" id="::Application::ApplicationInformation::show">
7160 <webidl> readonly attribute boolean show;</webidl>
7163 An attribute that determines whether the application information should
7164 be shown (such as in the menus) or not.
7170 <Type type="boolean"/>
7172 <Attribute readonly="readonly" name="categories" id="::Application::ApplicationInformation::categories">
7173 <webidl> readonly attribute DOMString[] categories;</webidl>
7176 An array of attributes to store the categories that the app belongs to.
7183 <Type type="DOMString"/>
7186 <Attribute readonly="readonly" name="installDate" id="::Application::ApplicationInformation::installDate">
7187 <webidl> readonly attribute Date installDate;</webidl>
7190 An attribute to store the application install/update time.
7198 <Attribute readonly="readonly" name="size" id="::Application::ApplicationInformation::size">
7199 <webidl> readonly attribute long size raises(<ref>WebAPIException</ref>);</webidl>
7202 An attribute to store the application size (installed space).
7211 http://tizen.org/privilege/application.info
7216 <RaiseException name="WebAPIException">
7219 with error type SecurityError, if this attribute is not allowed.
7225 <Attribute readonly="readonly" name="packageId" id="::Application::ApplicationInformation::packageId">
7226 <webidl> readonly attribute <ref>PackageId</ref> packageId;</webidl>
7229 An attribute to store the package ID of application.
7235 <Type name="PackageId"/>
7238 <Interface name="ApplicationContext" id="::Application::ApplicationContext">
7239 <webidl> [NoInterfaceObject] interface ApplicationContext {
7241 readonly attribute <ref>ApplicationContextId</ref> id;
7243 readonly attribute <ref>ApplicationId</ref> appId;
7248 This interface defines the information available about a running
7255 <ExtendedAttributeList>
7256 <ExtendedAttribute name="NoInterfaceObject">
7257 <webidl>NoInterfaceObject</webidl>
7258 </ExtendedAttribute>
7259 </ExtendedAttributeList>
7260 <Attribute readonly="readonly" name="id" id="::Application::ApplicationContext::id">
7261 <webidl> readonly attribute <ref>ApplicationContextId</ref> id;</webidl>
7264 An attribute to store the ID of a running application.
7270 <Type name="ApplicationContextId"/>
7272 <Attribute readonly="readonly" name="appId" id="::Application::ApplicationContext::appId">
7273 <webidl> readonly attribute <ref>ApplicationId</ref> appId;</webidl>
7276 An attribute to store the ID of an installed application.
7282 <Type name="ApplicationId"/>
7285 <Interface name="ApplicationControlData" id="::Application::ApplicationControlData">
7286 <webidl> [Constructor(DOMString key, DOMString[] value)]
7287 interface ApplicationControlData {
7289 attribute DOMString key;
7291 attribute DOMString[] value;
7296 This interface defines a key/value pair used to pass data
7297 between applications through the <em>ApplicationControl </em>interface.
7302 <Code> var appControlData = new tizen.ApplicationControlData("image", [imagedata1]);
7305 <ExtendedAttributeList>
7306 <ExtendedAttribute name="Constructor">
7307 <webidl>Constructor(DOMString key, DOMString[] value)</webidl>
7309 <Argument name="key">
7310 <Type type="DOMString"/>
7312 <Argument name="value">
7314 <Type type="DOMString"/>
7318 </ExtendedAttribute>
7319 </ExtendedAttributeList>
7320 <Attribute name="key" id="::Application::ApplicationControlData::key">
7321 <webidl> attribute DOMString key;</webidl>
7324 An attribute to store the name of a key.
7330 <Type type="DOMString"/>
7332 <Attribute name="value" id="::Application::ApplicationControlData::value">
7333 <webidl> attribute DOMString[] value;</webidl>
7336 An attribute to store the value associated with a key.
7343 <Type type="DOMString"/>
7347 <Interface name="ApplicationControl" id="::Application::ApplicationControl">
7348 <webidl> [Constructor(DOMString operation, optional DOMString? uri,
7349 optional DOMString? mime, optional DOMString? category,
7350 optional <ref>ApplicationControlData</ref>[]? data)]
7351 interface ApplicationControl {
7353 attribute DOMString operation;
7355 attribute DOMString? uri;
7357 attribute DOMString? mime;
7359 attribute DOMString? category;
7361 attribute <ref>ApplicationControlData</ref>[] data;
7366 This interface consists of an operation, URI, MIME type,
7367 and data. It describes an action to be performed by other applications
7368 and is passed to launch other applications.
7369 If the system gets the application control request, it finds
7370 the corresponding application to be launched with the delivered application control
7371 and launches the selected application.
7376 <Code> var appControl =
7377 new tizen.ApplicationControl(
7378 "http://tizen.org/appcontrol/operation/view",
7380 "image/jpeg",
7382 [new tizen.ApplicationControlData("images",
7383 [imagedata1, imagedata2])] );
7386 <ExtendedAttributeList>
7387 <ExtendedAttribute name="Constructor">
7388 <webidl>Constructor(DOMString operation, optional DOMString? uri,
7389 optional DOMString? mime, optional DOMString? category,
7390 optional <ref>ApplicationControlData</ref>[]? data)</webidl>
7392 <Argument name="operation">
7393 <Type type="DOMString"/>
7395 <Argument optional="optional" name="uri">
7396 <Type type="DOMString" nullable="nullable"/>
7398 <Argument optional="optional" name="mime">
7399 <Type type="DOMString" nullable="nullable"/>
7401 <Argument optional="optional" name="category">
7402 <Type type="DOMString" nullable="nullable"/>
7404 <Argument optional="optional" name="data">
7405 <Type type="array" nullable="nullable">
7406 <Type name="ApplicationControlData"/>
7410 </ExtendedAttribute>
7411 </ExtendedAttributeList>
7412 <Attribute name="operation" id="::Application::ApplicationControl::operation">
7413 <webidl> attribute DOMString operation;</webidl>
7416 An attribute to store the string that defines the action to be
7417 performed by an application control.
7423 <Type type="DOMString"/>
7425 <Attribute name="uri" id="::Application::ApplicationControl::uri">
7426 <webidl> attribute DOMString? uri;</webidl>
7429 An attribute to store the URI needed by application control.
7435 <Type type="DOMString" nullable="nullable"/>
7437 <Attribute name="mime" id="::Application::ApplicationControl::mime">
7438 <webidl> attribute DOMString? mime;</webidl>
7441 An attribute to store the MIME type of a content.
7447 <Type type="DOMString" nullable="nullable"/>
7449 <Attribute name="category" id="::Application::ApplicationControl::category">
7450 <webidl> attribute DOMString? category;</webidl>
7453 An attribute to store the category of the application to be launched.
7459 <Type type="DOMString" nullable="nullable"/>
7461 <Attribute name="data" id="::Application::ApplicationControl::data">
7462 <webidl> attribute <ref>ApplicationControlData</ref>[] data;</webidl>
7465 An array of attributes to store the data needed for an application control.
7472 <Type name="ApplicationControlData"/>
7476 <Interface name="RequestedApplicationControl" id="::Application::RequestedApplicationControl">
7477 <webidl> [NoInterfaceObject] interface RequestedApplicationControl {
7479 readonly attribute <ref>ApplicationControl</ref> appControl;
7481 readonly attribute <ref>ApplicationId</ref> callerAppId;
7483 void replyResult(optional <ref>ApplicationControlData</ref>[]? data) raises(<ref>WebAPIException</ref>);
7485 void replyFailure() raises(<ref>WebAPIException</ref>);
7490 This interface has an application control information requested and passed
7491 from other application and is passed to launch other applications. The newly
7492 launched application can get the requested application control through <em>getRequestedAppControl()</em> method, and send the results
7493 to the calling application through the <em>replyResult()</em> method after performing the
7494 required action requested the calling application.
7499 <Code> var reqAppControl = tizen.application.getCurrentApplication().getRequestedAppControl();
7500 if (reqAppControl) {
7501 console.log("Requester AppID : " + reqAppControl.callerAppId);
7503 var appControl = reqAppControl.appControl;
7504 if (appControl.operation == "http://tizen.org/appcontrol/operation/pick") {
7505 var data = new tizen.ApplicationControlData("http://tizen.org/appcontrol/data/selected", ["Image1.jpg"]);
7506 reqAppControl.replyResult([data]);
7511 <ExtendedAttributeList>
7512 <ExtendedAttribute name="NoInterfaceObject">
7513 <webidl>NoInterfaceObject</webidl>
7514 </ExtendedAttribute>
7515 </ExtendedAttributeList>
7516 <Attribute readonly="readonly" name="appControl" id="::Application::RequestedApplicationControl::appControl">
7517 <webidl> readonly attribute <ref>ApplicationControl</ref> appControl;</webidl>
7520 An attribute to store the application control object that describes caller application's request.
7521 It contains the information that the calling application passed to <em>launchAppControl</em>.
7527 <Type name="ApplicationControl"/>
7529 <Attribute readonly="readonly" name="callerAppId" id="::Application::RequestedApplicationControl::callerAppId">
7530 <webidl> readonly attribute <ref>ApplicationId</ref> callerAppId;</webidl>
7533 An attribute to store the caller application's ID
7539 <Type name="ApplicationId"/>
7541 <Operation name="replyResult" id="::Application::RequestedApplicationControl::replyResult">
7542 <webidl> void replyResult(optional <ref>ApplicationControlData</ref>[]? data) raises(<ref>WebAPIException</ref>);</webidl>
7545 Sends the results to the caller application.
7553 <Argument optional="optional" name="data">
7556 An array of ApplicationControlData objects.
7559 <Type type="array" nullable="nullable">
7560 <Type name="ApplicationControlData"/>
7565 <RaiseException name="WebAPIException">
7568 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
7571 with error type NotFoundError, if the caller app is not alive or there is no response from the caller app
7574 with error type UnknownError, if the reply request fails because of an unknown error
7580 <Operation name="replyFailure" id="::Application::RequestedApplicationControl::replyFailure">
7581 <webidl> void replyFailure() raises(<ref>WebAPIException</ref>);</webidl>
7584 Notifies the calling application that the application failed
7585 to perform the requested action.
7594 <RaiseException name="WebAPIException">
7597 with error type NotFoundError, if the caller app is not alive or there is no response from the caller app
7600 with error type UnknownError, if the reply request fails because of an unknown error
7607 <Interface name="ApplicationCertificate" id="::Application::ApplicationCertificate">
7608 <webidl> [NoInterfaceObject] interface ApplicationCertificate {
7610 readonly attribute DOMString type;
7612 readonly attribute DOMString value;
7617 This interface defines the certificate information of an installed application.
7623 <ExtendedAttributeList>
7624 <ExtendedAttribute name="NoInterfaceObject">
7625 <webidl>NoInterfaceObject</webidl>
7626 </ExtendedAttribute>
7627 </ExtendedAttributeList>
7628 <Attribute readonly="readonly" name="type" id="::Application::ApplicationCertificate::type">
7629 <webidl> readonly attribute DOMString type;</webidl>
7632 An attribute to store the type of the application certificate.
7638 <Type type="DOMString"/>
7640 <Attribute readonly="readonly" name="value" id="::Application::ApplicationCertificate::value">
7641 <webidl> readonly attribute DOMString value;</webidl>
7644 An attribute to store the value of the application certificate.
7650 <Type type="DOMString"/>
7653 <Interface name="ApplicationMetaData" id="::Application::ApplicationMetaData">
7654 <webidl> [NoInterfaceObject] interface ApplicationMetaData {
7656 readonly attribute DOMString key;
7658 readonly attribute DOMString value;
7663 This interface defines the meta data of an installed application.
7669 <ExtendedAttributeList>
7670 <ExtendedAttribute name="NoInterfaceObject">
7671 <webidl>NoInterfaceObject</webidl>
7672 </ExtendedAttribute>
7673 </ExtendedAttributeList>
7674 <Attribute readonly="readonly" name="key" id="::Application::ApplicationMetaData::key">
7675 <webidl> readonly attribute DOMString key;</webidl>
7678 An attribute to store the key of the application meta data.
7684 <Type type="DOMString"/>
7686 <Attribute readonly="readonly" name="value" id="::Application::ApplicationMetaData::value">
7687 <webidl> readonly attribute DOMString value;</webidl>
7690 An attribute to store the value of the application meta data.
7696 <Type type="DOMString"/>
7699 <Interface name="ApplicationInformationArraySuccessCallback" id="::Application::ApplicationInformationArraySuccessCallback">
7700 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ApplicationInformationArraySuccessCallback {
7701 void onsuccess(<ref>ApplicationInformation</ref>[] informationArray);
7705 This interface invokes the success callback that is invoked when the installed application list is retrieved.
7709 This callback interface specifies a success method with an array of
7710 <em>ApplicationInformation </em>objects as an input parameter. It is used in <em>ApplicationManager.getAppsInfo()</em>.
7717 <ExtendedAttributeList>
7718 <ExtendedAttribute name="Callback" value="FunctionOnly">
7719 <webidl>Callback</webidl>
7720 </ExtendedAttribute>
7721 <ExtendedAttribute name="NoInterfaceObject">
7722 <webidl> NoInterfaceObject</webidl>
7723 </ExtendedAttribute>
7724 </ExtendedAttributeList>
7725 <Operation name="onsuccess" id="::Application::ApplicationInformationArraySuccessCallback::onsuccess">
7726 <webidl> void onsuccess(<ref>ApplicationInformation</ref>[] informationArray);</webidl>
7729 Called when the asynchronous call completes successfully.
7737 <Argument name="informationArray">
7740 A list of installed applications.
7744 <Type name="ApplicationInformation"/>
7750 <Interface name="FindAppControlSuccessCallback" id="::Application::FindAppControlSuccessCallback">
7751 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface FindAppControlSuccessCallback {
7752 void onsuccess(<ref>ApplicationInformation</ref>[] informationArray, <ref>ApplicationControl</ref> appControl);
7756 This interface specified a success callback that is invoked when system finished searching applications which is matched by specific application control .
7760 This callback interface specifies a success method with an array of
7761 <em>ApplicationInformation </em>objects and application control as an input parameter.
7762 It is used in <em>ApplicationManager.findAppControl()</em>.
7769 <ExtendedAttributeList>
7770 <ExtendedAttribute name="Callback" value="FunctionOnly">
7771 <webidl>Callback</webidl>
7772 </ExtendedAttribute>
7773 <ExtendedAttribute name="NoInterfaceObject">
7774 <webidl> NoInterfaceObject</webidl>
7775 </ExtendedAttribute>
7776 </ExtendedAttributeList>
7777 <Operation name="onsuccess" id="::Application::FindAppControlSuccessCallback::onsuccess">
7778 <webidl> void onsuccess(<ref>ApplicationInformation</ref>[] informationArray, <ref>ApplicationControl</ref> appControl);</webidl>
7781 Called when the asynchronous call completes successfully.
7789 <Argument name="informationArray">
7792 A list of installed applications.
7796 <Type name="ApplicationInformation"/>
7799 <Argument name="appControl">
7802 The application control which were passed on <em>ApplicationManager.findAppControl()</em>.
7805 <Type name="ApplicationControl"/>
7810 <Interface name="ApplicationContextArraySuccessCallback" id="::Application::ApplicationContextArraySuccessCallback">
7811 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ApplicationContextArraySuccessCallback {
7812 void onsuccess(<ref>ApplicationContext</ref>[] contexts);
7816 This callback interface that specifies the success callback that is invoked when the list of running applications is retrieved.
7820 This callback interface specifies a success method with
7821 an array of <em>ApplicationContext </em>objects as an input parameter. It is used in <em>ApplicationManager.getAppsContext()</em>.
7828 <ExtendedAttributeList>
7829 <ExtendedAttribute name="Callback" value="FunctionOnly">
7830 <webidl>Callback</webidl>
7831 </ExtendedAttribute>
7832 <ExtendedAttribute name="NoInterfaceObject">
7833 <webidl> NoInterfaceObject</webidl>
7834 </ExtendedAttribute>
7835 </ExtendedAttributeList>
7836 <Operation name="onsuccess" id="::Application::ApplicationContextArraySuccessCallback::onsuccess">
7837 <webidl> void onsuccess(<ref>ApplicationContext</ref>[] contexts);</webidl>
7840 Called when <em>ApplicationManager.getAppsContext() </em>completes successfully.
7848 <Argument name="contexts">
7851 A list of running applications.
7855 <Type name="ApplicationContext"/>
7861 <Interface name="ApplicationControlDataArrayReplyCallback" id="::Application::ApplicationControlDataArrayReplyCallback">
7862 <webidl> [Callback, NoInterfaceObject] interface ApplicationControlDataArrayReplyCallback {
7863 void onsuccess(optional <ref>ApplicationControlData</ref>[]? data);
7869 This callback interface specifies success callbacks that are invoked as a reply from the requested application control within the application control requester.
7873 This callback interface specifies two methods:
7877 <em>onsuccess()</em> - Invoked by the callee application calls <em>RequestedApplicationControl.replyResult()</em>. </li>
7879 <em>onfailure()</em> - Invoked if the callee application calls <em>RequestedApplicationControl.replyFailure()</em>. </li>
7886 <ExtendedAttributeList>
7887 <ExtendedAttribute name="Callback">
7888 <webidl>Callback</webidl>
7889 </ExtendedAttribute>
7890 <ExtendedAttribute name="NoInterfaceObject">
7891 <webidl> NoInterfaceObject</webidl>
7892 </ExtendedAttribute>
7893 </ExtendedAttributeList>
7894 <Operation name="onsuccess" id="::Application::ApplicationControlDataArrayReplyCallback::onsuccess">
7895 <webidl> void onsuccess(optional <ref>ApplicationControlData</ref>[]? data);</webidl>
7898 Called when the callee application calls <em>RequestedApplicationControl.replyResult()</em>.
7906 <Argument optional="optional" name="data">
7909 An array of <em>ApplicationControlData </em>objects.
7912 <Type type="array" nullable="nullable">
7913 <Type name="ApplicationControlData"/>
7918 <Operation name="onfailure" id="::Application::ApplicationControlDataArrayReplyCallback::onfailure">
7919 <webidl> void onfailure();</webidl>
7922 Called when the callee application calls <em>RequestedApplicationControl.replyFailure()</em>.
7932 <Interface name="ApplicationInformationEventCallback" id="::Application::ApplicationInformationEventCallback">
7933 <webidl> [Callback, NoInterfaceObject] interface ApplicationInformationEventCallback {
7934 void oninstalled(<ref>ApplicationInformation</ref> info);
7936 void onupdated(<ref>ApplicationInformation</ref> info);
7938 void onuninstalled(<ref>ApplicationId</ref> id);
7942 The callback interface to specify for subscribing for notification of changes in the list of installed
7943 applications on a device.
7947 This callback interface specifies methods that will be invoked when
7948 an application is installed, updated, or uninstalled.
7955 <ExtendedAttributeList>
7956 <ExtendedAttribute name="Callback">
7957 <webidl>Callback</webidl>
7958 </ExtendedAttribute>
7959 <ExtendedAttribute name="NoInterfaceObject">
7960 <webidl> NoInterfaceObject</webidl>
7961 </ExtendedAttribute>
7962 </ExtendedAttributeList>
7963 <Operation name="oninstalled" id="::Application::ApplicationInformationEventCallback::oninstalled">
7964 <webidl> void oninstalled(<ref>ApplicationInformation</ref> info);</webidl>
7967 Called when an application is installed.
7975 <Argument name="info">
7978 The application information of the installed application.
7981 <Type name="ApplicationInformation"/>
7985 <Operation name="onupdated" id="::Application::ApplicationInformationEventCallback::onupdated">
7986 <webidl> void onupdated(<ref>ApplicationInformation</ref> info);</webidl>
7989 Called when an application is updated.
7997 <Argument name="info">
8000 The application information of the updated application.
8003 <Type name="ApplicationInformation"/>
8007 <Operation name="onuninstalled" id="::Application::ApplicationInformationEventCallback::onuninstalled">
8008 <webidl> void onuninstalled(<ref>ApplicationId</ref> id);</webidl>
8011 Called when an application is uninstalled.
8019 <Argument name="id">
8022 The ID of the uninstalled application.
8025 <Type name="ApplicationId"/>
8031 <Module name="Bluetooth" id="::Bluetooth">
8032 <webidl>module Bluetooth {
8033 typedef DOMString BluetoothAddress;
8035 typedef DOMString BluetoothUUID;
8037 enum BluetoothSocketState { "CLOSED", "OPEN" };
8039 enum BluetoothProfileType { "HEALTH" };
8041 enum BluetoothHealthChannelType { "RELIABLE", "STREAMING" };
8043 [NoInterfaceObject] interface BluetoothManagerObject {
8044 readonly attribute <ref>BluetoothManager</ref> bluetooth;
8046 <ref>Tizen</ref> implements <ref>BluetoothManagerObject</ref>;
8048 [NoInterfaceObject] interface BluetoothManager {
8049 readonly attribute <ref>BluetoothClassDeviceMajor</ref> deviceMajor;
8050 readonly attribute <ref>BluetoothClassDeviceMinor</ref> deviceMinor;
8051 readonly attribute <ref>BluetoothClassDeviceService</ref> deviceService;
8052 <ref>BluetoothAdapter</ref> getDefaultAdapter() raises(<ref>WebAPIException</ref>);
8056 [NoInterfaceObject] interface BluetoothAdapter {
8057 readonly attribute DOMString name;
8058 readonly attribute <ref>BluetoothAddress</ref> address;
8059 readonly attribute boolean powered;
8060 readonly attribute boolean visible;
8062 void setName(DOMString name,
8063 optional <ref>SuccessCallback</ref>? successCallback,
8064 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8066 void setPowered(boolean state,
8067 optional <ref>SuccessCallback</ref>? successCallback,
8068 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8070 void setVisible(boolean mode,
8071 optional <ref>SuccessCallback</ref>? successCallback,
8072 optional <ref>ErrorCallback</ref>? errorCallback,
8073 optional unsigned short? timeout) raises(<ref>WebAPIException</ref>);
8075 void setChangeListener(<ref>BluetoothAdapterChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);
8077 void unsetChangeListener() raises(<ref>WebAPIException</ref>);
8079 void discoverDevices(<ref>BluetoothDiscoverDevicesSuccessCallback</ref> successCallback,
8080 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8082 void stopDiscovery(optional <ref>SuccessCallback</ref>? successCallback,
8083 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8085 void getKnownDevices(<ref>BluetoothDeviceArraySuccessCallback</ref> successCallback,
8086 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8091 void getDevice(<ref>BluetoothAddress</ref> address,
8092 <ref>BluetoothDeviceSuccessCallback</ref> successCallback,
8093 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8098 void createBonding(<ref>BluetoothAddress</ref> address,
8099 <ref>BluetoothDeviceSuccessCallback</ref> successCallback,
8100 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8102 void destroyBonding(<ref>BluetoothAddress</ref> address,
8103 optional <ref>SuccessCallback</ref>? successCallback,
8104 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8108 void registerRFCOMMServiceByUUID(<ref>BluetoothUUID</ref> uuid,
8110 <ref>BluetoothServiceSuccessCallback</ref> successCallback,
8111 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8113 <ref>BluetoothProfileHandler</ref> getBluetoothProfileHandler(<ref>BluetoothProfileType</ref> profileType) raises(<ref>WebAPIException</ref>);
8116 [NoInterfaceObject] interface BluetoothDevice {
8117 readonly attribute DOMString name;
8118 readonly attribute <ref>BluetoothAddress</ref> address;
8119 readonly attribute <ref>BluetoothClass</ref> deviceClass;
8120 readonly attribute boolean isBonded;
8121 readonly attribute boolean isTrusted;
8122 readonly attribute boolean isConnected;
8123 readonly attribute <ref>BluetoothUUID</ref>[] uuids;
8125 void connectToServiceByUUID(<ref>BluetoothUUID</ref> uuid,
8126 <ref>BluetoothSocketSuccessCallback</ref> successCallback,
8127 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8129 [NoInterfaceObject] interface BluetoothSocket {
8130 readonly attribute <ref>BluetoothUUID</ref> uuid;
8131 readonly attribute <ref>BluetoothSocketState</ref> state;
8132 readonly attribute <ref>BluetoothDevice</ref> peer;
8133 [TreatNonCallableAsNull] attribute <ref>SuccessCallback</ref>? onmessage raises(<ref>WebAPIException</ref>);
8134 [TreatNonCallableAsNull] attribute <ref>SuccessCallback</ref>? onclose raises(<ref>WebAPIException</ref>);
8135 unsigned long writeData(byte[] data) raises(<ref>WebAPIException</ref>);
8138 byte[] readData() raises(<ref>WebAPIException</ref>);
8141 void close() raises(<ref>WebAPIException</ref>);
8144 [NoInterfaceObject] interface BluetoothClass {
8145 readonly attribute octet major;
8147 readonly attribute octet minor;
8149 readonly attribute unsigned short [] services ;
8151 boolean hasService(unsigned short service) raises(<ref>WebAPIException</ref>);
8154 [NoInterfaceObject] interface BluetoothClassDeviceMajor {
8156 const octet MISC = 0x00;
8157 const octet COMPUTER = 0x01;
8158 const octet PHONE = 0x02;
8159 const octet NETWORK = 0x03;
8160 const octet AUDIO_VIDEO = 0x04;
8161 const octet PERIPHERAL = 0x05;
8162 const octet IMAGING = 0x06;
8163 const octet WEARABLE = 0x07;
8164 const octet TOY = 0x08;
8165 const octet HEALTH = 0x09;
8166 const octet UNCATEGORIZED = 0x1F;
8169 [NoInterfaceObject] interface BluetoothClassDeviceMinor {
8170 const octet COMPUTER_UNCATEGORIZED = 0x00;
8171 const octet COMPUTER_DESKTOP = 0x01;
8172 const octet COMPUTER_SERVER = 0x02;
8173 const octet COMPUTER_LAPTOP = 0x03;
8174 const octet COMPUTER_HANDHELD_PC_OR_PDA = 0x04;
8175 const octet COMPUTER_PALM_PC_OR_PDA = 0x05;
8176 const octet COMPUTER_WEARABLE = 0x06;
8178 const octet PHONE_UNCATEGORIZED = 0x00;
8179 const octet PHONE_CELLULAR = 0x01;
8180 const octet PHONE_CORDLESS = 0x02;
8181 const octet PHONE_SMARTPHONE = 0x03;
8182 const octet PHONE_MODEM_OR_GATEWAY = 0x04;
8183 const octet PHONE_ISDN = 0x05;
8185 const octet AV_UNRECOGNIZED = 0x00;
8186 const octet AV_WEARABLE_HEADSET = 0x01;
8187 const octet AV_HANDSFREE = 0x02;
8188 const octet AV_MICROPHONE = 0x04;
8189 const octet AV_LOUDSPEAKER = 0x05;
8190 const octet AV_HEADPHONES = 0x06;
8191 const octet AV_PORTABLE_AUDIO = 0x07;
8192 const octet AV_CAR_AUDIO = 0x08;
8193 const octet AV_SETTOP_BOX = 0x09;
8194 const octet AV_HIFI = 0x0a;
8195 const octet AV_VCR = 0x0b;
8196 const octet AV_VIDEO_CAMERA = 0x0c;
8197 const octet AV_CAMCORDER = 0x0d;
8198 const octet AV_MONITOR = 0x0e;
8199 const octet AV_DISPLAY_AND_LOUDSPEAKER = 0x0f;
8200 const octet AV_VIDEO_CONFERENCING = 0x10;
8201 const octet AV_GAMING_TOY = 0x12;
8203 const octet PERIPHERAL_UNCATEGORIZED = 0;
8204 const octet PERIPHERAL_KEYBOARD = 0x10;
8205 const octet PERIPHERAL_POINTING_DEVICE = 0x20;
8206 const octet PERIPHERAL_KEYBOARD_AND_POINTING_DEVICE = 0x30;
8207 const octet PERIPHERAL_JOYSTICK = 0x01;
8208 const octet PERIPHERAL_GAMEPAD = 0x02;
8209 const octet PERIPHERAL_REMOTE_CONTROL = 0x03;
8210 const octet PERIPHERAL_SENSING_DEVICE = 0x04;
8211 const octet PERIPHERAL_DEGITIZER_TABLET = 0x05;
8212 const octet PERIPHERAL_CARD_READER = 0x06;
8213 const octet PERIPHERAL_DIGITAL_PEN = 0x07;
8214 const octet PERIPHERAL_HANDHELD_SCANNER = 0x08;
8215 const octet PERIPHERAL_HANDHELD_INPUT_DEVICE = 0x09;
8217 const octet IMAGING_UNCATEGORIZED = 0x00;
8218 const octet IMAGING_DISPLAY = 0x04;
8219 const octet IMAGING_CAMERA = 0x08;
8220 const octet IMAGING_SCANNER = 0x10;
8221 const octet IMAGING_PRINTER = 0x20;
8223 const octet WEARABLE_WRITST_WATCH = 0x01;
8224 const octet WEARABLE_PAGER = 0x02;
8225 const octet WEARABLE_JACKET = 0x03;
8226 const octet WEARABLE_HELMET = 0x04;
8227 const octet WEARABLE_GLASSES = 0x05;
8229 const octet TOY_ROBOT = 0x01;
8230 const octet TOY_VEHICLE = 0x02;
8231 const octet TOY_DOLL = 0x03;
8232 const octet TOY_CONTROLLER = 0x04;
8233 const octet TOY_GAME = 0x05;
8235 const octet HEALTH_UNDEFINED = 0x00;
8236 const octet HEALTH_BLOOD_PRESSURE_MONITOR = 0x01;
8237 const octet HEALTH_THERMOMETER = 0x02;
8238 const octet HEALTH_WEIGHING_SCALE = 0x03;
8239 const octet HEALTH_GLUCOSE_METER = 0x04;
8240 const octet HEALTH_PULSE_OXIMETER = 0x05;
8241 const octet HEALTH_PULSE_RATE_MONITOR = 0x06;
8242 const octet HEALTH_DATA_DISPLAY = 0x07;
8243 const octet HEALTH_STEP_COUNTER = 0x08;
8244 const octet HEALTH_BODY_COMPOSITION_ANALYZER = 0x09;
8245 const octet HEALTH_PEAK_FLOW_MONITOR = 0x0a;
8246 const octet HEALTH_MEDICATION_MONITOR = 0x0b;
8247 const octet HEALTH_KNEE_PROSTHESIS = 0x0c;
8248 const octet HEALTH_ANKLE_PROSTHESIS = 0x0d;
8251 [NoInterfaceObject] interface BluetoothClassDeviceService {
8252 const unsigned short LIMITED_DISCOVERABILITY = 0x0001;
8253 const unsigned short POSITIONING = 0x0008;
8254 const unsigned short NETWORKING = 0x0010;
8255 const unsigned short RENDERING = 0x0020;
8256 const unsigned short CAPTURING = 0x0040;
8257 const unsigned short OBJECT_TRANSFER = 0x0080;
8258 const unsigned short AUDIO = 0x0100;
8259 const unsigned short TELEPHONY = 0x0200;
8260 const unsigned short INFORMATION = 0x0400;
8263 [NoInterfaceObject] interface BluetoothServiceHandler {
8264 readonly attribute <ref>BluetoothUUID</ref> uuid;
8265 readonly attribute DOMString name;
8266 readonly attribute boolean isConnected;
8267 [TreatNonCallableAsNull] attribute <ref>BluetoothSocketSuccessCallback</ref>? onconnect raises(<ref>WebAPIException</ref>);
8269 void unregister(optional <ref>SuccessCallback</ref>? successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8272 [NoInterfaceObject] interface BluetoothProfileHandler {
8274 readonly attribute <ref>BluetoothProfileType</ref> profileType;
8279 [NoInterfaceObject] interface BluetoothHealthProfileHandler : <ref>BluetoothProfileHandler</ref> {
8281 void registerSinkApplication(unsigned short dataType, DOMString name, <ref>BluetoothHealthApplicationSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8283 void connectToSource(<ref>BluetoothDevice</ref> peer, <ref>BluetoothHealthApplication</ref> application, <ref>BluetoothHealthChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8288 [NoInterfaceObject] interface BluetoothHealthApplication {
8290 readonly attribute unsigned short dataType;
8292 readonly attribute DOMString name;
8294 [TreatNonCallableAsNull] attribute <ref>BluetoothHealthChannelSuccessCallback</ref>? onconnect raises(<ref>WebAPIException</ref>);
8296 void unregister(optional <ref>SuccessCallback</ref>? successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8301 [NoInterfaceObject] interface BluetoothHealthChannel {
8303 readonly attribute <ref>BluetoothDevice</ref> peer;
8305 readonly attribute <ref>BluetoothHealthChannelType</ref> channelType;
8307 readonly attribute <ref>BluetoothHealthApplication</ref> application;
8309 readonly attribute boolean isConnected;
8311 void close() raises(<ref>WebAPIException</ref>);
8313 unsigned long sendData(byte[] data) raises(<ref>WebAPIException</ref>);
8315 void setListener(<ref>BluetoothHealthChannelChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);
8317 void unsetListener() raises(<ref>WebAPIException</ref>);
8322 [Callback, NoInterfaceObject] interface BluetoothAdapterChangeCallback {
8323 void onstatechanged(boolean powered);
8324 void onnamechanged(DOMString name);
8325 void onvisibilitychanged(boolean visible);
8328 [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothDeviceSuccessCallback {
8329 void onsuccess(<ref>BluetoothDevice</ref> device);
8332 [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothDeviceArraySuccessCallback {
8333 void onsuccess(<ref>BluetoothDevice</ref>[] devices);
8336 [Callback, NoInterfaceObject] interface BluetoothDiscoverDevicesSuccessCallback {
8338 void ondevicefound(<ref>BluetoothDevice</ref> device);
8339 void ondevicedisappeared(<ref>BluetoothAddress</ref> address);
8340 void onfinished(<ref>BluetoothDevice</ref>[] foundDevices);
8343 [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothSocketSuccessCallback {
8344 void onsuccess(<ref>BluetoothSocket</ref> socket);
8347 [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothServiceSuccessCallback {
8348 void onsuccess(<ref>BluetoothServiceHandler</ref> handler);
8351 [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothHealthApplicationSuccessCallback {
8352 void onsuccess(<ref>BluetoothHealthApplication</ref> application);
8356 [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothHealthChannelSuccessCallback {
8357 void onsuccess(<ref>BluetoothHealthChannel</ref> channel);
8360 [Callback, NoInterfaceObject] interface BluetoothHealthChannelChangeCallback {
8361 void onmessage(byte[] data);
8369 This specification defines interfaces and methods to manage Bluetooth.
8373 The following Bluetooth functionalities are provided:
8377 Controls local Bluetooth device, that is, turn Bluetooth on/off, etc. </li>
8379 Sets visibility </li>
8381 Discovers nearby Bluetooth devices (Device discovery). </li>
8383 Gets bonded devices information. </li>
8385 Controls bonding. </li>
8387 Connects to a service on a remote device and exchanges data. </li>
8389 Registers a service (RFCOMM) on a local device, which can be consumed by remote devices to exchange data. </li>
8392 For more information on the Bluetooth features, see <a href="../../org.tizen.web.appprogramming/html/guide/communication_guide/bluetooth.htm">Bluetooth Guide</a>.
8398 <def-api-feature identifier="http://tizen.org/feature/network.bluetooth">
8402 To guarantee this application running on a device with Bluetooth feature, define below in the config file:
8408 <Typedef name="BluetoothAddress" id="::Bluetooth::BluetoothAddress">
8409 <webidl> typedef DOMString BluetoothAddress;</webidl>
8412 The address of a Bluetooth device.
8418 <Type type="DOMString"/>
8420 <Typedef name="BluetoothUUID" id="::Bluetooth::BluetoothUUID">
8421 <webidl> typedef DOMString BluetoothUUID;</webidl>
8424 The UUID of a Bluetooth service.
8430 <Type type="DOMString"/>
8432 <Enum name="BluetoothSocketState" id="::Bluetooth::BluetoothSocketState">
8433 <webidl> enum BluetoothSocketState { "CLOSED", "OPEN" };</webidl>
8436 The Bluetooth socket state.
8442 <EnumValue stringvalue="CLOSED">
8443 <webidl> "CLOSED</webidl>
8445 <EnumValue stringvalue="OPEN">
8446 <webidl> "OPEN</webidl>
8449 <Enum name="BluetoothProfileType" id="::Bluetooth::BluetoothProfileType">
8450 <webidl> enum BluetoothProfileType { "HEALTH" };</webidl>
8453 The Bluetooth profile.
8459 <EnumValue stringvalue="HEALTH">
8460 <webidl> "HEALTH</webidl>
8463 <Enum name="BluetoothHealthChannelType" id="::Bluetooth::BluetoothHealthChannelType">
8464 <webidl> enum BluetoothHealthChannelType { "RELIABLE", "STREAMING" };</webidl>
8467 The channel type of health device profile.
8473 <EnumValue stringvalue="RELIABLE">
8474 <webidl> "RELIABLE</webidl>
8476 <EnumValue stringvalue="STREAMING">
8477 <webidl> "STREAMING</webidl>
8480 <Interface name="BluetoothManagerObject" id="::Bluetooth::BluetoothManagerObject">
8481 <webidl> [NoInterfaceObject] interface BluetoothManagerObject {
8482 readonly attribute <ref>BluetoothManager</ref> bluetooth;
8486 This interface defines what is instantiated by the <em>Tizen</em> object from the Tizen platform.
8490 There is a <em>tizen.bluetooth</em> object that allows access to the Bluetooth API.
8497 <ExtendedAttributeList>
8498 <ExtendedAttribute name="NoInterfaceObject">
8499 <webidl>NoInterfaceObject</webidl>
8500 </ExtendedAttribute>
8501 </ExtendedAttributeList>
8502 <Attribute readonly="readonly" name="bluetooth" id="::Bluetooth::BluetoothManagerObject::bluetooth">
8503 <webidl> readonly attribute <ref>BluetoothManager</ref> bluetooth;</webidl>
8504 <Type name="BluetoothManager"/>
8507 <Implements name1="Tizen" name2="BluetoothManagerObject">
8508 <webidl> <ref>Tizen</ref> implements <ref>BluetoothManagerObject</ref>;</webidl>
8510 <Interface name="BluetoothManager" id="::Bluetooth::BluetoothManager">
8511 <webidl> [NoInterfaceObject] interface BluetoothManager {
8512 readonly attribute <ref>BluetoothClassDeviceMajor</ref> deviceMajor;
8513 readonly attribute <ref>BluetoothClassDeviceMinor</ref> deviceMinor;
8514 readonly attribute <ref>BluetoothClassDeviceService</ref> deviceService;
8515 <ref>BluetoothAdapter</ref> getDefaultAdapter() raises(<ref>WebAPIException</ref>);
8519 This interface provides access to the <em>BluetoothAdapter</em> object.
8525 <ExtendedAttributeList>
8526 <ExtendedAttribute name="NoInterfaceObject">
8527 <webidl>NoInterfaceObject</webidl>
8528 </ExtendedAttribute>
8529 </ExtendedAttributeList>
8530 <Attribute readonly="readonly" name="deviceMajor" id="::Bluetooth::BluetoothManager::deviceMajor">
8531 <webidl> readonly attribute <ref>BluetoothClassDeviceMajor</ref> deviceMajor;</webidl>
8534 An attribute to access to a major device class identifiers of Bluetooth class of device (CoD).
8540 <Type name="BluetoothClassDeviceMajor"/>
8542 <Attribute readonly="readonly" name="deviceMinor" id="::Bluetooth::BluetoothManager::deviceMinor">
8543 <webidl> readonly attribute <ref>BluetoothClassDeviceMinor</ref> deviceMinor;</webidl>
8546 An attribute to access to a minor device class identifiers of Bluetooth class of device (CoD).
8552 <Type name="BluetoothClassDeviceMinor"/>
8554 <Attribute readonly="readonly" name="deviceService" id="::Bluetooth::BluetoothManager::deviceService">
8555 <webidl> readonly attribute <ref>BluetoothClassDeviceService</ref> deviceService;</webidl>
8558 Accessor to major service class identifiers of Bluetooth class of device (CoD).
8564 <Type name="BluetoothClassDeviceService"/>
8566 <Operation name="getDefaultAdapter" id="::Bluetooth::BluetoothManager::getDefaultAdapter">
8567 <webidl> <ref>BluetoothAdapter</ref> getDefaultAdapter() raises(<ref>WebAPIException</ref>);</webidl>
8570 Gets the default local Bluetooth adapter.
8579 http://tizen.org/privilege/bluetooth.gap
8582 var adapter = tizen.bluetooth.getDefaultAdapter() ;
8584 console.log (err.name +": " + err.message);
8588 <Type name="BluetoothAdapter">
8591 BluetoothAdapter The local <em>BluetoothAdapter </em>object.
8597 <RaiseException name="WebAPIException">
8600 with error type SecurityError, if the application does not have the privilege to call this method.
8603 with error type NotSupportedError, if this feature is not supported.
8606 with error type UnknownError, if any other error occurs.
8613 <Interface name="BluetoothAdapter" id="::Bluetooth::BluetoothAdapter">
8614 <webidl> [NoInterfaceObject] interface BluetoothAdapter {
8615 readonly attribute DOMString name;
8616 readonly attribute <ref>BluetoothAddress</ref> address;
8617 readonly attribute boolean powered;
8618 readonly attribute boolean visible;
8620 void setName(DOMString name,
8621 optional <ref>SuccessCallback</ref>? successCallback,
8622 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8624 void setPowered(boolean state,
8625 optional <ref>SuccessCallback</ref>? successCallback,
8626 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8628 void setVisible(boolean mode,
8629 optional <ref>SuccessCallback</ref>? successCallback,
8630 optional <ref>ErrorCallback</ref>? errorCallback,
8631 optional unsigned short? timeout) raises(<ref>WebAPIException</ref>);
8633 void setChangeListener(<ref>BluetoothAdapterChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);
8635 void unsetChangeListener() raises(<ref>WebAPIException</ref>);
8637 void discoverDevices(<ref>BluetoothDiscoverDevicesSuccessCallback</ref> successCallback,
8638 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8640 void stopDiscovery(optional <ref>SuccessCallback</ref>? successCallback,
8641 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8643 void getKnownDevices(<ref>BluetoothDeviceArraySuccessCallback</ref> successCallback,
8644 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8649 void getDevice(<ref>BluetoothAddress</ref> address,
8650 <ref>BluetoothDeviceSuccessCallback</ref> successCallback,
8651 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8656 void createBonding(<ref>BluetoothAddress</ref> address,
8657 <ref>BluetoothDeviceSuccessCallback</ref> successCallback,
8658 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8660 void destroyBonding(<ref>BluetoothAddress</ref> address,
8661 optional <ref>SuccessCallback</ref>? successCallback,
8662 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8666 void registerRFCOMMServiceByUUID(<ref>BluetoothUUID</ref> uuid,
8668 <ref>BluetoothServiceSuccessCallback</ref> successCallback,
8669 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8671 <ref>BluetoothProfileHandler</ref> getBluetoothProfileHandler(<ref>BluetoothProfileType</ref> profileType) raises(<ref>WebAPIException</ref>);
8676 This interface provides access to control the device's Bluetooth adapter.
8680 This interface offers methods to control local Bluetooth behavior, such as:
8684 Turning on/off Bluetooth radio </li>
8686 Changing device visibility </li>
8688 Scanning for remote devices </li>
8690 Accessing known devices </li>
8692 Registering a service in the device service database </li>
8699 <ExtendedAttributeList>
8700 <ExtendedAttribute name="NoInterfaceObject">
8701 <webidl>NoInterfaceObject</webidl>
8702 </ExtendedAttribute>
8703 </ExtendedAttributeList>
8704 <Attribute readonly="readonly" name="name" id="::Bluetooth::BluetoothAdapter::name">
8705 <webidl> readonly attribute DOMString name;</webidl>
8708 An attribute to store the readable name of the Bluetooth adapter.
8714 // Access adapter name
8715 var adapter = tizen.bluetooth.getDefaultAdapter();
8716 console.log ("Bluetooth adapter name: " + adapter.name);
8719 <Type type="DOMString"/>
8721 <Attribute readonly="readonly" name="address" id="::Bluetooth::BluetoothAdapter::address">
8722 <webidl> readonly attribute <ref>BluetoothAddress</ref> address;</webidl>
8725 An attribute to store the unique hardware address of the Bluetooth adapter, also known as the MAC address.
8730 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
8731 console.log("Bluetooth device address: " + adapter.address);
8734 <Type name="BluetoothAddress"/>
8736 <Attribute readonly="readonly" name="powered" id="::Bluetooth::BluetoothAdapter::powered">
8737 <webidl> readonly attribute boolean powered;</webidl>
8740 An attribute to indicate the current state of the Bluetooth adapter.
8741 This attribute holds one of the following 2 values:
8746 <var>true</var> - If Bluetooth adapter is currently on </li>
8748 <var>false</var> - If Bluetooth adapter is currently off </li>
8754 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
8755 console.log("Bluetooth state: " + (adapter.powered ? "On" : "Off"));
8758 <Type type="boolean"/>
8760 <Attribute readonly="readonly" name="visible" id="::Bluetooth::BluetoothAdapter::visible">
8761 <webidl> readonly attribute boolean visible;</webidl>
8764 An attribute to indicate the current visibility state of the Bluetooth adapter, that is, whether the local device is discoverable by remote devices or not.
8769 <Code> // Queries current visible state
8770 var adapter = tizen.bluetooth.getDefaultAdapter();
8771 console.log ("Bluetooth Visibility: " + (adapter.visible ? "On" : "Off"));
8774 <Type type="boolean"/>
8776 <Operation name="setName" id="::Bluetooth::BluetoothAdapter::setName">
8777 <webidl> void setName(DOMString name,
8778 optional <ref>SuccessCallback</ref>? successCallback,
8779 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
8782 Sets the local Bluetooth adapter name.
8786 Sends a request to Bluetooth hardware to change the name of the local Bluetooth adapter to <em>name</em>.
8789 The ErrorCallback is launched with these error types:
8793 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
8795 ServiceNotAvailableError: If a Bluetooth device is turned off. </li>
8797 UnknownError: In any other error case. </li>
8807 http://tizen.org/privilege/bluetooth.admin
8809 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
8811 function changeName(newName)
8813 if(adapter.name != newName) {
8814 // initiate change name
8815 adapter.setName(newName, function() {
8816 console.log("Adapter name changed to " + adapter.name);
8819 console.log("Failed to change name: " + e.message);
8824 changeName("myDevice");
8829 <Argument name="name">
8835 <Type type="DOMString"/>
8837 <Argument optional="optional" name="successCallback">
8840 The method to invoke when the asynchronous call completes successfully.
8843 <Type name="SuccessCallback" nullable="nullable"/>
8845 <Argument optional="optional" name="errorCallback">
8848 The method to invoke when an error occurs.
8851 <Type name="ErrorCallback" nullable="nullable"/>
8855 <RaiseException name="WebAPIException">
8858 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
8861 with error type SecurityError, if the application does not have the privilege to call this method.
8864 with error type NotSupportedError, if this feature is not supported.
8870 <Operation name="setPowered" id="::Bluetooth::BluetoothAdapter::setPowered">
8871 <webidl> void setPowered(boolean state,
8872 optional <ref>SuccessCallback</ref>? successCallback,
8873 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
8876 Sets the state of a Bluetooth adapter to on or off by sending a request to Bluetooth hardware to change the power state.
8877 For most Bluetooth actions, the Bluetooth adapter must be powered on.
8881 The ErrorCallback is launched with these error names:
8885 ServiceNotAvailableError - If a Bluetooth device is busy. </li>
8887 UnknownError - If any other error occurs. </li>
8897 http://tizen.org/privilege/bluetooth.admin
8899 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
8903 // If adapter is not powered on
8904 if(!adapter.powered) {
8905 // Initiates power on
8906 adapter.setPowered(true, function() {
8907 console.log("Bluetooth powered on success.");
8910 console.log("Failed to power on Bluetooth: " + e.message);
8918 if(adapter.powered) {
8919 // Initiates power off
8920 adapter.setPowered(false, function() {
8921 console.log("Bluetooth powered off successfully.");
8924 console.log("Failed to power off Bluetooth: " + e.message);
8932 <Argument name="state">
8935 The state to set: <var>true</var> to power on Bluetooth, <var>false</var> to power it off.
8938 <Type type="boolean"/>
8940 <Argument optional="optional" name="successCallback">
8943 The method to invoke on successful Bluetooth activation/deactivation.
8946 <Type name="SuccessCallback" nullable="nullable"/>
8948 <Argument optional="optional" name="errorCallback">
8951 The method to invoke on failure of a Bluetooth activation/deactivation.
8954 <Type name="ErrorCallback" nullable="nullable"/>
8958 <RaiseException name="WebAPIException">
8961 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
8964 with error type SecurityError, if the application does not have the privilege to call this method.
8967 with error type NotSupportedError, if this feature is not supported.
8973 <Operation name="setVisible" id="::Bluetooth::BluetoothAdapter::setVisible">
8974 <webidl> void setVisible(boolean mode,
8975 optional <ref>SuccessCallback</ref>? successCallback,
8976 optional <ref>ErrorCallback</ref>? errorCallback,
8977 optional unsigned short? timeout) raises(<ref>WebAPIException</ref>);</webidl>
8980 Sets the local device visibility by sending a request to a Bluetooth hardware to change the device visible state to <em>mode</em>.
8981 If <em>mode</em> is <var>true</var>, then the device is visible to other devices, that is, it responds to inquiry calls from remote devices for time period defined (in seconds) by <em>timeout</em>. After the timeout, the device will become invisible.
8985 If <em>timeout</em> is not passed or an invalid parameter is passed, the <em>timeout </em>defaults to <var>180 </var>seconds (3 minutes). A <em>timeout</em> of <var>0</var> is considered unlimited.
8988 The ErrorCallback is launched with these error types:
8992 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
8994 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
8996 UnknownError - If any other error case occurs. </li>
9006 http://tizen.org/privilege/bluetoothmanager
9008 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9012 if (adapter.visible == false) {
9014 adapter.setVisible(true,
9015 function() { console.log ('Device is visible to other devices for 3 minutes.'); },
9016 function(e) { console.log ('Error: ' + e.message + '(' + e.name + ')'); });
9019 console.log("Device is already in discoverable mode.");
9025 if (adapter.visible) {
9027 adapter.setVisible(false,
9028 function() { console.log('Device is in-visible now.'); },
9029 function(e) { console.log ('Error: ' + e.message + '(' + e.name + ')'); });
9032 console.log("Device is already in invisible mode.");
9039 <Argument name="mode">
9042 The boolean value to set visibility.
9043 It can either be set to: <var>true</var> - to show the device or <var>false</var> - to hide the device.
9046 <Type type="boolean"/>
9048 <Argument optional="optional" name="successCallback">
9051 The method to invoke when an asynchronous call completes successfully.
9054 <Type name="SuccessCallback" nullable="nullable"/>
9056 <Argument optional="optional" name="errorCallback">
9059 The method to invoke when an error occurs.
9062 <Type name="ErrorCallback" nullable="nullable"/>
9064 <Argument optional="optional" name="timeout">
9067 The visible timeout in seconds, used only when <em>mode</em> is <var>true</var>.
9070 <Type type="unsigned short" nullable="nullable"/>
9074 <RaiseException name="WebAPIException">
9077 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
9080 with error type SecurityError, if the application does not have the privilege to call this method.
9083 with error type NotSupportedError, if this feature is not supported.
9089 <Operation name="setChangeListener" id="::Bluetooth::BluetoothAdapter::setChangeListener">
9090 <webidl> void setChangeListener(<ref>BluetoothAdapterChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);</webidl>
9093 Sets the listener to receive notifications about changes of Bluetooth adapter.
9098 <Code> var changeListener = {
9099 onstatechanged: function(powered) {
9100 console.log ("Power state is changed into: " + powered);
9102 onnamechanged: function(name) {
9103 console.log("Name is changed to: " + name);
9105 onvisibilitychanged: function(visible) {
9106 console.log("Visibility is changed into: " + visible);
9110 var adapter = tizen.bluetooth.getDefaultAdapter();
9111 adapter.setChangeListener(changeListener);
9116 <Argument name="listener">
9119 The Bluetooth Adapter event listener to set.
9122 <Type name="BluetoothAdapterChangeCallback"/>
9126 <RaiseException name="WebAPIException">
9129 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
9132 with error type SecurityError, if this functionality is not allowed.
9135 with error type UnknownError, if any other error occurs.
9141 <Operation name="unsetChangeListener" id="::Bluetooth::BluetoothAdapter::unsetChangeListener">
9142 <webidl> void unsetChangeListener() raises(<ref>WebAPIException</ref>);</webidl>
9145 Unsets the listener, so stop receiving notifications about changes of Bluetooth adapter.
9150 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9152 var changeListener = {
9153 onstatechanged: function(powered) {
9154 console.log ("Power state is changed into: " + powered);
9156 adapter.unsetChangeListener();
9158 onnamechanged: function(name) {
9159 console.log("Name is changed to: " + name);
9161 onvisibilitychanged: function(visible) {
9162 console.log("Visibility is changed into: " + visible);
9166 adapter.setChangeListener(changeListener);
9172 <RaiseException name="WebAPIException">
9175 with error type SecurityError, if this functionality is not allowed.
9178 with error type UnknownError, if any other error occurs.
9184 <Operation name="discoverDevices" id="::Bluetooth::BluetoothAdapter::discoverDevices">
9185 <webidl> void discoverDevices(<ref>BluetoothDiscoverDevicesSuccessCallback</ref> successCallback,
9186 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
9189 Discovers nearby Bluetooth devices if any, that is, devices within proximity to the local device.
9193 This method initiates the device discovery process. Depending on the progress of this process the following methods are invoked:
9197 <em>BluetoothDiscoverDevicesSuccessCallback.onstarted()</em> - when a discovery process starts successfully. </li>
9199 <em>BluetoothDiscoverDevicesSuccessCallback.ondevicefound() </em>- when any device is found in the process and this method is invoked with the device information. If no device is found, this method will never be invoked. </li>
9201 <em>BluetoothDiscoverDevicesSuccessCallback.ondevicedisappeared()</em> - when a device goes out of proximity and this method is invoked with the address of the device. </li>
9203 <em>BluetoothDiscoverDevicesSuccessCallback.onfinished()</em> - when a discovery process is completed. </li>
9206 A discovery process can be canceled anytime, by calling <em>stopDiscovery() </em>on the <em>BluetoothAdapter</em>.
9209 The ErrorCallback is launched with these error types:
9213 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
9215 UnknownError - If any other error occurs. </li>
9225 http://tizen.org/privilege/bluetooth.gap
9227 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9229 function startDiscovery() {
9231 var discoverDevicesSuccessCallback = {
9232 onstarted: function() {
9233 console.log ("Device discovery started...");
9235 ondevicefound: function(device) {
9236 console.log("Found device - name: " + device.name + ", Address: "+ device.address);
9238 ondevicedisappeared: function(address) {
9239 console.log("Device disappeared: " + address);
9241 onfinished: function(devices) {
9242 console.log("Found Devices");
9243 for (var i = 0; i < devices.length; i++) {
9244 console.log("Name: " + devices[i].name + ", Address: " + devices[i].address);
9246 console.log("Total: " + devices.length);
9250 // Starts searching for nearby devices, for about 12 sec.
9251 adapter.discoverDevices(discoverDevicesSuccessCallback, function(e){
9252 console.log ("Failed to search devices: " + e.message + "(" + e.name + ")");
9256 function onSetPoweredError(e) {
9257 console.log ("Could not turn on device, reason: " + e.message + "(" + e.name + ")");
9260 adapter.setPowered(true, startDiscovery, onSetPoweredError);
9265 <Argument name="successCallback">
9268 The method to invoke when an asynchronous call completes successfully.
9271 <Type name="BluetoothDiscoverDevicesSuccessCallback"/>
9273 <Argument optional="optional" name="errorCallback">
9276 The method to invoke when an error occurs.
9279 <Type name="ErrorCallback" nullable="nullable"/>
9283 <RaiseException name="WebAPIException">
9286 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
9289 with error type SecurityError, if the application does not have the privilege to call this method.
9292 with error type NotSupportedError, if this feature is not supported.
9298 <Operation name="stopDiscovery" id="::Bluetooth::BluetoothAdapter::stopDiscovery">
9299 <webidl> void stopDiscovery(optional <ref>SuccessCallback</ref>? successCallback,
9300 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
9303 Stops an active device discovery session.
9307 Device discovery is a heavyweight procedure, hence we recommend stopping discovery as soon as required device is found. This method cancels an active discovery session.
9310 The ErrorCallback is launched with these error types:
9314 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
9316 UnknownError - If any other error occurs. </li>
9326 http://tizen.org/privilege/bluetooth.gap
9328 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9330 // Calls this method whenever user finds one of the device
9331 function cancelDiscovery() {
9332 adapter.stopDiscovery(function() {
9333 console.log("Stop discovery success.");
9336 console.log("Error while stopDiscovery:" + e.message);
9340 function startDiscovery() {
9342 var discoverDevicesSuccessCallback = {
9343 onstarted: function() {
9344 console.log ("Device discovery started...") ;
9346 ondevicefound: function(device) {
9347 console.log("Found device - name: " + device.name + ", Address: "+ device.address);
9348 // Shows the device to user to check if this is the device user is looking for.
9349 // For example, add this to list view.
9353 ondevicedisappeared: function(address) {
9354 console.log("Device disappeared: " + address);
9355 // Removes from list, as it is no longer valid.
9357 onfinished: function(devices) {
9358 console.log("Found Devices");
9359 for (var i = 0; i < devices.length; i++) {
9360 console.log("Name: " + devices[i].name + ", Address: " + devices[i].address);
9362 console.log("Total: " + devices.length);
9366 // Starts searching for nearby devices, for about 12 sec.
9367 adapter.discoverDevices(discoverDevicesSuccessCallback, function(e){
9368 console.log ("Failed to search devices: " + e.message + "(" + e.name + ")");
9372 function onSetPoweredError(e) {
9373 console.log ("Could not turn on device, reason: " + e.message + "(" + e.name + ")");
9376 adapter.setPowered(true, startDiscovery, onSetPoweredError);
9381 <Argument optional="optional" name="successCallback">
9384 The method to invoke when an asynchronous call completes successfully.
9387 <Type name="SuccessCallback" nullable="nullable"/>
9389 <Argument optional="optional" name="errorCallback">
9392 The method to invoke when an error occurs.
9395 <Type name="ErrorCallback" nullable="nullable"/>
9399 <RaiseException name="WebAPIException">
9402 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
9405 with error type SecurityError, if the application does not have the privilege to call this method.
9408 with error type NotSupportedError, if this feature is not supported.
9414 <Operation name="getKnownDevices" id="::Bluetooth::BluetoothAdapter::getKnownDevices">
9415 <webidl> void getKnownDevices(<ref>BluetoothDeviceArraySuccessCallback</ref> successCallback,
9416 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
9419 Gets all the known devices that have information stored in the local Bluetooth adapter.
9423 A known device is one of the following:
9427 a bonded device </li>
9429 a device found in last inquiry process </li>
9432 On success, it returns the list of currently known devices through <em>BluetoothDeviceArraySuccessCallback</em>.
9435 The ErrorCallback is launched with these error types:
9439 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
9441 UnknownError - If any other error occurs. </li>
9451 http://tizen.org/privilege/bluetooth.gap
9453 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9455 function onGotDevices(devices) {
9456 console.log("Devices");
9457 for (var i = 0; i < devices.length; i++) {
9458 console.log(" Name: " + devices[i].name + ", Address: " + devices[i].address);
9460 console.log("Total: " + devices.length);
9463 function onError(e) {
9464 console.log ("Error: " + e.message);
9467 function onBluetoothsetPowered() {
9468 adapter.getKnownDevices(onGotDevices, onError);
9471 // Turns on Bluetooth
9472 adapter.setPowered(true, onBluetoothsetPowered);
9477 <Argument name="successCallback">
9480 The method to invoke at retrieval of a list of Bluetooth devices that were bonded (paired) to the local Bluetooth adapter.
9483 <Type name="BluetoothDeviceArraySuccessCallback"/>
9485 <Argument optional="optional" name="errorCallback">
9488 The method to invoke in case of failure in finding any bonded devices.
9491 <Type name="ErrorCallback" nullable="nullable"/>
9495 <RaiseException name="WebAPIException">
9498 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter
9501 with error type SecurityError, if the application does not have the privilege to call this method.
9504 with error type NotSupportedError, if this feature is not supported.
9510 <Operation name="getDevice" id="::Bluetooth::BluetoothAdapter::getDevice">
9511 <webidl> void getDevice(<ref>BluetoothAddress</ref> address,
9512 <ref>BluetoothDeviceSuccessCallback</ref> successCallback,
9513 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
9516 Gets the <em>BluetoothDevice</em> object for a given device hardware address.
9520 This method returns device information stored in the local Bluetooth adapter for the specified device <em>address</em> through
9521 BluetoothDeviceSuccessCallback.
9522 A valid hardware address must be passed, such as "35:F4:59:D1:7A:03".
9525 The ErrorCallback is launched with these error types:
9529 NotFoundError - If there is no device with the given address. </li>
9531 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
9533 UnknownError - If any other error occurs. </li>
9543 http://tizen.org/privilege/bluetooth.gap
9545 <Code> function gotDeviceInfo(device) {
9546 console.log("Device Name: " + device.name);
9547 console.log("Device Address: " + device.address);
9548 console.log("Device Class: " + device.deviceClass.major);
9549 console.log("Is Bonded: " + (device.isBonded ? "Yes" : "No"));
9552 function onError(e) {
9553 console.log ("Could not get device info:" + e.message);
9556 var adapter = tizen.bluetooth.getDefaultAdapter();
9557 adapter.getDevice("35:F4:59:D1:7A:03", gotDeviceInfo, onError);
9562 <Argument name="address">
9565 The address of a remote Bluetooth device to get.
9568 <Type name="BluetoothAddress"/>
9570 <Argument name="successCallback">
9573 The method to invoke when an asynchronous call completes successfully.
9576 <Type name="BluetoothDeviceSuccessCallback"/>
9578 <Argument optional="optional" name="errorCallback">
9581 The method to invoke when an error occurs.
9584 <Type name="ErrorCallback" nullable="nullable"/>
9588 <RaiseException name="WebAPIException">
9591 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter
9594 with error type SecurityError, if the application does not have the privilege to call this method.
9597 with error type NotSupportedError, if this feature is not supported.
9603 <Operation name="createBonding" id="::Bluetooth::BluetoothAdapter::createBonding">
9604 <webidl> void createBonding(<ref>BluetoothAddress</ref> address,
9605 <ref>BluetoothDeviceSuccessCallback</ref> successCallback,
9606 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
9609 Creates a bond with a remote device by initiating the bonding process with peer device, using the given MAC address. The remote device must be bonded with the local device in order to connect to services of the remote device and then exchange data with each other.
9613 If the bonding process is successful, the device information is sent in <em>successCallback</em>.
9616 The ErrorCallback is launched with these error types:
9620 NotFoundError - If there is no device with the given address. </li>
9622 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
9624 UnknownError - If any other error occurs. </li>
9634 http://tizen.org/privilege/bluetooth.gap
9636 <Code> function onBondingSuccess(device) {
9637 console.log("Device Name:" + device.name);
9638 console.log("Device Address:" + device.address);
9639 console.log("Device Service UUIDs:" + device.uuids.join("\n"));
9642 function onError(e) {
9643 console.log ("Could not create bonding, reason:" + e.message);
9646 var adapter = tizen.bluetooth.getDefaultAdapter();
9647 adapter.createBonding("35:F4:59:D1:7A:03", onBondingSuccess, onError);
9652 <Argument name="address">
9655 The MAC address of remote Bluetooth address to bond with.
9658 <Type name="BluetoothAddress"/>
9660 <Argument name="successCallback">
9663 The method to invoke when an asynchronous call completes successfully.
9666 <Type name="BluetoothDeviceSuccessCallback"/>
9668 <Argument optional="optional" name="errorCallback">
9671 The method to invoke when an error occurs.
9674 <Type name="ErrorCallback" nullable="nullable"/>
9678 <RaiseException name="WebAPIException">
9681 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
9684 with error type SecurityError, if the application does not have the privilege to call this method.
9687 with error type NotSupportedError, if this feature is not supported.
9693 <Operation name="destroyBonding" id="::Bluetooth::BluetoothAdapter::destroyBonding">
9694 <webidl> void destroyBonding(<ref>BluetoothAddress</ref> address,
9695 optional <ref>SuccessCallback</ref>? successCallback,
9696 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
9699 Destroys the bond with a remote device, that is, this method initiates the process of removing the specified <em>address</em> from the list of bonded devices.
9703 The ErrorCallback is launched with these error types:
9707 NotFoundError - If there is no device with the given address. </li>
9709 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
9711 UnknownError - If any other error occurs. </li>
9721 http://tizen.org/privilege/bluetooth.gap
9723 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9725 function gotDevice(device) {
9726 if (device.isBonded) {
9727 // Initiates destroying bonding
9728 adapter.destroyBonding(device.address, function() {
9729 console.log("Succeeded to destroy the bond success with:" + device.address);
9732 console.log("Failed to destroy the bond with " + device.address + ", reason: " + e.message);
9737 var deviceAddress = "35:F4:59:D1:7A:03";
9738 adapter.getDevice(deviceAddress, gotDevice, function(e) {
9739 console.log("Failed to get device info for " + deviceAddress + ", reason: " + e.message);
9745 <Argument name="address">
9748 The address of a bonded device.
9751 <Type name="BluetoothAddress"/>
9753 <Argument optional="optional" name="successCallback">
9756 The method to invoke when an asynchronous call completes successfully.
9759 <Type name="SuccessCallback" nullable="nullable"/>
9761 <Argument optional="optional" name="errorCallback">
9764 The method to invoke when an error occurs.
9767 <Type name="ErrorCallback" nullable="nullable"/>
9771 <RaiseException name="WebAPIException">
9774 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter
9777 with error type SecurityError, if the application does not have the privilege to call this method.
9780 with error type NotSupportedError, if this feature is not supported.
9786 <Operation name="registerRFCOMMServiceByUUID" id="::Bluetooth::BluetoothAdapter::registerRFCOMMServiceByUUID">
9787 <webidl> void registerRFCOMMServiceByUUID(<ref>BluetoothUUID</ref> uuid,
9789 <ref>BluetoothServiceSuccessCallback</ref> successCallback,
9790 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
9793 Registers a service record in the device service record database with the specified <em>uuid</em>, <em>name</em>.
9797 On success of the service registration, it returns a <em>BluetoothServiceHandler</em> object as the first parameter of <em>successCallback</em>, and listens for client connections.
9798 The service handler can be used to be notified on client connections or to unregister the service.
9799 User interaction is mandatory to connect to a registered service.
9802 If any client(remote device) connects to this service, then <em>BluetoothServiceHandler.onconnect()</em> is invoked with <em>BluetoothSocket</em> object.
9805 <em>BluetoothServiceHandler.unregister()</em> can be used to unregister the service record from the device service database and stop listening for client connections.
9808 The ErrorCallback is launched with these error types:
9812 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
9814 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
9816 UnknownError - If any other error occurs. </li>
9826 http://tizen.org/privilege/bluetooth.spp
9828 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9829 // Holds currently registered service record
9830 var chatServiceHandler = null;
9831 // Holds currently open socket
9832 var serviceSocket = null;
9834 function chatServiceSuccessCb(recordHandler) {
9835 console.log("Chat service registration succeeds!");
9836 chatServiceHandler = recordHandler;
9837 recordHandler.onconnect = function(socket) {
9838 console.log("Client connected: " + socket.peer.name + "," + socket.peer.address);
9839 serviceSocket = socket;
9840 // Messages received from remote device
9841 socket.onmessage = function() {
9842 var data = socket.readData();
9843 // Handles message code goes here
9847 socket.onclose = function() {
9848 console.log('The socket is closed.');
9849 serviceSocket = null;
9854 function publishChatService()
9856 var CHAT_SERVICE_UUID = "5BCE9431-6C75-32AB-AFE0-2EC108A30860";
9857 adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCb,
9860 console.log( "Could not register service record, Error: " + e.message);
9864 function unregisterChatService()
9866 if (chatServiceHandler != null) {
9867 chatServiceHandler.unregister(function() {
9868 console.log("Chat service is unregistered");
9869 chatServiceHandler = null;
9871 console.log("Failed to unregister service: " + e.message);
9879 <Argument name="uuid">
9882 The UUID of the service, to which clients connects.
9885 <Type name="BluetoothUUID"/>
9887 <Argument name="name">
9890 The Name of a service.
9893 <Type type="DOMString"/>
9895 <Argument name="successCallback">
9898 The method to invoke on successful service registration.
9901 <Type name="BluetoothServiceSuccessCallback"/>
9903 <Argument optional="optional" name="errorCallback">
9906 The method to invoke when an error occurs.
9909 <Type name="ErrorCallback" nullable="nullable"/>
9913 <RaiseException name="WebAPIException">
9916 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
9919 with error type SecurityError, if the application does not have the privilege to call this method.
9922 with error type NotSupportedError, if this feature is not supported.
9928 <Operation name="getBluetoothProfileHandler" id="::Bluetooth::BluetoothAdapter::getBluetoothProfileHandler">
9929 <webidl> <ref>BluetoothProfileHandler</ref> getBluetoothProfileHandler(<ref>BluetoothProfileType</ref> profileType) raises(<ref>WebAPIException</ref>);</webidl>
9932 Gets the profile handler for the given type.
9937 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9938 var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
9941 <Type name="BluetoothProfileHandler"/>
9943 <Argument name="profileType">
9946 The type of Bluetooth Profile.
9949 <Type name="BluetoothProfileType"/>
9953 <RaiseException name="WebAPIException">
9956 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
9959 with error type NotSupportedError, if this feature is not supported.
9962 with error type UnknownError, if any other error occurs.
9969 <Interface name="BluetoothDevice" id="::Bluetooth::BluetoothDevice">
9970 <webidl> [NoInterfaceObject] interface BluetoothDevice {
9971 readonly attribute DOMString name;
9972 readonly attribute <ref>BluetoothAddress</ref> address;
9973 readonly attribute <ref>BluetoothClass</ref> deviceClass;
9974 readonly attribute boolean isBonded;
9975 readonly attribute boolean isTrusted;
9976 readonly attribute boolean isConnected;
9977 readonly attribute <ref>BluetoothUUID</ref>[] uuids;
9979 void connectToServiceByUUID(<ref>BluetoothUUID</ref> uuid,
9980 <ref>BluetoothSocketSuccessCallback</ref> successCallback,
9981 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
9985 This interface represents a remote Bluetooth device.
9989 A <em>BluetoothDevice</em> object can be retrieved using one of the following APIs:
9993 BluetoothAdapter.getDevice() </li>
9995 BluetoothAdapter.getKnownDevices() </li>
9997 BluetoothAdapter.discoverDevices() </li>
9999 BluetoothAdapter.createBonding() </li>
10006 <ExtendedAttributeList>
10007 <ExtendedAttribute name="NoInterfaceObject">
10008 <webidl>NoInterfaceObject</webidl>
10009 </ExtendedAttribute>
10010 </ExtendedAttributeList>
10011 <Attribute readonly="readonly" name="name" id="::Bluetooth::BluetoothDevice::name">
10012 <webidl> readonly attribute DOMString name;</webidl>
10015 An attribute to store the readable name of this remote device.
10020 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10021 adapter.getDevice("11:22:33:44:55:66", function(device) {
10022 console.log("Device Name: " + device.name);
10026 <Type type="DOMString"/>
10028 <Attribute readonly="readonly" name="address" id="::Bluetooth::BluetoothDevice::address">
10029 <webidl> readonly attribute <ref>BluetoothAddress</ref> address;</webidl>
10032 An attribute to store the hardware address of this remote device.
10037 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10038 adapter.getDevice("11:22:33:44:55:66", function(device) {
10039 console.log("Device Address: " + device.address);
10043 <Type name="BluetoothAddress"/>
10045 <Attribute readonly="readonly" name="deviceClass" id="::Bluetooth::BluetoothDevice::deviceClass">
10046 <webidl> readonly attribute <ref>BluetoothClass</ref> deviceClass;</webidl>
10049 An attribute to indicate a device class, which represents the type of the device and the services it provides.
10054 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10055 adapter.getDevice("11:22:33:44:55:66", function(device) {
10056 console.log("Device Major Class: " + device.deviceClass.major);
10060 <Type name="BluetoothClass"/>
10062 <Attribute readonly="readonly" name="isBonded" id="::Bluetooth::BluetoothDevice::isBonded">
10063 <webidl> readonly attribute boolean isBonded;</webidl>
10066 An attribute to check the bond state of this remote device with the local device.
10071 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10072 adapter.getDevice("11:22:33:44:55:66", function(device) {
10073 console.log("Is bonded: " + (device.isBonded ? "Yes" : "No"));
10077 <Type type="boolean"/>
10079 <Attribute readonly="readonly" name="isTrusted" id="::Bluetooth::BluetoothDevice::isTrusted">
10080 <webidl> readonly attribute boolean isTrusted;</webidl>
10083 An attribute to check whether the local device recognizes this remote device as a trusted device or not.
10088 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10089 adapter.getDevice("11:22:33:44:55:66", function(device) {
10090 console.log("Is trusted: " + (device.isTrusted ? "Yes" : "No"));
10094 <Type type="boolean"/>
10096 <Attribute readonly="readonly" name="isConnected" id="::Bluetooth::BluetoothDevice::isConnected">
10097 <webidl> readonly attribute boolean isConnected;</webidl>
10100 An attribute to check the connection state of this remote device with the local device.
10105 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10106 adapter.getDevice("11:22:33:44:55:66", function(device) {
10107 console.log("Is connected: " + (device.isConnected ? "Yes" : "No"));
10111 <Type type="boolean"/>
10113 <Attribute readonly="readonly" name="uuids" id="::Bluetooth::BluetoothDevice::uuids">
10114 <webidl> readonly attribute <ref>BluetoothUUID</ref>[] uuids;</webidl>
10117 An attribute to store the list of 128 bit service UUIDs available on this remote device.
10122 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10123 var CHAT_SERVICE_UUID = "5BCE9431-6C75-32AB-AFE0-2EC108A30860";
10124 adapter.getDevice("11:22:33:44:55:66", function(device) {
10125 var uuids = device.uuids;
10126 var services = "";
10127 for (var i = 0; i < uuids.length; i++) {
10128 services += uuids[i] + "\n";
10130 console.log ("Services found: " + services);
10131 if (uuids.indexOf(CHAT_SERVICE_UUID) != -1) {
10132 // Connects to service
10133 device.connectToServiceByUUID(CHAT_SERVICE_UUID, function(socket) {
10135 // Connected to service, handle socket
10138 console.log("Could not connect to chat service !!!. Error: " + e.message);
10144 <Type type="array">
10145 <Type name="BluetoothUUID"/>
10148 <Operation name="connectToServiceByUUID" id="::Bluetooth::BluetoothDevice::connectToServiceByUUID">
10149 <webidl> void connectToServiceByUUID(<ref>BluetoothUUID</ref> uuid,
10150 <ref>BluetoothSocketSuccessCallback</ref> successCallback,
10151 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
10154 Connects to a specified service identified by <em>uuid</em> on this remote device.
10158 If opening a connection is successful, then a <em>BluetoothSocket</em> object with open state is sent using <em>successCallback</em>, through which data can be exchanged by both devices.
10161 The ErrorCallback is launched with these error types:
10165 NotFoundError - If there is no service with the specified <em>uuid</em>. </li>
10167 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
10169 UnknownError - If any other error occurs. </li>
10179 http://tizen.org/privilege/bluetooth.spp
10181 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10182 var clientSocket = null;
10184 // Calls a method that is invoked when user wants to send a message to a remote device
10185 function sendMessage(msg) {
10186 // Validates socket state, if everything is ok.
10187 if (clientSocket != null && clientSocket.state == "OPEN") {
10188 // Sends the message
10189 clientSocket.writeData(msg);
10193 // Calls a method that is invoked when a socket is open
10194 function onSocketConnected(socket) {
10195 clientSocket = socket;
10196 console.log("Opening a socket successfully!!!");
10197 socket.onmessage = function () {
10198 var data = socket.readData();
10199 var recvmsg = "";
10200 for (var i = 0; i < data.length; i++)
10202 recvmsg += String.fromCharCode(data[i]);
10204 console.log("server msg >> " + recvmsg);
10207 socket.onclose = function() {
10208 console.log("socket disconnected.");
10212 function onDeviceReady(device) {
10213 // Validates device and service uuid
10214 if (device.uuids.indexOf("5BCE9431-6C75-32AB-AFE0-2EC108A30860") != -1) {
10216 device.connectToServiceByUUID("5BCE9431-6C75-32AB-AFE0-2EC108A30860", onSocketConnected, function(e) {
10217 console.log ("Error connecting to service. Reason: " + e.message);
10221 console.log ("Chat service is not supported by this device");
10225 function onSetPowered() {
10226 // Gets the BluetoothDevice object
10227 adapter.getDevice("35:F4:59:D1:7A:03", onDeviceReady, function(e) { console.log("Error: " + e.message); });
10230 adapter.setPowered(true, onSetPowered, function(e) {console.log ("Could not turn on Bluetooth adapter. reason: " + e.message); });
10233 <Type type="void"/>
10235 <Argument name="uuid">
10238 The 128 bit unique identifier, which represents the service record on the device.
10241 <Type name="BluetoothUUID"/>
10243 <Argument name="successCallback">
10246 The method to invoke when an asynchronous call completes successfully.
10249 <Type name="BluetoothSocketSuccessCallback"/>
10251 <Argument optional="optional" name="errorCallback">
10254 The method to invoke when opening of a socket fails.
10257 <Type name="ErrorCallback" nullable="nullable"/>
10261 <RaiseException name="WebAPIException">
10264 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter
10267 with error type SecurityError, if the application does not have the privilege to call this method.
10270 with error type NotSupportedError, if this feature is not supported.
10277 <Interface name="BluetoothSocket" id="::Bluetooth::BluetoothSocket">
10278 <webidl> [NoInterfaceObject] interface BluetoothSocket {
10279 readonly attribute <ref>BluetoothUUID</ref> uuid;
10280 readonly attribute <ref>BluetoothSocketState</ref> state;
10281 readonly attribute <ref>BluetoothDevice</ref> peer;
10282 [TreatNonCallableAsNull] attribute <ref>SuccessCallback</ref>? onmessage raises(<ref>WebAPIException</ref>);
10283 [TreatNonCallableAsNull] attribute <ref>SuccessCallback</ref>? onclose raises(<ref>WebAPIException</ref>);
10284 unsigned long writeData(byte[] data) raises(<ref>WebAPIException</ref>);
10287 byte[] readData() raises(<ref>WebAPIException</ref>);
10290 void close() raises(<ref>WebAPIException</ref>);
10294 This interface represents the Bluetooth socket.
10298 The socket object is created by <em>BluetoothDevice.connectToServiceByUUID()</em> or <em>BluetoothAdapter.registerRFCOMMServiceByUUID()</em>.
10305 <ExtendedAttributeList>
10306 <ExtendedAttribute name="NoInterfaceObject">
10307 <webidl>NoInterfaceObject</webidl>
10308 </ExtendedAttribute>
10309 </ExtendedAttributeList>
10310 <Attribute readonly="readonly" name="uuid" id="::Bluetooth::BluetoothSocket::uuid">
10311 <webidl> readonly attribute <ref>BluetoothUUID</ref> uuid;</webidl>
10314 An attribute to store the service UUID to which this socket is connected.
10320 <Type name="BluetoothUUID"/>
10322 <Attribute readonly="readonly" name="state" id="::Bluetooth::BluetoothSocket::state">
10323 <webidl> readonly attribute <ref>BluetoothSocketState</ref> state;</webidl>
10326 An attribute to indicate the socket state.
10332 <Type name="BluetoothSocketState"/>
10334 <Attribute readonly="readonly" name="peer" id="::Bluetooth::BluetoothSocket::peer">
10335 <webidl> readonly attribute <ref>BluetoothDevice</ref> peer;</webidl>
10338 The peer device to which this socket is connected.
10344 <Type name="BluetoothDevice"/>
10346 <Attribute name="onmessage" id="::Bluetooth::BluetoothSocket::onmessage">
10347 <webidl> [TreatNonCallableAsNull] attribute <ref>SuccessCallback</ref>? onmessage raises(<ref>WebAPIException</ref>);</webidl>
10350 The success callback to be invoked when an incoming message is received from the peer.
10351 By default, this attribute is set to null.
10357 <ExtendedAttributeList>
10358 <ExtendedAttribute name="TreatNonCallableAsNull">
10359 <webidl>TreatNonCallableAsNull</webidl>
10360 </ExtendedAttribute>
10361 </ExtendedAttributeList>
10362 <Type name="SuccessCallback" nullable="nullable"/>
10364 <RaiseException name="WebAPIException">
10367 with error type TypeMismatchError, if any input attribute is not compatible with the expected type for this attribute.
10373 <Attribute name="onclose" id="::Bluetooth::BluetoothSocket::onclose">
10374 <webidl> [TreatNonCallableAsNull] attribute <ref>SuccessCallback</ref>? onclose raises(<ref>WebAPIException</ref>);</webidl>
10377 The success callback to be invoked when the socket is closed.
10378 By default, this attribute is set to null.
10384 <ExtendedAttributeList>
10385 <ExtendedAttribute name="TreatNonCallableAsNull">
10386 <webidl>TreatNonCallableAsNull</webidl>
10387 </ExtendedAttribute>
10388 </ExtendedAttributeList>
10389 <Type name="SuccessCallback" nullable="nullable"/>
10391 <RaiseException name="WebAPIException">
10394 with error type TypeMismatchError, if any input attribute is not compatible with the expected type for this attribute.
10400 <Operation name="writeData" id="::Bluetooth::BluetoothSocket::writeData">
10401 <webidl> unsigned long writeData(byte[] data) raises(<ref>WebAPIException</ref>);</webidl>
10404 Writes data as a sequence of bytes onto the socket and returns the number of bytes actually written.
10413 http://tizen.org/privilege/bluetooth.spp
10416 var adapter = tizen.bluetooth.getDefaultAdapter();
10418 function onSocketConnected(socket) {
10419 console.log ("Opened connection to remote device");
10420 socket.onmessage = function () {
10421 console.log ("Message received: " + socket.readData());
10424 socket.onclose = function() {
10425 console.log("Socket closed with " + socket.peer.name);
10428 // Sends data to peer.
10429 var textmsg = "Test";
10430 var sendtextmsg = new Array();
10431 for (var i = 0; i < textmsg.length; i++)
10433 sendtextmsg[i] = textmsg.charCodeAt(i);
10435 socket.writeData (sendtextmsg);
10438 function onSocketError(e) {
10439 console.log ("Error connecting to service. Reason: " + e.message);
10442 function onDeviceReady(device) {
10443 // Validates device and service uuid
10444 if (device.uuids.indexOf("5BCE9431-6C75-32AB-AFE0-2EC108A30860") != -1) {
10446 device.connectToServiceByUUID("5BCE9431-6C75-32AB-AFE0-2EC108A30860", onSocketConnected, onSocketError );
10449 function onSetPowered() {
10450 // Gets the BluetoothDevice object
10451 adapter.getDevice("35:F4:59:D1:7A:03", onDeviceReady, function(e) { console.log("Error: " + e.message); });
10454 adapter.setPowered(true, onSetPowered, function(e) {console.log ("Could not turn on Bluetooth adapter. reason: " + e.message); });
10457 <Type type="unsigned long">
10460 unsigned long The number of bytes actually sent.
10465 <Argument name="data">
10471 <Type type="array">
10472 <Type type="byte"/>
10477 <RaiseException name="WebAPIException">
10480 with error type TypeMismatchError, if any input parameters not compatible with the expected type for that parameter.
10483 with error type SecurityError, if the application does not have the privilege to call this method.
10486 with error type NotSupportedError, if this feature is not supported.
10489 with error type UnknownError, if any other error occurs.
10495 <Operation name="readData" id="::Bluetooth::BluetoothSocket::readData">
10496 <webidl> byte[] readData() raises(<ref>WebAPIException</ref>);</webidl>
10499 Reads data from the socket.
10503 This method should be called only in the <em>BluetoothSocket.onmessage</em> handler, that is, when data is ready on the socket.
10513 http://tizen.org/privilege/bluetooth.spp
10515 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10517 function onError(e) {
10518 console.log ("Error connecting to service. Reason: " + e.message);
10521 function onSocketConnected(socket) {
10522 console.log ("Opening socket success!!!");
10524 socket.onmessage = function() {
10525 // Has got a message from peer, reads it
10526 var data = socket.readData();
10529 // Code to evaluate message goes here
10533 socket.onclose = function() {
10534 console.log("Socket closed with " + socket.peer.name);
10538 function onDeviceReady(device) {
10539 // Validates device and service uuid
10540 if (device.uuids.indexOf("5BCE9431-6C75-32AB-AFE0-2EC108A30860") != -1) {
10542 device.connectToServiceByUUID("5BCE9431-6C75-32AB-AFE0-2EC108A30860", onSocketConnected, onError);
10545 function onSetPowered() {
10546 // Gets the BluetoothDevice object
10547 adapter.getDevice("35:F4:59:D1:7A:03", onDeviceReady, function(e) { console.log("Error: " + e.message); });
10550 adapter.setPowered(true, onSetPowered, function(e) {console.log ("Could not turn on Bluetooth adapter. reason: " + e.message); });
10553 <Type type="array">
10556 byte[] The sequence of bytes successfully read.
10559 <Type type="byte"/>
10563 <RaiseException name="WebAPIException">
10566 with error type SecurityError, if the application does not have the privilege to call this method.
10569 with error type NotSupportedError, if this feature is not supported.
10572 with error type UnknownError, if any other error occurs.
10578 <Operation name="close" id="::Bluetooth::BluetoothSocket::close">
10579 <webidl> void close() raises(<ref>WebAPIException</ref>);</webidl>
10586 <b>BluetoothSocket.state</b> changes to <var>CLOSED</var>, and <em>BluetoothSocket.onclose()</em> is invoked on success.
10596 http://tizen.org/privilege/bluetooth.spp
10599 <Type type="void"/>
10602 <RaiseException name="WebAPIException">
10605 with error type NotSupportedError, if this feature is not supported.
10608 with error type SecurityError, if the application does not have the privilege to call this method.
10611 with error type UnknownError, if any other error occurs.
10618 <Interface name="BluetoothClass" id="::Bluetooth::BluetoothClass">
10619 <webidl> [NoInterfaceObject] interface BluetoothClass {
10620 readonly attribute octet major;
10622 readonly attribute octet minor;
10624 readonly attribute unsigned short [] services ;
10626 boolean hasService(unsigned short service) raises(<ref>WebAPIException</ref>);
10630 This interface represents Bluetooth Class of Device/Service(CoD).
10634 Bluetooth device class describes the characteristics and capabilities of a device.
10637 Bluetooth CoD is a 24 bit integer created by the union of three components:
10641 Exactly one <b>Major Device Class</b>(bits 8-12 of CoD) - This is the highest level of granularity for defining a Bluetooth Device. </li>
10643 Exactly one <b>Minor Device Class</b>(bits 2-7 of CoD) - This is to be interpreted only in the context of the Major Device Class. Thus, the meaning of these bits may change, depending on the value of 'Major Device Class'. </li>
10645 Zero or more <b>Major Service Classes</b>(bits 13-23) - Represents the services supported by the device. </li>
10648 The Major and Minor classes are intended to define a general family of devices with which any particular implementation wishes to be associated.
10649 No assumptions should be made about specific functionality or characteristics of any application, based solely on the assignment of a Major or minor device class.
10656 <ExtendedAttributeList>
10657 <ExtendedAttribute name="NoInterfaceObject">
10658 <webidl>NoInterfaceObject</webidl>
10659 </ExtendedAttribute>
10660 </ExtendedAttributeList>
10661 <Attribute readonly="readonly" name="major" id="::Bluetooth::BluetoothClass::major">
10662 <webidl> readonly attribute octet major;</webidl>
10665 The major device class and it refers to the <em>BluetoothClassDeviceMajor</em> interface for the list of possible
10671 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10673 function evaluateDevice(address) {
10674 adapter.getDevice(address, function(device) {
10675 if (device.deviceClass.major == tizen.bluetooth.deviceMajor.COMPUTER) {
10676 // Shows computer icon for this device
10677 console.log("Device is computer");
10678 } else if (device.deviceClass.major == tizen.bluetooth.deviceMajor.PHONE) {
10679 // Shows phone icon
10680 console.log("Device is a Phone");
10683 console.log("Couldn't get any device with the given address: " + e.message);
10687 evaluateDevice("11:22:33:44:55:66");
10691 <Type type="octet"/>
10693 <Attribute readonly="readonly" name="minor" id="::Bluetooth::BluetoothClass::minor">
10694 <webidl> readonly attribute octet minor;</webidl>
10697 The minor device class and it refer to the <em>BluetoothClassDeviceMinor</em> interface for the list of possible values.
10703 <Type type="octet"/>
10705 <Attribute readonly="readonly" name="services" id="::Bluetooth::BluetoothClass::services">
10706 <webidl> readonly attribute unsigned short [] services ;</webidl>
10709 The services provided by this device and it refers to the <em>BluetoothClassDeviceService</em> interface for the list of possible
10716 <Type type="array">
10717 <Type type="unsigned short"/>
10720 <Operation name="hasService" id="::Bluetooth::BluetoothClass::hasService">
10721 <webidl> boolean hasService(unsigned short service) raises(<ref>WebAPIException</ref>);</webidl>
10724 Checks whether the given service exists in the <em>services</em>.
10733 http://tizen.org/privilege/bluetooth.gap
10735 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10736 adapter.getDevice("12:34:56:78:9A:BC", function(device) {
10737 if (device.deviceClass.hasService(tizen.bluetooth.deviceService.POSITIONING)) {
10738 console.log("Device supports Positioning service");
10741 console.log("Couldn't get device for given address: " + e.message);
10745 <Type type="boolean"/>
10747 <Argument name="service">
10750 The service to check.
10753 <Type type="unsigned short"/>
10757 <RaiseException name="WebAPIException">
10760 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
10763 with error type NotSupportedError, if this feature is not supported.
10766 with error type SecurityError, if the application does not have the privilege to call this method.
10769 with error type UnknownError, if any other error occurs.
10776 <Interface name="BluetoothClassDeviceMajor" id="::Bluetooth::BluetoothClassDeviceMajor">
10777 <webidl> [NoInterfaceObject] interface BluetoothClassDeviceMajor {
10779 const octet MISC = 0x00;
10780 const octet COMPUTER = 0x01;
10781 const octet PHONE = 0x02;
10782 const octet NETWORK = 0x03;
10783 const octet AUDIO_VIDEO = 0x04;
10784 const octet PERIPHERAL = 0x05;
10785 const octet IMAGING = 0x06;
10786 const octet WEARABLE = 0x07;
10787 const octet TOY = 0x08;
10788 const octet HEALTH = 0x09;
10789 const octet UNCATEGORIZED = 0x1F;
10793 This interface holds the identifiers for major device classes of Bluetooth CoD.
10799 <ExtendedAttributeList>
10800 <ExtendedAttribute name="NoInterfaceObject">
10801 <webidl>NoInterfaceObject</webidl>
10802 </ExtendedAttribute>
10803 </ExtendedAttributeList>
10804 <Const name="MISC" value="0x00" id="::Bluetooth::BluetoothClassDeviceMajor::MISC">
10805 <webidl> const octet MISC = 0x00;</webidl>
10806 <Type type="octet"/>
10808 <Const name="COMPUTER" value="0x01" id="::Bluetooth::BluetoothClassDeviceMajor::COMPUTER">
10809 <webidl> const octet COMPUTER = 0x01;</webidl>
10810 <Type type="octet"/>
10812 <Const name="PHONE" value="0x02" id="::Bluetooth::BluetoothClassDeviceMajor::PHONE">
10813 <webidl> const octet PHONE = 0x02;</webidl>
10814 <Type type="octet"/>
10816 <Const name="NETWORK" value="0x03" id="::Bluetooth::BluetoothClassDeviceMajor::NETWORK">
10817 <webidl> const octet NETWORK = 0x03;</webidl>
10818 <Type type="octet"/>
10820 <Const name="AUDIO_VIDEO" value="0x04" id="::Bluetooth::BluetoothClassDeviceMajor::AUDIO_VIDEO">
10821 <webidl> const octet AUDIO_VIDEO = 0x04;</webidl>
10822 <Type type="octet"/>
10824 <Const name="PERIPHERAL" value="0x05" id="::Bluetooth::BluetoothClassDeviceMajor::PERIPHERAL">
10825 <webidl> const octet PERIPHERAL = 0x05;</webidl>
10826 <Type type="octet"/>
10828 <Const name="IMAGING" value="0x06" id="::Bluetooth::BluetoothClassDeviceMajor::IMAGING">
10829 <webidl> const octet IMAGING = 0x06;</webidl>
10830 <Type type="octet"/>
10832 <Const name="WEARABLE" value="0x07" id="::Bluetooth::BluetoothClassDeviceMajor::WEARABLE">
10833 <webidl> const octet WEARABLE = 0x07;</webidl>
10834 <Type type="octet"/>
10836 <Const name="TOY" value="0x08" id="::Bluetooth::BluetoothClassDeviceMajor::TOY">
10837 <webidl> const octet TOY = 0x08;</webidl>
10838 <Type type="octet"/>
10840 <Const name="HEALTH" value="0x09" id="::Bluetooth::BluetoothClassDeviceMajor::HEALTH">
10841 <webidl> const octet HEALTH = 0x09;</webidl>
10842 <Type type="octet"/>
10844 <Const name="UNCATEGORIZED" value="0x1F" id="::Bluetooth::BluetoothClassDeviceMajor::UNCATEGORIZED">
10845 <webidl> const octet UNCATEGORIZED = 0x1F;</webidl>
10846 <Type type="octet"/>
10849 <Interface name="BluetoothClassDeviceMinor" id="::Bluetooth::BluetoothClassDeviceMinor">
10850 <webidl> [NoInterfaceObject] interface BluetoothClassDeviceMinor {
10851 const octet COMPUTER_UNCATEGORIZED = 0x00;
10852 const octet COMPUTER_DESKTOP = 0x01;
10853 const octet COMPUTER_SERVER = 0x02;
10854 const octet COMPUTER_LAPTOP = 0x03;
10855 const octet COMPUTER_HANDHELD_PC_OR_PDA = 0x04;
10856 const octet COMPUTER_PALM_PC_OR_PDA = 0x05;
10857 const octet COMPUTER_WEARABLE = 0x06;
10859 const octet PHONE_UNCATEGORIZED = 0x00;
10860 const octet PHONE_CELLULAR = 0x01;
10861 const octet PHONE_CORDLESS = 0x02;
10862 const octet PHONE_SMARTPHONE = 0x03;
10863 const octet PHONE_MODEM_OR_GATEWAY = 0x04;
10864 const octet PHONE_ISDN = 0x05;
10866 const octet AV_UNRECOGNIZED = 0x00;
10867 const octet AV_WEARABLE_HEADSET = 0x01;
10868 const octet AV_HANDSFREE = 0x02;
10869 const octet AV_MICROPHONE = 0x04;
10870 const octet AV_LOUDSPEAKER = 0x05;
10871 const octet AV_HEADPHONES = 0x06;
10872 const octet AV_PORTABLE_AUDIO = 0x07;
10873 const octet AV_CAR_AUDIO = 0x08;
10874 const octet AV_SETTOP_BOX = 0x09;
10875 const octet AV_HIFI = 0x0a;
10876 const octet AV_VCR = 0x0b;
10877 const octet AV_VIDEO_CAMERA = 0x0c;
10878 const octet AV_CAMCORDER = 0x0d;
10879 const octet AV_MONITOR = 0x0e;
10880 const octet AV_DISPLAY_AND_LOUDSPEAKER = 0x0f;
10881 const octet AV_VIDEO_CONFERENCING = 0x10;
10882 const octet AV_GAMING_TOY = 0x12;
10884 const octet PERIPHERAL_UNCATEGORIZED = 0;
10885 const octet PERIPHERAL_KEYBOARD = 0x10;
10886 const octet PERIPHERAL_POINTING_DEVICE = 0x20;
10887 const octet PERIPHERAL_KEYBOARD_AND_POINTING_DEVICE = 0x30;
10888 const octet PERIPHERAL_JOYSTICK = 0x01;
10889 const octet PERIPHERAL_GAMEPAD = 0x02;
10890 const octet PERIPHERAL_REMOTE_CONTROL = 0x03;
10891 const octet PERIPHERAL_SENSING_DEVICE = 0x04;
10892 const octet PERIPHERAL_DEGITIZER_TABLET = 0x05;
10893 const octet PERIPHERAL_CARD_READER = 0x06;
10894 const octet PERIPHERAL_DIGITAL_PEN = 0x07;
10895 const octet PERIPHERAL_HANDHELD_SCANNER = 0x08;
10896 const octet PERIPHERAL_HANDHELD_INPUT_DEVICE = 0x09;
10898 const octet IMAGING_UNCATEGORIZED = 0x00;
10899 const octet IMAGING_DISPLAY = 0x04;
10900 const octet IMAGING_CAMERA = 0x08;
10901 const octet IMAGING_SCANNER = 0x10;
10902 const octet IMAGING_PRINTER = 0x20;
10904 const octet WEARABLE_WRITST_WATCH = 0x01;
10905 const octet WEARABLE_PAGER = 0x02;
10906 const octet WEARABLE_JACKET = 0x03;
10907 const octet WEARABLE_HELMET = 0x04;
10908 const octet WEARABLE_GLASSES = 0x05;
10910 const octet TOY_ROBOT = 0x01;
10911 const octet TOY_VEHICLE = 0x02;
10912 const octet TOY_DOLL = 0x03;
10913 const octet TOY_CONTROLLER = 0x04;
10914 const octet TOY_GAME = 0x05;
10916 const octet HEALTH_UNDEFINED = 0x00;
10917 const octet HEALTH_BLOOD_PRESSURE_MONITOR = 0x01;
10918 const octet HEALTH_THERMOMETER = 0x02;
10919 const octet HEALTH_WEIGHING_SCALE = 0x03;
10920 const octet HEALTH_GLUCOSE_METER = 0x04;
10921 const octet HEALTH_PULSE_OXIMETER = 0x05;
10922 const octet HEALTH_PULSE_RATE_MONITOR = 0x06;
10923 const octet HEALTH_DATA_DISPLAY = 0x07;
10924 const octet HEALTH_STEP_COUNTER = 0x08;
10925 const octet HEALTH_BODY_COMPOSITION_ANALYZER = 0x09;
10926 const octet HEALTH_PEAK_FLOW_MONITOR = 0x0a;
10927 const octet HEALTH_MEDICATION_MONITOR = 0x0b;
10928 const octet HEALTH_KNEE_PROSTHESIS = 0x0c;
10929 const octet HEALTH_ANKLE_PROSTHESIS = 0x0d;
10933 This interface holds the identifiers for minor device classes of Bluetooth CoD.
10939 <ExtendedAttributeList>
10940 <ExtendedAttribute name="NoInterfaceObject">
10941 <webidl>NoInterfaceObject</webidl>
10942 </ExtendedAttribute>
10943 </ExtendedAttributeList>
10944 <Const name="COMPUTER_UNCATEGORIZED" value="0x00" id="::Bluetooth::BluetoothClassDeviceMinor::COMPUTER_UNCATEGORIZED">
10945 <webidl> const octet COMPUTER_UNCATEGORIZED = 0x00;</webidl>
10946 <Type type="octet"/>
10948 <Const name="COMPUTER_DESKTOP" value="0x01" id="::Bluetooth::BluetoothClassDeviceMinor::COMPUTER_DESKTOP">
10949 <webidl> const octet COMPUTER_DESKTOP = 0x01;</webidl>
10950 <Type type="octet"/>
10952 <Const name="COMPUTER_SERVER" value="0x02" id="::Bluetooth::BluetoothClassDeviceMinor::COMPUTER_SERVER">
10953 <webidl> const octet COMPUTER_SERVER = 0x02;</webidl>
10954 <Type type="octet"/>
10956 <Const name="COMPUTER_LAPTOP" value="0x03" id="::Bluetooth::BluetoothClassDeviceMinor::COMPUTER_LAPTOP">
10957 <webidl> const octet COMPUTER_LAPTOP = 0x03;</webidl>
10958 <Type type="octet"/>
10960 <Const name="COMPUTER_HANDHELD_PC_OR_PDA" value="0x04" id="::Bluetooth::BluetoothClassDeviceMinor::COMPUTER_HANDHELD_PC_OR_PDA">
10961 <webidl> const octet COMPUTER_HANDHELD_PC_OR_PDA = 0x04;</webidl>
10962 <Type type="octet"/>
10964 <Const name="COMPUTER_PALM_PC_OR_PDA" value="0x05" id="::Bluetooth::BluetoothClassDeviceMinor::COMPUTER_PALM_PC_OR_PDA">
10965 <webidl> const octet COMPUTER_PALM_PC_OR_PDA = 0x05;</webidl>
10966 <Type type="octet"/>
10968 <Const name="COMPUTER_WEARABLE" value="0x06" id="::Bluetooth::BluetoothClassDeviceMinor::COMPUTER_WEARABLE">
10969 <webidl> const octet COMPUTER_WEARABLE = 0x06;</webidl>
10970 <Type type="octet"/>
10972 <Const name="PHONE_UNCATEGORIZED" value="0x00" id="::Bluetooth::BluetoothClassDeviceMinor::PHONE_UNCATEGORIZED">
10973 <webidl> const octet PHONE_UNCATEGORIZED = 0x00;</webidl>
10974 <Type type="octet"/>
10976 <Const name="PHONE_CELLULAR" value="0x01" id="::Bluetooth::BluetoothClassDeviceMinor::PHONE_CELLULAR">
10977 <webidl> const octet PHONE_CELLULAR = 0x01;</webidl>
10978 <Type type="octet"/>
10980 <Const name="PHONE_CORDLESS" value="0x02" id="::Bluetooth::BluetoothClassDeviceMinor::PHONE_CORDLESS">
10981 <webidl> const octet PHONE_CORDLESS = 0x02;</webidl>
10982 <Type type="octet"/>
10984 <Const name="PHONE_SMARTPHONE" value="0x03" id="::Bluetooth::BluetoothClassDeviceMinor::PHONE_SMARTPHONE">
10985 <webidl> const octet PHONE_SMARTPHONE = 0x03;</webidl>
10986 <Type type="octet"/>
10988 <Const name="PHONE_MODEM_OR_GATEWAY" value="0x04" id="::Bluetooth::BluetoothClassDeviceMinor::PHONE_MODEM_OR_GATEWAY">
10989 <webidl> const octet PHONE_MODEM_OR_GATEWAY = 0x04;</webidl>
10990 <Type type="octet"/>
10992 <Const name="PHONE_ISDN" value="0x05" id="::Bluetooth::BluetoothClassDeviceMinor::PHONE_ISDN">
10993 <webidl> const octet PHONE_ISDN = 0x05;</webidl>
10994 <Type type="octet"/>
10996 <Const name="AV_UNRECOGNIZED" value="0x00" id="::Bluetooth::BluetoothClassDeviceMinor::AV_UNRECOGNIZED">
10997 <webidl> const octet AV_UNRECOGNIZED = 0x00;</webidl>
10998 <Type type="octet"/>
11000 <Const name="AV_WEARABLE_HEADSET" value="0x01" id="::Bluetooth::BluetoothClassDeviceMinor::AV_WEARABLE_HEADSET">
11001 <webidl> const octet AV_WEARABLE_HEADSET = 0x01;</webidl>
11002 <Type type="octet"/>
11004 <Const name="AV_HANDSFREE" value="0x02" id="::Bluetooth::BluetoothClassDeviceMinor::AV_HANDSFREE">
11005 <webidl> const octet AV_HANDSFREE = 0x02;</webidl>
11006 <Type type="octet"/>
11008 <Const name="AV_MICROPHONE" value="0x04" id="::Bluetooth::BluetoothClassDeviceMinor::AV_MICROPHONE">
11009 <webidl> const octet AV_MICROPHONE = 0x04;</webidl>
11010 <Type type="octet"/>
11012 <Const name="AV_LOUDSPEAKER" value="0x05" id="::Bluetooth::BluetoothClassDeviceMinor::AV_LOUDSPEAKER">
11013 <webidl> const octet AV_LOUDSPEAKER = 0x05;</webidl>
11014 <Type type="octet"/>
11016 <Const name="AV_HEADPHONES" value="0x06" id="::Bluetooth::BluetoothClassDeviceMinor::AV_HEADPHONES">
11017 <webidl> const octet AV_HEADPHONES = 0x06;</webidl>
11018 <Type type="octet"/>
11020 <Const name="AV_PORTABLE_AUDIO" value="0x07" id="::Bluetooth::BluetoothClassDeviceMinor::AV_PORTABLE_AUDIO">
11021 <webidl> const octet AV_PORTABLE_AUDIO = 0x07;</webidl>
11022 <Type type="octet"/>
11024 <Const name="AV_CAR_AUDIO" value="0x08" id="::Bluetooth::BluetoothClassDeviceMinor::AV_CAR_AUDIO">
11025 <webidl> const octet AV_CAR_AUDIO = 0x08;</webidl>
11026 <Type type="octet"/>
11028 <Const name="AV_SETTOP_BOX" value="0x09" id="::Bluetooth::BluetoothClassDeviceMinor::AV_SETTOP_BOX">
11029 <webidl> const octet AV_SETTOP_BOX = 0x09;</webidl>
11030 <Type type="octet"/>
11032 <Const name="AV_HIFI" value="0x0a" id="::Bluetooth::BluetoothClassDeviceMinor::AV_HIFI">
11033 <webidl> const octet AV_HIFI = 0x0a;</webidl>
11034 <Type type="octet"/>
11036 <Const name="AV_VCR" value="0x0b" id="::Bluetooth::BluetoothClassDeviceMinor::AV_VCR">
11037 <webidl> const octet AV_VCR = 0x0b;</webidl>
11038 <Type type="octet"/>
11040 <Const name="AV_VIDEO_CAMERA" value="0x0c" id="::Bluetooth::BluetoothClassDeviceMinor::AV_VIDEO_CAMERA">
11041 <webidl> const octet AV_VIDEO_CAMERA = 0x0c;</webidl>
11042 <Type type="octet"/>
11044 <Const name="AV_CAMCORDER" value="0x0d" id="::Bluetooth::BluetoothClassDeviceMinor::AV_CAMCORDER">
11045 <webidl> const octet AV_CAMCORDER = 0x0d;</webidl>
11046 <Type type="octet"/>
11048 <Const name="AV_MONITOR" value="0x0e" id="::Bluetooth::BluetoothClassDeviceMinor::AV_MONITOR">
11049 <webidl> const octet AV_MONITOR = 0x0e;</webidl>
11050 <Type type="octet"/>
11052 <Const name="AV_DISPLAY_AND_LOUDSPEAKER" value="0x0f" id="::Bluetooth::BluetoothClassDeviceMinor::AV_DISPLAY_AND_LOUDSPEAKER">
11053 <webidl> const octet AV_DISPLAY_AND_LOUDSPEAKER = 0x0f;</webidl>
11054 <Type type="octet"/>
11056 <Const name="AV_VIDEO_CONFERENCING" value="0x10" id="::Bluetooth::BluetoothClassDeviceMinor::AV_VIDEO_CONFERENCING">
11057 <webidl> const octet AV_VIDEO_CONFERENCING = 0x10;</webidl>
11058 <Type type="octet"/>
11060 <Const name="AV_GAMING_TOY" value="0x12" id="::Bluetooth::BluetoothClassDeviceMinor::AV_GAMING_TOY">
11061 <webidl> const octet AV_GAMING_TOY = 0x12;</webidl>
11062 <Type type="octet"/>
11064 <Const name="PERIPHERAL_UNCATEGORIZED" value="0" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_UNCATEGORIZED">
11065 <webidl> const octet PERIPHERAL_UNCATEGORIZED = 0;</webidl>
11066 <Type type="octet"/>
11068 <Const name="PERIPHERAL_KEYBOARD" value="0x10" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_KEYBOARD">
11069 <webidl> const octet PERIPHERAL_KEYBOARD = 0x10;</webidl>
11070 <Type type="octet"/>
11072 <Const name="PERIPHERAL_POINTING_DEVICE" value="0x20" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_POINTING_DEVICE">
11073 <webidl> const octet PERIPHERAL_POINTING_DEVICE = 0x20;</webidl>
11074 <Type type="octet"/>
11076 <Const name="PERIPHERAL_KEYBOARD_AND_POINTING_DEVICE" value="0x30" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_KEYBOARD_AND_POINTING_DEVICE">
11077 <webidl> const octet PERIPHERAL_KEYBOARD_AND_POINTING_DEVICE = 0x30;</webidl>
11078 <Type type="octet"/>
11080 <Const name="PERIPHERAL_JOYSTICK" value="0x01" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_JOYSTICK">
11081 <webidl> const octet PERIPHERAL_JOYSTICK = 0x01;</webidl>
11082 <Type type="octet"/>
11084 <Const name="PERIPHERAL_GAMEPAD" value="0x02" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_GAMEPAD">
11085 <webidl> const octet PERIPHERAL_GAMEPAD = 0x02;</webidl>
11086 <Type type="octet"/>
11088 <Const name="PERIPHERAL_REMOTE_CONTROL" value="0x03" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_REMOTE_CONTROL">
11089 <webidl> const octet PERIPHERAL_REMOTE_CONTROL = 0x03;</webidl>
11090 <Type type="octet"/>
11092 <Const name="PERIPHERAL_SENSING_DEVICE" value="0x04" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_SENSING_DEVICE">
11093 <webidl> const octet PERIPHERAL_SENSING_DEVICE = 0x04;</webidl>
11094 <Type type="octet"/>
11096 <Const name="PERIPHERAL_DEGITIZER_TABLET" value="0x05" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_DEGITIZER_TABLET">
11097 <webidl> const octet PERIPHERAL_DEGITIZER_TABLET = 0x05;</webidl>
11098 <Type type="octet"/>
11100 <Const name="PERIPHERAL_CARD_READER" value="0x06" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_CARD_READER">
11101 <webidl> const octet PERIPHERAL_CARD_READER = 0x06;</webidl>
11102 <Type type="octet"/>
11104 <Const name="PERIPHERAL_DIGITAL_PEN" value="0x07" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_DIGITAL_PEN">
11105 <webidl> const octet PERIPHERAL_DIGITAL_PEN = 0x07;</webidl>
11106 <Type type="octet"/>
11108 <Const name="PERIPHERAL_HANDHELD_SCANNER" value="0x08" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_HANDHELD_SCANNER">
11109 <webidl> const octet PERIPHERAL_HANDHELD_SCANNER = 0x08;</webidl>
11110 <Type type="octet"/>
11112 <Const name="PERIPHERAL_HANDHELD_INPUT_DEVICE" value="0x09" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_HANDHELD_INPUT_DEVICE">
11113 <webidl> const octet PERIPHERAL_HANDHELD_INPUT_DEVICE = 0x09;</webidl>
11114 <Type type="octet"/>
11116 <Const name="IMAGING_UNCATEGORIZED" value="0x00" id="::Bluetooth::BluetoothClassDeviceMinor::IMAGING_UNCATEGORIZED">
11117 <webidl> const octet IMAGING_UNCATEGORIZED = 0x00;</webidl>
11118 <Type type="octet"/>
11120 <Const name="IMAGING_DISPLAY" value="0x04" id="::Bluetooth::BluetoothClassDeviceMinor::IMAGING_DISPLAY">
11121 <webidl> const octet IMAGING_DISPLAY = 0x04;</webidl>
11122 <Type type="octet"/>
11124 <Const name="IMAGING_CAMERA" value="0x08" id="::Bluetooth::BluetoothClassDeviceMinor::IMAGING_CAMERA">
11125 <webidl> const octet IMAGING_CAMERA = 0x08;</webidl>
11126 <Type type="octet"/>
11128 <Const name="IMAGING_SCANNER" value="0x10" id="::Bluetooth::BluetoothClassDeviceMinor::IMAGING_SCANNER">
11129 <webidl> const octet IMAGING_SCANNER = 0x10;</webidl>
11130 <Type type="octet"/>
11132 <Const name="IMAGING_PRINTER" value="0x20" id="::Bluetooth::BluetoothClassDeviceMinor::IMAGING_PRINTER">
11133 <webidl> const octet IMAGING_PRINTER = 0x20;</webidl>
11134 <Type type="octet"/>
11136 <Const name="WEARABLE_WRITST_WATCH" value="0x01" id="::Bluetooth::BluetoothClassDeviceMinor::WEARABLE_WRITST_WATCH">
11137 <webidl> const octet WEARABLE_WRITST_WATCH = 0x01;</webidl>
11138 <Type type="octet"/>
11140 <Const name="WEARABLE_PAGER" value="0x02" id="::Bluetooth::BluetoothClassDeviceMinor::WEARABLE_PAGER">
11141 <webidl> const octet WEARABLE_PAGER = 0x02;</webidl>
11142 <Type type="octet"/>
11144 <Const name="WEARABLE_JACKET" value="0x03" id="::Bluetooth::BluetoothClassDeviceMinor::WEARABLE_JACKET">
11145 <webidl> const octet WEARABLE_JACKET = 0x03;</webidl>
11146 <Type type="octet"/>
11148 <Const name="WEARABLE_HELMET" value="0x04" id="::Bluetooth::BluetoothClassDeviceMinor::WEARABLE_HELMET">
11149 <webidl> const octet WEARABLE_HELMET = 0x04;</webidl>
11150 <Type type="octet"/>
11152 <Const name="WEARABLE_GLASSES" value="0x05" id="::Bluetooth::BluetoothClassDeviceMinor::WEARABLE_GLASSES">
11153 <webidl> const octet WEARABLE_GLASSES = 0x05;</webidl>
11154 <Type type="octet"/>
11156 <Const name="TOY_ROBOT" value="0x01" id="::Bluetooth::BluetoothClassDeviceMinor::TOY_ROBOT">
11157 <webidl> const octet TOY_ROBOT = 0x01;</webidl>
11158 <Type type="octet"/>
11160 <Const name="TOY_VEHICLE" value="0x02" id="::Bluetooth::BluetoothClassDeviceMinor::TOY_VEHICLE">
11161 <webidl> const octet TOY_VEHICLE = 0x02;</webidl>
11162 <Type type="octet"/>
11164 <Const name="TOY_DOLL" value="0x03" id="::Bluetooth::BluetoothClassDeviceMinor::TOY_DOLL">
11165 <webidl> const octet TOY_DOLL = 0x03;</webidl>
11166 <Type type="octet"/>
11168 <Const name="TOY_CONTROLLER" value="0x04" id="::Bluetooth::BluetoothClassDeviceMinor::TOY_CONTROLLER">
11169 <webidl> const octet TOY_CONTROLLER = 0x04;</webidl>
11170 <Type type="octet"/>
11172 <Const name="TOY_GAME" value="0x05" id="::Bluetooth::BluetoothClassDeviceMinor::TOY_GAME">
11173 <webidl> const octet TOY_GAME = 0x05;</webidl>
11174 <Type type="octet"/>
11176 <Const name="HEALTH_UNDEFINED" value="0x00" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_UNDEFINED">
11177 <webidl> const octet HEALTH_UNDEFINED = 0x00;</webidl>
11178 <Type type="octet"/>
11180 <Const name="HEALTH_BLOOD_PRESSURE_MONITOR" value="0x01" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_BLOOD_PRESSURE_MONITOR">
11181 <webidl> const octet HEALTH_BLOOD_PRESSURE_MONITOR = 0x01;</webidl>
11182 <Type type="octet"/>
11184 <Const name="HEALTH_THERMOMETER" value="0x02" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_THERMOMETER">
11185 <webidl> const octet HEALTH_THERMOMETER = 0x02;</webidl>
11186 <Type type="octet"/>
11188 <Const name="HEALTH_WEIGHING_SCALE" value="0x03" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_WEIGHING_SCALE">
11189 <webidl> const octet HEALTH_WEIGHING_SCALE = 0x03;</webidl>
11190 <Type type="octet"/>
11192 <Const name="HEALTH_GLUCOSE_METER" value="0x04" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_GLUCOSE_METER">
11193 <webidl> const octet HEALTH_GLUCOSE_METER = 0x04;</webidl>
11194 <Type type="octet"/>
11196 <Const name="HEALTH_PULSE_OXIMETER" value="0x05" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_PULSE_OXIMETER">
11197 <webidl> const octet HEALTH_PULSE_OXIMETER = 0x05;</webidl>
11198 <Type type="octet"/>
11200 <Const name="HEALTH_PULSE_RATE_MONITOR" value="0x06" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_PULSE_RATE_MONITOR">
11201 <webidl> const octet HEALTH_PULSE_RATE_MONITOR = 0x06;</webidl>
11202 <Type type="octet"/>
11204 <Const name="HEALTH_DATA_DISPLAY" value="0x07" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_DATA_DISPLAY">
11205 <webidl> const octet HEALTH_DATA_DISPLAY = 0x07;</webidl>
11206 <Type type="octet"/>
11208 <Const name="HEALTH_STEP_COUNTER" value="0x08" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_STEP_COUNTER">
11209 <webidl> const octet HEALTH_STEP_COUNTER = 0x08;</webidl>
11210 <Type type="octet"/>
11212 <Const name="HEALTH_BODY_COMPOSITION_ANALYZER" value="0x09" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_BODY_COMPOSITION_ANALYZER">
11213 <webidl> const octet HEALTH_BODY_COMPOSITION_ANALYZER = 0x09;</webidl>
11214 <Type type="octet"/>
11216 <Const name="HEALTH_PEAK_FLOW_MONITOR" value="0x0a" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_PEAK_FLOW_MONITOR">
11217 <webidl> const octet HEALTH_PEAK_FLOW_MONITOR = 0x0a;</webidl>
11218 <Type type="octet"/>
11220 <Const name="HEALTH_MEDICATION_MONITOR" value="0x0b" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_MEDICATION_MONITOR">
11221 <webidl> const octet HEALTH_MEDICATION_MONITOR = 0x0b;</webidl>
11222 <Type type="octet"/>
11224 <Const name="HEALTH_KNEE_PROSTHESIS" value="0x0c" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_KNEE_PROSTHESIS">
11225 <webidl> const octet HEALTH_KNEE_PROSTHESIS = 0x0c;</webidl>
11226 <Type type="octet"/>
11228 <Const name="HEALTH_ANKLE_PROSTHESIS" value="0x0d" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_ANKLE_PROSTHESIS">
11229 <webidl> const octet HEALTH_ANKLE_PROSTHESIS = 0x0d;</webidl>
11230 <Type type="octet"/>
11233 <Interface name="BluetoothClassDeviceService" id="::Bluetooth::BluetoothClassDeviceService">
11234 <webidl> [NoInterfaceObject] interface BluetoothClassDeviceService {
11235 const unsigned short LIMITED_DISCOVERABILITY = 0x0001;
11236 const unsigned short POSITIONING = 0x0008;
11237 const unsigned short NETWORKING = 0x0010;
11238 const unsigned short RENDERING = 0x0020;
11239 const unsigned short CAPTURING = 0x0040;
11240 const unsigned short OBJECT_TRANSFER = 0x0080;
11241 const unsigned short AUDIO = 0x0100;
11242 const unsigned short TELEPHONY = 0x0200;
11243 const unsigned short INFORMATION = 0x0400;
11247 This interface holds identifiers for the major service classes of Bluetooth CoD.
11253 <ExtendedAttributeList>
11254 <ExtendedAttribute name="NoInterfaceObject">
11255 <webidl>NoInterfaceObject</webidl>
11256 </ExtendedAttribute>
11257 </ExtendedAttributeList>
11258 <Const name="LIMITED_DISCOVERABILITY" value="0x0001" id="::Bluetooth::BluetoothClassDeviceService::LIMITED_DISCOVERABILITY">
11259 <webidl> const unsigned short LIMITED_DISCOVERABILITY = 0x0001;</webidl>
11260 <Type type="unsigned short"/>
11262 <Const name="POSITIONING" value="0x0008" id="::Bluetooth::BluetoothClassDeviceService::POSITIONING">
11263 <webidl> const unsigned short POSITIONING = 0x0008;</webidl>
11264 <Type type="unsigned short"/>
11266 <Const name="NETWORKING" value="0x0010" id="::Bluetooth::BluetoothClassDeviceService::NETWORKING">
11267 <webidl> const unsigned short NETWORKING = 0x0010;</webidl>
11268 <Type type="unsigned short"/>
11270 <Const name="RENDERING" value="0x0020" id="::Bluetooth::BluetoothClassDeviceService::RENDERING">
11271 <webidl> const unsigned short RENDERING = 0x0020;</webidl>
11272 <Type type="unsigned short"/>
11274 <Const name="CAPTURING" value="0x0040" id="::Bluetooth::BluetoothClassDeviceService::CAPTURING">
11275 <webidl> const unsigned short CAPTURING = 0x0040;</webidl>
11276 <Type type="unsigned short"/>
11278 <Const name="OBJECT_TRANSFER" value="0x0080" id="::Bluetooth::BluetoothClassDeviceService::OBJECT_TRANSFER">
11279 <webidl> const unsigned short OBJECT_TRANSFER = 0x0080;</webidl>
11280 <Type type="unsigned short"/>
11282 <Const name="AUDIO" value="0x0100" id="::Bluetooth::BluetoothClassDeviceService::AUDIO">
11283 <webidl> const unsigned short AUDIO = 0x0100;</webidl>
11284 <Type type="unsigned short"/>
11286 <Const name="TELEPHONY" value="0x0200" id="::Bluetooth::BluetoothClassDeviceService::TELEPHONY">
11287 <webidl> const unsigned short TELEPHONY = 0x0200;</webidl>
11288 <Type type="unsigned short"/>
11290 <Const name="INFORMATION" value="0x0400" id="::Bluetooth::BluetoothClassDeviceService::INFORMATION">
11291 <webidl> const unsigned short INFORMATION = 0x0400;</webidl>
11292 <Type type="unsigned short"/>
11295 <Interface name="BluetoothServiceHandler" id="::Bluetooth::BluetoothServiceHandler">
11296 <webidl> [NoInterfaceObject] interface BluetoothServiceHandler {
11297 readonly attribute <ref>BluetoothUUID</ref> uuid;
11298 readonly attribute DOMString name;
11299 readonly attribute boolean isConnected;
11300 [TreatNonCallableAsNull] attribute <ref>BluetoothSocketSuccessCallback</ref>? onconnect raises(<ref>WebAPIException</ref>);
11302 void unregister(optional <ref>SuccessCallback</ref>? successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
11306 This interface provides methods to handle Bluetooth service.
11312 <ExtendedAttributeList>
11313 <ExtendedAttribute name="NoInterfaceObject">
11314 <webidl>NoInterfaceObject</webidl>
11315 </ExtendedAttribute>
11316 </ExtendedAttributeList>
11317 <Attribute readonly="readonly" name="uuid" id="::Bluetooth::BluetoothServiceHandler::uuid">
11318 <webidl> readonly attribute <ref>BluetoothUUID</ref> uuid;</webidl>
11321 The UUID of the service.
11327 <Type name="BluetoothUUID"/>
11329 <Attribute readonly="readonly" name="name" id="::Bluetooth::BluetoothServiceHandler::name">
11330 <webidl> readonly attribute DOMString name;</webidl>
11333 The name of the service.
11339 <Type type="DOMString"/>
11341 <Attribute readonly="readonly" name="isConnected" id="::Bluetooth::BluetoothServiceHandler::isConnected">
11342 <webidl> readonly attribute boolean isConnected;</webidl>
11345 An attribute to check whether any remote devices is using this service or not.
11351 <Type type="boolean"/>
11353 <Attribute name="onconnect" id="::Bluetooth::BluetoothServiceHandler::onconnect">
11354 <webidl> [TreatNonCallableAsNull] attribute <ref>BluetoothSocketSuccessCallback</ref>? onconnect raises(<ref>WebAPIException</ref>);</webidl>
11357 The success callback to be invoked when a remote device is connected to this service.
11358 By default, this attribute is set to null.
11364 <ExtendedAttributeList>
11365 <ExtendedAttribute name="TreatNonCallableAsNull">
11366 <webidl>TreatNonCallableAsNull</webidl>
11367 </ExtendedAttribute>
11368 </ExtendedAttributeList>
11369 <Type name="BluetoothSocketSuccessCallback" nullable="nullable"/>
11371 <RaiseException name="WebAPIException">
11374 with error type TypeMismatchError, if any input attribute is not compatible with the expected type for this attribute.
11380 <Operation name="unregister" id="::Bluetooth::BluetoothServiceHandler::unregister">
11381 <webidl> void unregister(optional <ref>SuccessCallback</ref>? successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
11384 Unregisters a service record from the Bluetooth services record database and stops listening for new connections to this service.
11388 The ErrorCallback is launched with these error types:
11392 UnknownError - If any other error occurs. </li>
11402 http://tizen.org/privilege/bluetooth.spp
11404 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
11405 var chatServiceHandler = null;
11407 function chatServiceSuccessCb(handler) {
11408 console.log("Chat service registration was successful!");
11410 chatServiceHandler = handler;
11411 handler.onconnect = function(socket) {
11412 console.log("Client is connected: " + socket.peer.name + "," + socket.peer.address);
11413 socket.onmessage = function() {
11414 var data = socket.readData();
11415 // Handle message code goes here
11420 socket.onclose = function() {
11421 console.log('The socket is closed.');
11426 function publishChatService()
11428 var CHAT_SERVICE_UUID = "5BCE9431-6C75-32AB-AFE0-2EC108A30860";
11429 adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCb,
11432 console.log( "Could not register service record, Error: " + e.message);
11436 function unRegisterChatService()
11438 if (chatServiceHandler != null) {
11439 chatServiceHandler.unregister(function() {
11440 chatServiceHandler = null;
11441 console.log("Chat service is unregistered.");
11444 console.log ("Error: " + e.message);
11450 <Type type="void"/>
11452 <Argument optional="optional" name="successCallback">
11455 The method to be invoked when the record is removed successfully from the service records database.
11458 <Type name="SuccessCallback" nullable="nullable"/>
11460 <Argument optional="optional" name="errorCallback">
11463 The method to be invoked in case of failure (to unregister).
11466 <Type name="ErrorCallback" nullable="nullable"/>
11470 <RaiseException name="WebAPIException">
11473 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
11476 with error type SecurityError, if the application does not have the privilege to call this method.
11479 with error type NotSupportedError, if this feature is not supported.
11486 <Interface name="BluetoothProfileHandler" id="::Bluetooth::BluetoothProfileHandler">
11487 <webidl> [NoInterfaceObject] interface BluetoothProfileHandler {
11489 readonly attribute <ref>BluetoothProfileType</ref> profileType;
11494 This interface represents the Bluetooth profile handler.
11500 <ExtendedAttributeList>
11501 <ExtendedAttribute name="NoInterfaceObject">
11502 <webidl>NoInterfaceObject</webidl>
11503 </ExtendedAttribute>
11504 </ExtendedAttributeList>
11505 <Attribute readonly="readonly" name="profileType" id="::Bluetooth::BluetoothProfileHandler::profileType">
11506 <webidl> readonly attribute <ref>BluetoothProfileType</ref> profileType;</webidl>
11509 The type of Bluetooth profile.
11515 <Type name="BluetoothProfileType"/>
11518 <Interface name="BluetoothHealthProfileHandler" id="::Bluetooth::BluetoothHealthProfileHandler">
11519 <webidl> [NoInterfaceObject] interface BluetoothHealthProfileHandler : <ref>BluetoothProfileHandler</ref> {
11521 void registerSinkApplication(unsigned short dataType, DOMString name, <ref>BluetoothHealthApplicationSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
11523 void connectToSource(<ref>BluetoothDevice</ref> peer, <ref>BluetoothHealthApplication</ref> application, <ref>BluetoothHealthChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
11528 This interface represents the handler of Bluetooth health device profile.
11529 The BluetoothHealthProfileHandler object is created by <em>BluetoothAdapter.getBluetoothProfileHandler()</em>.
11535 <ExtendedAttributeList>
11536 <ExtendedAttribute name="NoInterfaceObject">
11537 <webidl>NoInterfaceObject</webidl>
11538 </ExtendedAttribute>
11539 </ExtendedAttributeList>
11540 <InterfaceInheritance>
11541 <Name name="BluetoothProfileHandler"/>
11542 </InterfaceInheritance>
11543 <Operation name="registerSinkApplication" id="::Bluetooth::BluetoothHealthProfileHandler::registerSinkApplication">
11544 <webidl> void registerSinkApplication(unsigned short dataType, DOMString name, <ref>BluetoothHealthApplicationSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
11547 Registers an application for the Sink role.
11551 The ErrorCallback is launched with these error types:
11555 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
11557 UnknownError - If any other error occurs. </li>
11567 http://tizen.org/privilege/bluetooth.health
11569 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
11570 var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
11572 function healthRegisterSuccess(app) {
11573 console.log("Registered application: " + app.name);
11576 function healthRegisterError(e) {
11577 console.log("Failed to register application: " + e.message);
11580 healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
11583 <Type type="void"/>
11585 <Argument name="dataType">
11588 The MDEP data type used for communication, which is referenced in the ISO/IEEE 11073-20601 spec. For example, pulse oximeter is 4100 and blood pressure monitor is 4103.
11591 <Type type="unsigned short"/>
11593 <Argument name="name">
11596 The friendly name associated with sink application.
11599 <Type type="DOMString"/>
11601 <Argument name="successCallback">
11604 The method to invoke when a sink application is registered successfully.
11607 <Type name="BluetoothHealthApplicationSuccessCallback"/>
11609 <Argument optional="optional" name="errorCallback">
11612 The method to invoke when an error occurs.
11615 <Type name="ErrorCallback" nullable="nullable"/>
11619 <RaiseException name="WebAPIException">
11622 with error type SecurityError, if the application does not have the privilege to call this method.
11625 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
11628 with error type NotSupportedError, if this feature is not supported.
11634 <Operation name="connectToSource" id="::Bluetooth::BluetoothHealthProfileHandler::connectToSource">
11635 <webidl> void connectToSource(<ref>BluetoothDevice</ref> peer, <ref>BluetoothHealthApplication</ref> application, <ref>BluetoothHealthChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
11638 Connect to the health device which acts as the Source role.
11642 The ErrorCallback is launched with these error types:
11646 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
11648 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
11650 UnknownError - If any other error occurs. </li>
11660 http://tizen.org/privilege/bluetooth.health
11662 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
11663 var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
11664 var registerHealthApp = null;
11666 function healthConnectSuccess(channel) {
11667 console.log("Health device is connected");
11670 function healthConnectError(e) {
11671 console.log("Failed to connect to source: " + e.message);
11674 function gotDeviceInfo(device) {
11675 healthProfileHandler.connectToSource(device, registerHealthApp, healthConnectSuccess, healthConnectError);
11678 function healthRegisterSuccess(app) {
11679 console.log("Registered application: " + app.name);
11680 registerHealthApp = app;
11681 var peer = adapter.getDevice("35:F4:59:D1:7A:03", gotDeviceInfo);
11684 function healthRegisterError(e) {
11685 console.log("Failed to register application: " + e.message);
11688 healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
11691 <Type type="void"/>
11693 <Argument name="peer">
11696 The remote device which acts as the Source role.
11699 <Type name="BluetoothDevice"/>
11701 <Argument name="application">
11704 The registered application for the Sink role.
11707 <Type name="BluetoothHealthApplication"/>
11709 <Argument name="successCallback">
11712 The method to invoke when a connection is established successfully.
11715 <Type name="BluetoothHealthChannelSuccessCallback"/>
11717 <Argument optional="optional" name="errorCallback">
11720 The method to invoke when an error occurs.
11723 <Type name="ErrorCallback" nullable="nullable"/>
11727 <RaiseException name="WebAPIException">
11730 with error type SecurityError, if the application does not have the privilege to call this method.
11733 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
11736 with error type NotSupportedError, if this feature is not supported.
11743 <Interface name="BluetoothHealthApplication" id="::Bluetooth::BluetoothHealthApplication">
11744 <webidl> [NoInterfaceObject] interface BluetoothHealthApplication {
11746 readonly attribute unsigned short dataType;
11748 readonly attribute DOMString name;
11750 [TreatNonCallableAsNull] attribute <ref>BluetoothHealthChannelSuccessCallback</ref>? onconnect raises(<ref>WebAPIException</ref>);
11752 void unregister(optional <ref>SuccessCallback</ref>? successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
11757 This interface represents the Bluetooth health application.
11763 <ExtendedAttributeList>
11764 <ExtendedAttribute name="NoInterfaceObject">
11765 <webidl>NoInterfaceObject</webidl>
11766 </ExtendedAttribute>
11767 </ExtendedAttributeList>
11768 <Attribute readonly="readonly" name="dataType" id="::Bluetooth::BluetoothHealthApplication::dataType">
11769 <webidl> readonly attribute unsigned short dataType;</webidl>
11772 The MDEP data type used for communication, which is referenced in the ISO/IEEE 11073-20601 spec. For example, pulse oximeter is 4100 and blood pressure monitor is 4103.
11778 <Type type="unsigned short"/>
11780 <Attribute readonly="readonly" name="name" id="::Bluetooth::BluetoothHealthApplication::name">
11781 <webidl> readonly attribute DOMString name;</webidl>
11784 The friendly name associated with sink application.
11790 <Type type="DOMString"/>
11792 <Attribute name="onconnect" id="::Bluetooth::BluetoothHealthApplication::onconnect">
11793 <webidl> [TreatNonCallableAsNull] attribute <ref>BluetoothHealthChannelSuccessCallback</ref>? onconnect raises(<ref>WebAPIException</ref>);</webidl>
11796 The callback invoked when a health device is connected through this application.
11797 By default, this attribute is set to null.
11803 <ExtendedAttributeList>
11804 <ExtendedAttribute name="TreatNonCallableAsNull">
11805 <webidl>TreatNonCallableAsNull</webidl>
11806 </ExtendedAttribute>
11807 </ExtendedAttributeList>
11808 <Type name="BluetoothHealthChannelSuccessCallback" nullable="nullable"/>
11810 <RaiseException name="WebAPIException">
11813 with error type TypeMismatchError, if an input attribute is not compatible with the expected type for this attribute.
11819 <Operation name="unregister" id="::Bluetooth::BluetoothHealthApplication::unregister">
11820 <webidl> void unregister(optional <ref>SuccessCallback</ref>? successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
11823 Unregisters this application.
11827 The ErrorCallback is launched with these error types:
11831 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
11833 UnknownError - If any other error occurs. </li>
11843 http://tizen.org/privilege/bluetooth.health
11845 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
11846 var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
11847 var healthApp = null;
11849 function healthRegisterSuccess(app) {
11850 console.log("Registered application: " + app.name);
11852 healthApp.onconnect = function(channel) {
11853 console.log("Connected!!");
11857 function healthRegisterError(e) {
11858 console.log("Failed to register application: " + e.message);
11861 function startSink() {
11863 healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
11865 console.log("Error: " + e.message);
11869 function stopSink() {
11871 if(healthApp != null) {
11872 healthApp.unregister(function() {
11874 console.log("Health application is unregistered.");
11877 console.log ("Error: " + e.message);
11881 console.log("Error: " + err.message);
11886 <Type type="void"/>
11888 <Argument optional="optional" name="successCallback">
11891 The method to invoke when a sink application is registered successfully.
11894 <Type name="SuccessCallback" nullable="nullable"/>
11896 <Argument optional="optional" name="errorCallback">
11899 The method to invoke when an error occurs.
11902 <Type name="ErrorCallback" nullable="nullable"/>
11906 <RaiseException name="WebAPIException">
11909 with error type SecurityError, if the application does not have the privilege to call this method.
11912 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
11915 with error type NotSupportedError, if this feature is not supported.
11922 <Interface name="BluetoothHealthChannel" id="::Bluetooth::BluetoothHealthChannel">
11923 <webidl> [NoInterfaceObject] interface BluetoothHealthChannel {
11925 readonly attribute <ref>BluetoothDevice</ref> peer;
11927 readonly attribute <ref>BluetoothHealthChannelType</ref> channelType;
11929 readonly attribute <ref>BluetoothHealthApplication</ref> application;
11931 readonly attribute boolean isConnected;
11933 void close() raises(<ref>WebAPIException</ref>);
11935 unsigned long sendData(byte[] data) raises(<ref>WebAPIException</ref>);
11937 void setListener(<ref>BluetoothHealthChannelChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);
11939 void unsetListener() raises(<ref>WebAPIException</ref>);
11944 This interface represents the Bluetooth health channel.
11950 <ExtendedAttributeList>
11951 <ExtendedAttribute name="NoInterfaceObject">
11952 <webidl>NoInterfaceObject</webidl>
11953 </ExtendedAttribute>
11954 </ExtendedAttributeList>
11955 <Attribute readonly="readonly" name="peer" id="::Bluetooth::BluetoothHealthChannel::peer">
11956 <webidl> readonly attribute <ref>BluetoothDevice</ref> peer;</webidl>
11959 The remote device to which this channel is connected.
11965 <Type name="BluetoothDevice"/>
11967 <Attribute readonly="readonly" name="channelType" id="::Bluetooth::BluetoothHealthChannel::channelType">
11968 <webidl> readonly attribute <ref>BluetoothHealthChannelType</ref> channelType;</webidl>
11971 The type of of this channel.
11977 <Type name="BluetoothHealthChannelType"/>
11979 <Attribute readonly="readonly" name="application" id="::Bluetooth::BluetoothHealthChannel::application">
11980 <webidl> readonly attribute <ref>BluetoothHealthApplication</ref> application;</webidl>
11983 The health application which is used to communicate with the remote device.
11989 <Type name="BluetoothHealthApplication"/>
11991 <Attribute readonly="readonly" name="isConnected" id="::Bluetooth::BluetoothHealthChannel::isConnected">
11992 <webidl> readonly attribute boolean isConnected;</webidl>
11995 An attrbitue to check whether any remote device is connected or not.
12001 <Type type="boolean"/>
12003 <Operation name="close" id="::Bluetooth::BluetoothHealthChannel::close">
12004 <webidl> void close() raises(<ref>WebAPIException</ref>);</webidl>
12007 Close the connected channel.
12008 <em>BluetoothHealthChannel.isConnected</em> is changed to <var>false</var> and <em>BluetoothHealthChannelChangeCallback.onclose</em> is invoked when this channel is closed successfully.
12017 http://tizen.org/privilege/bluetooth.health
12019 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
12020 var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
12022 function healthRegisterSuccess(app) {
12023 console.log("Registered application: " + app.name);
12024 app.onconnect = function(channel) {;
12025 console.log("Health device is connected");
12030 function healthRegisterError(e) {
12031 console.log("Failed to register application: " + e.message);
12034 healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
12037 <Type type="void"/>
12040 <RaiseException name="WebAPIException">
12043 with error type SecurityError, if the application does not have the privilege to call this method.
12046 with error type ServiceNotAvailableError - If a Bluetooth device is turned off.
12049 with error type UnknownError, if any other error occurs.
12052 with error type NotSupportedError, if this feature is not supported.
12058 <Operation name="sendData" id="::Bluetooth::BluetoothHealthChannel::sendData">
12059 <webidl> unsigned long sendData(byte[] data) raises(<ref>WebAPIException</ref>);</webidl>
12062 Send data and returns the number of bytes actually written.
12071 http://tizen.org/privilege/bluetooth.health
12073 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
12074 var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
12076 function healthRegisterSuccess(app) {
12077 console.log("Registered application: " + app.name);
12078 app.onconnect = function(channel) {
12079 console.log("Health device is connected");
12080 channel.sendData(dataToSend);
12084 function healthRegisterError(e) {
12085 console.log("Failed to register application: " + e.message);
12088 healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
12091 <Type type="unsigned long">
12094 unsigned long The number of bytes actually sent.
12099 <Argument name="data">
12105 <Type type="array">
12106 <Type type="byte"/>
12111 <RaiseException name="WebAPIException">
12114 with error type SecurityError, if the application does not have the privilege to call this method.
12117 with error type ServiceNotAvailableError - If a Bluetooth device is turned off.
12120 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
12123 with error type UnknownError, if any other error occurs.
12126 with error type NotSupportedError, if this feature is not supported.
12132 <Operation name="setListener" id="::Bluetooth::BluetoothHealthChannel::setListener">
12133 <webidl> void setListener(<ref>BluetoothHealthChannelChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);</webidl>
12136 Sets the listener to receive notifications.
12145 http://tizen.org/privilege/bluetooth.health
12147 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
12148 var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
12150 var channelCallback = {
12151 onmessage: function(data) {
12152 console.log("data is received")
12154 onclose: function() {
12155 console.log("channel is closed");
12159 function healthRegisterSuccess(app) {
12160 console.log("Registered application: " + app.name);
12161 app.onconnect = function(channel) {;
12162 console.log("Health device is connected");
12163 channel.setListener(channelCallback);
12167 function healthRegisterError(e) {
12168 console.log("Failed to register application: " + e.message);
12171 healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
12174 <Type type="void"/>
12176 <Argument name="listener">
12179 The event listener of Bluetooth health channel.
12182 <Type name="BluetoothHealthChannelChangeCallback"/>
12186 <RaiseException name="WebAPIException">
12189 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
12192 with error type SecurityError, if the application does not have the privilege to call this method.
12195 with error type UnknownError, if any other error occurs.
12201 <Operation name="unsetListener" id="::Bluetooth::BluetoothHealthChannel::unsetListener">
12202 <webidl> void unsetListener() raises(<ref>WebAPIException</ref>);</webidl>
12205 Unsets the listener, so stop receiving notifications.
12214 http://tizen.org/privilege/bluetooth.health
12216 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
12217 var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
12218 var connectedChannel = null;
12220 var channelCallback = {
12221 onmessage: function(data) {
12222 console.log("data is received")
12224 onclose: function() {
12225 console.log("channel is closed");
12226 connectedChannel.unsetListener();
12230 function healthRegisterSuccess(app) {
12231 console.log("Registered application: " + app.name);
12232 app.onconnect = function(channel) {;
12233 console.log("Health device is connected");
12234 connectedChannel = channel;
12235 connectedChannel.setListener(channelCallback);
12239 function healthRegisterError(e) {
12240 console.log("Failed to register application: " + e.message);
12243 healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
12246 <Type type="void"/>
12249 <RaiseException name="WebAPIException">
12252 with error type SecurityError, if the application does not have the privilege to call this method.
12255 with error type UnknownError, if any other error occurs.
12262 <Interface name="BluetoothAdapterChangeCallback" id="::Bluetooth::BluetoothAdapterChangeCallback">
12263 <webidl> [Callback, NoInterfaceObject] interface BluetoothAdapterChangeCallback {
12264 void onstatechanged(boolean powered);
12265 void onnamechanged(DOMString name);
12266 void onvisibilitychanged(boolean visible);
12270 This interface specifies a set of methods to be invoked when the changes of Bluetooth adapter occur.
12276 <ExtendedAttributeList>
12277 <ExtendedAttribute name="Callback">
12278 <webidl>Callback</webidl>
12279 </ExtendedAttribute>
12280 <ExtendedAttribute name="NoInterfaceObject">
12281 <webidl> NoInterfaceObject</webidl>
12282 </ExtendedAttribute>
12283 </ExtendedAttributeList>
12284 <Operation name="onstatechanged" id="::Bluetooth::BluetoothAdapterChangeCallback::onstatechanged">
12285 <webidl> void onstatechanged(boolean powered);</webidl>
12288 The method to be invoked when the power state is changed.
12294 <Type type="void"/>
12296 <Argument name="powered">
12299 The power state of local Bluetooth: <var>true</var> means power-on, <var>false</var> means power-off.
12302 <Type type="boolean"/>
12306 <Operation name="onnamechanged" id="::Bluetooth::BluetoothAdapterChangeCallback::onnamechanged">
12307 <webidl> void onnamechanged(DOMString name);</webidl>
12310 The method to be invoked when the name is changed.
12316 <Type type="void"/>
12318 <Argument name="name">
12321 The name of local Bluetooth.
12324 <Type type="DOMString"/>
12328 <Operation name="onvisibilitychanged" id="::Bluetooth::BluetoothAdapterChangeCallback::onvisibilitychanged">
12329 <webidl> void onvisibilitychanged(boolean visible);</webidl>
12332 The method to be invoked when the visibility is changed.
12338 <Type type="void"/>
12340 <Argument name="visible">
12343 The visibility of local Bluetooth: <var>true</var> means that local Bluetooth is discoverable, <var>false</var> means that local Bluetooth is hidden from other devices.
12346 <Type type="boolean"/>
12351 <Interface name="BluetoothDeviceSuccessCallback" id="::Bluetooth::BluetoothDeviceSuccessCallback">
12352 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothDeviceSuccessCallback {
12353 void onsuccess(<ref>BluetoothDevice</ref> device);
12357 This interface implements the success callback <em>BluetoothAdapter.getDevice() </em>and <em>BluetoothAdapter.createBonding()</em>.
12363 <ExtendedAttributeList>
12364 <ExtendedAttribute name="Callback" value="FunctionOnly">
12365 <webidl>Callback</webidl>
12366 </ExtendedAttribute>
12367 <ExtendedAttribute name="NoInterfaceObject">
12368 <webidl> NoInterfaceObject</webidl>
12369 </ExtendedAttribute>
12370 </ExtendedAttributeList>
12371 <Operation name="onsuccess" id="::Bluetooth::BluetoothDeviceSuccessCallback::onsuccess">
12372 <webidl> void onsuccess(<ref>BluetoothDevice</ref> device);</webidl>
12375 The method to be invoked on success.
12381 <Type type="void"/>
12383 <Argument name="device">
12386 The BluetoothDevice object.
12389 <Type name="BluetoothDevice"/>
12394 <Interface name="BluetoothDeviceArraySuccessCallback" id="::Bluetooth::BluetoothDeviceArraySuccessCallback">
12395 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothDeviceArraySuccessCallback {
12396 void onsuccess(<ref>BluetoothDevice</ref>[] devices);
12400 The success callback for <em>BluetoothAdapter.getKnownDevices()</em>.
12406 <ExtendedAttributeList>
12407 <ExtendedAttribute name="Callback" value="FunctionOnly">
12408 <webidl>Callback</webidl>
12409 </ExtendedAttribute>
12410 <ExtendedAttribute name="NoInterfaceObject">
12411 <webidl> NoInterfaceObject</webidl>
12412 </ExtendedAttribute>
12413 </ExtendedAttributeList>
12414 <Operation name="onsuccess" id="::Bluetooth::BluetoothDeviceArraySuccessCallback::onsuccess">
12415 <webidl> void onsuccess(<ref>BluetoothDevice</ref>[] devices);</webidl>
12418 The method to be invoked when device information is ready.
12424 <Type type="void"/>
12426 <Argument name="devices">
12429 List of devices known to local Bluetooth adapter. Each element is a BluetoothDevice.
12432 <Type type="array">
12433 <Type name="BluetoothDevice"/>
12439 <Interface name="BluetoothDiscoverDevicesSuccessCallback" id="::Bluetooth::BluetoothDiscoverDevicesSuccessCallback">
12440 <webidl> [Callback, NoInterfaceObject] interface BluetoothDiscoverDevicesSuccessCallback {
12442 void ondevicefound(<ref>BluetoothDevice</ref> device);
12443 void ondevicedisappeared(<ref>BluetoothAddress</ref> address);
12444 void onfinished(<ref>BluetoothDevice</ref>[] foundDevices);
12448 The success callback for <em>BluetoothAdapter.discoverDevices()</em>.
12454 <ExtendedAttributeList>
12455 <ExtendedAttribute name="Callback">
12456 <webidl>Callback</webidl>
12457 </ExtendedAttribute>
12458 <ExtendedAttribute name="NoInterfaceObject">
12459 <webidl> NoInterfaceObject</webidl>
12460 </ExtendedAttribute>
12461 </ExtendedAttributeList>
12462 <Operation name="onstarted" id="::Bluetooth::BluetoothDiscoverDevicesSuccessCallback::onstarted">
12463 <webidl> void onstarted();</webidl>
12466 The method to be invoked at the beginning of a device discovery process for finding the nearby Bluetooth device.
12472 <Type type="void"/>
12475 <Operation name="ondevicefound" id="::Bluetooth::BluetoothDiscoverDevicesSuccessCallback::ondevicefound">
12476 <webidl> void ondevicefound(<ref>BluetoothDevice</ref> device);</webidl>
12479 The method to be invoked when a new device is discovered in the process of inquiry/discovery.
12485 <Type type="void"/>
12487 <Argument name="device">
12493 <Type name="BluetoothDevice"/>
12497 <Operation name="ondevicedisappeared" id="::Bluetooth::BluetoothDiscoverDevicesSuccessCallback::ondevicedisappeared">
12498 <webidl> void ondevicedisappeared(<ref>BluetoothAddress</ref> address);</webidl>
12501 The method to be invoked when a device is lost from proximity.
12502 After that, this device is no longer visible.
12508 <Type type="void"/>
12510 <Argument name="address">
12513 The address of the device that is no longer in range or visible.
12516 <Type name="BluetoothAddress"/>
12520 <Operation name="onfinished" id="::Bluetooth::BluetoothDiscoverDevicesSuccessCallback::onfinished">
12521 <webidl> void onfinished(<ref>BluetoothDevice</ref>[] foundDevices);</webidl>
12524 The method to be invoked when the device discovery process has finished.
12530 <Type type="void"/>
12532 <Argument name="foundDevices">
12535 The array of devices found in this discovery session. </p></description>
12537 <Type type="array">
12538 <Type name="BluetoothDevice"/>
12544 <Interface name="BluetoothSocketSuccessCallback" id="::Bluetooth::BluetoothSocketSuccessCallback">
12545 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothSocketSuccessCallback {
12546 void onsuccess(<ref>BluetoothSocket</ref> socket);
12550 The success method for <em>BluetoothDevice.connectToServiceByUUID()</em>.
12556 <ExtendedAttributeList>
12557 <ExtendedAttribute name="Callback" value="FunctionOnly">
12558 <webidl>Callback</webidl>
12559 </ExtendedAttribute>
12560 <ExtendedAttribute name="NoInterfaceObject">
12561 <webidl> NoInterfaceObject</webidl>
12562 </ExtendedAttribute>
12563 </ExtendedAttributeList>
12564 <Operation name="onsuccess" id="::Bluetooth::BluetoothSocketSuccessCallback::onsuccess">
12565 <webidl> void onsuccess(<ref>BluetoothSocket</ref> socket);</webidl>
12568 The method to be invoked when the connection to a service is ready.
12574 <Type type="void"/>
12576 <Argument name="socket">
12579 The socket to connect to the specified service on a remote device.
12582 <Type name="BluetoothSocket"/>
12587 <Interface name="BluetoothServiceSuccessCallback" id="::Bluetooth::BluetoothServiceSuccessCallback">
12588 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothServiceSuccessCallback {
12589 void onsuccess(<ref>BluetoothServiceHandler</ref> handler);
12593 This interface implements the success callback for <em>BluetoothAdapter.registerRFCOMMServiceByUUID()</em>.
12599 <ExtendedAttributeList>
12600 <ExtendedAttribute name="Callback" value="FunctionOnly">
12601 <webidl>Callback</webidl>
12602 </ExtendedAttribute>
12603 <ExtendedAttribute name="NoInterfaceObject">
12604 <webidl> NoInterfaceObject</webidl>
12605 </ExtendedAttribute>
12606 </ExtendedAttributeList>
12607 <Operation name="onsuccess" id="::Bluetooth::BluetoothServiceSuccessCallback::onsuccess">
12608 <webidl> void onsuccess(<ref>BluetoothServiceHandler</ref> handler);</webidl>
12611 The method to be invoked when registering a service with the local device is successful.
12617 <Type type="void"/>
12619 <Argument name="handler">
12622 Bluetooth service handler.
12625 <Type name="BluetoothServiceHandler"/>
12630 <Interface name="BluetoothHealthApplicationSuccessCallback" id="::Bluetooth::BluetoothHealthApplicationSuccessCallback">
12631 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothHealthApplicationSuccessCallback {
12632 void onsuccess(<ref>BluetoothHealthApplication</ref> application);
12636 The success method for <em>BluetoothHealthProfileHandler.registerSinkApplication()</em>.
12642 <ExtendedAttributeList>
12643 <ExtendedAttribute name="Callback" value="FunctionOnly">
12644 <webidl>Callback</webidl>
12645 </ExtendedAttribute>
12646 <ExtendedAttribute name="NoInterfaceObject">
12647 <webidl> NoInterfaceObject</webidl>
12648 </ExtendedAttribute>
12649 </ExtendedAttributeList>
12650 <Operation name="onsuccess" id="::Bluetooth::BluetoothHealthApplicationSuccessCallback::onsuccess">
12651 <webidl> void onsuccess(<ref>BluetoothHealthApplication</ref> application);</webidl>
12654 The method to be invoked when the application is registered successfully.
12660 <Type type="void"/>
12662 <Argument name="application">
12665 The registered health application.
12668 <Type name="BluetoothHealthApplication"/>
12673 <Interface name="BluetoothHealthChannelSuccessCallback" id="::Bluetooth::BluetoothHealthChannelSuccessCallback">
12674 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothHealthChannelSuccessCallback {
12675 void onsuccess(<ref>BluetoothHealthChannel</ref> channel);
12679 The success method for <em>BluetoothHealthProfileHandler.connectToSource()</em> and the event callback for <em>BluetoothHealthApplication.onconnect</em>.
12685 <ExtendedAttributeList>
12686 <ExtendedAttribute name="Callback" value="FunctionOnly">
12687 <webidl>Callback</webidl>
12688 </ExtendedAttribute>
12689 <ExtendedAttribute name="NoInterfaceObject">
12690 <webidl> NoInterfaceObject</webidl>
12691 </ExtendedAttribute>
12692 </ExtendedAttributeList>
12693 <Operation name="onsuccess" id="::Bluetooth::BluetoothHealthChannelSuccessCallback::onsuccess">
12694 <webidl> void onsuccess(<ref>BluetoothHealthChannel</ref> channel);</webidl>
12697 The method to be invoked when a connection is established.
12703 <Type type="void"/>
12705 <Argument name="channel">
12708 The connected health channel.
12711 <Type name="BluetoothHealthChannel"/>
12716 <Interface name="BluetoothHealthChannelChangeCallback" id="::Bluetooth::BluetoothHealthChannelChangeCallback">
12717 <webidl> [Callback, NoInterfaceObject] interface BluetoothHealthChannelChangeCallback {
12718 void onmessage(byte[] data);
12724 This interface specifies a set of methods to be invoked when the changes of heath channel occur.
12730 <ExtendedAttributeList>
12731 <ExtendedAttribute name="Callback">
12732 <webidl>Callback</webidl>
12733 </ExtendedAttribute>
12734 <ExtendedAttribute name="NoInterfaceObject">
12735 <webidl> NoInterfaceObject</webidl>
12736 </ExtendedAttribute>
12737 </ExtendedAttributeList>
12738 <Operation name="onmessage" id="::Bluetooth::BluetoothHealthChannelChangeCallback::onmessage">
12739 <webidl> void onmessage(byte[] data);</webidl>
12742 The method to be invoked when the message is received.
12748 <Type type="void"/>
12750 <Argument name="data">
12756 <Type type="array">
12757 <Type type="byte"/>
12762 <Operation name="onclose" id="::Bluetooth::BluetoothHealthChannelChangeCallback::onclose">
12763 <webidl> void onclose();</webidl>
12766 The method to be invoked when the health channel is closed.
12772 <Type type="void"/>
12777 <Module name="Bookmark" id="::Bookmark">
12778 <webidl>module Bookmark {
12780 typedef (<ref>BookmarkItem</ref> or <ref>BookmarkFolder</ref>) Bookmark;
12783 [NoInterfaceObject] interface BookmarkManagerObject {
12784 readonly attribute <ref>BookmarkManager</ref> bookmark;
12786 <ref>Tizen</ref> implements <ref>BookmarkManagerObject</ref>;
12789 [NoInterfaceObject] interface BookmarkManager {
12791 <ref>Bookmark</ref>[] get(optional <ref>BookmarkFolder</ref>? parentFolder, optional boolean? recursive) raises(<ref>WebAPIException</ref>);
12793 void add(<ref>Bookmark</ref> bookmark, optional <ref>BookmarkFolder</ref>? parentFolder) raises(<ref>WebAPIException</ref>);
12795 void remove(optional <ref>Bookmark</ref>? bookmark) raises(<ref>WebAPIException</ref>);
12800 [Constructor(DOMString title, DOMString url)]
12802 interface BookmarkItem {
12804 readonly attribute <ref>BookmarkFolder</ref>? parent;
12806 readonly attribute DOMString title;
12808 readonly attribute DOMString url;
12812 [Constructor(DOMString title)]
12814 interface BookmarkFolder {
12816 readonly attribute <ref>BookmarkFolder</ref>? parent;
12818 readonly attribute DOMString title;
12824 This API provides interfaces and methods for accessing Bookmark.
12825 This API provides functionality to get, add, and remove bookmarks.
12829 For more information on the Bookmark features, see <a href="../../org.tizen.web.appprogramming/html/guide/social_guide/bookmark.htm">Bookmark Guide</a>.
12836 <Typedef name="Bookmark" id="::Bookmark::Bookmark">
12837 <webidl> typedef (<ref>BookmarkItem</ref> or <ref>BookmarkFolder</ref>) Bookmark;</webidl>
12840 A bookmark, which could be either a <em>BookmarkItem </em>or a <em>BookmarkFolder</em>.
12846 <Type type="union">
12847 <Type name="BookmarkItem"/>
12848 <Type name="BookmarkFolder"/>
12851 <Interface name="BookmarkManagerObject" id="::Bookmark::BookmarkManagerObject">
12852 <webidl> [NoInterfaceObject] interface BookmarkManagerObject {
12853 readonly attribute <ref>BookmarkManager</ref> bookmark;
12857 Defines what is instantiated by the Tizen object from the Tizen Platform.
12861 There will be a <em>tizen.bookmark </em>object that allows to access the functionality of the Bookmark API.
12868 <ExtendedAttributeList>
12869 <ExtendedAttribute name="NoInterfaceObject">
12870 <webidl>NoInterfaceObject</webidl>
12871 </ExtendedAttribute>
12872 </ExtendedAttributeList>
12873 <Attribute readonly="readonly" name="bookmark" id="::Bookmark::BookmarkManagerObject::bookmark">
12874 <webidl> readonly attribute <ref>BookmarkManager</ref> bookmark;</webidl>
12875 <Type name="BookmarkManager"/>
12878 <Implements name1="Tizen" name2="BookmarkManagerObject">
12879 <webidl> <ref>Tizen</ref> implements <ref>BookmarkManagerObject</ref>;</webidl>
12881 <Interface name="BookmarkManager" id="::Bookmark::BookmarkManager">
12882 <webidl> [NoInterfaceObject] interface BookmarkManager {
12884 <ref>Bookmark</ref>[] get(optional <ref>BookmarkFolder</ref>? parentFolder, optional boolean? recursive) raises(<ref>WebAPIException</ref>);
12886 void add(<ref>Bookmark</ref> bookmark, optional <ref>BookmarkFolder</ref>? parentFolder) raises(<ref>WebAPIException</ref>);
12888 void remove(optional <ref>Bookmark</ref>? bookmark) raises(<ref>WebAPIException</ref>);
12893 This interface provides access to the bookmark folder and bookmark item.
12897 It provides access to the API functionalities through the <em>tizen.bookmark </em>interface.
12904 <ExtendedAttributeList>
12905 <ExtendedAttribute name="NoInterfaceObject">
12906 <webidl>NoInterfaceObject</webidl>
12907 </ExtendedAttribute>
12908 </ExtendedAttributeList>
12909 <Operation name="get" id="::Bookmark::BookmarkManager::get">
12910 <webidl> <ref>Bookmark</ref>[] get(optional <ref>BookmarkFolder</ref>? parentFolder, optional boolean? recursive) raises(<ref>WebAPIException</ref>);</webidl>
12913 Gets all bookmark items and bookmark folders.
12917 If no parentFolder is passed, or the parentFolder contains <var>null</var>, it is considered as the default bookmark folder(The root bookmark folder).
12918 In this case, the return will contain bookmarks under the root bookmark folder.
12925 http://tizen.org/privilege/bookmark.read
12931 // retrieve bookmarks from the root bookmark folder recursively
12932 var allBookmarks = tizen.bookmark.get(null, true);
12934 console.log (err.name +": " + err.message);
12938 <Type type="array">
12941 Bookmark[] Array of Bookmarks.
12944 <Type name="Bookmark"/>
12947 <Argument optional="optional" name="parentFolder">
12950 The parent bookmark folder to retrieve the result bookmarks.
12953 <Type name="BookmarkFolder" nullable="nullable"/>
12955 <Argument optional="optional" name="recursive">
12958 The flag indicating whether sub-bookmarks are also retrieved recursively or not<br/> (The default value is <em>false</em>).
12961 <Type type="boolean" nullable="nullable"/>
12965 <RaiseException name="WebAPIException">
12968 with error type NotFoundError, if the parentFolder parameter isn't found in bookmark database.
12971 with error type TypeMismatchError, if an input parameter is not compatible with the expected type for that parameter.
12974 with error type SecurityError, if the application does not have the privilege to call this method.
12977 with error type UnknownError, if any other error occurs.
12983 <Operation name="add" id="::Bookmark::BookmarkManager::add">
12984 <webidl> void add(<ref>Bookmark</ref> bookmark, optional <ref>BookmarkFolder</ref>? parentFolder) raises(<ref>WebAPIException</ref>);</webidl>
12987 Adds a bookmark item or a bookmark folder.
12991 If no parentFolder is passed, or the parentFolder contains <var>null</var>, it is considered as the default bookmark folder(The root bookmark folder).
12992 In this case, the bookmark is added under the root bookmark folder.
12999 http://tizen.org/privilege/bookmark.write
13005 // add a bookmark item to root bookmark folder.
13006 tizen.bookmark.add(new tizen.BookmarkItem("tizen", "https://www.tizen.org"));
13008 console.log (err.name +": " + err.message);
13012 <Type type="void"/>
13014 <Argument name="bookmark">
13017 The bookmark to be added.
13020 <Type name="Bookmark"/>
13022 <Argument optional="optional" name="parentFolder">
13025 The parent folder of a bookmark to be added.
13028 <Type name="BookmarkFolder" nullable="nullable"/>
13032 <RaiseException name="WebAPIException">
13035 with error type NotFoundError, if a parentFolder parameter isn't found in bookmark database.
13038 with error type InvalidValuesError, if any of the input parameters contain an invalid value, or a bookmark parameter is either a bookmark item whose url has already existed in bookmark database or a bookmark folder whose title has already existed under the same parent folder.
13041 with error type TypeMismatchError, if an input parameter is not compatible with the expected type for that parameter.
13044 with error type SecurityError, if the application does not have the privilege to call this method.
13047 with error type UnknownError, if any other error occurs.
13053 <Operation name="remove" id="::Bookmark::BookmarkManager::remove">
13054 <webidl> void remove(optional <ref>Bookmark</ref>? bookmark) raises(<ref>WebAPIException</ref>);</webidl>
13057 Removes a bookmark item or a bookmark folder.
13061 If the bookmark is a BookmarkFolder type, all the bookmark items and bookmark folders under the specified bookmark folder are going to be removed.<br/>If no bookmark is passed, or the bookmark contains <var>null</var>, it is considered as the default bookmark folder(The root bookmark folder).
13062 In this case, all the bookmarks will be removed.
13069 http://tizen.org/privilege/bookmark.write
13075 // remove all the bookmark folders and items
13076 tizen.bookmark.remove();
13078 console.log (err.name +": " + err.message);
13082 <Type type="void"/>
13084 <Argument optional="optional" name="bookmark">
13087 The bookmark to be removed.
13090 <Type name="Bookmark" nullable="nullable"/>
13094 <RaiseException name="WebAPIException">
13097 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
13100 with error type SecurityError, if the application does not have the privilege to call this method.
13103 with error type UnknownError, if any other error occurs.
13110 <Interface name="BookmarkItem" id="::Bookmark::BookmarkItem">
13111 <webidl> [Constructor(DOMString title, DOMString url)]
13113 interface BookmarkItem {
13115 readonly attribute <ref>BookmarkFolder</ref>? parent;
13117 readonly attribute DOMString title;
13119 readonly attribute DOMString url;
13124 This interface implements the <em>BookmarkItem </em>object.
13130 <ExtendedAttributeList>
13131 <ExtendedAttribute name="Constructor">
13132 <webidl>Constructor(DOMString title, DOMString url)</webidl>
13135 // create a bookmark item
13136 var tizen = new tizen.BookmarkItem("tizen", "https://www.tizen.org");
13138 console.log (err.name +": " + err.message);
13143 <Argument name="title">
13144 <Type type="DOMString"/>
13146 <Argument name="url">
13147 <Type type="DOMString"/>
13150 </ExtendedAttribute>
13151 </ExtendedAttributeList>
13152 <Attribute readonly="readonly" name="parent" id="::Bookmark::BookmarkItem::parent">
13153 <webidl> readonly attribute <ref>BookmarkFolder</ref>? parent;</webidl>
13156 The parent bookmark folder.
13160 This attribute is meaningful when this object is successfully added or retrieved.
13161 If this BookmarkItem is not added yet, its value is set to undefined.
13164 If the parent bookmark folder indicates the root bookmark folder, the value will be <var>null</var>.
13171 <Type name="BookmarkFolder" nullable="nullable"/>
13173 <Attribute readonly="readonly" name="title" id="::Bookmark::BookmarkItem::title">
13174 <webidl> readonly attribute DOMString title;</webidl>
13177 The title of the bookmark.
13183 <Type type="DOMString"/>
13185 <Attribute readonly="readonly" name="url" id="::Bookmark::BookmarkItem::url">
13186 <webidl> readonly attribute DOMString url;</webidl>
13189 The uri of the bookmark.
13195 <Type type="DOMString"/>
13198 <Interface name="BookmarkFolder" id="::Bookmark::BookmarkFolder">
13199 <webidl> [Constructor(DOMString title)]
13201 interface BookmarkFolder {
13203 readonly attribute <ref>BookmarkFolder</ref>? parent;
13205 readonly attribute DOMString title;
13210 This interface implements the <em>BookmarkFolder </em>object.
13216 <ExtendedAttributeList>
13217 <ExtendedAttribute name="Constructor">
13218 <webidl>Constructor(DOMString title)</webidl>
13221 // create a bookmark folder
13222 var folder = new tizen.BookmarkFolder("folder");
13224 console.log (err.name +": " + err.message);
13229 <Argument name="title">
13230 <Type type="DOMString"/>
13233 </ExtendedAttribute>
13234 </ExtendedAttributeList>
13235 <Attribute readonly="readonly" name="parent" id="::Bookmark::BookmarkFolder::parent">
13236 <webidl> readonly attribute <ref>BookmarkFolder</ref>? parent;</webidl>
13239 The parent bookmark folder.
13243 This attribute is meaningful when this object is successfully added or retrieved.
13244 If this BookmarkFolder is not added yet, its value is set to undefined.
13247 If the parent bookmark folder indicates the root bookmark folder, the value will be <var>null</var>.
13254 <Type name="BookmarkFolder" nullable="nullable"/>
13256 <Attribute readonly="readonly" name="title" id="::Bookmark::BookmarkFolder::title">
13257 <webidl> readonly attribute DOMString title;</webidl>
13260 The title of the bookmark folder.
13266 <Type type="DOMString"/>
13270 <Module name="Calendar" id="::Calendar">
13271 <webidl>module Calendar {
13272 typedef DOMString CalendarId;
13274 typedef DOMString CalendarTaskId;
13276 typedef (<ref>CalendarEventId</ref> or <ref>CalendarTaskId</ref>) CalendarItemId;
13278 enum CalendarType { "EVENT", "TASK" };
13280 enum CalendarTextFormat { "ICALENDAR_20", "VCALENDAR_10" };
13282 enum AlarmMethod { "SOUND", "DISPLAY" };
13285 enum RecurrenceRuleFrequency { "DAILY", "WEEKLY", "MONTHLY", "YEARLY" };
13287 enum ByDayValue { "MO", "TU", "WE", "TH", "FR", "SA", "SU" };
13289 enum EventAvailability { "BUSY", "FREE" };
13291 enum AttendeeType { "INDIVIDUAL", "GROUP", "RESOURCE", "ROOM", "UNKNOWN" };
13293 enum AttendeeStatus { "PENDING", "ACCEPTED", "DECLINED", "TENTATIVE", "DELEGATED", "COMPLETED", "IN_PROCESS" };
13295 enum AttendeeRole { "REQ_PARTICIPANT", "OPT_PARTICIPANT", "NON_PARTICIPANT", "CHAIR" };
13297 enum CalendarItemPriority { "HIGH", "MEDIUM", "LOW" };
13299 enum CalendarItemVisibility { "PUBLIC", "PRIVATE", "CONFIDENTIAL" };
13301 enum CalendarItemStatus { "TENTATIVE", "CONFIRMED", "CANCELLED", "NEEDS_ACTION", "IN_PROCESS", "COMPLETED" };
13303 [NoInterfaceObject] interface CalendarManagerObject{
13304 readonly attribute <ref>CalendarManager</ref> calendar;
13306 <ref>Tizen</ref> implements <ref>CalendarManagerObject</ref>;
13308 [NoInterfaceObject] interface CalendarManager {
13309 void getCalendars(<ref>CalendarType</ref> type,
13310 <ref>CalendarArraySuccessCallback</ref> successCallback,
13311 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
13313 <ref>Calendar</ref> getUnifiedCalendar(<ref>CalendarType</ref> type) raises(<ref>WebAPIException</ref>);
13315 <ref>Calendar</ref> getDefaultCalendar(<ref>CalendarType</ref> type) raises(<ref>WebAPIException</ref>);
13317 <ref>Calendar</ref> getCalendar(<ref>CalendarType</ref> type, <ref>CalendarId</ref> id) raises(<ref>WebAPIException</ref>);
13320 [NoInterfaceObject] interface Calendar {
13322 readonly attribute <ref>CalendarId</ref> id;
13324 readonly attribute DOMString name;
13326 <ref>CalendarItem</ref> get(<ref>CalendarItemId</ref> id) raises(<ref>WebAPIException</ref>);
13328 void add(<ref>CalendarItem</ref> item) raises(<ref>WebAPIException</ref>);
13330 void addBatch(<ref>CalendarItem</ref>[] items,
13331 optional <ref>CalendarItemArraySuccessCallback</ref>? successCallback,
13332 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
13334 void update(<ref>CalendarItem</ref> item,
13335 optional boolean? updateAllInstances) raises(<ref>WebAPIException</ref>);
13337 void updateBatch(<ref>CalendarItem</ref>[] items,
13338 optional <ref>SuccessCallback</ref>? successCallback,
13339 optional <ref>ErrorCallback</ref>? errorCallback,
13340 optional boolean? updateAllInstances) raises(<ref>WebAPIException</ref>);
13342 void remove(<ref>CalendarItemId</ref> id) raises(<ref>WebAPIException</ref>);
13344 void removeBatch(<ref>CalendarItemId</ref>[] ids,
13345 optional <ref>SuccessCallback</ref>? successCallback,
13346 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
13348 void find(<ref>CalendarItemArraySuccessCallback</ref> successCallback,
13349 optional <ref>ErrorCallback</ref>? errorCallback,
13350 optional <ref>AbstractFilter</ref>? filter,
13351 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);
13353 long addChangeListener(<ref>CalendarChangeCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);
13355 void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
13358 dictionary CalendarItemInit {
13359 DOMString description;
13362 <ref>TZDate</ref> startDate;
13363 <ref>TimeDuration</ref> duration;
13364 DOMString location;
13365 <ref>SimpleCoordinates</ref> geolocation;
13366 DOMString organizer;
13367 <ref>CalendarItemVisibility</ref> visibility;
13368 <ref>CalendarItemStatus</ref> status;
13369 <ref>CalendarItemPriority</ref> priority;
13370 <ref>CalendarAlarm</ref>[] alarms;
13371 DOMString[] categories;
13372 <ref>CalendarAttendee</ref>[] attendees;
13375 dictionary CalendarTaskInit: <ref>CalendarItemInit</ref> {
13376 <ref>TZDate</ref> dueDate;
13377 <ref>TZDate</ref> completedDate;
13381 dictionary CalendarEventInit: <ref>CalendarItemInit</ref> {
13382 <ref>TZDate</ref> endDate;
13383 <ref>EventAvailability</ref> availability;
13384 <ref>CalendarRecurrenceRule</ref> recurrenceRule;
13387 [NoInterfaceObject] interface CalendarItem {
13388 readonly attribute <ref>CalendarItemId</ref>? id;
13390 readonly attribute <ref>CalendarId</ref>? calendarId;
13392 readonly attribute <ref>TZDate</ref>? lastModificationDate;
13394 attribute DOMString? description setraises(<ref>WebAPIException</ref>);
13396 attribute DOMString? summary setraises(<ref>WebAPIException</ref>);
13398 attribute boolean isAllDay setraises(<ref>WebAPIException</ref>);
13400 attribute <ref>TZDate</ref>? startDate setraises(<ref>WebAPIException</ref>);
13402 attribute <ref>TimeDuration</ref>? duration setraises(<ref>WebAPIException</ref>);
13404 attribute DOMString? location setraises(<ref>WebAPIException</ref>);
13406 attribute <ref>SimpleCoordinates</ref>? geolocation setraises(<ref>WebAPIException</ref>);
13408 attribute DOMString? organizer setraises(<ref>WebAPIException</ref>);
13410 attribute <ref>CalendarItemVisibility</ref> visibility setraises(<ref>WebAPIException</ref>);
13412 attribute <ref>CalendarItemStatus</ref> status setraises(<ref>WebAPIException</ref>);
13414 attribute <ref>CalendarItemPriority</ref> priority setraises(<ref>WebAPIException</ref>);
13416 attribute <ref>CalendarAlarm</ref>[] alarms setraises(<ref>WebAPIException</ref>);
13418 attribute DOMString[] categories setraises(<ref>WebAPIException</ref>);
13420 attribute <ref>CalendarAttendee</ref>[] attendees setraises(<ref>WebAPIException</ref>);
13422 DOMString convertToString(<ref>CalendarTextFormat</ref> format) raises(<ref>WebAPIException</ref>);
13424 <ref>CalendarItem</ref> clone() raises(<ref>WebAPIException</ref>);
13427 [Constructor(optional <ref>CalendarTaskInit</ref>? taskInitDict),
13428 Constructor(DOMString stringRepresentation, <ref>CalendarTextFormat</ref> format)]
13429 interface CalendarTask : <ref>CalendarItem</ref> {
13430 attribute <ref>TZDate</ref>? dueDate setraises(<ref>WebAPIException</ref>);
13432 attribute <ref>TZDate</ref>? completedDate setraises(<ref>WebAPIException</ref>);
13434 attribute unsigned short progress setraises(<ref>WebAPIException</ref>);
13437 [Constructor(optional <ref>CalendarEventInit</ref>? eventInitDict),
13438 Constructor(DOMString stringRepresentation, <ref>CalendarTextFormat</ref> format)]
13439 interface CalendarEvent : <ref>CalendarItem</ref> {
13440 readonly attribute boolean isDetached;
13442 attribute <ref>TZDate</ref>? endDate setraises(<ref>WebAPIException</ref>);
13444 attribute <ref>EventAvailability</ref> availability setraises(<ref>WebAPIException</ref>);
13446 attribute <ref>CalendarRecurrenceRule</ref>? recurrenceRule setraises(<ref>WebAPIException</ref>);
13448 void expandRecurrence(<ref>TZDate</ref> startDate,
13449 <ref>TZDate</ref> endDate,
13450 <ref>CalendarEventArraySuccessCallback</ref> successCallback,
13451 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
13454 dictionary CalendarAttendeeInit {
13456 <ref>AttendeeRole</ref> role;
13457 <ref>AttendeeStatus</ref> status;
13459 <ref>AttendeeType</ref> type;
13461 DOMString delegatorURI;
13462 DOMString delegateURI;
13463 <ref>ContactRef</ref> contactRef;
13466 [Constructor(DOMString uri, optional <ref>CalendarAttendeeInit</ref>? attendeeInitDict)]
13467 interface CalendarAttendee
13469 attribute DOMString uri;
13471 attribute DOMString? name;
13473 attribute <ref>AttendeeRole</ref> role;
13475 attribute <ref>AttendeeStatus</ref> status;
13477 attribute boolean RSVP;
13479 attribute <ref>AttendeeType</ref> type;
13481 attribute DOMString? group;
13483 attribute DOMString? delegatorURI;
13485 attribute DOMString? delegateURI;
13487 attribute <ref>ContactRef</ref>? contactRef;
13490 dictionary CalendarRecurrenceRuleInit {
13492 <ref>TZDate</ref> untilDate;
13493 long occurrenceCount;
13494 <ref>ByDayValue</ref>[] daysOfTheWeek;
13495 short[] setPositions;
13496 <ref>TZDate</ref>[] exceptions;
13499 [Constructor(<ref>RecurrenceRuleFrequency</ref> frequency, optional <ref>CalendarRecurrenceRuleInit</ref>? ruleInitDict)]
13500 interface CalendarRecurrenceRule
13502 attribute <ref>RecurrenceRuleFrequency</ref> frequency;
13504 attribute unsigned short interval;
13506 attribute <ref>TZDate</ref>? untilDate;
13508 attribute long occurrenceCount;
13510 attribute <ref>ByDayValue</ref>[] daysOfTheWeek;
13512 attribute short[] setPositions;
13514 attribute <ref>TZDate</ref>[] exceptions;
13517 [Constructor(DOMString uid, optional DOMString? rid)]
13518 interface CalendarEventId {
13519 attribute DOMString uid;
13521 attribute DOMString? rid;
13524 [Constructor(<ref>TZDate</ref> absoluteDate, <ref>AlarmMethod</ref> method, optional DOMString? description),
13525 Constructor(<ref>TimeDuration</ref> before, <ref>AlarmMethod</ref> method, optional DOMString? description)]
13526 interface CalendarAlarm {
13527 attribute <ref>TZDate</ref>? absoluteDate setraises(<ref>WebAPIException</ref>);
13529 attribute <ref>TimeDuration</ref>? before setraises(<ref>WebAPIException</ref>);
13531 attribute <ref>AlarmMethod</ref> method setraises(<ref>WebAPIException</ref>);
13533 attribute DOMString? description;
13536 [Callback=FunctionOnly, NoInterfaceObject]
13537 interface CalendarEventArraySuccessCallback {
13538 void onsuccess(<ref>CalendarEvent</ref>[] events);
13541 [Callback=FunctionOnly, NoInterfaceObject]
13542 interface CalendarItemArraySuccessCallback {
13543 void onsuccess(<ref>CalendarItem</ref>[] items);
13546 [Callback=FunctionOnly, NoInterfaceObject]
13547 interface CalendarArraySuccessCallback {
13548 void onsuccess(<ref>Calendar</ref>[] calendars);
13551 [Callback, NoInterfaceObject] interface CalendarChangeCallback {
13552 void onitemsadded(<ref>CalendarItem</ref>[] items);
13554 void onitemsupdated(<ref>CalendarItem</ref>[] items);
13556 void onitemsremoved(<ref>CalendarItemId</ref>[] ids);
13561 This API provides interfaces and methods for users to manage their schedule.
13562 Separate calendars can be implemented for group related events or tasks. For example, a user may have a work, personal, and family calendar. A calendar entry is called an event and is composed of a series of attributes, such as purpose, starting time, and duration. A calendar is a collection of events.
13566 Internet Calendaring and Scheduling Core Object Specification (iCalendar), defines a format for exchanging event items. Mapping to specified event/task attributes in this API is as per this specification. To know more about this specification, see <a href="http://tools.ietf.org/html/rfc5545">RFC 5545</a>.
13569 This API provides functionality to read, create, delete, and update items in specific calendars. Calendars can be obtained using the <em>getCalendars() </em>method, which returns an array of Calendar objects.
13572 For more information on the Calendar features, see <a href="../../org.tizen.web.appprogramming/html/guide/social_guide/calendar.htm">Calendar Guide</a>.
13579 <Typedef name="CalendarId" id="::Calendar::CalendarId">
13580 <webidl> typedef DOMString CalendarId;</webidl>
13583 An attribute to identify the calendar.
13589 <Type type="DOMString"/>
13591 <Typedef name="CalendarTaskId" id="::Calendar::CalendarTaskId">
13592 <webidl> typedef DOMString CalendarTaskId;</webidl>
13595 An attribute to identify a calendar task.
13601 <Type type="DOMString"/>
13603 <Typedef name="CalendarItemId" id="::Calendar::CalendarItemId">
13604 <webidl> typedef (<ref>CalendarEventId</ref> or <ref>CalendarTaskId</ref>) CalendarItemId;</webidl>
13607 A calendar item identifier, which can either be a <em>CalendarEventId </em>or a <em>CalendarTaskId</em>.
13613 <Type type="union">
13614 <Type name="CalendarEventId"/>
13615 <Type name="CalendarTaskId"/>
13618 <Enum name="CalendarType" id="::Calendar::CalendarType">
13619 <webidl> enum CalendarType { "EVENT", "TASK" };</webidl>
13622 An enumerator that indicates the type of a calendar.
13626 The following types are supported:
13630 EVENT - if a calendar contains events (VEVENT objects) </li>
13632 TASK - if a calendar contains tasks (VTODO objects) </li>
13639 <EnumValue stringvalue="EVENT">
13640 <webidl> "EVENT</webidl>
13642 <EnumValue stringvalue="TASK">
13643 <webidl> "TASK</webidl>
13646 <Enum name="CalendarTextFormat" id="::Calendar::CalendarTextFormat">
13647 <webidl> enum CalendarTextFormat { "ICALENDAR_20", "VCALENDAR_10" };</webidl>
13650 An enumerator that indicates the type of textual format of a Calendar.
13654 The following values are supported:
13658 ICALENDAR_20 - if the textual format is iCalendar v2.0 </li>
13660 VCALENDAR_10 - if the textual format is vCalendar v1.0 </li>
13667 <EnumValue stringvalue="ICALENDAR_20">
13668 <webidl> "ICALENDAR_20</webidl>
13670 <EnumValue stringvalue="VCALENDAR_10">
13671 <webidl> "VCALENDAR_10</webidl>
13674 <Enum name="AlarmMethod" id="::Calendar::AlarmMethod">
13675 <webidl> enum AlarmMethod { "SOUND", "DISPLAY" };</webidl>
13678 An enumerator that indicates the type of an alarm.
13682 The following values are supported:
13686 SOUND - if sound is played to alert the user </li>
13688 DISPLAY - if display on screen without any sound is used to alert the user </li>
13695 <EnumValue stringvalue="SOUND">
13696 <webidl> "SOUND</webidl>
13698 <EnumValue stringvalue="DISPLAY">
13699 <webidl> "DISPLAY</webidl>
13702 <Enum name="RecurrenceRuleFrequency" id="::Calendar::RecurrenceRuleFrequency">
13703 <webidl> enum RecurrenceRuleFrequency { "DAILY", "WEEKLY", "MONTHLY", "YEARLY" };</webidl>
13706 An enumerator that indicates the type of frequency for the recurrence of an event.
13710 Only the following values are valid for this attribute:
13714 DAILY - if the event occurs daily </li>
13716 WEEKLY - if the event occurs weekly </li>
13718 MONTHLY - if the event occurs monthly </li>
13720 YEARLY - if the event occurs yearly </li>
13727 <EnumValue stringvalue="DAILY">
13728 <webidl> "DAILY</webidl>
13730 <EnumValue stringvalue="WEEKLY">
13731 <webidl> "WEEKLY</webidl>
13733 <EnumValue stringvalue="MONTHLY">
13734 <webidl> "MONTHLY</webidl>
13736 <EnumValue stringvalue="YEARLY">
13737 <webidl> "YEARLY</webidl>
13740 <Enum name="ByDayValue" id="::Calendar::ByDayValue">
13741 <webidl> enum ByDayValue { "MO", "TU", "WE", "TH", "FR", "SA", "SU" };</webidl>
13744 An enumerator that indicates the values for <em>CalendarRecurrenceRule.daysOfWeek</em>.
13748 "MO" to "SU" correspond to "Monday" to "Sunday".
13755 <EnumValue stringvalue="MO">
13756 <webidl> "MO</webidl>
13758 <EnumValue stringvalue="TU">
13759 <webidl> "TU</webidl>
13761 <EnumValue stringvalue="WE">
13762 <webidl> "WE</webidl>
13764 <EnumValue stringvalue="TH">
13765 <webidl> "TH</webidl>
13767 <EnumValue stringvalue="FR">
13768 <webidl> "FR</webidl>
13770 <EnumValue stringvalue="SA">
13771 <webidl> "SA</webidl>
13773 <EnumValue stringvalue="SU">
13774 <webidl> "SU</webidl>
13777 <Enum name="EventAvailability" id="::Calendar::EventAvailability">
13778 <webidl> enum EventAvailability { "BUSY", "FREE" };</webidl>
13781 An enumerator that indicates the availability of time for an event.
13785 The following values are supported:
13789 FREE - if the specified time slot is vacant </li>
13791 BUSY - if the specified time slot is not vacant </li>
13793 BUSY-UNAVAILABLE - if the specified time slot is not vacant and can not be scheduled </li>
13795 BUSY-TENTATIVE - if the specified time slot is not vacant because one or more events have been tentatively scheduled for that interval </li>
13802 <EnumValue stringvalue="BUSY">
13803 <webidl> "BUSY</webidl>
13805 <EnumValue stringvalue="FREE">
13806 <webidl> "FREE</webidl>
13809 <Enum name="AttendeeType" id="::Calendar::AttendeeType">
13810 <webidl> enum AttendeeType { "INDIVIDUAL", "GROUP", "RESOURCE", "ROOM", "UNKNOWN" };</webidl>
13813 An enumerator that indicates the type of attendee.
13817 At least the following values must be supported:
13821 INDIVIDUAL - Individual </li>
13823 GROUP - Group of individuals </li>
13825 RESOURCE - Physical resource </li>
13827 ROOM - Room resource </li>
13829 UNKNOWN - Unknown </li>
13836 <EnumValue stringvalue="INDIVIDUAL">
13837 <webidl> "INDIVIDUAL</webidl>
13839 <EnumValue stringvalue="GROUP">
13840 <webidl> "GROUP</webidl>
13842 <EnumValue stringvalue="RESOURCE">
13843 <webidl> "RESOURCE</webidl>
13845 <EnumValue stringvalue="ROOM">
13846 <webidl> "ROOM</webidl>
13848 <EnumValue stringvalue="UNKNOWN">
13849 <webidl> "UNKNOWN</webidl>
13852 <Enum name="AttendeeStatus" id="::Calendar::AttendeeStatus">
13853 <webidl> enum AttendeeStatus { "PENDING", "ACCEPTED", "DECLINED", "TENTATIVE", "DELEGATED", "COMPLETED", "IN_PROCESS" };</webidl>
13856 An enumerator that indicates the attendance status of a participant.
13860 At least the following values must be supported:
13864 PENDING - if the participant has not yet responded to the event </li>
13866 ACCEPTED - if the participant has accepted the event </li>
13868 DECLINED - if the participant has declined the event </li>
13870 TENTATIVE - if the participant has tentatively accepted the event </li>
13872 DELEGATED - if the participant has delegated attendance to another participant </li>
13874 COMPLETED - if the participant's event has been completed </li>
13876 IN_PROCESS - if the participant's event is currently in process </li>
13883 <EnumValue stringvalue="PENDING">
13884 <webidl> "PENDING</webidl>
13886 <EnumValue stringvalue="ACCEPTED">
13887 <webidl> "ACCEPTED</webidl>
13889 <EnumValue stringvalue="DECLINED">
13890 <webidl> "DECLINED</webidl>
13892 <EnumValue stringvalue="TENTATIVE">
13893 <webidl> "TENTATIVE</webidl>
13895 <EnumValue stringvalue="DELEGATED">
13896 <webidl> "DELEGATED</webidl>
13898 <EnumValue stringvalue="COMPLETED">
13899 <webidl> "COMPLETED</webidl>
13901 <EnumValue stringvalue="IN_PROCESS">
13902 <webidl> "IN_PROCESS</webidl>
13905 <Enum name="AttendeeRole" id="::Calendar::AttendeeRole">
13906 <webidl> enum AttendeeRole { "REQ_PARTICIPANT", "OPT_PARTICIPANT", "NON_PARTICIPANT", "CHAIR" };</webidl>
13909 An enumerator that indicates the role of an attendee.
13913 At least the following values must be supported:
13917 REQ_PARTICIPANT - if the participation of an attendee is mandatory </li>
13919 OPT_PARTICIPANT - if the participation of an attendee is optional </li>
13921 NON_PARTICIPANT - if the attendee is not a participant but is copied for information purposes </li>
13923 CHAIR - if the attendee is the chairperson of the event. </li>
13930 <EnumValue stringvalue="REQ_PARTICIPANT">
13931 <webidl> "REQ_PARTICIPANT</webidl>
13933 <EnumValue stringvalue="OPT_PARTICIPANT">
13934 <webidl> "OPT_PARTICIPANT</webidl>
13936 <EnumValue stringvalue="NON_PARTICIPANT">
13937 <webidl> "NON_PARTICIPANT</webidl>
13939 <EnumValue stringvalue="CHAIR">
13940 <webidl> "CHAIR</webidl>
13943 <Enum name="CalendarItemPriority" id="::Calendar::CalendarItemPriority">
13944 <webidl> enum CalendarItemPriority { "HIGH", "MEDIUM", "LOW" };</webidl>
13947 An enumerator that indicates the priority of a calendar item.
13951 The following values are supported:
13955 HIGH - if item priority is high </li>
13957 MEDIUM - if item priority is medium </li>
13959 LOW - if item priority is low </li>
13966 <EnumValue stringvalue="HIGH">
13967 <webidl> "HIGH</webidl>
13969 <EnumValue stringvalue="MEDIUM">
13970 <webidl> "MEDIUM</webidl>
13972 <EnumValue stringvalue="LOW">
13973 <webidl> "LOW</webidl>
13976 <Enum name="CalendarItemVisibility" id="::Calendar::CalendarItemVisibility">
13977 <webidl> enum CalendarItemVisibility { "PUBLIC", "PRIVATE", "CONFIDENTIAL" };</webidl>
13980 An enumerator that indicates the visibility type of a calendar item.
13984 The following values are supported:
13988 PUBLIC - if item visibility is public </li>
13990 PRIVATE - if item visibility is private </li>
13992 CONFIDENTIAL - if item visibility is confidential </li>
13999 <EnumValue stringvalue="PUBLIC">
14000 <webidl> "PUBLIC</webidl>
14002 <EnumValue stringvalue="PRIVATE">
14003 <webidl> "PRIVATE</webidl>
14005 <EnumValue stringvalue="CONFIDENTIAL">
14006 <webidl> "CONFIDENTIAL</webidl>
14009 <Enum name="CalendarItemStatus" id="::Calendar::CalendarItemStatus">
14010 <webidl> enum CalendarItemStatus { "TENTATIVE", "CONFIRMED", "CANCELLED", "NEEDS_ACTION", "IN_PROCESS", "COMPLETED" };</webidl>
14013 An enumerator that indicates the status of a calendar item.
14017 For an event, the possible values are:
14021 TENTATIVE - if the event is tentative </li>
14023 CONFIRMED - if the event is confirmed </li>
14025 CANCELLED - if the event is cancelled </li>
14028 For a task, the possible values are:
14032 NEEDS_ACTION - if the task needs action </li>
14034 IN_PROCESS - if the task is in process or being worked on </li>
14036 COMPLETED - if the task has been completed </li>
14038 CANCELLED - if the task has been cancelled </li>
14045 <EnumValue stringvalue="TENTATIVE">
14046 <webidl> "TENTATIVE</webidl>
14048 <EnumValue stringvalue="CONFIRMED">
14049 <webidl> "CONFIRMED</webidl>
14051 <EnumValue stringvalue="CANCELLED">
14052 <webidl> "CANCELLED</webidl>
14054 <EnumValue stringvalue="NEEDS_ACTION">
14055 <webidl> "NEEDS_ACTION</webidl>
14057 <EnumValue stringvalue="IN_PROCESS">
14058 <webidl> "IN_PROCESS</webidl>
14060 <EnumValue stringvalue="COMPLETED">
14061 <webidl> "COMPLETED</webidl>
14064 <Interface name="CalendarManagerObject" id="::Calendar::CalendarManagerObject">
14065 <webidl> [NoInterfaceObject] interface CalendarManagerObject{
14066 readonly attribute <ref>CalendarManager</ref> calendar;
14070 This interface gives access to the Calendar API from the <em>tizen.calendar </em>object.
14076 <ExtendedAttributeList>
14077 <ExtendedAttribute name="NoInterfaceObject">
14078 <webidl>NoInterfaceObject</webidl>
14079 </ExtendedAttribute>
14080 </ExtendedAttributeList>
14081 <Attribute readonly="readonly" name="calendar" id="::Calendar::CalendarManagerObject::calendar">
14082 <webidl> readonly attribute <ref>CalendarManager</ref> calendar;</webidl>
14083 <Type name="CalendarManager"/>
14086 <Implements name1="Tizen" name2="CalendarManagerObject">
14087 <webidl> <ref>Tizen</ref> implements <ref>CalendarManagerObject</ref>;</webidl>
14089 <Interface name="CalendarManager" id="::Calendar::CalendarManager">
14090 <webidl> [NoInterfaceObject] interface CalendarManager {
14091 void getCalendars(<ref>CalendarType</ref> type,
14092 <ref>CalendarArraySuccessCallback</ref> successCallback,
14093 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
14095 <ref>Calendar</ref> getUnifiedCalendar(<ref>CalendarType</ref> type) raises(<ref>WebAPIException</ref>);
14097 <ref>Calendar</ref> getDefaultCalendar(<ref>CalendarType</ref> type) raises(<ref>WebAPIException</ref>);
14099 <ref>Calendar</ref> getCalendar(<ref>CalendarType</ref> type, <ref>CalendarId</ref> id) raises(<ref>WebAPIException</ref>);
14103 This interface provides methods to access calendars and attributes for calendars.
14104 Once a calendar object is obtained, it is possible to add, remove, or update the information it contains through the Calendar interface methods.
14110 <ExtendedAttributeList>
14111 <ExtendedAttribute name="NoInterfaceObject">
14112 <webidl>NoInterfaceObject</webidl>
14113 </ExtendedAttribute>
14114 </ExtendedAttributeList>
14115 <Operation name="getCalendars" id="::Calendar::CalendarManager::getCalendars">
14116 <webidl> void getCalendars(<ref>CalendarType</ref> type,
14117 <ref>CalendarArraySuccessCallback</ref> successCallback,
14118 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
14121 Gets an array of Calendar objects.
14125 If the operation completes successfully, the <em>successCallback() </em>must be invoked with all the calendars found and available. The first calendar in the list is always the default calendar.
14128 If no Calendar object is available, the <em>successCallback()</em> is invoked with an empty array.
14131 The errorCallback is launched with these error types:
14135 InvalidValuesError - if any of the input parameters contain an invalid value. </li>
14137 UnknownError - if any other error occurs. </li>
14147 http://tizen.org/privilege/calendar.read
14149 <Code> var calendar;
14151 function eventFoundCallback(events) {
14152 // The event has been successfully found
14153 // Changes the summary
14154 events[0].summary = 'HTML6 Webinar';
14155 calendar.update(events[0]);
14156 console.log('First event was updated!');
14159 // Defines the error callback for all the asynchronous calls
14160 function errorCallback(response) {
14161 console.log( 'The following error occurred: ' + response.name);
14164 // Defines the success callback for retrieving the list of calendars
14165 function calendarListCallback(calendars) {
14166 if(calendars.length > 0) {
14167 calendar = calendars[0];
14168 console.log('The calendar id is ' + calendar.id + ' and name ' + calendar.name);
14170 var ev = new tizen.CalendarEvent({description:'HTML5 Introduction',
14171 summary:'HTML5 Webinar',
14172 startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
14173 duration: new tizen.TimeDuration(1, "HOURS"),
14174 location:'Huesca'});
14177 // The event has been successfully added
14178 // Checks if the added event can be retrieved from the calendar
14179 // If the calendar was empty, only the item added through add() should be returned
14180 var filter = new tizen.AttributeFilter('summary', 'CONTAINS', 'HTML5');
14181 calendar.find(eventFoundCallback, errorCallback, filter);
14185 // Gets a list of available calendars
14186 tizen.calendar.getCalendars("EVENT", calendarListCallback, errorCallback);
14189 <Type type="void"/>
14191 <Argument name="type">
14194 The type of calendar.
14197 <Type name="CalendarType"/>
14199 <Argument name="successCallback">
14202 The method to invoke when the invocation ends successfully.
14205 <Type name="CalendarArraySuccessCallback"/>
14207 <Argument optional="optional" name="errorCallback">
14210 The method to invoke when an error occurs.
14213 <Type name="ErrorCallback" nullable="nullable"/>
14217 <RaiseException name="WebAPIException">
14220 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14223 with error type SecurityError, if the application does not have the privilege to call this method.
14226 with error type NotSupportedError, if this feature is not supported.
14232 <Operation name="getUnifiedCalendar" id="::Calendar::CalendarManager::getUnifiedCalendar">
14233 <webidl> <ref>Calendar</ref> getUnifiedCalendar(<ref>CalendarType</ref> type) raises(<ref>WebAPIException</ref>);</webidl>
14236 The unified calendar is the aggregation of all calendars that are obtained from <em>getCalendars</em> and contains all events or tasks. It does not have the calendar id nor name which are set to <var>null</var>.
14240 If an item is added to the unified calendar, it will be saved in the default calendar.
14250 http://tizen.org/privilege/calendar.read
14252 <Code> var unifiedCalendar;
14254 // Defines the error callback for all the asynchronous calls
14255 function errorCallback(response) {
14256 console.log( 'The following error occurred: ' + response.name);
14259 function eventFoundCallback(events) {
14260 // The event has been successfully found
14261 // Changes the summary
14262 events[0].summary = 'HTML6 Webinar';
14263 unifiedCalendar.update(events[0]);
14264 console.log('First event was updated!');
14267 // Gets the unified calendar
14268 unifiedCalendar = tizen.calendar.getUnifiedCalendar("EVENT");
14270 var ev = new tizen.CalendarEvent({description:'HTML5 Introduction',
14271 summary:'HTML5 Webinar ',
14272 startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
14273 duration: new tizen.TimeDuration(1, "HOURS"),
14274 location:'Huesca'});
14276 unifiedCalendar.add(ev);
14278 // The event has been added
14279 // Checks if the added event can be retrieved from the calendar
14280 // If the calendar was empty, only the item added through add() should be returned
14281 var filter = new tizen.AttributeFilter('summary', 'CONTAINS', 'HTML5');
14282 unifiedCalendar.find(eventFoundCallback, errorCallback, filter);
14286 <Type name="Calendar">
14289 Calendar The unified Calendar object.
14294 <Argument name="type">
14297 The type of a calendar.
14300 <Type name="CalendarType"/>
14304 <RaiseException name="WebAPIException">
14307 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14310 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
14313 with error type SecurityError, if the application does not have the privilege to call this method.
14316 with error type NotSupportedError, if this feature is not supported.
14319 with error type UnknownError, if any other error occurs.
14325 <Operation name="getDefaultCalendar" id="::Calendar::CalendarManager::getDefaultCalendar">
14326 <webidl> <ref>Calendar</ref> getDefaultCalendar(<ref>CalendarType</ref> type) raises(<ref>WebAPIException</ref>);</webidl>
14329 Gets the default calendar, which is used for new items.
14338 http://tizen.org/privilege/calendar.read
14340 <Code> var myCalendar;
14342 // Defines the error callback for all the asynchronous calls
14343 function errorCallback(response) {
14344 console.log( 'The following error occurred: ' + response.name);
14347 function eventFoundCallback(events) {
14348 // The event has been successfully found
14349 // Changes the summary
14350 events[0].summary = 'HTML6 Webinar';
14351 myCalendar.update(events[0]);
14352 console.log('First event was updated!');
14355 // Gets the default calendar
14356 myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
14358 var ev = new tizen.CalendarEvent({description:'HTML5 Introduction',
14359 summary:'HTML5 Webinar ',
14360 startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
14361 duration: new tizen.TimeDuration(1, "HOURS"),
14362 location:'Huesca'});
14364 myCalendar.add(ev);
14366 // The event has been added
14367 // Checks if the added event can be retrieved from the calendar
14368 // If the calendar was empty, only the item added through add() should be returned
14369 var filter = new tizen.AttributeFilter('summary', 'CONTAINS', 'HTML5');
14370 myCalendar.find(eventFoundCallback, errorCallback, filter);
14374 <Type name="Calendar">
14377 Calendar The default Calendar object.
14382 <Argument name="type">
14385 The type of a calendar.
14388 <Type name="CalendarType"/>
14392 <RaiseException name="WebAPIException">
14395 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14398 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
14401 with error type SecurityError, if the application does not have the privilege to call this method.
14404 with error type NotSupportedError, if this feature is not supported.
14407 with error type UnknownError, if any other error occurs.
14413 <Operation name="getCalendar" id="::Calendar::CalendarManager::getCalendar">
14414 <webidl> <ref>Calendar</ref> getCalendar(<ref>CalendarType</ref> type, <ref>CalendarId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
14417 Gets the calendar with the specified identifier and type.
14426 http://tizen.org/privilege/calendar.read
14428 <Code> var calendarId; // calendarId supposed to be initialized
14430 var calendar = tizen.calendar.getCalendar("EVENT", calendarId);
14431 console.log("Successfully retrieved event calendar with id: " + calendarId);
14433 console.log("Error: " + err.name);
14437 <Type name="Calendar">
14440 Calendar The matching Calendar object.
14445 <Argument name="type">
14448 The type of a calendar.
14451 <Type name="CalendarType"/>
14453 <Argument name="id">
14456 The calendar identifier.
14459 <Type name="CalendarId"/>
14463 <RaiseException name="WebAPIException">
14466 with error type NotFoundError, if there is no calendar with the given identifier.
14469 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14472 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
14475 with error type SecurityError, if the application does not have the privilege to call this method.
14478 with error type NotSupportedError, if this feature is not supported.
14481 with error type UnknownError, if any other error occurs.
14488 <Interface name="Calendar" id="::Calendar::Calendar">
14489 <webidl> [NoInterfaceObject] interface Calendar {
14491 readonly attribute <ref>CalendarId</ref> id;
14493 readonly attribute DOMString name;
14495 <ref>CalendarItem</ref> get(<ref>CalendarItemId</ref> id) raises(<ref>WebAPIException</ref>);
14497 void add(<ref>CalendarItem</ref> item) raises(<ref>WebAPIException</ref>);
14499 void addBatch(<ref>CalendarItem</ref>[] items,
14500 optional <ref>CalendarItemArraySuccessCallback</ref>? successCallback,
14501 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
14503 void update(<ref>CalendarItem</ref> item,
14504 optional boolean? updateAllInstances) raises(<ref>WebAPIException</ref>);
14506 void updateBatch(<ref>CalendarItem</ref>[] items,
14507 optional <ref>SuccessCallback</ref>? successCallback,
14508 optional <ref>ErrorCallback</ref>? errorCallback,
14509 optional boolean? updateAllInstances) raises(<ref>WebAPIException</ref>);
14511 void remove(<ref>CalendarItemId</ref> id) raises(<ref>WebAPIException</ref>);
14513 void removeBatch(<ref>CalendarItemId</ref>[] ids,
14514 optional <ref>SuccessCallback</ref>? successCallback,
14515 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
14517 void find(<ref>CalendarItemArraySuccessCallback</ref> successCallback,
14518 optional <ref>ErrorCallback</ref>? errorCallback,
14519 optional <ref>AbstractFilter</ref>? filter,
14520 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);
14522 long addChangeListener(<ref>CalendarChangeCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);
14524 void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
14528 This interface that has methods to manage events or tasks in a calendar. A Calendar object contains a set of events or tasks, depending on the calendar type.
14532 This interface offers the following methods to manage events in a calendar:
14536 Finding items using a key-value filter. </li>
14538 Adding items to a specific calendar using <em>add() </em>/ <em>addBatch() </em>methods. </li>
14540 Updating existing items using <em>update() </em>/ <em>updateBatch()</em> methods. </li>
14542 Deleting existing items using <em>remove()</em> / <em>removeBatch() </em>methods. </li>
14544 Tracking calendar changes using <em>addChangeListener()</em> / <em>removeChangeListener() </em>methods. </li>
14551 <ExtendedAttributeList>
14552 <ExtendedAttribute name="NoInterfaceObject">
14553 <webidl>NoInterfaceObject</webidl>
14554 </ExtendedAttribute>
14555 </ExtendedAttributeList>
14556 <Attribute readonly="readonly" name="id" id="::Calendar::Calendar::id">
14557 <webidl> readonly attribute <ref>CalendarId</ref> id;</webidl>
14560 An attribute to uniquely identify a calendar.
14566 <Type name="CalendarId"/>
14568 <Attribute readonly="readonly" name="name" id="::Calendar::Calendar::name">
14569 <webidl> readonly attribute DOMString name;</webidl>
14572 An attribute to assign a readable (descriptive) name for a calendar, such as work, personal, etc.
14577 <Code> // Gets the default calendar and show its name
14578 var calendar = tizen.calendar.getDefaultCalendar("EVENT");
14579 console.log('The calendar name is ' + calendar.name);
14582 <Type type="DOMString"/>
14584 <Operation name="get" id="::Calendar::Calendar::get">
14585 <webidl> <ref>CalendarItem</ref> get(<ref>CalendarItemId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
14588 Gets the calendar item with the specified identifier.
14597 http://tizen.org/privilege/calendar.read
14599 <Code> var myCalendar; // Calendar supposed to be initialized
14600 var itemId; // Calendar item identifier
14602 var item = myCalendar.get(itemId);
14603 console.log("Successfully retrieved item with id: " + itemId);
14605 console.log("Error: " + err.name);
14609 <Type name="CalendarItem">
14612 CalendarItem The matching <em>CalendarItem </em>object.
14617 <Argument name="id">
14620 The Calendar item identifier.
14623 <Type name="CalendarItemId"/>
14627 <RaiseException name="WebAPIException">
14630 with error type NotFoundError, if there is no calendar item with the given identifier.
14633 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14636 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
14639 with error type SecurityError, if the application does not have the privilege to call this method.
14642 with error type NotSupportedError, if this feature is not supported.
14645 with error type UnknownError, if any other error occurs.
14651 <Operation name="add" id="::Calendar::Calendar::add">
14652 <webidl> void add(<ref>CalendarItem</ref> item) raises(<ref>WebAPIException</ref>);</webidl>
14655 Adds an item to the calendar synchronously.
14659 If the item is successfully inserted in the calendar, the <em>CalendarItem </em>will have its identifier (id attribute) set when the method returns.
14662 To update an existing item, call the <em>update() </em>method instead. If you wish to add a copy of an existing <em>CalendarItem </em>object, call <em>CalendarItem.clone()</em> method first and pass the clone to the <em>add()</em> method.
14672 http://tizen.org/privilege/calendar.write
14674 <Code> // Gets the default calendar
14675 var calendar = tizen.calendar.getDefaultCalendar("EVENT");
14677 var ev = new tizen.CalendarEvent({description:'HTML5 Introduction',
14678 summary:'HTML5 Webinar ',
14679 startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
14680 duration: new tizen.TimeDuration(1, "HOURS"),
14681 location:'Huesca'});
14684 console.log('Event added with uid ' + ev.id.uid);
14687 <Type type="void"/>
14689 <Argument name="item">
14692 The calendar item to be added.
14695 <Type name="CalendarItem"/>
14699 <RaiseException name="WebAPIException">
14702 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14705 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
14708 with error type SecurityError, if the application does not have the privilege to call this method.
14711 with error type NotSupportedError, if the feature is not supported.
14714 with error type UnknownError, if any other error occurs.
14720 <Operation name="addBatch" id="::Calendar::Calendar::addBatch">
14721 <webidl> void addBatch(<ref>CalendarItem</ref>[] items,
14722 optional <ref>CalendarItemArraySuccessCallback</ref>? successCallback,
14723 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
14726 Adds an array of items to the calendar asynchronously.
14730 If all the items are successfully added to the calendar, the success callback will be invoked, passing the list of <em>CalendarItem </em>objects that were added, with their identifier set (id attribute).
14733 The <em>errorCallback()</em> is launched with these error types:
14737 InvalidValuesError - if any of the input parameters contain an invalid value, the item has any invalid value or the calendar has some restrictions that cause the attempted insertion of the calendar items to fail (for example, limitations in the size of text attributes) </li>
14739 UnknownError - if any other error occurs. </li>
14742 If you wish to update an existing item, call the <em>update() </em>method instead. If you wish to add a copy of an existing <em>CalendarItem </em>object, call CalendarItem.clone() method first and pass the clone to the add() method.
14752 http://tizen.org/privilege/calendar.write
14754 <Code> // Defines the error callback.
14755 function errorCallback(response) {
14756 console.log( 'The following error occurred: ' + response.name);
14759 function addEventsSuccess(events) {
14760 console.log("Successfully added " + events.length + " events!");
14763 // Gets the default calendar
14764 var calendar = tizen.calendar.getDefaultCalendar("EVENT");
14766 var ev = new tizen.CalendarEvent({description:'HTML5 Introduction',
14767 summary:'HTML5 Webinar ',
14768 startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
14769 duration: new tizen.TimeDuration(1, "HOURS"),
14770 location:'Huesca'});
14772 calendar.addBatch([ev], addEventsSuccess, errorCallback);
14775 <Type type="void"/>
14777 <Argument name="items">
14780 The list of calendar items to add.
14783 <Type type="array">
14784 <Type name="CalendarItem"/>
14787 <Argument optional="optional" name="successCallback">
14790 The method to call when the invocation ends successfully.
14793 <Type name="CalendarItemArraySuccessCallback" nullable="nullable"/>
14795 <Argument optional="optional" name="errorCallback">
14798 The method to invoke when the request fails.
14801 <Type name="ErrorCallback" nullable="nullable"/>
14805 <RaiseException name="WebAPIException">
14808 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14811 with error type SecurityError, if the application does not have the privilege to call this method.
14814 with error type NotSupportedError, if the feature is not supported.
14820 <Operation name="update" id="::Calendar::Calendar::update">
14821 <webidl> void update(<ref>CalendarItem</ref> item,
14822 optional boolean? updateAllInstances) raises(<ref>WebAPIException</ref>);</webidl>
14825 Updates an existing item in the calendar synchronously with the one specified in the argument.
14829 In case of recurring events, the default behavior is to update all their instances (including their detached ones), as well. If you don't want that, the <em>updateAllInstances</em> flag should be set to <var>false</var>.
14839 http://tizen.org/privilege/calendar.write
14841 <Code> var myCalendar;
14843 // Defines the error callback.
14844 function errorCallback(response) {
14845 console.log( 'The following error occurred: ' + response.name);
14848 // Defines the event success callback.
14849 function eventSearchSuccessCallback(events) {
14850 events[0].description = 'New Description';
14851 // Updates the first existing event.
14852 myCalendar.update(events[0]);
14853 console.log("The first item description was updated!");
14856 // Gets the default calendar
14857 myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
14859 // Finds all events in a Calendar
14860 myCalendar.find(eventSearchSuccessCallback, errorCallback);
14863 <Type type="void"/>
14865 <Argument name="item">
14868 The Item object to update.
14871 <Type name="CalendarItem"/>
14873 <Argument optional="optional" name="updateAllInstances">
14876 The flag indicating whether all the event instances should be updated as well or not (default value is <var>true</var>). This parameter only applies to calendar events, and doesn't apply to tasks.
14879 <Type type="boolean" nullable="nullable"/>
14883 <RaiseException name="WebAPIException">
14886 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14889 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
14892 with error type SecurityError, if the application does not have the privilege to call this method.
14895 with error type NotSupportedError, if the feature is not supported.
14898 with error type UnknownError, if any other error occurs.
14904 <Operation name="updateBatch" id="::Calendar::Calendar::updateBatch">
14905 <webidl> void updateBatch(<ref>CalendarItem</ref>[] items,
14906 optional <ref>SuccessCallback</ref>? successCallback,
14907 optional <ref>ErrorCallback</ref>? errorCallback,
14908 optional boolean? updateAllInstances) raises(<ref>WebAPIException</ref>);</webidl>
14911 Updates an array of existing items in the calendar asynchronously with the specified values in the argument.
14915 In case of recurring events, the default behavior is to update all their instances (including their detached ones) as well. The <em>updateAllInstances</em> flag should be set to <var>false</var> to change the default behavior.
14918 The <em>errorCallback() </em>is launched with these error types:
14922 InvalidValuesError - if parameters such as the calendar item has any invalid value or the calendar has some restrictions that cause the attempted insertion of the calendar items to fail (for example, limitations in the size of text attributes). </li>
14924 UnknownError - if any other error occurs. </li>
14934 http://tizen.org/privilege/calendar.write
14936 <Code> var myCalendar;
14938 // Defines the error callback.
14939 function errorCallback(response) {
14940 console.log( 'The following error occurred: ' + response.name);
14943 // Defines the success callback
14944 function updateEventsSuccess() {
14945 console.log("Successfully updated !" );
14948 // Defines the event success callback.
14949 function eventSearchSuccessCallback(events) {
14950 events[0].description = 'New Description 1';
14951 events[1].description = 'New Description 2';
14952 // Update the first two existing events.
14953 myCalendar.updateBatch(events.slice(0,2), updateEventsSuccess, errorCallback);
14956 // Gets the default calendar
14957 myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
14959 // Finds all events in Calendar
14960 myCalendar.find(eventSearchSuccessCallback, errorCallback);
14963 <Type type="void"/>
14965 <Argument name="items">
14968 The list of calendar item objects to update.
14971 <Type type="array">
14972 <Type name="CalendarItem"/>
14975 <Argument optional="optional" name="successCallback">
14978 The method to invoke when the <em>updateEvents() </em>request succeeds.
14981 <Type name="SuccessCallback" nullable="nullable"/>
14983 <Argument optional="optional" name="errorCallback">
14986 The method to invoke when the <em>updateEvents() </em>request fails.
14989 <Type name="ErrorCallback" nullable="nullable"/>
14991 <Argument optional="optional" name="updateAllInstances">
14994 The flag indicating whether all the event instances should be updated or not. Default value for this flag is <var>true</var>). This parameter applies only to calendar events, doesn't apply to tasks.
14997 <Type type="boolean" nullable="nullable"/>
15001 <RaiseException name="WebAPIException">
15004 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
15007 with error type SecurityError, if the application does not have the privilege to call this method.
15010 with error type NotSupportedError, if the feature is not supported.
15016 <Operation name="remove" id="::Calendar::Calendar::remove">
15017 <webidl> void remove(<ref>CalendarItemId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
15020 Removes an item from the calendar that corresponds to the specified identifier. This method will throw an exception if it fails to remove the specified calendar item.
15029 http://tizen.org/privilege/calendar.write
15032 <b>For (recurring) events:</b> In the case of calendar events, if the recurrence id (<em>rid</em> attribute) is set to <var>null</var>, this method will remove the event identified by <em>uid</em>, and all of its possible detached instances.
15034 <Code> var myCalendar;
15036 // Defines the error callback.
15037 function errorCallback(response) {
15038 console.log( 'The following error occurred: ' + response.name);
15041 // Defines the event success callback.
15042 function eventSearchSuccessCallback(events) {
15043 // Deletes the first existing event.
15044 myCalendar.remove(events[0].id);
15045 console.log('The first event was removed');
15048 // Gets default calendar
15049 myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
15051 // Finds all events in Calendar
15052 myCalendar.find(eventSearchSuccessCallback, errorCallback);
15055 <Type type="void"/>
15057 <Argument name="id">
15060 The identifier (ID attribute) of the item object to delete.
15063 <Type name="CalendarItemId"/>
15067 <RaiseException name="WebAPIException">
15070 with error type NotFoundError, if the identifier does not match any item in the calendar.
15073 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
15076 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
15079 with error type SecurityError, if the application does not have the privilege to call this method.
15082 with error type NotSupportedError, if the feature is not supported.
15085 with error type UnknownError, if the item could not be removed because of an unknown error.
15091 <Operation name="removeBatch" id="::Calendar::Calendar::removeBatch">
15092 <webidl> void removeBatch(<ref>CalendarItemId</ref>[] ids,
15093 optional <ref>SuccessCallback</ref>? successCallback,
15094 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
15097 Removes several items from the calendar asynchronously depending on the specified identifiers.
15101 The errorCallback is launched with these error types:
15105 NotFoundError - if an identifier in the <em>ids </em>parameter does not correspond to the ID attribute of an item in the calendar. </li>
15107 InvalidValuesError - if any of the input parameters contain an invalid value. </li>
15109 UnknownError - if any other error occurs. </li>
15119 http://tizen.org/privilege/calendar.write
15122 <b>For (recurring) events:</b> In the case of calendar events, if the recurrence id, <em>rid</em>, is set to <var>null</var>, this method will remove the event identified by <em>uid</em>, as well as all its possible detached instances.
15124 <Code> var myCalendar;
15126 // Defines the error callback.
15127 function errorCallback(response) {
15128 console.log( 'The following error occurred: ' + response.name);
15131 // Defines the removeBatch callback
15132 function removeBatchCallback() {
15133 console.log("Requested events were successfully removed.");
15136 // Defines the event search success callback.
15137 function eventSearchSuccessCallback(events) {
15138 // Deletes the first two existing events.
15139 myCalendar.removeBatch([events[0].id, events[1].id],
15140 removeBatchCallback,
15144 // Gets default calendar
15145 myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
15147 // Retrieves all events in Calendar
15148 myCalendar.find(eventSearchSuccessCallback, errorCallback);
15151 <Type type="void"/>
15153 <Argument name="ids">
15156 The identifiers (<em>id </em>attribute) of the items to delete.
15159 <Type type="array">
15160 <Type name="CalendarItemId"/>
15163 <Argument optional="optional" name="successCallback">
15166 The method to invoke when the <em>removeBatch()</em> request succeeds.
15169 <Type name="SuccessCallback" nullable="nullable"/>
15171 <Argument optional="optional" name="errorCallback">
15174 The method to invoke when the <em>removeBatch()</em> request fails.
15177 <Type name="ErrorCallback" nullable="nullable"/>
15181 <RaiseException name="WebAPIException">
15184 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
15187 with error type SecurityError, if the application does not have the privilege to call this method.
15190 with error type NotSupportedError, if the feature is not supported.
15196 <Operation name="find" id="::Calendar::Calendar::find">
15197 <webidl> void find(<ref>CalendarItemArraySuccessCallback</ref> successCallback,
15198 optional <ref>ErrorCallback</ref>? errorCallback,
15199 optional <ref>AbstractFilter</ref>? filter,
15200 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);</webidl>
15203 Finds and fetches an array of <em>CalendarItem </em>objects for items stored in the calendar according to the supplied filter if it is valid else it will return all the items stored.
15207 If the filter is passed and contains valid values, only those values in the calendar that match the filter criteria as specified in the <em>AbstractFilter </em>interface will be returned in the <em>successCallback()</em>.
15208 If no filter is passed, or the filter contains any invalid value which is <var>null </var>or undefined, then the implementation must return the full list of items in the <em>successCallback()</em>.
15209 If no items are available in the calendar (it is empty) or no item matches the filter criteria, the <em>successCallback() </em>will be invoked with an empty array.
15212 The errorCallback is launched with these error types:
15216 InvalidValuesError - if any of the input parameters contain an invalid value. </li>
15218 UnknownError - if any other error occurs. </li>
15221 <b>Filter specific remarks:</b> </p>
15224 For event filtering based on start/end dates, items that recur during the given time interval will be found, even if the parent item itself is outside the interval. </li>
15226 For event filtering based on the identifier, the identifier type should be CalendarEventID (<em>uid</em> and <em>rid</em>).
15227 If no recurrence ID is given, the filter will match both the parent event and all its detached instances. </li>
15237 http://tizen.org/privilege/calendar.read
15239 <Code> // Defines the error callback.
15240 function errorCallback(response) {
15241 console.log( 'The following error occurred: ' + response.name);
15244 // Defines the event search success callback.
15245 function eventSearchSuccessCallback(events) {
15246 console.log(events.length + ' results found.');
15249 // Gets default calendar
15250 var calendar = tizen.calendar.getDefaultCalendar("EVENT");
15252 // Finds all events the calendar that contain in the summary the string Tizen.
15253 var filter = new tizen.AttributeFilter('summary', 'CONTAINS', 'Tizen');
15255 // The events returned by the find() query will be sorted by ascending summary
15256 var sortingMode = new tizen.SortMode('summary', 'ASC');
15258 calendar.find(eventSearchSuccessCallback, errorCallback, filter, sortingMode);
15261 <Type type="void"/>
15263 <Argument name="successCallback">
15266 The method to call when the invocation ends successfully.
15269 <Type name="CalendarItemArraySuccessCallback"/>
15271 <Argument optional="optional" name="errorCallback">
15274 The method to call when an error occurs.
15277 <Type name="ErrorCallback" nullable="nullable"/>
15279 <Argument optional="optional" name="filter">
15282 The supplied data used to filter the results of the <em>find() </em>method.
15285 <Type name="AbstractFilter" nullable="nullable"/>
15287 <Argument optional="optional" name="sortMode">
15290 The sort order in which the items return.
15293 <Type name="SortMode" nullable="nullable"/>
15297 <RaiseException name="WebAPIException">
15300 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
15303 with error type SecurityError, if the application does not have the privilege to call this method.
15306 with error type NotSupportedError, if the feature is not supported.
15312 <Operation name="addChangeListener" id="::Calendar::Calendar::addChangeListener">
15313 <webidl> long addChangeListener(<ref>CalendarChangeCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);</webidl>
15316 Adds a listener to receive notifications about calendar changes.
15320 When executed, the implementation must immediately return a subscription identifier that identifies the watch operation. After returning the identifier, the watcher methods are invoked asynchronously.
15330 http://tizen.org/privilege/calendar.read
15332 <Code> var watcherId = 0; // watcher identifier
15333 var calendar; // This example assumes calendar is initialized
15336 onitemsadded: function(items) {
15337 console.log(items.length + ' items were added');
15339 onitemsupdated: function(items) {
15340 console.log(items.length + ' items were updated');
15342 onitemsremoved: function(ids) {
15343 console.log(ids.length + ' items were removed');
15347 // Registers to be notified when the calendar changes
15348 watcherId = calendar.addChangeListener(watcher);
15354 long The identifier used to clear the watch subscription.
15359 <Argument name="successCallback">
15362 The methods to invoke on receiving calendar change notifications.
15365 <Type name="CalendarChangeCallback"/>
15369 <RaiseException name="WebAPIException">
15372 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
15375 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
15378 with error type SecurityError, if the application does not have the privilege to call this method.
15381 with error type NotSupportedError, if the feature is not supported.
15384 with error type UnknownError, if any other error occurs.
15390 <Operation name="removeChangeListener" id="::Calendar::Calendar::removeChangeListener">
15391 <webidl> void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);</webidl>
15394 Unsubscribes from receiving notification for a calendar item changes.
15398 If the <em>watchId </em>argument is valid and corresponds to a subscription already in place, the watch process must immediately stop and no further callbacks must be invoked. If the <em>watchId </em>argument is not valid or does not correspond to a valid subscription, the method should return without any further action.
15408 http://tizen.org/privilege/calendar.read
15410 <Code> var watcherId = 0; // watcher identifier
15411 var calendar; // This example assumes calendar is initialized
15413 // Receives calendar changes
15415 onitemsadded: function(items) {
15416 console.log(items.length + ' items were added');
15418 onitemsupdated: function(items) {
15419 console.log(evitemsents.length + ' items were updated');
15421 onitemsremoved: function(ids) {
15422 console.log(ids.length + ' items were removed');
15426 // Registers to be notified when the calendar changes
15427 watcherId = calendar.addChangeListener(watcher);
15429 // Cancels the watch operation
15430 calendar.removeChangeListener(watcherId);
15433 <Type type="void"/>
15435 <Argument name="watchId">
15438 Subscription Identifier.
15441 <Type type="long"/>
15445 <RaiseException name="WebAPIException">
15448 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
15451 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
15454 with error type SecurityError, if the application does not have the privilege to call this method.
15457 with error type NotSupportedError, if the feature is not supported.
15460 with error type UnknownError if any other error occurs.
15467 <Dictionary name="CalendarItemInit" id="::Calendar::CalendarItemInit">
15468 <webidl> dictionary CalendarItemInit {
15469 DOMString description;
15472 <ref>TZDate</ref> startDate;
15473 <ref>TimeDuration</ref> duration;
15474 DOMString location;
15475 <ref>SimpleCoordinates</ref> geolocation;
15476 DOMString organizer;
15477 <ref>CalendarItemVisibility</ref> visibility;
15478 <ref>CalendarItemStatus</ref> status;
15479 <ref>CalendarItemPriority</ref> priority;
15480 <ref>CalendarAlarm</ref>[] alarms;
15481 DOMString[] categories;
15482 <ref>CalendarAttendee</ref>[] attendees;
15486 A dictionary that is used for creating calendar items.
15490 These attributes are shared by both calendar events and tasks.
15497 <DictionaryMember name="description" id="::Calendar::CalendarItemInit::description">
15498 <webidl> DOMString description;</webidl>
15499 <Type type="DOMString"/>
15500 </DictionaryMember>
15501 <DictionaryMember name="summary" id="::Calendar::CalendarItemInit::summary">
15502 <webidl> DOMString summary;</webidl>
15503 <Type type="DOMString"/>
15504 </DictionaryMember>
15505 <DictionaryMember name="isAllDay" id="::Calendar::CalendarItemInit::isAllDay">
15506 <webidl> boolean isAllDay;</webidl>
15507 <Type type="boolean"/>
15508 </DictionaryMember>
15509 <DictionaryMember name="startDate" id="::Calendar::CalendarItemInit::startDate">
15510 <webidl> <ref>TZDate</ref> startDate;</webidl>
15511 <Type name="TZDate"/>
15512 </DictionaryMember>
15513 <DictionaryMember name="duration" id="::Calendar::CalendarItemInit::duration">
15514 <webidl> <ref>TimeDuration</ref> duration;</webidl>
15515 <Type name="TimeDuration"/>
15516 </DictionaryMember>
15517 <DictionaryMember name="location" id="::Calendar::CalendarItemInit::location">
15518 <webidl> DOMString location;</webidl>
15519 <Type type="DOMString"/>
15520 </DictionaryMember>
15521 <DictionaryMember name="geolocation" id="::Calendar::CalendarItemInit::geolocation">
15522 <webidl> <ref>SimpleCoordinates</ref> geolocation;</webidl>
15523 <Type name="SimpleCoordinates"/>
15524 </DictionaryMember>
15525 <DictionaryMember name="organizer" id="::Calendar::CalendarItemInit::organizer">
15526 <webidl> DOMString organizer;</webidl>
15527 <Type type="DOMString"/>
15528 </DictionaryMember>
15529 <DictionaryMember name="visibility" id="::Calendar::CalendarItemInit::visibility">
15530 <webidl> <ref>CalendarItemVisibility</ref> visibility;</webidl>
15531 <Type name="CalendarItemVisibility"/>
15532 </DictionaryMember>
15533 <DictionaryMember name="status" id="::Calendar::CalendarItemInit::status">
15534 <webidl> <ref>CalendarItemStatus</ref> status;</webidl>
15535 <Type name="CalendarItemStatus"/>
15536 </DictionaryMember>
15537 <DictionaryMember name="priority" id="::Calendar::CalendarItemInit::priority">
15538 <webidl> <ref>CalendarItemPriority</ref> priority;</webidl>
15539 <Type name="CalendarItemPriority"/>
15540 </DictionaryMember>
15541 <DictionaryMember name="alarms" id="::Calendar::CalendarItemInit::alarms">
15542 <webidl> <ref>CalendarAlarm</ref>[] alarms;</webidl>
15543 <Type type="array">
15544 <Type name="CalendarAlarm"/>
15546 </DictionaryMember>
15547 <DictionaryMember name="categories" id="::Calendar::CalendarItemInit::categories">
15548 <webidl> DOMString[] categories;</webidl>
15549 <Type type="array">
15550 <Type type="DOMString"/>
15552 </DictionaryMember>
15553 <DictionaryMember name="attendees" id="::Calendar::CalendarItemInit::attendees">
15554 <webidl> <ref>CalendarAttendee</ref>[] attendees;</webidl>
15555 <Type type="array">
15556 <Type name="CalendarAttendee"/>
15558 </DictionaryMember>
15560 <Dictionary name="CalendarTaskInit" id="::Calendar::CalendarTaskInit">
15561 <webidl> dictionary CalendarTaskInit: <ref>CalendarItemInit</ref> {
15562 <ref>TZDate</ref> dueDate;
15563 <ref>TZDate</ref> completedDate;
15568 A dictionary that is used for creating calendar tasks.
15572 It also provides an interface for specifying task attributes upon task creation (in the <em>CalendarTask </em>constructor).
15575 All the attributes are optional and are undefined by default.
15582 <DictionaryInheritance>
15583 <Name name="CalendarItemInit"/>
15584 </DictionaryInheritance>
15585 <DictionaryMember name="dueDate" id="::Calendar::CalendarTaskInit::dueDate">
15586 <webidl> <ref>TZDate</ref> dueDate;</webidl>
15587 <Type name="TZDate"/>
15588 </DictionaryMember>
15589 <DictionaryMember name="completedDate" id="::Calendar::CalendarTaskInit::completedDate">
15590 <webidl> <ref>TZDate</ref> completedDate;</webidl>
15591 <Type name="TZDate"/>
15592 </DictionaryMember>
15593 <DictionaryMember name="progress" id="::Calendar::CalendarTaskInit::progress">
15594 <webidl> short progress;</webidl>
15595 <Type type="short"/>
15596 </DictionaryMember>
15598 <Dictionary name="CalendarEventInit" id="::Calendar::CalendarEventInit">
15599 <webidl> dictionary CalendarEventInit: <ref>CalendarItemInit</ref> {
15600 <ref>TZDate</ref> endDate;
15601 <ref>EventAvailability</ref> availability;
15602 <ref>CalendarRecurrenceRule</ref> recurrenceRule;
15606 A dictionary that is used for creating calendar events.
15610 Provides an interface for specifying event attributes upon event creation (in the <em>CalendarEvent </em>constructor).
15613 All the attributes are optional and are undefined by default.
15620 <DictionaryInheritance>
15621 <Name name="CalendarItemInit"/>
15622 </DictionaryInheritance>
15623 <DictionaryMember name="endDate" id="::Calendar::CalendarEventInit::endDate">
15624 <webidl> <ref>TZDate</ref> endDate;</webidl>
15625 <Type name="TZDate"/>
15626 </DictionaryMember>
15627 <DictionaryMember name="availability" id="::Calendar::CalendarEventInit::availability">
15628 <webidl> <ref>EventAvailability</ref> availability;</webidl>
15629 <Type name="EventAvailability"/>
15630 </DictionaryMember>
15631 <DictionaryMember name="recurrenceRule" id="::Calendar::CalendarEventInit::recurrenceRule">
15632 <webidl> <ref>CalendarRecurrenceRule</ref> recurrenceRule;</webidl>
15633 <Type name="CalendarRecurrenceRule"/>
15634 </DictionaryMember>
15636 <Interface name="CalendarItem" id="::Calendar::CalendarItem">
15637 <webidl> [NoInterfaceObject] interface CalendarItem {
15638 readonly attribute <ref>CalendarItemId</ref>? id;
15640 readonly attribute <ref>CalendarId</ref>? calendarId;
15642 readonly attribute <ref>TZDate</ref>? lastModificationDate;
15644 attribute DOMString? description setraises(<ref>WebAPIException</ref>);
15646 attribute DOMString? summary setraises(<ref>WebAPIException</ref>);
15648 attribute boolean isAllDay setraises(<ref>WebAPIException</ref>);
15650 attribute <ref>TZDate</ref>? startDate setraises(<ref>WebAPIException</ref>);
15652 attribute <ref>TimeDuration</ref>? duration setraises(<ref>WebAPIException</ref>);
15654 attribute DOMString? location setraises(<ref>WebAPIException</ref>);
15656 attribute <ref>SimpleCoordinates</ref>? geolocation setraises(<ref>WebAPIException</ref>);
15658 attribute DOMString? organizer setraises(<ref>WebAPIException</ref>);
15660 attribute <ref>CalendarItemVisibility</ref> visibility setraises(<ref>WebAPIException</ref>);
15662 attribute <ref>CalendarItemStatus</ref> status setraises(<ref>WebAPIException</ref>);
15664 attribute <ref>CalendarItemPriority</ref> priority setraises(<ref>WebAPIException</ref>);
15666 attribute <ref>CalendarAlarm</ref>[] alarms setraises(<ref>WebAPIException</ref>);
15668 attribute DOMString[] categories setraises(<ref>WebAPIException</ref>);
15670 attribute <ref>CalendarAttendee</ref>[] attendees setraises(<ref>WebAPIException</ref>);
15672 DOMString convertToString(<ref>CalendarTextFormat</ref> format) raises(<ref>WebAPIException</ref>);
15674 <ref>CalendarItem</ref> clone() raises(<ref>WebAPIException</ref>);
15678 This is a parent interface that is used to create Calendar events and tasks.
15679 These attributes are shared by both events and tasks.
15685 <ExtendedAttributeList>
15686 <ExtendedAttribute name="NoInterfaceObject">
15687 <webidl>NoInterfaceObject</webidl>
15688 </ExtendedAttribute>
15689 </ExtendedAttributeList>
15690 <Attribute readonly="readonly" name="id" id="::Calendar::CalendarItem::id">
15691 <webidl> readonly attribute <ref>CalendarItemId</ref>? id;</webidl>
15694 An attribute to persistently and uniquely identify an item in implementation.
15698 Includes a UID and a possible recurrence ID that is needed to identify a particular instance of a recurring event.
15701 By default, this attribute is set to null.
15708 <Type name="CalendarItemId" nullable="nullable"/>
15710 <Attribute readonly="readonly" name="calendarId" id="::Calendar::CalendarItem::calendarId">
15711 <webidl> readonly attribute <ref>CalendarId</ref>? calendarId;</webidl>
15714 An attribute to identify the calendar in which this item is saved.
15718 By default, this attribute is set to null.
15725 <Type name="CalendarId" nullable="nullable"/>
15727 <Attribute readonly="readonly" name="lastModificationDate" id="::Calendar::CalendarItem::lastModificationDate">
15728 <webidl> readonly attribute <ref>TZDate</ref>? lastModificationDate;</webidl>
15731 An attribute to identify the last modified date and time of an item.
15735 This attribute is automatically populated and cannot be edited by the client.
15736 (See RFC 5545 - Section 3.8.7.3).
15743 <Type name="TZDate" nullable="nullable"/>
15745 <Attribute name="description" id="::Calendar::CalendarItem::description">
15746 <webidl> attribute DOMString? description setraises(<ref>WebAPIException</ref>);</webidl>
15749 An attribute to store the textual descriptions of an item.
15753 It is usually used to provide a more complete description of the item and any supporting information than what is provided in the summary attribute.
15754 (See RFC 5545 - Section 3.8.1.5).
15757 The default value is an empty string.
15763 <Code> event.description = 'Tizen Codefest';
15766 <Type type="DOMString" nullable="nullable"/>
15768 <RaiseException name="WebAPIException"/>
15771 <Attribute name="summary" id="::Calendar::CalendarItem::summary">
15772 <webidl> attribute DOMString? summary setraises(<ref>WebAPIException</ref>);</webidl>
15775 An attribute to store a short summary or subject for an item.
15776 (See RFC 5545 - Section 3.8.1.12)
15780 The default value is an empty string.
15786 <Code> event.summary = 'Launching the Tizen reference implementation';
15789 <Type type="DOMString" nullable="nullable"/>
15791 <RaiseException name="WebAPIException"/>
15794 <Attribute name="isAllDay" id="::Calendar::CalendarItem::isAllDay">
15795 <webidl> attribute boolean isAllDay setraises(<ref>WebAPIException</ref>);</webidl>
15798 An attribute that behaves like a flag to indicate whether an event is an all-day event or not.
15802 If set to <var>true</var>, then the time and time zone of the <em>startDate </em>are to be ignored and are not guaranteed to be stored in the database. An all-day event always covers the whole day, regardless of which time zone it was defined in and what the current time zone is. The duration must be <var>n*60*24 </var>minutes for an event lasting <var>n</var> days.
15805 The default value for this attribute is <var>false</var>.
15811 <Code> event.isAllDay = true; // All-Day event
15814 <Type type="boolean"/>
15816 <RaiseException name="WebAPIException"/>
15819 <Attribute name="startDate" id="::Calendar::CalendarItem::startDate">
15820 <webidl> attribute <ref>TZDate</ref>? startDate setraises(<ref>WebAPIException</ref>);</webidl>
15823 An attribute to store the start date/time for an item.
15824 (see RFC 5545 - Section 3.8.2.4).
15828 The default value for this attribute is <var>null</var>.
15831 <em>startDate</em> must be specified in the same time zone as <em>endDate / dueDate</em> if provided.
15839 This attribute is precise to the second. Milliseconds are ignored.
15842 <Code> // 2010-04-30 09:00
15843 event.startDate = new tizen.TZDate(2010, 3, 30, 9, 0);
15846 <Type name="TZDate" nullable="nullable"/>
15848 <RaiseException name="WebAPIException"/>
15851 <Attribute name="duration" id="::Calendar::CalendarItem::duration">
15852 <webidl> attribute <ref>TimeDuration</ref>? duration setraises(<ref>WebAPIException</ref>);</webidl>
15855 An attribute to denote the duration of the calendar component.
15856 (See RFC 5545 - Section 3.8.2.5).
15860 By default, this attribute is set to <var>null</var>.
15863 <em>duration</em> and <em>endDate / dueDate</em> are mutually exclusive, hence, only one of them can be non-null.
15866 This attribute is precise to the second. Milliseconds are ignored.
15870 Note that the implementation may not save the duration itself, rather convert it to the corresponding endDate/dueDate attribute and save it. For example, if you set the startDate and the duration attributes and save the item, you may see that the duration is <var>null</var> while endDate/dueDate is non-null after retrieving it because the implementation has calculated the endDate/dueDate based on the duration and the startDate then saved it, not the duration.
15875 <Code> // 1 hour meeting
15876 event.duration = new tizen.TimeDuration(1, "HOURS");
15879 <Type name="TimeDuration" nullable="nullable"/>
15881 <RaiseException name="WebAPIException"/>
15884 <Attribute name="location" id="::Calendar::CalendarItem::location">
15885 <webidl> attribute DOMString? location setraises(<ref>WebAPIException</ref>);</webidl>
15888 An attribute to store the location or the intended venue for the activity defined by the calendar item.
15889 (See RFC 5545 - Section 3.8.1.7)
15893 The default value for this attribute is an empty string.
15899 <Code> event.location = 'Huesca';
15902 <Type type="DOMString" nullable="nullable"/>
15904 <RaiseException name="WebAPIException"/>
15907 <Attribute name="geolocation" id="::Calendar::CalendarItem::geolocation">
15908 <webidl> attribute <ref>SimpleCoordinates</ref>? geolocation setraises(<ref>WebAPIException</ref>);</webidl>
15911 An attribute to store the global position latitude and longitude of the location where the event is planned to take place.
15912 (See RFC 5545 - Section 3.8.1.6).
15917 <Code> event.geolocation = new tizen.SimpleCoordinates(60.175, 24.934);
15920 <Type name="SimpleCoordinates" nullable="nullable"/>
15922 <RaiseException name="WebAPIException"/>
15925 <Attribute name="organizer" id="::Calendar::CalendarItem::organizer">
15926 <webidl> attribute DOMString? organizer setraises(<ref>WebAPIException</ref>);</webidl>
15929 An attribute to store the name of the person who organized this event.
15930 (See RFC 5545 - Section 3.8.4.3).
15934 By default, this attribute is initialized to an empty string.
15940 <Code> event.organizer = 'Mr. Jones';
15943 <Type type="DOMString" nullable="nullable"/>
15945 <RaiseException name="WebAPIException"/>
15948 <Attribute name="visibility" id="::Calendar::CalendarItem::visibility">
15949 <webidl> attribute <ref>CalendarItemVisibility</ref> visibility setraises(<ref>WebAPIException</ref>);</webidl>
15952 An attribute to mark the visibility (secrecy) level of the item.
15953 (See RFC 5545 - Section 3.8.1.3).
15957 The default value is <var>PUBLIC</var>.
15964 <Type name="CalendarItemVisibility"/>
15966 <RaiseException name="WebAPIException"/>
15969 <Attribute name="status" id="::Calendar::CalendarItem::status">
15970 <webidl> attribute <ref>CalendarItemStatus</ref> status setraises(<ref>WebAPIException</ref>);</webidl>
15973 An attribute to store the overall confirmation status for a calendar component.
15974 (See RFC 5545 - Section 3.8.1.11).
15978 For an event, the default value is <var>CONFIRMED</var>. For a task, the default value is <var>NEEDS_ACTION</var>.
15984 <Code> event.status = "TENTATIVE";
15987 <Type name="CalendarItemStatus"/>
15989 <RaiseException name="WebAPIException"/>
15992 <Attribute name="priority" id="::Calendar::CalendarItem::priority">
15993 <webidl> attribute <ref>CalendarItemPriority</ref> priority setraises(<ref>WebAPIException</ref>);</webidl>
15996 An attribute to indicate the priority level of an item and may be used to relatively prioritize multiple items during a given period of time.
15997 (See RFC 5545 - Section 3.8.1.9).
16001 The default value for this attribute is <var>LOW </var>priority.
16004 If the native item database supports another priority schema (such as a range from 1 to 9), the implementation must convert those values to the supported values. For instance, RFC 5545 suggests the following mapping for a range from 1 to 9:
16018 <Code> task.priority = "HIGH";
16021 <Type name="CalendarItemPriority"/>
16023 <RaiseException name="WebAPIException"/>
16026 <Attribute name="alarms" id="::Calendar::CalendarItem::alarms">
16027 <webidl> attribute <ref>CalendarAlarm</ref>[] alarms setraises(<ref>WebAPIException</ref>);</webidl>
16030 An attribute array to lists the alarms (or reminders) associated to an item.
16035 <Code> ev.startDate = new tizen.TZDate(2011, 2, 11, 8, 0, 0);
16036 // Gives a sound notification 30 minutes before the item's start time
16037 var alarm = new tizen.CalendarAlarm(new tizen.TimeDuration(30, "MINS"),
16038 "SOUND");
16039 ev.alarms = [alarm];
16042 <Type type="array">
16043 <Type name="CalendarAlarm"/>
16046 <RaiseException name="WebAPIException"/>
16049 <Attribute name="categories" id="::Calendar::CalendarItem::categories">
16050 <webidl> attribute DOMString[] categories setraises(<ref>WebAPIException</ref>);</webidl>
16053 An attribute to indicate the item categories or subtypes of a calendar component. The categories are useful in searching for a calendar component of a particular type and category.
16054 (See RFC 5545 - Section 3.8.1.2).
16058 Examples of categories are personal, work, vacation, travel, etc.
16061 By default, this attribute is set to an empty array.
16067 <Code> event.categories = ['Personal'];
16070 <Type type="array">
16071 <Type type="DOMString"/>
16074 <RaiseException name="WebAPIException"/>
16077 <Attribute name="attendees" id="::Calendar::CalendarItem::attendees">
16078 <webidl> attribute <ref>CalendarAttendee</ref>[] attendees setraises(<ref>WebAPIException</ref>);</webidl>
16081 An attribute array that lists the people attending an event.
16082 (See RFC 5545 - Section 3.8.4.3).
16086 By default, this attribute is set to an empty array.
16092 <Code> var attendee = new tizen.CalendarAttendee('mailto:bob@domain.com',
16093 {role: "CHAIR", RSVP: true});
16094 event.attendees = [attendee];
16097 <Type type="array">
16098 <Type name="CalendarAttendee"/>
16101 <RaiseException name="WebAPIException"/>
16104 <Operation name="convertToString" id="::Calendar::CalendarItem::convertToString">
16105 <webidl> DOMString convertToString(<ref>CalendarTextFormat</ref> format) raises(<ref>WebAPIException</ref>);</webidl>
16108 Converts the calendar item to a string format that will be generated and returned synchronously.
16109 The export format is set using the format parameter.
16118 http://tizen.org/privilege/calendar.read
16120 <Code> // Defines the event search success callback.
16121 function eventSearchSuccessCallback(events) {
16122 // Converts the first event to iCalendar 2.0 format (default)
16123 var vevent = events[0].convertToString("ICALENDAR_20");
16124 console.log('iCalendar 2.0 representation of the event is: ' + vevent);
16127 function errorCallback(response) {
16128 console.log( 'The following error occurred: ' + response.name);
16131 // Gets the default calendar
16132 var myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
16134 // Finds all events in the first calendar that contain in the summary the string Tizen.
16135 var filter = new tizen.AttributeFilter('summary', 'CONTAINS', 'Tizen');
16136 myCalendar.find(eventSearchSuccessCallback, errorCallback, filter);
16139 <Type type="DOMString">
16142 DOMString The representation of the Calendar item.
16147 <Argument name="format">
16150 The format to use for exporting.
16153 <Type name="CalendarTextFormat"/>
16157 <RaiseException name="WebAPIException">
16160 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
16163 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
16166 with error type SecurityError, if the application does not have the privilege to call this method.
16169 with error type NotSupportedError, if the feature is not supported.
16172 with error type UnknownError, if any other error occurs.
16178 <Operation name="clone" id="::Calendar::CalendarItem::clone">
16179 <webidl> <ref>CalendarItem</ref> clone() raises(<ref>WebAPIException</ref>);</webidl>
16182 Clones the <em>CalendarItem </em>object, detached from any calendar.
16186 The <em>CalendarItem </em>object returned by the <em>clone()</em> method will have its identifier set to <var>null </var>and will be detached from any calendar.
16196 http://tizen.org/privilege/calendar.read
16198 <Code> // Gets default calendar.
16199 var calendar = tizen.calendar.getDefaultCalendar();
16201 var html5seminar = new tizen.CalendarEvent({startDate: new tizen.TZDate(2012, 3, 4),
16202 duration: new tizen.TimeDuration(3, "DAYS"),
16203 summary: "HTML5 Seminar"});
16205 calendar.add(html5seminar);
16206 var tizenseminar = html5seminar.clone();
16207 tizenseminar.summary = "Tizen Seminar";
16208 calendar.add(tizenseminar);
16211 <Type name="CalendarItem">
16214 CalendarItem The new clone of the <em>CalendarItem </em>object.
16220 <RaiseException name="WebAPIException">
16223 with error type SecurityError, if the application does not have the privilege to call this method.
16226 with error type NotSupportedError, if the feature is not supported.
16229 with error type UnknownError if any other error occurs.
16236 <Interface name="CalendarTask" id="::Calendar::CalendarTask">
16237 <webidl> [Constructor(optional <ref>CalendarTaskInit</ref>? taskInitDict),
16238 Constructor(DOMString stringRepresentation, <ref>CalendarTextFormat</ref> format)]
16239 interface CalendarTask : <ref>CalendarItem</ref> {
16240 attribute <ref>TZDate</ref>? dueDate setraises(<ref>WebAPIException</ref>);
16242 attribute <ref>TZDate</ref>? completedDate setraises(<ref>WebAPIException</ref>);
16244 attribute unsigned short progress setraises(<ref>WebAPIException</ref>);
16248 An interface that implements the <em>CalendarTask </em>object.
16254 <ExtendedAttributeList>
16255 <ExtendedAttribute name="Constructor">
16256 <webidl>Constructor(optional <ref>CalendarTaskInit</ref>? taskInitDict)</webidl>
16258 <Argument optional="optional" name="taskInitDict">
16259 <Type name="CalendarTaskInit" nullable="nullable"/>
16262 </ExtendedAttribute>
16263 <ExtendedAttribute name="Constructor">
16264 <webidl> Constructor(DOMString stringRepresentation, <ref>CalendarTextFormat</ref> format)</webidl>
16266 <Argument name="stringRepresentation">
16267 <Type type="DOMString"/>
16269 <Argument name="format">
16270 <Type name="CalendarTextFormat"/>
16273 </ExtendedAttribute>
16274 </ExtendedAttributeList>
16275 <InterfaceInheritance>
16276 <Name name="CalendarItem"/>
16277 </InterfaceInheritance>
16278 <Attribute name="dueDate" id="::Calendar::CalendarTask::dueDate">
16279 <webidl> attribute <ref>TZDate</ref>? dueDate setraises(<ref>WebAPIException</ref>);</webidl>
16282 An attribute to store the due date and time for completing a task. (See RFC 5545 - Section 3.8.2.3).
16286 This <em>dueDate</em> must be in the same time zone as the <em>startDate</em>. The <em>duration</em> and <em>dueDate</em> are mutually exclusive, so only one of them can be non-null.
16289 This attribute is precise to the second. Milliseconds are ignored.
16292 The default value is <var>null</var>. If no value is provided, the task doesn't have a due date.
16298 <Code> task.dueDate = new tizen.TZDate(2011, 2, 11);
16301 <Type name="TZDate" nullable="nullable"/>
16303 <RaiseException name="WebAPIException"/>
16306 <Attribute name="completedDate" id="::Calendar::CalendarTask::completedDate">
16307 <webidl> attribute <ref>TZDate</ref>? completedDate setraises(<ref>WebAPIException</ref>);</webidl>
16310 An attribute to record the date and time when an task is completed.
16311 (See RFC 5545 - Section 3.8.2.1).
16315 This attribute is precise to the second. Milliseconds are ignored.
16318 The default value is <var>null</var>. If no value is provided, the task is not completed yet.
16324 <Code> task.completedDate = new tizen.TZDate(2011, 2, 11);
16327 <Type name="TZDate" nullable="nullable"/>
16329 <RaiseException name="WebAPIException"/>
16332 <Attribute name="progress" id="::Calendar::CalendarTask::progress">
16333 <webidl> attribute unsigned short progress setraises(<ref>WebAPIException</ref>);</webidl>
16336 An attribute to denote the percent of completion of a task.
16340 The value is a positive integer between <var>0 </var>and <var>100</var>. A value of <var>0 </var>indicates the task has not been started yet. A value of <var>100 </var>indicates that the task has been completed.
16343 Integer values in between indicate the percent partially complete.
16344 (See RFC 5545 - Section 3.8.1.8).
16347 The default value is <var>0</var>, implies that the task has not been started.
16353 <Code> task.progress = 50; // 50% done
16356 <Type type="unsigned short"/>
16358 <RaiseException name="WebAPIException"/>
16362 <Interface name="CalendarEvent" id="::Calendar::CalendarEvent">
16363 <webidl> [Constructor(optional <ref>CalendarEventInit</ref>? eventInitDict),
16364 Constructor(DOMString stringRepresentation, <ref>CalendarTextFormat</ref> format)]
16365 interface CalendarEvent : <ref>CalendarItem</ref> {
16366 readonly attribute boolean isDetached;
16368 attribute <ref>TZDate</ref>? endDate setraises(<ref>WebAPIException</ref>);
16370 attribute <ref>EventAvailability</ref> availability setraises(<ref>WebAPIException</ref>);
16372 attribute <ref>CalendarRecurrenceRule</ref>? recurrenceRule setraises(<ref>WebAPIException</ref>);
16374 void expandRecurrence(<ref>TZDate</ref> startDate,
16375 <ref>TZDate</ref> endDate,
16376 <ref>CalendarEventArraySuccessCallback</ref> successCallback,
16377 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
16381 An interface that implements the <em>calendarEvent </em>object.
16386 <Code> // Gets the default calendar
16387 var calendar = tizen.calendar.getDefaultCalendar("EVENT");
16390 var ev = new tizen.CalendarEvent("BEGIN:VCALENDAR\r\n" +
16391 "BEGIN:VEVENT\r\n" +
16392 "DTSTAMP:19970901T1300Z\r\n" +
16393 "DTSTART:19970903T163000Z\r\n" +
16394 "DTEND:19970903T190000Z\r\n" +
16395 "SUMMARY:Annual Employee Review\r\n" +
16396 "CATEGORIES:BUSINESS,HUMAN RESOURCES\r\n" +
16397 "END:VEVENT\r\n" +
16398 "END:VCALENDAR", "ICALENDAR_20");
16401 console.log('Event added with UID ' + ev.id.uid);
16403 console.log("Failed to add VEVENT to the calendar, error: " + err.name);
16407 <ExtendedAttributeList>
16408 <ExtendedAttribute name="Constructor">
16409 <webidl>Constructor(optional <ref>CalendarEventInit</ref>? eventInitDict)</webidl>
16411 <Argument optional="optional" name="eventInitDict">
16412 <Type name="CalendarEventInit" nullable="nullable"/>
16415 </ExtendedAttribute>
16416 <ExtendedAttribute name="Constructor">
16417 <webidl> Constructor(DOMString stringRepresentation, <ref>CalendarTextFormat</ref> format)</webidl>
16419 <Argument name="stringRepresentation">
16420 <Type type="DOMString"/>
16422 <Argument name="format">
16423 <Type name="CalendarTextFormat"/>
16426 </ExtendedAttribute>
16427 </ExtendedAttributeList>
16428 <InterfaceInheritance>
16429 <Name name="CalendarItem"/>
16430 </InterfaceInheritance>
16431 <Attribute readonly="readonly" name="isDetached" id="::Calendar::CalendarEvent::isDetached">
16432 <webidl> readonly attribute boolean isDetached;</webidl>
16435 An attribute that behaves like a flag to indicates if an instance of a recurring event is detached and if it has been modified and saved to the calendar.
16441 <Type type="boolean"/>
16443 <Attribute name="endDate" id="::Calendar::CalendarEvent::endDate">
16444 <webidl> attribute <ref>TZDate</ref>? endDate setraises(<ref>WebAPIException</ref>);</webidl>
16447 An attribute to store the end date/time of an event.
16451 (see RFC 5545 - Section 3.8.2.2).
16454 This <em>endDate</em> must be in the same time zone as the <em>startDate</em>.
16455 Note that <em>duration</em> and <em>endDate</em> are mutually exclusive, only one of them can be non-null.
16458 This attribute is precise to the second. Milliseconds are ignored.
16461 The default value for this attribute is <var>null</var>.
16467 <Code> // 2010-04-30 09:00
16468 event.endDate = new tizen.TZDate(2010, 3, 30, 9, 0);
16471 <Type name="TZDate" nullable="nullable"/>
16473 <RaiseException name="WebAPIException"/>
16476 <Attribute name="availability" id="::Calendar::CalendarEvent::availability">
16477 <webidl> attribute <ref>EventAvailability</ref> availability setraises(<ref>WebAPIException</ref>);</webidl>
16480 An attribute to indicate the availability of a person for an event.
16481 (See RFC 5545 - Section 3.2.9).
16485 The default value is <var>BUSY</var>.
16492 <Type name="EventAvailability"/>
16494 <RaiseException name="WebAPIException"/>
16497 <Attribute name="recurrenceRule" id="::Calendar::CalendarEvent::recurrenceRule">
16498 <webidl> attribute <ref>CalendarRecurrenceRule</ref>? recurrenceRule setraises(<ref>WebAPIException</ref>);</webidl>
16501 An attribute to denote the recurrence rule for the event.
16505 The generated instances of a recurring event will have the same recurrence rule as their parent. This is useful when editing a particular event instance and choosing to update <b>all</b> instances from it.
16508 The detached instances (specific instances that have been modified as saved to the calendar) of a recurring event will not have any recurrence rule. No recurrence rule can be set on detached instances either. If one tries to set a recurrence rule on a detached event, a NotSupportedError should be thrown. Detached instances can be distinguished by checking their <em>isDetached</em> attribute.
16509 (See RFC 5545, Section 3.3.10.)
16515 <Code> // Repeats daily for 7 days
16516 var rule = new tizen.CalendarRecurrenceRule("DAILY", {occurrenceCount: 7});
16517 event.recurrenceRule = rule;
16520 <Type name="CalendarRecurrenceRule" nullable="nullable"/>
16522 <RaiseException name="WebAPIException"/>
16525 <Operation name="expandRecurrence" id="::Calendar::CalendarEvent::expandRecurrence">
16526 <webidl> void expandRecurrence(<ref>TZDate</ref> startDate,
16527 <ref>TZDate</ref> endDate,
16528 <ref>CalendarEventArraySuccessCallback</ref> successCallback,
16529 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
16532 Expands a recurring event and returns asynchronously the list of instances occurring in a given time interval (inclusive).
16536 This method takes into consideration all the parameters of the event recurrence rule to generate the instances occurring in a given time interval.
16539 The call involves retrieving from the database detached instances of an event to replace their corresponding virtual instances in the returned list. The client can then use <em>CalendarEvent.isDetached </em>attribute to identify detached instances. If the event is not saved to a calendar yet, only virtual instances will be returned.
16542 The errorCallback is launched with these error types:
16546 InvalidValuesError - if the event in operation is not recurring. </li>
16548 UnknownError - if any other error occurs. </li>
16558 http://tizen.org/privilege/calendar.read
16560 <Code> // eventId should be set to ID of event obtained with the find function.
16562 // Defines the error callback.
16563 function errorCallback(response) {
16564 console.log( 'The following error occurred: ' + response.name);
16567 // Defines the event expanding success callback.
16568 function eventExpandingSuccessCallback(events) {
16569 console.log(events.length + ' event instances were returned.');
16572 var calendar = tizen.calendar.getDefaultCalendar();
16573 var event = calendar.get(eventId);
16575 if (event.recurrenceRule != null) {
16576 // This is a recurring event. Expand all the instances during August 2011.
16577 event.expandRecurrence(new tizen.TZDate(2011, 7, 1),
16578 new tizen.TZDate(2011, 7, 31),
16579 eventExpandingSuccessCallback,
16584 <Type type="void"/>
16586 <Argument name="startDate">
16589 The start date/ time of an event(inclusive).
16592 <Type name="TZDate"/>
16594 <Argument name="endDate">
16597 The end date/ time of an event (inclusive).
16600 <Type name="TZDate"/>
16602 <Argument name="successCallback">
16605 The method to call when the invocation ends successfully.
16608 <Type name="CalendarEventArraySuccessCallback"/>
16610 <Argument optional="optional" name="errorCallback">
16613 The method to call when an error occurs.
16616 <Type name="ErrorCallback" nullable="nullable"/>
16620 <RaiseException name="WebAPIException">
16623 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
16626 with error type SecurityError, if the application does not have the privilege to call this method.
16629 with error type NotSupportedError, if the feature is not supported.
16636 <Dictionary name="CalendarAttendeeInit" id="::Calendar::CalendarAttendeeInit">
16637 <webidl> dictionary CalendarAttendeeInit {
16639 <ref>AttendeeRole</ref> role;
16640 <ref>AttendeeStatus</ref> status;
16642 <ref>AttendeeType</ref> type;
16644 DOMString delegatorURI;
16645 DOMString delegateURI;
16646 <ref>ContactRef</ref> contactRef;
16650 The properties of a <em>CalendarAttendee</em>, to pass to its constructor.
16654 See <em>CalendarAttendee </em>interface for more information about the members.
16661 <DictionaryMember name="name" id="::Calendar::CalendarAttendeeInit::name">
16662 <webidl> DOMString name;</webidl>
16663 <Type type="DOMString"/>
16664 </DictionaryMember>
16665 <DictionaryMember name="role" id="::Calendar::CalendarAttendeeInit::role">
16666 <webidl> <ref>AttendeeRole</ref> role;</webidl>
16667 <Type name="AttendeeRole"/>
16668 </DictionaryMember>
16669 <DictionaryMember name="status" id="::Calendar::CalendarAttendeeInit::status">
16670 <webidl> <ref>AttendeeStatus</ref> status;</webidl>
16671 <Type name="AttendeeStatus"/>
16672 </DictionaryMember>
16673 <DictionaryMember name="RSVP" id="::Calendar::CalendarAttendeeInit::RSVP">
16674 <webidl> boolean RSVP;</webidl>
16675 <Type type="boolean"/>
16676 </DictionaryMember>
16677 <DictionaryMember name="type" id="::Calendar::CalendarAttendeeInit::type">
16678 <webidl> <ref>AttendeeType</ref> type;</webidl>
16679 <Type name="AttendeeType"/>
16680 </DictionaryMember>
16681 <DictionaryMember name="group" id="::Calendar::CalendarAttendeeInit::group">
16682 <webidl> DOMString? group;</webidl>
16683 <Type type="DOMString" nullable="nullable"/>
16684 </DictionaryMember>
16685 <DictionaryMember name="delegatorURI" id="::Calendar::CalendarAttendeeInit::delegatorURI">
16686 <webidl> DOMString delegatorURI;</webidl>
16687 <Type type="DOMString"/>
16688 </DictionaryMember>
16689 <DictionaryMember name="delegateURI" id="::Calendar::CalendarAttendeeInit::delegateURI">
16690 <webidl> DOMString delegateURI;</webidl>
16691 <Type type="DOMString"/>
16692 </DictionaryMember>
16693 <DictionaryMember name="contactRef" id="::Calendar::CalendarAttendeeInit::contactRef">
16694 <webidl> <ref>ContactRef</ref> contactRef;</webidl>
16695 <Type name="ContactRef"/>
16696 </DictionaryMember>
16698 <Interface name="CalendarAttendee" id="::Calendar::CalendarAttendee">
16699 <webidl> [Constructor(DOMString uri, optional <ref>CalendarAttendeeInit</ref>? attendeeInitDict)]
16700 interface CalendarAttendee
16702 attribute DOMString uri;
16704 attribute DOMString? name;
16706 attribute <ref>AttendeeRole</ref> role;
16708 attribute <ref>AttendeeStatus</ref> status;
16710 attribute boolean RSVP;
16712 attribute <ref>AttendeeType</ref> type;
16714 attribute DOMString? group;
16716 attribute DOMString? delegatorURI;
16718 attribute DOMString? delegateURI;
16720 attribute <ref>ContactRef</ref>? contactRef;
16724 This interface implements the <em>CalendarAttendee </em>object that contains information about an event attendee.
16728 By default, each of the attributes of this interface are undefined.
16731 (For more details, see RFC 5545, Section 3.8.4.1.)
16737 <Code> var attendee = new tizen.CalendarAttendee('mailto:bob@domain.com',
16738 {role: "CHAIR", RSVP: true});
16739 event.attendees = [attendee];
16742 <ExtendedAttributeList>
16743 <ExtendedAttribute name="Constructor">
16744 <webidl>Constructor(DOMString uri, optional <ref>CalendarAttendeeInit</ref>? attendeeInitDict)</webidl>
16746 <Argument name="uri">
16747 <Type type="DOMString"/>
16749 <Argument optional="optional" name="attendeeInitDict">
16750 <Type name="CalendarAttendeeInit" nullable="nullable"/>
16753 </ExtendedAttribute>
16754 </ExtendedAttributeList>
16755 <Attribute name="uri" id="::Calendar::CalendarAttendee::uri">
16756 <webidl> attribute DOMString uri;</webidl>
16759 An attribute to store the URI for the attendee.
16763 This is often an email in the form 'mailto:name@domain.com'.
16770 <Type type="DOMString"/>
16772 <Attribute name="name" id="::Calendar::CalendarAttendee::name">
16773 <webidl> attribute DOMString? name;</webidl>
16776 An attribute to store the name of an attendee.
16782 <Type type="DOMString" nullable="nullable"/>
16784 <Attribute name="role" id="::Calendar::CalendarAttendee::role">
16785 <webidl> attribute <ref>AttendeeRole</ref> role;</webidl>
16788 An attribute to denote the role of the attendee.
16792 (See RFC 5545, Section 3.2.16.)
16795 The default value is <var>REQ_PARTICIPANT</var>.
16802 <Type name="AttendeeRole"/>
16804 <Attribute name="status" id="::Calendar::CalendarAttendee::status">
16805 <webidl> attribute <ref>AttendeeStatus</ref> status;</webidl>
16808 An attribute to store the participant's attendance status.
16809 (See RFC 5545, Section 3.2.12.)
16813 The default value is <var>PENDING</var>.
16820 <Type name="AttendeeStatus"/>
16822 <Attribute name="RSVP" id="::Calendar::CalendarAttendee::RSVP">
16823 <webidl> attribute boolean RSVP;</webidl>
16826 An attribute to store the attendee's participation status reply (RSVP).
16827 (See RFC 5545, Section 3.2.17.)
16831 By default, this attribute is set to <var>FALSE</var>.
16838 <Type type="boolean"/>
16840 <Attribute name="type" id="::Calendar::CalendarAttendee::type">
16841 <webidl> attribute <ref>AttendeeType</ref> type;</webidl>
16844 An attribute to indicate the type of a participant.
16845 (See RFC 5545, Section 3.2.3.)
16849 The default value is <var>INDIVIDUAL</var>.
16856 <Type name="AttendeeType"/>
16858 <Attribute name="group" id="::Calendar::CalendarAttendee::group">
16859 <webidl> attribute DOMString? group;</webidl>
16862 An attribute to store the participant's group or list membership.
16863 (See RFC 5545, Section 3.2.11.)
16869 <Type type="DOMString" nullable="nullable"/>
16871 <Attribute name="delegatorURI" id="::Calendar::CalendarAttendee::delegatorURI">
16872 <webidl> attribute DOMString? delegatorURI;</webidl>
16875 An attribute to store the URI of the person who has delegated their participation to this attendee.
16876 (See RFC 5545, Section 3.2.4.)
16882 <Type type="DOMString" nullable="nullable"/>
16884 <Attribute name="delegateURI" id="::Calendar::CalendarAttendee::delegateURI">
16885 <webidl> attribute DOMString? delegateURI;</webidl>
16888 An attribute to stores the URI of the attendee to whom the person has delegated his participation.
16889 (See RFC 5545, Section 3.2.5.)
16895 <Type type="DOMString" nullable="nullable"/>
16897 <Attribute name="contactRef" id="::Calendar::CalendarAttendee::contactRef">
16898 <webidl> attribute <ref>ContactRef</ref>? contactRef;</webidl>
16901 An attribute to store the participant's reference in the Contact API.
16905 If the contact is not resolved, this attribute will be set to<var> null</var>.
16906 For more information, see the <a href="../../org.tizen.web.device.apireference/tizen/contact.html">Contact API</a>.
16913 <Type name="ContactRef" nullable="nullable"/>
16916 <Dictionary name="CalendarRecurrenceRuleInit" id="::Calendar::CalendarRecurrenceRuleInit">
16917 <webidl> dictionary CalendarRecurrenceRuleInit {
16919 <ref>TZDate</ref> untilDate;
16920 long occurrenceCount;
16921 <ref>ByDayValue</ref>[] daysOfTheWeek;
16922 short[] setPositions;
16923 <ref>TZDate</ref>[] exceptions;
16927 The properties of a <em>CalendarRecurrenceRule</em> to pass to its constructor.
16931 For more information about the members, see <em>CalendarRecurrenceRule </em>interface.
16938 <DictionaryMember name="interval" id="::Calendar::CalendarRecurrenceRuleInit::interval">
16939 <webidl> short interval;</webidl>
16940 <Type type="short"/>
16941 </DictionaryMember>
16942 <DictionaryMember name="untilDate" id="::Calendar::CalendarRecurrenceRuleInit::untilDate">
16943 <webidl> <ref>TZDate</ref> untilDate;</webidl>
16944 <Type name="TZDate"/>
16945 </DictionaryMember>
16946 <DictionaryMember name="occurrenceCount" id="::Calendar::CalendarRecurrenceRuleInit::occurrenceCount">
16947 <webidl> long occurrenceCount;</webidl>
16948 <Type type="long"/>
16949 </DictionaryMember>
16950 <DictionaryMember name="daysOfTheWeek" id="::Calendar::CalendarRecurrenceRuleInit::daysOfTheWeek">
16951 <webidl> <ref>ByDayValue</ref>[] daysOfTheWeek;</webidl>
16952 <Type type="array">
16953 <Type name="ByDayValue"/>
16955 </DictionaryMember>
16956 <DictionaryMember name="setPositions" id="::Calendar::CalendarRecurrenceRuleInit::setPositions">
16957 <webidl> short[] setPositions;</webidl>
16958 <Type type="array">
16959 <Type type="short"/>
16961 </DictionaryMember>
16962 <DictionaryMember name="exceptions" id="::Calendar::CalendarRecurrenceRuleInit::exceptions">
16963 <webidl> <ref>TZDate</ref>[] exceptions;</webidl>
16964 <Type type="array">
16965 <Type name="TZDate"/>
16967 </DictionaryMember>
16969 <Interface name="CalendarRecurrenceRule" id="::Calendar::CalendarRecurrenceRule">
16970 <webidl> [Constructor(<ref>RecurrenceRuleFrequency</ref> frequency, optional <ref>CalendarRecurrenceRuleInit</ref>? ruleInitDict)]
16971 interface CalendarRecurrenceRule
16973 attribute <ref>RecurrenceRuleFrequency</ref> frequency;
16975 attribute unsigned short interval;
16977 attribute <ref>TZDate</ref>? untilDate;
16979 attribute long occurrenceCount;
16981 attribute <ref>ByDayValue</ref>[] daysOfTheWeek;
16983 attribute short[] setPositions;
16985 attribute <ref>TZDate</ref>[] exceptions;
16989 This interface implements the<em> CalendarRecurrenceRule </em>object, which contains information about the recurrence of an event.
16990 (See RFC 5545, Section 3.3.10.)
16995 <Code> // Repeats daily for 7 days
16996 var rule = new tizen.CalendarRecurrenceRule("DAILY", {occurrenceCount:7});
16997 event.recurrenceRule = rule;
17000 <ExtendedAttributeList>
17001 <ExtendedAttribute name="Constructor">
17002 <webidl>Constructor(<ref>RecurrenceRuleFrequency</ref> frequency, optional <ref>CalendarRecurrenceRuleInit</ref>? ruleInitDict)</webidl>
17004 <Argument name="frequency">
17005 <Type name="RecurrenceRuleFrequency"/>
17007 <Argument optional="optional" name="ruleInitDict">
17008 <Type name="CalendarRecurrenceRuleInit" nullable="nullable"/>
17011 </ExtendedAttribute>
17012 </ExtendedAttributeList>
17013 <Attribute name="frequency" id="::Calendar::CalendarRecurrenceRule::frequency">
17014 <webidl> attribute <ref>RecurrenceRuleFrequency</ref> frequency;</webidl>
17017 An attribute to store the frequency of a recurrence rule.
17021 This property corresponds to <em>FREQ</em> in RFC 5545.
17028 <Type name="RecurrenceRuleFrequency"/>
17030 <Attribute name="interval" id="::Calendar::CalendarRecurrenceRule::interval">
17031 <webidl> attribute unsigned short interval;</webidl>
17034 An attribute to specify how often the recurrence rule repeats over the unit of time indicated by its frequency.
17038 This attribute is linked to the <em>frequency </em>attribute and for an interval of <var>n</var>, the event will recur every <var>n </var>of recurrence attribute.
17041 For example, if the interval attribute is set to <var>2 </var>and <em>frequency </em>attribute is set to <var>WEEKLY</var>, then the event will recur every 2 weeks.
17044 The default interval value is <var>1</var>, that is, every day if the <em>CalendarRecurrenceRule frequency</em> attribute is DAILY, every week if frequency is <var>WEEKLY</var>, every month if frequency is <var>MONTHLY </var>or every year if frequency is <var>YEARLY</var>.
17047 This property corresponds to <em>INTERVAL</em> in RFC 5545.
17054 <Type type="unsigned short"/>
17056 <Attribute name="untilDate" id="::Calendar::CalendarRecurrenceRule::untilDate">
17057 <webidl> attribute <ref>TZDate</ref>? untilDate;</webidl>
17060 An attribute to indicate the end date of a recurrence duration of an event using either an end date (<em>untilDate </em>attribute) or a number of occurrences (<em>occurrenceCount </em>attribute).
17064 By default, this attribute is set to <var>null</var>, meaning that the event recurs infinitely, unless <em>occurrenceCount </em>is set.
17067 This attribute is precise to the second. Milliseconds are ignored.
17070 This property corresponds to <em>UNTIL</em> in RFC 5545.
17077 <Type name="TZDate" nullable="nullable"/>
17079 <Attribute name="occurrenceCount" id="::Calendar::CalendarRecurrenceRule::occurrenceCount">
17080 <webidl> attribute long occurrenceCount;</webidl>
17083 An attribute to indicate the number of occurrences of a recurring event.
17087 The recurrence duration of an event can be defined using either an end date (<em>untilDate </em>attribute) or a number of occurrences (<em>occurrenceCount </em>attribute).
17090 By default, this attribute is set to <var>-1</var>, meaning that the event recurs infinitely, unless <em>untilDate </em>is set.
17093 This property corresponds to <em>COUNT</em> in RFC 5545.
17100 <Type type="long"/>
17102 <Attribute name="daysOfTheWeek" id="::Calendar::CalendarRecurrenceRule::daysOfTheWeek">
17103 <webidl> attribute <ref>ByDayValue</ref>[] daysOfTheWeek;</webidl>
17106 An attribute to store the days of the week associated with the recurrence rule.
17110 This property value is valid only for recurrence rules with a frequency type of <em>WEEKLY</em>, <em>MONTHLY</em>, and <em>YEARLY</em>.
17113 This property corresponds to <em>BYDAY</em> in RFC 5545.
17116 By default, this attribute is set to an empty array.
17123 <Type type="array">
17124 <Type name="ByDayValue"/>
17127 <Attribute name="setPositions" id="::Calendar::CalendarRecurrenceRule::setPositions">
17128 <webidl> attribute short[] setPositions;</webidl>
17131 An attribute to store a list of ordinal numbers that filters which recurrences to include in the recurrence rule's frequency.
17135 For example, a yearly recurrence rule that has a <em>daysOfTheWeek </em>value that specifies Monday through Friday, and a <em>setPositions </em>array containing <var>2 </var>and <var>-1</var>, occurs only on the second weekday and last weekday of every year.
17138 Values can be from 1 to 366 or -366 to -1.
17139 Negative values indicate counting backwards from the end of the recurrence rule's frequency (week, month, or year).
17142 This attribute must only be used in conjunction with another BYxxx rule part (such as <em>daysOfTheWeek</em>).
17145 This property corresponds to <em>BYSETPOS</em> in RFC 5545.
17148 By default, this attribute is set to an empty array.
17155 <Type type="array">
17156 <Type type="short"/>
17159 <Attribute name="exceptions" id="::Calendar::CalendarRecurrenceRule::exceptions">
17160 <webidl> attribute <ref>TZDate</ref>[] exceptions;</webidl>
17163 An attribute to list date/time exceptions for the recurring event.
17164 (See RFC 5545, Section 3.8.5.1.)
17168 This attribute is precise to the second. Milliseconds are ignored.
17171 This property corresponds to <em>EXDATE</em> in RFC 5545.
17174 By default, this attribute is set to an empty array.
17181 <Type type="array">
17182 <Type name="TZDate"/>
17186 <Interface name="CalendarEventId" id="::Calendar::CalendarEventId">
17187 <webidl> [Constructor(DOMString uid, optional DOMString? rid)]
17188 interface CalendarEventId {
17189 attribute DOMString uid;
17191 attribute DOMString? rid;
17195 This interface contains a UID and an optional recurrence ID attribute to identify calendar events.
17199 The recurrence identifier (<em>rid</em> attribute) is used to identify a particular instance of a recurring event. All instances of the same recurring event have the same UID but different recurrence IDs.
17206 <ExtendedAttributeList>
17207 <ExtendedAttribute name="Constructor">
17208 <webidl>Constructor(DOMString uid, optional DOMString? rid)</webidl>
17210 <Argument name="uid">
17211 <Type type="DOMString"/>
17213 <Argument optional="optional" name="rid">
17214 <Type type="DOMString" nullable="nullable"/>
17217 </ExtendedAttribute>
17218 </ExtendedAttributeList>
17219 <Attribute name="uid" id="::Calendar::CalendarEventId::uid">
17220 <webidl> attribute DOMString uid;</webidl>
17223 An attribute to persistently, and uniquely identify a calendar event.
17227 This value is assigned by the platform when the event is added to the calendar, it is locally unique and persistent for the life time of the event and it cannot be modified by the developers.
17230 See RFC 5545 (section 3.8.4.7) for more details about this parameter and algorithms to guarantee assignment of unique values.
17231 This value is assigned by the platform when the <em>add()</em> method is successfully invoked.
17238 <Type type="DOMString"/>
17240 <Attribute name="rid" id="::Calendar::CalendarEventId::rid">
17241 <webidl> attribute DOMString? rid;</webidl>
17244 An attribute to store the recurrence ID of a <em>CalendarEvent </em>instance.
17248 This attribute is used in conjunction with the <em>uid</em> property to identify a specific instance of a recurring event.
17251 The parent of a recurrence instance has its <em>rid</em> set to <var>null</var>.
17254 By default, this attribute is set to <var>null</var>.
17255 (See RFC 5545 (section 3.8.4.4) for more details about this parameter.)
17262 <Type type="DOMString" nullable="nullable"/>
17265 <Interface name="CalendarAlarm" id="::Calendar::CalendarAlarm">
17266 <webidl> [Constructor(<ref>TZDate</ref> absoluteDate, <ref>AlarmMethod</ref> method, optional DOMString? description),
17267 Constructor(<ref>TimeDuration</ref> before, <ref>AlarmMethod</ref> method, optional DOMString? description)]
17268 interface CalendarAlarm {
17269 attribute <ref>TZDate</ref>? absoluteDate setraises(<ref>WebAPIException</ref>);
17271 attribute <ref>TimeDuration</ref>? before setraises(<ref>WebAPIException</ref>);
17273 attribute <ref>AlarmMethod</ref> method setraises(<ref>WebAPIException</ref>);
17275 attribute DOMString? description;
17279 An interface that contains information related to an event alarm or reminder.
17284 <Code> // Creates a sound alarm 30 minutes before the event's start time
17285 var alarm = new tizen.CalendarAlarm(new tizen.TimeDuration(30, "MINS"), "SOUND");
17288 <ExtendedAttributeList>
17289 <ExtendedAttribute name="Constructor">
17290 <webidl>Constructor(<ref>TZDate</ref> absoluteDate, <ref>AlarmMethod</ref> method, optional DOMString? description)</webidl>
17292 <Argument name="absoluteDate">
17293 <Type name="TZDate"/>
17295 <Argument name="method">
17296 <Type name="AlarmMethod"/>
17298 <Argument optional="optional" name="description">
17299 <Type type="DOMString" nullable="nullable"/>
17302 </ExtendedAttribute>
17303 <ExtendedAttribute name="Constructor">
17304 <webidl> Constructor(<ref>TimeDuration</ref> before, <ref>AlarmMethod</ref> method, optional DOMString? description)</webidl>
17306 <Argument name="before">
17307 <Type name="TimeDuration"/>
17309 <Argument name="method">
17310 <Type name="AlarmMethod"/>
17312 <Argument optional="optional" name="description">
17313 <Type type="DOMString" nullable="nullable"/>
17316 </ExtendedAttribute>
17317 </ExtendedAttributeList>
17318 <Attribute name="absoluteDate" id="::Calendar::CalendarAlarm::absoluteDate">
17319 <webidl> attribute <ref>TZDate</ref>? absoluteDate setraises(<ref>WebAPIException</ref>);</webidl>
17322 An attribute to record the absolute date and time when an alarm should be triggered.
17326 <em>absoluteDate </em>and <em>before </em>are mutually exclusive.
17329 This attribute is precise to the second. Milliseconds are ignored.
17336 <Type name="TZDate" nullable="nullable"/>
17338 <RaiseException name="WebAPIException"/>
17341 <Attribute name="before" id="::Calendar::CalendarAlarm::before">
17342 <webidl> attribute <ref>TimeDuration</ref>? before setraises(<ref>WebAPIException</ref>);</webidl>
17345 An attribute to store the duration before an event starts on which the alarm should be triggered.
17349 The duration should be positive.
17352 <em>absoluteDate </em>and <em>before </em>are mutually exclusive.
17355 This attribute is precise to the second. Milliseconds are ignored.
17362 <Type name="TimeDuration" nullable="nullable"/>
17364 <RaiseException name="WebAPIException"/>
17367 <Attribute name="method" id="::Calendar::CalendarAlarm::method">
17368 <webidl> attribute <ref>AlarmMethod</ref> method setraises(<ref>WebAPIException</ref>);</webidl>
17371 An attribute to denote the notification method used by an alarm.
17377 <Type name="AlarmMethod"/>
17379 <RaiseException name="WebAPIException"/>
17382 <Attribute name="description" id="::Calendar::CalendarAlarm::description">
17383 <webidl> attribute DOMString? description;</webidl>
17386 An attribute to store the description of an alarm.
17390 When the method is <var>DISPLAY</var>, the alarm must also include a description attribute, which contains the text to be displayed when the alarm is triggered.
17393 The default value is an empty string.
17400 <Type type="DOMString" nullable="nullable"/>
17403 <Interface name="CalendarEventArraySuccessCallback" id="::Calendar::CalendarEventArraySuccessCallback">
17404 <webidl> [Callback=FunctionOnly, NoInterfaceObject]
17405 interface CalendarEventArraySuccessCallback {
17406 void onsuccess(<ref>CalendarEvent</ref>[] events);
17410 An interface that implements the success callback used in the asynchronous operation for retrieving a list of calendar events.
17416 <ExtendedAttributeList>
17417 <ExtendedAttribute name="Callback" value="FunctionOnly">
17418 <webidl>Callback</webidl>
17419 </ExtendedAttribute>
17420 <ExtendedAttribute name="NoInterfaceObject">
17421 <webidl> NoInterfaceObject</webidl>
17422 </ExtendedAttribute>
17423 </ExtendedAttributeList>
17424 <Operation name="onsuccess" id="::Calendar::CalendarEventArraySuccessCallback::onsuccess">
17425 <webidl> void onsuccess(<ref>CalendarEvent</ref>[] events);</webidl>
17428 Called when the list of calendar events is retrieved successfully.
17434 <Type type="void"/>
17436 <Argument name="events">
17439 The array of <em>CalendarEvent </em>objects.
17442 <Type type="array">
17443 <Type name="CalendarEvent"/>
17449 <Interface name="CalendarItemArraySuccessCallback" id="::Calendar::CalendarItemArraySuccessCallback">
17450 <webidl> [Callback=FunctionOnly, NoInterfaceObject]
17451 interface CalendarItemArraySuccessCallback {
17452 void onsuccess(<ref>CalendarItem</ref>[] items);
17456 This interface implements the success callback used in the asynchronous operation for retrieving a list of calendar items.
17462 <ExtendedAttributeList>
17463 <ExtendedAttribute name="Callback" value="FunctionOnly">
17464 <webidl>Callback</webidl>
17465 </ExtendedAttribute>
17466 <ExtendedAttribute name="NoInterfaceObject">
17467 <webidl> NoInterfaceObject</webidl>
17468 </ExtendedAttribute>
17469 </ExtendedAttributeList>
17470 <Operation name="onsuccess" id="::Calendar::CalendarItemArraySuccessCallback::onsuccess">
17471 <webidl> void onsuccess(<ref>CalendarItem</ref>[] items);</webidl>
17474 Called when the list of calendar items is retrieved successfully.
17480 <Type type="void"/>
17482 <Argument name="items">
17485 The array of <em>CalendarItem </em>objects.
17488 <Type type="array">
17489 <Type name="CalendarItem"/>
17495 <Interface name="CalendarArraySuccessCallback" id="::Calendar::CalendarArraySuccessCallback">
17496 <webidl> [Callback=FunctionOnly, NoInterfaceObject]
17497 interface CalendarArraySuccessCallback {
17498 void onsuccess(<ref>Calendar</ref>[] calendars);
17502 This interface implements the success callback used in the asynchronous operation to get a list of calendars using the <em>getCalendars()</em> method.
17508 <ExtendedAttributeList>
17509 <ExtendedAttribute name="Callback" value="FunctionOnly">
17510 <webidl>Callback</webidl>
17511 </ExtendedAttribute>
17512 <ExtendedAttribute name="NoInterfaceObject">
17513 <webidl> NoInterfaceObject</webidl>
17514 </ExtendedAttribute>
17515 </ExtendedAttributeList>
17516 <Operation name="onsuccess" id="::Calendar::CalendarArraySuccessCallback::onsuccess">
17517 <webidl> void onsuccess(<ref>Calendar</ref>[] calendars);</webidl>
17520 Called when the array of <em>Calendar </em>objects is retrieved successfully.
17526 <Type type="void"/>
17528 <Argument name="calendars">
17531 The array of <em>Calendar </em>objects.
17534 <Type type="array">
17535 <Type name="Calendar"/>
17541 <Interface name="CalendarChangeCallback" id="::Calendar::CalendarChangeCallback">
17542 <webidl> [Callback, NoInterfaceObject] interface CalendarChangeCallback {
17543 void onitemsadded(<ref>CalendarItem</ref>[] items);
17545 void onitemsupdated(<ref>CalendarItem</ref>[] items);
17547 void onitemsremoved(<ref>CalendarItemId</ref>[] ids);
17551 This interface specifies a set of methods that will be invoked every time a calendar change occurs (calendar item addition/update/removal).
17557 <ExtendedAttributeList>
17558 <ExtendedAttribute name="Callback">
17559 <webidl>Callback</webidl>
17560 </ExtendedAttribute>
17561 <ExtendedAttribute name="NoInterfaceObject">
17562 <webidl> NoInterfaceObject</webidl>
17563 </ExtendedAttribute>
17564 </ExtendedAttributeList>
17565 <Operation name="onitemsadded" id="::Calendar::CalendarChangeCallback::onitemsadded">
17566 <webidl> void onitemsadded(<ref>CalendarItem</ref>[] items);</webidl>
17569 Called when items are added to the calendar.
17575 <Type type="void"/>
17577 <Argument name="items">
17580 The list of items that were added.
17583 <Type type="array">
17584 <Type name="CalendarItem"/>
17589 <Operation name="onitemsupdated" id="::Calendar::CalendarChangeCallback::onitemsupdated">
17590 <webidl> void onitemsupdated(<ref>CalendarItem</ref>[] items);</webidl>
17593 Called when items are updated in the calendar.
17599 <Type type="void"/>
17601 <Argument name="items">
17604 The list of items that were updated.
17607 <Type type="array">
17608 <Type name="CalendarItem"/>
17613 <Operation name="onitemsremoved" id="::Calendar::CalendarChangeCallback::onitemsremoved">
17614 <webidl> void onitemsremoved(<ref>CalendarItemId</ref>[] ids);</webidl>
17617 Called when item are removed from the calendar.
17623 <Type type="void"/>
17625 <Argument name="ids">
17628 The list of identifiers for the items that were removed.
17631 <Type type="array">
17632 <Type name="CalendarItemId"/>
17639 <Module name="Callhistory" id="::Callhistory">
17640 <webidl>module Callhistory {
17641 [NoInterfaceObject] interface CallHistoryObject {
17642 readonly attribute <ref>CallHistory</ref> callhistory;
17645 <ref>Tizen</ref> implements <ref>CallHistoryObject</ref>;
17647 [NoInterfaceObject] interface RemoteParty {
17648 readonly attribute DOMString? remoteParty;
17650 readonly attribute <ref>PersonId</ref>? personId;
17654 [NoInterfaceObject] interface CallHistoryEntry {
17656 readonly attribute DOMString uid;
17658 readonly attribute DOMString type;
17660 readonly attribute DOMString[]? features;
17662 readonly attribute <ref>RemoteParty</ref>[] remoteParties;
17664 readonly attribute Date startTime;
17666 readonly attribute unsigned long duration;
17668 attribute DOMString direction;
17671 [NoInterfaceObject] interface CallHistory {
17673 void find(<ref>CallHistoryEntryArraySuccessCallback</ref> successCallback,
17674 optional <ref>ErrorCallback</ref>? errorCallback,
17675 optional <ref>AbstractFilter</ref>? filter,
17676 optional <ref>SortMode</ref>? sortMode,
17677 optional unsigned long? limit,
17678 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);
17680 void remove(<ref>CallHistoryEntry</ref> entry) raises(<ref>WebAPIException</ref>);
17682 void removeBatch(<ref>CallHistoryEntry</ref>[] entries,
17683 optional <ref>SuccessCallback</ref>? successCallback,
17684 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
17686 void removeAll(optional <ref>SuccessCallback</ref>? successCallback,
17687 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
17689 long addChangeListener(<ref>CallHistoryChangeCallback</ref> observer) raises(<ref>WebAPIException</ref>);
17691 void removeChangeListener(long handle) raises(<ref>WebAPIException</ref>);
17694 [Callback=FunctionOnly, NoInterfaceObject] interface CallHistoryEntryArraySuccessCallback {
17695 void onsuccess(<ref>CallHistoryEntry</ref>[] entries);
17698 [Callback, NoInterfaceObject]
17699 interface CallHistoryChangeCallback {
17700 void onadded(<ref>CallHistoryEntry</ref>[] newItems);
17702 void onchanged(<ref>CallHistoryEntry</ref>[] changedItems);
17704 void onremoved(DOMString[] removedItems);
17709 This API provides interfaces and methods for retrieving information from the call history.
17713 For more information on the Callhistory features, see <a href="../../org.tizen.web.appprogramming/html/guide/social_guide/call.htm">Call History Guide</a>.
17719 <def-api-feature identifier="http://tizen.org/feature/network.telephony">
17723 To guarantee this application running on a device with Telephony feature, define below in the config file:
17729 <Interface name="CallHistoryObject" id="::Callhistory::CallHistoryObject">
17730 <webidl> [NoInterfaceObject] interface CallHistoryObject {
17731 readonly attribute <ref>CallHistory</ref> callhistory;
17735 This interface defines what is instantiated by the <em>Tizen </em>object from the Tizen Platform.
17736 The <em>tizen.callhistory<em> object allows access to the CallHistory API.
17737 </em></em> </brief>
17742 <ExtendedAttributeList>
17743 <ExtendedAttribute name="NoInterfaceObject">
17744 <webidl>NoInterfaceObject</webidl>
17745 </ExtendedAttribute>
17746 </ExtendedAttributeList>
17747 <Attribute readonly="readonly" name="callhistory" id="::Callhistory::CallHistoryObject::callhistory">
17748 <webidl> readonly attribute <ref>CallHistory</ref> callhistory;</webidl>
17749 <Type name="CallHistory"/>
17752 <Implements name1="Tizen" name2="CallHistoryObject">
17753 <webidl> <ref>Tizen</ref> implements <ref>CallHistoryObject</ref>;</webidl>
17756 The CallHistory interface is available from the <em>Tizen </em>object through the <em>Window </em>object.
17763 <Interface name="RemoteParty" id="::Callhistory::RemoteParty">
17764 <webidl> [NoInterfaceObject] interface RemoteParty {
17765 readonly attribute DOMString? remoteParty;
17767 readonly attribute <ref>PersonId</ref>? personId;
17772 This interface represents remote parties.
17778 <ExtendedAttributeList>
17779 <ExtendedAttribute name="NoInterfaceObject">
17780 <webidl>NoInterfaceObject</webidl>
17781 </ExtendedAttribute>
17782 </ExtendedAttributeList>
17783 <Attribute readonly="readonly" name="remoteParty" id="::Callhistory::RemoteParty::remoteParty">
17784 <webidl> readonly attribute DOMString? remoteParty;</webidl>
17787 An attribute to store the remote party identifier (RPID).
17788 The RPID is a unique identifier used by a service with call capability. It also includes phone numbers.
17789 Contacts are also defined per service, so an RPID can be resolved to a Contact.
17790 A <var>null </var>value means that the remote is hidden (private number).
17796 <Type type="DOMString" nullable="nullable"/>
17798 <Attribute readonly="readonly" name="personId" id="::Callhistory::RemoteParty::personId">
17799 <webidl> readonly attribute <ref>PersonId</ref>? personId;</webidl>
17802 An attribute to store the identifier of the person that the raw contact belongs to.
17806 If the contact cannot be resolved, the value is <var>null</var>.
17807 See <a href="../../org.tizen.web.device.apireference/tizen/contact.html">Contact API</a> for more information.
17814 <Type name="PersonId" nullable="nullable"/>
17817 <Interface name="CallHistoryEntry" id="::Callhistory::CallHistoryEntry">
17818 <webidl> [NoInterfaceObject] interface CallHistoryEntry {
17820 readonly attribute DOMString uid;
17822 readonly attribute DOMString type;
17824 readonly attribute DOMString[]? features;
17826 readonly attribute <ref>RemoteParty</ref>[] remoteParties;
17828 readonly attribute Date startTime;
17830 readonly attribute unsigned long duration;
17832 attribute DOMString direction;
17836 This interface represents the subset of properties of calls, which become a call record in the call history after the call ends.
17842 <ExtendedAttributeList>
17843 <ExtendedAttribute name="NoInterfaceObject">
17844 <webidl>NoInterfaceObject</webidl>
17845 </ExtendedAttribute>
17846 </ExtendedAttributeList>
17847 <Attribute readonly="readonly" name="uid" id="::Callhistory::CallHistoryEntry::uid">
17848 <webidl> readonly attribute DOMString uid;</webidl>
17851 An attribute to store the unique identifier of a call record.
17857 <Type type="DOMString"/>
17859 <Attribute readonly="readonly" name="type" id="::Callhistory::CallHistoryEntry::type">
17860 <webidl> readonly attribute DOMString type;</webidl>
17863 An attribute to store the service type of the call saved to call history.
17867 The following values are the supported:
17871 TEL - for all protocols with phone number addressing (PSTN, GSM, CDMA, LTE, etc.) </li>
17873 XMPP - for generic XMPP calls </li>
17875 SIP - for generic SIP calls </li>
17882 <Type type="DOMString"/>
17884 <Attribute readonly="readonly" name="features" id="::Callhistory::CallHistoryEntry::features">
17885 <webidl> readonly attribute DOMString[]? features;</webidl>
17888 An attributes to store the features associated with the call service saved to call history.
17889 The following values are the supported:
17894 CALL - for all call types </li>
17896 VOICECALL - for voice-only calls </li>
17898 VIDEOCALL - for audio and video channel support in the call </li>
17900 EMERGENCYCALL - to denote an emergency call </li>
17907 <Type type="array" nullable="nullable">
17908 <Type type="DOMString"/>
17911 <Attribute readonly="readonly" name="remoteParties" id="::Callhistory::CallHistoryEntry::remoteParties">
17912 <webidl> readonly attribute <ref>RemoteParty</ref>[] remoteParties;</webidl>
17915 An attributes to store the remote parties participating in the call.
17921 <Type type="array">
17922 <Type name="RemoteParty"/>
17925 <Attribute readonly="readonly" name="startTime" id="::Callhistory::CallHistoryEntry::startTime">
17926 <webidl> readonly attribute Date startTime;</webidl>
17929 An attribute to store the start time of the call.
17930 This attribute is the moment when media channels come up. The exact meaning is defined by the back-end.
17936 <Type type="Date"/>
17938 <Attribute readonly="readonly" name="duration" id="::Callhistory::CallHistoryEntry::duration">
17939 <webidl> readonly attribute unsigned long duration;</webidl>
17942 An attribute to store the duration of the call in seconds.
17943 This attribute is the duration from media channels coming up to the moment when media channels tear down on the same call service.
17944 If the call is migrated to another service, another call history entry is used.
17945 The exact meaning is defined by the back-end.
17951 <Type type="unsigned long"/>
17953 <Attribute name="direction" id="::Callhistory::CallHistoryEntry::direction">
17954 <webidl> attribute DOMString direction;</webidl>
17957 An attribute to indicate whether the call was dialed, received, missed, blocked or rejected.
17958 The following values are the supported:
17963 DIALED - for dialed calls </li>
17965 RECEIVED - for received calls </li>
17967 MISSEDNEW - for missed calls not seen yet </li>
17969 MISSED - for missed calls </li>
17971 BLOCKED - for blocked calls </li>
17973 REJECTED - for rejected calls </li>
17980 <Type type="DOMString"/>
17983 <Interface name="CallHistory" id="::Callhistory::CallHistory">
17984 <webidl> [NoInterfaceObject] interface CallHistory {
17986 void find(<ref>CallHistoryEntryArraySuccessCallback</ref> successCallback,
17987 optional <ref>ErrorCallback</ref>? errorCallback,
17988 optional <ref>AbstractFilter</ref>? filter,
17989 optional <ref>SortMode</ref>? sortMode,
17990 optional unsigned long? limit,
17991 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);
17993 void remove(<ref>CallHistoryEntry</ref> entry) raises(<ref>WebAPIException</ref>);
17995 void removeBatch(<ref>CallHistoryEntry</ref>[] entries,
17996 optional <ref>SuccessCallback</ref>? successCallback,
17997 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
17999 void removeAll(optional <ref>SuccessCallback</ref>? successCallback,
18000 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18002 long addChangeListener(<ref>CallHistoryChangeCallback</ref> observer) raises(<ref>WebAPIException</ref>);
18004 void removeChangeListener(long handle) raises(<ref>WebAPIException</ref>);
18008 This interface manages call history.
18009 Apps can read or delete call history (depending on permission).
18010 Modifying call history is allowed for certain attributes, like direction.
18011 Adding call history is owned by the back-end. Filtering is supported for all fields of <em>CallHistoryEntry</em>.
18017 <ExtendedAttributeList>
18018 <ExtendedAttribute name="NoInterfaceObject">
18019 <webidl>NoInterfaceObject</webidl>
18020 </ExtendedAttribute>
18021 </ExtendedAttributeList>
18022 <Operation name="find" id="::Callhistory::CallHistory::find">
18023 <webidl> void find(<ref>CallHistoryEntryArraySuccessCallback</ref> successCallback,
18024 optional <ref>ErrorCallback</ref>? errorCallback,
18025 optional <ref>AbstractFilter</ref>? filter,
18026 optional <ref>SortMode</ref>? sortMode,
18027 optional unsigned long? limit,
18028 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);</webidl>
18031 Finds and returns call history.
18035 The <em>errorCallback()</em> is launched with these error types:
18039 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
18041 UnknownError - If any other error occurs. </li>
18051 http://tizen.org/privilege/callhistory.read
18053 <Code> // Defines success callback
18054 function onSuccess(results) {
18055 console.log(results.length + " call history item(s) found!");
18056 for (var i=0; i<results.length; i++) {
18057 console.log(i + ". " + results[i].toString()); // process the CallHistoryEntry
18061 // Defines error callback
18062 function onError(error) {
18063 console.log("Query failed" + error.name);
18066 // Defines filter: list CS calls, most recent first
18067 var filter = new tizen.AttributeFilter("type", "EXACTLY", "TEL");
18069 // Defines sort mode: descending on call start time.
18070 var sortMode = new tizen.SortMode("startTime", "DESC");
18072 // Makes the query and wire up the callbacks
18073 tizen.callhistory.find(onSuccess,
18078 var numberfilter = new tizen.AttributeFilter(
18079 "remoteParties.remoteParty",
18080 "EXACTLY",
18081 "123456789");
18083 // Creates a composite filter for time constraints
18084 var y2009Filter = new tizen.AttributeRangeFilter(
18085 "startTime",
18086 new Date(2009, 0, 1),
18087 new Date(2010, 0, 1));
18089 var y2011Filter = new tizen.AttributeRangeFilter(
18090 "startTime",
18091 new Date(2011, 0, 1),
18092 new Date(2012, 0, 1));
18094 var datefilter = new tizen.CompositeFilter("UNION", [y2009Filter, y2011Filter]);
18096 // Creates a filter to find all video calls (including cellular, skype, etc)
18097 // The filter matches exactly any features from the "features" array
18098 var tfilter = new tizen.AttributeFilter("features", "EXACTLY", "VIDEOCALL");
18100 // Creates composite filter
18101 var ifilter = new tizen.CompositeFilter("INTERSECTION",
18102 [numberFilter, dateFilter, tfilter]);
18104 // Makes the query and wire up the callbacks; reuse sortMode
18105 tizen.callhistory.find(onSuccess,
18112 <Type type="void"/>
18114 <Argument name="successCallback">
18117 A handler for query result set.
18120 <Type name="CallHistoryEntryArraySuccessCallback"/>
18122 <Argument optional="optional" name="errorCallback">
18125 The method to call when an error occurs.
18128 <Type name="ErrorCallback" nullable="nullable"/>
18130 <Argument optional="optional" name="filter">
18133 A filter defined on <em>CallHistoryEntry </em>attributes. It can be a composite filter.
18136 <Type name="AbstractFilter" nullable="nullable"/>
18138 <Argument optional="optional" name="sortMode">
18141 The sort order in which call history are return.
18144 <Type name="SortMode" nullable="nullable"/>
18146 <Argument optional="optional" name="limit">
18149 The maximum limit of query result (It is the same meaning as SQL LIMIT).
18150 If limit is 0, query result is no limit.
18153 <Type type="unsigned long" nullable="nullable"/>
18155 <Argument optional="optional" name="offset">
18158 The offset in the result set, from where the results are listed (It is the same semantics as SQL OFFSET).<br/>The number of results listed is maximum the specified <em>limit</em> parameter. Defaults to<var> 0</var>, meaning no offset.
18161 <Type type="unsigned long" nullable="nullable"/>
18165 <RaiseException name="WebAPIException">
18168 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
18171 with error type SecurityError, if this functionality is not allowed.
18174 with error type NotSupportedError, if the feature is not supported.
18180 <Operation name="remove" id="::Callhistory::CallHistory::remove">
18181 <webidl> void remove(<ref>CallHistoryEntry</ref> entry) raises(<ref>WebAPIException</ref>);</webidl>
18184 Removes a call history synchronously.
18193 http://tizen.org/privilege/callhistory.write
18195 <Code> // Defines success callback
18196 function onSuccess(results) {
18197 if (results.length > 0)
18198 tizen.callhistory.remove(results[0]);
18201 // Defines error callback
18202 function onError(error) {
18203 console.log("Query failed" + error.name);
18206 // Makes the query and wires up the callbacks
18207 tizen.callhistory.find(onSuccess, onError);
18211 <Type type="void"/>
18213 <Argument name="entry">
18216 Call history entry to be deleted.
18219 <Type name="CallHistoryEntry"/>
18223 <RaiseException name="WebAPIException">
18226 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
18229 with error type InvalidValuesError, if any input parameter contains invalid values.
18232 with error type SecurityError, if the application does not have the privilege to call this method.
18235 with error type NotSupportedError, if the feature is not supported.
18238 with error type UnknownError, if any other error occurs.
18244 <Operation name="removeBatch" id="::Callhistory::CallHistory::removeBatch">
18245 <webidl> void removeBatch(<ref>CallHistoryEntry</ref>[] entries,
18246 optional <ref>SuccessCallback</ref>? successCallback,
18247 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
18250 Removes a list of call history asynchronously.
18254 The <em>errorCallback()</em> is launched with these error types:
18258 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
18260 UnknownError - If any other error occurs. </li>
18270 http://tizen.org/privilege/callhistory.write
18272 <Code> // Defines success callback
18273 function onSuccess(results) {
18274 tizen.callhistory.removeBatch(results);
18277 // Defines error callback
18278 function onError(error) {
18279 console.log("Query failed" + error.name);
18282 // Makes the query and wires up the callbacks
18283 tizen.callhistory.find(onSuccess, onError);
18287 <Type type="void"/>
18289 <Argument name="entries">
18292 A list of call history entries to delete.
18295 <Type type="array">
18296 <Type name="CallHistoryEntry"/>
18299 <Argument optional="optional" name="successCallback">
18302 A generic success handler.
18305 <Type name="SuccessCallback" nullable="nullable"/>
18307 <Argument optional="optional" name="errorCallback">
18313 <Type name="ErrorCallback" nullable="nullable"/>
18317 <RaiseException name="WebAPIException">
18320 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
18323 with error type SecurityError, if the application does not have the privilege to call this method.
18326 with error type NotSupportedError, if this feature is not supported.
18332 <Operation name="removeAll" id="::Callhistory::CallHistory::removeAll">
18333 <webidl> void removeAll(optional <ref>SuccessCallback</ref>? successCallback,
18334 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
18337 Removes all call history asynchronously.
18341 The <em>errorCallback()</em> is launched with these error types:
18345 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
18347 UnknownError - If any other error occurs. </li>
18357 http://tizen.org/privilege/callhistory.write
18360 <Type type="void"/>
18362 <Argument optional="optional" name="successCallback">
18365 A generic success handler.
18368 <Type name="SuccessCallback" nullable="nullable"/>
18370 <Argument optional="optional" name="errorCallback">
18376 <Type name="ErrorCallback" nullable="nullable"/>
18380 <RaiseException name="WebAPIException">
18383 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
18386 with error type SecurityError, if this functionality is not allowed.
18389 with error type NotSupportedError, if this feature is not supported.
18395 <Operation name="addChangeListener" id="::Callhistory::CallHistory::addChangeListener">
18396 <webidl> long addChangeListener(<ref>CallHistoryChangeCallback</ref> observer) raises(<ref>WebAPIException</ref>);</webidl>
18399 Adds a listener to register for callback to observe call history changes.
18408 http://tizen.org/privilege/callhistory.read
18410 <Code> var onListenerCB = {
18411 onadded: function(newItems) {
18412 console.log("New Item added");
18413 for (var i in newItems) {
18414 console.log("Item " + i + " startTime: " + newItems[i].startTime);
18417 onchanged: function(changedItems) {
18418 console.log("Items changed");
18419 for (var i in changedItems) {
18420 console.log("Item " + i + " direction: " + changedItems[i].direction);
18423 onremoved: function(removedItems) {
18424 console.log("Items removed");
18425 for(var i in removedItems) {
18426 console.log("Item " + i + " : " + removedItems[i]);
18431 // Registers a call history callback
18432 var handle = tizen.callhistory.addChangeListener(onListenerCB);
18434 // Unregisters a previously registered listener
18435 tizen.callhistory.removeChangeListener(handle);
18437 console.log("Exception - code: " + error.name + " message: " + error.message);
18445 long A handle which can be used for unregistering.
18450 <Argument name="observer">
18453 A callback for handling the list of new or changed or <em>CallHistoryEntry </em>objects in the call history.
18456 <Type name="CallHistoryChangeCallback"/>
18460 <RaiseException name="WebAPIException">
18463 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
18466 with error type InvalidValuesError, if any input parameter contains invalid values.
18469 with error type SecurityError, if the application does not have the privilege to call this method.
18472 with error type NotSupportedError, if the feature is not supported.
18475 with error type UnknownError, if any other error occurs.
18481 <Operation name="removeChangeListener" id="::Callhistory::CallHistory::removeChangeListener">
18482 <webidl> void removeChangeListener(long handle) raises(<ref>WebAPIException</ref>);</webidl>
18485 Removes a listener to unregister a previously registered listener.
18494 http://tizen.org/privilege/callhistory.read
18497 <Type type="void"/>
18499 <Argument name="handle">
18502 The previously obtained listener handle.
18505 <Type type="long"/>
18509 <RaiseException name="WebAPIException">
18512 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
18515 with error type InvalidValuesError, if any input parameter contains invalid values.
18518 with error type SecurityError, if the application does not have the privilege to call this method.
18521 with error type NotSupportedError, if the feature is not supported.
18524 with error type UnknownError, if any other error occurs.
18531 <Interface name="CallHistoryEntryArraySuccessCallback" id="::Callhistory::CallHistoryEntryArraySuccessCallback">
18532 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface CallHistoryEntryArraySuccessCallback {
18533 void onsuccess(<ref>CallHistoryEntry</ref>[] entries);
18537 This is a callback interface of <em>CallHistory </em>operations.
18538 For example code, see <em>CallHistory </em>interface.
18544 <ExtendedAttributeList>
18545 <ExtendedAttribute name="Callback" value="FunctionOnly">
18546 <webidl>Callback</webidl>
18547 </ExtendedAttribute>
18548 <ExtendedAttribute name="NoInterfaceObject">
18549 <webidl> NoInterfaceObject</webidl>
18550 </ExtendedAttribute>
18551 </ExtendedAttributeList>
18552 <Operation name="onsuccess" id="::Callhistory::CallHistoryEntryArraySuccessCallback::onsuccess">
18553 <webidl> void onsuccess(<ref>CallHistoryEntry</ref>[] entries);</webidl>
18556 Called when the queries on call history have been successfully completed.
18562 <Type type="void"/>
18564 <Argument name="entries">
18567 An array of <em>CallHistoryEntry </em>objects, representing the result set of the query over the call history.
18570 <Type type="array">
18571 <Type name="CallHistoryEntry"/>
18577 <Interface name="CallHistoryChangeCallback" id="::Callhistory::CallHistoryChangeCallback">
18578 <webidl> [Callback, NoInterfaceObject]
18579 interface CallHistoryChangeCallback {
18580 void onadded(<ref>CallHistoryEntry</ref>[] newItems);
18582 void onchanged(<ref>CallHistoryEntry</ref>[] changedItems);
18584 void onremoved(DOMString[] removedItems);
18588 This is a callback interface of a<em> CallHistory </em>operations.
18589 For example code, see <em>CallHistory </em>interface.
18595 <ExtendedAttributeList>
18596 <ExtendedAttribute name="Callback">
18597 <webidl>Callback</webidl>
18598 </ExtendedAttribute>
18599 <ExtendedAttribute name="NoInterfaceObject">
18600 <webidl> NoInterfaceObject</webidl>
18601 </ExtendedAttribute>
18602 </ExtendedAttributeList>
18603 <Operation name="onadded" id="::Callhistory::CallHistoryChangeCallback::onadded">
18604 <webidl> void onadded(<ref>CallHistoryEntry</ref>[] newItems);</webidl>
18607 Called when a new call history item is added.
18613 <Type type="void"/>
18615 <Argument name="newItems">
18618 An array of <em>CallHistoryEntry </em>objects, representing the new items added to call history.
18621 <Type type="array">
18622 <Type name="CallHistoryEntry"/>
18627 <Operation name="onchanged" id="::Callhistory::CallHistoryChangeCallback::onchanged">
18628 <webidl> void onchanged(<ref>CallHistoryEntry</ref>[] changedItems);</webidl>
18631 Called when the call history have been changed.
18637 <Type type="void"/>
18639 <Argument name="changedItems">
18642 An array of <em>CallHistoryEntry </em>objects, representing the changed items in call history.
18645 <Type type="array">
18646 <Type name="CallHistoryEntry"/>
18651 <Operation name="onremoved" id="::Callhistory::CallHistoryChangeCallback::onremoved">
18652 <webidl> void onremoved(DOMString[] removedItems);</webidl>
18655 Called when the call history have been removed.
18661 <Type type="void"/>
18663 <Argument name="removedItems">
18666 An array of an uid of <em>CallHistoryEntry </em>objects, representing the removed items in call history.
18669 <Type type="array">
18670 <Type type="DOMString"/>
18677 <Module name="Contact" id="::Contact">
18678 <webidl>module Contact {
18680 typedef DOMString AddressBookId;
18682 typedef DOMString ContactId;
18684 typedef DOMString PersonId;
18686 typedef DOMString ContactGroupId;
18688 enum ContactTextFormat {"VCARD_30"};
18690 [NoInterfaceObject] interface ContactManagerObject {
18691 readonly attribute <ref>ContactManager</ref> contact;
18693 <ref>Tizen</ref> implements <ref>ContactManagerObject</ref>;
18695 [NoInterfaceObject] interface ContactManager {
18697 void getAddressBooks(<ref>AddressBookArraySuccessCallback</ref> successCallback,
18698 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18700 <ref>AddressBook</ref> getUnifiedAddressBook() raises(<ref>WebAPIException</ref>);
18702 <ref>AddressBook</ref> getDefaultAddressBook() raises(<ref>WebAPIException</ref>);
18704 <ref>AddressBook</ref> getAddressBook(<ref>AddressBookId</ref> addressBookId) raises(<ref>WebAPIException</ref>);
18706 <ref>Person</ref> get(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);
18708 void update(<ref>Person</ref> person) raises(<ref>WebAPIException</ref>);
18710 void updateBatch(<ref>Person</ref>[] persons,
18711 optional <ref>SuccessCallback</ref>? successCallback,
18712 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18714 void remove(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);
18716 void removeBatch(<ref>PersonId</ref>[] personIds,
18717 optional <ref>SuccessCallback</ref>? successCallback,
18718 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18720 void find(<ref>PersonArraySuccessCallback</ref> successCallback,
18721 optional <ref>ErrorCallback</ref>? errorCallback,
18722 optional <ref>AbstractFilter</ref>? filter,
18723 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);
18725 long addChangeListener(<ref>PersonsChangeCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);
18727 void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
18730 [NoInterfaceObject] interface AddressBook {
18732 readonly attribute <ref>AddressBookId</ref>? id;
18734 readonly attribute DOMString name;
18736 readonly attribute boolean readOnly;
18738 <ref>Contact</ref> get(<ref>ContactId</ref> id) raises(<ref>WebAPIException</ref>);
18740 void add(<ref>Contact</ref> contact) raises(<ref>WebAPIException</ref>);
18742 void addBatch(<ref>Contact</ref>[] contacts,
18743 optional <ref>ContactArraySuccessCallback</ref>? successCallback,
18744 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18746 void update(<ref>Contact</ref> contact) raises(<ref>WebAPIException</ref>);
18748 void updateBatch(<ref>Contact</ref>[] contacts,
18749 optional <ref>SuccessCallback</ref>? successCallback,
18750 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18752 void remove(<ref>ContactId</ref> id) raises(<ref>WebAPIException</ref>);
18754 void removeBatch(<ref>ContactId</ref>[] ids,
18755 optional <ref>SuccessCallback</ref>? successCallback,
18756 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18758 void find(<ref>ContactArraySuccessCallback</ref> successCallback,
18759 optional <ref>ErrorCallback</ref>? errorCallback,
18760 optional <ref>AbstractFilter</ref>? filter,
18761 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);
18763 long addChangeListener(<ref>AddressBookChangeCallback</ref> successCallback,
18764 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18766 void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
18768 <ref>ContactGroup</ref> getGroup(<ref>ContactGroupId</ref> groupId) raises(<ref>WebAPIException</ref>);
18770 void addGroup(<ref>ContactGroup</ref> group) raises(<ref>WebAPIException</ref>);
18772 void updateGroup(<ref>ContactGroup</ref> group) raises(<ref>WebAPIException</ref>);
18774 void removeGroup(<ref>ContactGroupId</ref> groupId) raises(<ref>WebAPIException</ref>);
18776 <ref>ContactGroup</ref>[] getGroups() raises(<ref>WebAPIException</ref>);
18779 [NoInterfaceObject] interface Person {
18780 readonly attribute <ref>PersonId</ref> id;
18782 readonly attribute DOMString displayName;
18784 readonly attribute long contactCount;
18786 readonly attribute boolean hasPhoneNumber;
18788 readonly attribute boolean hasEmail;
18790 attribute boolean isFavorite;
18792 attribute DOMString? photoURI;
18794 attribute DOMString? ringtoneURI;
18796 attribute <ref>ContactId</ref> displayContactId;
18798 void link(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);
18800 <ref>Person</ref> unlink(<ref>ContactId</ref> contactId) raises(<ref>WebAPIException</ref>);
18803 dictionary ContactInit {
18804 <ref>ContactName</ref> name;
18805 <ref>ContactAddress</ref>[] addresses;
18806 DOMString photoURI;
18807 <ref>ContactPhoneNumber</ref>[] phoneNumbers;
18808 <ref>ContactEmailAddress</ref>[] emails;
18810 <ref>ContactAnniversary</ref>[] anniversaries;
18811 <ref>ContactOrganization</ref>[] organizations;
18813 <ref>ContactWebSite</ref>[] urls;
18814 DOMString ringtoneURI;
18815 <ref>ContactGroupId</ref>[] groupIds;
18818 [Constructor(optional <ref>ContactInit</ref>? ContactInitDict),
18819 Constructor(DOMString stringRepresentation)]
18820 interface Contact {
18821 readonly attribute <ref>ContactId</ref>? id;
18823 readonly attribute <ref>PersonId</ref>? personId;
18825 readonly attribute <ref>AddressBookId</ref>? addressBookId;
18827 readonly attribute Date? lastUpdated;
18829 readonly attribute boolean isFavorite;
18831 attribute <ref>ContactName</ref>? name setraises(<ref>WebAPIException</ref>);
18833 attribute <ref>ContactAddress</ref>[] addresses setraises(<ref>WebAPIException</ref>);
18835 attribute DOMString? photoURI setraises(<ref>WebAPIException</ref>);
18837 attribute <ref>ContactPhoneNumber</ref>[] phoneNumbers setraises(<ref>WebAPIException</ref>);
18839 attribute <ref>ContactEmailAddress</ref>[] emails setraises(<ref>WebAPIException</ref>);
18841 attribute Date? birthday setraises(<ref>WebAPIException</ref>);
18843 attribute <ref>ContactAnniversary</ref>[] anniversaries setraises(<ref>WebAPIException</ref>);
18845 attribute <ref>ContactOrganization</ref>[] organizations setraises(<ref>WebAPIException</ref>);
18847 attribute DOMString[] notes setraises(<ref>WebAPIException</ref>);
18849 attribute <ref>ContactWebSite</ref>[] urls setraises(<ref>WebAPIException</ref>);
18851 attribute DOMString? ringtoneURI setraises(<ref>WebAPIException</ref>);
18853 attribute <ref>ContactGroupId</ref>[] groupIds setraises(<ref>WebAPIException</ref>);
18855 DOMString convertToString(optional <ref>ContactTextFormat</ref>? format) raises(<ref>WebAPIException</ref>);
18857 <ref>Contact</ref> clone() raises(<ref>WebAPIException</ref>);
18860 [Constructor(<ref>AddressBookId</ref> addressBookId, <ref>ContactId</ref> contactId)]
18861 interface ContactRef {
18862 attribute <ref>AddressBookId</ref> addressBookId;
18864 attribute <ref>ContactId</ref> contactId;
18867 dictionary ContactNameInit {
18870 DOMString firstName;
18871 DOMString middleName;
18872 DOMString lastName;
18873 DOMString[] nicknames;
18874 DOMString phoneticFirstName;
18875 DOMString phoneticLastName;
18878 [Constructor(optional <ref>ContactNameInit</ref>? nameInitDict)]
18879 interface ContactName {
18880 attribute DOMString? prefix;
18882 attribute DOMString? suffix;
18884 attribute DOMString? firstName;
18886 attribute DOMString? middleName;
18888 attribute DOMString? lastName;
18890 attribute DOMString[] nicknames;
18892 attribute DOMString? phoneticFirstName;
18894 attribute DOMString? phoneticLastName;
18896 readonly attribute DOMString? displayName;
18899 dictionary ContactOrganizationInit {
18901 DOMString department;
18907 [Constructor(optional <ref>ContactOrganizationInit</ref>? orgInitDict)]
18908 interface ContactOrganization {
18909 attribute DOMString? name;
18911 attribute DOMString? department;
18913 attribute DOMString? title;
18915 attribute DOMString? role;
18917 attribute DOMString? logoURI;
18920 [Constructor(DOMString url, optional DOMString type)]
18921 interface ContactWebSite
18923 attribute DOMString url;
18925 attribute DOMString type;
18928 [Constructor(Date date, optional DOMString? label)]
18929 interface ContactAnniversary
18931 attribute Date date;
18933 attribute DOMString? label;
18936 dictionary ContactAddressInit
18941 DOMString streetAddress;
18942 DOMString additionalInformation;
18943 DOMString postalCode;
18948 [Constructor(optional <ref>ContactAddressInit</ref>? addressInitDict)]
18949 interface ContactAddress
18951 attribute DOMString? country;
18953 attribute DOMString? region;
18955 attribute DOMString? city;
18957 attribute DOMString? streetAddress;
18959 attribute DOMString? additionalInformation;
18961 attribute DOMString? postalCode;
18963 attribute boolean isDefault;
18965 attribute DOMString[] types;
18968 [Constructor(DOMString number, optional DOMString[] types, optional boolean isDefault)]
18969 interface ContactPhoneNumber
18971 attribute DOMString number;
18973 attribute boolean isDefault;
18975 attribute DOMString[] types;
18978 [Constructor(DOMString email, optional DOMString[] types, optional boolean isDefault)]
18979 interface ContactEmailAddress
18981 attribute DOMString email;
18983 attribute boolean isDefault;
18985 attribute DOMString[] types;
18988 [Constructor(DOMString name, optional DOMString? ringtoneURI, optional DOMString? photoURI)]
18989 interface ContactGroup
18991 readonly attribute <ref>ContactGroupId</ref>? id;
18993 readonly attribute <ref>AddressBookId</ref>? addressBookId;
18995 attribute DOMString name;
18997 attribute DOMString? ringtoneURI;
18999 attribute DOMString? photoURI;
19001 readonly attribute DOMString readOnly;
19004 [Callback=FunctionOnly, NoInterfaceObject] interface PersonArraySuccessCallback {
19005 void onsuccess(<ref>Person</ref>[] persons);
19008 [Callback=FunctionOnly, NoInterfaceObject] interface ContactArraySuccessCallback {
19009 void onsuccess(<ref>Contact</ref>[] contacts);
19012 [Callback=FunctionOnly, NoInterfaceObject] interface AddressBookArraySuccessCallback {
19013 void onsuccess(<ref>AddressBook</ref>[] addressbooks);
19016 [Callback, NoInterfaceObject] interface AddressBookChangeCallback {
19017 void oncontactsadded(<ref>Contact</ref>[] contacts);
19019 void oncontactsupdated(<ref>Contact</ref>[] contacts);
19021 void oncontactsremoved(<ref>ContactId</ref>[] contactIds);
19024 [Callback, NoInterfaceObject] interface PersonsChangeCallback {
19025 void onpersonsadded(<ref>Person</ref>[] persons);
19027 void onpersonsupdated(<ref>Person</ref>[] persons);
19029 void onpersonsremoved(<ref>PersonId</ref>[] personIds);
19034 This API is for managing Address Books.
19038 A contact is a set of information that describes a contact. The contact contains information, such as phone numbers,
19039 e-mail addresses, etc.
19042 <a href='http://www.ietf.org/rfc/rfc2426.txt'> RFC 2426 vCard MIME Directory Profile</a> defines a format for exchanging contacts. Contact API refers to this specification to provide a mapping of the specified contact attributes.
19045 A <em>person </em>is a set of information that describes a person. Two different <em>contacts</em> that indicate the same person will have the same person ID. A person has a display contact ID that indicates a contact that represents information of the person. A person is automatically created when a new contact is added.
19048 This API provides functionality to read, create, remove, and update contacts in specific address books. Address books can be obtained using the <em>getAddressBooks()</em> method, which returns an array of <em>AddressBook</em> objects.
19051 For more information on the Contact features, see <a href="../../org.tizen.web.appprogramming/html/guide/social_guide/contact.htm">Contact Guide</a>.
19058 <Typedef name="AddressBookId" id="::Contact::AddressBookId">
19059 <webidl> typedef DOMString AddressBookId;</webidl>
19062 The address book identifier.
19068 <Type type="DOMString"/>
19070 <Typedef name="ContactId" id="::Contact::ContactId">
19071 <webidl> typedef DOMString ContactId;</webidl>
19074 The contact identifier.
19080 <Type type="DOMString"/>
19082 <Typedef name="PersonId" id="::Contact::PersonId">
19083 <webidl> typedef DOMString PersonId;</webidl>
19086 The person identifier.
19092 <Type type="DOMString"/>
19094 <Typedef name="ContactGroupId" id="::Contact::ContactGroupId">
19095 <webidl> typedef DOMString ContactGroupId;</webidl>
19098 The group identifier.
19104 <Type type="DOMString"/>
19106 <Enum name="ContactTextFormat" id="::Contact::ContactTextFormat">
19107 <webidl> enum ContactTextFormat {"VCARD_30"};</webidl>
19110 An enumerator that indicates the contact format that is used for export. * The possible values are:
19115 VCARD_30 - vCard v3.0 format </li>
19118 Currently, vCard v3.0 is the only format supported by the Tizen platform.
19125 <EnumValue stringvalue="VCARD_30">
19126 <webidl>"VCARD_30</webidl>
19129 <Interface name="ContactManagerObject" id="::Contact::ContactManagerObject">
19130 <webidl> [NoInterfaceObject] interface ContactManagerObject {
19131 readonly attribute <ref>ContactManager</ref> contact;
19135 Defines what is instantiated by the <em>Tizen </em>object from the Tizen Platform.
19139 There is a <em>tizen.contact </em>object that allows access to the Contact API functionality.
19146 <ExtendedAttributeList>
19147 <ExtendedAttribute name="NoInterfaceObject">
19148 <webidl>NoInterfaceObject</webidl>
19149 </ExtendedAttribute>
19150 </ExtendedAttributeList>
19151 <Attribute readonly="readonly" name="contact" id="::Contact::ContactManagerObject::contact">
19152 <webidl> readonly attribute <ref>ContactManager</ref> contact;</webidl>
19153 <Type name="ContactManager"/>
19156 <Implements name1="Tizen" name2="ContactManagerObject">
19157 <webidl> <ref>Tizen</ref> implements <ref>ContactManagerObject</ref>;</webidl>
19159 <Interface name="ContactManager" id="::Contact::ContactManager">
19160 <webidl> [NoInterfaceObject] interface ContactManager {
19162 void getAddressBooks(<ref>AddressBookArraySuccessCallback</ref> successCallback,
19163 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
19165 <ref>AddressBook</ref> getUnifiedAddressBook() raises(<ref>WebAPIException</ref>);
19167 <ref>AddressBook</ref> getDefaultAddressBook() raises(<ref>WebAPIException</ref>);
19169 <ref>AddressBook</ref> getAddressBook(<ref>AddressBookId</ref> addressBookId) raises(<ref>WebAPIException</ref>);
19171 <ref>Person</ref> get(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);
19173 void update(<ref>Person</ref> person) raises(<ref>WebAPIException</ref>);
19175 void updateBatch(<ref>Person</ref>[] persons,
19176 optional <ref>SuccessCallback</ref>? successCallback,
19177 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
19179 void remove(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);
19181 void removeBatch(<ref>PersonId</ref>[] personIds,
19182 optional <ref>SuccessCallback</ref>? successCallback,
19183 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
19185 void find(<ref>PersonArraySuccessCallback</ref> successCallback,
19186 optional <ref>ErrorCallback</ref>? errorCallback,
19187 optional <ref>AbstractFilter</ref>? filter,
19188 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);
19190 long addChangeListener(<ref>PersonsChangeCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);
19192 void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
19196 This interface provides access to the API functionality.
19200 This interface offers a method to retrieve the address books objects.
19201 The address book objects can be manipulated with the provided functionalities to add, remove, and update the contained information.
19208 <ExtendedAttributeList>
19209 <ExtendedAttribute name="NoInterfaceObject">
19210 <webidl>NoInterfaceObject</webidl>
19211 </ExtendedAttribute>
19212 </ExtendedAttributeList>
19213 <Operation name="getAddressBooks" id="::Contact::ContactManager::getAddressBooks">
19214 <webidl> void getAddressBooks(<ref>AddressBookArraySuccessCallback</ref> successCallback,
19215 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
19218 Gets the available address books.
19222 If the operation completes successfully, the successCallback must
19223 be invoked with the phone address book and the SIM address book (if any).
19224 Other address books present in the device should also be returned.
19227 If no address book is present, the <em>successCallback</em> will be invoked with an empty array.
19230 The errorCallback is launched with these error types:
19234 InvalidValuesError - If the event given in argument is not a recurring event. </li>
19236 UnknownError - If any other error occurs while trying to get the address books. </li>
19246 http://tizen.org/privilege/contact.read
19248 <Code> var addressbook;
19250 // Define the error callback for all the asynchronous calls
19251 function errorCB(err) {
19252 console.log( 'The following error occurred: ' + err.name);
19255 function contactsFoundCB(contacts) {
19256 // The contact has been successfully found
19257 // Let's try to change the first name
19258 contacts[0].name.firstName = 'Jeffrey Ross';
19260 addressbook.update(contacts[0]);
19262 console.log( 'The following error occurred while updating: ' + err.name);
19264 console.log('First contact was updated');
19267 // Define the success callback for retrieving all the
19269 function addressBooksCB(addressbooks) {
19270 if(addressbooks.length > 0) {
19271 addressbook = addressbooks[0];
19272 console.log('The addressbook type is ' + addressbook.type +
19273 ' and name ' + addressbook.name);
19275 var contact = new tizen.Contact(
19276 {name: new tizen.ContactName({firstName:'Jeffrey',
19278 nicknames:['joey ramone']}),
19279 emails:[new tizen.ContactEmailAddress('user@domain.com')],
19280 phoneNumbers:[new tizen.ContactPhoneNumber('123456789')]});
19282 addressbook.add(contact);
19284 // The contact has been successfully added
19285 // Checks whether the added contact can be retrieved from the address book or not.
19286 // If the address book is empty, only the item added through saveContact
19287 // should be returned
19288 var filter = new tizen.AttributeFilter('name.firstName', 'CONTAINS', 'Jeffrey');
19290 addressbook.find(contactsFoundCB, errorCB, filter);
19292 console.log( 'The following error occurred while finding: ' + err.name);
19297 // Get a list of available address books.
19298 tizen.contact.getAddressBooks(addressBooksCB, errorCB);
19301 <Type type="void"/>
19303 <Argument name="successCallback">
19306 The method to call when the invocation ends successfully.
19309 <Type name="AddressBookArraySuccessCallback"/>
19311 <Argument optional="optional" name="errorCallback">
19314 The method to call when an error occurs.
19317 <Type name="ErrorCallback" nullable="nullable"/>
19321 <RaiseException name="WebAPIException">
19324 with error type TypeMismatchError, if any input parameter
19325 is not compatible with the expected type for that parameter.
19328 with error type SecurityError, if the application does not have the privilege to call this method.
19331 with error type NotSupportedError, if the feature
19338 <Operation name="getUnifiedAddressBook" id="::Contact::ContactManager::getUnifiedAddressBook">
19339 <webidl> <ref>AddressBook</ref> getUnifiedAddressBook() raises(<ref>WebAPIException</ref>);</webidl>
19342 Gets the aggregation of all address books.
19346 The unified address book is a logical address book that represents an aggregation of all address books
19347 that are obtained by getAddressBooks() and contains all contacts in the address books.
19348 Note that the unified address book does not have an address book ID
19349 and it is set to <var>null</var>.
19359 http://tizen.org/privilege/contact.read
19361 <Code> var addressbook;
19363 // Define the error callback
19364 function errorCB(err) {
19365 console.log( 'The following error occurred: ' + err.name);
19368 function contactsFoundCB(contacts) {
19369 // The contact has been successfully found
19370 // Let's try to change the first name
19371 contacts[0].name.firstName = 'Jeffrey Ross';
19373 addressbook.update(contacts[0]);
19374 console.log('First contact was updated');
19376 console.log( 'The following error occurred while updating: ' + err.name);
19380 // Get unified address book.
19381 addressbook = tizen.contact.getUnifiedAddressBook();
19383 // Add a new contact
19384 var contact = new tizen.Contact(
19385 {name: new tizen.ContactName({firstName:'Jeffrey',
19387 nicknames:['joey ramone']}),
19388 emails:[new tizen.ContactEmailAddress('user@domain.com')],
19389 phoneNumbers:[new tizen.ContactPhoneNumber('123456789')]});
19392 addressbook.add(contact);
19394 console.log( 'The following error occurred while adding: ' + err.name);
19397 // The contact has been successfully added
19398 // Let's try to check if we can retrieve the added
19399 // contact from the address book. If the address book
19400 // was empty only the item added through saveContact should
19402 var filter = new tizen.AttributeFiilter('name.firstName', 'CONTAINS', 'Jeffrey');
19404 addressbook.find(contactsFoundCB, errorCB, filter);
19406 console.log( 'The following error occurred while finding: ' + err.name);
19410 <Type name="AddressBook">
19413 AddressBook The unified AddressBook object.
19419 <RaiseException name="WebAPIException">
19422 with error type SecurityError, if the application does not have the privilege to call this method.
19425 with error type NotSupportedError, if the feature
19429 with error type UnknownError in any other error case.
19435 <Operation name="getDefaultAddressBook" id="::Contact::ContactManager::getDefaultAddressBook">
19436 <webidl> <ref>AddressBook</ref> getDefaultAddressBook() raises(<ref>WebAPIException</ref>);</webidl>
19439 Gets the default address book.
19443 The default address book is the appointed addressbook from platform or operator.
19444 This is one of addressBooks and it has the address book ID.
19447 If the operation completes successfully, it must return the
19448 default address book.
19458 http://tizen.org/privilege/contact.read
19460 <Code> var addressbook;
19462 // Define the error callback
19463 function errorCB(err) {
19464 console.log( 'The following error occurred: ' + err.name);
19467 function contactsFoundCB(contacts) {
19468 // The contact has been successfully found
19469 // Let's try to change the first name
19470 contacts[0].name.firstName = 'Jeffrey Ross';
19472 addressbook.update(contacts[0]);
19473 console.log('First contact was updated');
19475 console.log( 'The following error occurred while updating: ' + err.name);
19479 // Get default address book.
19480 addressbook = tizen.contact.getDefaultAddressBook();
19482 // Add a new contact
19483 var contact = new tizen.Contact(
19484 {name: new tizen.ContactName({firstName:'Jeffrey',
19486 nicknames:['joey ramone']}),
19487 emails:[new tizen.ContactEmailAddress('user@domain.com')],
19488 phoneNumbers:[new tizen.ContactPhoneNumber('123456789')]});
19491 addressbook.add(contact);
19493 console.log( 'The following error occurred while adding: ' + err.name);
19496 // The contact has been successfully added
19497 // Checks whether the added contact can be retrieved from the address book or not.
19498 // If the address book is empty, only the item added
19499 // through em>saveContact /em>should be returned
19500 var filter = new tizen.AttributeFiilter('name.firstName', 'CONTAINS', 'Jeffrey');
19502 addressbook.find(contactsFoundCB, errorCB, filter);
19504 console.log( 'The following error occurred while finding: ' + err.name);
19508 <Type name="AddressBook">
19511 AddressBook The default AddressBook object.
19517 <RaiseException name="WebAPIException">
19520 with error type SecurityError, if the application does not have the privilege to call this method.
19523 with error type NotSupportedError, if the feature
19527 with error type UnknownError in any other error case.
19533 <Operation name="getAddressBook" id="::Contact::ContactManager::getAddressBook">
19534 <webidl> <ref>AddressBook</ref> getAddressBook(<ref>AddressBookId</ref> addressBookId) raises(<ref>WebAPIException</ref>);</webidl>
19537 Gets the address book with the specified identifier.
19541 If the operation completes successfully, it must return the
19542 address book with the specified identifier.
19552 http://tizen.org/privilege/contact.read
19554 <Code> var contactRef; // ContactRef supposed to be initialized
19556 // Retrieves the Contact corresponding to a given ContactRef.
19557 var addressBook = tizen.contact.getAddressBook(contactRef.addressBookId);
19558 var contact = addressBook.get(contactRef.contactId);
19559 console.log("Successfully resolved contact with id: " + contactRef.contactId);
19561 console.log("Error: " + err.name);
19565 <Type name="AddressBook">
19568 AddressBook The matching AddressBook object.
19573 <Argument name="addressBookId">
19576 The address book identifier.
19579 <Type name="AddressBookId"/>
19583 <RaiseException name="WebAPIException">
19586 with error type NotFoundError, if there is no address book
19587 with the given identifier.
19590 with error type TypeMismatchError, if any input parameter
19591 is not compatible with the expected type for that parameter.
19594 with error type InvalidValuesError, if any of the input
19595 parameters contain an invalid value.
19598 with error type SecurityError, if the application does not have the privilege to call this method.
19601 with error type NotSupportedError, if the feature
19605 with error type UnknownError in any other error case.
19611 <Operation name="get" id="::Contact::ContactManager::get">
19612 <webidl> <ref>Person</ref> get(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);</webidl>
19615 Gets the person with the specified identifier.
19619 If the operation completes successfully, it must return the
19620 person with the specified identifier.
19630 http://tizen.org/privilege/contact.read
19632 <Code> var contactRef; // ContactRef supposed to be initialized
19634 // Retrieves the Person corresponding to a Contact.
19635 var addressBook = tizen.contact.getAddressBook(contactRef.addressBookId);
19636 var contact = addressBook.get(contactRef.contactId);
19637 var person = tizen.contact.get(contact.personId);
19638 console.log("Successfully resolved person with id: " + contact.personId);
19640 console.log("Error: " + err.name);
19644 <Type name="Person">
19647 Person The matching Person object.
19652 <Argument name="personId">
19655 The Person identifier.
19658 <Type name="PersonId"/>
19662 <RaiseException name="WebAPIException">
19665 with error type NotFoundError, if there is no person
19666 with the given identifier.
19669 with error type TypeMismatchError, if any input parameter
19670 is not compatible with the expected type for that parameter.
19673 with error type InvalidValuesError, if any of the input
19674 parameters contain an invalid value.
19677 with error type SecurityError, if the application does not have the privilege to call this method.
19680 with error type NotSupportedError, if the feature
19684 with error type UnknownError in any other error case.
19690 <Operation name="update" id="::Contact::ContactManager::update">
19691 <webidl> void update(<ref>Person</ref> person) raises(<ref>WebAPIException</ref>);</webidl>
19694 Updates a person in the address book synchronously.
19703 http://tizen.org/privilege/contact.write
19705 <Code> // Define the error callback
19706 function errorCB(err) {
19707 console.log( 'The following error occurred: ' + err.name);
19710 function personsFoundCB(persons) {
19711 // The person has been successfully found
19712 // Let's try to change the isFavorite attribute
19713 persons[0].isFavorite = true;
19715 tizen.contact.update(persons[0]);
19716 console.log('First person was updated');
19718 console.log( 'The following error occurred while updating: ' + err.name);
19723 tizen.contact.find(personsFoundCB, errorCB);
19725 console.log( 'The following error occurred while finding: ' + err.name);
19729 <Type type="void"/>
19731 <Argument name="person">
19734 The person object to be updated.
19737 <Type name="Person"/>
19741 <RaiseException name="WebAPIException">
19744 with error type NotFoundError, if the identifier does not match.
19747 with error type TypeMismatchError, if any input parameter
19748 is not compatible with the expected type for that parameter.
19751 with error type InvalidValuesError, if any input parameter
19752 contains invalid values.
19755 with error type SecurityError, if the application does not have the privilege to call this method.
19758 with error type NotSupportedError, if the feature
19762 with error type UnknownError, if the person could not be updated
19763 to an unknown error.
19769 <Operation name="updateBatch" id="::Contact::ContactManager::updateBatch">
19770 <webidl> void updateBatch(<ref>Person</ref>[] persons,
19771 optional <ref>SuccessCallback</ref>? successCallback,
19772 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
19775 Updates several existing persons in the contact DB asynchronously.
19779 The <em>errorCallback()</em> is launched with these error types:
19783 NotFoundError - If an identifier in the IDs parameter does not correspond to the <em>id</em> attribute of any person in the contact DB. </li>
19785 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
19787 UnknownError - If any other error occurs, while trying to add the persons. </li>
19790 If the details of any persons cannot be updated, the error callback function that was passed in the invocation will be called.
19800 http://tizen.org/privilege/contact.write
19802 <Code> // Define the error callback for all the asynchronous calls
19803 function errorCB(err) {
19804 console.log('The following error occurred: ' + err.name);
19807 function personsUpdatedCB() {
19808 console.log('Contacts were updated');
19811 function personsFoundCB(persons) {
19812 // The person has been successfully found
19813 for(var i = 0; i < persons.length; i++) {
19814 persons[i].isFavorite = true;
19817 tizen.contact.updateBatch(persons, personsUpdatedCB, errorCB);
19819 console.log('The following error occurred while updating: ' + err.name);
19824 tizen.contact.find(personsFoundCB, errorCB);
19826 console.log('The following error occurred while finding: ' + err.name);
19830 <Type type="void"/>
19832 <Argument name="persons">
19835 A list of Person objects to be saved in the terminal storage.
19838 <Type type="array">
19839 <Type name="Person"/>
19842 <Argument optional="optional" name="successCallback">
19845 The method to call when the invocation ends successfully.
19848 <Type name="SuccessCallback" nullable="nullable"/>
19850 <Argument optional="optional" name="errorCallback">
19853 The method to call when the request to update the details of a person fail.
19856 <Type name="ErrorCallback" nullable="nullable"/>
19860 <RaiseException name="WebAPIException">
19863 with error type TypeMismatchError, if the input parameter
19864 is not compatible with the expected type for that parameter.
19867 with error type SecurityError, if the application does not have the privilege to call this method.
19870 with error type NotSupportedError, if this feature is not supported.
19876 <Operation name="remove" id="::Contact::ContactManager::remove">
19877 <webidl> void remove(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);</webidl>
19880 Removes a person from the contact DB synchronously.
19884 Removes the person that corresponds to the specified identifier and the contacts related to the person as well. This function will throw an exception if it fails to remove the specified person.
19894 http://tizen.org/privilege/contact.write
19896 <Code> // Define the error callback
19897 function errorCB(err) {
19898 console.log('The following error occurred: ' + err.name);
19901 function personsFoundCB(persons) {
19902 // The person has been successfully found
19903 if(persons.length > 0) {
19905 tizen.contact.remove(persons[0].id);
19906 console.log('First person was removed');
19908 console.log('The following error occurred while removing: ' + err.name);
19911 console.log( 'No persons.');
19916 tizen.contact.find(personsFoundCB, errorCB);
19918 console.log( 'The following error occurred while finding: ' + err.name);
19922 <Type type="void"/>
19924 <Argument name="personId">
19927 An identifier (ID attribute) of the Person object to delete.
19930 <Type name="PersonId"/>
19934 <RaiseException name="WebAPIException">
19937 with error type NotFoundError, if the identifier does not match
19941 with error type TypeMismatchError, if any input parameter
19942 is not compatible with the expected type for that parameter.
19945 with error type InvalidValuesError, if any input parameter
19946 contains invalid values.
19949 with error type SecurityError, if the application does not have the privilege to call this method.
19952 with error type NotSupportedError, if the feature
19956 with error type UnknownError, if the person could not be removed
19957 to an unknown error.
19963 <Operation name="removeBatch" id="::Contact::ContactManager::removeBatch">
19964 <webidl> void removeBatch(<ref>PersonId</ref>[] personIds,
19965 optional <ref>SuccessCallback</ref>? successCallback,
19966 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
19969 Removes persons from contact DB asynchronously.
19973 Removes the persons that correspond to the specified identifiers as well as the contacts related to them.
19976 The <em>errorCallback() </em>is launched with these error types:
19980 NotFoundError - If an identifier in the <em>personIds </em>parameter does not correspond to the ID of any person in the contact DB. (Otherwise, the implementation will attempt to remove the contacts corresponding to these identifiers). </li>
19982 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
19984 UnknownError - If any other error occurs while trying to remove the persons. </li>
19994 http://tizen.org/privilege/contact.write
19996 <Code> // Define the error callback
19997 function errorCB(err) {
19998 console.log( 'The following error occurred: ' + err.name);
20001 function personsRemovedCB() {
20002 console.log('Contacts were removed');
20005 function personsFoundCB(persons) {
20006 // The person has been successfully found
20007 if(persons.length > 2) {
20009 tizen.contact.removeBatch([persons[0].id, persons[1].id], personsRemovedCB, errorCB);
20011 console.log( 'The following error occurred while removing: ' + err.name);
20014 console.log( 'Not enough persons.');
20019 tizen.contact.find(personsFoundCB, errorCB);
20021 console.log( 'The following error occurred while finding: ' + err.name);
20025 <Type type="void"/>
20027 <Argument name="personIds">
20030 A list of identifiers (id attribute) for the Person objects to delete.
20033 <Type type="array">
20034 <Type name="PersonId"/>
20037 <Argument optional="optional" name="successCallback">
20040 The method to call when the invocation ends successfully.
20043 <Type name="SuccessCallback" nullable="nullable"/>
20045 <Argument optional="optional" name="errorCallback">
20048 The method to call when the request to delete persons fails.
20051 <Type name="ErrorCallback" nullable="nullable"/>
20055 <RaiseException name="WebAPIException">
20058 with error type TypeMismatchError, if any input parameter
20059 is not compatible with the expected type for that parameter.
20062 with error type SecurityError, if the application does not have the privilege to call this method.
20065 with error type NotSupportedError, if the feature
20072 <Operation name="find" id="::Contact::ContactManager::find">
20073 <webidl> void find(<ref>PersonArraySuccessCallback</ref> successCallback,
20074 optional <ref>ErrorCallback</ref>? errorCallback,
20075 optional <ref>AbstractFilter</ref>? filter,
20076 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);</webidl>
20079 Gets an array of all <em>Person </em>objects from the contact DB or the ones that match the optionally supplied filter.
20083 If the filter is passed and contains valid values, only those values in the
20084 address book that match the filter criteria as specified in the AbstractFilter
20085 interface will be returned in the successCallback. If no filter is passed, the filter
20086 contains any invalid values, the filter is <var>null </var> or undefined, then
20087 the implementation must return the full list of contact items
20088 in the successCallback. If no persons are available in the contact DB or no
20089 person matches the filter criteria, the successCallback will be invoked
20090 with an empty array.
20093 The <em>errorCallback() </em>is launched with these error types:
20097 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
20099 UnknownError - If any other error occurs while trying to retrieve the persons. </li>
20109 http://tizen.org/privilege/contact.read
20111 <Code> // Define the error callback.
20112 function errorCB(err) {
20113 console.log( 'The following error occurred: ' + err.name);
20116 // Define the person search success callback.
20117 function personsFoundCB(persons) {
20118 console.log(persons.length + ' results found.');
20121 // Finds all the persons in the contact DB that have the word Ramone in their display name
20122 var filter = new tizen.AttributeFilter('displayName', 'CONTAINS', 'Ramone');
20124 // The persons returned by the find() query will be sorted in the ascending order of their display name.
20125 var sortingMode = new tizen.SortMode('displayName', 'ASC');
20127 tizen.contact.find(personsFoundCB, errorCB,
20128 filter, sortingMode);
20130 console.log( 'The following error occurred while finding: ' + err.name);
20134 <Type type="void"/>
20136 <Argument name="successCallback">
20139 The method to call when the invocation ends successfully.
20142 <Type name="PersonArraySuccessCallback"/>
20144 <Argument optional="optional" name="errorCallback">
20147 The method to call when an error occurs.
20150 <Type name="ErrorCallback" nullable="nullable"/>
20152 <Argument optional="optional" name="filter">
20155 A filter to select which persons are returned.
20158 <Type name="AbstractFilter" nullable="nullable"/>
20160 <Argument optional="optional" name="sortMode">
20163 A variable to determine the sort order in which the persons are returned.
20166 <Type name="SortMode" nullable="nullable"/>
20170 <RaiseException name="WebAPIException">
20173 with error type TypeMismatchError, if any input parameter
20174 is not compatible with the expected type for that parameter.
20177 with error type SecurityError, if the application does not have the privilege to call this method.
20180 with error type NotSupportedError, if the feature
20187 <Operation name="addChangeListener" id="::Contact::ContactManager::addChangeListener">
20188 <webidl> long addChangeListener(<ref>PersonsChangeCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);</webidl>
20191 Subscribes to receive notifications about persons' changes.
20195 When executed, the implementation must immediately return a subscription identifier that identifies
20196 the watch operation. After returning the identifier, the watch operation is started
20207 http://tizen.org/privilege/contact.read
20209 <Code> var watcherId = 0; // watcher identifier
20212 onpersonsadded: function(persons) {
20213 console.log(persons.length + ' persons were added');
20215 onpersonsupdated: function(persons) {
20216 console.log(persons.length + ' persons were updated');
20218 onpersonsremoved: function(ids) {
20219 console.log(ids.length + ' persons were deleted');
20223 // registers to be notified when the persons' changes
20224 watcherId = tizen.contact.addChangeListener(watcher);
20230 long Identifier used to clear the watch subscription.
20235 <Argument name="successCallback">
20238 Contains the methods for different types of change notifications.
20241 <Type name="PersonsChangeCallback"/>
20245 <RaiseException name="WebAPIException">
20248 with error type TypeMismatchError, if any input parameter
20249 is not compatible with the expected type for that parameter.
20252 with error type InvalidValuesError, if any of the input parameters
20253 contain an invalid value.
20256 with error type SecurityError, if the application does not have the privilege to call this method.
20259 with error type NotSupportedError, if the feature
20263 with error type UnknownError in any other case.
20269 <Operation name="removeChangeListener" id="::Contact::ContactManager::removeChangeListener">
20270 <webidl> void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);</webidl>
20273 Unsubscribes a persons' changes watch operation.
20277 If the watchId argument is valid and corresponds to a subscription already in
20278 place, the watch process must immediately stop and no further callbacks MUST be
20279 invoked. If the watchId argument is not valid or does not correspond to a
20280 valid subscription, the method should return without any further action.
20290 http://tizen.org/privilege/contact.read
20292 <Code> var watcherId = 0; // watcher identifier
20294 // Receives persons' changes
20296 onpersonsadded: function(persons) {
20297 console.log(persons.length + ' persons were added');
20299 onpersonsupdated: function(persons) {
20300 console.log(persons.length + ' persons were updated');
20302 onpersonsremoved: function(ids) {
20303 console.log(ids.length + ' persons were removed');
20307 // Cancel the watch operation
20308 function cancelWatch() {
20309 tizen.contact.removeChangeListener(watcherId);
20312 // registers to be notified when the persons' changes
20313 watcherId = tizen.contact.addChangeListener(watcher);
20316 <Type type="void"/>
20318 <Argument name="watchId">
20321 A subscription Identifier.
20324 <Type type="long"/>
20328 <RaiseException name="WebAPIException">
20331 with error type TypeMismatchError, if any input parameter
20332 is not compatible with the expected type for that parameter.
20335 with error type InvalidValuesError, if any of the input
20336 parameters contain an invalid value.
20339 with error type NotFoundError, if there is no listener
20340 with the given identifier.
20343 with error type SecurityError, if the application does not have the privilege to call this method.
20346 with error type NotSupportedError, if the feature
20350 with error type UnknownError in any other error case.
20357 <Interface name="AddressBook" id="::Contact::AddressBook">
20358 <webidl> [NoInterfaceObject] interface AddressBook {
20360 readonly attribute <ref>AddressBookId</ref>? id;
20362 readonly attribute DOMString name;
20364 readonly attribute boolean readOnly;
20366 <ref>Contact</ref> get(<ref>ContactId</ref> id) raises(<ref>WebAPIException</ref>);
20368 void add(<ref>Contact</ref> contact) raises(<ref>WebAPIException</ref>);
20370 void addBatch(<ref>Contact</ref>[] contacts,
20371 optional <ref>ContactArraySuccessCallback</ref>? successCallback,
20372 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
20374 void update(<ref>Contact</ref> contact) raises(<ref>WebAPIException</ref>);
20376 void updateBatch(<ref>Contact</ref>[] contacts,
20377 optional <ref>SuccessCallback</ref>? successCallback,
20378 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
20380 void remove(<ref>ContactId</ref> id) raises(<ref>WebAPIException</ref>);
20382 void removeBatch(<ref>ContactId</ref>[] ids,
20383 optional <ref>SuccessCallback</ref>? successCallback,
20384 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
20386 void find(<ref>ContactArraySuccessCallback</ref> successCallback,
20387 optional <ref>ErrorCallback</ref>? errorCallback,
20388 optional <ref>AbstractFilter</ref>? filter,
20389 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);
20391 long addChangeListener(<ref>AddressBookChangeCallback</ref> successCallback,
20392 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
20394 void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
20396 <ref>ContactGroup</ref> getGroup(<ref>ContactGroupId</ref> groupId) raises(<ref>WebAPIException</ref>);
20398 void addGroup(<ref>ContactGroup</ref> group) raises(<ref>WebAPIException</ref>);
20400 void updateGroup(<ref>ContactGroup</ref> group) raises(<ref>WebAPIException</ref>);
20402 void removeGroup(<ref>ContactGroupId</ref> groupId) raises(<ref>WebAPIException</ref>);
20404 <ref>ContactGroup</ref>[] getGroups() raises(<ref>WebAPIException</ref>);
20408 This interface provides methods to manage an address book.
20412 An address book is a collection of contacts and groups. This interface offers methods to manage the address book and to manipulate contacts within the address book, such as:
20416 <em>get()</em> - To get contacts that have a specific ID </li>
20418 <em>find()</em> - To find contacts using filters </li>
20420 <em>add() </em>or <em>addBatch()</em> - To add contacts to a specific address book </li>
20422 <em>update() </em>or <em>updateBatch()</em> - To update contacts in a specific address book </li>
20424 <em>remove() </em>or <em>removeBatch() </em> - To remove existing contacts </li>
20426 <em>addChangeListener() </em>or <em>removeChangeListener() </em> - To watch for address book changes </li>
20429 This interface also offers methods to manipulate groups within the address book, such as:
20433 <em>getGroup()</em> - To get a group having specific ID </li>
20435 <em>getGroups()</em> - To get groups in a specific address book </li>
20437 <em>addGroup() </em> - To add groups to a specific address book </li>
20439 <em>updateGroup() </em> - To update groups in a specific address book </li>
20441 <em>removeGroup() </em> - To remove existing groups </li>
20448 <ExtendedAttributeList>
20449 <ExtendedAttribute name="NoInterfaceObject">
20450 <webidl>NoInterfaceObject</webidl>
20451 </ExtendedAttribute>
20452 </ExtendedAttributeList>
20453 <Attribute readonly="readonly" name="id" id="::Contact::AddressBook::id">
20454 <webidl> readonly attribute <ref>AddressBookId</ref>? id;</webidl>
20457 An attribute to uniquely identify the address book.
20461 The value of this attribute shall be <var>null </var> if the address book
20462 is the unified address book.
20469 <Type name="AddressBookId" nullable="nullable"/>
20471 <Attribute readonly="readonly" name="name" id="::Contact::AddressBook::name">
20472 <webidl> readonly attribute DOMString name;</webidl>
20475 The address book descriptive name.
20481 <Type type="DOMString"/>
20483 <Attribute readonly="readonly" name="readOnly" id="::Contact::AddressBook::readOnly">
20484 <webidl> readonly attribute boolean readOnly;</webidl>
20487 An attribute to indicate if the address book is read-only.
20491 Some on line address books cannot be edited and will have this
20492 flag set to <var>true</var>.
20499 <Type type="boolean"/>
20501 <Operation name="get" id="::Contact::AddressBook::get">
20502 <webidl> <ref>Contact</ref> get(<ref>ContactId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
20505 Gets the contact with the specified identifier.
20509 If the operation completes successfully, it must return the
20510 contact with the specified identifier.
20520 http://tizen.org/privilege/contact.read
20522 <Code> var contactRef; // ContactRef supposed to be initialized
20524 // Retrieves the Contact corresponding to a given ContactRef.
20525 var addressBook = tizen.contact.getAddressBook(contactRef.addressBookId);
20526 var contact = addressBook.get(contactRef.contactId);
20527 console.log("Successfully resolved contact with id: " + contactRef.contactId);
20529 console.log("Error: " + err.name);
20533 <Type name="Contact">
20536 Contact The matching Contact object.
20541 <Argument name="id">
20544 A contact identifier.
20547 <Type name="ContactId"/>
20551 <RaiseException name="WebAPIException">
20554 with error type NotFoundError, if there is no contact
20555 with the given identifier.
20558 with error type TypeMismatchError, if any input parameter
20559 is not compatible with the expected type for that parameter.
20562 with error type InvalidValuesError, if any of the input
20563 parameters contain an invalid value.
20566 with error type SecurityError, if the application does not have the privilege to call this method.
20569 with error type NotSupportedError, if the feature
20573 with error type UnknownError in any other error case.
20579 <Operation name="add" id="::Contact::AddressBook::add">
20580 <webidl> void add(<ref>Contact</ref> contact) raises(<ref>WebAPIException</ref>);</webidl>
20583 Adds a contact to the address book synchronously.
20587 If the contact is successfully inserted in the addressbook, the Contact object
20588 will have its identifier (id attribute) set when the function returns.
20589 This operation is done successfully, new person object is also generated automatically.
20592 If you wish to update an
20593 existing contact, call the update() method instead. If you wish to add a copy
20594 of an existing Contact object, call Contact.clone() method first and pass the
20595 clone to the add() method.
20598 The contact shall be added to default address book if the address book
20599 is the unified address book.
20609 http://tizen.org/privilege/contact.write
20611 <Code> var addressbook;
20613 // Get default address book
20614 addressbook = tizen.contact.getDefaultAddressBook();
20617 var contact = new tizen.Contact({name: new tizen.ContactName({firstName:'Jeffrey',
20619 nicknames:['joey ramone']}),
20620 emails:[new tizen.ContactEmailAddress('user@domain.com')],
20621 phoneNumbers:[new tizen.ContactPhoneNumber('123456789')]});
20622 addressbook.add(contact);
20623 console.log('Contact added with id ' + contact.id);
20625 console.log( 'The following error occurred while adding: ' + err.name);
20629 <Type type="void"/>
20631 <Argument name="contact">
20634 A contact to be added.
20637 <Type name="Contact"/>
20641 <RaiseException name="WebAPIException">
20644 with error type TypeMismatchError, if any input parameter
20645 is not compatible with the expected type for that parameter.
20648 with error type InvalidValuesError, if any input parameter
20649 contains invalid values.
20652 with error type SecurityError, if the application does not have the privilege to call this method.
20655 with error type NotSupportedError, if the feature
20659 with error type UnknownError, if any other error occurs while trying to insert the contact.
20665 <Operation name="addBatch" id="::Contact::AddressBook::addBatch">
20666 <webidl> void addBatch(<ref>Contact</ref>[] contacts,
20667 optional <ref>ContactArraySuccessCallback</ref>? successCallback,
20668 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
20671 Adds several contacts to the address book asynchronously.
20675 If all the contacts are successfully added to the address book,
20676 the success callback will be invoked, passing the list of Contact objects
20677 that were added, with their identifier set (id attribute).
20680 The <em>errorCallback()</em> is launched with these error types:
20684 InvalidValuesError - If any of the input parameters contain an invalid value, the contact has any invalid value or the address book has some restrictions (such as, limitations in the size of text attributes) because of which the contact items were not added. </li>
20686 UnknownError - If any other error occurs, while trying to add the contacts. </li>
20689 If you wish to update an
20690 existing contact, call the update() method instead. If you wish to add a copy
20691 of an existing Contact object, call Contact.clone() method first and pass the
20692 clone to the add() method.
20695 If any of the contacts cannot be added, the error callback
20696 function that was passed in the invocation will be called.
20699 The contacts shall be added to local phone address book if the address book
20700 is the default address book.
20710 http://tizen.org/privilege/contact.write
20712 <Code> var addressbook;
20714 // Define the error callback
20715 function errorCB(err) {
20716 console.log( 'The following error occurred: ' + err.name);
20719 // Define the add contact success callback
20720 function contactsAddedCB(contacts) {
20721 console.log( contacts.length + ' contact(s) were successfully added to an Address Book' );
20724 // Get default address book
20725 addressbook = tizen.contact.getDefaultAddressBook();
20727 var c1 = new tizen.Contact({name: new tizen.ContactName({firstName:'Jeffrey',
20729 nicknames:['joey ramone']}),
20730 emails:[new tizen.ContactEmailAddress('user1@domain.com')],
20731 phoneNumbers:[new tizen.ContactPhoneNumber('123456789')]});
20733 var c2 = new tizen.Contact({name: new tizen.ContactName({firstName:'Elton',
20735 nicknames:['El']}),
20736 emails:[new tizen.ContactEmailAddress('user2@domain.com')],
20737 phoneNumbers:[new tizen.ContactPhoneNumber('987654321')]});
20740 addressbook.addBatch([c1, c2], contactsAddedCB, errorCB);
20742 console.log( 'The following error occurred while adding: ' + err.name);
20746 <Type type="void"/>
20748 <Argument name="contacts">
20751 A list of contacts to add.
20754 <Type type="array">
20755 <Type name="Contact"/>
20758 <Argument optional="optional" name="successCallback">
20761 The method to call when the invocation ends successfully.
20764 <Type name="ContactArraySuccessCallback" nullable="nullable"/>
20766 <Argument optional="optional" name="errorCallback">
20769 The method to call when the request fails.
20772 <Type name="ErrorCallback" nullable="nullable"/>
20776 <RaiseException name="WebAPIException">
20779 with error type TypeMismatchError, if the input parameter
20780 is not compatible with the expected type for that parameter.
20783 with error type SecurityError, if the application does not have the privilege to call this method.
20786 with error type NotSupportedError, if this feature is not supported.
20792 <Operation name="update" id="::Contact::AddressBook::update">
20793 <webidl> void update(<ref>Contact</ref> contact) raises(<ref>WebAPIException</ref>);</webidl>
20796 Updates a contact in the address book synchronously.
20805 http://tizen.org/privilege/contact.write
20807 <Code> var addressbook;
20809 // Define the error callback
20810 function errorCB(err) {
20811 console.log( 'The following error occurred: ' + err.name);
20814 function contactsFoundCB(contacts) {
20815 // The contact has been successfully found
20816 // Let's try to change the first name
20817 contacts[0].name.firstName = 'Christopher';
20819 addressbook.update(contacts[0]);
20820 console.log('First contact was updated');
20822 console.log( 'The following error occurred while updating: ' + err.name);
20826 // Get default address book.
20827 addressbook = tizen.contact.getDefaultAddressBook();
20829 var filter = new tizen.AttributeFilter('name.firstName', 'CONTAINS', 'Chris');
20831 addressbook.find(contactsFoundCB, errorCB, filter);
20833 console.log( 'The following error occurred while finding: ' + err.name);
20837 <Type type="void"/>
20839 <Argument name="contact">
20842 A contact object to update.
20845 <Type name="Contact"/>
20849 <RaiseException name="WebAPIException">
20852 with error type NotFoundError, if the identifier does not match.
20855 with error type TypeMismatchError, if any input parameter
20856 is not compatible with the expected type for that parameter.
20859 with error type InvalidValuesError, if any input parameter
20860 contains invalid values.
20863 with error type SecurityError, if the application does not have the privilege to call this method.
20866 with error type NotSupportedError, if the feature
20870 with error type UnknownError, if the contact could not be updated
20871 to an unknown error.
20877 <Operation name="updateBatch" id="::Contact::AddressBook::updateBatch">
20878 <webidl> void updateBatch(<ref>Contact</ref>[] contacts,
20879 optional <ref>SuccessCallback</ref>? successCallback,
20880 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
20883 Updates several existing contacts in the address book asynchronously.
20887 The <em>errorCallback()</em> is launched with these error types:
20891 NotFoundError - If an identifier in the IDs parameter does not correspond to the <em>id </em>attribute of any contact in the address book. </li>
20893 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
20895 UnknownError - If any other error occurs, while trying to add the contacts. </li>
20898 If any of the contacts could not be updated, the error callback
20899 function that was passed in the invocation will be called.
20909 http://tizen.org/privilege/contact.write
20911 <Code> var addressbook;
20913 // Define the error callback for all the asynchronous calls
20914 function errorCB(err) {
20915 console.log('The following error occurred: ' + err.name);
20918 function contactsUpdatedCB() {
20919 console.log('Contacts were updated');
20922 function contactsFoundCB(contacts) {
20923 // The contact has been successfully found
20924 for(var i = 0; i < contacts.length; i++) {
20925 contacts[i].name.firstName = 'Christopher';
20928 addressbook.updateBatch(contacts, contactsUpdatedCB, errorCB);
20930 console.log('The following error occurred while updating: ' + err.name);
20934 // Get default address book.
20935 addressbook = tizen.contact.getDefaultAddressBook();
20937 var filter = new tizen.AttributeFilter('name.firstName', 'CONTAINS', 'Chris');
20939 addressbook.find(contactsFoundCB, errorCB, filter);
20941 console.log('The following error occurred while finding: ' + err.name);
20945 <Type type="void"/>
20947 <Argument name="contacts">
20950 A list of contact objects to be saved in the terminal storage.
20953 <Type type="array">
20954 <Type name="Contact"/>
20957 <Argument optional="optional" name="successCallback">
20960 The method to call when the invocation ends successfully.
20963 <Type name="SuccessCallback" nullable="nullable"/>
20965 <Argument optional="optional" name="errorCallback">
20968 The method to call when the request to update contacts fails.
20971 <Type name="ErrorCallback" nullable="nullable"/>
20975 <RaiseException name="WebAPIException">
20978 with error type TypeMismatchError, if the input parameter
20979 is not compatible with the expected type for that parameter.
20982 with error type SecurityError, if the application does not have the privilege to call this method.
20985 with error type NotSupportedError, if this feature is not supported.
20991 <Operation name="remove" id="::Contact::AddressBook::remove">
20992 <webidl> void remove(<ref>ContactId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
20995 Removes a contact from the address book synchronously.
20999 Removes the contact in the address book that corresponds to the specified
21000 identifier. This function will throw an exception if it failed to
21001 remove the specified contact.
21011 http://tizen.org/privilege/contact.write
21013 <Code> var addressbook;
21015 // Define the error callback
21016 function errorCB(err) {
21017 console.log('The following error occurred: ' + err.name);
21020 function contactsFoundCB(contacts) {
21021 // The contact has been successfully found
21022 if(contacts.length > 0) {
21024 addressbook.remove(contacts[0].id);
21025 console.log('First contact was removed');
21027 console.log('The following error occurred while removing: ' + err.name);
21030 console.log( 'No contacts.');
21034 // Get default address book.
21035 addressbook = tizen.contact.getDefaultAddressBook();
21037 var filter = new tizen.AttributeFilter('name.firstName', 'CONTAINS', 'Chris');
21039 addressbook.find(contactsFoundCB, errorCB, filter);
21041 console.log( 'The following error occurred while finding: ' + err.name);
21045 <Type type="void"/>
21047 <Argument name="id">
21050 An identifier (id attribute) of the contact object to delete.
21053 <Type name="ContactId"/>
21057 <RaiseException name="WebAPIException">
21060 with error type NotFoundError, if the identifier does not match
21061 any contact in the address book.
21064 with error type TypeMismatchError, if any input parameter
21065 is not compatible with the expected type for that parameter.
21068 with error type InvalidValuesError, if any input parameter
21069 contains invalid values.
21072 with error type SecurityError, if the application does not have the privilege to call this method.
21075 with error type NotSupportedError, if the feature
21079 with error type UnknownError, if the contact could not be removed
21080 to an unknown error.
21086 <Operation name="removeBatch" id="::Contact::AddressBook::removeBatch">
21087 <webidl> void removeBatch(<ref>ContactId</ref>[] ids,
21088 optional <ref>SuccessCallback</ref>? successCallback,
21089 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
21092 Removes several contacts from the address book asynchronously.
21096 The <em>errorCallback()</em> is launched with these error types:
21100 NotFoundError - If an identifier in the IDs parameter does not correspond to the <em>id </em>attribute of any contact in the address book (Otherwise, the implementation will attempt to remove the contacts that correspond to these identifiers). </li>
21102 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
21104 UnknownError - If any other error occurs while trying to remove the contacts. </li>
21114 http://tizen.org/privilege/contact.write
21116 <Code> var addressbook;
21118 // Define the error callback
21119 function errorCB(err) {
21120 console.log( 'The following error occurred: ' + err.name);
21123 function contactsRemovedCB() {
21124 console.log('Contacts were removed');
21127 function contactsFoundCB(contacts) {
21128 // The contact has been successfully found
21129 if(contacts.length > 2) {
21131 addressbook.removeBatch([contacts[0].id, contacts[1].id], contactsRemovedCB, errorCB);
21133 console.log( 'The following error occurred while removing: ' + err.name);
21136 console.log( 'Not enough contacts.');
21140 // Get default address book.
21141 addressbook = tizen.contact.getDefaultAddressBook();
21143 var filter = new tizen.AttributeFilter('name.firstName', 'CONTAINS', 'Chris');
21145 addressbook.find(contactsFoundCB, errorCB, filter);
21147 console.log( 'The following error occurred while finding: ' + err.name);
21151 <Type type="void"/>
21153 <Argument name="ids">
21156 A list of identifiers (id attribute) for the contact objects to be deleted.
21159 <Type type="array">
21160 <Type name="ContactId"/>
21163 <Argument optional="optional" name="successCallback">
21166 The method to call when the invocation ends successfully.
21169 <Type name="SuccessCallback" nullable="nullable"/>
21171 <Argument optional="optional" name="errorCallback">
21174 The method to call when the request to delete contacts fails.
21177 <Type name="ErrorCallback" nullable="nullable"/>
21181 <RaiseException name="WebAPIException">
21184 with error type TypeMismatchError, if any input parameter
21185 is not compatible with the expected type for that parameter.
21188 with error type SecurityError, if the application does not have the privilege to call this method.
21191 with error type NotSupportedError, if the feature
21198 <Operation name="find" id="::Contact::AddressBook::find">
21199 <webidl> void find(<ref>ContactArraySuccessCallback</ref> successCallback,
21200 optional <ref>ErrorCallback</ref>? errorCallback,
21201 optional <ref>AbstractFilter</ref>? filter,
21202 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);</webidl>
21205 Finds an array of all Contact objects from the specified address book or an array of
21206 Contact objects that match the optionally supplied filter.
21210 If the filter is passed and contains valid values, only those values in the
21211 address book that match the filter criteria as specified in the AbstractFilter
21212 interface will be returned in the successCallback. If no filter is passed, the filter
21213 contains any invalid values, the filter is <var>null</var> or undefined, then
21214 the implementation MUST return the full list of contact items
21215 in the successCallback. If no contacts are available in the address book or no
21216 contact matches the filter criteria, the successCallback will be invoked
21217 with an empty array.
21220 The <em>errorCallback() </em>is launched with these error types:
21224 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
21226 UnknownError - If any other error occurs while trying to retrieve the contacts. </li>
21236 http://tizen.org/privilege/contact.read
21238 <Code> var addressbook;
21240 // Define the error callback.
21241 function errorCB(err) {
21242 console.log( 'The following error occurred: ' + err.name);
21245 // Define the contact search success callback.
21246 function contactsFoundCB(contacts) {
21247 console.log(contacts.length + ' results found.');
21250 // Get default address book
21251 addressbook = tizen.contact.getDefaultAddressBook();
21253 // Find all contacts in the address book that have "Ramone" in the nick name.
21254 var filter = new tizen.AttributeFilter('name.nicknames', 'CONTAINS', 'Ramone');
21256 // The contacts returned by the find() query will be sorted by
21257 // ascending last name.
21258 var sortingMode = new tizen.SortMode('name.lastName', 'ASC');
21260 addressbook.find(contactsFoundCB, errorCB,
21261 filter, sortingModes);
21263 console.log( 'The following error occurred while finding: ' + err.name);
21267 <Type type="void"/>
21269 <Argument name="successCallback">
21272 The method to call when the invocation ends successfully.
21275 <Type name="ContactArraySuccessCallback"/>
21277 <Argument optional="optional" name="errorCallback">
21280 The method to call when an error occurs.
21283 <Type name="ErrorCallback" nullable="nullable"/>
21285 <Argument optional="optional" name="filter">
21288 A filter used to select which contacts are returned.
21291 <Type name="AbstractFilter" nullable="nullable"/>
21293 <Argument optional="optional" name="sortMode">
21296 A variable to determine the sort order in which the contacts are returned.
21299 <Type name="SortMode" nullable="nullable"/>
21303 <RaiseException name="WebAPIException">
21306 with error type TypeMismatchError, if any input parameter
21307 is not compatible with the expected type for that parameter.
21310 with error type SecurityError, if the application does not have the privilege to call this method.
21313 with error type NotSupportedError, if the feature
21320 <Operation name="addChangeListener" id="::Contact::AddressBook::addChangeListener">
21321 <webidl> long addChangeListener(<ref>AddressBookChangeCallback</ref> successCallback,
21322 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
21325 Subscribes to receive notifications about address book changes.
21329 When executed, the implementation must immediately return a subscription identifier that identifies
21330 the watch operation. After returning the identifier, the watch operation is started
21341 http://tizen.org/privilege/contact.read
21343 <Code> var watcherId = 0; // watcher identifier
21344 var addressbook; // This example assumes addressbook is initialized
21347 oncontactsadded: function(contacts) {
21348 console.log(contacts.length + ' contacts were added');
21350 oncontactsupdated: function(contacts) {
21351 console.log(contacts.length + ' contacts were updated');
21353 oncontactsremoved: function(ids) {
21354 console.log(ids.length + ' contacts were deleted');
21358 // Registers to be notified when the address book changes
21359 watcherId = addressbook.addChangeListener(watcher);
21365 long An identifier used to clear the watch subscription.
21370 <Argument name="successCallback">
21373 The method to call when different types of address book change notifications are received.
21376 <Type name="AddressBookChangeCallback"/>
21378 <Argument optional="optional" name="errorCallback">
21381 The method to call if address book changes cannot be watched.
21384 <Type name="ErrorCallback" nullable="nullable"/>
21388 <RaiseException name="WebAPIException">
21391 with error type TypeMismatchError, if any input parameter
21392 is not compatible with the expected type for that parameter.
21395 with error type InvalidValuesError, if any of the input parameters
21396 contain an invalid value.
21399 with error type SecurityError, if the application does not have the privilege to call this method.
21402 with error type NotSupportedError, if the feature
21406 with error type UnknownError in any other case.
21412 <Operation name="removeChangeListener" id="::Contact::AddressBook::removeChangeListener">
21413 <webidl> void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);</webidl>
21416 Unsubscribes an address book changes watch operation.
21420 If the watchId argument is valid and corresponds to a subscription already in
21421 place, the watch process MUST immediately stop and no further callbacks MUST be
21422 invoked. If the watchId argument is not valid or does not correspond to a
21423 valid subscription, the method should return without any further action.
21433 http://tizen.org/privilege/contact.read
21435 <Code> var watcherId = 0; // watcher identifier
21436 var addressbook; // This example assumes addressbook is initialized
21438 // Receives address book changes
21440 oncontactsadded: function(contacts) {
21441 console.log(contacts.length + ' contacts were added');
21443 oncontactsupdated: function(contacts) {
21444 console.log(contacts.length + ' contacts were updated');
21446 oncontactsremoved: function(ids) {
21447 console.log(ids.length + ' contacts were removed');
21451 // Cancel the watch operation
21452 function cancelWatch() {
21453 addressbook.removeChangeListener(watcherId);
21456 // registers to be notified when the address book changes
21457 watcherId = addressbook.addChangeListener(watcher);
21460 <Type type="void"/>
21462 <Argument name="watchId">
21465 A subscription identifier.
21468 <Type type="long"/>
21472 <RaiseException name="WebAPIException">
21475 with error type TypeMismatchError, if any input parameter
21476 is not compatible with the expected type for that parameter.
21479 with error type InvalidValuesError, if any of the input
21480 parameters contain an invalid value.
21483 with error type NotFoundError, if there is no listener
21484 with the given identifier.
21487 with error type SecurityError, if the application does not have the privilege to call this method.
21490 with error type NotSupportedError, if the feature
21494 with error type UnknownError in any other error case.
21500 <Operation name="getGroup" id="::Contact::AddressBook::getGroup">
21501 <webidl> <ref>ContactGroup</ref> getGroup(<ref>ContactGroupId</ref> groupId) raises(<ref>WebAPIException</ref>);</webidl>
21504 Gets the group with the specified identifier.
21508 If the operation completes successfully, it must return the
21509 group with the given identifier.
21519 http://tizen.org/privilege/contact.read
21522 // Retrieves the Person corresponding to a Contact.
21523 var addressBook = tizen.contact.getAddressBook(contactRef.addressBookId);
21524 var contact = addressBook.get(contactRef.contactId);
21525 var group = addressBook.getGroup(contact.groupIds[0].id);
21526 console.log("Successfully resolved group with id: " + contact.groupIds[0].id);
21528 console.log("Error: " + err.name);
21532 <Type name="ContactGroup">
21535 ContactGroup The matching ContactGroup object.
21540 <Argument name="groupId">
21543 A group identifier.
21546 <Type name="ContactGroupId"/>
21550 <RaiseException name="WebAPIException">
21553 with error type NotFoundError, if there is no contact
21554 with the given identifier.
21557 with error type TypeMismatchError, if any input parameter
21558 is not compatible with the expected type for that parameter.
21561 with error type InvalidValuesError, if any of the input
21562 parameters contain an invalid value.
21565 with error type SecurityError, if the application does not have the privilege to call this method.
21568 with error type NotSupportedError, if the feature
21572 with error type UnknownError in any other error case.
21578 <Operation name="addGroup" id="::Contact::AddressBook::addGroup">
21579 <webidl> void addGroup(<ref>ContactGroup</ref> group) raises(<ref>WebAPIException</ref>);</webidl>
21582 Adds a group to the address book.
21586 If the group is successfully inserted in the addressbook, the Group object
21587 will have its identifier (id attribute) set when the function returns.
21590 The group shall be added to local phone address book if the address book
21591 is the default address book.
21601 http://tizen.org/privilege/contact.write
21603 <Code> var addressbook;
21605 // Get address book
21606 var addressbooks = tizen.contact.getAddressBooks();
21607 addressbook = addressbooks[0];
21610 var group = new tizen.ContactGroup('Company');
21611 addressbook.addGroup(group);
21612 console.log('Group added with id ' + group.id);
21614 console.log( 'The following error occurred while adding: ' + err.name);
21618 <Type type="void"/>
21620 <Argument name="group">
21623 A ContactGroup object to be added.
21626 <Type name="ContactGroup"/>
21630 <RaiseException name="WebAPIException">
21633 with error type TypeMismatchError, if any input parameter
21634 is not compatible with the expected type for that parameter.
21637 with error type InvalidValuesError, if any input parameter
21638 contains invalid values.
21641 with error type SecurityError, if the application does not have the privilege to call this method.
21644 with error type NotSupportedError, if the feature
21648 with error type UnknownError, if any other error occurs while trying to insert the contact.
21654 <Operation name="updateGroup" id="::Contact::AddressBook::updateGroup">
21655 <webidl> void updateGroup(<ref>ContactGroup</ref> group) raises(<ref>WebAPIException</ref>);</webidl>
21658 Updates a group in the address book.
21667 http://tizen.org/privilege/contact.write
21669 <Code> var addressbook;
21671 // Get address book.
21672 var addressbooks = tizen.contact.getAddressBooks();
21673 addressbook = addressbooks[0];
21676 groups = addressbook.getGroups();
21677 groups[0].name = 'Friends';
21678 addressbook.updateGroup(groups[0]);
21679 console.log('First group was updated');
21681 console.log( 'The following error occurred while adding: ' + err.name);
21685 <Type type="void"/>
21687 <Argument name="group">
21690 A ContactGroup object to be updated.
21693 <Type name="ContactGroup"/>
21697 <RaiseException name="WebAPIException">
21700 with error type TypeMismatchError, if any input parameter
21701 is not compatible with the expected type for that parameter.
21704 with error type InvalidValuesError, if any input parameter
21705 contains invalid values.
21708 with error type SecurityError, if the application does not have the privilege to call this method.
21711 with error type NotSupportedError, if the feature
21715 with error type UnknownError, if the group could not be updated
21716 to an unknown error.
21722 <Operation name="removeGroup" id="::Contact::AddressBook::removeGroup">
21723 <webidl> void removeGroup(<ref>ContactGroupId</ref> groupId) raises(<ref>WebAPIException</ref>);</webidl>
21726 Removes a group from the address book.
21730 Removes the group in the address book that corresponds to the specified identifier. This method will throw an exception if it failed to remove the specified group.
21740 http://tizen.org/privilege/contact.write
21742 <Code> var addressbook;
21744 // Get default address book.
21745 var addressbooks = tizen.contact.getAddressBooks();
21746 addressbook = addressbooks[0];
21749 groups = addressbook.getGroups();
21750 addressbook.removeGroup(groups[0].id);
21751 console.log('First group was removed');
21753 console.log( 'The following error occurred while finding: ' + err.name);
21757 <Type type="void"/>
21759 <Argument name="groupId">
21762 An identifier (id attribute) of the ContactGroup object to be deleted.
21765 <Type name="ContactGroupId"/>
21769 <RaiseException name="WebAPIException">
21772 with error type NotFoundError, if the identifier does not match
21773 any contact in the address book.
21776 with error type TypeMismatchError, if any input parameter
21777 is not compatible with the expected type for that parameter.
21780 with error type InvalidValuesError, if any input parameter
21781 contains invalid values.
21784 with error type SecurityError, if the application does not have the privilege to call this method.
21787 with error type NotSupportedError, if the feature
21791 with error type UnknownError, if the group could not be removed
21792 to an unknown error.
21798 <Operation name="getGroups" id="::Contact::AddressBook::getGroups">
21799 <webidl> <ref>ContactGroup</ref>[] getGroups() raises(<ref>WebAPIException</ref>);</webidl>
21802 Gets an array of all ContactGroup objects from the specified address book.
21811 http://tizen.org/privilege/contact.read
21813 <Code> var addressbook;
21815 // Get default address book.
21816 var addressbooks = tizen.contact.getAddressBooks();
21817 addressbook = addressbooks[0];
21820 groups = addressbook.getGroups();
21821 console.log('Number of groups is ' + groups.length);
21823 console.log( 'The following error occurred while finding: ' + err.name);
21827 <Type type="array">
21830 ContactGroup[] The array of ContactGroup object from this address book.
21833 <Type name="ContactGroup"/>
21837 <RaiseException name="WebAPIException">
21840 with error type NotFoundError, if the identifier does not match
21841 any contact in the address book.
21844 with error type TypeMismatchError, if any input parameter
21845 is not compatible with the expected type for that parameter.
21848 with error type InvalidValuesError, if any input parameter
21849 contains invalid values.
21852 with error type SecurityError, if the application does not have the privilege to call this method.
21855 with error type NotSupportedError, if the feature
21859 with error type UnknownError, if the group could not be retrieved due
21860 to an unknown error.
21867 <Interface name="Person" id="::Contact::Person">
21868 <webidl> [NoInterfaceObject] interface Person {
21869 readonly attribute <ref>PersonId</ref> id;
21871 readonly attribute DOMString displayName;
21873 readonly attribute long contactCount;
21875 readonly attribute boolean hasPhoneNumber;
21877 readonly attribute boolean hasEmail;
21879 attribute boolean isFavorite;
21881 attribute DOMString? photoURI;
21883 attribute DOMString? ringtoneURI;
21885 attribute <ref>ContactId</ref> displayContactId;
21887 void link(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);
21889 <ref>Person</ref> unlink(<ref>ContactId</ref> contactId) raises(<ref>WebAPIException</ref>);
21899 <ExtendedAttributeList>
21900 <ExtendedAttribute name="NoInterfaceObject">
21901 <webidl>NoInterfaceObject</webidl>
21902 </ExtendedAttribute>
21903 </ExtendedAttributeList>
21904 <Attribute readonly="readonly" name="id" id="::Contact::Person::id">
21905 <webidl> readonly attribute <ref>PersonId</ref> id;</webidl>
21908 The identifier of the person.
21914 <Type name="PersonId"/>
21916 <Attribute readonly="readonly" name="displayName" id="::Contact::Person::displayName">
21917 <webidl> readonly attribute DOMString displayName;</webidl>
21920 An attribute to identify a person by storing the display name in a string.
21921 It is selected from the contacts' display names.
21927 <Type type="DOMString"/>
21929 <Attribute readonly="readonly" name="contactCount" id="::Contact::Person::contactCount">
21930 <webidl> readonly attribute long contactCount;</webidl>
21933 An attribute to count the number of the contacts that belong to a person.
21939 <Type type="long"/>
21941 <Attribute readonly="readonly" name="hasPhoneNumber" id="::Contact::Person::hasPhoneNumber">
21942 <webidl> readonly attribute boolean hasPhoneNumber;</webidl>
21945 An attribute to indicate if a person has a phone number.
21951 <Type type="boolean"/>
21953 <Attribute readonly="readonly" name="hasEmail" id="::Contact::Person::hasEmail">
21954 <webidl> readonly attribute boolean hasEmail;</webidl>
21957 An attribute to indicate if the person has an email addresses.
21963 <Type type="boolean"/>
21965 <Attribute name="isFavorite" id="::Contact::Person::isFavorite">
21966 <webidl> attribute boolean isFavorite;</webidl>
21969 An attribute to indicate whether the contact is a favorite or not.
21973 Indicates if the person was marked as <em>Favorite</em> or not.
21976 By default, this attribute is set to <var>false</var>.
21983 <Type type="boolean"/>
21985 <Attribute name="photoURI" id="::Contact::Person::photoURI">
21986 <webidl> attribute DOMString? photoURI;</webidl>
21989 The URI of a picture of a person.
21993 This attribute is used to store a URI that points to an image that can represent the
21994 person object. This attribute only contains a local file URI.
21995 Person's photoURI is bounded to linked contacts' valid photoURI.
21996 It means that if photoURI is existed, it can't become <var>null</var> and except linked contact's photoURI, any file can't be set as photoURI
21999 By default, this attribute is set to <var>null</var>.
22006 <Type type="DOMString" nullable="nullable"/>
22008 <Attribute name="ringtoneURI" id="::Contact::Person::ringtoneURI">
22009 <webidl> attribute DOMString? ringtoneURI;</webidl>
22012 An attribute to specify and store the URI of a custom ringtone for a contact.
22016 By default, this attribute is initialized to <var>null</var>.
22017 This attribute only contains a local file URI.
22024 <Type type="DOMString" nullable="nullable"/>
22026 <Attribute name="displayContactId" id="::Contact::Person::displayContactId">
22027 <webidl> attribute <ref>ContactId</ref> displayContactId;</webidl>
22030 The ID of a contact that represents information of the person.
22034 The contact, this value is indicating, is used to show detailed information of the person.
22041 <Type name="ContactId"/>
22043 <Operation name="link" id="::Contact::Person::link">
22044 <webidl> void link(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);</webidl>
22047 Aggregates another person to this person.
22051 Person is a meta object which aggregates contacts and to make a person, user should combine related contacts.
22052 For this operation, link method is provided.
22053 If "Person A" is linked to "Person B", contacts related to "Person A" are aggregated to "Person B".
22054 After this function returns, the target "Person A" is removed from DB.
22064 http://tizen.org/privilege/contact.write
22066 <Code> // Define the error callback for all the asynchronous calls
22067 function errorCB(err) {
22068 console.log( 'The following error occurred: ' + err.name);
22071 function personsFoundCB(persons) {
22072 // The persons has been successfully found
22074 persons[0].link(persons[1].id);
22075 console.log('Second person was merged to the first person.');
22077 console.log( 'The following error occurred while updating: ' + err.name);
22082 tizen.contact.find(personsFoundCB, errorCB);
22084 console.log( 'The following error occurred while adding: ' + err.name);
22088 <Type type="void"/>
22090 <Argument name="personId">
22093 The ID of person to be merged.
22096 <Type name="PersonId"/>
22100 <RaiseException name="WebAPIException">
22103 with error type TypeMismatchError, if any input parameter
22104 is not compatible with the expected type for that parameter.
22107 with error type InvalidValuesError, if any input parameter
22108 contains invalid values.
22111 with error type SecurityError, if the application does not have the privilege to call this method.
22114 with error type NotSupportedError, if the feature
22118 with error type UnknownError, if any other error occurs while trying to insert the contact.
22124 <Operation name="unlink" id="::Contact::Person::unlink">
22125 <webidl> <ref>Person</ref> unlink(<ref>ContactId</ref> contactId) raises(<ref>WebAPIException</ref>);</webidl>
22128 Separates a contact from this person.
22132 Person is aggregated contacts and if a user wants to detach one contact from person, unlink method is provided.
22133 Unlink is basically detaching a contact object from linked contacts so only a contact Id linked to the person can be used as the input parameter.
22134 This function returns a newly created Person object that indicates the separated contact.
22144 http://tizen.org/privilege/contact.write
22146 <Code> var myPersonId = '1'; //ID of modified
22148 var addressbook; // Default addressbook
22149 var person; // Existing person obtained from addressbook
22150 var newPerson; // New person, which will be created during unlink
22152 // Define the error callback.
22153 function errorCB(err) {
22154 console.log( 'The following error occurred: ' + err.name);
22157 // Define the contact search success callback.
22158 function contactsFoundCB(contacts) {
22159 if (contacts.length > 1) {
22161 // unlink first contact
22162 newPerson = person.unlink(contacts[0].id);
22164 console.log( 'The following error occurred while unlink: ' + err.name);
22167 console.log( 'Not enough contacts ');
22173 person = tizen.contact.get(myPersonId);
22175 // Get default address book
22176 addressbook = tizen.contact.getDefaultAddressBook();
22178 // Find all contacts in the default address book that personId
22179 // is exactly myPersonId
22180 var filter = new tizen.AttributeFilter('personId', 'EXACTLY', myPersonId);
22182 addressbook.find(contactsFoundCB, errorCB, filter);
22184 console.log( 'The following error occurred while processing: ' + err.name);
22188 <Type name="Person"/>
22190 <Argument name="contactId">
22193 The ID of contact to unlink.
22196 <Type name="ContactId"/>
22200 <RaiseException name="WebAPIException">
22203 with error type TypeMismatchError, if any input parameter
22204 is not compatible with the expected type for that parameter.
22207 with error type InvalidValuesError, if any input parameter
22208 contains invalid values.
22211 with error type SecurityError, if the application does not have the privilege to call this method.
22214 with error type NotSupportedError, if the feature
22218 with error type UnknownError, if any other error occurs while trying to insert the contact.
22225 <Dictionary name="ContactInit" id="::Contact::ContactInit">
22226 <webidl> dictionary ContactInit {
22227 <ref>ContactName</ref> name;
22228 <ref>ContactAddress</ref>[] addresses;
22229 DOMString photoURI;
22230 <ref>ContactPhoneNumber</ref>[] phoneNumbers;
22231 <ref>ContactEmailAddress</ref>[] emails;
22233 <ref>ContactAnniversary</ref>[] anniversaries;
22234 <ref>ContactOrganization</ref>[] organizations;
22236 <ref>ContactWebSite</ref>[] urls;
22237 DOMString ringtoneURI;
22238 <ref>ContactGroupId</ref>[] groupIds;
22242 Provides a dictionary for specifying contact attributes upon contact creation.
22246 This dictionary is used to input parameters when contacts are created.
22253 <DictionaryMember name="name" id="::Contact::ContactInit::name">
22254 <webidl> <ref>ContactName</ref> name;</webidl>
22255 <Type name="ContactName"/>
22256 </DictionaryMember>
22257 <DictionaryMember name="addresses" id="::Contact::ContactInit::addresses">
22258 <webidl> <ref>ContactAddress</ref>[] addresses;</webidl>
22259 <Type type="array">
22260 <Type name="ContactAddress"/>
22262 </DictionaryMember>
22263 <DictionaryMember name="photoURI" id="::Contact::ContactInit::photoURI">
22264 <webidl> DOMString photoURI;</webidl>
22265 <Type type="DOMString"/>
22266 </DictionaryMember>
22267 <DictionaryMember name="phoneNumbers" id="::Contact::ContactInit::phoneNumbers">
22268 <webidl> <ref>ContactPhoneNumber</ref>[] phoneNumbers;</webidl>
22269 <Type type="array">
22270 <Type name="ContactPhoneNumber"/>
22272 </DictionaryMember>
22273 <DictionaryMember name="emails" id="::Contact::ContactInit::emails">
22274 <webidl> <ref>ContactEmailAddress</ref>[] emails;</webidl>
22275 <Type type="array">
22276 <Type name="ContactEmailAddress"/>
22278 </DictionaryMember>
22279 <DictionaryMember name="birthday" id="::Contact::ContactInit::birthday">
22280 <webidl> Date birthday;</webidl>
22281 <Type type="Date"/>
22282 </DictionaryMember>
22283 <DictionaryMember name="anniversaries" id="::Contact::ContactInit::anniversaries">
22284 <webidl> <ref>ContactAnniversary</ref>[] anniversaries;</webidl>
22285 <Type type="array">
22286 <Type name="ContactAnniversary"/>
22288 </DictionaryMember>
22289 <DictionaryMember name="organizations" id="::Contact::ContactInit::organizations">
22290 <webidl> <ref>ContactOrganization</ref>[] organizations;</webidl>
22291 <Type type="array">
22292 <Type name="ContactOrganization"/>
22294 </DictionaryMember>
22295 <DictionaryMember name="notes" id="::Contact::ContactInit::notes">
22296 <webidl> DOMString[] notes;</webidl>
22297 <Type type="array">
22298 <Type type="DOMString"/>
22300 </DictionaryMember>
22301 <DictionaryMember name="urls" id="::Contact::ContactInit::urls">
22302 <webidl> <ref>ContactWebSite</ref>[] urls;</webidl>
22303 <Type type="array">
22304 <Type name="ContactWebSite"/>
22306 </DictionaryMember>
22307 <DictionaryMember name="ringtoneURI" id="::Contact::ContactInit::ringtoneURI">
22308 <webidl> DOMString ringtoneURI;</webidl>
22309 <Type type="DOMString"/>
22310 </DictionaryMember>
22311 <DictionaryMember name="groupIds" id="::Contact::ContactInit::groupIds">
22312 <webidl> <ref>ContactGroupId</ref>[] groupIds;</webidl>
22313 <Type type="array">
22314 <Type name="ContactGroupId"/>
22316 </DictionaryMember>
22318 <Interface name="Contact" id="::Contact::Contact">
22319 <webidl> [Constructor(optional <ref>ContactInit</ref>? ContactInitDict),
22320 Constructor(DOMString stringRepresentation)]
22321 interface Contact {
22322 readonly attribute <ref>ContactId</ref>? id;
22324 readonly attribute <ref>PersonId</ref>? personId;
22326 readonly attribute <ref>AddressBookId</ref>? addressBookId;
22328 readonly attribute Date? lastUpdated;
22330 readonly attribute boolean isFavorite;
22332 attribute <ref>ContactName</ref>? name setraises(<ref>WebAPIException</ref>);
22334 attribute <ref>ContactAddress</ref>[] addresses setraises(<ref>WebAPIException</ref>);
22336 attribute DOMString? photoURI setraises(<ref>WebAPIException</ref>);
22338 attribute <ref>ContactPhoneNumber</ref>[] phoneNumbers setraises(<ref>WebAPIException</ref>);
22340 attribute <ref>ContactEmailAddress</ref>[] emails setraises(<ref>WebAPIException</ref>);
22342 attribute Date? birthday setraises(<ref>WebAPIException</ref>);
22344 attribute <ref>ContactAnniversary</ref>[] anniversaries setraises(<ref>WebAPIException</ref>);
22346 attribute <ref>ContactOrganization</ref>[] organizations setraises(<ref>WebAPIException</ref>);
22348 attribute DOMString[] notes setraises(<ref>WebAPIException</ref>);
22350 attribute <ref>ContactWebSite</ref>[] urls setraises(<ref>WebAPIException</ref>);
22352 attribute DOMString? ringtoneURI setraises(<ref>WebAPIException</ref>);
22354 attribute <ref>ContactGroupId</ref>[] groupIds setraises(<ref>WebAPIException</ref>);
22356 DOMString convertToString(optional <ref>ContactTextFormat</ref>? format) raises(<ref>WebAPIException</ref>);
22358 <ref>Contact</ref> clone() raises(<ref>WebAPIException</ref>);
22362 This interface is used to create a <em>Contact </em>object.
22367 <Code> // Get the default address book
22368 var addressbook = tizen.contact.getDefaultAddressBook();
22370 var contact = null;
22373 contact = new tizen.Contact(
22374 "BEGIN:VCARD\n"+
22375 "VERSION:3.0\n"+
22376 "N:Gump;Forrest\n"+
22377 "FN:Forrest Gump\n"+
22378 "ORG:Bubba Gump Shrimp Co.\n"+
22379 "TITLE:Shrimp Man\n"+
22380 "TEL;WORK:(111) 555-1212\n"+
22381 "TEL;HOME:(404) 555-1212\n"+
22382 "EMAIL;WORK;PREF:forrestgump@example.com\n"+
22383 "END:VCARD");
22385 console.log( 'The following error occurred while converting: ' + err.name);
22390 addressbook.add(contact);
22391 console.log('Contact was added with ID ' + contact.id);
22394 console.log( 'The following error occurred while adding: ' + err.name);
22398 <ExtendedAttributeList>
22399 <ExtendedAttribute name="Constructor">
22400 <webidl>Constructor(optional <ref>ContactInit</ref>? ContactInitDict)</webidl>
22402 <Argument optional="optional" name="ContactInitDict">
22403 <Type name="ContactInit" nullable="nullable"/>
22406 </ExtendedAttribute>
22407 <ExtendedAttribute name="Constructor">
22408 <webidl> Constructor(DOMString stringRepresentation)</webidl>
22410 <Argument name="stringRepresentation">
22411 <Type type="DOMString"/>
22414 </ExtendedAttribute>
22415 </ExtendedAttributeList>
22416 <Attribute readonly="readonly" name="id" id="::Contact::Contact::id">
22417 <webidl> readonly attribute <ref>ContactId</ref>? id;</webidl>
22420 An attribute to identify a raw contact.
22424 By default, this attribute is set to <var>null</var>.
22431 <Type name="ContactId" nullable="nullable"/>
22433 <Attribute readonly="readonly" name="personId" id="::Contact::Contact::personId">
22434 <webidl> readonly attribute <ref>PersonId</ref>? personId;</webidl>
22437 The identifier of the person corresponding to the raw contact.
22441 By default, this attribute is set to <var>null</var>.
22448 <Type name="PersonId" nullable="nullable"/>
22450 <Attribute readonly="readonly" name="addressBookId" id="::Contact::Contact::addressBookId">
22451 <webidl> readonly attribute <ref>AddressBookId</ref>? addressBookId;</webidl>
22454 The identifier of the address book that corresponds to the raw contact.
22455 By default, this attribute is set to <var>null</var>.
22461 <Type name="AddressBookId" nullable="nullable"/>
22463 <Attribute readonly="readonly" name="lastUpdated" id="::Contact::Contact::lastUpdated">
22464 <webidl> readonly attribute Date? lastUpdated;</webidl>
22467 The timestamp for the last update of a contact.
22471 Specifies revision information about the contact.
22474 By default, this attribute is set to <var>null</var>. Initially, once a contact is added to an address book, this value is the same as the creation date.
22475 For more details, see RFC 2426, Section 3.6.4.
22482 <Type type="Date" nullable="nullable"/>
22484 <Attribute readonly="readonly" name="isFavorite" id="::Contact::Contact::isFavorite">
22485 <webidl> readonly attribute boolean isFavorite;</webidl>
22488 An attribute to indicate whether a contact is favorite or not.
22492 This value is associated with the <em>isFavorite</em> attribute of Person that this contact indicates.
22495 By default, this attribute is set to <var>false</var>.
22501 <Code> if (contact.isFavorite) {
22506 <Type type="boolean"/>
22508 <Attribute name="name" id="::Contact::Contact::name">
22509 <webidl> attribute <ref>ContactName</ref>? name setraises(<ref>WebAPIException</ref>);</webidl>
22512 An attribute to store the name of a contact.
22518 <Type name="ContactName" nullable="nullable"/>
22520 <RaiseException name="WebAPIException"/>
22523 <Attribute name="addresses" id="::Contact::Contact::addresses">
22524 <webidl> attribute <ref>ContactAddress</ref>[] addresses setraises(<ref>WebAPIException</ref>);</webidl>
22527 The contact addresses.
22531 By default, this attribute is set to an empty array.
22537 <Code> var contactInit = {};
22538 var contactAddr = new tizen.ContactAddres({streetAddress:'Gran Via, 32',
22539 postalCode:'50013',
22542 contactInit.addresses = [contactAddr];
22545 <Type type="array">
22546 <Type name="ContactAddress"/>
22549 <RaiseException name="WebAPIException"/>
22552 <Attribute name="photoURI" id="::Contact::Contact::photoURI">
22553 <webidl> attribute DOMString? photoURI setraises(<ref>WebAPIException</ref>);</webidl>
22556 The URI to the picture of the contact.
22560 This attribute is used to store a URI that points to an image that can represent the
22561 contact object. This attribute only contains a local file URI.
22562 See RFC 2426, Section 3.1.4.
22565 By default, this attribute is set to <var>null</var>.
22571 <Code> var contactInit = {};
22572 contactInit.photoURI = 'file:///opt/media/Downloads/mypicture.jpg';
22575 <Type type="DOMString" nullable="nullable"/>
22577 <RaiseException name="WebAPIException"/>
22580 <Attribute name="phoneNumbers" id="::Contact::Contact::phoneNumbers">
22581 <webidl> attribute <ref>ContactPhoneNumber</ref>[] phoneNumbers setraises(<ref>WebAPIException</ref>);</webidl>
22584 The telephone numbers of the contact.
22588 By default, this attribute is set to empty array.
22594 <Code> var contactInit = {};
22595 var phoneNumber = new tizen.ContactPhoneNumber('123456789');
22596 contactInit.phoneNumbers = [phoneNumber];
22599 <Type type="array">
22600 <Type name="ContactPhoneNumber"/>
22603 <RaiseException name="WebAPIException"/>
22606 <Attribute name="emails" id="::Contact::Contact::emails">
22607 <webidl> attribute <ref>ContactEmailAddress</ref>[] emails setraises(<ref>WebAPIException</ref>);</webidl>
22610 The email addresses of the contact.
22614 By default, this attribute is set to empty array.
22620 <Code> var contactInit = {};
22621 var email = new tizen.ContactEmailAddress('deedee@ramones.com');
22622 contactInit.emails = [email];
22625 <Type type="array">
22626 <Type name="ContactEmailAddress"/>
22629 <RaiseException name="WebAPIException"/>
22632 <Attribute name="birthday" id="::Contact::Contact::birthday">
22633 <webidl> attribute Date? birthday setraises(<ref>WebAPIException</ref>);</webidl>
22636 The birthday of the contact.
22640 Defines specify the birthday of the contact (see RFC 2426 -
22644 By default, this attribute is set to <var>null</var>.
22650 <Code> var contactInit = {};
22651 contactInit.birthday = new Date(1996, 4, 15);
22654 <Type type="Date" nullable="nullable"/>
22656 <RaiseException name="WebAPIException"/>
22659 <Attribute name="anniversaries" id="::Contact::Contact::anniversaries">
22660 <webidl> attribute <ref>ContactAnniversary</ref>[] anniversaries setraises(<ref>WebAPIException</ref>);</webidl>
22663 The list of anniversaries for the contact.
22667 Defines specify arbitrary anniversaries for the contact (in addition to the birthday).
22670 By default, this attribute is set to empty array.
22676 <Code> var contactInit = {};
22677 var marriage_anniv = new tizen.ContactAnniversary(new Date(1976, 11, 2), 'Marriage');
22678 contactInit.anniversaries = [marriage_anniv];
22681 <Type type="array">
22682 <Type name="ContactAnniversary"/>
22685 <RaiseException name="WebAPIException"/>
22688 <Attribute name="organizations" id="::Contact::Contact::organizations">
22689 <webidl> attribute <ref>ContactOrganization</ref>[] organizations setraises(<ref>WebAPIException</ref>);</webidl>
22692 The organizations the contact belongs to.
22696 Contains information related to the contact's company or organization.
22699 For more details, see RFC 2426, Section 3.5.
22706 <Type type="array">
22707 <Type name="ContactOrganization"/>
22710 <RaiseException name="WebAPIException"/>
22713 <Attribute name="notes" id="::Contact::Contact::notes">
22714 <webidl> attribute DOMString[] notes setraises(<ref>WebAPIException</ref>);</webidl>
22717 The notes associated to the contact.
22721 To specify supplemental information or a comment related to the contact.
22724 For more details, see RFC 2426, Section 3.6.2.
22731 <Type type="array">
22732 <Type type="DOMString"/>
22735 <RaiseException name="WebAPIException"/>
22738 <Attribute name="urls" id="::Contact::Contact::urls">
22739 <webidl> attribute <ref>ContactWebSite</ref>[] urls setraises(<ref>WebAPIException</ref>);</webidl>
22742 The URLs associated to the contact.
22746 By default, this attribute is initialized to an empty array.
22749 In case multiple URLs are available, the first one is the default one.
22750 For more details, see RFC 2426, Section 3.6.8.
22757 <Type type="array">
22758 <Type name="ContactWebSite"/>
22761 <RaiseException name="WebAPIException"/>
22764 <Attribute name="ringtoneURI" id="::Contact::Contact::ringtoneURI">
22765 <webidl> attribute DOMString? ringtoneURI setraises(<ref>WebAPIException</ref>);</webidl>
22768 The URI to the custom ringtone for the contact.
22772 To specify a custom ringtone for the contact.
22775 By default, this attribute is initialized to <var>null</var>.
22776 This attribute only contains a local file URI scheme;
22777 For more details, see RFC 2426, Section 3.6.6.
22784 <Type type="DOMString" nullable="nullable"/>
22786 <RaiseException name="WebAPIException"/>
22789 <Attribute name="groupIds" id="::Contact::Contact::groupIds">
22790 <webidl> attribute <ref>ContactGroupId</ref>[] groupIds setraises(<ref>WebAPIException</ref>);</webidl>
22793 The groups the contact belongs to.
22797 To associate groups to the contact.
22800 By default, this attribute is initialized to an empty array.
22803 In a case where multiple categories are available, the first one is the default one.
22804 See RFC 2426, Section 3.6.1.
22811 <Type type="array">
22812 <Type name="ContactGroupId"/>
22815 <RaiseException name="WebAPIException"/>
22818 <Operation name="convertToString" id="::Contact::Contact::convertToString">
22819 <webidl> DOMString convertToString(optional <ref>ContactTextFormat</ref>? format) raises(<ref>WebAPIException</ref>);</webidl>
22822 Converts the Contact item to a string format.
22826 A textual representation for the contact will be generated and returned synchronously.
22827 The export format is set via the format parameter.
22833 <Code> var addressbook;
22835 // Define the error callback.
22836 function errorCB(err) {
22837 console.log( 'The following error occurred: ' + err.name);
22840 // Define the contact find success callback.
22841 function contactsFoundCB(contacts) {
22843 // Convert the first contact to vCard 3.0 format
22844 var vcard = contacts[0].convertToString("VCARD_30");
22845 console.log('textual representation of the contact is: ' + vcard);
22847 console.log( 'The following error occurred while converting: ' + err.name);
22851 // Get the default address book
22852 addressbook = tizen.contact.getDefaultAddressBook();
22854 // Find all contact in the address book whose first name contains the string 'Chris'.
22855 var filter = new tizen.AttributeFilter('firstName', 'CONTAINS', 'Chris');
22857 addressbook.find(contactsFoundCB, errorCB, filter);
22859 console.log( 'The following error occurred while finding: ' + err.name);
22863 <Type type="DOMString">
22866 DOMString The string representation of the Contact item.
22871 <Argument optional="optional" name="format">
22874 Format to use for export. If this value is <var>null</var> or empty, it converts to platform default format.
22877 <Type name="ContactTextFormat" nullable="nullable"/>
22881 <RaiseException name="WebAPIException">
22884 with error type TypeMismatchError, if any input parameter
22885 is not compatible with the expected type for that parameter.
22888 with error type SecurityError, if the functionality
22892 with error type NotSupportedError, if the feature
22896 with error type UnknownError in any other error case.
22902 <Operation name="clone" id="::Contact::Contact::clone">
22903 <webidl> <ref>Contact</ref> clone() raises(<ref>WebAPIException</ref>);</webidl>
22907 Creates a clone of the Contact object, detached from any address book.
22910 The Contact object returned by the <var>clone()</var> method will have its identifier
22911 set to <var>null</var> and will be detached from any address book.
22917 <Code> // Get default address book.
22918 var addressbook = tizen.contact.getDefaultAddressBook();
22920 var bob = new tizen.Contact();
22921 bob.name = new tizen.ContactName({firstName:'Bob',
22922 lastName:'Smith'});
22923 addressbook.add(bob);
22924 var alice = bob.clone();
22925 contact.name.firstName = "Alice"; // Bob's wife
22926 addressbook.add(alice);
22929 <Type name="Contact">
22932 Contact A new clone of the Contact object.
22938 <RaiseException name="WebAPIException">
22941 with error type SecurityError, if the functionality
22945 with error type NotSupportedError, if the feature
22949 with error type UnknownError in any other error case.
22956 <Interface name="ContactRef" id="::Contact::ContactRef">
22957 <webidl> [Constructor(<ref>AddressBookId</ref> addressBookId, <ref>ContactId</ref> contactId)]
22958 interface ContactRef {
22959 attribute <ref>AddressBookId</ref> addressBookId;
22961 attribute <ref>ContactId</ref> contactId;
22965 The fully-defined contact reference.
22969 It contains both the identifier of the address book which the contact is in, and
22970 the contact identifier within this address book.
22973 This interface is used by other APIs to uniquely and globally identify contacts.
22980 <ExtendedAttributeList>
22981 <ExtendedAttribute name="Constructor">
22982 <webidl>Constructor(<ref>AddressBookId</ref> addressBookId, <ref>ContactId</ref> contactId)</webidl>
22984 <Argument name="addressBookId">
22985 <Type name="AddressBookId"/>
22987 <Argument name="contactId">
22988 <Type name="ContactId"/>
22991 </ExtendedAttribute>
22992 </ExtendedAttributeList>
22993 <Attribute name="addressBookId" id="::Contact::ContactRef::addressBookId">
22994 <webidl> attribute <ref>AddressBookId</ref> addressBookId;</webidl>
22997 The address book identifier.
23003 <Type name="AddressBookId"/>
23005 <Attribute name="contactId" id="::Contact::ContactRef::contactId">
23006 <webidl> attribute <ref>ContactId</ref> contactId;</webidl>
23009 The contact identifier inside the address book.
23015 <Type name="ContactId"/>
23018 <Dictionary name="ContactNameInit" id="::Contact::ContactNameInit">
23019 <webidl> dictionary ContactNameInit {
23022 DOMString firstName;
23023 DOMString middleName;
23024 DOMString lastName;
23025 DOMString[] nicknames;
23026 DOMString phoneticFirstName;
23027 DOMString phoneticLastName;
23031 The properties of a ContactName, to pass to the ContactName constructor.
23035 See ContactName interface for more information about the members.
23042 <DictionaryMember name="prefix" id="::Contact::ContactNameInit::prefix">
23043 <webidl> DOMString prefix;</webidl>
23044 <Type type="DOMString"/>
23045 </DictionaryMember>
23046 <DictionaryMember name="suffix" id="::Contact::ContactNameInit::suffix">
23047 <webidl> DOMString suffix;</webidl>
23048 <Type type="DOMString"/>
23049 </DictionaryMember>
23050 <DictionaryMember name="firstName" id="::Contact::ContactNameInit::firstName">
23051 <webidl> DOMString firstName;</webidl>
23052 <Type type="DOMString"/>
23053 </DictionaryMember>
23054 <DictionaryMember name="middleName" id="::Contact::ContactNameInit::middleName">
23055 <webidl> DOMString middleName;</webidl>
23056 <Type type="DOMString"/>
23057 </DictionaryMember>
23058 <DictionaryMember name="lastName" id="::Contact::ContactNameInit::lastName">
23059 <webidl> DOMString lastName;</webidl>
23060 <Type type="DOMString"/>
23061 </DictionaryMember>
23062 <DictionaryMember name="nicknames" id="::Contact::ContactNameInit::nicknames">
23063 <webidl> DOMString[] nicknames;</webidl>
23064 <Type type="array">
23065 <Type type="DOMString"/>
23067 </DictionaryMember>
23068 <DictionaryMember name="phoneticFirstName" id="::Contact::ContactNameInit::phoneticFirstName">
23069 <webidl> DOMString phoneticFirstName;</webidl>
23070 <Type type="DOMString"/>
23071 </DictionaryMember>
23072 <DictionaryMember name="phoneticLastName" id="::Contact::ContactNameInit::phoneticLastName">
23073 <webidl> DOMString phoneticLastName;</webidl>
23074 <Type type="DOMString"/>
23075 </DictionaryMember>
23077 <Interface name="ContactName" id="::Contact::ContactName">
23078 <webidl> [Constructor(optional <ref>ContactNameInit</ref>? nameInitDict)]
23079 interface ContactName {
23080 attribute DOMString? prefix;
23082 attribute DOMString? suffix;
23084 attribute DOMString? firstName;
23086 attribute DOMString? middleName;
23088 attribute DOMString? lastName;
23090 attribute DOMString[] nicknames;
23092 attribute DOMString? phoneticFirstName;
23094 attribute DOMString? phoneticLastName;
23096 readonly attribute DOMString? displayName;
23100 This interface contains all information related to a contact name.
23106 <ExtendedAttributeList>
23107 <ExtendedAttribute name="Constructor">
23108 <webidl>Constructor(optional <ref>ContactNameInit</ref>? nameInitDict)</webidl>
23110 <Argument optional="optional" name="nameInitDict">
23111 <Type name="ContactNameInit" nullable="nullable"/>
23114 </ExtendedAttribute>
23115 </ExtendedAttributeList>
23116 <Attribute name="prefix" id="::Contact::ContactName::prefix">
23117 <webidl> attribute DOMString? prefix;</webidl>
23120 The name prefix of a contact.
23124 By default, this attribute is initialized to
23125 <var>null</var>. See also RFC 2426, Section 3.1.1.
23131 <Code> contact.name.prefix = "Dr.";
23134 <Type type="DOMString" nullable="nullable"/>
23136 <Attribute name="suffix" id="::Contact::ContactName::suffix">
23137 <webidl> attribute DOMString? suffix;</webidl>
23140 The name suffix of a contact.
23144 By default, this attribute is initialized to
23145 <var>null</var>. See also RFC 2426, Section 3.1.1.
23151 <Code> contact.name.suffix = "Jr.";
23154 <Type type="DOMString" nullable="nullable"/>
23156 <Attribute name="firstName" id="::Contact::ContactName::firstName">
23157 <webidl> attribute DOMString? firstName;</webidl>
23160 The first (given) name of a contact.
23164 By default, this attribute is initialized to
23165 <var>null</var>. See also RFC 2426, Section 3.1.1.
23171 <Code> contact.name.firstName = 'Douglas';
23174 <Type type="DOMString" nullable="nullable"/>
23176 <Attribute name="middleName" id="::Contact::ContactName::middleName">
23177 <webidl> attribute DOMString? middleName;</webidl>
23180 The middle name of a contact.
23184 By default, this attribute is initialized to
23185 <var>null</var>. See also RFC 2426, Section 3.1.1.
23191 <Code> contact.name.middleName = 'Glenn';
23194 <Type type="DOMString" nullable="nullable"/>
23196 <Attribute name="lastName" id="::Contact::ContactName::lastName">
23197 <webidl> attribute DOMString? lastName;</webidl>
23200 The last (family) name of a contact.
23204 By default, this attribute is initialized to
23205 <var>null</var>. See also RFC 2426, Section 3.1.1.
23211 <Code> contact.name.lastName = 'Colvin';
23214 <Type type="DOMString" nullable="nullable"/>
23216 <Attribute name="nicknames" id="::Contact::ContactName::nicknames">
23217 <webidl> attribute DOMString[] nicknames;</webidl>
23220 The nicknames of a contact.
23224 The nickname is a name used instead of, or in addition to, the given name of a contact,
23225 place, or thing. It can also be used to specify a familiar form of a proper name.
23228 By default, this attribute is initialized to an empty array.
23231 In case multiple nicknames are available the first one is the default.
23232 See RFC 2426, Section 3.1.3.
23238 <Code> contact.name.nickNames = ['Dee Dee'];
23241 <Type type="array">
23242 <Type type="DOMString"/>
23245 <Attribute name="phoneticFirstName" id="::Contact::ContactName::phoneticFirstName">
23246 <webidl> attribute DOMString? phoneticFirstName;</webidl>
23249 The phonetic first name of a contact.
23253 Describes how the first name should be
23254 pronounced. This is very important in
23255 some languages, such as Japanese, because the
23256 same 'Kanji' may have several pronunciations.
23259 By default, this attribute is set to <var>null</var>.
23266 <Type type="DOMString" nullable="nullable"/>
23268 <Attribute name="phoneticLastName" id="::Contact::ContactName::phoneticLastName">
23269 <webidl> attribute DOMString? phoneticLastName;</webidl>
23272 The phonetic last name of a contact.
23276 Describes how the last name should be
23277 pronounced. This is very important in
23278 some languages, such as Japanese, because the
23279 same 'Kanji' may have several pronunciations.
23282 By default, this attribute is set to <var>null</var>.
23289 <Type type="DOMString" nullable="nullable"/>
23291 <Attribute readonly="readonly" name="displayName" id="::Contact::ContactName::displayName">
23292 <webidl> readonly attribute DOMString? displayName;</webidl>
23295 The display name of a contact.
23299 The string which can be displayed to identify the contact. It is composed of the first
23300 and last names if available, otherwise, it will fall back to the most adequate
23301 field available to identify the contact (such as nickname).
23304 By default, this attribute is set to <var>null</var>. Initially, once a contact is added to an address book, this value is composed.
23311 <Type type="DOMString" nullable="nullable"/>
23314 <Dictionary name="ContactOrganizationInit" id="::Contact::ContactOrganizationInit">
23315 <webidl> dictionary ContactOrganizationInit {
23317 DOMString department;
23324 The properties of a ContactOrganization, to pass to the ContactOrganization constructor.
23328 See ContactOrganization interface for information about members.
23335 <DictionaryMember name="name" id="::Contact::ContactOrganizationInit::name">
23336 <webidl> DOMString name;</webidl>
23337 <Type type="DOMString"/>
23338 </DictionaryMember>
23339 <DictionaryMember name="department" id="::Contact::ContactOrganizationInit::department">
23340 <webidl> DOMString department;</webidl>
23341 <Type type="DOMString"/>
23342 </DictionaryMember>
23343 <DictionaryMember name="title" id="::Contact::ContactOrganizationInit::title">
23344 <webidl> DOMString title;</webidl>
23345 <Type type="DOMString"/>
23346 </DictionaryMember>
23347 <DictionaryMember name="role" id="::Contact::ContactOrganizationInit::role">
23348 <webidl> DOMString role;</webidl>
23349 <Type type="DOMString"/>
23350 </DictionaryMember>
23351 <DictionaryMember name="logoURI" id="::Contact::ContactOrganizationInit::logoURI">
23352 <webidl> DOMString logoURI;</webidl>
23353 <Type type="DOMString"/>
23354 </DictionaryMember>
23356 <Interface name="ContactOrganization" id="::Contact::ContactOrganization">
23357 <webidl> [Constructor(optional <ref>ContactOrganizationInit</ref>? orgInitDict)]
23358 interface ContactOrganization {
23359 attribute DOMString? name;
23361 attribute DOMString? department;
23363 attribute DOMString? title;
23365 attribute DOMString? role;
23367 attribute DOMString? logoURI;
23371 This interface contains the information about the organization or
23372 company that a contact belongs to.
23376 By default, each of the attributes of this interface are <var>null</var>.
23379 For more details, see RFC 2426, Section 3.5.
23385 <Code> var organization = new tizen.ContactOrganization({name: "Intel", role: "SW Engineer"});
23388 <ExtendedAttributeList>
23389 <ExtendedAttribute name="Constructor">
23390 <webidl>Constructor(optional <ref>ContactOrganizationInit</ref>? orgInitDict)</webidl>
23392 <Argument optional="optional" name="orgInitDict">
23393 <Type name="ContactOrganizationInit" nullable="nullable"/>
23396 </ExtendedAttribute>
23397 </ExtendedAttributeList>
23398 <Attribute name="name" id="::Contact::ContactOrganization::name">
23399 <webidl> attribute DOMString? name;</webidl>
23402 The name of an organization.
23406 For more details, see RFC 2426, Section 3.5.5.
23413 <Type type="DOMString" nullable="nullable"/>
23415 <Attribute name="department" id="::Contact::ContactOrganization::department">
23416 <webidl> attribute DOMString? department;</webidl>
23419 The organizational unit name.
23423 For more details, see RFC 2426, Section 3.5.5.
23430 <Type type="DOMString" nullable="nullable"/>
23432 <Attribute name="title" id="::Contact::ContactOrganization::title">
23433 <webidl> attribute DOMString? title;</webidl>
23440 To specify the job title, functional position or function (such as 'Director,
23441 Research and Development').
23444 For more details, see RFC 2426, Section 3.5.1.
23451 <Type type="DOMString" nullable="nullable"/>
23453 <Attribute name="role" id="::Contact::ContactOrganization::role">
23454 <webidl> attribute DOMString? role;</webidl>
23457 An attribute to store the role, occupation, or business category
23458 (such as 'Programmer').
23462 For more details, see RFC 2426, Section 3.5.2.
23469 <Type type="DOMString" nullable="nullable"/>
23471 <Attribute name="logoURI" id="::Contact::ContactOrganization::logoURI">
23472 <webidl> attribute DOMString? logoURI;</webidl>
23475 The URI to the logo of a company.
23479 To specify a graphic image of a logo associated with an organization.
23480 This attribute only contains file URI Scheme;
23481 remote pictures could be loaded to local with Download API.
23482 For more details, see RFC 2426, Section 3.5.3.
23489 <Type type="DOMString" nullable="nullable"/>
23492 <Interface name="ContactWebSite" id="::Contact::ContactWebSite">
23493 <webidl> [Constructor(DOMString url, optional DOMString type)]
23494 interface ContactWebSite
23496 attribute DOMString url;
23498 attribute DOMString type;
23502 The ContactWebSite object that contains the URL and the type of web site.
23506 For more details, see RFC 2426, Section 3.6.8.
23512 <Code> var contactInit = {}
23513 var blog = new tizen.ContactWebSite('http://www.domain.com', 'BLOG');
23514 contactInit.urls = [blog];
23517 <ExtendedAttributeList>
23518 <ExtendedAttribute name="Constructor">
23519 <webidl>Constructor(DOMString url, optional DOMString type)</webidl>
23521 <Argument name="url">
23522 <Type type="DOMString"/>
23524 <Argument optional="optional" name="type">
23525 <Type type="DOMString"/>
23528 </ExtendedAttribute>
23529 </ExtendedAttributeList>
23530 <Attribute name="url" id="::Contact::ContactWebSite::url">
23531 <webidl> attribute DOMString url;</webidl>
23534 The URL for the contact's web site.
23540 <Type type="DOMString"/>
23542 <Attribute name="type" id="::Contact::ContactWebSite::type">
23543 <webidl> attribute DOMString type;</webidl>
23546 The type of web site.
23550 At least the following values must be supported:
23554 HOMEPAGE - Indicates a home page. </li>
23556 BLOG - Indicates a blog. </li>
23559 By default, this attribute is set to HOMEPAGE.
23566 <Type type="DOMString"/>
23569 <Interface name="ContactAnniversary" id="::Contact::ContactAnniversary">
23570 <webidl> [Constructor(Date date, optional DOMString? label)]
23571 interface ContactAnniversary
23573 attribute Date date;
23575 attribute DOMString? label;
23579 This interface implements the <em>ContactAnniversary </em>object that contains the date and description of an anniversary.
23584 <Code> var contactInit = {}
23585 var marriage_anniv = new tizen.ContactAnniversary(new Date(1976, 11, 2), 'Marriage');
23586 contactInit.anniversaries = [marriage_anniv];
23589 <ExtendedAttributeList>
23590 <ExtendedAttribute name="Constructor">
23591 <webidl>Constructor(Date date, optional DOMString? label)</webidl>
23593 <Argument name="date">
23594 <Type type="Date"/>
23596 <Argument optional="optional" name="label">
23597 <Type type="DOMString" nullable="nullable"/>
23600 </ExtendedAttribute>
23601 </ExtendedAttributeList>
23602 <Attribute name="date" id="::Contact::ContactAnniversary::date">
23603 <webidl> attribute Date date;</webidl>
23606 The date of an anniversary.
23612 <Type type="Date"/>
23614 <Attribute name="label" id="::Contact::ContactAnniversary::label">
23615 <webidl> attribute DOMString? label;</webidl>
23618 The text describing an anniversary.
23622 By default, this attribute is set to <var>null</var>.
23629 <Type type="DOMString" nullable="nullable"/>
23632 <Dictionary name="ContactAddressInit" id="::Contact::ContactAddressInit">
23633 <webidl> dictionary ContactAddressInit
23638 DOMString streetAddress;
23639 DOMString additionalInformation;
23640 DOMString postalCode;
23646 The properties of a ContactAddress to pass to the ContactAddress constructor.
23650 See ContactAddress interface for more information about the members.
23657 <DictionaryMember name="country" id="::Contact::ContactAddressInit::country">
23658 <webidl> DOMString country;</webidl>
23659 <Type type="DOMString"/>
23660 </DictionaryMember>
23661 <DictionaryMember name="region" id="::Contact::ContactAddressInit::region">
23662 <webidl> DOMString region;</webidl>
23663 <Type type="DOMString"/>
23664 </DictionaryMember>
23665 <DictionaryMember name="city" id="::Contact::ContactAddressInit::city">
23666 <webidl> DOMString city;</webidl>
23667 <Type type="DOMString"/>
23668 </DictionaryMember>
23669 <DictionaryMember name="streetAddress" id="::Contact::ContactAddressInit::streetAddress">
23670 <webidl> DOMString streetAddress;</webidl>
23671 <Type type="DOMString"/>
23672 </DictionaryMember>
23673 <DictionaryMember name="additionalInformation" id="::Contact::ContactAddressInit::additionalInformation">
23674 <webidl> DOMString additionalInformation;</webidl>
23675 <Type type="DOMString"/>
23676 </DictionaryMember>
23677 <DictionaryMember name="postalCode" id="::Contact::ContactAddressInit::postalCode">
23678 <webidl> DOMString postalCode;</webidl>
23679 <Type type="DOMString"/>
23680 </DictionaryMember>
23681 <DictionaryMember name="isDefault" id="::Contact::ContactAddressInit::isDefault">
23682 <webidl> boolean isDefault;</webidl>
23683 <Type type="boolean"/>
23684 </DictionaryMember>
23685 <DictionaryMember name="types" id="::Contact::ContactAddressInit::types">
23686 <webidl> DOMString[] types;</webidl>
23687 <Type type="array">
23688 <Type type="DOMString"/>
23690 </DictionaryMember>
23692 <Interface name="ContactAddress" id="::Contact::ContactAddress">
23693 <webidl> [Constructor(optional <ref>ContactAddressInit</ref>? addressInitDict)]
23694 interface ContactAddress
23696 attribute DOMString? country;
23698 attribute DOMString? region;
23700 attribute DOMString? city;
23702 attribute DOMString? streetAddress;
23704 attribute DOMString? additionalInformation;
23706 attribute DOMString? postalCode;
23708 attribute boolean isDefault;
23710 attribute DOMString[] types;
23714 This interface contains a set of attributes that represent a particular point
23715 on the Earth's surface.
23719 Except isDefault and types attributes, each of the attributes of this interface are set to <var>null</var> by default.
23722 For more details, see RFC 2426, Section 3.2.1.
23728 <Code> var contactInit = {};
23729 var contactAddress = new tizen.ContactAddress({streetAddress:'Gran Via, 32',
23730 postalCode:'50013', city:'Zaragoza',
23731 country:'ES', types:['WORK']});
23732 contactInit.contactAddress = [contactAddress];
23735 <ExtendedAttributeList>
23736 <ExtendedAttribute name="Constructor">
23737 <webidl>Constructor(optional <ref>ContactAddressInit</ref>? addressInitDict)</webidl>
23739 <Argument optional="optional" name="addressInitDict">
23740 <Type name="ContactAddressInit" nullable="nullable"/>
23743 </ExtendedAttribute>
23744 </ExtendedAttributeList>
23745 <Attribute name="country" id="::Contact::ContactAddress::country">
23746 <webidl> attribute DOMString? country;</webidl>
23749 The country of the address.
23753 It is recommended that the country is specified
23754 using the two-letter [ISO 3166-1] code.
23761 <Type type="DOMString" nullable="nullable"/>
23763 <Attribute name="region" id="::Contact::ContactAddress::region">
23764 <webidl> attribute DOMString? region;</webidl>
23767 The name of a country subdivision.
23771 For example, State (United States) or Province (Spain).
23778 <Type type="DOMString" nullable="nullable"/>
23780 <Attribute name="city" id="::Contact::ContactAddress::city">
23781 <webidl> attribute DOMString? city;</webidl>
23784 The name of the locality. For example, the city, county, town, or village.
23790 <Type type="DOMString" nullable="nullable"/>
23792 <Attribute name="streetAddress" id="::Contact::ContactAddress::streetAddress">
23793 <webidl> attribute DOMString? streetAddress;</webidl>
23796 The street address, for example, building number and street name/number.
23802 <Type type="DOMString" nullable="nullable"/>
23804 <Attribute name="additionalInformation" id="::Contact::ContactAddress::additionalInformation">
23805 <webidl> attribute DOMString? additionalInformation;</webidl>
23808 An attribute to capture any other address details that are required for an accurate address.
23809 For example, floor number, apartment number, suite name, the name of an office occupant, etc.
23815 <Type type="DOMString" nullable="nullable"/>
23817 <Attribute name="postalCode" id="::Contact::ContactAddress::postalCode">
23818 <webidl> attribute DOMString? postalCode;</webidl>
23821 The postal code of the location (also known as the zip code in the US).
23827 <Type type="DOMString" nullable="nullable"/>
23829 <Attribute name="isDefault" id="::Contact::ContactAddress::isDefault">
23830 <webidl> attribute boolean isDefault;</webidl>
23833 The default state of an address.
23837 Indicates if the address was marked as <em>default</em> or not for the contact.
23838 The only one among addresses for a person can have default property,
23839 so that this attribute might be changed without explicit modification
23840 according to the policy of platform.
23843 It deals with the 'pref' TYPE on RFC 2426, Section 3.2.1
23846 By default, this attribute is set to <var>false</var>.
23853 <Type type="boolean"/>
23855 <Attribute name="types" id="::Contact::ContactAddress::types">
23856 <webidl> attribute DOMString[] types;</webidl>
23859 The case insensitive list of address types.
23863 For more details, see RFC 2426, Section 3.2.1.
23866 At least the following values must be supported:
23870 WORK - Indicates a work address </li>
23872 HOME - Indicates a home address </li>
23875 By default, this attribute is set to HOME.
23882 <Type type="array">
23883 <Type type="DOMString"/>
23887 <Interface name="ContactPhoneNumber" id="::Contact::ContactPhoneNumber">
23888 <webidl> [Constructor(DOMString number, optional DOMString[] types, optional boolean isDefault)]
23889 interface ContactPhoneNumber
23891 attribute DOMString number;
23893 attribute boolean isDefault;
23895 attribute DOMString[] types;
23899 The ContactPhoneNumber object that contains the number and the type of phone number.
23903 This interface provides the phone number and the type of number, for example, work, home, car, etc., or the device subtype, for example, fax, fixed, or mobile.
23904 At searching by phoneNumber, matchflag "CONTAINS" provides a result set which is retrieved from normalized phoneNumber as searching value.
23907 For more details, see RFC 2426, Section 3.3.1
23913 <Code> var contactInit = {};
23914 var phoneNumber = new tizen.ContactPhoneNumber('123456789', ['WORK','VOICE'], true);
23915 contactInit.phoneNumbers = [phoneNumber];
23918 <ExtendedAttributeList>
23919 <ExtendedAttribute name="Constructor">
23920 <webidl>Constructor(DOMString number, optional DOMString[] types, optional boolean isDefault)</webidl>
23922 <Argument name="number">
23923 <Type type="DOMString"/>
23925 <Argument optional="optional" name="types">
23926 <Type type="array">
23927 <Type type="DOMString"/>
23930 <Argument optional="optional" name="isDefault">
23931 <Type type="boolean"/>
23934 </ExtendedAttribute>
23935 </ExtendedAttributeList>
23936 <Attribute name="number" id="::Contact::ContactPhoneNumber::number">
23937 <webidl> attribute DOMString number;</webidl>
23940 The full phone number.
23946 <Type type="DOMString"/>
23948 <Attribute name="isDefault" id="::Contact::ContactPhoneNumber::isDefault">
23949 <webidl> attribute boolean isDefault;</webidl>
23952 The default state of the phone number.
23956 Indicates if the phone number was marked as <em>default</em> or not for the contact.
23957 The only one among phone numbers for a person can have default property,
23958 so that this attribute might be changed without explicit modification
23959 according to the policy of platform.
23962 It deals with the 'pref' TYPE on RFC 2426, Section 3.3.1
23965 By default, this attribute is set to false.
23972 <Type type="boolean"/>
23974 <Attribute name="types" id="::Contact::ContactPhoneNumber::types">
23975 <webidl> attribute DOMString[] types;</webidl>
23978 The case insensitive list of phone types, as defined in RFC 2426.
23982 Specifies the intended use of the phone number.
23985 At least the following values must be supported:
23989 <var>WORK</var> - Indicates a work number </li>
23991 <var>HOME</var> - Indicates a home number </li>
23993 <var>VOICE</var> - Indicates a voice number (Default) </li>
23995 <var>FAX</var> - Indicates a facsimile number </li>
23997 <var>MSG</var> - Indicates a messaging service on the number </li>
23999 <var>CELL</var> - Indicates a cellular number </li>
24001 <var>PAGER</var> - Indicates a pager number </li>
24003 <var>BBS</var> - Indicates a bulletin board service number </li>
24005 <var>MODEM</var> - Indicates a MODEM number </li>
24007 <var>CAR</var> - Indicates a car-phone number </li>
24009 <var>ISDN</var> - Indicates an ISDN number </li>
24011 <var>VIDEO</var> - Indicates a video-phone number </li>
24013 <var>PCS</var> - Personal Communication Standard </li>
24020 <Type type="array">
24021 <Type type="DOMString"/>
24025 <Interface name="ContactEmailAddress" id="::Contact::ContactEmailAddress">
24026 <webidl> [Constructor(DOMString email, optional DOMString[] types, optional boolean isDefault)]
24027 interface ContactEmailAddress
24029 attribute DOMString email;
24031 attribute boolean isDefault;
24033 attribute DOMString[] types;
24037 The ContactEmailAddress object that contains the email address and the type of email address.
24041 For more details, see RFC 2426, Section 3.3.2.
24047 <Code> var contactInit = {};
24048 var email = new tizen.ContactEmailAddress('user@domain.com', ['WORK']);
24049 contactInit.emails = [email];
24052 <ExtendedAttributeList>
24053 <ExtendedAttribute name="Constructor">
24054 <webidl>Constructor(DOMString email, optional DOMString[] types, optional boolean isDefault)</webidl>
24056 <Argument name="email">
24057 <Type type="DOMString"/>
24059 <Argument optional="optional" name="types">
24060 <Type type="array">
24061 <Type type="DOMString"/>
24064 <Argument optional="optional" name="isDefault">
24065 <Type type="boolean"/>
24068 </ExtendedAttribute>
24069 </ExtendedAttributeList>
24070 <Attribute name="email" id="::Contact::ContactEmailAddress::email">
24071 <webidl> attribute DOMString email;</webidl>
24074 The full email address.
24080 <Type type="DOMString"/>
24082 <Attribute name="isDefault" id="::Contact::ContactEmailAddress::isDefault">
24083 <webidl> attribute boolean isDefault;</webidl>
24086 The default state of an email address.
24090 Indicates if the email address was marked as <em>default</em> or not for the contact.
24091 The only one among email addresses for a person can have default property,
24092 so that this attribute might be changed without explicit modification
24093 according to the policy of platform.
24096 It deals with the 'pref' TYPE on RFC 2426, Section 3.3.2
24099 By default, this attribute is set to false.
24106 <Type type="boolean"/>
24108 <Attribute name="types" id="::Contact::ContactEmailAddress::types">
24109 <webidl> attribute DOMString[] types;</webidl>
24112 The case insensitive list of email types.
24116 Specifies the intended use of the email address.
24119 At least the following values must be supported:
24123 WORK - Indicates a work email </li>
24125 HOME - Indicates a home email </li>
24127 MOBILE - Indicates a mobile email </li>
24130 By default, this attribute is set to WORK.
24137 <Type type="array">
24138 <Type type="DOMString"/>
24142 <Interface name="ContactGroup" id="::Contact::ContactGroup">
24143 <webidl> [Constructor(DOMString name, optional DOMString? ringtoneURI, optional DOMString? photoURI)]
24144 interface ContactGroup
24146 readonly attribute <ref>ContactGroupId</ref>? id;
24148 readonly attribute <ref>AddressBookId</ref>? addressBookId;
24150 attribute DOMString name;
24152 attribute DOMString? ringtoneURI;
24154 attribute DOMString? photoURI;
24156 readonly attribute DOMString readOnly;
24165 <Code> var addressbook = null;
24168 // Define the error callback for all the asynchronous calls
24169 function errorCB(err) {
24170 console.log( 'The following error occurred: ' + err.name);
24173 // Define the success callback for retrieving all the
24175 function addressBooksCB(addressbooks) {
24176 addressbook = addressbooks[0];
24178 group = new tizen.ContactGroup('Family', 'file://opt/media/Downloads/ring.mp3');
24180 console.log( 'The following error occurred while converting: ' + err.name);
24185 addressbook.addGroup(group);
24186 console.log('Group was added with ID ' + group.id);
24189 console.log( 'The following error occurred while adding: ' + err.name);
24193 tizen.contact.getAddressBooks(addressBooksCB, errorCB);
24197 <ExtendedAttributeList>
24198 <ExtendedAttribute name="Constructor">
24199 <webidl>Constructor(DOMString name, optional DOMString? ringtoneURI, optional DOMString? photoURI)</webidl>
24201 <Argument name="name">
24202 <Type type="DOMString"/>
24204 <Argument optional="optional" name="ringtoneURI">
24205 <Type type="DOMString" nullable="nullable"/>
24207 <Argument optional="optional" name="photoURI">
24208 <Type type="DOMString" nullable="nullable"/>
24211 </ExtendedAttribute>
24212 </ExtendedAttributeList>
24213 <Attribute readonly="readonly" name="id" id="::Contact::ContactGroup::id">
24214 <webidl> readonly attribute <ref>ContactGroupId</ref>? id;</webidl>
24217 The identifier of a group.
24221 By default, this attribute is set to <var>null</var>.
24228 <Type name="ContactGroupId" nullable="nullable"/>
24230 <Attribute readonly="readonly" name="addressBookId" id="::Contact::ContactGroup::addressBookId">
24231 <webidl> readonly attribute <ref>AddressBookId</ref>? addressBookId;</webidl>
24234 The identifier of the address book that the group belongs to.
24238 By default, this attribute is set to <var>null</var>.
24245 <Type name="AddressBookId" nullable="nullable"/>
24247 <Attribute name="name" id="::Contact::ContactGroup::name">
24248 <webidl> attribute DOMString name;</webidl>
24251 The name of a group.
24257 <Type type="DOMString"/>
24259 <Attribute name="ringtoneURI" id="::Contact::ContactGroup::ringtoneURI">
24260 <webidl> attribute DOMString? ringtoneURI;</webidl>
24263 The URI to the custom ringtone for a group.
24267 To specify a custom ringtone for a group.
24270 By default, this attribute is initialized to <var>null</var>.
24271 This attribute only contains a local file URI.
24278 <Type type="DOMString" nullable="nullable"/>
24280 <Attribute name="photoURI" id="::Contact::ContactGroup::photoURI">
24281 <webidl> attribute DOMString? photoURI;</webidl>
24284 An attribute to store a URI that points to an image that can represent the<em> Group </em>object. This attribute only contains a local file URI.
24288 By default, this attribute is set to <var>null</var>.
24295 <Type type="DOMString" nullable="nullable"/>
24297 <Attribute readonly="readonly" name="readOnly" id="::Contact::ContactGroup::readOnly">
24298 <webidl> readonly attribute DOMString readOnly;</webidl>
24301 The flag indicating if the group can be modified / removed or not.
24302 Some groups cannot be edited if this flag sets to <var>true</var>.
24306 By default, this attribute is set to false.
24313 <Type type="DOMString"/>
24316 <Interface name="PersonArraySuccessCallback" id="::Contact::PersonArraySuccessCallback">
24317 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface PersonArraySuccessCallback {
24318 void onsuccess(<ref>Person</ref>[] persons);
24322 The success callback that is used for retrieving
24327 The success callback that takes an array of persons as an input
24328 argument. It is used in the asynchronous operation to
24329 get or save a list of persons.
24336 <ExtendedAttributeList>
24337 <ExtendedAttribute name="Callback" value="FunctionOnly">
24338 <webidl>Callback</webidl>
24339 </ExtendedAttribute>
24340 <ExtendedAttribute name="NoInterfaceObject">
24341 <webidl> NoInterfaceObject</webidl>
24342 </ExtendedAttribute>
24343 </ExtendedAttributeList>
24344 <Operation name="onsuccess" id="::Contact::PersonArraySuccessCallback::onsuccess">
24345 <webidl> void onsuccess(<ref>Person</ref>[] persons);</webidl>
24348 The method invoked when a list of persons is retrieved successfully.
24354 <Type type="void"/>
24356 <Argument name="persons">
24362 <Type type="array">
24363 <Type name="Person"/>
24369 <Interface name="ContactArraySuccessCallback" id="::Contact::ContactArraySuccessCallback">
24370 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ContactArraySuccessCallback {
24371 void onsuccess(<ref>Contact</ref>[] contacts);
24375 The success callback that is used for saving and retrieving
24376 a list of contacts.
24380 The success callback that takes an array of contacts as an input
24381 argument. It is used in the asynchronous operation to
24382 get or save a list of contacts.
24389 <ExtendedAttributeList>
24390 <ExtendedAttribute name="Callback" value="FunctionOnly">
24391 <webidl>Callback</webidl>
24392 </ExtendedAttribute>
24393 <ExtendedAttribute name="NoInterfaceObject">
24394 <webidl> NoInterfaceObject</webidl>
24395 </ExtendedAttribute>
24396 </ExtendedAttributeList>
24397 <Operation name="onsuccess" id="::Contact::ContactArraySuccessCallback::onsuccess">
24398 <webidl> void onsuccess(<ref>Contact</ref>[] contacts);</webidl>
24401 The method invoked when a list of contacts is retrieved successfully.
24407 <Type type="void"/>
24409 <Argument name="contacts">
24413 The Contacts that were successfully saved must have their identifiers set.
24416 <Type type="array">
24417 <Type name="Contact"/>
24423 <Interface name="AddressBookArraySuccessCallback" id="::Contact::AddressBookArraySuccessCallback">
24424 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface AddressBookArraySuccessCallback {
24425 void onsuccess(<ref>AddressBook</ref>[] addressbooks);
24429 The success callback when retrieving a list of AddressBooks.
24433 The success callback that takes an array of AddressBooks as an input
24434 argument. It is used in the asynchronous operation to
24442 <ExtendedAttributeList>
24443 <ExtendedAttribute name="Callback" value="FunctionOnly">
24444 <webidl>Callback</webidl>
24445 </ExtendedAttribute>
24446 <ExtendedAttribute name="NoInterfaceObject">
24447 <webidl> NoInterfaceObject</webidl>
24448 </ExtendedAttribute>
24449 </ExtendedAttributeList>
24450 <Operation name="onsuccess" id="::Contact::AddressBookArraySuccessCallback::onsuccess">
24451 <webidl> void onsuccess(<ref>AddressBook</ref>[] addressbooks);</webidl>
24454 The method invoked when a list of address books is retrieved successfully.
24460 <Type type="void"/>
24462 <Argument name="addressbooks">
24465 The address books to retrieve.
24468 <Type type="array">
24469 <Type name="AddressBook"/>
24475 <Interface name="AddressBookChangeCallback" id="::Contact::AddressBookChangeCallback">
24476 <webidl> [Callback, NoInterfaceObject] interface AddressBookChangeCallback {
24477 void oncontactsadded(<ref>Contact</ref>[] contacts);
24479 void oncontactsupdated(<ref>Contact</ref>[] contacts);
24481 void oncontactsremoved(<ref>ContactId</ref>[] contactIds);
24485 The interface for specifying the methods to be called for address book
24486 change notifications.
24490 This interface specifies a set of functions that will be invoked every time an address
24491 book change occurs (contact addition/update/deletion).
24498 <ExtendedAttributeList>
24499 <ExtendedAttribute name="Callback">
24500 <webidl>Callback</webidl>
24501 </ExtendedAttribute>
24502 <ExtendedAttribute name="NoInterfaceObject">
24503 <webidl> NoInterfaceObject</webidl>
24504 </ExtendedAttribute>
24505 </ExtendedAttributeList>
24506 <Operation name="oncontactsadded" id="::Contact::AddressBookChangeCallback::oncontactsadded">
24507 <webidl> void oncontactsadded(<ref>Contact</ref>[] contacts);</webidl>
24510 The method invoked when contacts are added to the address book.
24516 <Type type="void"/>
24518 <Argument name="contacts">
24521 A list of contacts to add.
24524 <Type type="array">
24525 <Type name="Contact"/>
24530 <Operation name="oncontactsupdated" id="::Contact::AddressBookChangeCallback::oncontactsupdated">
24531 <webidl> void oncontactsupdated(<ref>Contact</ref>[] contacts);</webidl>
24534 The method invoked when contacts are updated in the address book.
24540 <Type type="void"/>
24542 <Argument name="contacts">
24545 A list of contacts to update.
24548 <Type type="array">
24549 <Type name="Contact"/>
24554 <Operation name="oncontactsremoved" id="::Contact::AddressBookChangeCallback::oncontactsremoved">
24555 <webidl> void oncontactsremoved(<ref>ContactId</ref>[] contactIds);</webidl>
24558 The method invoked when contacts are deleted from the address book.
24564 <Type type="void"/>
24566 <Argument name="contactIds">
24569 A list of identifiers for the contacts to delete.
24572 <Type type="array">
24573 <Type name="ContactId"/>
24579 <Interface name="PersonsChangeCallback" id="::Contact::PersonsChangeCallback">
24580 <webidl> [Callback, NoInterfaceObject] interface PersonsChangeCallback {
24581 void onpersonsadded(<ref>Person</ref>[] persons);
24583 void onpersonsupdated(<ref>Person</ref>[] persons);
24585 void onpersonsremoved(<ref>PersonId</ref>[] personIds);
24589 The interface for specifying the methods to be called for change notifications.
24593 This interface specifies a set of functions that will be invoked every time person's
24594 list change occurs (person addition/update/deletion).
24601 <ExtendedAttributeList>
24602 <ExtendedAttribute name="Callback">
24603 <webidl>Callback</webidl>
24604 </ExtendedAttribute>
24605 <ExtendedAttribute name="NoInterfaceObject">
24606 <webidl> NoInterfaceObject</webidl>
24607 </ExtendedAttribute>
24608 </ExtendedAttributeList>
24609 <Operation name="onpersonsadded" id="::Contact::PersonsChangeCallback::onpersonsadded">
24610 <webidl> void onpersonsadded(<ref>Person</ref>[] persons);</webidl>
24613 The method invoked when persons are added to the person list.
24619 <Type type="void"/>
24621 <Argument name="persons">
24624 A list of persons to add.
24627 <Type type="array">
24628 <Type name="Person"/>
24633 <Operation name="onpersonsupdated" id="::Contact::PersonsChangeCallback::onpersonsupdated">
24634 <webidl> void onpersonsupdated(<ref>Person</ref>[] persons);</webidl>
24637 The method invoked when persons are updated in the person list.
24643 <Type type="void"/>
24645 <Argument name="persons">
24648 A list of persons to update.
24651 <Type type="array">
24652 <Type name="Person"/>
24657 <Operation name="onpersonsremoved" id="::Contact::PersonsChangeCallback::onpersonsremoved">
24658 <webidl> void onpersonsremoved(<ref>PersonId</ref>[] personIds);</webidl>
24661 The method invoked when persons are deleted from the person list.
24667 <Type type="void"/>
24669 <Argument name="personIds">
24672 A list of identifiers for the persons to delete.
24675 <Type type="array">
24676 <Type name="PersonId"/>
24683 <Module name="Content" id="::Content">
24684 <webidl>module Content {
24686 enum ContentDirectoryStorageType { "INTERNAL", "EXTERNAL" };
24688 enum ContentType { "IMAGE", "VIDEO", "AUDIO", "OTHER" };
24690 enum AudioContentLyricsType { "SYNCHRONIZED", "UNSYNCHRONIZED" };
24692 enum ImageContentOrientation { "NORMAL", "FLIP_HORIZONTAL", "ROTATE_180", "FLIP_VERTICAL", "TRANSPOSE", "ROTATE_90", "TRANSVERSE", "ROTATE_270" };
24694 typedef DOMString ContentId;
24696 typedef DOMString ContentDirectoryId;
24698 [NoInterfaceObject] interface ContentManagerObject {
24699 readonly attribute <ref>ContentManager</ref> content;
24701 <ref>Tizen</ref> implements <ref>ContentManagerObject</ref>;
24703 [NoInterfaceObject] interface ContentManager {
24705 void update(<ref>Content</ref> content) raises(<ref>WebAPIException</ref>);
24707 void updateBatch(<ref>Content</ref>[] contents,
24708 optional <ref>SuccessCallback</ref>? successCallback,
24709 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
24711 void getDirectories(<ref>ContentDirectoryArraySuccessCallback</ref> successCallback,
24712 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
24714 void find(<ref>ContentArraySuccessCallback</ref> successCallback,
24715 optional <ref>ErrorCallback</ref>? errorCallback,
24716 optional <ref>ContentDirectoryId</ref>? directoryId,
24717 optional <ref>AbstractFilter</ref>? filter,
24718 optional <ref>SortMode</ref>? sortMode,
24719 optional unsigned long? count,
24720 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);
24723 void scanFile(DOMString contentURI,
24724 optional <ref>ContentScanSuccessCallback</ref>? successCallback,
24725 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
24727 void setChangeListener(<ref>ContentChangeCallback</ref> changeCallback) raises(<ref>WebAPIException</ref>);
24729 void unsetChangeListener() raises(<ref>WebAPIException</ref>);
24733 [Callback=FunctionOnly, NoInterfaceObject] interface ContentArraySuccessCallback {
24734 void onsuccess(<ref>Content</ref>[] contents);
24737 [Callback=FunctionOnly, NoInterfaceObject] interface ContentDirectoryArraySuccessCallback {
24738 void onsuccess(<ref>ContentDirectory</ref>[] directories);
24741 [Callback=FunctionOnly, NoInterfaceObject] interface ContentScanSuccessCallback {
24742 void onsuccess(DOMString contentURI);
24745 [Callback, NoInterfaceObject] interface ContentChangeCallback {
24746 void oncontentadded(<ref>Content</ref> content);
24748 void oncontentupdated(<ref>Content</ref> content);
24750 void oncontentremoved(<ref>ContentId</ref> id);
24754 [NoInterfaceObject] interface ContentDirectory {
24756 readonly attribute <ref>ContentDirectoryId</ref> id;
24758 readonly attribute DOMString directoryURI;
24760 readonly attribute DOMString title;
24762 readonly attribute <ref>ContentDirectoryStorageType</ref> storageType;
24764 readonly attribute Date? modifiedDate;
24768 [NoInterfaceObject] interface Content {
24770 readonly attribute DOMString[] editableAttributes;
24772 readonly attribute <ref>ContentId</ref> id;
24774 attribute DOMString name;
24776 readonly attribute <ref>ContentType</ref> type;
24778 readonly attribute DOMString mimeType;
24780 readonly attribute DOMString title;
24782 readonly attribute DOMString contentURI;
24784 readonly attribute DOMString[]? thumbnailURIs;
24786 readonly attribute Date? releaseDate;
24788 readonly attribute Date? modifiedDate;
24790 readonly attribute unsigned long size;
24792 attribute DOMString? description;
24794 attribute unsigned long rating;
24797 [NoInterfaceObject] interface VideoContent : <ref>Content</ref> {
24799 attribute <ref>SimpleCoordinates</ref>? geolocation;
24801 readonly attribute DOMString? album;
24803 readonly attribute DOMString[]? artists;
24805 readonly attribute unsigned long duration;
24807 readonly attribute unsigned long width;
24809 readonly attribute unsigned long height;
24814 [NoInterfaceObject] interface AudioContentLyrics {
24816 readonly attribute <ref>AudioContentLyricsType</ref> type;
24818 readonly attribute unsigned long[] timestamps;
24820 readonly attribute DOMString[] texts;
24823 [NoInterfaceObject] interface AudioContent : <ref>Content</ref> {
24825 readonly attribute DOMString? album;
24827 readonly attribute DOMString[]? genres;
24829 readonly attribute DOMString[]? artists;
24831 readonly attribute DOMString[]? composers;
24833 readonly attribute <ref>AudioContentLyrics</ref>? lyrics;
24835 readonly attribute DOMString? copyright;
24837 readonly attribute unsigned long bitrate;
24839 readonly attribute unsigned short? trackNumber;
24841 readonly attribute unsigned long duration;
24845 [NoInterfaceObject] interface ImageContent : <ref>Content</ref> {
24847 attribute <ref>SimpleCoordinates</ref>? geolocation;
24849 readonly attribute unsigned long width;
24851 readonly attribute unsigned long height;
24853 attribute <ref>ImageContentOrientation</ref> orientation;
24859 This API provides functionality to discover contents such as images, videos, music, or other.
24863 It is possible to search for specific contents using filters.
24864 The API also supports setting attributes of specific contents.
24867 For more information on the Content features, see <a href="../../org.tizen.web.appprogramming/html/guide/content_guide/mediacontent.htm">Content Guide</a>.
24874 <Enum name="ContentDirectoryStorageType" id="::Content::ContentDirectoryStorageType">
24875 <webidl> enum ContentDirectoryStorageType { "INTERNAL", "EXTERNAL" };</webidl>
24879 Defines whether a content directory is stored on internal or external storage (such as a removable memory card).
24886 <EnumValue stringvalue="INTERNAL">
24887 <webidl> "INTERNAL</webidl>
24889 <EnumValue stringvalue="EXTERNAL">
24890 <webidl> "EXTERNAL</webidl>
24893 <Enum name="ContentType" id="::Content::ContentType">
24894 <webidl> enum ContentType { "IMAGE", "VIDEO", "AUDIO", "OTHER" };</webidl>
24898 Defines the type of content such as image, video, audio and other.
24905 "OTHER" type is added since 2.1.
24908 <EnumValue stringvalue="IMAGE">
24909 <webidl> "IMAGE</webidl>
24911 <EnumValue stringvalue="VIDEO">
24912 <webidl> "VIDEO</webidl>
24914 <EnumValue stringvalue="AUDIO">
24915 <webidl> "AUDIO</webidl>
24917 <EnumValue stringvalue="OTHER">
24918 <webidl> "OTHER</webidl>
24921 <Enum name="AudioContentLyricsType" id="::Content::AudioContentLyricsType">
24922 <webidl> enum AudioContentLyricsType { "SYNCHRONIZED", "UNSYNCHRONIZED" };</webidl>
24926 Defines whether the lyric supplied with an audio file is time-synchronized or not.
24933 <EnumValue stringvalue="SYNCHRONIZED">
24934 <webidl> "SYNCHRONIZED</webidl>
24936 <EnumValue stringvalue="UNSYNCHRONIZED">
24937 <webidl> "UNSYNCHRONIZED</webidl>
24940 <Enum name="ImageContentOrientation" id="::Content::ImageContentOrientation">
24941 <webidl> enum ImageContentOrientation { "NORMAL", "FLIP_HORIZONTAL", "ROTATE_180", "FLIP_VERTICAL", "TRANSPOSE", "ROTATE_90", "TRANSVERSE", "ROTATE_270" };</webidl>
24945 Defines an orientation of an image.
24952 <EnumValue stringvalue="NORMAL">
24953 <webidl> "NORMAL</webidl>
24955 <EnumValue stringvalue="FLIP_HORIZONTAL">
24956 <webidl> "FLIP_HORIZONTAL</webidl>
24958 <EnumValue stringvalue="ROTATE_180">
24959 <webidl> "ROTATE_180</webidl>
24961 <EnumValue stringvalue="FLIP_VERTICAL">
24962 <webidl> "FLIP_VERTICAL</webidl>
24964 <EnumValue stringvalue="TRANSPOSE">
24965 <webidl> "TRANSPOSE</webidl>
24967 <EnumValue stringvalue="ROTATE_90">
24968 <webidl> "ROTATE_90</webidl>
24970 <EnumValue stringvalue="TRANSVERSE">
24971 <webidl> "TRANSVERSE</webidl>
24973 <EnumValue stringvalue="ROTATE_270">
24974 <webidl> "ROTATE_270</webidl>
24977 <Typedef name="ContentId" id="::Content::ContentId">
24978 <webidl> typedef DOMString ContentId;</webidl>
24981 Content identifier.
24987 <Type type="DOMString"/>
24989 <Typedef name="ContentDirectoryId" id="::Content::ContentDirectoryId">
24990 <webidl> typedef DOMString ContentDirectoryId;</webidl>
24993 Content directory identifier.
24999 <Type type="DOMString"/>
25001 <Interface name="ContentManagerObject" id="::Content::ContentManagerObject">
25002 <webidl> [NoInterfaceObject] interface ContentManagerObject {
25003 readonly attribute <ref>ContentManager</ref> content;
25007 Defines what is instantiated by the Tizen object.
25011 There is a <em>tizen.content </em>object that allows accessing the functionality of the Content module.
25018 <ExtendedAttributeList>
25019 <ExtendedAttribute name="NoInterfaceObject">
25020 <webidl>NoInterfaceObject</webidl>
25021 </ExtendedAttribute>
25022 </ExtendedAttributeList>
25023 <Attribute readonly="readonly" name="content" id="::Content::ContentManagerObject::content">
25024 <webidl> readonly attribute <ref>ContentManager</ref> content;</webidl>
25025 <Type name="ContentManager"/>
25028 <Implements name1="Tizen" name2="ContentManagerObject">
25029 <webidl> <ref>Tizen</ref> implements <ref>ContentManagerObject</ref>;</webidl>
25031 <Interface name="ContentManager" id="::Content::ContentManager">
25032 <webidl> [NoInterfaceObject] interface ContentManager {
25034 void update(<ref>Content</ref> content) raises(<ref>WebAPIException</ref>);
25036 void updateBatch(<ref>Content</ref>[] contents,
25037 optional <ref>SuccessCallback</ref>? successCallback,
25038 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
25040 void getDirectories(<ref>ContentDirectoryArraySuccessCallback</ref> successCallback,
25041 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
25043 void find(<ref>ContentArraySuccessCallback</ref> successCallback,
25044 optional <ref>ErrorCallback</ref>? errorCallback,
25045 optional <ref>ContentDirectoryId</ref>? directoryId,
25046 optional <ref>AbstractFilter</ref>? filter,
25047 optional <ref>SortMode</ref>? sortMode,
25048 optional unsigned long? count,
25049 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);
25052 void scanFile(DOMString contentURI,
25053 optional <ref>ContentScanSuccessCallback</ref>? successCallback,
25054 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
25056 void setChangeListener(<ref>ContentChangeCallback</ref> changeCallback) raises(<ref>WebAPIException</ref>);
25058 void unsetChangeListener() raises(<ref>WebAPIException</ref>);
25063 This interface provides operations to retrieve and manipulate contents.
25069 <ExtendedAttributeList>
25070 <ExtendedAttribute name="NoInterfaceObject">
25071 <webidl>NoInterfaceObject</webidl>
25072 </ExtendedAttribute>
25073 </ExtendedAttributeList>
25074 <Operation name="update" id="::Content::ContentManager::update">
25075 <webidl> void update(<ref>Content</ref> content) raises(<ref>WebAPIException</ref>);</webidl>
25078 Updates attributes of the content in content database synchronously.
25082 When an application has changed some attributes of a content, this method allows
25083 writing it back to the content database.
25093 http://tizen.org/privilege/content.write
25096 The <em>editableAttributes </em>in <em>Content </em>interface indicates
25097 the attributes that can be changed.
25098 This API does not support updating the metadata of a file.
25100 <Code> // Assume the content is a Content object as a result of find method.
25101 // Check the description is editable, and then set a description.
25102 if (content.editableAttributes.indexOf("description") >= 0) {
25103 content.description = "Sample content";
25105 tizen.content.update(content);
25108 <Type type="void"/>
25110 <Argument name="content">
25113 The content to update.
25116 <Type name="Content"/>
25120 <RaiseException name="WebAPIException">
25123 with error type TypeMismatchError, if any input parameter
25124 is not compatible with the expected type for that parameter.
25127 with error type InvalidValuesError, if any of the input parameters
25128 contain an invalid value.
25131 with error type SecurityError, if the application does not have the privilege to call this method.
25134 with error type UnknownError in any other error case.
25140 <Operation name="updateBatch" id="::Content::ContentManager::updateBatch">
25141 <webidl> void updateBatch(<ref>Content</ref>[] contents,
25142 optional <ref>SuccessCallback</ref>? successCallback,
25143 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
25146 Updates a batch of content attributes in the content database synchronously.
25150 When an application has changed any attributes in array of content, this method allows writing them
25151 back to the content database.
25154 The errorCallback can be launched with any of these error types:
25158 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
25160 UnknownError: In any other error case. </li>
25170 http://tizen.org/privilege/content.write
25173 The <em>editableAttributes </em>in <em>Content </em>interface indicates
25174 the attributes that can be changed.
25175 This API does not support updating the metadata of a file.
25177 <Code> // The following example increases rating of an content by 1
25179 function errorCB(err) {
25180 console.log( 'The following error occurred: ' + err.name);
25183 function successCB() {
25184 console.log('Attributes set successfully');
25187 // Assume the content is a Content object as a result of find method.
25188 // Check the rating is editable, and then increase by 1.
25189 if (content.editableAttributes.indexOf("rating") >= 0) {
25192 tizen.content.updateBatch([content], successCB, errorCB);
25195 <Type type="void"/>
25197 <Argument name="contents">
25200 Array of content to change.
25203 <Type type="array">
25204 <Type name="Content"/>
25207 <Argument optional="optional" name="successCallback">
25210 Function called when attributes have been changed.
25213 <Type name="SuccessCallback" nullable="nullable"/>
25215 <Argument optional="optional" name="errorCallback">
25218 Function called when an error has occurred.
25221 <Type name="ErrorCallback" nullable="nullable"/>
25225 <RaiseException name="WebAPIException">
25228 with error type TypeMismatchError, if the input parameter
25229 is not compatible with the expected type for that parameter.
25232 with error type SecurityError, if the application does not have the privilege to call this method.
25238 <Operation name="getDirectories" id="::Content::ContentManager::getDirectories">
25239 <webidl> void getDirectories(<ref>ContentDirectoryArraySuccessCallback</ref> successCallback,
25240 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
25243 Gets a list of content directory.
25247 This method returns (via callback) a list of content directory objects. To obtain a list of contents
25248 in a specific directory, use find() method with the directory ID.
25251 The errorCallback is launched with this error type:
25255 UnknownError: In any other error case. </li>
25261 <Code> // The following example retrieves content directories in the storage.
25263 function errorCB(err) {
25264 console.log( 'The following error occurred: ' + err.name);
25267 function printDirectory(directory, index, directories) {
25268 console.log('directoryURI: ' + directory.directoryURI + ' Title: ' + directory.title);
25270 function getDirectoriesCB(directories) {
25271 directories.forEach(printDirectory);
25274 tizen.content.getDirectories(getDirectoriesCB, errorCB);
25277 <Type type="void"/>
25279 <Argument name="successCallback">
25282 Function called when content directories have been retrieved successfully.
25285 <Type name="ContentDirectoryArraySuccessCallback"/>
25287 <Argument optional="optional" name="errorCallback">
25290 Function called when an error has occurred.
25293 <Type name="ErrorCallback" nullable="nullable"/>
25297 <RaiseException name="WebAPIException">
25300 with error type TypeMismatchError, if the input parameter
25301 is not compatible with the expected type for that parameter.
25307 <Operation name="find" id="::Content::ContentManager::find">
25308 <webidl> void find(<ref>ContentArraySuccessCallback</ref> successCallback,
25309 optional <ref>ErrorCallback</ref>? errorCallback,
25310 optional <ref>ContentDirectoryId</ref>? directoryId,
25311 optional <ref>AbstractFilter</ref>? filter,
25312 optional <ref>SortMode</ref>? sortMode,
25313 optional unsigned long? count,
25314 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);</webidl>
25317 Finds contents that satisfy the conditions set by a filter.
25321 This method allows searching based on a supplied filter. For more detail on AbstractFilter, see
25322 <a href="../../org.tizen.web.device.apireference/tizen/tizen.html#::Tizen::AbstractFilter">Tizen</a> module. The filter allows precise searching such
25323 as "return all songs by artist U2, ordered by name".
25326 The errorCallback can be launched with these error types:
25330 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
25332 UnknownError: In any other error case. </li>
25342 http://tizen.org/privilege/content.read
25344 <Code> // The following example retrieves all songs from the album "The Joshua Tree", by artist "U2", ordered by the track number.
25347 var sortMode = new tizen.SortMode("trackNumber", "ASC");
25348 var artistFilter = new tizen.AttributeFilter("artists", "EXACTLY", "U2");
25349 var albumFilter = new tizen.AttributeFilter("album", "EXACTLY", "The Joshua Tree");
25350 var filter = new tizen.CompositeFilter("INTERSECTION", [albumFilter, artistFilter]);
25352 function errorCB(err) {
25353 console.log( 'The following error occurred: ' + err.name);
25356 function printContent(content, index, contents) {
25357 console.log('Track: ' + content.trackNumber + ' Title: ' + content.title + 'Duration: ' + content.duration + 'URL: ' + content.contentURI + 'MIME: ' + content.mimeType);
25360 function findCB(contents) {
25361 console.log('The Joshua Tree by U2:');
25362 contents.forEach(printContent);
25363 // Increase the offset as much as the count and then find content again.
25364 if (contents.length == count) {
25366 tizen.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
25370 tizen.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
25374 <Type type="void"/>
25376 <Argument name="successCallback">
25379 Function called when a content have been retrieved.
25382 <Type name="ContentArraySuccessCallback"/>
25384 <Argument optional="optional" name="errorCallback">
25387 Function called when an error has occurred.
25390 <Type name="ErrorCallback" nullable="nullable"/>
25392 <Argument optional="optional" name="directoryId">
25395 Directory ID that is use to select content to retrieve in a specified directory.
25398 <Type name="ContentDirectoryId" nullable="nullable"/>
25400 <Argument optional="optional" name="filter">
25403 Filter that is used to select content to retrieve.
25406 <Type name="AbstractFilter" nullable="nullable"/>
25408 <Argument optional="optional" name="sortMode">
25411 Used to determine the sort order in which the content are returned.
25414 <Type name="SortMode" nullable="nullable"/>
25416 <Argument optional="optional" name="count">
25419 Maximum amount of content to return.
25422 <Type type="unsigned long" nullable="nullable"/>
25424 <Argument optional="optional" name="offset">
25427 Offset of the result set.
25430 <Type type="unsigned long" nullable="nullable"/>
25434 <RaiseException name="WebAPIException">
25437 with error type TypeMismatchError, if the input parameter
25438 is not compatible with the expected type for that parameter.
25441 with error type SecurityError, if the application does not have the privilege to call this method.
25444 with error type NotSupportedError, if this feature is not supported.
25450 <Operation name="scanFile" id="::Content::ContentManager::scanFile">
25451 <webidl> void scanFile(DOMString contentURI,
25452 optional <ref>ContentScanSuccessCallback</ref>? successCallback,
25453 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
25456 Scan a file to create or update a content in the content database.
25460 When an application creates or updates a content, this method allows scan it
25461 to insert or update the content in the content database.
25471 http://tizen.org/privilege/content.write
25473 <Code> // The following example scan 'tizen.jpg' in media directory
25475 function errorCB(err) {
25476 console.log( 'The following error occurred: ' + err.name);
25479 function successCB(path) {
25480 console.log('scanning is completed');
25483 var path = "file:///opt/usr/media/tizen.jpg";
25484 tizen.content.scanFile(path, successCB, errorCB);
25488 <Type type="void"/>
25490 <Argument name="contentURI">
25493 The URI of content to scan.
25496 <Type type="DOMString"/>
25498 <Argument optional="optional" name="successCallback">
25501 Function called when scanning has been completed.
25504 <Type name="ContentScanSuccessCallback" nullable="nullable"/>
25506 <Argument optional="optional" name="errorCallback">
25509 Function called when an error has occurred.
25512 <Type name="ErrorCallback" nullable="nullable"/>
25516 <RaiseException name="WebAPIException">
25519 with error type TypeMismatchError, if any input parameter
25520 is not compatible with the expected type for that parameter.
25523 with error type InvalidValuesError, if any of the input parameters
25524 contain an invalid value.
25527 with error type SecurityError, if the application does not have the privilege to call this method.
25530 with error type UnknownError in any other error case.
25536 <Operation name="setChangeListener" id="::Content::ContentManager::setChangeListener">
25537 <webidl> void setChangeListener(<ref>ContentChangeCallback</ref> changeCallback) raises(<ref>WebAPIException</ref>);</webidl>
25540 Sets a listener to receive notifications about content changes.
25549 http://tizen.org/privilege/content.read
25551 <Code> var listener= {
25552 oncontentadded: function(content) {
25553 console.log(content.contentURI + ' content is added');
25555 oncontentupdated: function(content) {
25556 console.log(content.contentURI + ' content is updated');
25558 oncontentremoved: function(id) {
25559 console.log(id + ' is removed');
25563 // Registers to be notified when the content changes
25564 tizen.content.setChangeListener(listener);
25568 <Type type="void"/>
25570 <Argument name="changeCallback">
25573 A callback to be invoked for receiving content change notification.
25576 <Type name="ContentChangeCallback"/>
25580 <RaiseException name="WebAPIException">
25583 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
25586 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
25589 with error type SecurityError, if the application does not have the privilege to call this method.
25592 with error type UnknownError, if any other error occurs.
25598 <Operation name="unsetChangeListener" id="::Content::ContentManager::unsetChangeListener">
25599 <webidl> void unsetChangeListener() raises(<ref>WebAPIException</ref>);</webidl>
25602 Unsets the listener to unsubscribes from receiving notification for any content changes.
25611 http://tizen.org/privilege/content.read
25613 <Code> tizen.content.unsetChangeListener();
25617 <Type type="void"/>
25620 <RaiseException name="WebAPIException">
25623 with error type SecurityError, if the application does not have the privilege to call this method.
25626 with error type UnknownError if any other error occurs.
25633 <Interface name="ContentArraySuccessCallback" id="::Content::ContentArraySuccessCallback">
25634 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ContentArraySuccessCallback {
25635 void onsuccess(<ref>Content</ref>[] contents);
25639 The callback function used to return a list of content objects.
25645 <ExtendedAttributeList>
25646 <ExtendedAttribute name="Callback" value="FunctionOnly">
25647 <webidl>Callback</webidl>
25648 </ExtendedAttribute>
25649 <ExtendedAttribute name="NoInterfaceObject">
25650 <webidl> NoInterfaceObject</webidl>
25651 </ExtendedAttribute>
25652 </ExtendedAttributeList>
25653 <Operation name="onsuccess" id="::Content::ContentArraySuccessCallback::onsuccess">
25654 <webidl> void onsuccess(<ref>Content</ref>[] contents);</webidl>
25657 Called when the list of content is retrieved successfully.
25663 <Type type="void"/>
25665 <Argument name="contents">
25668 The array of <em>Content </em>objects.
25671 <Type type="array">
25672 <Type name="Content"/>
25678 <Interface name="ContentDirectoryArraySuccessCallback" id="::Content::ContentDirectoryArraySuccessCallback">
25679 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ContentDirectoryArraySuccessCallback {
25680 void onsuccess(<ref>ContentDirectory</ref>[] directories);
25684 The callback function used to return a list of ContentDirectory objects.
25690 <ExtendedAttributeList>
25691 <ExtendedAttribute name="Callback" value="FunctionOnly">
25692 <webidl>Callback</webidl>
25693 </ExtendedAttribute>
25694 <ExtendedAttribute name="NoInterfaceObject">
25695 <webidl> NoInterfaceObject</webidl>
25696 </ExtendedAttribute>
25697 </ExtendedAttributeList>
25698 <Operation name="onsuccess" id="::Content::ContentDirectoryArraySuccessCallback::onsuccess">
25699 <webidl> void onsuccess(<ref>ContentDirectory</ref>[] directories);</webidl>
25702 Called when the list of directory is retrieved successfully.
25708 <Type type="void"/>
25710 <Argument name="directories">
25713 The array of <em>ContentDirectory </em>objects.
25716 <Type type="array">
25717 <Type name="ContentDirectory"/>
25723 <Interface name="ContentScanSuccessCallback" id="::Content::ContentScanSuccessCallback">
25724 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ContentScanSuccessCallback {
25725 void onsuccess(DOMString contentURI);
25729 The callback function used to return a content to scan has been completed.
25735 <ExtendedAttributeList>
25736 <ExtendedAttribute name="Callback" value="FunctionOnly">
25737 <webidl>Callback</webidl>
25738 </ExtendedAttribute>
25739 <ExtendedAttribute name="NoInterfaceObject">
25740 <webidl> NoInterfaceObject</webidl>
25741 </ExtendedAttribute>
25742 </ExtendedAttributeList>
25743 <Operation name="onsuccess" id="::Content::ContentScanSuccessCallback::onsuccess">
25744 <webidl> void onsuccess(DOMString contentURI);</webidl>
25747 Called when the scanning has been completed.
25753 <Type type="void"/>
25755 <Argument name="contentURI">
25758 The URI of <em>Content </em>objects.
25761 <Type type="DOMString"/>
25766 <Interface name="ContentChangeCallback" id="::Content::ContentChangeCallback">
25767 <webidl> [Callback, NoInterfaceObject] interface ContentChangeCallback {
25768 void oncontentadded(<ref>Content</ref> content);
25770 void oncontentupdated(<ref>Content</ref> content);
25772 void oncontentremoved(<ref>ContentId</ref> id);
25776 This interface specifies a set of methods that are invoked every time a content change occurs.
25782 <ExtendedAttributeList>
25783 <ExtendedAttribute name="Callback">
25784 <webidl>Callback</webidl>
25785 </ExtendedAttribute>
25786 <ExtendedAttribute name="NoInterfaceObject">
25787 <webidl> NoInterfaceObject</webidl>
25788 </ExtendedAttribute>
25789 </ExtendedAttributeList>
25790 <Operation name="oncontentadded" id="::Content::ContentChangeCallback::oncontentadded">
25791 <webidl> void oncontentadded(<ref>Content</ref> content);</webidl>
25794 Called when content is added.
25800 <Type type="void"/>
25802 <Argument name="content">
25805 The content to add.
25808 <Type name="Content"/>
25812 <Operation name="oncontentupdated" id="::Content::ContentChangeCallback::oncontentupdated">
25813 <webidl> void oncontentupdated(<ref>Content</ref> content);</webidl>
25816 Called when content is updated.
25822 <Type type="void"/>
25824 <Argument name="content">
25827 The content to update.
25830 <Type name="Content"/>
25834 <Operation name="oncontentremoved" id="::Content::ContentChangeCallback::oncontentremoved">
25835 <webidl> void oncontentremoved(<ref>ContentId</ref> id);</webidl>
25838 Called when content is removed.
25844 <Type type="void"/>
25846 <Argument name="id">
25849 The id of content to remove.
25852 <Type name="ContentId"/>
25857 <Interface name="ContentDirectory" id="::Content::ContentDirectory">
25858 <webidl> [NoInterfaceObject] interface ContentDirectory {
25860 readonly attribute <ref>ContentDirectoryId</ref> id;
25862 readonly attribute DOMString directoryURI;
25864 readonly attribute DOMString title;
25866 readonly attribute <ref>ContentDirectoryStorageType</ref> storageType;
25868 readonly attribute Date? modifiedDate;
25873 This interface that provides access to properties of a content directory.
25879 <ExtendedAttributeList>
25880 <ExtendedAttribute name="NoInterfaceObject">
25881 <webidl>NoInterfaceObject</webidl>
25882 </ExtendedAttribute>
25883 </ExtendedAttributeList>
25884 <Attribute readonly="readonly" name="id" id="::Content::ContentDirectory::id">
25885 <webidl> readonly attribute <ref>ContentDirectoryId</ref> id;</webidl>
25888 The opaque content directory identifier.
25894 <Type name="ContentDirectoryId"/>
25896 <Attribute readonly="readonly" name="directoryURI" id="::Content::ContentDirectory::directoryURI">
25897 <webidl> readonly attribute DOMString directoryURI;</webidl>
25900 The directory path on the device.
25906 <Type type="DOMString"/>
25908 <Attribute readonly="readonly" name="title" id="::Content::ContentDirectory::title">
25909 <webidl> readonly attribute DOMString title;</webidl>
25912 The directory name.
25918 <Type type="DOMString"/>
25920 <Attribute readonly="readonly" name="storageType" id="::Content::ContentDirectory::storageType">
25921 <webidl> readonly attribute <ref>ContentDirectoryStorageType</ref> storageType;</webidl>
25924 The type of a device storage.
25930 <Type name="ContentDirectoryStorageType"/>
25932 <Attribute readonly="readonly" name="modifiedDate" id="::Content::ContentDirectory::modifiedDate">
25933 <webidl> readonly attribute Date? modifiedDate;</webidl>
25936 The last modified date for a directory.
25942 <Type type="Date" nullable="nullable"/>
25945 <Interface name="Content" id="::Content::Content">
25946 <webidl> [NoInterfaceObject] interface Content {
25948 readonly attribute DOMString[] editableAttributes;
25950 readonly attribute <ref>ContentId</ref> id;
25952 attribute DOMString name;
25954 readonly attribute <ref>ContentType</ref> type;
25956 readonly attribute DOMString mimeType;
25958 readonly attribute DOMString title;
25960 readonly attribute DOMString contentURI;
25962 readonly attribute DOMString[]? thumbnailURIs;
25964 readonly attribute Date? releaseDate;
25966 readonly attribute Date? modifiedDate;
25968 readonly attribute unsigned long size;
25970 attribute DOMString? description;
25972 attribute unsigned long rating;
25976 This interface provides access to properties of a content.
25982 <ExtendedAttributeList>
25983 <ExtendedAttribute name="NoInterfaceObject">
25984 <webidl>NoInterfaceObject</webidl>
25985 </ExtendedAttribute>
25986 </ExtendedAttributeList>
25987 <Attribute readonly="readonly" name="editableAttributes" id="::Content::Content::editableAttributes">
25988 <webidl> readonly attribute DOMString[] editableAttributes;</webidl>
25991 The list of attributes that can be editable to the local backend using update or updateBatch method.
25997 <Type type="array">
25998 <Type type="DOMString"/>
26001 <Attribute readonly="readonly" name="id" id="::Content::Content::id">
26002 <webidl> readonly attribute <ref>ContentId</ref> id;</webidl>
26005 The opaque content identifier.
26011 <Type name="ContentId"/>
26013 <Attribute name="name" id="::Content::Content::name">
26014 <webidl> attribute DOMString name;</webidl>
26017 The content name. The initial value is the file name of the content.
26023 <Type type="DOMString"/>
26025 <Attribute readonly="readonly" name="type" id="::Content::Content::type">
26026 <webidl> readonly attribute <ref>ContentType</ref> type;</webidl>
26035 <Type name="ContentType"/>
26037 <Attribute readonly="readonly" name="mimeType" id="::Content::Content::mimeType">
26038 <webidl> readonly attribute DOMString mimeType;</webidl>
26041 The content MIME type.
26047 <Type type="DOMString"/>
26049 <Attribute readonly="readonly" name="title" id="::Content::Content::title">
26050 <webidl> readonly attribute DOMString title;</webidl>
26059 <Type type="DOMString"/>
26061 <Attribute readonly="readonly" name="contentURI" id="::Content::Content::contentURI">
26062 <webidl> readonly attribute DOMString contentURI;</webidl>
26065 The URI to access the content.
26071 <Type type="DOMString"/>
26073 <Attribute readonly="readonly" name="thumbnailURIs" id="::Content::Content::thumbnailURIs">
26074 <webidl> readonly attribute DOMString[]? thumbnailURIs;</webidl>
26077 The array of content thumbnails URIs.
26083 <Type type="array" nullable="nullable">
26084 <Type type="DOMString"/>
26087 <Attribute readonly="readonly" name="releaseDate" id="::Content::Content::releaseDate">
26088 <webidl> readonly attribute Date? releaseDate;</webidl>
26091 The date when a content has been released to the public. If only the release year is known, then the month and date are set to January and 1st respectively.
26097 <Type type="Date" nullable="nullable"/>
26099 <Attribute readonly="readonly" name="modifiedDate" id="::Content::Content::modifiedDate">
26100 <webidl> readonly attribute Date? modifiedDate;</webidl>
26103 The last modified date for a content.
26109 <Type type="Date" nullable="nullable"/>
26111 <Attribute readonly="readonly" name="size" id="::Content::Content::size">
26112 <webidl> readonly attribute unsigned long size;</webidl>
26115 The file size of the content in bytes.
26121 <Type type="unsigned long"/>
26123 <Attribute name="description" id="::Content::Content::description">
26124 <webidl> attribute DOMString? description;</webidl>
26127 The content description.
26133 <Type type="DOMString" nullable="nullable"/>
26135 <Attribute name="rating" id="::Content::Content::rating">
26136 <webidl> attribute unsigned long rating;</webidl>
26139 The content rating and this value can vary from <var>0 </var>to <var>10</var>.
26145 <Type type="unsigned long"/>
26148 <Interface name="VideoContent" id="::Content::VideoContent">
26149 <webidl> [NoInterfaceObject] interface VideoContent : <ref>Content</ref> {
26151 attribute <ref>SimpleCoordinates</ref>? geolocation;
26153 readonly attribute DOMString? album;
26155 readonly attribute DOMString[]? artists;
26157 readonly attribute unsigned long duration;
26159 readonly attribute unsigned long width;
26161 readonly attribute unsigned long height;
26166 This interface extends a basic <em>Content </em>object with video-specific attributes.
26172 <ExtendedAttributeList>
26173 <ExtendedAttribute name="NoInterfaceObject">
26174 <webidl>NoInterfaceObject</webidl>
26175 </ExtendedAttribute>
26176 </ExtendedAttributeList>
26177 <InterfaceInheritance>
26178 <Name name="Content"/>
26179 </InterfaceInheritance>
26180 <Attribute name="geolocation" id="::Content::VideoContent::geolocation">
26181 <webidl> attribute <ref>SimpleCoordinates</ref>? geolocation;</webidl>
26184 The geographical location where the video was made.
26190 <Type name="SimpleCoordinates" nullable="nullable"/>
26192 <Attribute readonly="readonly" name="album" id="::Content::VideoContent::album">
26193 <webidl> readonly attribute DOMString? album;</webidl>
26196 The album name to which the video belongs.
26202 <Type type="DOMString" nullable="nullable"/>
26204 <Attribute readonly="readonly" name="artists" id="::Content::VideoContent::artists">
26205 <webidl> readonly attribute DOMString[]? artists;</webidl>
26208 The list of artists who created the video.
26214 <Type type="array" nullable="nullable">
26215 <Type type="DOMString"/>
26218 <Attribute readonly="readonly" name="duration" id="::Content::VideoContent::duration">
26219 <webidl> readonly attribute unsigned long duration;</webidl>
26222 The video duration in milliseconds.
26228 <Type type="unsigned long"/>
26230 <Attribute readonly="readonly" name="width" id="::Content::VideoContent::width">
26231 <webidl> readonly attribute unsigned long width;</webidl>
26234 The width of a video in pixels.
26240 <Type type="unsigned long"/>
26242 <Attribute readonly="readonly" name="height" id="::Content::VideoContent::height">
26243 <webidl> readonly attribute unsigned long height;</webidl>
26246 The height of the video in pixels.
26252 <Type type="unsigned long"/>
26255 <Interface name="AudioContentLyrics" id="::Content::AudioContentLyrics">
26256 <webidl> [NoInterfaceObject] interface AudioContentLyrics {
26258 readonly attribute <ref>AudioContentLyricsType</ref> type;
26260 readonly attribute unsigned long[] timestamps;
26262 readonly attribute DOMString[] texts;
26266 This interface provides lyrics for music.
26272 <ExtendedAttributeList>
26273 <ExtendedAttribute name="NoInterfaceObject">
26274 <webidl>NoInterfaceObject</webidl>
26275 </ExtendedAttribute>
26276 </ExtendedAttributeList>
26277 <Attribute readonly="readonly" name="type" id="::Content::AudioContentLyrics::type">
26278 <webidl> readonly attribute <ref>AudioContentLyricsType</ref> type;</webidl>
26281 The type of lyrics, that is, whether they are synchronized with the music or not.
26287 <Type name="AudioContentLyricsType"/>
26289 <Attribute readonly="readonly" name="timestamps" id="::Content::AudioContentLyrics::timestamps">
26290 <webidl> readonly attribute unsigned long[] timestamps;</webidl>
26293 The array of timestamps in milliseconds for lyrics.
26297 If the lyrics are not synchronized (if there is no time information for the lyrics) the array is undefined.
26304 <Type type="array">
26305 <Type type="unsigned long"/>
26308 <Attribute readonly="readonly" name="texts" id="::Content::AudioContentLyrics::texts">
26309 <webidl> readonly attribute DOMString[] texts;</webidl>
26312 The array of lyric snippets.
26316 If the lyrics are not synchronized, the array has only one member with full lyrics.
26323 <Type type="array">
26324 <Type type="DOMString"/>
26328 <Interface name="AudioContent" id="::Content::AudioContent">
26329 <webidl> [NoInterfaceObject] interface AudioContent : <ref>Content</ref> {
26331 readonly attribute DOMString? album;
26333 readonly attribute DOMString[]? genres;
26335 readonly attribute DOMString[]? artists;
26337 readonly attribute DOMString[]? composers;
26339 readonly attribute <ref>AudioContentLyrics</ref>? lyrics;
26341 readonly attribute DOMString? copyright;
26343 readonly attribute unsigned long bitrate;
26345 readonly attribute unsigned short? trackNumber;
26347 readonly attribute unsigned long duration;
26352 This interface extends a basic <em>Content </em>object with audio-specific attributes.
26358 <ExtendedAttributeList>
26359 <ExtendedAttribute name="NoInterfaceObject">
26360 <webidl>NoInterfaceObject</webidl>
26361 </ExtendedAttribute>
26362 </ExtendedAttributeList>
26363 <InterfaceInheritance>
26364 <Name name="Content"/>
26365 </InterfaceInheritance>
26366 <Attribute readonly="readonly" name="album" id="::Content::AudioContent::album">
26367 <webidl> readonly attribute DOMString? album;</webidl>
26370 The album name to which the audio belongs.
26376 <Type type="DOMString" nullable="nullable"/>
26378 <Attribute readonly="readonly" name="genres" id="::Content::AudioContent::genres">
26379 <webidl> readonly attribute DOMString[]? genres;</webidl>
26382 The list of genres to which the audio belongs.
26388 <Type type="array" nullable="nullable">
26389 <Type type="DOMString"/>
26392 <Attribute readonly="readonly" name="artists" id="::Content::AudioContent::artists">
26393 <webidl> readonly attribute DOMString[]? artists;</webidl>
26396 The list of artists who created the audio.
26402 <Type type="array" nullable="nullable">
26403 <Type type="DOMString"/>
26406 <Attribute readonly="readonly" name="composers" id="::Content::AudioContent::composers">
26407 <webidl> readonly attribute DOMString[]? composers;</webidl>
26410 The list of composers for the music.
26416 <Type type="array" nullable="nullable">
26417 <Type type="DOMString"/>
26420 <Attribute readonly="readonly" name="lyrics" id="::Content::AudioContent::lyrics">
26421 <webidl> readonly attribute <ref>AudioContentLyrics</ref>? lyrics;</webidl>
26424 The lyrics of a song in an audio file.
26430 <Type name="AudioContentLyrics" nullable="nullable"/>
26432 <Attribute readonly="readonly" name="copyright" id="::Content::AudioContent::copyright">
26433 <webidl> readonly attribute DOMString? copyright;</webidl>
26436 The copyright information.
26442 <Type type="DOMString" nullable="nullable"/>
26444 <Attribute readonly="readonly" name="bitrate" id="::Content::AudioContent::bitrate">
26445 <webidl> readonly attribute unsigned long bitrate;</webidl>
26448 The audio bitrate in bits per second. By default, this value is 0.
26454 <Type type="unsigned long"/>
26456 <Attribute readonly="readonly" name="trackNumber" id="::Content::AudioContent::trackNumber">
26457 <webidl> readonly attribute unsigned short? trackNumber;</webidl>
26460 The track number if the audio belongs to an album.
26466 <Type type="unsigned short" nullable="nullable"/>
26468 <Attribute readonly="readonly" name="duration" id="::Content::AudioContent::duration">
26469 <webidl> readonly attribute unsigned long duration;</webidl>
26472 The audio duration in milliseconds.
26478 <Type type="unsigned long"/>
26481 <Interface name="ImageContent" id="::Content::ImageContent">
26482 <webidl> [NoInterfaceObject] interface ImageContent : <ref>Content</ref> {
26484 attribute <ref>SimpleCoordinates</ref>? geolocation;
26486 readonly attribute unsigned long width;
26488 readonly attribute unsigned long height;
26490 attribute <ref>ImageContentOrientation</ref> orientation;
26495 This interface extends a basic <em>Content </em>object with image-specific attributes.
26501 <ExtendedAttributeList>
26502 <ExtendedAttribute name="NoInterfaceObject">
26503 <webidl>NoInterfaceObject</webidl>
26504 </ExtendedAttribute>
26505 </ExtendedAttributeList>
26506 <InterfaceInheritance>
26507 <Name name="Content"/>
26508 </InterfaceInheritance>
26509 <Attribute name="geolocation" id="::Content::ImageContent::geolocation">
26510 <webidl> attribute <ref>SimpleCoordinates</ref>? geolocation;</webidl>
26513 The geographical location where the image has been made.
26519 <Type name="SimpleCoordinates" nullable="nullable"/>
26521 <Attribute readonly="readonly" name="width" id="::Content::ImageContent::width">
26522 <webidl> readonly attribute unsigned long width;</webidl>
26525 The width of an image in pixels.
26531 <Type type="unsigned long"/>
26533 <Attribute readonly="readonly" name="height" id="::Content::ImageContent::height">
26534 <webidl> readonly attribute unsigned long height;</webidl>
26537 The height of an image in pixels.
26543 <Type type="unsigned long"/>
26545 <Attribute name="orientation" id="::Content::ImageContent::orientation">
26546 <webidl> attribute <ref>ImageContentOrientation</ref> orientation;</webidl>
26549 The image orientation.
26555 <Type name="ImageContentOrientation"/>
26559 <Module name="DataControl" id="::DataControl">
26560 <webidl>module DataControl {
26561 enum DataType { "MAP", "SQL"};
26563 [NoInterfaceObject] interface DataControlManagerObject {
26564 readonly attribute <ref>DataControlManager</ref> datacontrol;
26566 <ref>Tizen</ref> implements <ref>DataControlManagerObject</ref>;
26569 [NoInterfaceObject] interface DataControlManager {
26570 <ref>DataControlConsumerObject</ref> getDataControlConsumer(DOMString providerId, DOMString dataId, <ref>DataType</ref> type) raises(<ref>WebAPIException</ref>);
26574 [NoInterfaceObject] interface DataControlConsumerObject {
26575 readonly attribute <ref>DataType</ref> type;
26576 readonly attribute DOMString providerId;
26577 readonly attribute DOMString dataId;
26581 [NoInterfaceObject] interface SQLDataControlConsumer : <ref>DataControlConsumerObject</ref> {
26582 void insert(unsigned long reqId, <ref>RowData</ref> insertionData,
26583 optional <ref>DataControlInsertSuccessCallback</ref>? successCallback,
26584 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26586 void update(unsigned long reqId, <ref>RowData</ref> updateData, DOMString where,
26587 optional <ref>DataControlSuccessCallback</ref>? successCallback,
26588 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26590 void remove(unsigned long reqId, DOMString where,
26591 optional <ref>DataControlSuccessCallback</ref>? successCallback,
26592 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26595 void select(unsigned long reqId, DOMString[] columns, DOMString where,
26596 <ref>DataControlSelectSuccessCallback</ref> successCallback, optional <ref>DataControlErrorCallback</ref>? errorCallback,
26597 optional unsigned long? page, optional unsigned long? maxNumberPerPage) raises(<ref>WebAPIException</ref>);
26600 [NoInterfaceObject] interface MappedDataControlConsumer : <ref>DataControlConsumerObject</ref> {
26601 void addValue(unsigned long reqId, DOMString key, DOMString value,
26602 optional <ref>DataControlSuccessCallback</ref>? successCallback,
26603 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26605 void removeValue(unsigned long reqId, DOMString key, DOMString value,
26606 <ref>DataControlSuccessCallback</ref> successCallback,
26607 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26609 void getValue(unsigned long reqId, DOMString key,
26610 <ref>DataControlGetValueSuccessCallback</ref> successCallback,
26611 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26613 void updateValue(unsigned long reqId, DOMString key, DOMString oldValue, DOMString newValue,
26614 <ref>DataControlSuccessCallback</ref> successCallback,
26615 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26619 [Callback=FunctionOnly, NoInterfaceObject] interface DataControlSuccessCallback {
26620 void onsuccess(unsigned long reqId);
26624 [Callback=FunctionOnly, NoInterfaceObject] interface DataControlErrorCallback {
26625 void onerror(unsigned long reqId, <ref>WebAPIError</ref> error);
26629 [Callback=FunctionOnly, NoInterfaceObject] interface DataControlInsertSuccessCallback {
26630 void onsuccess(unsigned long reqId, long insertRowId);
26635 [Callback=FunctionOnly, NoInterfaceObject] interface DataControlSelectSuccessCallback {
26636 void onsuccess(<ref>RowData</ref>[] rows, unsigned long reqId);
26640 [Callback=FunctionOnly, NoInterfaceObject] interface DataControlGetValueSuccessCallback {
26641 void onsuccess(DOMString[] values, unsigned long reqid);
26645 dictionary RowData {
26646 DOMString[] columns;
26647 DOMString[] values;
26652 This specification defines a DataControl API for applications.
26656 The DataControl functionality provides a way to access specific data that is exported by other applications.
26659 Please read the <a href="../../org.tizen.native.appprogramming/html/guide/app/data_controls.htm">Native DataControl API</a> to know how to share own application data with other applications.
26666 <Enum name="DataType" id="::DataControl::DataType">
26667 <webidl> enum DataType { "MAP", "SQL"};</webidl>
26676 <EnumValue stringvalue="MAP">
26677 <webidl> "MAP</webidl>
26679 <EnumValue stringvalue="SQL">
26680 <webidl> "SQL</webidl>
26683 <Interface name="DataControlManagerObject" id="::DataControl::DataControlManagerObject">
26684 <webidl> [NoInterfaceObject] interface DataControlManagerObject {
26685 readonly attribute <ref>DataControlManager</ref> datacontrol;
26689 Defines what is instantiated in the <em>Tizen</em> object.
26693 There is a <em>tizen.datacontrol</em> object that allows access to the
26701 <ExtendedAttributeList>
26702 <ExtendedAttribute name="NoInterfaceObject">
26703 <webidl>NoInterfaceObject</webidl>
26704 </ExtendedAttribute>
26705 </ExtendedAttributeList>
26706 <Attribute readonly="readonly" name="datacontrol" id="::DataControl::DataControlManagerObject::datacontrol">
26707 <webidl> readonly attribute <ref>DataControlManager</ref> datacontrol;</webidl>
26708 <Type name="DataControlManager"/>
26711 <Implements name1="Tizen" name2="DataControlManagerObject">
26712 <webidl> <ref>Tizen</ref> implements <ref>DataControlManagerObject</ref>;</webidl>
26714 <Interface name="DataControlManager" id="::DataControl::DataControlManager">
26715 <webidl> [NoInterfaceObject] interface DataControlManager {
26716 <ref>DataControlConsumerObject</ref> getDataControlConsumer(DOMString providerId, DOMString dataId, <ref>DataType</ref> type) raises(<ref>WebAPIException</ref>);
26720 This interface provides access to the <em>DataControlManager </em>object.
26726 <ExtendedAttributeList>
26727 <ExtendedAttribute name="NoInterfaceObject">
26728 <webidl>NoInterfaceObject</webidl>
26729 </ExtendedAttribute>
26730 </ExtendedAttributeList>
26731 <Operation name="getDataControlConsumer" id="::DataControl::DataControlManager::getDataControlConsumer">
26732 <webidl> <ref>DataControlConsumerObject</ref> getDataControlConsumer(DOMString providerId, DOMString dataId, <ref>DataType</ref> type) raises(<ref>WebAPIException</ref>);</webidl>
26735 Gets <em>DataControlConsumerObject</em> with a given DataType.
26744 http://tizen.org/privilege/datacontrol.consumer
26746 <Code> //The data provider, a native application, should be pre-installed and launched.
26747 //The same provider id should be defined for the use of this API between a native application(provider) and a web application(consumer).
26748 //In this example, DictionaryDataControlProvider native sample application is used as a data control provider.
26750 //Gets SQL type DataControlConsumerObject
26752 var globalSQLConsumer = tizen.datacontrol.getDataControlConsumer(
26753 "http://tizen.org/datacontrol/provider/DictionaryDataControlProvider", "Dictionary", "SQL");
26755 console.log (err.name +": " + err.message);
26757 // Gets MAP type DataControlConsumerObject
26759 globalMappedConsumer = tizen.datacontrol.getDataControlConsumer(
26760 "http://tizen.org/datacontrol/provider/DictionaryDataControlProvider", "Dictionary", "MAP");
26762 console.log (err.name +": " + err.message);
26766 <Type name="DataControlConsumerObject">
26769 DataControlConsumerObject The local <em>DataControlConsumerObject</em>.
26774 <Argument name="providerId">
26777 A provider ID to use and it should be shared between DataControl provider and DataControl consumer.
26780 <Type type="DOMString"/>
26782 <Argument name="dataId">
26785 A string for identifying a specific data.
26788 <Type type="DOMString"/>
26790 <Argument name="type">
26793 The DataType to use.
26796 <Type name="DataType"/>
26800 <RaiseException name="WebAPIException">
26803 with error type TypeMismatchError, if parameter type is mismatched.
26806 with error type SecurityError, if the application does not have the privilege to call this method.
26809 with error type UnknownError, if any other error occurs.
26816 <Interface name="DataControlConsumerObject" id="::DataControl::DataControlConsumerObject">
26817 <webidl> [NoInterfaceObject] interface DataControlConsumerObject {
26818 readonly attribute <ref>DataType</ref> type;
26819 readonly attribute DOMString providerId;
26820 readonly attribute DOMString dataId;
26824 This interface provides common attributes for other derived DataControlCunsumerObject.
26830 <ExtendedAttributeList>
26831 <ExtendedAttribute name="NoInterfaceObject">
26832 <webidl>NoInterfaceObject</webidl>
26833 </ExtendedAttribute>
26834 </ExtendedAttributeList>
26835 <Attribute readonly="readonly" name="type" id="::DataControl::DataControlConsumerObject::type">
26836 <webidl> readonly attribute <ref>DataType</ref> type;</webidl>
26839 An attribute to store the DataType.
26845 <Type name="DataType"/>
26847 <Attribute readonly="readonly" name="providerId" id="::DataControl::DataControlConsumerObject::providerId">
26848 <webidl> readonly attribute DOMString providerId;</webidl>
26851 An attribute to hold a provider identifier of the application whom it shares the DataControl with.
26852 This attribute should be known to users who want to interact with application to provide.
26858 <Type type="DOMString"/>
26860 <Attribute readonly="readonly" name="dataId" id="::DataControl::DataControlConsumerObject::dataId">
26861 <webidl> readonly attribute DOMString dataId;</webidl>
26864 The dataId identifies specific data, usually a database table to process(insert, delete, update).
26865 The string consists of one or more components, separated by a slash('/').
26871 <Type type="DOMString"/>
26874 <Interface name="SQLDataControlConsumer" id="::DataControl::SQLDataControlConsumer">
26875 <webidl> [NoInterfaceObject] interface SQLDataControlConsumer : <ref>DataControlConsumerObject</ref> {
26876 void insert(unsigned long reqId, <ref>RowData</ref> insertionData,
26877 optional <ref>DataControlInsertSuccessCallback</ref>? successCallback,
26878 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26880 void update(unsigned long reqId, <ref>RowData</ref> updateData, DOMString where,
26881 optional <ref>DataControlSuccessCallback</ref>? successCallback,
26882 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26884 void remove(unsigned long reqId, DOMString where,
26885 optional <ref>DataControlSuccessCallback</ref>? successCallback,
26886 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26889 void select(unsigned long reqId, DOMString[] columns, DOMString where,
26890 <ref>DataControlSelectSuccessCallback</ref> successCallback, optional <ref>DataControlErrorCallback</ref>? errorCallback,
26891 optional unsigned long? page, optional unsigned long? maxNumberPerPage) raises(<ref>WebAPIException</ref>);
26895 This interface defines SQL data type operatiors.
26901 <ExtendedAttributeList>
26902 <ExtendedAttribute name="NoInterfaceObject">
26903 <webidl>NoInterfaceObject</webidl>
26904 </ExtendedAttribute>
26905 </ExtendedAttributeList>
26906 <InterfaceInheritance>
26907 <Name name="DataControlConsumerObject"/>
26908 </InterfaceInheritance>
26909 <Operation name="insert" id="::DataControl::SQLDataControlConsumer::insert">
26910 <webidl> void insert(unsigned long reqId, <ref>RowData</ref> insertionData,
26911 optional <ref>DataControlInsertSuccessCallback</ref>? successCallback,
26912 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
26915 Inserts new rows into a table owned by an SQL-type data control provider.
26924 http://tizen.org/privilege/datacontrol.consumer
26926 <Code> function successcb(id)
26928 console.log("ok : reqid "+ id);
26931 function errorcb(id, error)
26933 console.log("error id : " + id + ", error msg : " + error.message);
26938 columns : ["WORD", "WORD_DESC"] ,
26939 values : ["'tizen1'", "'tizen2'"]
26941 // Defines globalReqId before
26942 // Increases globalReqId for uniqueness
26944 globalSQLConsumer.insert(globalReqId, rowData, successcb, errorcb);
26946 console.log (err.name +": " + err.message);
26950 <Type type="void"/>
26952 <Argument name="reqId">
26955 A unique identifier for the current operation.<br/>So a developer should increase <em>reqId </em>value to ensure it is unique for each method.
26958 <Type type="unsigned long"/>
26960 <Argument name="insertionData">
26963 The data on columns and values to insert.
26966 <Type name="RowData"/>
26968 <Argument optional="optional" name="successCallback">
26971 The method to invoke when the asynchronous call completes successfully.
26974 <Type name="DataControlInsertSuccessCallback" nullable="nullable"/>
26976 <Argument optional="optional" name="errorCallback">
26979 The method to invoke when an error occurs.
26982 <Type name="DataControlErrorCallback" nullable="nullable"/>
26986 <RaiseException name="WebAPIException">
26989 with error type TypeMismatchError, if parameter type is not compatible with the expected type for that parameter.
26992 with error type InvalidValuesError, if the passed parameter is not available on data provider side or platform or if an SQL query with invalid parameters has been made.
26995 with error type IOError, if a DB operation has failed.
26998 with error type SecurityError, if the application does not have the privilege to call this method.
27001 with error type UnknownError, if any other error occurs.
27007 <Operation name="update" id="::DataControl::SQLDataControlConsumer::update">
27008 <webidl> void update(unsigned long reqId, <ref>RowData</ref> updateData, DOMString where,
27009 optional <ref>DataControlSuccessCallback</ref>? successCallback,
27010 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
27013 Updates values of a table owned by an SQL-type data control provider.
27022 http://tizen.org/privilege/datacontrol.consumer
27024 <Code> function successcb(id)
27026 console.log("ok : reqid " + id);
27029 function errorcb(id, error)
27031 console.log("error id : " + id + ", error msg : " + error.message);
27036 columns : ["WORD", "WORD_DESC"] ,
27037 values : ["'tizen1'", "'samsung platform!'"]
27039 // Defines globalReqId before
27040 // Increases globalReqId for uniqueness
27042 globalSQLConsumer.update(globalReqId, rowData, "WORD='tizen1'", successcb, errorcb);
27044 console.log (err.name +": " + err.message);
27048 <Type type="void"/>
27050 <Argument name="reqId">
27053 A unique identifier for the current operation.<br/>So a developer should increase <em>reqId </em>value to ensure it is unique for each method.
27056 <Type type="unsigned long"/>
27058 <Argument name="updateData">
27061 The data on columns and values to update.
27064 <Type name="RowData"/>
27066 <Argument name="where">
27069 A filter to select desired rows to update. <br/>It is an SQL <var>WHERE</var> clause excluding the <var>WHERE</var> itself such as <var>column1 = 'stringValue' AND column2 = numericValue</var>.
27072 <Type type="DOMString"/>
27074 <Argument optional="optional" name="successCallback">
27077 The method to invoke when the asynchronous call completes successfully.
27080 <Type name="DataControlSuccessCallback" nullable="nullable"/>
27082 <Argument optional="optional" name="errorCallback">
27085 The method to invoke when an error occurs.
27088 <Type name="DataControlErrorCallback" nullable="nullable"/>
27092 <RaiseException name="WebAPIException">
27095 with error type TypeMismatchError, if parameter type is not compatible with the expected type for that parameter.
27098 with error type InvalidValuesError, if the passed parameter is not available on data provider side or platform or if an SQL query with invalid parameters has been made.
27101 with error type IOError, if a DB operation has failed.
27104 with error type SecurityError, if the application does not have the privilege to call this method.
27107 with error type UnknownError, if any other error occurs.
27113 <Operation name="remove" id="::DataControl::SQLDataControlConsumer::remove">
27114 <webidl> void remove(unsigned long reqId, DOMString where,
27115 optional <ref>DataControlSuccessCallback</ref>? successCallback,
27116 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
27119 Delete rows from a table that is owned by an SQL-type data control provider.
27128 http://tizen.org/privilege/datacontrol.consumer
27130 <Code> function successcb(id)
27132 console.log("ok : reqid " + id);
27135 function errorcb(id, error)
27137 console.log("error id : " + id + ", error msg : " + error.message);
27141 // Defines globalReqId before
27142 // Increases globalReqId for uniqueness
27144 globalSQLConsumer.remove(globalReqId, "WORD='tizen1'", successcb, errorcb);
27146 console.log (err.name +": " + err.message);
27150 <Type type="void"/>
27152 <Argument name="reqId">
27155 A unique identifier for the current operation.<br/>So a developer should increase <em>reqId </em>value to ensure it is unique for each method.
27158 <Type type="unsigned long"/>
27160 <Argument name="where">
27163 A filter to select desired rows to remove. <br/>It is an SQL <var>WHERE</var> clause excluding the <var>WHERE</var> itself such as <var>column1 = 'stringValue' AND column2 = numericValue</var>.
27166 <Type type="DOMString"/>
27168 <Argument optional="optional" name="successCallback">
27171 The method to invoke when the asynchronous call completes successfully.
27174 <Type name="DataControlSuccessCallback" nullable="nullable"/>
27176 <Argument optional="optional" name="errorCallback">
27179 The method to invoke when an error occurs.
27182 <Type name="DataControlErrorCallback" nullable="nullable"/>
27186 <RaiseException name="WebAPIException">
27189 with error type TypeMismatchError, if parameter type is not compatible with the expected type for that parameter.
27192 with error type InvalidValuesError, if the passed parameter is not available on data provider side or platform or if an SQL query with invalid parameters is made.
27195 with error type IOError, if a DB operation has failed.
27198 with error type SecurityError, if the application does not have the privilege to call this method.
27201 with error type UnknownError, if any other error occurs.
27207 <Operation name="select" id="::DataControl::SQLDataControlConsumer::select">
27208 <webidl> void select(unsigned long reqId, DOMString[] columns, DOMString where,
27209 <ref>DataControlSelectSuccessCallback</ref> successCallback, optional <ref>DataControlErrorCallback</ref>? errorCallback,
27210 optional unsigned long? page, optional unsigned long? maxNumberPerPage) raises(<ref>WebAPIException</ref>);</webidl>
27213 Selects the specified columns to be queried. The result set of the specified columns is retrieved from a table owned by an SQL-type data control provider.
27222 http://tizen.org/privilege/datacontrol.consumer
27224 <Code> function getValueSuccessCB(result, id)
27226 var length = result.length;
27227 for (var i = 0; i < length; i++)
27230 for (j = 0; j < result[i].columns.length; j++)
27232 console.log("column: " + result[i].columns[j] + ", value: " + result[i].values[j]);
27237 function errorcb(id, error)
27239 console.log("error id : " + id + ", error msg : " + error.message);
27243 // Defines globalReqId before
27244 // Increases globalReqId for uniqueness
27245 var array = ["WORD", "WORD_DESC" ];
27247 globalSQLConsumer.select(globalReqId, array, "WORD='tizen1'", getValueSuccessCB, errorcb);
27250 console.log (err.name +": " + err.message);
27256 <Type type="void"/>
27258 <Argument name="reqId">
27261 A unique identifier for the current operation.<br/>So a developer should increase <em>reqId </em>value to ensure it is unique for each method.
27264 <Type type="unsigned long"/>
27266 <Argument name="columns">
27269 The columns to select.
27272 <Type type="array">
27273 <Type type="DOMString"/>
27276 <Argument name="where">
27279 A filter to select desired rows. <br/>It is an SQL <var>WHERE</var> clause excluding the <var>WHERE</var> itself such as <var>column1 = 'stringValue' AND column2 = numericValue</var>.
27282 <Type type="DOMString"/>
27284 <Argument name="successCallback">
27287 The method to invoke when the asynchronous call completes successfully.
27290 <Type name="DataControlSelectSuccessCallback"/>
27292 <Argument optional="optional" name="errorCallback">
27295 The method to invoke when an error occurs.
27298 <Type name="DataControlErrorCallback" nullable="nullable"/>
27300 <Argument optional="optional" name="page">
27303 The page number of the result set. <br/>It starts from <var>1</var>. If the number is out of page, DataControlSelectSuccessCallback will be invoked with no result data.
27306 <Type type="unsigned long" nullable="nullable"/>
27308 <Argument optional="optional" name="maxNumberPerPage">
27311 The maximum number of rows on a page.
27314 <Type type="unsigned long" nullable="nullable"/>
27318 <RaiseException name="WebAPIException">
27321 with error type TypeMismatchError, if parameter type is not compatible with the expected type for that parameter.
27324 with error type InvalidValuesError, if the passed parameter is not available on data provider side or platform or if an SQL query with invalid parameters has been made.
27327 with error type IOError, if a DB operation has failed.
27330 with error type SecurityError, if the application does not have the privilege to call this method.
27333 with error type UnknownError, if any other error occurs.
27340 <Interface name="MappedDataControlConsumer" id="::DataControl::MappedDataControlConsumer">
27341 <webidl> [NoInterfaceObject] interface MappedDataControlConsumer : <ref>DataControlConsumerObject</ref> {
27342 void addValue(unsigned long reqId, DOMString key, DOMString value,
27343 optional <ref>DataControlSuccessCallback</ref>? successCallback,
27344 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
27346 void removeValue(unsigned long reqId, DOMString key, DOMString value,
27347 <ref>DataControlSuccessCallback</ref> successCallback,
27348 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
27350 void getValue(unsigned long reqId, DOMString key,
27351 <ref>DataControlGetValueSuccessCallback</ref> successCallback,
27352 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
27354 void updateValue(unsigned long reqId, DOMString key, DOMString oldValue, DOMString newValue,
27355 <ref>DataControlSuccessCallback</ref> successCallback,
27356 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
27360 This interface defines MAP data type operators.
27366 <ExtendedAttributeList>
27367 <ExtendedAttribute name="NoInterfaceObject">
27368 <webidl>NoInterfaceObject</webidl>
27369 </ExtendedAttribute>
27370 </ExtendedAttributeList>
27371 <InterfaceInheritance>
27372 <Name name="DataControlConsumerObject"/>
27373 </InterfaceInheritance>
27374 <Operation name="addValue" id="::DataControl::MappedDataControlConsumer::addValue">
27375 <webidl> void addValue(unsigned long reqId, DOMString key, DOMString value,
27376 optional <ref>DataControlSuccessCallback</ref>? successCallback,
27377 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
27380 Adds the value associated with the specified key to a key-values map owned by MAP-type data control provider.
27389 http://tizen.org/privilege/datacontrol.consumer
27392 function successcb(id)
27394 console.log("ok : reqid " + id);
27397 function errorcb(id, error)
27399 console.log("error id : " + id + ", error msg : " + error.message);
27403 // Defines globalReqId before
27404 // Increases globalReqId for uniqueness
27406 globalMappedConsumer.addValue(globalReqId, "tizen", "samsung", successcb, errorcb);
27408 console.log (err.name +": " + err.message);
27412 <Type type="void"/>
27414 <Argument name="reqId">
27417 A unique identifier for the current operation.<br/>So a developer should increase <em>reqId </em>value to ensure it is unique for each method.
27420 <Type type="unsigned long"/>
27422 <Argument name="key">
27425 The key to search a mapped data.
27428 <Type type="DOMString"/>
27430 <Argument name="value">
27433 The value to add into values array mapped by the key.
27436 <Type type="DOMString"/>
27438 <Argument optional="optional" name="successCallback">
27441 The method to invoke when the asynchronous call completes successfully.
27444 <Type name="DataControlSuccessCallback" nullable="nullable"/>
27446 <Argument optional="optional" name="errorCallback">
27449 The method to invoke when an error occurs.
27452 <Type name="DataControlErrorCallback" nullable="nullable"/>
27456 <RaiseException name="WebAPIException">
27459 with error type TypeMismatchError, if parameter type is not compatible with the expected type for that parameter.
27462 with error type InvalidValuesError, if the passed parameter is not available on data provider side or platform.
27465 with error type IOError, if a DB operation has failed.
27468 with error type SecurityError, if the application does not have the privilege to call this method.
27471 with error type UnknownError, if any other error occurs.
27477 <Operation name="removeValue" id="::DataControl::MappedDataControlConsumer::removeValue">
27478 <webidl> void removeValue(unsigned long reqId, DOMString key, DOMString value,
27479 <ref>DataControlSuccessCallback</ref> successCallback,
27480 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
27483 Removes the value associated with the specified key from a key-values map owned by MAP-type data control provider.
27492 http://tizen.org/privilege/datacontrol.consumer
27494 <Code> function successcb(id)
27496 console.log("ok : reqid " + id);
27499 function errorcb(id, error)
27501 console.log("error id : " + id + ", error msg : " + error.message);
27506 // Defines globalReqId before
27507 // Increases globalReqId for uniqueness
27509 globalMappedConsumer.removeValue(globalReqId, "tizen", "intel", successcb, errorcb);
27511 console.log (err.name +": " + err.message);
27515 <Type type="void"/>
27517 <Argument name="reqId">
27520 A unique identifier for the current operation. <br/>So a developer should increase <em>reqId </em>value to ensure it is unique for each method.
27523 <Type type="unsigned long"/>
27525 <Argument name="key">
27528 The key to search a mapped data.
27531 <Type type="DOMString"/>
27533 <Argument name="value">
27536 The value to remove from a values array mapped by the key.
27539 <Type type="DOMString"/>
27541 <Argument name="successCallback">
27544 The method to invoke when the asynchronous call completes successfully.
27547 <Type name="DataControlSuccessCallback"/>
27549 <Argument optional="optional" name="errorCallback">
27552 The method to invoke when an error occurs.
27555 <Type name="DataControlErrorCallback" nullable="nullable"/>
27559 <RaiseException name="WebAPIException">
27562 with error type TypeMismatchError, if parameter type is not compatible with the expected type for that parameter.
27565 with error type InvalidValuesError, if the passed parameter is not available in data provider side or platform.
27568 with error type IOError, if a DB operation has failed.
27571 with error type NotFoundError, if the key cannot be found.
27574 with error type SecurityError, if the application does not have the privilege to call this method.
27577 with error type UnknownError, if any other error occurs.
27583 <Operation name="getValue" id="::DataControl::MappedDataControlConsumer::getValue">
27584 <webidl> void getValue(unsigned long reqId, DOMString key,
27585 <ref>DataControlGetValueSuccessCallback</ref> successCallback,
27586 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
27589 Gets value associated with the specified key, from a key-values map owned by MAP-type data control provider.
27598 http://tizen.org/privilege/datacontrol.consumer
27600 <Code> function getValueSuccessCB(result, id)
27602 console.log(result.length + ":" + result[0]);
27605 function errorcb(id, error)
27607 console.log("error id : " + id + ", error msg : " + error.message);
27611 // Defines globalReqId before
27612 // Increases globalReqId for uniqueness
27614 globalMappedConsumer.getValue(globalReqId, "tizen", getValueSuccessCB, errorcb);
27616 console.log (err.name +": " + err.message);
27620 <Type type="void"/>
27622 <Argument name="reqId">
27625 A unique identifier for the current operation.<br/>So a developer should increase <em>reqId </em>value to ensure it is unique for each method.
27628 <Type type="unsigned long"/>
27630 <Argument name="key">
27633 The key to search a mapped data.
27636 <Type type="DOMString"/>
27638 <Argument name="successCallback">
27641 The method to invoke when the asynchronous call completes successfully.
27644 <Type name="DataControlGetValueSuccessCallback"/>
27646 <Argument optional="optional" name="errorCallback">
27649 The method to invoke when an error occurs.
27652 <Type name="DataControlErrorCallback" nullable="nullable"/>
27656 <RaiseException name="WebAPIException">
27659 with error type TypeMismatchError, if parameter type is not compatible with the expected type for that parameter.
27662 with error type InvalidValuesError, if the passed parameter is not available on data provider side or platform.
27665 with error type IOError, if a DB operation has failed.
27668 with error type NotFoundError, if the key cannot be found.
27671 with error type SecurityError, if the application does not have the privilege to call this method.
27674 with error type UnknownError, if any other error occurs.
27680 <Operation name="updateValue" id="::DataControl::MappedDataControlConsumer::updateValue">
27681 <webidl> void updateValue(unsigned long reqId, DOMString key, DOMString oldValue, DOMString newValue,
27682 <ref>DataControlSuccessCallback</ref> successCallback,
27683 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
27686 Sets the value associated with the specified key with a new value.
27695 http://tizen.org/privilege/datacontrol.consumer
27698 function successcb(id)
27700 console.log("ok : reqid " + id);
27703 function errorcb(id, error)
27705 console.log("error id : " + id + ", error msg : " + error.message);
27709 // Defines globalReqId before
27710 // Increases globalReqId for uniqueness
27712 globalMappedConsumer.updateValue(globalReqId, "tizen", "samsung", "intel", successcb, errorcb);
27714 console.log (err.name +": " + err.message);
27718 <Type type="void"/>
27720 <Argument name="reqId">
27723 A unique identifier for the current operation.<br/>So a developer should increase <em>reqId </em>value to ensure it is unique for each method.
27726 <Type type="unsigned long"/>
27728 <Argument name="key">
27731 The key to search a mapped data.
27734 <Type type="DOMString"/>
27736 <Argument name="oldValue">
27739 The value to update in values array mapped by the key.
27742 <Type type="DOMString"/>
27744 <Argument name="newValue">
27747 The new value to replace in values array mapped by the key.
27750 <Type type="DOMString"/>
27752 <Argument name="successCallback">
27755 The method to invoke when the asynchronous call completes successfully.
27758 <Type name="DataControlSuccessCallback"/>
27760 <Argument optional="optional" name="errorCallback">
27763 The method to invoke when an error occurs.
27766 <Type name="DataControlErrorCallback" nullable="nullable"/>
27770 <RaiseException name="WebAPIException">
27773 with error type TypeMismatchError, if parameter type is not compatible with the expected type for that parameter.
27776 with error type InvalidValuesError, if the passed parameter is not available on data provider side or platform.
27779 with error type IOError, if a DB operation has failed.
27782 with error type NotFoundError, if the key cannot be found.
27785 with error type SecurityError, if the application does not have the privilege to call this method.
27788 with error type UnknownError, if any other error occurs.
27795 <Interface name="DataControlSuccessCallback" id="::DataControl::DataControlSuccessCallback">
27796 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface DataControlSuccessCallback {
27797 void onsuccess(unsigned long reqId);
27801 This interface provides a SuccessCallback for DataControlConsumerObject.
27807 <ExtendedAttributeList>
27808 <ExtendedAttribute name="Callback" value="FunctionOnly">
27809 <webidl>Callback</webidl>
27810 </ExtendedAttribute>
27811 <ExtendedAttribute name="NoInterfaceObject">
27812 <webidl> NoInterfaceObject</webidl>
27813 </ExtendedAttribute>
27814 </ExtendedAttributeList>
27815 <Operation name="onsuccess" id="::DataControl::DataControlSuccessCallback::onsuccess">
27816 <webidl> void onsuccess(unsigned long reqId);</webidl>
27817 <Type type="void"/>
27819 <Argument name="reqId">
27820 <Type type="unsigned long"/>
27825 <Interface name="DataControlErrorCallback" id="::DataControl::DataControlErrorCallback">
27826 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface DataControlErrorCallback {
27827 void onerror(unsigned long reqId, <ref>WebAPIError</ref> error);
27831 This interface provides a ErrorCallback for DataControlConsumerObject.
27837 <ExtendedAttributeList>
27838 <ExtendedAttribute name="Callback" value="FunctionOnly">
27839 <webidl>Callback</webidl>
27840 </ExtendedAttribute>
27841 <ExtendedAttribute name="NoInterfaceObject">
27842 <webidl> NoInterfaceObject</webidl>
27843 </ExtendedAttribute>
27844 </ExtendedAttributeList>
27845 <Operation name="onerror" id="::DataControl::DataControlErrorCallback::onerror">
27846 <webidl> void onerror(unsigned long reqId, <ref>WebAPIError</ref> error);</webidl>
27847 <Type type="void"/>
27849 <Argument name="reqId">
27850 <Type type="unsigned long"/>
27852 <Argument name="error">
27853 <Type name="WebAPIError"/>
27858 <Interface name="DataControlInsertSuccessCallback" id="::DataControl::DataControlInsertSuccessCallback">
27859 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface DataControlInsertSuccessCallback {
27860 void onsuccess(unsigned long reqId, long insertRowId);
27864 This interface provides a SuccessCallback for SQLDataControlConsumer.insert().
27870 <ExtendedAttributeList>
27871 <ExtendedAttribute name="Callback" value="FunctionOnly">
27872 <webidl>Callback</webidl>
27873 </ExtendedAttribute>
27874 <ExtendedAttribute name="NoInterfaceObject">
27875 <webidl> NoInterfaceObject</webidl>
27876 </ExtendedAttribute>
27877 </ExtendedAttributeList>
27878 <Operation name="onsuccess" id="::DataControl::DataControlInsertSuccessCallback::onsuccess">
27879 <webidl> void onsuccess(unsigned long reqId, long insertRowId);</webidl>
27888 <Type type="void"/>
27890 <Argument name="reqId">
27893 A unique identifier for the current operation.<br/>so it is recommended to increase the <em>reqId</em> value every time to guarantee the uniqueness.
27896 <Type type="unsigned long"/>
27898 <Argument name="insertRowId">
27901 The inserted row ID set by the data control provider if the specified providerResult is <var>true</var>, else <var>-1</var>.
27904 <Type type="long"/>
27909 <Interface name="DataControlSelectSuccessCallback" id="::DataControl::DataControlSelectSuccessCallback">
27910 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface DataControlSelectSuccessCallback {
27911 void onsuccess(<ref>RowData</ref>[] rows, unsigned long reqId);
27915 This interface provides a SuccessCallback for SQLDataControlConsumer.select().
27921 <ExtendedAttributeList>
27922 <ExtendedAttribute name="Callback" value="FunctionOnly">
27923 <webidl>Callback</webidl>
27924 </ExtendedAttribute>
27925 <ExtendedAttribute name="NoInterfaceObject">
27926 <webidl> NoInterfaceObject</webidl>
27927 </ExtendedAttribute>
27928 </ExtendedAttributeList>
27929 <Operation name="onsuccess" id="::DataControl::DataControlSelectSuccessCallback::onsuccess">
27930 <webidl> void onsuccess(<ref>RowData</ref>[] rows, unsigned long reqId);</webidl>
27939 <Type type="void"/>
27941 <Argument name="rows">
27944 This attribute holds rows of SQL selection results from another application.<br/>The array operation of rows would be different from general javascript array behavior depends on platform implementation. For example, Array.isArray(rows) returns <em>false</em>.
27947 <Type type="array">
27948 <Type name="RowData"/>
27951 <Argument name="reqId">
27954 A unique identifier for the current operation.<br/>so it is recommended to increase the <em>reqId</em> value every time to guarantee the uniqueness.
27957 <Type type="unsigned long"/>
27962 <Interface name="DataControlGetValueSuccessCallback" id="::DataControl::DataControlGetValueSuccessCallback">
27963 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface DataControlGetValueSuccessCallback {
27964 void onsuccess(DOMString[] values, unsigned long reqid);
27968 This interface provides a SuccessCallback for MapDataControlConsumer.getValue().
27974 <ExtendedAttributeList>
27975 <ExtendedAttribute name="Callback" value="FunctionOnly">
27976 <webidl>Callback</webidl>
27977 </ExtendedAttribute>
27978 <ExtendedAttribute name="NoInterfaceObject">
27979 <webidl> NoInterfaceObject</webidl>
27980 </ExtendedAttribute>
27981 </ExtendedAttributeList>
27982 <Operation name="onsuccess" id="::DataControl::DataControlGetValueSuccessCallback::onsuccess">
27983 <webidl> void onsuccess(DOMString[] values, unsigned long reqid);</webidl>
27984 <Type type="void"/>
27986 <Argument name="values">
27987 <Type type="array">
27988 <Type type="DOMString"/>
27991 <Argument name="reqid">
27992 <Type type="unsigned long"/>
27997 <Dictionary name="RowData" id="::DataControl::RowData">
27998 <webidl> dictionary RowData {
27999 DOMString[] columns;
28000 DOMString[] values;
28004 The dictionary represents RowData holding 1 row of SQL selection results from another application.
28010 <DictionaryMember name="columns" id="::DataControl::RowData::columns">
28011 <webidl> DOMString[] columns;</webidl>
28014 An attribute to hold column names to select, update, and insert.
28020 <Type type="array">
28021 <Type type="DOMString"/>
28023 </DictionaryMember>
28024 <DictionaryMember name="values" id="::DataControl::RowData::values">
28025 <webidl> DOMString[] values;</webidl>
28028 An attribute to hold values of columns to select, update, and insert.
28034 <Type type="array">
28035 <Type type="DOMString"/>
28037 </DictionaryMember>
28040 <Module name="DataSynchronization" id="::DataSynchronization">
28041 <webidl>module DataSynchronization {
28043 typedef DOMString SyncProfileId;
28045 enum SyncMode { "MANUAL", "PERIODIC", "PUSH" };
28047 enum SyncType { "TWO_WAY", "SLOW", "ONE_WAY_FROM_CLIENT", "REFRESH_FROM_CLIENT", "ONE_WAY_FROM_SERVER", "REFRESH_FROM_SERVER" };
28049 enum SyncInterval { "5_MINUTES", "15_MINUTES", "1_HOUR", "4_HOURS", "12_HOURS", "1_DAY", "1_WEEK", "1_MONTH" };
28051 enum SyncServiceType { "CONTACT", "EVENT" };
28053 enum SyncStatus { "SUCCESS", "FAIL", "STOP", "NONE" };
28055 [NoInterfaceObject] interface DataSynchronizationManagerObject {
28056 readonly attribute <ref>DataSynchronizationManager</ref> datasync;
28059 <ref>Tizen</ref> implements <ref>DataSynchronizationManagerObject</ref>;
28061 [Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode),
28062 Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode, <ref>SyncType</ref> type),
28063 Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode, <ref>SyncInterval</ref> interval)]
28064 interface SyncInfo {
28065 attribute DOMString url;
28067 attribute DOMString id;
28069 attribute DOMString password;
28071 attribute <ref>SyncMode</ref> mode;
28073 attribute <ref>SyncType</ref>? type;
28075 attribute <ref>SyncInterval</ref>? interval;
28078 [Constructor(boolean enable, <ref>SyncServiceType</ref> serviceType, DOMString serverDatabaseUri, optional DOMString? id, optional DOMString? password)]
28079 interface SyncServiceInfo {
28080 attribute boolean enable;
28082 attribute <ref>SyncServiceType</ref> serviceType;
28084 attribute DOMString serverDatabaseUri;
28086 attribute DOMString? id;
28088 attribute DOMString? password;
28091 [Constructor(DOMString profileName, <ref>SyncInfo</ref> syncInfo, optional <ref>SyncServiceInfo</ref>[]? serviceInfo)]
28092 interface SyncProfileInfo {
28093 readonly attribute <ref>SyncProfileId</ref> profileId;
28095 attribute DOMString profileName;
28097 attribute <ref>SyncInfo</ref> syncInfo;
28099 attribute <ref>SyncServiceInfo</ref>[]? serviceInfo;
28102 [NoInterfaceObject] interface SyncStatistics {
28103 readonly attribute <ref>SyncStatus</ref> syncStatus;
28105 readonly attribute <ref>SyncServiceType</ref> serviceType;
28107 readonly attribute Date lastSyncTime;
28109 readonly attribute unsigned long serverToClientTotal;
28111 readonly attribute unsigned long serverToClientAdded;
28113 readonly attribute unsigned long serverToClientUpdated;
28115 readonly attribute unsigned long serverToClientRemoved;
28117 readonly attribute unsigned long clientToServerTotal;
28119 readonly attribute unsigned long clientToServerAdded;
28121 readonly attribute unsigned long clientToServerUpdated;
28123 readonly attribute unsigned long clientToServerRemoved;
28126 [NoInterfaceObject] interface DataSynchronizationManager {
28127 void add(<ref>SyncProfileInfo</ref> profile) raises(<ref>WebAPIException</ref>);
28129 void update(<ref>SyncProfileInfo</ref> profile) raises(<ref>WebAPIException</ref>);
28131 void remove(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);
28133 long getMaxProfilesNum() raises(<ref>WebAPIException</ref>);
28135 unsigned long getProfilesNum() raises(<ref>WebAPIException</ref>);
28137 <ref>SyncProfileInfo</ref> get(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);
28139 <ref>SyncProfileInfo</ref>[] getAll() raises(<ref>WebAPIException</ref>);
28141 void startSync(<ref>SyncProfileId</ref> profileId, optional <ref>SyncProgressCallback</ref>? progressCallback) raises(<ref>WebAPIException</ref>);
28143 void stopSync(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);
28145 <ref>SyncStatistics</ref>[] getLastSyncStatistics(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);
28148 [Callback, NoInterfaceObject] interface SyncProgressCallback {
28149 void onprogress(<ref>SyncProfileId</ref> profileId, <ref>SyncServiceType</ref> serviceType, boolean isFromServer, unsigned long totalPerService, unsigned long syncedPerService);
28151 void oncompleted(<ref>SyncProfileId</ref> profileId);
28153 void onstopped(<ref>SyncProfileId</ref> profileId);
28155 void onfailed(<ref>SyncProfileId</ref> profileId, <ref>WebAPIError</ref> error);
28160 This API provides methods to synchronize contact and event data to the server using the OMA DS 1.2 protocol.
28161 To know the details of this specification, visit <a href="http://www.openmobilealliance.org">OMA web page</a>. And for more information on the DataSync features, see <a href="../../org.tizen.web.appprogramming/html/guide/social_guide/datasync.htm">Data Synchronization Guide</a>.
28167 <Typedef name="SyncProfileId" id="::DataSynchronization::SyncProfileId">
28168 <webidl> typedef DOMString SyncProfileId;</webidl>
28171 An attribute to uniquely identify a sync profile.
28177 <Type type="DOMString"/>
28179 <Enum name="SyncMode" id="::DataSynchronization::SyncMode">
28180 <webidl> enum SyncMode { "MANUAL", "PERIODIC", "PUSH" };</webidl>
28183 An enumerator that indicates the supported synchronization modes.
28187 The following values are supported:
28191 MANUAL - Indicates that the synchronization starts by manual trigger. The sync type should be specified. The default value is <em>TWO_WAY</em>. </li>
28193 PERIODIC - Indicates that the synchronization starts automatically by a preset period. The sync interval should be provided. </li>
28195 PUSH - Indicates that the synchronization starts automatically when changes are made. The sync type is set to <em>TWO_WAY</em>. The synchronization can be triggered by the server based on the standard SAN(Server Alerted Notification) sync type. </li>
28202 <EnumValue stringvalue="MANUAL">
28203 <webidl> "MANUAL</webidl>
28205 <EnumValue stringvalue="PERIODIC">
28206 <webidl> "PERIODIC</webidl>
28208 <EnumValue stringvalue="PUSH">
28209 <webidl> "PUSH</webidl>
28212 <Enum name="SyncType" id="::DataSynchronization::SyncType">
28213 <webidl> enum SyncType { "TWO_WAY", "SLOW", "ONE_WAY_FROM_CLIENT", "REFRESH_FROM_CLIENT", "ONE_WAY_FROM_SERVER", "REFRESH_FROM_SERVER" };</webidl>
28216 An enumerator that indicates the supported synchronization types.
28220 The following values are supported:
28224 TWO_WAY - Indicates a normal sync type in which the client and the server exchange information about modified data in these devices. </li>
28226 SLOW - Indicates a form of two-way sync in which the client and the server exchange all the data from their database. This type of sync is used for the first sync, or after a synchronization failure. </li>
28228 ONE_WAY_FROM_CLIENT - Indicates a sync type in which the client sends its modifications to the server but the server does not send its modifications back to the client. </li>
28230 REFRESH_FROM_CLIENT - Indicates a sync type in which the client sends all its data from a database to the server (backup). The server is then expected to replace all data in the target database with the data received from the client. </li>
28232 ONE_WAY_FROM_SERVER - Indicates a sync type in which the client gets all modifications from the server but the client does not send its modifications to the server. </li>
28234 REFRESH_FROM_SERVER - Indicates a sync type in which the server sends all its data from a database to the client (restore). The client is then expected to replace all data in the target database with the data received from the server. </li>
28241 <EnumValue stringvalue="TWO_WAY">
28242 <webidl> "TWO_WAY</webidl>
28244 <EnumValue stringvalue="SLOW">
28245 <webidl> "SLOW</webidl>
28247 <EnumValue stringvalue="ONE_WAY_FROM_CLIENT">
28248 <webidl> "ONE_WAY_FROM_CLIENT</webidl>
28250 <EnumValue stringvalue="REFRESH_FROM_CLIENT">
28251 <webidl> "REFRESH_FROM_CLIENT</webidl>
28253 <EnumValue stringvalue="ONE_WAY_FROM_SERVER">
28254 <webidl> "ONE_WAY_FROM_SERVER</webidl>
28256 <EnumValue stringvalue="REFRESH_FROM_SERVER">
28257 <webidl> "REFRESH_FROM_SERVER</webidl>
28260 <Enum name="SyncInterval" id="::DataSynchronization::SyncInterval">
28261 <webidl> enum SyncInterval { "5_MINUTES", "15_MINUTES", "1_HOUR", "4_HOURS", "12_HOURS", "1_DAY", "1_WEEK", "1_MONTH" };</webidl>
28264 An enumerator that indicates the supported synchronization intervals.
28268 The following values are supported:
28272 5_MINUTES - Indicates a time period of 5 minutes. </li>
28274 15_MINUTES - Indicates a time period of 15 minutes. </li>
28276 1_HOUR - Indicates a time period of 1 hour. </li>
28278 4_HOURS - Indicates a time period of 4 hours. </li>
28280 12_HOURS - Indicates a time period of 12 hours. </li>
28282 1_DAY - Indicates a time period of 1 day. </li>
28284 1_WEEK - Indicates a time period of 1 week. </li>
28286 1_MONTH - Indicates a time period of 1 month. </li>
28293 <EnumValue stringvalue="5_MINUTES">
28294 <webidl> "5_MINUTES</webidl>
28296 <EnumValue stringvalue="15_MINUTES">
28297 <webidl> "15_MINUTES</webidl>
28299 <EnumValue stringvalue="1_HOUR">
28300 <webidl> "1_HOUR</webidl>
28302 <EnumValue stringvalue="4_HOURS">
28303 <webidl> "4_HOURS</webidl>
28305 <EnumValue stringvalue="12_HOURS">
28306 <webidl> "12_HOURS</webidl>
28308 <EnumValue stringvalue="1_DAY">
28309 <webidl> "1_DAY</webidl>
28311 <EnumValue stringvalue="1_WEEK">
28312 <webidl> "1_WEEK</webidl>
28314 <EnumValue stringvalue="1_MONTH">
28315 <webidl> "1_MONTH</webidl>
28318 <Enum name="SyncServiceType" id="::DataSynchronization::SyncServiceType">
28319 <webidl> enum SyncServiceType { "CONTACT", "EVENT" };</webidl>
28322 An enumerator that indicates the supported synchronization service type of the device.
28326 The following values are supported:
28330 CONTACT - Indicates the device contact records. </li>
28332 EVENT - Indicates the device calendar event records. </li>
28339 <EnumValue stringvalue="CONTACT">
28340 <webidl> "CONTACT</webidl>
28342 <EnumValue stringvalue="EVENT">
28343 <webidl> "EVENT</webidl>
28346 <Enum name="SyncStatus" id="::DataSynchronization::SyncStatus">
28347 <webidl> enum SyncStatus { "SUCCESS", "FAIL", "STOP", "NONE" };</webidl>
28350 An enumerator that indicates the last sync statuses.
28354 The following values are supported:
28358 SUCCESS - Indicates the sync is successful. </li>
28360 FAIL - Indicates the sync has failed. </li>
28362 STOP - Indicates the sync has been stopped by user's action. </li>
28364 NONE - Indicates the sync was never performed. </li>
28371 <EnumValue stringvalue="SUCCESS">
28372 <webidl> "SUCCESS</webidl>
28374 <EnumValue stringvalue="FAIL">
28375 <webidl> "FAIL</webidl>
28377 <EnumValue stringvalue="STOP">
28378 <webidl> "STOP</webidl>
28380 <EnumValue stringvalue="NONE">
28381 <webidl> "NONE</webidl>
28384 <Interface name="DataSynchronizationManagerObject" id="::DataSynchronization::DataSynchronizationManagerObject">
28385 <webidl> [NoInterfaceObject] interface DataSynchronizationManagerObject {
28386 readonly attribute <ref>DataSynchronizationManager</ref> datasync;
28390 This interface defines the default data synchronization manager that is instantiated by the <em>Tizen </em>object.
28391 There will be a <em>tizen.datasync</em> object that allows access to the functionality of the DataSynchronization API.
28397 <ExtendedAttributeList>
28398 <ExtendedAttribute name="NoInterfaceObject">
28399 <webidl>NoInterfaceObject</webidl>
28400 </ExtendedAttribute>
28401 </ExtendedAttributeList>
28402 <Attribute readonly="readonly" name="datasync" id="::DataSynchronization::DataSynchronizationManagerObject::datasync">
28403 <webidl> readonly attribute <ref>DataSynchronizationManager</ref> datasync;</webidl>
28404 <Type name="DataSynchronizationManager"/>
28407 <Implements name1="Tizen" name2="DataSynchronizationManagerObject">
28408 <webidl> <ref>Tizen</ref> implements <ref>DataSynchronizationManagerObject</ref>;</webidl>
28410 <Interface name="SyncInfo" id="::DataSynchronization::SyncInfo">
28411 <webidl> [Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode),
28412 Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode, <ref>SyncType</ref> type),
28413 Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode, <ref>SyncInterval</ref> interval)]
28414 interface SyncInfo {
28415 attribute DOMString url;
28417 attribute DOMString id;
28419 attribute DOMString password;
28421 attribute <ref>SyncMode</ref> mode;
28423 attribute <ref>SyncType</ref>? type;
28425 attribute <ref>SyncInterval</ref>? interval;
28429 This interface defines the sync information.
28435 The <em>MANUAL</em> sync mode accepts the sync type and the <em>PERIODIC</em> mode accepts the sync interval, whereas the <em>PUSH</em> mode does not accept any additional parameters.
28438 <ExtendedAttributeList>
28439 <ExtendedAttribute name="Constructor">
28440 <webidl>Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode)</webidl>
28442 <Argument name="url">
28443 <Type type="DOMString"/>
28445 <Argument name="id">
28446 <Type type="DOMString"/>
28448 <Argument name="password">
28449 <Type type="DOMString"/>
28451 <Argument name="mode">
28452 <Type name="SyncMode"/>
28455 </ExtendedAttribute>
28456 <ExtendedAttribute name="Constructor">
28457 <webidl> Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode, <ref>SyncType</ref> type)</webidl>
28459 <Argument name="url">
28460 <Type type="DOMString"/>
28462 <Argument name="id">
28463 <Type type="DOMString"/>
28465 <Argument name="password">
28466 <Type type="DOMString"/>
28468 <Argument name="mode">
28469 <Type name="SyncMode"/>
28471 <Argument name="type">
28472 <Type name="SyncType"/>
28475 </ExtendedAttribute>
28476 <ExtendedAttribute name="Constructor">
28477 <webidl> Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode, <ref>SyncInterval</ref> interval)</webidl>
28479 <Argument name="url">
28480 <Type type="DOMString"/>
28482 <Argument name="id">
28483 <Type type="DOMString"/>
28485 <Argument name="password">
28486 <Type type="DOMString"/>
28488 <Argument name="mode">
28489 <Type name="SyncMode"/>
28491 <Argument name="interval">
28492 <Type name="SyncInterval"/>
28495 </ExtendedAttribute>
28496 </ExtendedAttributeList>
28497 <Attribute name="url" id="::DataSynchronization::SyncInfo::url">
28498 <webidl> attribute DOMString url;</webidl>
28501 An attribute to store the URL of the sync server.
28507 <Type type="DOMString"/>
28509 <Attribute name="id" id="::DataSynchronization::SyncInfo::id">
28510 <webidl> attribute DOMString id;</webidl>
28513 An attribute to store the login ID for the sync server.
28517 When an attempt to retrieve the saved value is made, it will return <var>null</var> to prevent any compromise on the privacy of the login ID.
28524 <Type type="DOMString"/>
28526 <Attribute name="password" id="::DataSynchronization::SyncInfo::password">
28527 <webidl> attribute DOMString password;</webidl>
28530 An attribute to store the login password to the sync server.
28534 When an attempt to retrieve the saved value is made, it will return <var>null</var> to prevent any compromise on the privacy of the login password.
28541 <Type type="DOMString"/>
28543 <Attribute name="mode" id="::DataSynchronization::SyncInfo::mode">
28544 <webidl> attribute <ref>SyncMode</ref> mode;</webidl>
28547 An attribute to store the sync mode.
28553 <Type name="SyncMode"/>
28555 <Attribute name="type" id="::DataSynchronization::SyncInfo::type">
28556 <webidl> attribute <ref>SyncType</ref>? type;</webidl>
28559 An attribute to store the sync type.
28563 This attribute is used when the sync mode is set to <em>MANUAL</em> option.
28570 <Type name="SyncType" nullable="nullable"/>
28572 <Attribute name="interval" id="::DataSynchronization::SyncInfo::interval">
28573 <webidl> attribute <ref>SyncInterval</ref>? interval;</webidl>
28576 An attribute to store the sync interval.
28580 This attribute is used when the sync mode is set to <em>PERIODIC</em> option.
28587 <Type name="SyncInterval" nullable="nullable"/>
28590 <Interface name="SyncServiceInfo" id="::DataSynchronization::SyncServiceInfo">
28591 <webidl> [Constructor(boolean enable, <ref>SyncServiceType</ref> serviceType, DOMString serverDatabaseUri, optional DOMString? id, optional DOMString? password)]
28592 interface SyncServiceInfo {
28593 attribute boolean enable;
28595 attribute <ref>SyncServiceType</ref> serviceType;
28597 attribute DOMString serverDatabaseUri;
28599 attribute DOMString? id;
28601 attribute DOMString? password;
28605 This interface defines the sync service information.
28611 <ExtendedAttributeList>
28612 <ExtendedAttribute name="Constructor">
28613 <webidl>Constructor(boolean enable, <ref>SyncServiceType</ref> serviceType, DOMString serverDatabaseUri, optional DOMString? id, optional DOMString? password)</webidl>
28615 <Argument name="enable">
28616 <Type type="boolean"/>
28618 <Argument name="serviceType">
28619 <Type name="SyncServiceType"/>
28621 <Argument name="serverDatabaseUri">
28622 <Type type="DOMString"/>
28624 <Argument optional="optional" name="id">
28625 <Type type="DOMString" nullable="nullable"/>
28627 <Argument optional="optional" name="password">
28628 <Type type="DOMString" nullable="nullable"/>
28631 </ExtendedAttribute>
28632 </ExtendedAttributeList>
28633 <Attribute name="enable" id="::DataSynchronization::SyncServiceInfo::enable">
28634 <webidl> attribute boolean enable;</webidl>
28637 An attribute to enable or disable a service category for sync.
28643 <Type type="boolean"/>
28645 <Attribute name="serviceType" id="::DataSynchronization::SyncServiceInfo::serviceType">
28646 <webidl> attribute <ref>SyncServiceType</ref> serviceType;</webidl>
28649 An attribute to indicate the sync service type.
28655 <Type name="SyncServiceType"/>
28657 <Attribute name="serverDatabaseUri" id="::DataSynchronization::SyncServiceInfo::serverDatabaseUri">
28658 <webidl> attribute DOMString serverDatabaseUri;</webidl>
28661 An attribute to store the sync service DB URI of the server.
28667 <Type type="DOMString"/>
28669 <Attribute name="id" id="::DataSynchronization::SyncServiceInfo::id">
28670 <webidl> attribute DOMString? id;</webidl>
28673 An attribute to store the sync service DB access ID to the server.
28677 This is used only when the server requires a separate access right to each DB.
28678 When an attempt to retrieve the saved value is made, it will return <var>null</var> to prevent any compromise on the privacy of the id.
28685 <Type type="DOMString" nullable="nullable"/>
28687 <Attribute name="password" id="::DataSynchronization::SyncServiceInfo::password">
28688 <webidl> attribute DOMString? password;</webidl>
28691 An attribute to store the sync service DB access password to the server.
28695 This is used only when the server requires a separate access right to each DB.
28696 When an attempt to retrieve the saved value is made, it will return <var>null</var> to prevent any compromise on the privacy of the password.
28703 <Type type="DOMString" nullable="nullable"/>
28706 <Interface name="SyncProfileInfo" id="::DataSynchronization::SyncProfileInfo">
28707 <webidl> [Constructor(DOMString profileName, <ref>SyncInfo</ref> syncInfo, optional <ref>SyncServiceInfo</ref>[]? serviceInfo)]
28708 interface SyncProfileInfo {
28709 readonly attribute <ref>SyncProfileId</ref> profileId;
28711 attribute DOMString profileName;
28713 attribute <ref>SyncInfo</ref> syncInfo;
28715 attribute <ref>SyncServiceInfo</ref>[]? serviceInfo;
28719 This interface defines the sync profile information, based on which the synchronization is performed.
28725 <ExtendedAttributeList>
28726 <ExtendedAttribute name="Constructor">
28727 <webidl>Constructor(DOMString profileName, <ref>SyncInfo</ref> syncInfo, optional <ref>SyncServiceInfo</ref>[]? serviceInfo)</webidl>
28729 <Argument name="profileName">
28730 <Type type="DOMString"/>
28732 <Argument name="syncInfo">
28733 <Type name="SyncInfo"/>
28735 <Argument optional="optional" name="serviceInfo">
28736 <Type type="array" nullable="nullable">
28737 <Type name="SyncServiceInfo"/>
28741 </ExtendedAttribute>
28742 </ExtendedAttributeList>
28743 <Attribute readonly="readonly" name="profileId" id="::DataSynchronization::SyncProfileInfo::profileId">
28744 <webidl> readonly attribute <ref>SyncProfileId</ref> profileId;</webidl>
28747 An attribute to store the unique identifier provided by the platform for a profile that has been successfully added.
28753 <Type name="SyncProfileId"/>
28755 <Attribute name="profileName" id="::DataSynchronization::SyncProfileInfo::profileName">
28756 <webidl> attribute DOMString profileName;</webidl>
28759 An attribute to store the profile name.
28765 <Type type="DOMString"/>
28767 <Attribute name="syncInfo" id="::DataSynchronization::SyncProfileInfo::syncInfo">
28768 <webidl> attribute <ref>SyncInfo</ref> syncInfo;</webidl>
28771 An attribute to store the sync info.
28777 <Type name="SyncInfo"/>
28779 <Attribute name="serviceInfo" id="::DataSynchronization::SyncProfileInfo::serviceInfo">
28780 <webidl> attribute <ref>SyncServiceInfo</ref>[]? serviceInfo;</webidl>
28783 An attribute to indicate the service info.
28789 <Type type="array" nullable="nullable">
28790 <Type name="SyncServiceInfo"/>
28794 <Interface name="SyncStatistics" id="::DataSynchronization::SyncStatistics">
28795 <webidl> [NoInterfaceObject] interface SyncStatistics {
28796 readonly attribute <ref>SyncStatus</ref> syncStatus;
28798 readonly attribute <ref>SyncServiceType</ref> serviceType;
28800 readonly attribute Date lastSyncTime;
28802 readonly attribute unsigned long serverToClientTotal;
28804 readonly attribute unsigned long serverToClientAdded;
28806 readonly attribute unsigned long serverToClientUpdated;
28808 readonly attribute unsigned long serverToClientRemoved;
28810 readonly attribute unsigned long clientToServerTotal;
28812 readonly attribute unsigned long clientToServerAdded;
28814 readonly attribute unsigned long clientToServerUpdated;
28816 readonly attribute unsigned long clientToServerRemoved;
28820 This interface defines the sync statistics for a profile service.
28826 <ExtendedAttributeList>
28827 <ExtendedAttribute name="NoInterfaceObject">
28828 <webidl>NoInterfaceObject</webidl>
28829 </ExtendedAttribute>
28830 </ExtendedAttributeList>
28831 <Attribute readonly="readonly" name="syncStatus" id="::DataSynchronization::SyncStatistics::syncStatus">
28832 <webidl> readonly attribute <ref>SyncStatus</ref> syncStatus;</webidl>
28835 An attribute to store the last sync status for a corresponding service category.
28841 <Type name="SyncStatus"/>
28843 <Attribute readonly="readonly" name="serviceType" id="::DataSynchronization::SyncStatistics::serviceType">
28844 <webidl> readonly attribute <ref>SyncServiceType</ref> serviceType;</webidl>
28847 An attribute to indicate the sync service type.
28853 <Type name="SyncServiceType"/>
28855 <Attribute readonly="readonly" name="lastSyncTime" id="::DataSynchronization::SyncStatistics::lastSyncTime">
28856 <webidl> readonly attribute Date lastSyncTime;</webidl>
28859 An attribute to store the last sync time.
28865 <Type type="Date"/>
28867 <Attribute readonly="readonly" name="serverToClientTotal" id="::DataSynchronization::SyncStatistics::serverToClientTotal">
28868 <webidl> readonly attribute unsigned long serverToClientTotal;</webidl>
28871 An attribute to indicate the total number of items sent from the server to the client direction.
28877 <Type type="unsigned long"/>
28879 <Attribute readonly="readonly" name="serverToClientAdded" id="::DataSynchronization::SyncStatistics::serverToClientAdded">
28880 <webidl> readonly attribute unsigned long serverToClientAdded;</webidl>
28883 An attribute to indicate the number of added items from the server to the client direction.
28889 <Type type="unsigned long"/>
28891 <Attribute readonly="readonly" name="serverToClientUpdated" id="::DataSynchronization::SyncStatistics::serverToClientUpdated">
28892 <webidl> readonly attribute unsigned long serverToClientUpdated;</webidl>
28895 An attribute to indicate the number of updated items from the server to the client direction.
28901 <Type type="unsigned long"/>
28903 <Attribute readonly="readonly" name="serverToClientRemoved" id="::DataSynchronization::SyncStatistics::serverToClientRemoved">
28904 <webidl> readonly attribute unsigned long serverToClientRemoved;</webidl>
28907 An attribute to indicate the number of removed items from the server to the client direction.
28913 <Type type="unsigned long"/>
28915 <Attribute readonly="readonly" name="clientToServerTotal" id="::DataSynchronization::SyncStatistics::clientToServerTotal">
28916 <webidl> readonly attribute unsigned long clientToServerTotal;</webidl>
28919 An attribute to indicate the total number of items from the client to the server direction.
28925 <Type type="unsigned long"/>
28927 <Attribute readonly="readonly" name="clientToServerAdded" id="::DataSynchronization::SyncStatistics::clientToServerAdded">
28928 <webidl> readonly attribute unsigned long clientToServerAdded;</webidl>
28931 An attribute to indicate the number of added items from the client to the server direction.
28937 <Type type="unsigned long"/>
28939 <Attribute readonly="readonly" name="clientToServerUpdated" id="::DataSynchronization::SyncStatistics::clientToServerUpdated">
28940 <webidl> readonly attribute unsigned long clientToServerUpdated;</webidl>
28943 An attribute to indicate the number of updated items from the client to the server direction.
28949 <Type type="unsigned long"/>
28951 <Attribute readonly="readonly" name="clientToServerRemoved" id="::DataSynchronization::SyncStatistics::clientToServerRemoved">
28952 <webidl> readonly attribute unsigned long clientToServerRemoved;</webidl>
28955 An attribute to indicate the number of removed items from the client to the server direction.
28961 <Type type="unsigned long"/>
28964 <Interface name="DataSynchronizationManager" id="::DataSynchronization::DataSynchronizationManager">
28965 <webidl> [NoInterfaceObject] interface DataSynchronizationManager {
28966 void add(<ref>SyncProfileInfo</ref> profile) raises(<ref>WebAPIException</ref>);
28968 void update(<ref>SyncProfileInfo</ref> profile) raises(<ref>WebAPIException</ref>);
28970 void remove(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);
28972 long getMaxProfilesNum() raises(<ref>WebAPIException</ref>);
28974 unsigned long getProfilesNum() raises(<ref>WebAPIException</ref>);
28976 <ref>SyncProfileInfo</ref> get(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);
28978 <ref>SyncProfileInfo</ref>[] getAll() raises(<ref>WebAPIException</ref>);
28980 void startSync(<ref>SyncProfileId</ref> profileId, optional <ref>SyncProgressCallback</ref>? progressCallback) raises(<ref>WebAPIException</ref>);
28982 void stopSync(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);
28984 <ref>SyncStatistics</ref>[] getLastSyncStatistics(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);
28988 This interface allows managing profiles and synchronizing data between the server and the client device based on the stored profile information.
28994 <ExtendedAttributeList>
28995 <ExtendedAttribute name="NoInterfaceObject">
28996 <webidl>NoInterfaceObject</webidl>
28997 </ExtendedAttribute>
28998 </ExtendedAttributeList>
28999 <Operation name="add" id="::DataSynchronization::DataSynchronizationManager::add">
29000 <webidl> void add(<ref>SyncProfileInfo</ref> profile) raises(<ref>WebAPIException</ref>);</webidl>
29003 Adds a sync profile.
29007 The profile ID is provided when the profile is successfully added.
29017 http://tizen.org/privilege/datasync
29019 <Code> // Creates a sync info
29020 var syncInfo = new tizen.SyncInfo("http://example.com/sync", "myId", "myPassword", "MANUAL", "TWO_WAY");
29022 // Syncs both contacts and events
29023 var contactInfo = new tizen.SyncServiceInfo(true, "CONTACT", "serverContact");
29024 var eventInfo = new tizen.SyncServiceInfo(true, "EVENT", "serverEvent");
29025 var serviceInfo = [contactInfo, eventInfo];
29027 // Adds a profile to sync
29028 var profile = new tizen.SyncProfileInfo("MyProfile", syncInfo, serviceInfo);
29029 tizen.datasync.add(profile);
29032 <Type type="void"/>
29034 <Argument name="profile">
29037 The sync profile information to add.
29040 <Type name="SyncProfileInfo"/>
29044 <RaiseException name="WebAPIException">
29047 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
29050 with error type QuotaExceededError, if the platform has already reached the maximum number of profiles.
29053 with error type NotSupportedError, if this feature is not supported.
29056 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
29059 with error type SecurityError, if the application does not have the privilege to call this method.
29062 with error type UnknownError, if any other error occurs.
29068 <Operation name="update" id="::DataSynchronization::DataSynchronizationManager::update">
29069 <webidl> void update(<ref>SyncProfileInfo</ref> profile) raises(<ref>WebAPIException</ref>);</webidl>
29072 Updates an existing sync profile.
29081 http://tizen.org/privilege/datasync
29083 <Code> // Retrieves and updates a profile
29084 var profile = tizen.datasync.get(profileId);
29086 profile.profileName = "newProfileName";
29088 tizen.datasync.update(profile);
29091 <Type type="void"/>
29093 <Argument name="profile">
29096 The sync profile information to update.
29099 <Type name="SyncProfileInfo"/>
29103 <RaiseException name="WebAPIException">
29106 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
29109 with error type NotSupportedError, if this feature is not supported.
29112 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
29115 with error type SecurityError, if the application does not have the privilege to call this method.
29118 with error type UnknownError, if any other error occurs.
29124 <Operation name="remove" id="::DataSynchronization::DataSynchronizationManager::remove">
29125 <webidl> void remove(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);</webidl>
29128 Removes an existing sync profile.
29137 http://tizen.org/privilege/datasync
29139 <Code> // Removes a profile
29140 tizen.datasync.remove(profileId);
29143 <Type type="void"/>
29145 <Argument name="profileId">
29148 The sync profile ID to remove.
29151 <Type name="SyncProfileId"/>
29155 <RaiseException name="WebAPIException">
29158 with error type NotFoundError, if the identifier does not match any saved profile.
29161 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
29164 with error type NotSupportedError, if this feature is not supported.
29167 with error type SecurityError, if the application does not have the privilege to call this method.
29170 with error type UnknownError, if any other error occurs.
29176 <Operation name="getMaxProfilesNum" id="::DataSynchronization::DataSynchronizationManager::getMaxProfilesNum">
29177 <webidl> long getMaxProfilesNum() raises(<ref>WebAPIException</ref>);</webidl>
29180 Gets the maximum number of supported sync profiles on a platform.
29181 Normally the platform sets a limitation on the number of supported profiles. It will return <var>0</var> or negative value if no limitation is set.
29190 http://tizen.org/privilege/datasync
29192 <Code> // Gets the maximum number of supported profiles on the platform
29193 var numMaxProfiles = tizen.datasync.getMaxProfilesNum();
29199 long The number of supported profiles on a platform.
29205 <RaiseException name="WebAPIException">
29208 with error type NotSupportedError, if this feature is not supported.
29211 with error type SecurityError, if the application does not have the privilege to call this method.
29214 with error type UnknownError, if any other error occurs.
29220 <Operation name="getProfilesNum" id="::DataSynchronization::DataSynchronizationManager::getProfilesNum">
29221 <webidl> unsigned long getProfilesNum() raises(<ref>WebAPIException</ref>);</webidl>
29224 Gets the current number of sync profiles on a device.
29233 http://tizen.org/privilege/datasync
29235 <Code> // Gets the present number of profiles on the device
29236 var numProfiles = tizen.datasync.getProfilesNum();
29239 <Type type="unsigned long">
29242 unsigned long The current number of profiles on a device.
29248 <RaiseException name="WebAPIException">
29251 with error type NotSupportedError, if this feature is not supported.
29254 with error type SecurityError, if the application does not have the privilege to call this method.
29257 with error type UnknownError, if any other error occurs.
29263 <Operation name="get" id="::DataSynchronization::DataSynchronizationManager::get">
29264 <webidl> <ref>SyncProfileInfo</ref> get(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);</webidl>
29267 Gets the <em>SyncProfileInfo</em> object from a given profile ID.
29271 The attempt to retrieve <em>SyncProfileInfo</em> doesn't get any confidential information such as the <em>password</em> of <em>SyncInfo</em> or <em>SyncServiceInfo</em> but instead will return <var>null</var>.
29281 http://tizen.org/privilege/datasync
29283 <Code> // Gets the profile information with the given ID
29284 var profile = tizen.datasync.get(profileId);
29287 <Type name="SyncProfileInfo">
29290 SyncProfileInfo The profile information of the given ID.
29295 <Argument name="profileId">
29298 The ID to use to get the profile information.
29301 <Type name="SyncProfileId"/>
29305 <RaiseException name="WebAPIException">
29308 with error type NotFoundError, if the identifier does not match any profile saved.
29311 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
29314 with error type NotSupportedError, if this feature is not supported.
29317 with error type SecurityError, if the application does not have the privilege to call this method.
29320 with error type UnknownError, if any other error occurs.
29326 <Operation name="getAll" id="::DataSynchronization::DataSynchronizationManager::getAll">
29327 <webidl> <ref>SyncProfileInfo</ref>[] getAll() raises(<ref>WebAPIException</ref>);</webidl>
29330 Gets the information of all sync profiles saved in a device.
29334 An attempt to retrieve <em>SyncProfileInfo</em> doesn't get any confidential information such as the <em>password</em> of <em>SyncInfo</em> or <em>SyncServiceInfo</em> but instead will return <var>null</var>.
29344 http://tizen.org/privilege/datasync
29346 <Code> // Gets the all profile information
29347 var profiles = tizen.datasync.getAll();
29350 <Type type="array">
29353 SyncProfileInfo[] The profile information array.
29356 <Type name="SyncProfileInfo"/>
29360 <RaiseException name="WebAPIException">
29363 with error type NotSupportedError, if this feature is not supported.
29366 with error type SecurityError, if the application does not have the privilege to call this method.
29369 with error type UnknownError, if any other error occurs.
29375 <Operation name="startSync" id="::DataSynchronization::DataSynchronizationManager::startSync">
29376 <webidl> void startSync(<ref>SyncProfileId</ref> profileId, optional <ref>SyncProgressCallback</ref>? progressCallback) raises(<ref>WebAPIException</ref>);</webidl>
29379 Starts a sync operation with a given profile ID.
29383 If the sync mode is set to <em>MANUAL</em>, the synchronization will not start automatically until this method is called. This method will work even in <em>PUSH</em> or <em>PERIODIC</em> mode.
29393 http://tizen.org/privilege/datasync
29395 <Code> var profileId; //profileId obtained from SyncProfileInfo
29396 var syncCallback = {
29397 onprogress: function(profileId, serviceType, isFromServer, totalPerType, syncedPerType) {
29398 console.log('Total: ' + totalPerType + ', synced: ' + syncedPerType + ' for the sync type: ' + serviceType);
29400 onfailed: function(profileId, error) {
29401 console.log('Failed with id: ' + profileId + ', error name: ' + error.name);
29405 // Starts the sync operation with the corresponding callbacks
29406 tizen.datasync.startSync(profileId, syncCallback);
29409 <Type type="void"/>
29411 <Argument name="profileId">
29414 The profile ID with which to initiate the sync operation.
29417 <Type name="SyncProfileId"/>
29419 <Argument optional="optional" name="progressCallback">
29422 The method to invoke when the sync operation progresses or an error occurs.
29425 <Type name="SyncProgressCallback" nullable="nullable"/>
29429 <RaiseException name="WebAPIException">
29432 with error type NotFoundError, if the identifier does not match any profile saved.
29435 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
29438 with error type NotSupportedError, if this feature is not supported.
29441 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
29444 with error type SecurityError, if the application does not have the privilege to call this method.
29447 with error type UnknownError, if any other error occurs.
29453 <Operation name="stopSync" id="::DataSynchronization::DataSynchronizationManager::stopSync">
29454 <webidl> void stopSync(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);</webidl>
29457 Stops an ongoing sync operation that is specified by the <em>profileId</em> parameter.
29466 http://tizen.org/privilege/datasync
29468 <Code> var profileId; //profileId obtained from SyncProfileInfo
29469 // Stops the ongoing sync operation
29470 tizen.datasync.stopSync(profileId);
29473 <Type type="void"/>
29475 <Argument name="profileId">
29478 The ID of the ongoing sync operation to stop.
29481 <Type name="SyncProfileId"/>
29485 <RaiseException name="WebAPIException">
29488 with error type NotFoundError, if the identifier does not match any profile saved.
29491 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
29494 with error type NotSupportedError, if this feature is not supported.
29497 with error type SecurityError, if the application does not have the privilege to call this method.
29500 with error type UnknownError, if any other error occurs.
29506 <Operation name="getLastSyncStatistics" id="::DataSynchronization::DataSynchronizationManager::getLastSyncStatistics">
29507 <webidl> <ref>SyncStatistics</ref>[] getLastSyncStatistics(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);</webidl>
29510 Gets the sync statistics of a given profile ID.
29519 http://tizen.org/privilege/datasync
29521 <Code> var profileId; //profileId obtained from SyncProfileInfo
29522 // Gets the sync statistics information with the given ID
29523 var statistics = tizen.datasync.getLastSyncStatistics(profileId);
29526 <Type type="array">
29529 SyncStatictics[] The sync statistics information of a given ID.
29532 <Type name="SyncStatistics"/>
29535 <Argument name="profileId">
29538 The ID to use to get the sync statistics.
29541 <Type name="SyncProfileId"/>
29545 <RaiseException name="WebAPIException">
29548 with error type NotFoundError, if the identifier does not match any profile saved.
29551 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
29554 with error type NotSupportedError, if this feature is not supported.
29557 with error type SecurityError, if the application does not have the privilege to call this method.
29560 with error type UnknownError, if any other error occurs.
29567 <Interface name="SyncProgressCallback" id="::DataSynchronization::SyncProgressCallback">
29568 <webidl> [Callback, NoInterfaceObject] interface SyncProgressCallback {
29569 void onprogress(<ref>SyncProfileId</ref> profileId, <ref>SyncServiceType</ref> serviceType, boolean isFromServer, unsigned long totalPerService, unsigned long syncedPerService);
29571 void oncompleted(<ref>SyncProfileId</ref> profileId);
29573 void onstopped(<ref>SyncProfileId</ref> profileId);
29575 void onfailed(<ref>SyncProfileId</ref> profileId, <ref>WebAPIError</ref> error);
29579 This interface defines progress notification callbacks for the ongoing sync operation.
29585 <ExtendedAttributeList>
29586 <ExtendedAttribute name="Callback">
29587 <webidl>Callback</webidl>
29588 </ExtendedAttribute>
29589 <ExtendedAttribute name="NoInterfaceObject">
29590 <webidl> NoInterfaceObject</webidl>
29591 </ExtendedAttribute>
29592 </ExtendedAttributeList>
29593 <Operation name="onprogress" id="::DataSynchronization::SyncProgressCallback::onprogress">
29594 <webidl> void onprogress(<ref>SyncProfileId</ref> profileId, <ref>SyncServiceType</ref> serviceType, boolean isFromServer, unsigned long totalPerService, unsigned long syncedPerService);</webidl>
29597 Called when a synchronization operation is started and progress is made.
29601 The frequency of this callback invocation is dependent on the platform implementation.
29602 Normally the packet size from a server affects it, that is, if the server sends a bigger packet containing many records in it, the platform will process it at once and invoke this callback less frequently.
29609 <Type type="void"/>
29611 <Argument name="profileId">
29614 The ID of the corresponding sync operation.
29617 <Type name="SyncProfileId"/>
29619 <Argument name="serviceType">
29622 The sync service category type.
29625 <Type name="SyncServiceType"/>
29627 <Argument name="isFromServer">
29630 The direction of the operation.<br/> If the direction of operation is from the server to the client, then value is<var> true</var>.
29633 <Type type="boolean"/>
29635 <Argument name="totalPerService">
29638 The total number of records to synchronize for the current sync service type aggregating all operations.
29641 <Type type="unsigned long"/>
29643 <Argument name="syncedPerService">
29646 The number of synchronized records for the current sync service type aggregating all operations.
29649 <Type type="unsigned long"/>
29653 <Operation name="oncompleted" id="::DataSynchronization::SyncProgressCallback::oncompleted">
29654 <webidl> void oncompleted(<ref>SyncProfileId</ref> profileId);</webidl>
29657 Called when the sync operation has completed.
29663 <Type type="void"/>
29665 <Argument name="profileId">
29668 The ID of the corresponding sync operation.
29671 <Type name="SyncProfileId"/>
29675 <Operation name="onstopped" id="::DataSynchronization::SyncProgressCallback::onstopped">
29676 <webidl> void onstopped(<ref>SyncProfileId</ref> profileId);</webidl>
29679 Called when the sync operation is stopped by user.
29685 <Type type="void"/>
29687 <Argument name="profileId">
29690 The ID of the corresponding sync operation.
29693 <Type name="SyncProfileId"/>
29697 <Operation name="onfailed" id="::DataSynchronization::SyncProgressCallback::onfailed">
29698 <webidl> void onfailed(<ref>SyncProfileId</ref> profileId, <ref>WebAPIError</ref> error);</webidl>
29701 Called when the sync operation fails.
29707 <Type type="void"/>
29709 <Argument name="profileId">
29712 The ID of the corresponding sync operation.
29715 <Type name="SyncProfileId"/>
29717 <Argument name="error">
29720 The reason for the sync failure.
29723 <Type name="WebAPIError"/>
29729 <Module name="Download" id="::Download">
29730 <webidl>module Download {
29731 typedef object DownloadHTTPHeaderFields;
29733 enum DownloadState { "QUEUED", "DOWNLOADING", "PAUSED", "CANCELED", "COMPLETED", "FAILED" };
29735 enum DownloadNetworkType { "CELLULAR", "WIFI", "ALL" };
29737 [NoInterfaceObject] interface DownloadManagerObject {
29738 readonly attribute <ref>DownloadManager</ref> download;
29740 <ref>Tizen</ref> implements <ref>DownloadManagerObject</ref>;
29742 [Constructor(DOMString url, optional DOMString? destination, optional DOMString? fileName, optional <ref>DownloadNetworkType</ref>? networkType, optional <ref>DownloadHTTPHeaderFields</ref>? httpHeader)]
29743 interface DownloadRequest {
29744 attribute DOMString url;
29746 attribute DOMString? destination;
29748 attribute DOMString? fileName;
29750 attribute <ref>DownloadNetworkType</ref>? networkType;
29752 attribute <ref>DownloadHTTPHeaderFields</ref>? httpHeader;
29755 [NoInterfaceObject] interface DownloadManager {
29756 long start(<ref>DownloadRequest</ref> downloadRequest,
29757 optional <ref>DownloadCallback</ref>? downloadCallback) raises(<ref>WebAPIException</ref>);
29759 void cancel(long downloadId) raises(<ref>WebAPIException</ref>);
29761 void pause(long downloadId) raises(<ref>WebAPIException</ref>);
29763 void resume(long downloadId) raises(<ref>WebAPIException</ref>);
29765 <ref>DownloadState</ref> getState(long downloadId) raises(<ref>WebAPIException</ref>);
29767 <ref>DownloadRequest</ref> getDownloadRequest(long downloadId) raises(<ref>WebAPIException</ref>);
29769 DOMString getMIMEType(long downloadId) raises(<ref>WebAPIException</ref>);
29771 void setListener(long downloadId, <ref>DownloadCallback</ref> downloadCallback) raises(<ref>WebAPIException</ref>);
29774 [Callback, NoInterfaceObject] interface DownloadCallback {
29775 void onprogress(long downloadId, unsigned long long receivedSize, unsigned long long totalSize);
29777 void onpaused(long downloadId);
29779 void oncanceled(long downloadId);
29781 void oncompleted(long downloadId, DOMString fullPath);
29783 void onfailed(long downloadId, <ref>WebAPIError</ref> error);
29788 This API provides methods to asynchronously download the contents of a URL to a storage.
29792 For more information on the Download features, see <a href="../../org.tizen.web.appprogramming/html/guide/content_guide/download.htm">Download Guide</a>.
29798 <def-api-feature identifier="http://tizen.org/feature/network.wifi">
29802 To guarantee this application running on a device with Wi-Fi feature, define below in the config file:
29807 <def-api-feature identifier="http://tizen.org/feature/network.telephony">
29811 To guarantee this application running on a device with Cellular feature, define below in the config file:
29817 <Typedef name="DownloadHTTPHeaderFields" id="::Download::DownloadHTTPHeaderFields">
29818 <webidl> typedef object DownloadHTTPHeaderFields;</webidl>
29821 A set of HTTP header fields.
29825 The key / value type of each HTTP header field should be DOMString.
29832 <Type type="object"/>
29834 <Enum name="DownloadState" id="::Download::DownloadState">
29835 <webidl> enum DownloadState { "QUEUED", "DOWNLOADING", "PAUSED", "CANCELED", "COMPLETED", "FAILED" };</webidl>
29838 An enumerator to indicate the state of a download operation.
29842 The following values are supported:
29846 QUEUED - Indicates that the download operation is listed in a queue. </li>
29848 DOWNLOADING - Indicates that the download operation is in progress. </li>
29850 PAUSED - Indicates that the download operation is in a paused state by user request. </li>
29852 CANCELED - Indicates that the download operation is canceled by user request. </li>
29854 COMPLETED - Indicates that the download operation is in a completed state. </li>
29856 FAILED - Indicates that the download operation has failed due to some reasons. </li>
29863 <EnumValue stringvalue="QUEUED">
29864 <webidl> "QUEUED</webidl>
29866 <EnumValue stringvalue="DOWNLOADING">
29867 <webidl> "DOWNLOADING</webidl>
29869 <EnumValue stringvalue="PAUSED">
29870 <webidl> "PAUSED</webidl>
29872 <EnumValue stringvalue="CANCELED">
29873 <webidl> "CANCELED</webidl>
29875 <EnumValue stringvalue="COMPLETED">
29876 <webidl> "COMPLETED</webidl>
29878 <EnumValue stringvalue="FAILED">
29879 <webidl> "FAILED</webidl>
29882 <Enum name="DownloadNetworkType" id="::Download::DownloadNetworkType">
29883 <webidl> enum DownloadNetworkType { "CELLULAR", "WIFI", "ALL" };</webidl>
29886 An enumerator to indicate the network type.
29890 The following values are supported:
29894 CELLULAR - Indicates that the download operation is allowed in the cellular network only. </li>
29896 WIFI - Indicates that the download operation is allowed in the Wi-Fi network only. </li>
29898 ALL - Indicates that the download operation is allowed in all network types. </li>
29905 <EnumValue stringvalue="CELLULAR">
29906 <webidl> "CELLULAR</webidl>
29908 <EnumValue stringvalue="WIFI">
29909 <webidl> "WIFI</webidl>
29911 <EnumValue stringvalue="ALL">
29912 <webidl> "ALL</webidl>
29915 <Interface name="DownloadManagerObject" id="::Download::DownloadManagerObject">
29916 <webidl> [NoInterfaceObject] interface DownloadManagerObject {
29917 readonly attribute <ref>DownloadManager</ref> download;
29921 This interface defines the default download manager that is instantiated by the <em>Tizen </em>object.
29922 There will be a <em>tizen.download </em>object that allows access to the functionality of the Download API.
29928 <ExtendedAttributeList>
29929 <ExtendedAttribute name="NoInterfaceObject">
29930 <webidl>NoInterfaceObject</webidl>
29931 </ExtendedAttribute>
29932 </ExtendedAttributeList>
29933 <Attribute readonly="readonly" name="download" id="::Download::DownloadManagerObject::download">
29934 <webidl> readonly attribute <ref>DownloadManager</ref> download;</webidl>
29935 <Type name="DownloadManager"/>
29938 <Implements name1="Tizen" name2="DownloadManagerObject">
29939 <webidl> <ref>Tizen</ref> implements <ref>DownloadManagerObject</ref>;</webidl>
29941 <Interface name="DownloadRequest" id="::Download::DownloadRequest">
29942 <webidl> [Constructor(DOMString url, optional DOMString? destination, optional DOMString? fileName, optional <ref>DownloadNetworkType</ref>? networkType, optional <ref>DownloadHTTPHeaderFields</ref>? httpHeader)]
29943 interface DownloadRequest {
29944 attribute DOMString url;
29946 attribute DOMString? destination;
29948 attribute DOMString? fileName;
29950 attribute <ref>DownloadNetworkType</ref>? networkType;
29952 attribute <ref>DownloadHTTPHeaderFields</ref>? httpHeader;
29956 This interface defines the download request object.
29962 <ExtendedAttributeList>
29963 <ExtendedAttribute name="Constructor">
29964 <webidl>Constructor(DOMString url, optional DOMString? destination, optional DOMString? fileName, optional <ref>DownloadNetworkType</ref>? networkType, optional <ref>DownloadHTTPHeaderFields</ref>? httpHeader)</webidl>
29966 <Argument name="url">
29967 <Type type="DOMString"/>
29969 <Argument optional="optional" name="destination">
29970 <Type type="DOMString" nullable="nullable"/>
29972 <Argument optional="optional" name="fileName">
29973 <Type type="DOMString" nullable="nullable"/>
29975 <Argument optional="optional" name="networkType">
29976 <Type name="DownloadNetworkType" nullable="nullable"/>
29978 <Argument optional="optional" name="httpHeader">
29979 <Type name="DownloadHTTPHeaderFields" nullable="nullable"/>
29982 </ExtendedAttribute>
29983 </ExtendedAttributeList>
29984 <Attribute name="url" id="::Download::DownloadRequest::url">
29985 <webidl> attribute DOMString url;</webidl>
29988 An attribute to store the URL of the object to download.
29994 <Type type="DOMString"/>
29996 <Attribute name="destination" id="::Download::DownloadRequest::destination">
29997 <webidl> attribute DOMString? destination;</webidl>
30000 An attribute to store the folder path of the destination folder to which a requested file object will be downloaded.
30004 If the destination is not specified or an empty string, the file will be downloaded to the default storage: "Downloads". For more information, see <a href="../../org.tizen.web.device.apireference/tizen/filesystem.html">Filesystem API</a>.
30007 The default value is an empty string.
30014 <Type type="DOMString" nullable="nullable"/>
30016 <Attribute name="fileName" id="::Download::DownloadRequest::fileName">
30017 <webidl> attribute DOMString? fileName;</webidl>
30020 An attribute to store the file name for the specified URL.
30024 If the file name is not given or an empty string, the original file name from URL is used.
30027 The default value is an empty string.
30034 <Type type="DOMString" nullable="nullable"/>
30036 <Attribute name="networkType" id="::Download::DownloadRequest::networkType">
30037 <webidl> attribute <ref>DownloadNetworkType</ref>? networkType;</webidl>
30040 An attribute to store the allowed network type.
30044 If the network type is not given, all network type are allowed.
30047 The default value is "ALL".
30054 <Type name="DownloadNetworkType" nullable="nullable"/>
30056 <Attribute name="httpHeader" id="::Download::DownloadRequest::httpHeader">
30057 <webidl> attribute <ref>DownloadHTTPHeaderFields</ref>? httpHeader;</webidl>
30060 An attribute to store extra HTTP header fields.
30064 For more information about HTTP header fields, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2">RFC-2616</a> </p>
30066 The default value is an empty object.
30069 <Code> var req = new tizen.DownloadRequest("http://download.tizen.org/tools/README.txt");
30070 req.httpHeader["Pragma"] = "no-cache";
30071 req.httpHeader["Cookie"] = "version=1; Skin=new";
30072 req.httpHeader["X-Agent"] = "Tizen Sample App";
30078 <Type name="DownloadHTTPHeaderFields" nullable="nullable"/>
30081 <Interface name="DownloadManager" id="::Download::DownloadManager">
30082 <webidl> [NoInterfaceObject] interface DownloadManager {
30083 long start(<ref>DownloadRequest</ref> downloadRequest,
30084 optional <ref>DownloadCallback</ref>? downloadCallback) raises(<ref>WebAPIException</ref>);
30086 void cancel(long downloadId) raises(<ref>WebAPIException</ref>);
30088 void pause(long downloadId) raises(<ref>WebAPIException</ref>);
30090 void resume(long downloadId) raises(<ref>WebAPIException</ref>);
30092 <ref>DownloadState</ref> getState(long downloadId) raises(<ref>WebAPIException</ref>);
30094 <ref>DownloadRequest</ref> getDownloadRequest(long downloadId) raises(<ref>WebAPIException</ref>);
30096 DOMString getMIMEType(long downloadId) raises(<ref>WebAPIException</ref>);
30098 void setListener(long downloadId, <ref>DownloadCallback</ref> downloadCallback) raises(<ref>WebAPIException</ref>);
30102 This interface handles requests for downloading. Each step of download operation will be informed through callbacks.
30108 <ExtendedAttributeList>
30109 <ExtendedAttribute name="NoInterfaceObject">
30110 <webidl>NoInterfaceObject</webidl>
30111 </ExtendedAttribute>
30112 </ExtendedAttributeList>
30113 <Operation name="start" id="::Download::DownloadManager::start">
30114 <webidl> long start(<ref>DownloadRequest</ref> downloadRequest,
30115 optional <ref>DownloadCallback</ref>? downloadCallback) raises(<ref>WebAPIException</ref>);</webidl>
30118 Starts a download operation with the specified URL information.
30127 http://tizen.org/privilege/download
30129 <Code> var listener = {
30130 onprogress: function(id, receivedSize, totalSize) {
30131 console.log('Received with id: ' + id + ', ' + receivedSize + '/' + totalSize);
30133 onpaused: function(id) {
30134 console.log('Paused with id: ' + id);
30136 oncanceled: function(id) {
30137 console.log('Canceled with id: ' + id);
30139 oncompleted: function(id, fullPath) {
30140 console.log('Completed with id: ' + id + ', full path: ' + fullPath);
30142 onfailed: function(id, error) {
30143 console.log('Failed with id: ' + id + ', error name: ' + error.name);
30147 // Starts downloading of the file from the Web with the corresponding callbacks.
30148 var downloadRequest = new tizen.DownloadRequest("http://download.tizen.org/tools/README.txt", "documents");
30149 downloadId = tizen.download.start(downloadRequest, listener);
30155 long An identifier for each download operation.
30160 <Argument name="downloadRequest">
30163 The URL and destination information of the object to download.
30166 <Type name="DownloadRequest"/>
30168 <Argument optional="optional" name="downloadCallback">
30171 The method to invoke when the download state changes or an error occurs.
30174 <Type name="DownloadCallback" nullable="nullable"/>
30178 <RaiseException name="WebAPIException">
30181 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
30184 with error type NotSupportedError, if this feature is not supported.
30187 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
30190 with error type SecurityError, if the application does not have the privilege to call this method.
30193 with error type UnknownError if any other error occurs.
30199 <Operation name="cancel" id="::Download::DownloadManager::cancel">
30200 <webidl> void cancel(long downloadId) raises(<ref>WebAPIException</ref>);</webidl>
30203 Cancels an ongoing download operation that is specified by the <em>downloadId</em> parameter.
30208 <Code> // Cancels the ongoing download operation with the specified id.
30209 tizen.download.cancel(downloadId);
30212 <Type type="void"/>
30214 <Argument name="downloadId">
30217 The ID of the ongoing download operation to stop.
30220 <Type type="long"/>
30224 <RaiseException name="WebAPIException">
30227 with error type NotFoundError, if the identifier does not match any download operation in progress.
30230 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
30233 with error type NotSupportedError, if this feature is not supported.
30236 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
30239 with error type UnknownError, if any other error occurs.
30245 <Operation name="pause" id="::Download::DownloadManager::pause">
30246 <webidl> void pause(long downloadId) raises(<ref>WebAPIException</ref>);</webidl>
30249 Pauses an ongoing download operation that is specified by the <em>downloadId</em> parameter.
30250 The paused download operation can be resumed later by the <em>resume()</em> method.
30255 <Code> // Pauses the ongoing download operation with the specified id.
30256 tizen.download.pause(downloadId);
30259 <Type type="void"/>
30261 <Argument name="downloadId">
30264 The ID of the ongoing download operation to pause.
30267 <Type type="long"/>
30271 <RaiseException name="WebAPIException">
30274 with error type NotFoundError, if the identifier does not match any download operation in progress.
30277 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
30280 with error type NotSupportedError, if this feature is not supported.
30283 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
30286 with error type UnknownError, if any other error occurs.
30292 <Operation name="resume" id="::Download::DownloadManager::resume">
30293 <webidl> void resume(long downloadId) raises(<ref>WebAPIException</ref>);</webidl>
30296 Resumes a paused download operation that is specified by the <em>downloadId</em> parameter.
30301 <Code> // Resumes the paused download operation with the specified id.
30302 tizen.download.resume(downloadId);
30305 <Type type="void"/>
30307 <Argument name="downloadId">
30310 The ID of the paused download operation to be resume.
30313 <Type type="long"/>
30317 <RaiseException name="WebAPIException">
30320 with error type NotFoundError, if the identifier does not match any download operation in progress.
30323 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
30326 with error type NotSupportedError, if this feature is not supported.
30329 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
30332 with error type UnknownError, if any other error occurs.
30338 <Operation name="getState" id="::Download::DownloadManager::getState">
30339 <webidl> <ref>DownloadState</ref> getState(long downloadId) raises(<ref>WebAPIException</ref>);</webidl>
30342 Gets the download state of an operation synchronously with the specified ID.
30347 <Code> // Gets the state of the download operation with the given id.
30348 var state = tizen.download.getState(downloadId);
30351 <Type name="DownloadState">
30354 DownloadState The current download state of the specified ID.
30359 <Argument name="downloadId">
30362 The ID to get the current state of download operation.
30365 <Type type="long"/>
30369 <RaiseException name="WebAPIException">
30372 with error type NotFoundError, if the identifier does not match any download operation in progress.
30375 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
30378 with error type NotSupportedError, if this feature is not supported.
30381 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
30384 with error type UnknownError, if any other error occurs.
30390 <Operation name="getDownloadRequest" id="::Download::DownloadManager::getDownloadRequest">
30391 <webidl> <ref>DownloadRequest</ref> getDownloadRequest(long downloadId) raises(<ref>WebAPIException</ref>);</webidl>
30394 Gets the DownloadRequest object from a given id.
30399 <Code> // Gets the download request information with the given id.
30400 var downloadRequest = tizen.download.getDownloadRequest(downloadId);
30403 <Type name="DownloadRequest">
30406 DownloadRequest The download request information of the given id.
30411 <Argument name="downloadId">
30414 The ID to get the download request information.
30417 <Type type="long"/>
30421 <RaiseException name="WebAPIException">
30424 with error type NotFoundError, if the identifier does not match
30425 any download operation in progress.
30428 with error type TypeMismatchError, if the input parameter is not
30429 compatible with the expected type.
30432 with error type NotSupportedError, if this feature is not supported.
30435 with error type InvalidValuesError, if any of the input
30436 parameters contain an invalid value.
30439 with error type UnknownError in any other error case.
30445 <Operation name="getMIMEType" id="::Download::DownloadManager::getMIMEType">
30446 <webidl> DOMString getMIMEType(long downloadId) raises(<ref>WebAPIException</ref>);</webidl>
30449 Gets the MIME type of the downloaded file.
30452 This function will return a valid MIME type when the download operation has been started
30453 and successfully retrieved the file header.
30458 <Code> // Get the MIME type of the download operation with the given id.
30459 var MIMEtype = tizen.download.getMIMEType(downloadId);
30462 <Type type="DOMString">
30465 DOMString The MIME type of the downloaded file.
30470 <Argument name="downloadId">
30473 The ID to get the MIME type information.
30476 <Type type="long"/>
30480 <RaiseException name="WebAPIException">
30483 with error type NotFoundError, if the identifier does not match
30484 any download operation in progress.
30487 with error type TypeMismatchError, if the input parameter is not
30488 compatible with the expected type.
30491 with error type NotSupportedError, if this feature is not supported.
30494 with error type InvalidValuesError, if any of the input
30495 parameters contain an invalid value.
30498 with error type UnknownError in any other error case.
30504 <Operation name="setListener" id="::Download::DownloadManager::setListener">
30505 <webidl> void setListener(long downloadId, <ref>DownloadCallback</ref> downloadCallback) raises(<ref>WebAPIException</ref>);</webidl>
30508 Sets the download callback to the download operation of given id.
30509 It's possible to change or register the listener of download operation using the saved id.
30514 <Code> var listener = {
30515 onprogress: function(id, receivedSize, totalSize) {
30516 console.log('Received with id: ' + id + ', ' + receivedSize + '/' + totalSize);
30518 onpaused: function(id) {
30519 console.log('Paused with id: ' + id);
30521 oncanceled: function(id) {
30522 console.log('Canceled with id: ' + id);
30524 oncompleted: function(id, fileName) {
30525 console.log('Completed with id: ' + id + ', file name: ' + fileName);
30527 onfailed: function(id, error) {
30528 console.log('Failed with id: ' + id + ', error name: ' + error.name);
30532 // Start downloading the html file on the web with the corresponding callbacks.
30533 var downloadRequest = new tizen.DownloadRequest("http://download.tizen.org/tools/README.txt", "documents");
30534 downloadId = tizen.download.start(downloadRequest);
30536 // Add the listener.
30537 tizen.download.setListener(downloadId, listener);
30540 <Type type="void"/>
30542 <Argument name="downloadId">
30545 The ID to set the download callback.
30548 <Type type="long"/>
30550 <Argument name="downloadCallback">
30553 The method to invoke when the download state changes or an error occurs.
30556 <Type name="DownloadCallback"/>
30560 <RaiseException name="WebAPIException">
30563 with error type NotFoundError, if the identifier does not match
30564 any download operation in progress.
30567 with error type TypeMismatchError, if the input parameter is not
30568 compatible with the expected type.
30571 with error type NotSupportedError, if this feature is not supported.
30574 with error type InvalidValuesError, if any of the input
30575 parameters contain an invalid value.
30578 with error type UnknownError in any other error case.
30585 <Interface name="DownloadCallback" id="::Download::DownloadCallback">
30586 <webidl> [Callback, NoInterfaceObject] interface DownloadCallback {
30587 void onprogress(long downloadId, unsigned long long receivedSize, unsigned long long totalSize);
30589 void onpaused(long downloadId);
30591 void oncanceled(long downloadId);
30593 void oncompleted(long downloadId, DOMString fullPath);
30595 void onfailed(long downloadId, <ref>WebAPIError</ref> error);
30599 This interface defines notification callbacks for the download state change or progress.
30605 <ExtendedAttributeList>
30606 <ExtendedAttribute name="Callback">
30607 <webidl>Callback</webidl>
30608 </ExtendedAttribute>
30609 <ExtendedAttribute name="NoInterfaceObject">
30610 <webidl> NoInterfaceObject</webidl>
30611 </ExtendedAttribute>
30612 </ExtendedAttributeList>
30613 <Operation name="onprogress" id="::Download::DownloadCallback::onprogress">
30614 <webidl> void onprogress(long downloadId, unsigned long long receivedSize, unsigned long long totalSize);</webidl>
30617 Called when a download is successful and it called multiple times as the download progresses.
30618 The interval between <em>onprogress()</em> callback is platform-dependent. When the download is started, the <em>receivedSize </em>can be <var>0</var>.
30624 <Type type="void"/>
30626 <Argument name="downloadId">
30629 The ID of the corresponding download operation.
30632 <Type type="long"/>
30634 <Argument name="receivedSize">
30637 The size of data received in bytes.
30640 <Type type="unsigned long long"/>
30642 <Argument name="totalSize">
30645 The total size of data to receive in bytes.
30648 <Type type="unsigned long long"/>
30652 <Operation name="onpaused" id="::Download::DownloadCallback::onpaused">
30653 <webidl> void onpaused(long downloadId);</webidl>
30656 Called when the download operation is paused by the <em>pause() </em>method.
30662 <Type type="void"/>
30664 <Argument name="downloadId">
30667 The ID of the corresponding download operation.
30670 <Type type="long"/>
30674 <Operation name="oncanceled" id="::Download::DownloadCallback::oncanceled">
30675 <webidl> void oncanceled(long downloadId);</webidl>
30678 Called when download is canceled by the <em>cancel() </em>method.
30684 <Type type="void"/>
30686 <Argument name="downloadId">
30689 The ID of the corresponding download operation.
30692 <Type type="long"/>
30696 <Operation name="oncompleted" id="::Download::DownloadCallback::oncompleted">
30697 <webidl> void oncompleted(long downloadId, DOMString fullPath);</webidl>
30700 Called when the download operation is completed with the final full path.
30701 If the same file name already exists in the destination, it is changed according to the platform policy and delivered in this callback.
30707 <Type type="void"/>
30709 <Argument name="downloadId">
30712 The ID of the corresponding download operation.
30715 <Type type="long"/>
30717 <Argument name="fullPath">
30720 The final full path for the downloaded file.
30723 <Type type="DOMString"/>
30727 <Operation name="onfailed" id="::Download::DownloadCallback::onfailed">
30728 <webidl> void onfailed(long downloadId, <ref>WebAPIError</ref> error);</webidl>
30731 Called when the download operation fails.
30737 <Type type="void"/>
30739 <Argument name="downloadId">
30742 The ID of the corresponding download operation.
30745 <Type type="long"/>
30747 <Argument name="error">
30750 The reason for the download failure.
30753 <Type name="WebAPIError"/>
30759 <Module name="Filesystem" id="::Filesystem">
30760 <webidl>module Filesystem {
30761 enum FileMode { "r", "rw", "w", "a" };
30763 enum FileSystemStorageType { "INTERNAL", "EXTERNAL" };
30765 enum FileSystemStorageState { "MOUNTED", "REMOVED", "UNMOUNTABLE" };
30767 [NoInterfaceObject] interface FileSystemManagerObject {
30768 readonly attribute <ref>FileSystemManager</ref> filesystem;
30770 <ref>Tizen</ref> implements <ref>FileSystemManagerObject</ref>;
30772 [NoInterfaceObject] interface FileSystemManager {
30773 readonly attribute long maxPathLength;
30775 void resolve(DOMString location,
30776 <ref>FileSuccessCallback</ref> onsuccess,
30777 optional <ref>ErrorCallback</ref>? onerror,
30778 optional <ref>FileMode</ref>? mode) raises(<ref>WebAPIException</ref>);
30780 void getStorage(DOMString label,
30781 <ref>FileSystemStorageSuccessCallback</ref> onsuccess,
30782 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
30784 void listStorages(<ref>FileSystemStorageArraySuccessCallback</ref> onsuccess,
30785 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
30787 long addStorageStateChangeListener(<ref>FileSystemStorageSuccessCallback</ref> onsuccess,
30788 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
30790 void removeStorageStateChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
30793 [NoInterfaceObject] interface FileSystemStorage {
30794 readonly attribute DOMString label;
30796 readonly attribute <ref>FileSystemStorageType</ref> type;
30798 readonly attribute <ref>FileSystemStorageState</ref> state;
30801 [NoInterfaceObject] interface File {
30802 readonly attribute <ref>File</ref>? parent;
30804 readonly attribute boolean readOnly;
30806 readonly attribute boolean isFile;
30808 readonly attribute boolean isDirectory;
30810 readonly attribute Date? created;
30812 readonly attribute Date? modified;
30814 readonly attribute DOMString path;
30816 readonly attribute DOMString name;
30818 readonly attribute DOMString fullPath;
30820 readonly attribute unsigned long long fileSize;
30822 readonly attribute long length;
30824 DOMString toURI() raises(<ref>WebAPIException</ref>);
30826 void listFiles(<ref>FileArraySuccessCallback</ref> onsuccess,
30827 optional <ref>ErrorCallback</ref>? onerror,
30828 optional <ref>FileFilter</ref>? filter) raises(<ref>WebAPIException</ref>);
30830 void openStream(<ref>FileMode</ref> mode,
30831 <ref>FileStreamSuccessCallback</ref> onsuccess,
30832 optional <ref>ErrorCallback</ref>? onerror,
30833 optional DOMString? encoding) raises(<ref>WebAPIException</ref>);
30835 void readAsText(<ref>FileStringSuccessCallback</ref> onsuccess,
30836 optional <ref>ErrorCallback</ref>? onerror,
30837 optional DOMString? encoding) raises(<ref>WebAPIException</ref>);
30839 void copyTo(DOMString originFilePath,
30840 DOMString destinationFilePath,
30842 optional <ref>SuccessCallback</ref>? onsuccess,
30843 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
30845 void moveTo(DOMString originFilePath,
30846 DOMString destinationFilePath,
30848 optional <ref>SuccessCallback</ref>? onsuccess,
30849 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
30851 <ref>File</ref> createDirectory(DOMString dirPath) raises(<ref>WebAPIException</ref>);
30853 <ref>File</ref> createFile(DOMString relativeFilePath) raises(<ref>WebAPIException</ref>);
30855 <ref>File</ref> resolve(DOMString filePath) raises(<ref>WebAPIException</ref>);
30857 void deleteDirectory(DOMString directoryPath,
30859 optional <ref>SuccessCallback</ref>? onsuccess,
30860 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
30862 void deleteFile(DOMString filePath,
30863 optional <ref>SuccessCallback</ref>? onsuccess,
30864 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
30868 dictionary FileFilter {
30871 Date startModified;
30880 [NoInterfaceObject] interface FileStream {
30881 readonly attribute boolean eof;
30883 attribute long position setraises(<ref>WebAPIException</ref>);
30885 readonly attribute long bytesAvailable;
30889 DOMString read(long charCount) raises(<ref>WebAPIException</ref>);
30891 octet[] readBytes(long byteCount) raises(<ref>WebAPIException</ref>);
30893 DOMString readBase64(long byteCount) raises(<ref>WebAPIException</ref>);
30895 void write(DOMString stringData) raises(<ref>WebAPIException</ref>);
30897 void writeBytes(octet[] byteData) raises(<ref>WebAPIException</ref>);
30899 void writeBase64(DOMString base64Data) raises(<ref>WebAPIException</ref>);
30902 [Callback=FunctionOnly, NoInterfaceObject] interface FileSuccessCallback {
30903 void onsuccess(<ref>File</ref> file);
30906 [Callback=FunctionOnly, NoInterfaceObject] interface FileSystemStorageArraySuccessCallback {
30907 void onsuccess(<ref>FileSystemStorage</ref>[] storages);
30910 [Callback=FunctionOnly, NoInterfaceObject] interface FileSystemStorageSuccessCallback {
30911 void onsuccess(<ref>FileSystemStorage</ref> storage);
30914 [Callback=FunctionOnly, NoInterfaceObject] interface FileStringSuccessCallback {
30915 void onsuccess(DOMString fileStr);
30918 [Callback=FunctionOnly, NoInterfaceObject] interface FileStreamSuccessCallback {
30919 void onsuccess(<ref>FileStream</ref> filestream);
30922 [Callback=FunctionOnly, NoInterfaceObject] interface FileArraySuccessCallback {
30923 void onsuccess(<ref>File</ref>[] files);
30928 This API provides access to a device's filesystem.
30932 The filesystem is represented as an abstract collection of disjointed filesystem virtual
30933 root locations, each corresponding to a specific location in the device
30934 filesystem. The filesystem API exposes the hierarchies below these root
30935 locations as a single virtual filesystem, but provides no access to other
30936 parts of the device filesystem.
30939 Each virtual root has a string name. Each file or directory within the virtual
30940 filesystem is addressed using a fully-qualified path of the form:
30941 <em><root name>/<path></em> where <em><rootname></em> is
30942 the name of the virtual root and <em><path></em> is the path to the file or
30943 directory relative to that root.
30946 The following virtual roots MUST be supported:
30950 images: the images location </li>
30952 videos: the videos location </li>
30954 music: the sounds location </li>
30956 documents: the documents location </li>
30958 downloads: the location for downloaded items </li>
30960 ringtones: the location for ringtones (read-only location) </li>
30962 wgt-package: the widget package location (read-only location) </li>
30964 wgt-private: the widget private storage </li>
30966 wgt-private-tmp: the widget private volatile storage area </li>
30969 The file URI path is also supported. if you want to access other paths out of virtual root,
30970 for example '/tmp/', 'file:///tmp' could be used as location parameter.
30973 To access specific locations from those specified above, a file handle
30974 must be retrieved using the filesystem.resolve call.
30977 A file handle represents either a file or a directory. For a file, the
30978 isFile attribute is <em>true</em>. For a directory, the isDirectory attribute
30979 is <em>true</em>. A file can be opened for read and write operations, using a
30980 FileStream handle. A list of files and sub-directories can be obtained from a
30981 directory and a resolve method exists to resolve files or sub-directories
30982 more conveniently than processing directory listings.
30985 The implementation MUST support the use of the following
30986 characters in file names:
30990 Letters (azAZ) </li>
30992 Numbers (0-9) </li>
30996 Underscores ("_") </li>
30998 Hyphens ("-") </li>
31000 Periods (".") </li>
31003 The implementation MAY support additional characters in file names,
31004 depending on platform support.
31007 The implementation MAY forbid the use of additional characters in file
31008 names, depending on the platform. The use of the path separator "/"
31009 in file names MUST NOT be allowed. The "/" character is used as the (path)
31010 component separator.
31013 Some other file name and path characteristics are platform-dependent,
31014 for example, maximum path length, file name length, case sensitivity, additional
31015 character support, etc. Therefore, it is recommended that you avoid any dependency
31016 on aspects that cannot be supported across many platforms.
31019 When a path is used to interact with the underlying filesystem,
31020 the encoding used for the file path SHOULD be the platform default.
31023 For more information on the Filesystem features, see <a href="../../org.tizen.web.appprogramming/html/guide/io_guide/filesystem.htm">File System Guide</a>.
31030 <Enum name="FileMode" id="::Filesystem::FileMode">
31031 <webidl> enum FileMode { "r", "rw", "w", "a" };</webidl>
31034 The file mode provided when opening.
31038 Value "r" to obtain read-only access, "rw" to obtain read and write
31039 access, "w" to obtain write access and "a" for appending.
31046 <EnumValue stringvalue="r">
31047 <webidl> "r</webidl>
31049 <EnumValue stringvalue="rw">
31050 <webidl> "rw</webidl>
31052 <EnumValue stringvalue="w">
31053 <webidl> "w</webidl>
31055 <EnumValue stringvalue="a">
31056 <webidl> "a</webidl>
31059 <Enum name="FileSystemStorageType" id="::Filesystem::FileSystemStorageType">
31060 <webidl> enum FileSystemStorageType { "INTERNAL", "EXTERNAL" };</webidl>
31063 The type of storage.
31068 INTERNAL: Internal storage is storage that cannot be removed, such as a
31069 flash memory. </li>
31071 EXTERNAL: External storage is removable storage, such as a USB drive or
31072 memory cards. </li>
31079 <EnumValue stringvalue="INTERNAL">
31080 <webidl> "INTERNAL</webidl>
31082 <EnumValue stringvalue="EXTERNAL">
31083 <webidl> "EXTERNAL</webidl>
31086 <Enum name="FileSystemStorageState" id="::Filesystem::FileSystemStorageState">
31087 <webidl> enum FileSystemStorageState { "MOUNTED", "REMOVED", "UNMOUNTABLE" };</webidl>
31090 The state of the storage.
31095 MOUNTED: The device is mounted and can be browsed. </li>
31097 REMOVED: The device was removed. This states only applies to external drives. </li>
31099 UNMOUNTABLE: The device cannot be mounted due to an error. </li>
31106 <EnumValue stringvalue="MOUNTED">
31107 <webidl> "MOUNTED</webidl>
31109 <EnumValue stringvalue="REMOVED">
31110 <webidl> "REMOVED</webidl>
31112 <EnumValue stringvalue="UNMOUNTABLE">
31113 <webidl> "UNMOUNTABLE</webidl>
31116 <Interface name="FileSystemManagerObject" id="::Filesystem::FileSystemManagerObject">
31117 <webidl> [NoInterfaceObject] interface FileSystemManagerObject {
31118 readonly attribute <ref>FileSystemManager</ref> filesystem;
31122 Defines what is instantiated in the tizen object.
31126 There will be a tizen.filesystem object that allows accessing the
31127 functionality of the filesystem API.
31134 <ExtendedAttributeList>
31135 <ExtendedAttribute name="NoInterfaceObject">
31136 <webidl>NoInterfaceObject</webidl>
31137 </ExtendedAttribute>
31138 </ExtendedAttributeList>
31139 <Attribute readonly="readonly" name="filesystem" id="::Filesystem::FileSystemManagerObject::filesystem">
31140 <webidl> readonly attribute <ref>FileSystemManager</ref> filesystem;</webidl>
31141 <Type name="FileSystemManager"/>
31144 <Implements name1="Tizen" name2="FileSystemManagerObject">
31145 <webidl> <ref>Tizen</ref> implements <ref>FileSystemManagerObject</ref>;</webidl>
31147 <Interface name="FileSystemManager" id="::Filesystem::FileSystemManager">
31148 <webidl> [NoInterfaceObject] interface FileSystemManager {
31149 readonly attribute long maxPathLength;
31151 void resolve(DOMString location,
31152 <ref>FileSuccessCallback</ref> onsuccess,
31153 optional <ref>ErrorCallback</ref>? onerror,
31154 optional <ref>FileMode</ref>? mode) raises(<ref>WebAPIException</ref>);
31156 void getStorage(DOMString label,
31157 <ref>FileSystemStorageSuccessCallback</ref> onsuccess,
31158 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
31160 void listStorages(<ref>FileSystemStorageArraySuccessCallback</ref> onsuccess,
31161 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
31163 long addStorageStateChangeListener(<ref>FileSystemStorageSuccessCallback</ref> onsuccess,
31164 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
31166 void removeStorageStateChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
31170 The file system manager interface that provides access to the filesystem API.
31174 This manager exposes the filesystem base API, and provides functionality, such as
31175 determining root and default locations, resolving a given location
31176 into a file handle, and registering filesystem listeners for
31183 <Code> var documentsDir;
31184 function onsuccess(files) {
31185 for(var i = 0; i < files.length; i++) {
31186 console.log("File Name is " + files[i].name); // displays file name
31189 var testFile = documentsDir.createFile("test.txt");
31191 if (testFile != null) {
31192 testFile.openStream(
31195 fs.write("HelloWorld");
31198 console.log("Error " + e.message);
31199 }, "UTF-8"
31204 function onerror(error) {
31205 console.log("The error " + error.message + " occurred when listing the files in the selected folder");
31208 tizen.filesystem.resolve(
31211 documentsDir = dir;
31212 dir.listFiles(onsuccess, onerror);
31214 console.log("Error" + e.message);
31219 <ExtendedAttributeList>
31220 <ExtendedAttribute name="NoInterfaceObject">
31221 <webidl>NoInterfaceObject</webidl>
31222 </ExtendedAttribute>
31223 </ExtendedAttributeList>
31224 <Attribute readonly="readonly" name="maxPathLength" id="::Filesystem::FileSystemManager::maxPathLength">
31225 <webidl> readonly attribute long maxPathLength;</webidl>
31228 Contains the platform-dependent maximum path length.
31233 <Code> console.log("The maximum path length is " + tizen.filesystem.maxPathLength);
31236 <Type type="long"/>
31238 <Operation name="resolve" id="::Filesystem::FileSystemManager::resolve">
31239 <webidl> void resolve(DOMString location,
31240 <ref>FileSuccessCallback</ref> onsuccess,
31241 optional <ref>ErrorCallback</ref>? onerror,
31242 optional <ref>FileMode</ref>? mode) raises(<ref>WebAPIException</ref>);</webidl>
31245 Resolves a location to a file handle.
31249 It validates and resolves the given location to a file handle.
31250 If the operation completes successfully, the handle is returned
31251 in the FileSuccessCallback.
31252 A valid location is prefixed with a valid root or
31253 default location and must address an existing,
31254 accessible file or directory.
31257 A location can contain virtual path like (<var>documents/some_file.txt</var>)
31258 or it can be a file's URI (<var>file:///my_strange_path/some_file.png</var>).
31261 The list of root locations that MUST be supported by a compliant
31262 implementation are:
31266 documents: Describes the default folder in which text documents
31267 (such as pdf, doc...) are stored by default in the device. For example, in some
31268 platforms it corresponds to the "My Documents" folder. </li>
31270 images: Describes the default folder in which still images, like
31271 pictures (such as jpg, gif, png, etc.), are stored in the
31272 device by default. For example, in some platforms it corresponds to the "My Images"
31275 music: Describes the default folder in which sound clips (such as mp3,
31276 aac, etc.) are stored in the device by default. For example, in some platforms it
31277 corresponds to the "My Music" folder. </li>
31279 videos: Describes the default folder in which video clips (such as
31280 avi, mp4, etc.) are stored in the device by default. For example, in some platforms
31281 it corresponds to the "My Videos" folder. </li>
31283 downloads: Describes the default folder in which files downloaded
31284 (such as by a browser, e-mail client, etc.) are stored by default in the
31285 device. For example, in some platforms it corresponds to the "Downloads" folder.
31288 ringtones: Describes the default folder in which ringtones (such as mp3, etc)
31289 are stored by default in the device. </li>
31291 wgt-package: Describes the read-only folder in which the content of
31292 the widget file was extracted to. </li>
31294 wgt-private: Describes a private folder in which a widget can
31295 store information. This folder MUST be accessible only to the
31296 widget. Other widgets or applications MUST NOT access the
31297 information stored there. </li>
31299 wgt-private-tmp: Describes a temporary, private folder in which a widget
31300 can store data that is available during one widget execution
31301 cycle. Content of this folder MAY be removed from this directory
31302 when the widget is closed or the Web Runtime is restarted.
31303 This folder MUST be accessible only to the widget. Other
31304 widgets or applications MUST NOT have access to it. </li>
31307 The mode parameter specifies whether the resulting File object
31308 has read-only access ("r" access), read and write access ("rw" access),
31309 append access ("a" access), or write access ("w" access)
31310 to the root location containing directory tree.
31311 Permission for the requested access is obtained from the security framework.
31312 Once the resulting File object has access, access is inherited by
31313 any other File objects derived from this instance without any
31314 further reference to the security framework, as noted in
31315 descriptions of certain methods of File.
31318 The ErrorCallback is launched with these error types:
31322 InvalidValuesError: If any of the input parameters contain an invalid value.
31323 For example, the mode is not valid (that is not "r", "rw", "a", or "w"). </li>
31325 NotFoundError: The location input argument does not correspond to a valid location. </li>
31327 UnknownError: In any other error case. </li>
31337 http://tizen.org/privilege/filesystem.read
31339 <Code> tizen.filesystem.resolve(
31342 console.log("Mount point Name is " + dir.path);
31344 console.log("Error: " + e.message);
31349 <Type type="void"/>
31351 <Argument name="location">
31354 Location to resolve.
31357 <Type type="DOMString"/>
31359 <Argument name="onsuccess">
31362 Called when the location has been.
31363 successfully resolved, passing the newly created File object.
31366 <Type name="FileSuccessCallback"/>
31368 <Argument optional="optional" name="onerror">
31371 Called if an error occurred.
31374 <Type name="ErrorCallback" nullable="nullable"/>
31376 <Argument optional="optional" name="mode">
31379 Optional string of value "r" to obtain read-only access,
31380 "rw" to obtain read and write access, "a" to obtain append access,
31381 or "w" to obtain write access to all files and
31382 directories that can be reached from the File object passed
31383 to onsuccess. Defaults to "rw" if absent or <em>null</em>.
31386 <Type name="FileMode" nullable="nullable"/>
31390 <RaiseException name="WebAPIException">
31393 with error type TypeMismatchError, if the input parameter
31394 is not compatible with the expected type for that parameter.
31397 with error type SecurityError, if the application does not have the privilege to call this method.
31400 with error type NotSupportedError, if the feature is not supported.
31406 <Operation name="getStorage" id="::Filesystem::FileSystemManager::getStorage">
31407 <webidl> void getStorage(DOMString label,
31408 <ref>FileSystemStorageSuccessCallback</ref> onsuccess,
31409 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);</webidl>
31412 Gets information about a storage based on its label.
31416 Get storage information based on its label (example: "MyThumbDrive",
31417 "InternalFlash"). The onsuccess will receive as input argument the data
31418 structure containing additional information about the drive.
31421 The ErrorCallback is launched with these error types:
31425 NotFoundError: No drive was found with the given label. </li>
31427 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
31429 UnknownError: In any other error case. </li>
31439 http://tizen.org/privilege/filesystem.read
31441 <Code> function onStorage(storage) {
31445 function onStorageError(e) {
31446 console.log("Storage not found!" + e.message);
31449 tizen.filesystem.getStorage("music", onStorage, onStorageError);
31452 <Type type="void"/>
31454 <Argument name="label">
31460 <Type type="DOMString"/>
31462 <Argument name="onsuccess">
31465 Called when the list of storage is available,
31466 passing the storage list to the callback.
31469 <Type name="FileSystemStorageSuccessCallback"/>
31471 <Argument optional="optional" name="onerror">
31474 Called if an error occurred.
31477 <Type name="ErrorCallback" nullable="nullable"/>
31481 <RaiseException name="WebAPIException">
31484 with error type TypeMismatchError, if the input parameter
31485 is not compatible with the expected type for that parameter.
31488 with error type SecurityError, if the application does not have the privilege to call this method.
31491 with error type NotSupportedError, if the feature is not supported.
31497 <Operation name="listStorages" id="::Filesystem::FileSystemManager::listStorages">
31498 <webidl> void listStorages(<ref>FileSystemStorageArraySuccessCallback</ref> onsuccess,
31499 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);</webidl>
31502 Lists the available storages on the device.
31506 Get the list of available internal and external storage devices. The
31507 onsuccess will receive as input argument a list of the data
31508 structure containing additional information about each drive found.
31509 Can get storages would have a label named as 'internal0', virtual roots (images, documents,...), 'removable1', 'removable2'.
31510 'removable1' label would be used to resolve sdcard and 'removable2' label would be used to resolve usb host, if supported.
31511 The vfat filesystem used widly as sdcard filesystem is not case-sensitive.
31512 If you want to handle the file on sdcard, you need to consider case-sensitive filenames are regarded as same name.
31515 Labels can be different, depends on platform implementation.
31518 The ErrorCallback is launched with these error types:
31522 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
31524 UnknownError: In any other error case. </li>
31534 http://tizen.org/privilege/filesystem.read
31536 <Code> function alertForCorruptedRemovableDrives(storages) {
31537 for (var i = 0; i < storages.length; i++) {
31538 if (storages[i].type != "EXTERNAL")
31540 if (storages[i].state == "UNMOUNTABLE")
31541 console.log("External drive " + storages[i].label + " is corrupted.");
31545 tizen.filesystem.listStorages(alertForCorruptedRemovableDrives);
31548 <Type type="void"/>
31550 <Argument name="onsuccess">
31553 Called when the list of storage is available,
31554 passing the storage list to the callback.
31557 <Type name="FileSystemStorageArraySuccessCallback"/>
31559 <Argument optional="optional" name="onerror">
31562 Called if an error occurred.
31565 <Type name="ErrorCallback" nullable="nullable"/>
31569 <RaiseException name="WebAPIException">
31572 with error type TypeMismatchError, if the input parameter
31573 is not compatible with the expected type for that parameter.
31576 with error type SecurityError, if the application does not have the privilege to call this method.
31579 with error type NotSupportedError, if the feature is not supported.
31585 <Operation name="addStorageStateChangeListener" id="::Filesystem::FileSystemManager::addStorageStateChangeListener">
31586 <webidl> long addStorageStateChangeListener(<ref>FileSystemStorageSuccessCallback</ref> onsuccess,
31587 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);</webidl>
31590 Subscribes to notifications when a storage state changes.
31594 The most common usage for this method would be to watch notifications of
31595 additions and removals of external storages.
31598 When executed, the implementation MUST immediately return a subscription identifier that identifies
31599 the watch operation. After returning the identifier, the watch operation is started
31600 asynchronously. The onsuccess MUST be invoked every time
31601 a storage state changes. If the attempt fails, the onerror (if present)
31602 MUST be invoked with the relevant error type.
31605 The watch operation MUST continue until the removeStorageStateChangeListener() method is
31606 called with the corresponding subscription identifier.
31616 http://tizen.org/privilege/filesystem.write
31618 <Code> var watchID;
31619 function onStorageStateChanged(storage) {
31620 if (storage.state == "MOUNTED")
31621 console.log("Storage " + storage.label + " was added!");
31624 watchID = tizen.filesystem.addStorageStateChangeListener(onStorageStateChanged);
31630 long The identifier used to clear the watch subscription.
31635 <Argument name="onsuccess">
31638 To be invoked in every change on storage state.
31641 <Type name="FileSystemStorageSuccessCallback"/>
31643 <Argument optional="optional" name="onerror">
31646 To be invoked in case of error during the watch process.
31649 <Type name="ErrorCallback" nullable="nullable"/>
31653 <RaiseException name="WebAPIException">
31656 with error type TypeMismatchError, if any input parameter
31657 is not compatible with the expected type for that parameter.
31660 with error type SecurityError, if the application does not have the privilege to call this method.
31663 with error type NotSupportedError, if the feature is not supported.
31666 with error type UnknownError, if any other error case.
31672 <Operation name="removeStorageStateChangeListener" id="::Filesystem::FileSystemManager::removeStorageStateChangeListener">
31673 <webidl> void removeStorageStateChangeListener(long watchId) raises(<ref>WebAPIException</ref>);</webidl>
31676 Unsubscribes a storage watch operation.
31680 If the watchId argument is valid and corresponds to a subscription already in
31681 place, the watch process MUST immediately stop and no further callbacks MUST be
31692 http://tizen.org/privilege/filesystem.write
31694 <Code> var watchID;
31695 function onStorageStateChanged(storage) {
31696 if (storage.state == "MOUNTED")
31697 console.log("Storage " + storage.label + " was added!");
31698 tizen.filesystem.removeStorageStateChangeListener(watchID);
31701 watchID = tizen.filesystem.addStorageStateChangeListener(onStorageStateChanged);
31706 <Type type="void"/>
31708 <Argument name="watchId">
31711 Subscription Identifier.
31714 <Type type="long"/>
31718 <RaiseException name="WebAPIException">
31721 with error type TypeMismatchError, if any input parameter
31722 is not compatible with the expected type for that parameter.
31725 with error type InvalidValuesError, if any of the input
31726 parameters contain an invalid value.
31729 with error type SecurityError, if the application does not have the privilege to call this method.
31732 with error type NotSupportedError, if the feature is not supported.
31735 with error type UnknownError, if any other error case.
31738 with error type NotFoundError, if the watchId does not exist.
31745 <Interface name="FileSystemStorage" id="::Filesystem::FileSystemStorage">
31746 <webidl> [NoInterfaceObject] interface FileSystemStorage {
31747 readonly attribute DOMString label;
31749 readonly attribute <ref>FileSystemStorageType</ref> type;
31751 readonly attribute <ref>FileSystemStorageState</ref> state;
31755 The FileSystemStorage interface.
31759 This interface gives additional information about a storage, such as if the
31760 device is mounted, if it's a removable drive or not, or the device's name.
31761 To retrieve the mount point, the resolve() method should be used using
31762 the label as argument.
31769 <ExtendedAttributeList>
31770 <ExtendedAttribute name="NoInterfaceObject">
31771 <webidl>NoInterfaceObject</webidl>
31772 </ExtendedAttribute>
31773 </ExtendedAttributeList>
31774 <Attribute readonly="readonly" name="label" id="::Filesystem::FileSystemStorage::label">
31775 <webidl> readonly attribute DOMString label;</webidl>
31782 Used as input for functions like getStorage() and also used as 'location' parameter for File.resolve() and FileSystemManager.resolve().
31789 <Type type="DOMString"/>
31791 <Attribute readonly="readonly" name="type" id="::Filesystem::FileSystemStorage::type">
31792 <webidl> readonly attribute <ref>FileSystemStorageType</ref> type;</webidl>
31799 Defines whether the storage is internal or external.
31806 <Type name="FileSystemStorageType"/>
31808 <Attribute readonly="readonly" name="state" id="::Filesystem::FileSystemStorage::state">
31809 <webidl> readonly attribute <ref>FileSystemStorageState</ref> state;</webidl>
31816 Defines whether the storage is mounted or not.
31823 <Type name="FileSystemStorageState"/>
31826 <Interface name="File" id="::Filesystem::File">
31827 <webidl> [NoInterfaceObject] interface File {
31828 readonly attribute <ref>File</ref>? parent;
31830 readonly attribute boolean readOnly;
31832 readonly attribute boolean isFile;
31834 readonly attribute boolean isDirectory;
31836 readonly attribute Date? created;
31838 readonly attribute Date? modified;
31840 readonly attribute DOMString path;
31842 readonly attribute DOMString name;
31844 readonly attribute DOMString fullPath;
31846 readonly attribute unsigned long long fileSize;
31848 readonly attribute long length;
31850 DOMString toURI() raises(<ref>WebAPIException</ref>);
31852 void listFiles(<ref>FileArraySuccessCallback</ref> onsuccess,
31853 optional <ref>ErrorCallback</ref>? onerror,
31854 optional <ref>FileFilter</ref>? filter) raises(<ref>WebAPIException</ref>);
31856 void openStream(<ref>FileMode</ref> mode,
31857 <ref>FileStreamSuccessCallback</ref> onsuccess,
31858 optional <ref>ErrorCallback</ref>? onerror,
31859 optional DOMString? encoding) raises(<ref>WebAPIException</ref>);
31861 void readAsText(<ref>FileStringSuccessCallback</ref> onsuccess,
31862 optional <ref>ErrorCallback</ref>? onerror,
31863 optional DOMString? encoding) raises(<ref>WebAPIException</ref>);
31865 void copyTo(DOMString originFilePath,
31866 DOMString destinationFilePath,
31868 optional <ref>SuccessCallback</ref>? onsuccess,
31869 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
31871 void moveTo(DOMString originFilePath,
31872 DOMString destinationFilePath,
31874 optional <ref>SuccessCallback</ref>? onsuccess,
31875 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
31877 <ref>File</ref> createDirectory(DOMString dirPath) raises(<ref>WebAPIException</ref>);
31879 <ref>File</ref> createFile(DOMString relativeFilePath) raises(<ref>WebAPIException</ref>);
31881 <ref>File</ref> resolve(DOMString filePath) raises(<ref>WebAPIException</ref>);
31883 void deleteDirectory(DOMString directoryPath,
31885 optional <ref>SuccessCallback</ref>? onsuccess,
31886 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
31888 void deleteFile(DOMString filePath,
31889 optional <ref>SuccessCallback</ref>? onsuccess,
31890 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
31894 The file interface.
31898 This interface represents the file abstraction in use.
31899 A file handle represents a file
31900 if the isFile property is <em>true</em>, if the isFile property is <em>false</em>, the file
31901 handle represents a directory.
31902 If a file handle represents a directory, it can address files and directories.
31905 The file object permissions for the file object location and tree rooted
31906 at that location depends upon the mode defined in the resolve method.
31907 When a File object creates a child File object,
31908 the new File object inherits its access rights from
31909 the parent object without any reference to the security framework, as
31910 noted in certain methods of File.
31913 A file handle representing a file can be opened for I/O operations,
31914 such as reading and writing.
31917 A file handle representing a directory can be used for listing all
31918 files and directories rooted as the file handle location.
31924 <Code> function onsuccess(files) {
31925 for(var i = 0; i < files.length; i++) {
31926 // alerts each name of dir's contents
31927 console.log(files[i].name);
31931 function onerror(error) {
31932 console.log("The error " + error.message +
31933 " occurred when listing the files in the selected folder");
31936 // list directory contents
31937 dir.listFiles(onsuccess, onerror);
31940 <ExtendedAttributeList>
31941 <ExtendedAttribute name="NoInterfaceObject">
31942 <webidl>NoInterfaceObject</webidl>
31943 </ExtendedAttribute>
31944 </ExtendedAttributeList>
31945 <Attribute readonly="readonly" name="parent" id="::Filesystem::File::parent">
31946 <webidl> readonly attribute <ref>File</ref>? parent;</webidl>
31949 The parent directory handle.
31953 <em>null</em> if there is no parent directory.
31956 If there is no parent directory, this represents a root location.
31962 <Code> // list directory contents
31963 dir.listFiles(onsuccess, onerror);
31965 function onsuccess(files) {
31966 for(var i = 0; i < files.length; i++) {
31967 // prints the file parent, should contain the
31968 // same value for all the files in the loop
31969 console.log("All the files should have the same parent " +
31974 function onerror(error){
31975 console.log("The error " + error.message +
31976 " occurred when listing the files in the selected folder");
31980 <Type name="File" nullable="nullable"/>
31982 <Attribute readonly="readonly" name="readOnly" id="::Filesystem::File::readOnly">
31983 <webidl> readonly attribute boolean readOnly;</webidl>
31986 The file/directory access state in the filesystem.
31990 <em>true</em> if object has read-only access at its location.
31993 <em>false</em> if object has write access at its location.
31996 This attribute represents the actual state of a
31997 file or directory in the filesystem. Its value is not affected by
31998 the mode used in FileSystemManager.resolve that was used to
31999 create the File object from which this File object was obtained.
32005 <Code> // list directory contents
32006 dir.listFiles(onsuccess, onerror);
32008 function onsuccess(files) {
32009 for(var i = 0; i < files.length; i++) {
32010 if(files[i].readOnly)
32011 console.log("Cannot write to file " + files[i].name);
32013 console.log("Can write to file " + files[i].name);
32017 function onerror(error) {
32018 console.log("The error " + error.message + " occurred when listing the files in the selected folder");
32022 <Type type="boolean"/>
32024 <Attribute readonly="readonly" name="isFile" id="::Filesystem::File::isFile">
32025 <webidl> readonly attribute boolean isFile;</webidl>
32032 <em>true</em> if this handle is a file.
32033 <em>false</em> if this handle is a directory.
32040 <Type type="boolean"/>
32042 <Attribute readonly="readonly" name="isDirectory" id="::Filesystem::File::isDirectory">
32043 <webidl> readonly attribute boolean isDirectory;</webidl>
32050 <em>true</em> if this handle is a directory,
32051 <em>false</em> if this handle is a file.
32058 <Type type="boolean"/>
32060 <Attribute readonly="readonly" name="created" id="::Filesystem::File::created">
32061 <webidl> readonly attribute Date? created;</webidl>
32064 The creation timestamp of this file.
32068 This is the timestamp when the file was first created in the filesystem.
32069 Equivalent to the timestamp when a call to createFile() succeeds.
32072 If the platform does not support this attribute, it MUST
32076 It is unspecified and platform-dependent if the creation
32077 timestamp changes when a file is moved.
32084 <Type type="Date" nullable="nullable"/>
32086 <Attribute readonly="readonly" name="modified" id="::Filesystem::File::modified">
32087 <webidl> readonly attribute Date? modified;</webidl>
32090 The modification timestamp.
32094 The modification timestamp of this file. This is the timestamp
32095 of the most recent modification to the file, usually when the last
32096 write operation succeeded. Opening a file for reading does not change
32097 the modification timestamp.
32100 If the platform does not support this attribute, it MUST
32104 It is unspecified and platform-dependent if the modified
32105 timestamp changes when a file is moved.
32111 <Code> console.log(file.modified); // displays the modification timestamp
32114 <Type type="Date" nullable="nullable"/>
32116 <Attribute readonly="readonly" name="path" id="::Filesystem::File::path">
32117 <webidl> readonly attribute DOMString path;</webidl>
32120 The path of this file, excluding the file name.
32124 This is the path of this file, beginning with the name of the root containing the file,
32125 up to and including the directory containing the file, but excluding the file name.
32128 Except in a special case of the File representing the root itself, the last
32129 character is always the character '/'.
32132 For example, if a file is located at music/ramones/volume1/RockawayBeach.mp3,
32133 the path would be music/ramones/volume1/.
32136 For example, if a directory is located at music/ramones/volume1, the path would be
32140 For the virtual roots, the path is same as the name of the virtual root.
32141 For example, if the root is music, then the path is music. If the root is documents, then the path is documents.
32147 <Code> console.log(file.path); // should be 'music/' if the file is music/foo.mp3
32150 <Type type="DOMString"/>
32152 <Attribute readonly="readonly" name="name" id="::Filesystem::File::name">
32153 <webidl> readonly attribute DOMString name;</webidl>
32156 The file name, excluding any path components.
32160 This is the name of this file, excluding the root name and any other path components.
32163 For example, if a file is located at
32164 music/ramones/volume1/RockawayBeach.mp3, the name would be RockawayBeach.mp3.
32167 For example, if a directory is located at music/ramones/volume1, the
32168 name would be volume1.
32171 For the special case of the root itself, the name is an empty string.
32177 <Code> console.log(file.name); // should be foo.mp3 if the file path is music/foo.mp3
32180 <Type type="DOMString"/>
32182 <Attribute readonly="readonly" name="fullPath" id="::Filesystem::File::fullPath">
32183 <webidl> readonly attribute DOMString fullPath;</webidl>
32186 The full path of this file.
32190 The full path of this file, beginning with the name of the root containing the file,
32191 and including the name of the file or directory itself.
32194 For instance, for a file, if the file is located at
32195 music/ramones/volume1/RockawayBeach.mp3, then the fullPath is
32196 music/ramones/volume1/RockawayBeach.mp3.
32199 For a directory, if the directory is located at music/ramones/volume1, then the
32200 fullPath is music/ramones/volume1.
32203 For the special case of the root itself, if the root is music, then the fullPath is
32207 The fullPath is always equal to path + name.
32213 <Code> console.log(file.fullPath); // should be music/track1.mp3 if the file is music/track1.mp3
32216 <Type type="DOMString"/>
32218 <Attribute readonly="readonly" name="fileSize" id="::Filesystem::File::fileSize">
32219 <webidl> readonly attribute unsigned long long fileSize;</webidl>
32222 The size of this file, in bytes.
32226 If there's an attempt to read this attribute on a directory,
32227 <em>undefined</em> is returned. To retrieve the
32228 number of files and directories contained in the directory,
32229 use the length attribute, instead.
32235 <Code> console.log(file.fileSize); // displays the file size
32238 <Type type="unsigned long long"/>
32240 <Attribute readonly="readonly" name="length" id="::Filesystem::File::length">
32241 <webidl> readonly attribute long length;</webidl>
32244 The number of files and directories contained in this file handle.
32248 If there's an attempt to read this attribute on a file,
32249 <em>undefined</em> is returned. To retrieve the
32250 size of a file, use the fileSize attribute instead.
32256 <Code> console.log(file.length); // '3' if the directory contains two files and one sub-directory
32259 <Type type="long"/>
32261 <Operation name="toURI" id="::Filesystem::File::toURI">
32262 <webidl> DOMString toURI() raises(<ref>WebAPIException</ref>);</webidl>
32265 Returns a URI for the file.
32269 Returns a URI that can be used to identify this entry (such as using it
32270 as the src attribute on an HTML img element). The URI has no specific
32271 expiration, it should be valid at least as long as the file exists.
32274 When this method is invoked, the implementation MUST generate a URI.
32277 If that URI corresponds to any of the public virtual roots (that is
32278 images, videos, music, documents, and downloads) the URI
32279 MUST be globally unique and could be used by any widget.
32282 If that URI corresponds to a file located in any of the widget private
32283 areas (such as wgt-package, wgt-private, wgt-private-tmp). The generated
32284 URI MUST be unique for that file and for the widget making the request
32285 (such as including some derived from the widget id in the URI).
32286 These URIs MUST NOT be accessible to other widgets,
32287 apart from the one invoking this method.
32297 http://tizen.org/privilege/filesystem.read
32299 <Code> // 'file:///opt/usr/media/music/ramones/RockawayBeach.mp3' if the file is
32300 // music/ramones/RockawayBeach.mp3
32301 console.log(file.toURI());
32304 <Type type="DOMString">
32307 DOMString The URI that identifies the file or <em>null</em> if an error occurs.
32313 <RaiseException name="WebAPIException">
32316 with error type NotSupportedError, if the feature is not supported.
32319 with error type SecurityError, if the application does not have the privilege to call this method.
32322 with error type UnknownError in any other error situation.
32328 <Operation name="listFiles" id="::Filesystem::File::listFiles">
32329 <webidl> void listFiles(<ref>FileArraySuccessCallback</ref> onsuccess,
32330 optional <ref>ErrorCallback</ref>? onerror,
32331 optional <ref>FileFilter</ref>? filter) raises(<ref>WebAPIException</ref>);</webidl>
32334 Returns the list of all files in this directory.
32338 The list of files will be passed as a File[] in the onsuccess
32339 and contains directories and files. However, the directories "." and ".."
32340 MUST NOT be returned. Each File object part of the array MUST inherit
32341 all the access rights (that is one of the values in FileMode) from the File object in which
32342 this method was invoked.
32345 If the filter is passed and contains valid values, only those directories
32346 and files in the directory that match the filter criteria specified
32347 in the FileFilter interface MUST be returned in the onsuccess.
32348 If no filter is passed, the filter is <em>null</em> or undefined, or the filter contains invalid
32349 values, the implementation MUST return the full list of files in the directory.
32352 If the directory does not contain any files or directories, or
32353 the filter criteria is unmatched to any files or directories, the onsuccess will be
32354 invoked with an empty array.
32357 The ErrorCallback is launched with these error types:
32361 IOError: The operation is launched on a file (not a directory). </li>
32363 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
32365 UnknownError: In any other error case. </li>
32375 http://tizen.org/privilege/filesystem.read
32377 <Code> function onsuccess(files) {
32378 console.log("There are " + files.length + " in the selected folder");
32381 function onerror(error) {
32382 console.log("The error " + error.message + " occurred when listing the files in the selected folder");
32385 tizen.filesystem.resolve(
32386 "documents",
32388 dir.listFiles(onsuccess, onerror);
32390 console.log("Error " + e.message);
32395 <Type type="void"/>
32397 <Argument name="onsuccess">
32400 Called when the list operation has been successfully completed.
32403 <Type name="FileArraySuccessCallback"/>
32405 <Argument optional="optional" name="onerror">
32408 Called if an error occurred.
32411 <Type name="ErrorCallback" nullable="nullable"/>
32413 <Argument optional="optional" name="filter">
32416 Used to restrict the listed files.
32419 <Type name="FileFilter" nullable="nullable"/>
32423 <RaiseException name="WebAPIException">
32426 with error type TypeMismatchError, if the input parameter
32427 is not compatible with the expected type for that parameter.
32430 with error type SecurityError, if the application does not have the privilege to call this method.
32433 with error type NotSupportedError, if the feature is not supported.
32439 <Operation name="openStream" id="::Filesystem::File::openStream">
32440 <webidl> void openStream(<ref>FileMode</ref> mode,
32441 <ref>FileStreamSuccessCallback</ref> onsuccess,
32442 optional <ref>ErrorCallback</ref>? onerror,
32443 optional DOMString? encoding) raises(<ref>WebAPIException</ref>);</webidl>
32446 Opens the file in the given mode supporting the given
32451 This operation is performed asynchronously. If the file is opened
32452 successfully, the onsuccess is invoked with a FileStream
32453 that can be used for reading and writing the file, depending on the
32454 mode. The return FileStream instance includes a file pointer, which represents
32455 the current position in the file. The filepointer will, by default, be at the start of the file,
32456 except in the case of opening with append ("a") mode, in which case
32457 the filepointer points to the end of the file.
32460 The ErrorCallback is launched with these error types:
32464 InvalidValuesError: If any of the input parameters contains an invalid value. </li>
32466 IOError: The operation is launched on a directory (not a file), the file is not
32467 valid or it does not exist. </li>
32469 UnknownError: In any other error case. </li>
32479 http://tizen.org/privilege/filesystem.read
32481 <Code> var documentsDir;
32482 function onsuccess(files) {
32483 for(var i = 0; i < files.length; i++) {
32484 console.log("File Name is " + files[i].name); // displays file name
32487 var testFile = documentsDir.createFile("test.txt");
32488 if (testFile != null) {
32489 testFile.openStream(
32492 fs.write("HelloWorld");
32495 console.log("Error " + e.message);
32496 }, "UTF-8"
32501 function onerror(error) {
32502 console.log("The error " + error.message + " occurred when listing the files in the selected folder");
32505 tizen.filesystem.resolve(
32508 documentsDir = dir; dir.listFiles(onsuccess,onerror);
32510 console.log("Error" + e.message);
32515 <Type type="void"/>
32517 <Argument name="mode">
32520 The mode for opening a file:
32521 <b>"r"</b> for reading
32522 <b>"a"</b> for appending
32523 <b>"w"</b> for [over]writing
32524 <b>"rw"</b> for reading and writing
32527 <Type name="FileMode"/>
32529 <Argument name="onsuccess">
32532 Called when the file has been opened.
32535 <Type name="FileStreamSuccessCallback"/>
32537 <Argument optional="optional" name="onerror">
32540 Called if an error occurred.
32543 <Type name="ErrorCallback" nullable="nullable"/>
32545 <Argument optional="optional" name="encoding">
32548 The encoding for read/write operations on the file,
32549 at least the following encodings MUST be supported:
32550 "<a href="http://www.ietf.org/rfc/rfc2279.txt">UTF-8</a>" default encoding,
32551 "<a href="http://en.wikipedia.org/wiki/ISO/IEC_8859-1">ISO-8859-1</a>" latin1 encoding.
32552 If no encoding is passed by the developer, then the default platform encoding
32556 <Type type="DOMString" nullable="nullable"/>
32560 <RaiseException name="WebAPIException">
32563 with error type TypeMismatchError, if the input parameter
32564 is not compatible with the expected type for that parameter.
32567 with error type SecurityError, if the application does not have the privilege to call this method.
32570 with error type NotSupportedError, if the feature is not supported.
32576 <Operation name="readAsText" id="::Filesystem::File::readAsText">
32577 <webidl> void readAsText(<ref>FileStringSuccessCallback</ref> onsuccess,
32578 optional <ref>ErrorCallback</ref>? onerror,
32579 optional DOMString? encoding) raises(<ref>WebAPIException</ref>);</webidl>
32582 Reads the content of a file as a DOMString.
32586 If the operation is successfully executed, the onsuccess is
32587 invoked and a DOMString is passed as input parameter that represents
32588 the file content in the format determined by the encoding parameter.
32591 The ErrorCallback is launched with these error types:
32595 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
32597 IOError: The operation is launched on a directory (not a file), the file is not
32598 valid, or the file does not exist. </li>
32600 UnknownError: In any other error case. </li>
32610 http://tizen.org/privilege/filesystem.read
32612 <Code> function onsuccess(files) {
32613 for(var i = 0; i < files.length; i++) {
32614 console.log("File Name is " + files[i].name); // displays file name
32615 if (files[i].isDirectory == false)
32616 files[i].readAsText(
32618 console.log("The file content " + str);
32620 console.log("Error " + e.message);
32621 }, "UTF-8"
32626 function onerror(error) {
32627 console.log("The error " + error.message + " occurred when listing the files in the selected folder");
32631 tizen.filesystem.resolve(
32634 documentsDir = dir;
32635 dir.listFiles(onsuccess,onerror);
32637 console.log("Error" + e.message);
32642 <Type type="void"/>
32644 <Argument name="onsuccess">
32647 Called when the file has been successfully read.
32650 <Type name="FileStringSuccessCallback"/>
32652 <Argument optional="optional" name="onerror">
32655 If an error occurs while reading the file.
32658 <Type name="ErrorCallback" nullable="nullable"/>
32660 <Argument optional="optional" name="encoding">
32663 The encoding for read/write operations on the file,
32664 at least the following encodings MUST be supported:
32665 "<a href="http://www.ietf.org/rfc/rfc2279.txt">UTF-8</a>" default encoding,
32666 "<a href="http://en.wikipedia.org/wiki/ISO/IEC_8859-1">ISO-8859-1</a>" latin1 encoding.
32667 If no encoding is passed by the developer, then the default platform
32668 encoding MUST be used.
32671 <Type type="DOMString" nullable="nullable"/>
32675 <RaiseException name="WebAPIException">
32678 with error type TypeMismatchError, if the input parameter
32679 is not compatible with the expected type for that parameter.
32682 with error type SecurityError, if the application does not have the privilege to call this method.
32685 with error type NotSupportedError, if the feature is not supported.
32691 <Operation name="copyTo" id="::Filesystem::File::copyTo">
32692 <webidl> void copyTo(DOMString originFilePath,
32693 DOMString destinationFilePath,
32695 optional <ref>SuccessCallback</ref>? onsuccess,
32696 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);</webidl>
32699 Copies (and overwrites if possible and specified) a file or a
32700 directory from a specified location to another specified location.
32704 The copy of the file or directory identified by the originFilePath parameter
32705 MUST be created in the path passed in the destinationFilePath parameter.
32708 The file or directory to be copied MUST be under the Directory from which the method
32709 is invoked, otherwise the operation MUST NOT be performed.
32712 If the copy is performed successfully, the onsuccess is invoked.
32715 The ErrorCallback is launched with these error types:
32719 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
32721 NotFoundError: originFilePath does not correspond to a valid file or destinationPath is not a valid path. </li>
32723 IOError: The File in which the copyTo method is invoked is a file (not a directory),
32724 originFilePath corresponds to a file or directory in use by another process,
32725 overwrite parameter is <em>false</em> and destinationFilePath corresponds to an existing
32726 file or directory. </li>
32728 UnknownError: In any other error case. </li>
32738 http://tizen.org/privilege/filesystem.write
32740 <Code> var documentsDir;
32741 function onsuccess(files) {
32742 for(var i = 0; i < files.length; i++) {
32743 if (files[i].isDirectory == false) {
32744 documentsDir.copyTo(files[i].fullPath,
32745 "images/backup/" + files[i].name,
32747 function(){console.log("file copied");});
32752 function onerror(error) {
32753 console.log("The error " + error.message +
32754 " occurred when listing the files in the selected folder");
32757 tizen.filesystem.resolve(
32760 documentsDir = dir;
32761 dir.listFiles(onsuccess, onerror);
32763 console.log("Error" + e.message);
32768 <Type type="void"/>
32770 <Argument name="originFilePath">
32773 The origin full virtual file or directory path, it must be under the current directory.
32776 <Type type="DOMString"/>
32778 <Argument name="destinationFilePath">
32781 The new full virtual file path or directory path.
32784 <Type type="DOMString"/>
32786 <Argument name="overwrite">
32789 <em>true</em> enforces overwriting an existing file.
32792 <Type type="boolean"/>
32794 <Argument optional="optional" name="onsuccess">
32797 Called when the file has been copied.
32800 <Type name="SuccessCallback" nullable="nullable"/>
32802 <Argument optional="optional" name="onerror">
32805 Called if an error occurred.
32808 <Type name="ErrorCallback" nullable="nullable"/>
32812 <RaiseException name="WebAPIException">
32815 with error type TypeMismatchError, if the input parameter
32816 is not compatible with the expected type for that parameter.
32819 with error type SecurityError, if the application does not have the privilege to call this method.
32822 with error type NotSupportedError, if the feature is not supported.
32828 <Operation name="moveTo" id="::Filesystem::File::moveTo">
32829 <webidl> void moveTo(DOMString originFilePath,
32830 DOMString destinationFilePath,
32832 optional <ref>SuccessCallback</ref>? onsuccess,
32833 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);</webidl>
32836 Moves a file or a directory from a specified location to another.
32840 The file or directory will be moved (and will overwrite if possible and specified)
32841 atomically to the given path. This operation is different from
32842 instantiating copyTo and then deleting the original file, as on certain
32843 platforms, this operation does not require extra disk space.
32846 The file or directory identified by the originFilePath parameter
32847 MUST be moved to the path passed in the destinationFilePath parameter.
32850 The file to be moved MUST be under the Directory from which the method
32851 is invoked, otherwise the operation MUST NOT be performed.
32854 If the file or directory is moved successfully, the onsuccess is
32858 The ErrorCallback is launched with these error types:
32862 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
32864 NotFoundError: originFilePath does not correspond to a valid file or destinationPath is not a valid path. </li>
32866 IOError: The File in which the moveTo method is invoked is a file (not a directory),
32867 originFilePath corresponds to a file or directory in use by another process,
32868 overwrite parameter is <em>false</em> and destinationFilePath corresponds to an existing
32869 file or directory. </li>
32871 UnknownError: In any other error case. </li>
32881 http://tizen.org/privilege/filesystem.write
32883 <Code> var documentsDir;
32884 function onsuccess(files) {
32885 for(var i = 0; i < files.length; i++) {
32886 if (files[i].isDirectory == false) {
32887 documentsDir.moveTo(files[i].fullPath,
32888 "images/newFolder/" + files[i].name,
32890 function(){console.log("file moved");});
32895 function onerror(error) {
32896 console.log("The error " + error.message +
32897 " occurred during listing the files in the selected folder");
32900 tizen.filesystem.resolve(
32903 documentsDir = dir;
32904 dir.listFiles(onsuccess, onerror);
32906 console.log("Error" + e.message);
32911 <Type type="void"/>
32913 <Argument name="originFilePath">
32916 The origin full virtual file or directory path, it must be under the current directory.
32919 <Type type="DOMString"/>
32921 <Argument name="destinationFilePath">
32924 The new full virtual file path or directory path.
32927 <Type type="DOMString"/>
32929 <Argument name="overwrite">
32932 <em>true</em> enforces overwriting an existing file.
32935 <Type type="boolean"/>
32937 <Argument optional="optional" name="onsuccess">
32940 Called when the file has been moved.
32943 <Type name="SuccessCallback" nullable="nullable"/>
32945 <Argument optional="optional" name="onerror">
32948 Called if an error occurred.
32951 <Type name="ErrorCallback" nullable="nullable"/>
32955 <RaiseException name="WebAPIException">
32958 with error type TypeMismatchError, if the input parameter
32959 is not compatible with the expected type for that parameter.
32962 with error type SecurityError, if the application does not have the privilege to call this method.
32965 with error type NotSupportedError, if the feature is not supported.
32971 <Operation name="createDirectory" id="::Filesystem::File::createDirectory">
32972 <webidl> <ref>File</ref> createDirectory(DOMString dirPath) raises(<ref>WebAPIException</ref>);</webidl>
32975 Creates a new directory.
32979 A new directory will be created relative to the current
32980 directory that this operation is performed on. The implementation will attempt to
32981 create all necessary sub-directories specified in the dirPath, as well. The use of "."
32982 or ".." in path components is not supported.
32985 This operation can only be performed on file handlers that
32986 represent a directory (that is, <var>isDirectory == true</var>).
32989 If the directory is successfully created, it will be returned.
32992 In case the directory cannot be created, an error MUST be thrown
32993 with the appropriate error type.
33003 http://tizen.org/privilege/filesystem.write
33005 <Code> var dir; //Directory object obtained from filesystem API
33006 var newDir = dir.createDirectory("newDir");
33007 var anotherNewDir = dir.createDirectory("newDir1/subNewDir1");
33013 File The file handle of the new directory. The new File object
33014 will have "rw" access rights, as it inherits this from
33015 the File object on which the createDirectory() method is
33021 <Argument name="dirPath">
33024 The relative directory path, it should only contain
33025 characters supported by the underlying filesystem.
33028 <Type type="DOMString"/>
33032 <RaiseException name="WebAPIException">
33035 with error type IOError, if the dirPath already exists.
33038 with error type InvalidValuesError, if the dirPath does not contain a valid path.
33041 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
33044 with error type SecurityError, if the application does not have the privilege to call this method.
33047 with error type NotSupportedError, if the feature is not supported.
33050 with error type UnknownError in any other error case.
33056 <Operation name="createFile" id="::Filesystem::File::createFile">
33057 <webidl> <ref>File</ref> createFile(DOMString relativeFilePath) raises(<ref>WebAPIException</ref>);</webidl>
33060 Creates a new empty file in a specified location.
33064 A new empty file is created in the given path relative
33065 to the directory indicated by current 'File' object's 'path' attribute.
33066 The use of "." or ".." in path components is not supported.
33067 This operation can only be performed on file handlers that
33068 represent a directory (that is, <var>isDirectory == true</var>).
33071 If the file is successfully created, a file handler MUST
33072 be returned by this method.
33075 In case the file cannot be created, an error MUST be thrown
33076 with the appropriate error type.
33086 http://tizen.org/privilege/filesystem.write
33088 <Code> var newFile = dir.createFile("newFilePath");
33094 File The file handle of the new empty file. The new File object
33095 will have "rw" access rights, as it inherits this from
33096 the File object on which the createFile() method is
33102 <Argument name="relativeFilePath">
33105 The new file path, it should only contain characters supported by the underlying filesystem.
33108 <Type type="DOMString"/>
33112 <RaiseException name="WebAPIException">
33115 with error type IOError, if the filePath already exists.
33118 with error type InvalidValuesError, if the filePath contains an invalid value.
33121 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
33124 with error type SecurityError, if the application does not have the privilege to call this method.
33127 with error type NotSupportedError, if the feature is not supported.
33130 with error type UnknownError, in any other error case.
33136 <Operation name="resolve" id="::Filesystem::File::resolve">
33137 <webidl> <ref>File</ref> resolve(DOMString filePath) raises(<ref>WebAPIException</ref>);</webidl>
33140 Resolves an existing file or directory relative to
33141 the current directory this operation is performed on, and
33142 returns a file handle for it.
33146 The filePath is not allowed to contain the "." or ".." directories.
33149 The encoding of file paths is <a href="http://www.ietf.org/rfc/rfc2279.txt">UTF-8</a>.
33159 http://tizen.org/privilege/filesystem.read
33162 // Resolves helloWorld.doc file that is located in the
33163 // documents root location
33164 tizen.filesystem.resolve(
33166 function(dir){ file = dir.resolve("helloWorld.doc");},
33167 function(e){ console.log("Error" + e.message);},
33174 File The file handle of the file. The new File object will inherit its access
33175 rights from the File object on which this resolve() method
33181 <Argument name="filePath">
33184 The relative file/directory path/file URI to resolve.
33187 <Type type="DOMString"/>
33191 <RaiseException name="WebAPIException">
33194 with error type TypeMismatchError, if the input parameter
33195 is not compatible with the expected type for that parameter.
33198 with error type InvalidValuesError, if the file path contains an
33202 with error type IOError, if the method is executed in a File object
33203 that does not represent a directory (that is, isDirectory attribute is false).
33206 with error type NotFoundError, if a file does not exist for the passed
33210 with error type SecurityError, if the application does not have the privilege to call this method.
33213 with error type NotSupportedError, if the feature is not supported.
33216 with error type UnknownError in any other error case.
33222 <Operation name="deleteDirectory" id="::Filesystem::File::deleteDirectory">
33223 <webidl> void deleteDirectory(DOMString directoryPath,
33225 optional <ref>SuccessCallback</ref>? onsuccess,
33226 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);</webidl>
33229 Deletes a specified directory and directory tree if specified.
33233 This function attempts to asynchronously delete a directory or directory tree under the current
33237 If the recursive parameter is set to <em>true</em>, all the directories and files under the specified
33238 directory MUST be deleted. If the recursive parameter is set to false, the directory will
33239 only be deleted if it is empty, otherwise an IOError error type will be passed in onerror.
33242 The directory to be deleted MUST be under the Directory that the method
33243 is invoked from, otherwise the operation MUST NOT be performed.
33244 If the deletion is performed successfully, the onsuccess is invoked.
33247 The ErrorCallback is launched with these error types:
33251 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
33253 NotFoundError: The passed directory does not correspond to a valid directory. </li>
33255 IOError: The File in which the delete method is invoked
33256 is a file (not a directory), the directory is in use by another process
33257 or the directory is not empty and recursive argument is <em>false</em>.
33258 This code will be also used if a recursive deletion partially fails
33259 and any data deleted so far cannot be recovered. This may occur
33260 due to the lack of filesystem permissions or if any
33261 directories or files are opened by other processes. </li>
33263 UnknownError: In any other error case. </li>
33273 http://tizen.org/privilege/filesystem.write
33275 <Code> var documentsDir;
33276 function onsuccess(files) {
33277 for(var i = 0; i < files.length; i++) {
33278 if (files[i].isDirectory) {
33279 documentsDir.deleteDirectory(
33283 console.log("Directory Deleted");
33285 console.log("Error" + e.message);
33288 documentsDir.deleteFile(
33291 console.log("File Deleted");
33293 console.log("Error" + e.message);
33299 function onerror(error) {
33300 console.log("The error " + error.message + " occurred when listing the files in the selected folder");
33303 tizen.filesystem.resolve(
33306 documentsDir = dir;
33307 dir.listFiles(onsuccess,onerror);
33309 console.log("Error" + e.message);
33314 <Type type="void"/>
33316 <Argument name="directoryPath">
33319 The full virtual path to the directory to be deleted (must be under the current one).
33322 <Type type="DOMString"/>
33324 <Argument name="recursive">
33327 <em>true</em> means a recursive deletion. This
33328 will delete all data in all subdirectories. Use with caution.
33331 <Type type="boolean"/>
33333 <Argument optional="optional" name="onsuccess">
33336 Called if the directory is successfully deleted.
33339 <Type name="SuccessCallback" nullable="nullable"/>
33341 <Argument optional="optional" name="onerror">
33344 Called if an error occurred.
33347 <Type name="ErrorCallback" nullable="nullable"/>
33351 <RaiseException name="WebAPIException">
33354 with error type TypeMismatchError, if the input parameter
33355 is not compatible with the expected type for that parameter.
33358 with error type SecurityError, if the application does not have the privilege to call this method.
33361 with error type NotSupportedError, if the feature is not supported.
33367 <Operation name="deleteFile" id="::Filesystem::File::deleteFile">
33368 <webidl> void deleteFile(DOMString filePath,
33369 optional <ref>SuccessCallback</ref>? onsuccess,
33370 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);</webidl>
33373 Deletes a specified file.
33377 This function attempts to asynchronously delete a file under the current directory.
33380 The file to be deleted MUST be under the Directory from which the method
33381 is invoked, otherwise the operation MUST NOT be performed.
33384 If the deletion is performed successfully, the onsuccess is invoked.
33387 The ErrorCallback is launched with these error types:
33391 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
33393 NotFoundError: The file does not correspond to a valid file. </li>
33395 IOError: The file in which the delete method is invoked
33396 is a directory (not a file), the file is in use by another process,
33397 or there is no permission in the file system. </li>
33399 UnknownError: In any other error case. </li>
33409 http://tizen.org/privilege/filesystem.write
33411 <Code> function onsuccess(files) {
33412 for(var i = 0; i < files.length; i++) {
33413 if (files[i].isDirectory) {
33414 documentsDir.deleteDirectory(
33418 console.log("Directory Deleted");
33420 console.log("Error" + e.message);
33423 documentsDir.deleteFile(
33426 console.log("File Deleted");
33428 console.log("Error" + e.message);
33434 function onerror(error) {
33435 console.log("The error " + error.message + " occurred when listing the files in the selected folder");
33439 tizen.filesystem.resolve(
33442 documentsDir = dir;
33443 dir.listFiles(onsuccess,onerror);
33445 console.log("Error" + e.message);
33450 <Type type="void"/>
33452 <Argument name="filePath">
33455 The full virtual path to the file to be deleted (must be under the current directory).
33458 <Type type="DOMString"/>
33460 <Argument optional="optional" name="onsuccess">
33463 Called if the file is successfully deleted.
33466 <Type name="SuccessCallback" nullable="nullable"/>
33468 <Argument optional="optional" name="onerror">
33471 Called if an error occurred.
33474 <Type name="ErrorCallback" nullable="nullable"/>
33478 <RaiseException name="WebAPIException">
33481 with error type TypeMismatchError, if the input parameter
33482 is not compatible with the expected type for that parameter.
33485 with error type SecurityError, if the application does not have the privilege to call this method.
33488 with error type NotSupportedError, if the feature is not supported.
33495 <Dictionary name="FileFilter" id="::Filesystem::FileFilter">
33496 <webidl> dictionary FileFilter {
33499 Date startModified;
33509 Dictionary created to filter the items returned by the listFiles method.
33513 When this dictionary is passed in the listFiles method, the result-set of
33514 the listFiles method MUST only contain the file items entries that match
33515 the attribute values of the filter.
33516 The result set of the listFiles method does not guarantee any sort order.
33519 A file item only matches the FileFilter object if all the attributes of the file item match
33520 all the attribute values of the filter which are defined (that is, only matching values other
33521 than undefined or <em>null</em>). This is similar to an SQL "AND" operation.
33524 An attribute of the file entry matches the FileFilter attribute value in accordance with the
33529 For FileFilter attributes of type DOMString, an entry matches this value only if its
33530 corresponding attribute is an exact match. If the filter contains U+0025 'PERCENT SIGN' it is
33531 interpreted as a wildcard character and '%' matches any string of any length, including no
33532 length. If wildcards are used, the behavior is similar to the LIKE condition in SQL. To
33533 specify that a 'PERCENT SIGN' character is to be considered literally instead of interpreting it
33534 as a wildcard, developers may escape it with the backslash character (\).
33535 The matching is not case sensitive, such as "FOO" matches a "foo" or an "f%" filter.
33538 For File entry attributes of type Date, attributes start and end are included to allow
33539 filtering of File entries between two supplied dates. If either or both of these attributes are
33540 specified, the following rules apply:
33541 A) If both start and end dates are specified (that is, other than <em>null</em>), a File entry matches the
33542 filter if it's corresponding attribute is the same as either start or end or between the two
33543 supplied dates (that is, after start and before end).
33544 B) If only the start attribute contains a value (other than <em>null</em>), a File entry matches the
33545 filter if its corresponding attribute is later than or equal to the start one.
33546 C) If only the end date contains a value (other than <em>null</em>), a file matches the filter if its
33547 corresponding attribute is earlier than or equal to the end date.
33555 <DictionaryMember name="name" id="::Filesystem::FileFilter::name">
33556 <webidl> DOMString name;</webidl>
33559 Used for filtering the File name attribute.
33563 Files which name corresponds with this attribute
33564 (either exactly or with the specified wildcards) match
33565 this filtering criteria.
33572 <Type type="DOMString"/>
33573 </DictionaryMember>
33574 <DictionaryMember name="startModified" id="::Filesystem::FileFilter::startModified">
33575 <webidl> Date startModified;</webidl>
33578 Used for filtering the File modified attribute.
33582 Files with modified date later than this attribute or equal to it match
33583 the filtering criteria.
33590 <Type type="Date"/>
33591 </DictionaryMember>
33592 <DictionaryMember name="endModified" id="::Filesystem::FileFilter::endModified">
33593 <webidl> Date endModified;</webidl>
33596 Used for filtering the File created attribute.
33600 Files with modified date earlier than this attribute or equal to it
33601 match the filtering criteria.
33608 <Type type="Date"/>
33609 </DictionaryMember>
33610 <DictionaryMember name="startCreated" id="::Filesystem::FileFilter::startCreated">
33611 <webidl> Date startCreated;</webidl>
33614 Used for filtering the File created attribute.
33618 Files with created date later than this attribute or equal to it match
33619 the filtering criteria.
33626 <Type type="Date"/>
33627 </DictionaryMember>
33628 <DictionaryMember name="endCreated" id="::Filesystem::FileFilter::endCreated">
33629 <webidl> Date endCreated;</webidl>
33632 Used for filtering the File created attribute.
33636 Files with created date earlier than this attribute or equal to it
33637 match the filtering criteria.
33644 <Type type="Date"/>
33645 </DictionaryMember>
33647 <Interface name="FileStream" id="::Filesystem::FileStream">
33648 <webidl> [NoInterfaceObject] interface FileStream {
33649 readonly attribute boolean eof;
33651 attribute long position setraises(<ref>WebAPIException</ref>);
33653 readonly attribute long bytesAvailable;
33657 DOMString read(long charCount) raises(<ref>WebAPIException</ref>);
33659 octet[] readBytes(long byteCount) raises(<ref>WebAPIException</ref>);
33661 DOMString readBase64(long byteCount) raises(<ref>WebAPIException</ref>);
33663 void write(DOMString stringData) raises(<ref>WebAPIException</ref>);
33665 void writeBytes(octet[] byteData) raises(<ref>WebAPIException</ref>);
33667 void writeBase64(DOMString base64Data) raises(<ref>WebAPIException</ref>);
33675 A FileStream represents a handle to a File opened for read and/or
33676 write operations. Read and write operations are performed relative
33677 to a position attribute, which is a pointer that represents the current position in the file.
33680 A series of read/write methods are available that permit both binary and
33681 text to be processed.
33684 Once a file stream is closed, any operation attempted on this stream
33685 will result in a standard JavaScript error.
33688 The read/write operations in this interface do not throw any security
33689 exceptions as the access rights are expected to be granted through the initial
33690 resolve() method or through the openStream() method of the File interface.
33691 Therefore, all actions performed on a successfully resolved File and FileStream are
33692 expected to succeed. This avoids successive asynchronous calls and may potentially increase
33693 application for a user.
33700 <ExtendedAttributeList>
33701 <ExtendedAttribute name="NoInterfaceObject">
33702 <webidl>NoInterfaceObject</webidl>
33703 </ExtendedAttribute>
33704 </ExtendedAttributeList>
33705 <Attribute readonly="readonly" name="eof" id="::Filesystem::FileStream::eof">
33706 <webidl> readonly attribute boolean eof;</webidl>
33709 Indicates whether or not the current file pointer is at the end
33714 If <em>true</em>, this attribute indicates that the file pointer is at the end of the file.
33717 If <em>false</em>, this attribute indicates that the file pointer is not at the end of the file
33718 and may be anywhere within the file.
33724 <Code> if(stream.eof) {
33725 // file has been read completely
33729 <Type type="boolean"/>
33731 <Attribute name="position" id="::Filesystem::FileStream::position">
33732 <webidl> attribute long position setraises(<ref>WebAPIException</ref>);</webidl>
33735 Gets/sets stream position for reads/writes.
33739 The stream position is an offset of bytes from the start of
33740 the file stream. When invoking an operation that reads or
33741 writes from the stream, the operation will take place from the
33742 byte defined by this position attribute. If the read or write
33743 operation is successful, the position of the stream is advanced
33744 by the number of bytes read or written. If the read/write operation is not
33745 successful, the position of the stream is unchanged.
33751 <Code> console.log(stream.position); // displays current stream position
33752 // alters current stream position to the begin of the file,
33753 // like seek() in C
33754 stream.position = 0;
33757 <Type type="long"/>
33759 <RaiseException name="WebAPIException"/>
33762 <Attribute readonly="readonly" name="bytesAvailable" id="::Filesystem::FileStream::bytesAvailable">
33763 <webidl> readonly attribute long bytesAvailable;</webidl>
33766 Returns the number of bytes that are available for
33767 reading from the stream.
33771 The number of bytes available for reading is the maximum
33772 amount of bytes that can be read in the next read operation.
33773 It corresponds to the number of bytes available after the file pointer
33774 denoted by the position attribute.
33777 -1 if eof is <em>true</em>.
33783 <Code> console.log(stream.bytesAvailable); // displays the available bytes to be read
33786 <Type type="long"/>
33788 <Operation name="close" id="::Filesystem::FileStream::close">
33789 <webidl> void close();</webidl>
33792 Closes this FileStream.
33796 Flushes any pending buffered writes and closes the File. Always succeeds.
33797 Note that pending writes might not succeed.
33807 http://tizen.org/privilege/filesystem.read
33809 <Code> stream.close(); // closes this stream, no subsequent access to stream allowed
33812 <Type type="void"/>
33815 <Operation name="read" id="::Filesystem::FileStream::read">
33816 <webidl> DOMString read(long charCount) raises(<ref>WebAPIException</ref>);</webidl>
33819 Reads the specified number of characters from this FileStream.
33823 Reads the specified number of characters after the position file pointer and returns them as a string.
33824 The resulting string length might be shorter than charCount if eof
33835 http://tizen.org/privilege/filesystem.read
33837 <Code> var text = stream.read(file.fileSize);
33841 <Type type="DOMString">
33844 DOMString The result of read characters as a string.
33849 <Argument name="charCount">
33852 Number of characters being read.
33855 <Type type="long"/>
33859 <RaiseException name="WebAPIException">
33862 with error type IOError, if a read error occurs, such as the bytes in the stream
33863 cannot be decoded with the encoding in use.
33866 with error type TypeMismatchError, if the input parameter
33867 is not compatible with the expected type for that parameter.
33870 with error type InvalidValuesError, if any of the input
33871 parameters contain an invalid value.
33874 with error type SecurityError, if the application does not have the privilege to call this method.
33877 with error type NotSupportedError, if the feature is not supported.
33883 <Operation name="readBytes" id="::Filesystem::FileStream::readBytes">
33884 <webidl> octet[] readBytes(long byteCount) raises(<ref>WebAPIException</ref>);</webidl>
33887 Reads the specified number of bytes from this FileStream.
33896 http://tizen.org/privilege/filesystem.read
33898 <Code> // reads up to 256 bytes from the stream
33899 var raw = stream.readBytes(256);
33900 for(var i = 0; i < raw.length; i++) {
33901 // raw[i] contains the i-th byte of the current data chunk
33905 <Type type="array">
33908 octet[] The result of read bytes as a byte (or number) array.
33911 <Type type="octet"/>
33914 <Argument name="byteCount">
33917 Number of bytes being read.
33920 <Type type="long"/>
33924 <RaiseException name="WebAPIException">
33927 with error type IOError, if a read error occurs.
33930 with error type TypeMismatchError, if the input parameter
33931 is not compatible with the expected type for that parameter.
33934 with error type InvalidValuesError, if any of the input
33935 parameters contain an invalid value.
33938 with error type SecurityError, if the application does not have the privilege to call this method.
33941 with error type NotSupportedError, if the feature is not supported.
33947 <Operation name="readBase64" id="::Filesystem::FileStream::readBase64">
33948 <webidl> DOMString readBase64(long byteCount) raises(<ref>WebAPIException</ref>);</webidl>
33951 Reads the specified number of bytes from this FileStream, encoding
33952 the result in base64.
33961 http://tizen.org/privilege/filesystem.read
33963 <Code> // reads up to 256 bytes from the stream
33964 var base64 = stream.readBase64(256);
33967 <Type type="DOMString">
33970 DOMString The result of read bytes as base64 encoding string.
33975 <Argument name="byteCount">
33978 Number of bytes being read.
33981 <Type type="long"/>
33985 <RaiseException name="WebAPIException">
33988 with error type IOError, if a read error occurs.
33991 with error type TypeMismatchError, if the input parameter
33992 is not compatible with the expected type for that parameter.
33995 with error type InvalidValuesError, if any of the input
33996 parameters contain an invalid value.
33999 with error type SecurityError, if the application does not have the privilege to call this method.
34002 with error type NotSupportedError, if the feature is not supported.
34008 <Operation name="write" id="::Filesystem::FileStream::write">
34009 <webidl> void write(DOMString stringData) raises(<ref>WebAPIException</ref>);</webidl>
34012 Writes the specified DOMString to this FileStream.
34021 http://tizen.org/privilege/filesystem.write
34023 <Code> var text = "Hello world";
34024 stream.write(text);
34027 <Type type="void"/>
34029 <Argument name="stringData">
34032 The actual string to be written.
34035 <Type type="DOMString"/>
34039 <RaiseException name="WebAPIException">
34042 with error type IOError, if a write error occurs.
34045 with error type TypeMismatchError, if the input parameter
34046 is not compatible with the expected type for that parameter.
34049 with error type SecurityError, if the application does not have the privilege to call this method.
34052 with error type NotSupportedError, if the feature is not supported.
34058 <Operation name="writeBytes" id="::Filesystem::FileStream::writeBytes">
34059 <webidl> void writeBytes(octet[] byteData) raises(<ref>WebAPIException</ref>);</webidl>
34062 Writes the specified bytes to this FileStream.
34071 http://tizen.org/privilege/filesystem.write
34073 <Code> var bytes = in.readBytes(256);
34074 out.writeBytes(bytes); // writes the bytes read from in to out
34077 <Type type="void"/>
34079 <Argument name="byteData">
34082 The byte data array being written.
34085 <Type type="array">
34086 <Type type="octet"/>
34091 <RaiseException name="WebAPIException">
34094 with error type IOError, if a write error occurs.
34097 with error type TypeMismatchError, if the input parameter
34098 is not compatible with the expected type for that parameter.
34101 with error type SecurityError, if the application does not have the privilege to call this method.
34104 with error type NotSupportedError, if the feature is not supported.
34110 <Operation name="writeBase64" id="::Filesystem::FileStream::writeBase64">
34111 <webidl> void writeBase64(DOMString base64Data) raises(<ref>WebAPIException</ref>);</webidl>
34114 Converts the specified base64 DOMString to bytes and writes the
34115 result to this FileStream.
34124 http://tizen.org/privilege/filesystem.write
34126 <Code> var base64 = in.readBase64(256);
34127 out.writeBase64(base64); // writes the base64 data read from in to out
34130 <Type type="void"/>
34132 <Argument name="base64Data">
34135 The base64 data being written.
34138 <Type type="DOMString"/>
34142 <RaiseException name="WebAPIException">
34145 with error type IOError, if an error occurs during writeBase64.
34148 with error type TypeMismatchError, if the input parameter
34149 is not compatible with the expected type for that parameter.
34152 with error type SecurityError, if the application does not have the privilege to call this method.
34155 with error type NotSupportedError, if the feature is not supported.
34162 <Interface name="FileSuccessCallback" id="::Filesystem::FileSuccessCallback">
34163 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface FileSuccessCallback {
34164 void onsuccess(<ref>File</ref> file);
34168 The file system specific success callback.
34172 This callback interface specifies a success callback with
34173 a File object as input argument. It is used in asynchronous
34174 operations, such as FileSystemManager.resolve() and
34175 copying, moving, and deleting files.
34182 <ExtendedAttributeList>
34183 <ExtendedAttribute name="Callback" value="FunctionOnly">
34184 <webidl>Callback</webidl>
34185 </ExtendedAttribute>
34186 <ExtendedAttribute name="NoInterfaceObject">
34187 <webidl> NoInterfaceObject</webidl>
34188 </ExtendedAttribute>
34189 </ExtendedAttributeList>
34190 <Operation name="onsuccess" id="::Filesystem::FileSuccessCallback::onsuccess">
34191 <webidl> void onsuccess(<ref>File</ref> file);</webidl>
34194 The method invoked when the asynchronous call completes successfully.
34200 <Type type="void"/>
34202 <Argument name="file">
34205 The file resulting from the asynchronous call.
34208 <Type name="File"/>
34213 <Interface name="FileSystemStorageArraySuccessCallback" id="::Filesystem::FileSystemStorageArraySuccessCallback">
34214 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface FileSystemStorageArraySuccessCallback {
34215 void onsuccess(<ref>FileSystemStorage</ref>[] storages);
34219 The success callback to retrieve FileSystemStorage objects.
34223 This callback interface specifies a success callback with
34224 an array of FileSystemStorage objects as input argument. It is used in asynchronous
34225 operations, such as FileSystemManager.listStorages().
34232 <ExtendedAttributeList>
34233 <ExtendedAttribute name="Callback" value="FunctionOnly">
34234 <webidl>Callback</webidl>
34235 </ExtendedAttribute>
34236 <ExtendedAttribute name="NoInterfaceObject">
34237 <webidl> NoInterfaceObject</webidl>
34238 </ExtendedAttribute>
34239 </ExtendedAttributeList>
34240 <Operation name="onsuccess" id="::Filesystem::FileSystemStorageArraySuccessCallback::onsuccess">
34241 <webidl> void onsuccess(<ref>FileSystemStorage</ref>[] storages);</webidl>
34244 The method invoked when the asynchronous call completes successfully.
34250 <Type type="void"/>
34252 <Argument name="storages">
34255 List of available storage devices.
34258 <Type type="array">
34259 <Type name="FileSystemStorage"/>
34265 <Interface name="FileSystemStorageSuccessCallback" id="::Filesystem::FileSystemStorageSuccessCallback">
34266 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface FileSystemStorageSuccessCallback {
34267 void onsuccess(<ref>FileSystemStorage</ref> storage);
34271 The success callback to retrieve a FileSystemStorage object.
34275 This callback interface specifies a success callback with
34276 a FileSystmeStorage object as input argument. It is used in asynchronous
34277 operations, such as FileSystemManager.getStorage() and
34278 FileSystemManager.addStorageStateChangeListener().
34285 <ExtendedAttributeList>
34286 <ExtendedAttribute name="Callback" value="FunctionOnly">
34287 <webidl>Callback</webidl>
34288 </ExtendedAttribute>
34289 <ExtendedAttribute name="NoInterfaceObject">
34290 <webidl> NoInterfaceObject</webidl>
34291 </ExtendedAttribute>
34292 </ExtendedAttributeList>
34293 <Operation name="onsuccess" id="::Filesystem::FileSystemStorageSuccessCallback::onsuccess">
34294 <webidl> void onsuccess(<ref>FileSystemStorage</ref> storage);</webidl>
34297 The method invoked when the asynchronous call completes successfully.
34303 <Type type="void"/>
34305 <Argument name="storage">
34308 The storage device structure.
34311 <Type name="FileSystemStorage"/>
34316 <Interface name="FileStringSuccessCallback" id="::Filesystem::FileStringSuccessCallback">
34317 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface FileStringSuccessCallback {
34318 void onsuccess(DOMString fileStr);
34322 The success callback to read the content of a file as a DOMString.
34326 This callback interface specifies a success callback with
34327 a DOMString object as input argument. It is used in asynchronous
34328 operations, such as File.readAsText().
34335 <ExtendedAttributeList>
34336 <ExtendedAttribute name="Callback" value="FunctionOnly">
34337 <webidl>Callback</webidl>
34338 </ExtendedAttribute>
34339 <ExtendedAttribute name="NoInterfaceObject">
34340 <webidl> NoInterfaceObject</webidl>
34341 </ExtendedAttribute>
34342 </ExtendedAttributeList>
34343 <Operation name="onsuccess" id="::Filesystem::FileStringSuccessCallback::onsuccess">
34344 <webidl> void onsuccess(DOMString fileStr);</webidl>
34347 The method invoked when the asynchronous call completes successfully.
34353 <Type type="void"/>
34355 <Argument name="fileStr">
34358 The file represented as a DOMString resulting from the asynchronous call.
34361 <Type type="DOMString"/>
34366 <Interface name="FileStreamSuccessCallback" id="::Filesystem::FileStreamSuccessCallback">
34367 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface FileStreamSuccessCallback {
34368 void onsuccess(<ref>FileStream</ref> filestream);
34372 The success callback to open a file for raw access.
34376 This callback interface specifies a success callback with
34377 a FileStream object as input argument. It is used by asynchronous
34378 methods, such as File.openStream().
34385 <ExtendedAttributeList>
34386 <ExtendedAttribute name="Callback" value="FunctionOnly">
34387 <webidl>Callback</webidl>
34388 </ExtendedAttribute>
34389 <ExtendedAttribute name="NoInterfaceObject">
34390 <webidl> NoInterfaceObject</webidl>
34391 </ExtendedAttribute>
34392 </ExtendedAttributeList>
34393 <Operation name="onsuccess" id="::Filesystem::FileStreamSuccessCallback::onsuccess">
34394 <webidl> void onsuccess(<ref>FileStream</ref> filestream);</webidl>
34397 The method invoked when the File.openStream asynchronous call completes successfully.
34403 <Type type="void"/>
34405 <Argument name="filestream">
34408 The filestream to access file content.
34411 <Type name="FileStream"/>
34416 <Interface name="FileArraySuccessCallback" id="::Filesystem::FileArraySuccessCallback">
34417 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface FileArraySuccessCallback {
34418 void onsuccess(<ref>File</ref>[] files);
34422 The file system specific success callback for listing methods.
34426 This callback interface specifies a success callback with a function
34427 taking an array of File objects as input argument. It is used in asynchronous
34428 methods, such as File.listFiles().
34435 <ExtendedAttributeList>
34436 <ExtendedAttribute name="Callback" value="FunctionOnly">
34437 <webidl>Callback</webidl>
34438 </ExtendedAttribute>
34439 <ExtendedAttribute name="NoInterfaceObject">
34440 <webidl> NoInterfaceObject</webidl>
34441 </ExtendedAttribute>
34442 </ExtendedAttributeList>
34443 <Operation name="onsuccess" id="::Filesystem::FileArraySuccessCallback::onsuccess">
34444 <webidl> void onsuccess(<ref>File</ref>[] files);</webidl>
34447 The method invoked when the asynchronous call completes successfully.
34453 <Type type="void"/>
34455 <Argument name="files">
34458 The files resulting from the asynchronous call.
34461 <Type type="array">
34462 <Type name="File"/>
34469 <Module name="MessagePort" id="::MessagePort">
34470 <webidl>module MessagePort {
34472 [NoInterfaceObject] interface MessagePortManagerObject {
34473 readonly attribute <ref>MessagePortManager</ref> messageport;
34475 <ref>Tizen</ref> implements <ref>MessagePortManagerObject</ref>;
34477 [NoInterfaceObject] interface MessagePortManager {
34479 <ref>LocalMessagePort</ref> requestLocalMessagePort(DOMString localMessagePortName) raises(<ref>WebAPIException</ref>);
34481 <ref>LocalMessagePort</ref> requestTrustedLocalMessagePort(DOMString localMessagePortName) raises(<ref>WebAPIException</ref>);
34483 <ref>RemoteMessagePort</ref> requestRemoteMessagePort(<ref>ApplicationId</ref> appId, DOMString remoteMessagePortName) raises(<ref>WebAPIException</ref>);
34485 <ref>RemoteMessagePort</ref> requestTrustedRemoteMessagePort(<ref>ApplicationId</ref> appId, DOMString remoteMessagePortName) raises(<ref>WebAPIException</ref>);
34488 [NoInterfaceObject] interface LocalMessagePort {
34490 readonly attribute DOMString messagePortName;
34492 readonly attribute boolean isTrusted;
34494 long addMessagePortListener(<ref>MessagePortCallback</ref> listener) raises(<ref>WebAPIException</ref>);
34496 void removeMessagePortListener(long watchId) raises(<ref>WebAPIException</ref>);
34499 [NoInterfaceObject] interface RemoteMessagePort {
34501 readonly attribute DOMString messagePortName;
34503 readonly attribute <ref>ApplicationId</ref> appId;
34505 readonly attribute boolean isTrusted;
34507 void sendMessage(<ref>MessagePortDataItem</ref>[] data, optional <ref>LocalMessagePort</ref>? localMessagePort) raises(<ref>WebAPIException</ref>);
34510 dictionary MessagePortDataItem {
34515 [Callback=FunctionOnly, NoInterfaceObject] interface MessagePortCallback {
34516 void onreceived(<ref>MessagePortDataItem</ref>[] data, <ref>RemoteMessagePort</ref>? remoteMessagePort);
34521 This API provides the functionality for communicating with other applications.
34527 <Interface name="MessagePortManagerObject" id="::MessagePort::MessagePortManagerObject">
34528 <webidl> [NoInterfaceObject] interface MessagePortManagerObject {
34529 readonly attribute <ref>MessagePortManager</ref> messageport;
34533 The <em>MessagePortManagerObject</em> interface defines what is instantiated by the Tizen object from the Tizen Platform.
34537 There is a <em>tizen.messageport</em> object that allows access to the functionality of the Message Port API.
34544 <ExtendedAttributeList>
34545 <ExtendedAttribute name="NoInterfaceObject">
34546 <webidl>NoInterfaceObject</webidl>
34547 </ExtendedAttribute>
34548 </ExtendedAttributeList>
34549 <Attribute readonly="readonly" name="messageport" id="::MessagePort::MessagePortManagerObject::messageport">
34550 <webidl> readonly attribute <ref>MessagePortManager</ref> messageport;</webidl>
34551 <Type name="MessagePortManager"/>
34554 <Implements name1="Tizen" name2="MessagePortManagerObject">
34555 <webidl> <ref>Tizen</ref> implements <ref>MessagePortManagerObject</ref>;</webidl>
34557 <Interface name="MessagePortManager" id="::MessagePort::MessagePortManager">
34558 <webidl> [NoInterfaceObject] interface MessagePortManager {
34560 <ref>LocalMessagePort</ref> requestLocalMessagePort(DOMString localMessagePortName) raises(<ref>WebAPIException</ref>);
34562 <ref>LocalMessagePort</ref> requestTrustedLocalMessagePort(DOMString localMessagePortName) raises(<ref>WebAPIException</ref>);
34564 <ref>RemoteMessagePort</ref> requestRemoteMessagePort(<ref>ApplicationId</ref> appId, DOMString remoteMessagePortName) raises(<ref>WebAPIException</ref>);
34566 <ref>RemoteMessagePort</ref> requestTrustedRemoteMessagePort(<ref>ApplicationId</ref> appId, DOMString remoteMessagePortName) raises(<ref>WebAPIException</ref>);
34570 The <em>MessagePortManager</em> interface provides methods to request message port to communicate.
34576 <ExtendedAttributeList>
34577 <ExtendedAttribute name="NoInterfaceObject">
34578 <webidl>NoInterfaceObject</webidl>
34579 </ExtendedAttribute>
34580 </ExtendedAttributeList>
34581 <Operation name="requestLocalMessagePort" id="::MessagePort::MessagePortManager::requestLocalMessagePort">
34582 <webidl> <ref>LocalMessagePort</ref> requestLocalMessagePort(DOMString localMessagePortName) raises(<ref>WebAPIException</ref>);</webidl>
34585 Requests a LocalMessage Port instance to start receiving message from another application.
34590 <Code> // Requests the LocalMessagePort instance with the specified message port name
34591 var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
34594 <Type name="LocalMessagePort">
34597 LocalMessagePort The LocalMessagePort instance.
34602 <Argument name="localMessagePortName">
34605 The name of the local message port to retrieve.<br/>The LocalMessagePort instances are identical for the same message port name.
34608 <Type type="DOMString"/>
34612 <RaiseException name="WebAPIException">
34615 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
34618 with error type InvalidValuesError, if the input parameter contains an invalid value.
34621 with error type UnknownError, if any other error occurs.
34627 <Operation name="requestTrustedLocalMessagePort" id="::MessagePort::MessagePortManager::requestTrustedLocalMessagePort">
34628 <webidl> <ref>LocalMessagePort</ref> requestTrustedLocalMessagePort(DOMString localMessagePortName) raises(<ref>WebAPIException</ref>);</webidl>
34631 Requests a trusted LocalMessagePort instance to receive message from another application.
34635 Trusted local message port can communicate with applications that are signed with same certificate.
34641 <Code> // Requests the LocalMessagePort instance with the specified message port name
34642 var localMsgPort = tizen.messageport.requestTrustedLocalMessagePort('MessagePortB');
34645 <Type name="LocalMessagePort">
34648 LocalMessagePort The trusted LocalMessagePort instance.
34653 <Argument name="localMessagePortName">
34656 The name of local message port.<br/>The LocalMessagePort instances are identical for the same message port name.
34659 <Type type="DOMString"/>
34663 <RaiseException name="WebAPIException">
34666 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
34669 with error type InvalidValuesError, if the input parameter contains an invalid value.
34672 with error type UnknownError, if any other error occurs.
34678 <Operation name="requestRemoteMessagePort" id="::MessagePort::MessagePortManager::requestRemoteMessagePort">
34679 <webidl> <ref>RemoteMessagePort</ref> requestRemoteMessagePort(<ref>ApplicationId</ref> appId, DOMString remoteMessagePortName) raises(<ref>WebAPIException</ref>);</webidl>
34682 Requests a RemoteMessagePort instance to send message to another application.
34686 If the message port name and application ID is the same, the platform returns the same RemoteMessagePort instance.
34692 <Code> // Requests the RemoteMessagePort instance with the specified message port name
34693 var remoteMsgPort = tizen.messageport.requestRemoteMessagePort('6xaeuflskd.App1', 'MessagePortA');
34696 <Type name="RemoteMessagePort">
34699 RemoteMessagePort The RemoteMessagePort instance.
34704 <Argument name="appId">
34707 The ID of the application to send messages.
34710 <Type name="ApplicationId"/>
34712 <Argument name="remoteMessagePortName">
34715 The name of remote message port.
34718 <Type type="DOMString"/>
34722 <RaiseException name="WebAPIException">
34725 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
34728 with error type InvalidValuesError, if an input parameter contains an invalid value.
34731 with error type NotFoundError, if the port of the target application is not found.
34734 with error type UnknownError, if any other error occurs.
34740 <Operation name="requestTrustedRemoteMessagePort" id="::MessagePort::MessagePortManager::requestTrustedRemoteMessagePort">
34741 <webidl> <ref>RemoteMessagePort</ref> requestTrustedRemoteMessagePort(<ref>ApplicationId</ref> appId, DOMString remoteMessagePortName) raises(<ref>WebAPIException</ref>);</webidl>
34744 Requests a trusted RemoteMessagePort instance to receive message from another application.
34748 If the message port name and application ID is the same, the platform returns the same RemoteMessagePort instance.
34749 Trusted remote message port can communicate with applications that are signed with same certificate.
34755 <Code> // Requests the RemoteMessagePort instance with the specified message port name.
34756 var remoteMsgPort = tizen.messageport.requestTrustedRemoteMessagePort('6xauflskd.App1', 'MessagePortB');
34759 <Type name="RemoteMessagePort">
34762 RemoteMessagePort The trusted RemoteMessagePort instance.
34767 <Argument name="appId">
34770 The ID of the application to send messages.
34773 <Type name="ApplicationId"/>
34775 <Argument name="remoteMessagePortName">
34778 The name of remote message port.
34781 <Type type="DOMString"/>
34785 <RaiseException name="WebAPIException">
34788 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
34791 with error type InvalidValuesError, if an input parameter contains an invalid value.
34794 with error type NotFoundError, if the port of the target application is not found.
34797 with error type InvalidAccessError, if the target application is not signed with the same certification.
34800 with error type UnknownError, if any other error occurs
34807 <Interface name="LocalMessagePort" id="::MessagePort::LocalMessagePort">
34808 <webidl> [NoInterfaceObject] interface LocalMessagePort {
34810 readonly attribute DOMString messagePortName;
34812 readonly attribute boolean isTrusted;
34814 long addMessagePortListener(<ref>MessagePortCallback</ref> listener) raises(<ref>WebAPIException</ref>);
34816 void removeMessagePortListener(long watchId) raises(<ref>WebAPIException</ref>);
34820 The <em>LocalMessagePort</em> interface provides methods to receive data.
34826 <ExtendedAttributeList>
34827 <ExtendedAttribute name="NoInterfaceObject">
34828 <webidl>NoInterfaceObject</webidl>
34829 </ExtendedAttribute>
34830 </ExtendedAttributeList>
34831 <Attribute readonly="readonly" name="messagePortName" id="::MessagePort::LocalMessagePort::messagePortName">
34832 <webidl> readonly attribute DOMString messagePortName;</webidl>
34835 An attribute that stores the name of the message port name.
34841 <Type type="DOMString"/>
34843 <Attribute readonly="readonly" name="isTrusted" id="::MessagePort::LocalMessagePort::isTrusted">
34844 <webidl> readonly attribute boolean isTrusted;</webidl>
34847 An attribute that determines whether the message port is trusted or not.
34853 <Type type="boolean"/>
34855 <Operation name="addMessagePortListener" id="::MessagePort::LocalMessagePort::addMessagePortListener">
34856 <webidl> long addMessagePortListener(<ref>MessagePortCallback</ref> listener) raises(<ref>WebAPIException</ref>);</webidl>
34859 Adds a message port listener to receive messages from other applications.
34864 <Code> function onreceived(data, remoteMsgPort) {
34865 console.log('Received data to \'' + remoteMsgPort.messagePortName + '\'');
34868 var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
34869 var watchId = localMsgPort.addMessagePortListener(onreceived);
34875 long ID of the listener that is later used to remove the listener.
34880 <Argument name="listener">
34883 The method to invoke when a message is received.
34886 <Type name="MessagePortCallback"/>
34890 <RaiseException name="WebAPIException">
34893 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
34896 with error type InvalidValuesError, if the input parameter contains an invalid value.
34899 with error type UnknownError, if any other error occurs.
34905 <Operation name="removeMessagePortListener" id="::MessagePort::LocalMessagePort::removeMessagePortListener">
34906 <webidl> void removeMessagePortListener(long watchId) raises(<ref>WebAPIException</ref>);</webidl>
34909 Removes the message port listener.
34914 <Code> var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
34915 var watchId = localMsgPort.addMessagePortListener(onreceived);
34916 // Communication routines of your app...
34917 localMsgPort.removeMessagePortListener(watchId);
34920 <Type type="void"/>
34922 <Argument name="watchId">
34925 ID to identify the listener.
34928 <Type type="long"/>
34932 <RaiseException name="WebAPIException">
34935 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
34938 with error type InvalidValuesError, if the input parameter contains an invalid value.
34941 with error type NotFoundError, if the watch ID has not been found.
34944 with error type UnknownError, if any other error occurs.
34951 <Interface name="RemoteMessagePort" id="::MessagePort::RemoteMessagePort">
34952 <webidl> [NoInterfaceObject] interface RemoteMessagePort {
34954 readonly attribute DOMString messagePortName;
34956 readonly attribute <ref>ApplicationId</ref> appId;
34958 readonly attribute boolean isTrusted;
34960 void sendMessage(<ref>MessagePortDataItem</ref>[] data, optional <ref>LocalMessagePort</ref>? localMessagePort) raises(<ref>WebAPIException</ref>);
34964 The <em>RemoteMessagePort</em> interface provides methods to send messages.
34970 <ExtendedAttributeList>
34971 <ExtendedAttribute name="NoInterfaceObject">
34972 <webidl>NoInterfaceObject</webidl>
34973 </ExtendedAttribute>
34974 </ExtendedAttributeList>
34975 <Attribute readonly="readonly" name="messagePortName" id="::MessagePort::RemoteMessagePort::messagePortName">
34976 <webidl> readonly attribute DOMString messagePortName;</webidl>
34979 An attribute to store the message port name.
34985 <Type type="DOMString"/>
34987 <Attribute readonly="readonly" name="appId" id="::MessagePort::RemoteMessagePort::appId">
34988 <webidl> readonly attribute <ref>ApplicationId</ref> appId;</webidl>
34991 An attribute that store the application ID to connect with.
34997 <Type name="ApplicationId"/>
34999 <Attribute readonly="readonly" name="isTrusted" id="::MessagePort::RemoteMessagePort::isTrusted">
35000 <webidl> readonly attribute boolean isTrusted;</webidl>
35003 An attribute that determines whether the message port is trusted or not.
35009 <Type type="boolean"/>
35011 <Operation name="sendMessage" id="::MessagePort::RemoteMessagePort::sendMessage">
35012 <webidl> void sendMessage(<ref>MessagePortDataItem</ref>[] data, optional <ref>LocalMessagePort</ref>? localMessagePort) raises(<ref>WebAPIException</ref>);</webidl>
35015 Sends messages to the specified application.
35019 The sent messages will be ignored without any notice, unless the target application added one or more listeners to the target local message port.
35025 <Code> // Sends message
35026 var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
35027 var remoteMsgPort = tizen.messageport.requestRemoteMessagePort('6xaeuflskd.App1', 'MessagePortB');
35028 localMsgPort.addMessagePortListener(function(items, remoteport) {
35030 if(remoteport !== null) {
35031 remoteport.sendMessage([{key:'RESULT', value:'OK'}]);
35034 remoteMsgPort.sendMessage(
35036 { key:'CMD', value:'openWindow' },
35037 { key:'OPTION', value:'bx' }
35042 <Type type="void"/>
35044 <Argument name="data">
35047 Data array of data to send.
35050 <Type type="array">
35051 <Type name="MessagePortDataItem"/>
35054 <Argument optional="optional" name="localMessagePort">
35057 <em>LocalMessagePort<em> object that gives local message port of the current application. It can be used to receive reply messages from the other end of the message port. The order of items in this array is not guaranteed to be preserved during data transfer, and values of <em>key</em> within this array must not be duplicated or empty.
35058 </em></em> </p></description>
35060 <Type name="LocalMessagePort" nullable="nullable"/>
35064 <RaiseException name="WebAPIException">
35067 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
35070 with error type InvalidValuesError, if an input parameter contains an invalid value.
35073 with error type QuotaExceededError, if the size of message has exceeded the maximum limit.
35076 with error type UnknownError, if any other error occurs.
35083 <Dictionary name="MessagePortDataItem" id="::MessagePort::MessagePortDataItem">
35084 <webidl> dictionary MessagePortDataItem {
35090 A dictionary for specifying the data item that is transferred.
35096 <DictionaryMember name="key" id="::MessagePort::MessagePortDataItem::key">
35097 <webidl> DOMString key;</webidl>
35098 <Type type="DOMString"/>
35099 </DictionaryMember>
35100 <DictionaryMember name="value" id="::MessagePort::MessagePortDataItem::value">
35101 <webidl> DOMString value;</webidl>
35102 <Type type="DOMString"/>
35103 </DictionaryMember>
35105 <Interface name="MessagePortCallback" id="::MessagePort::MessagePortCallback">
35106 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface MessagePortCallback {
35107 void onreceived(<ref>MessagePortDataItem</ref>[] data, <ref>RemoteMessagePort</ref>? remoteMessagePort);
35111 This interface defines notification callbacks for receiving data from other applications.
35117 <ExtendedAttributeList>
35118 <ExtendedAttribute name="Callback" value="FunctionOnly">
35119 <webidl>Callback</webidl>
35120 </ExtendedAttribute>
35121 <ExtendedAttribute name="NoInterfaceObject">
35122 <webidl> NoInterfaceObject</webidl>
35123 </ExtendedAttribute>
35124 </ExtendedAttributeList>
35125 <Operation name="onreceived" id="::MessagePort::MessagePortCallback::onreceived">
35126 <webidl> void onreceived(<ref>MessagePortDataItem</ref>[] data, <ref>RemoteMessagePort</ref>? remoteMessagePort);</webidl>
35129 Called when data is received from other applications via the specified message port name.
35135 <Type type="void"/>
35137 <Argument name="data">
35140 An array of data received from another application.
35143 <Type type="array">
35144 <Type name="MessagePortDataItem"/>
35147 <Argument name="remoteMessagePort">
35150 The RemoteMessagePort port that can be used to reply for the received message.
35153 <Type name="RemoteMessagePort" nullable="nullable"/>
35159 <Module name="Messaging" id="::Messaging">
35160 <webidl>module Messaging {
35162 [NoInterfaceObject] interface MessageManagerObject {
35163 readonly attribute <ref>Messaging</ref> messaging;
35165 <ref>Tizen</ref> implements <ref>MessageManagerObject</ref>;
35167 enum MessageServiceTag {"messaging.sms", "messaging.mms", "messaging.email" };
35169 typedef DOMString MessageId;
35171 typedef DOMString MessageAttachmentId;
35173 typedef DOMString MessageConvId;
35175 typedef DOMString MessageFolderId;
35177 [Constructor(<ref>MessageServiceTag</ref> type, optional <ref>MessageInit</ref>? messageInitDict)]
35178 interface Message {
35180 readonly attribute <ref>MessageId</ref>? id;
35182 readonly attribute <ref>MessageConvId</ref>? conversationId;
35184 readonly attribute <ref>MessageFolderId</ref>? folderId;
35186 readonly attribute <ref>MessageServiceTag</ref> type;
35188 readonly attribute Date? timestamp;
35190 readonly attribute DOMString? from;
35192 attribute DOMString[] to setraises(<ref>WebAPIException</ref>);
35194 attribute DOMString[] cc setraises(<ref>WebAPIException</ref>);
35196 attribute DOMString[] bcc setraises(<ref>WebAPIException</ref>);
35198 attribute <ref>MessageBody</ref> body setraises(<ref>WebAPIException</ref>);
35200 attribute boolean isRead setraises(<ref>WebAPIException</ref>);
35202 readonly attribute boolean hasAttachment;
35204 attribute boolean isHighPriority setraises(<ref>WebAPIException</ref>);
35206 attribute DOMString subject setraises(<ref>WebAPIException</ref>);
35208 readonly attribute <ref>MessageId</ref>? inResponseTo setraises(<ref>WebAPIException</ref>);
35210 readonly attribute DOMString messageStatus;
35212 attribute <ref>MessageAttachment</ref>[] attachments setraises(<ref>WebAPIException</ref>);
35214 dictionary MessageInit
35225 DOMString plainBody;
35227 DOMString htmlBody;
35229 boolean isHighPriority;
35232 [NoInterfaceObject] interface MessageBody {
35234 readonly attribute <ref>MessageId</ref> messageId;
35236 readonly attribute boolean loaded;
35238 attribute DOMString plainBody setraises(<ref>WebAPIException</ref>);
35240 attribute DOMString htmlBody setraises(<ref>WebAPIException</ref>);
35242 attribute <ref>MessageAttachment</ref>[] inlineAttachments setraises(<ref>WebAPIException</ref>);
35245 [Constructor(DOMString filePath, optional DOMString? mimeType)]
35246 interface MessageAttachment {
35248 readonly attribute <ref>MessageAttachmentId</ref>? id;
35250 readonly attribute <ref>MessageId</ref>? messageId;
35252 readonly attribute DOMString? mimeType;
35254 readonly attribute DOMString? filePath;
35257 [NoInterfaceObject] interface Messaging {
35259 void getMessageServices(<ref>MessageServiceTag</ref> messageServiceType,
35260 <ref>MessageServiceArraySuccessCallback</ref> successCallback,
35261 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35264 [Callback=FunctionOnly, NoInterfaceObject] interface MessageServiceArraySuccessCallback {
35266 void onsuccess(<ref>MessageService</ref>[] services);
35271 [NoInterfaceObject] interface MessageService {
35273 readonly attribute DOMString id;
35275 readonly attribute <ref>MessageServiceTag</ref> type;
35277 readonly attribute DOMString name;
35279 void sendMessage(<ref>Message</ref> message,
35280 optional <ref>MessageRecipientsCallback</ref>? successCallback,
35281 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35283 void loadMessageBody(<ref>Message</ref> message,
35284 <ref>MessageBodySuccessCallback</ref> successCallback,
35285 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35287 void loadMessageAttachment(<ref>MessageAttachment</ref> attachment,
35288 <ref>MessageAttachmentSuccessCallback</ref> successCallback,
35289 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35291 long sync(optional <ref>SuccessCallback</ref>? successCallback,
35292 optional <ref>ErrorCallback</ref>? errorCallback,
35293 optional unsigned long? limit) raises(<ref>WebAPIException</ref>);
35295 long syncFolder(<ref>MessageFolder</ref> folder,
35296 optional <ref>SuccessCallback</ref>? successCallback,
35297 optional <ref>ErrorCallback</ref>? errorCallback,
35298 optional unsigned long? limit) raises(<ref>WebAPIException</ref>);
35300 void stopSync(long opId) raises(<ref>WebAPIException</ref>);
35302 readonly attribute <ref>MessageStorage</ref> messageStorage getraises(<ref>WebAPIException</ref>);
35305 [Callback=FunctionOnly, NoInterfaceObject] interface MessageRecipientsCallback {
35307 void onsuccess(DOMString[] recipients);
35311 [Callback=FunctionOnly, NoInterfaceObject] interface MessageBodySuccessCallback {
35313 void onsuccess(<ref>Message</ref> message);
35316 [Callback=FunctionOnly, NoInterfaceObject] interface MessageAttachmentSuccessCallback {
35318 void onsuccess(<ref>MessageAttachment</ref> attachment);
35321 [NoInterfaceObject] interface MessageStorage {
35323 void addDraftMessage(<ref>Message</ref> message,
35324 optional <ref>SuccessCallback</ref>? successCallback,
35325 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35327 void findMessages(<ref>AbstractFilter</ref> filter,
35328 <ref>MessageArraySuccessCallback</ref> successCallback,
35329 optional <ref>ErrorCallback</ref>? errorCallback,
35330 optional <ref>SortMode</ref>? sort,
35331 optional unsigned long? limit,
35332 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);
35334 void removeMessages(<ref>Message</ref>[] messages,
35335 optional <ref>SuccessCallback</ref>? successCallback,
35336 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35338 void updateMessages(<ref>Message</ref>[] messages,
35339 optional <ref>SuccessCallback</ref>? successCallback,
35340 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35342 void findConversations(<ref>AbstractFilter</ref> filter,
35343 <ref>MessageConversationArraySuccessCallback</ref> successCallback,
35344 optional <ref>ErrorCallback</ref>? errorCallback,
35345 optional <ref>SortMode</ref>? sort,
35346 optional unsigned long? limit,
35347 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);
35349 void removeConversations(<ref>MessageConversation</ref>[] conversations,
35350 optional <ref>SuccessCallback</ref>? successCallback,
35351 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35354 void findFolders(<ref>AbstractFilter</ref> filter,
35355 <ref>MessageFolderArraySuccessCallback</ref> successCallback,
35356 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35358 long addMessagesChangeListener(<ref>MessagesChangeCallback</ref> messagesChangeCallback,
35359 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);
35361 long addConversationsChangeListener(<ref>MessageConversationsChangeCallback</ref> conversationsChangeCallback,
35362 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);
35364 long addFoldersChangeListener(<ref>MessageFoldersChangeCallback</ref> foldersChangeCallback,
35365 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);
35367 void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
35370 [Callback=FunctionOnly, NoInterfaceObject] interface MessageArraySuccessCallback {
35372 void onsuccess(<ref>Message</ref>[] messages);
35375 [Callback=FunctionOnly, NoInterfaceObject] interface MessageConversationArraySuccessCallback {
35377 void onsuccess(<ref>MessageConversation</ref>[] conversations);
35380 [Callback=FunctionOnly, NoInterfaceObject] interface MessageFolderArraySuccessCallback {
35382 void onsuccess(<ref>MessageFolder</ref>[] folders);
35385 [Callback, NoInterfaceObject] interface MessagesChangeCallback {
35387 void messagesadded(<ref>Message</ref>[] addedMessages);
35389 void messagesupdated(<ref>Message</ref>[] updatedMessages);
35391 void messagesremoved(<ref>Message</ref>[] removedMessages);
35394 [Callback, NoInterfaceObject] interface MessageConversationsChangeCallback {
35396 void conversationsadded(<ref>MessageConversation</ref>[] addedConversations);
35398 void conversationsupdated(<ref>MessageConversation</ref>[] updatedConversations);
35400 void conversationsremoved(<ref>MessageConversation</ref>[] removedConversations);
35403 [Callback, NoInterfaceObject] interface MessageFoldersChangeCallback {
35405 void foldersadded(<ref>MessageFolder</ref>[] addedFolders);
35407 void foldersupdated(<ref>MessageFolder</ref>[] updatedFolders);
35409 void foldersremoved(<ref>MessageFolder</ref>[] removedFolders);
35412 [NoInterfaceObject] interface MessageConversation {
35414 readonly attribute <ref>MessageConvId</ref> id;
35416 readonly attribute <ref>MessageServiceTag</ref> type;
35418 readonly attribute Date timestamp;
35420 readonly attribute unsigned long messageCount;
35422 readonly attribute unsigned long unreadMessages;
35424 readonly attribute DOMString preview;
35426 readonly attribute DOMString subject;
35428 readonly attribute boolean isRead;
35430 readonly attribute DOMString from;
35432 readonly attribute DOMString[] to;
35434 readonly attribute DOMString[] cc;
35436 readonly attribute DOMString[] bcc;
35438 readonly attribute <ref>MessageId</ref> lastMessageId;
35441 [NoInterfaceObject] interface MessageFolder {
35443 readonly attribute <ref>MessageFolderId</ref> id;
35445 readonly attribute <ref>MessageFolderId</ref> parentId;
35447 readonly attribute DOMString serviceId;
35449 readonly attribute <ref>MessageServiceTag</ref> contentType;
35451 attribute DOMString name setraises(<ref>WebAPIException</ref>);
35453 readonly attribute DOMString path;
35455 readonly attribute DOMString type;
35457 attribute boolean synchronizable setraises(<ref>WebAPIException</ref>);
35463 This API provides interfaces and methods for managing SMS, MMS, and email messages.
35467 The Messaging API provides access to these capabilities:
35471 Sending messages through different technologies: SMS, MMS, and email messages. </li>
35473 Retrieving available message services. </li>
35475 Searching for messages. </li>
35477 Managing messages: update, delete, and add. </li>
35479 Subscribing to receive notifications of message storage modifications. </li>
35481 Fetching conversations and subscribing to conversation updates. </li>
35484 For more information on the Messaging features, see <a href="../../org.tizen.web.appprogramming/html/guide/communication_guide/messaging.htm">Messaging Guide</a>.
35490 <def-api-feature identifier="http://tizen.org/feature/network.telephony">
35494 To guarantee this application running on a device with SMS feature, define below in the config file:
35499 <def-api-feature identifier="http://tizen.org/feature/network.telephony.mms">
35503 To guarantee this application running on a device with MMS feature, define below in the config file:
35509 <Interface name="MessageManagerObject" id="::Messaging::MessageManagerObject">
35510 <webidl> [NoInterfaceObject] interface MessageManagerObject {
35511 readonly attribute <ref>Messaging</ref> messaging;
35515 This interface defines what is instantiated by the Tizen object.
35519 There is a <em>tizen.messaging </em>object that allows access to the Messaging API.
35526 <ExtendedAttributeList>
35527 <ExtendedAttribute name="NoInterfaceObject">
35528 <webidl>NoInterfaceObject</webidl>
35529 </ExtendedAttribute>
35530 </ExtendedAttributeList>
35531 <Attribute readonly="readonly" name="messaging" id="::Messaging::MessageManagerObject::messaging">
35532 <webidl> readonly attribute <ref>Messaging</ref> messaging;</webidl>
35533 <Type name="Messaging"/>
35536 <Implements name1="Tizen" name2="MessageManagerObject">
35537 <webidl> <ref>Tizen</ref> implements <ref>MessageManagerObject</ref>;</webidl>
35539 <Enum name="MessageServiceTag" id="::Messaging::MessageServiceTag">
35540 <webidl> enum MessageServiceTag {"messaging.sms", "messaging.mms", "messaging.email" };</webidl>
35543 The supported Messaging service tags.
35544 The following values are supported in this release:
35549 messaging.sms, for SMS services </li>
35551 messaging.mms, for MMS services </li>
35553 messaging.email, for email services </li>
35560 <EnumValue stringvalue="messaging.sms">
35561 <webidl>"messaging.sms</webidl>
35563 <EnumValue stringvalue="messaging.mms">
35564 <webidl> "messaging.mms</webidl>
35566 <EnumValue stringvalue="messaging.email">
35567 <webidl> "messaging.email</webidl>
35570 <Typedef name="MessageId" id="::Messaging::MessageId">
35571 <webidl> typedef DOMString MessageId;</webidl>
35574 The Message identifier.
35580 <Type type="DOMString"/>
35582 <Typedef name="MessageAttachmentId" id="::Messaging::MessageAttachmentId">
35583 <webidl> typedef DOMString MessageAttachmentId;</webidl>
35586 The MessageAttachment identifier within a message.
35592 <Type type="DOMString"/>
35594 <Typedef name="MessageConvId" id="::Messaging::MessageConvId">
35595 <webidl> typedef DOMString MessageConvId;</webidl>
35598 The MessageConversation identifier.
35604 <Type type="DOMString"/>
35606 <Typedef name="MessageFolderId" id="::Messaging::MessageFolderId">
35607 <webidl> typedef DOMString MessageFolderId;</webidl>
35610 The identifier of an email folder .
35616 <Type type="DOMString"/>
35618 <Interface name="Message" id="::Messaging::Message">
35619 <webidl> [Constructor(<ref>MessageServiceTag</ref> type, optional <ref>MessageInit</ref>? messageInitDict)]
35620 interface Message {
35622 readonly attribute <ref>MessageId</ref>? id;
35624 readonly attribute <ref>MessageConvId</ref>? conversationId;
35626 readonly attribute <ref>MessageFolderId</ref>? folderId;
35628 readonly attribute <ref>MessageServiceTag</ref> type;
35630 readonly attribute Date? timestamp;
35632 readonly attribute DOMString? from;
35634 attribute DOMString[] to setraises(<ref>WebAPIException</ref>);
35636 attribute DOMString[] cc setraises(<ref>WebAPIException</ref>);
35638 attribute DOMString[] bcc setraises(<ref>WebAPIException</ref>);
35640 attribute <ref>MessageBody</ref> body setraises(<ref>WebAPIException</ref>);
35642 attribute boolean isRead setraises(<ref>WebAPIException</ref>);
35644 readonly attribute boolean hasAttachment;
35646 attribute boolean isHighPriority setraises(<ref>WebAPIException</ref>);
35648 attribute DOMString subject setraises(<ref>WebAPIException</ref>);
35650 readonly attribute <ref>MessageId</ref>? inResponseTo setraises(<ref>WebAPIException</ref>);
35652 readonly attribute DOMString messageStatus;
35654 attribute <ref>MessageAttachment</ref>[] attachments setraises(<ref>WebAPIException</ref>);
35658 Defines the content and attributes of a message.
35662 This interface allows a web application to define the set of properties
35663 linked to a message.
35666 It also allows an application to retrieve the content of a
35667 message through <em>MessageStorage </em>methods. In these
35668 cases, the implementation can return, in some situations, only the meta-information
35669 of a message without the loaded body. In such situations, the method <em>MessageService.loadMessageBody() </em>should be used.
35675 <Code> // Define the success callback.
35676 var messageSentCallback = function(recipients) {
35677 console.log("Message sent successfully to " + recipients.length + " recipients.");
35680 // Define the error callback.
35681 function errorCallback(err) {
35682 console.log(err.name + " error: " + err.message);
35685 function serviceListCB(services) {
35686 if (services.length > 0) {
35687 var msg = new tizen.Message("messaging.sms", {plainBody: "Tizen first SMS message."});
35688 services[0].sendMessage(msg, messageSentCallback, errorCallback);
35692 tizen.messaging.getMessageServices("messaging.sms",
35697 <ExtendedAttributeList>
35698 <ExtendedAttribute name="Constructor">
35699 <webidl>Constructor(<ref>MessageServiceTag</ref> type, optional <ref>MessageInit</ref>? messageInitDict)</webidl>
35701 <Argument name="type">
35702 <Type name="MessageServiceTag"/>
35704 <Argument optional="optional" name="messageInitDict">
35705 <Type name="MessageInit" nullable="nullable"/>
35708 </ExtendedAttribute>
35709 </ExtendedAttributeList>
35710 <Attribute readonly="readonly" name="id" id="::Messaging::Message::id">
35711 <webidl> readonly attribute <ref>MessageId</ref>? id;</webidl>
35714 The message identifier.
35718 The ID is locally unique and persistent property, assigned by the device or the Web runtime (WRT).
35719 For new messages created using the Message constructor, the ID is assigned on the first occasion when a message is processed by the underlying platform, such as a call to MessageService.send(). Before the ID is assigned, it is set to <var>null</var>.
35722 By default, this attribute is set to <var>null</var>.
35729 <Type name="MessageId" nullable="nullable"/>
35731 <Attribute readonly="readonly" name="conversationId" id="::Messaging::Message::conversationId">
35732 <webidl> readonly attribute <ref>MessageConvId</ref>? conversationId;</webidl>
35735 The identifier of the conversation to which the message belongs.
35739 By default, this attribute is set to <var>null</var>.
35746 <Type name="MessageConvId" nullable="nullable"/>
35748 <Attribute readonly="readonly" name="folderId" id="::Messaging::Message::folderId">
35749 <webidl> readonly attribute <ref>MessageFolderId</ref>? folderId;</webidl>
35752 The identifier of the folder to which the message belongs.
35756 By default, this attribute is set to null.
35759 For SMS and MMS, <em>folderId </em>can be one of these values:
35776 <Type name="MessageFolderId" nullable="nullable"/>
35778 <Attribute readonly="readonly" name="type" id="::Messaging::Message::type">
35779 <webidl> readonly attribute <ref>MessageServiceTag</ref> type;</webidl>
35782 The type of a given message.
35788 <Type name="MessageServiceTag"/>
35790 <Attribute readonly="readonly" name="timestamp" id="::Messaging::Message::timestamp">
35791 <webidl> readonly attribute Date? timestamp;</webidl>
35794 The timestamp of a message.
35798 For a received message, the timestamps indicates the time at which a message is received.
35799 For a sent message, the timestamp indicates the time at which a message is sent.
35800 For a draft message, the timestamp indicates the time at which a message is added.
35801 By default, this attribute is set to <var>null</var>.
35808 <Type type="Date" nullable="nullable"/>
35810 <Attribute readonly="readonly" name="from" id="::Messaging::Message::from">
35811 <webidl> readonly attribute DOMString? from;</webidl>
35814 The source address (or source phone number) of a message.
35818 This property is set up by the device or the web runtime environment.
35819 By default, this attribute is set to null.
35826 <Type type="DOMString" nullable="nullable"/>
35828 <Attribute name="to" id="::Messaging::Message::to">
35829 <webidl> attribute DOMString[] to setraises(<ref>WebAPIException</ref>);</webidl>
35832 The destination of a message.
35838 <Type type="array">
35839 <Type type="DOMString"/>
35842 <RaiseException name="WebAPIException"/>
35845 <Attribute name="cc" id="::Messaging::Message::cc">
35846 <webidl> attribute DOMString[] cc setraises(<ref>WebAPIException</ref>);</webidl>
35849 The carbon copy address of a message.
35853 This property is used only for email messages.
35860 <Type type="array">
35861 <Type type="DOMString"/>
35864 <RaiseException name="WebAPIException"/>
35867 <Attribute name="bcc" id="::Messaging::Message::bcc">
35868 <webidl> attribute DOMString[] bcc setraises(<ref>WebAPIException</ref>);</webidl>
35871 The blind carbon copy (bcc) address of a message.
35875 This property is used only with email messages.
35882 <Type type="array">
35883 <Type type="DOMString"/>
35886 <RaiseException name="WebAPIException"/>
35889 <Attribute name="body" id="::Messaging::Message::body">
35890 <webidl> attribute <ref>MessageBody</ref> body setraises(<ref>WebAPIException</ref>);</webidl>
35893 An attribute to store the body of a message.
35899 <Type name="MessageBody"/>
35901 <RaiseException name="WebAPIException"/>
35904 <Attribute name="isRead" id="::Messaging::Message::isRead">
35905 <webidl> attribute boolean isRead setraises(<ref>WebAPIException</ref>);</webidl>
35908 An attribute to indicate the read state for a message.
35912 This property is set to <var>true</var> if the message has been read. Else it is set to <var>false</var>.
35919 <Type type="boolean"/>
35921 <RaiseException name="WebAPIException"/>
35924 <Attribute readonly="readonly" name="hasAttachment" id="::Messaging::Message::hasAttachment">
35925 <webidl> readonly attribute boolean hasAttachment;</webidl>
35928 An attribute to indicate whether an attachment(s) exists or not.
35932 It is set to <var>true</var> if a message has one or more attachments.
35935 This property is used only with email and MMS messages.(It is valid when body is loaded)
35942 <Type type="boolean"/>
35944 <Attribute name="isHighPriority" id="::Messaging::Message::isHighPriority">
35945 <webidl> attribute boolean isHighPriority setraises(<ref>WebAPIException</ref>);</webidl>
35948 An attribute to indicate the priority of a message.
35952 It is set to <var>true</var> if the message has a high priority. Else it is set to <var>false</var>, if the message has a normal or low priority.
35955 This property is used only with email messages.
35962 <Type type="boolean"/>
35964 <RaiseException name="WebAPIException"/>
35967 <Attribute name="subject" id="::Messaging::Message::subject">
35968 <webidl> attribute DOMString subject setraises(<ref>WebAPIException</ref>);</webidl>
35971 An attribute to store the subject of a message.
35975 This property is used only with email and MMS messages.
35982 <Type type="DOMString"/>
35984 <RaiseException name="WebAPIException"/>
35987 <Attribute readonly="readonly" name="inResponseTo" id="::Messaging::Message::inResponseTo">
35988 <webidl> readonly attribute <ref>MessageId</ref>? inResponseTo setraises(<ref>WebAPIException</ref>);</webidl>
35991 The identifier of the original message.
35995 If the message was replied to or forwarded, this property contains the ID of the original message, otherwise it is set to <var>null</var>.
36002 <Type name="MessageId" nullable="nullable"/>
36004 <RaiseException name="WebAPIException"/>
36007 <Attribute readonly="readonly" name="messageStatus" id="::Messaging::Message::messageStatus">
36008 <webidl> readonly attribute DOMString messageStatus;</webidl>
36011 The status of a given message.
36015 It can be one of these values:
36028 If the status of the current message does not correspond to any item from
36029 the list, an empty value is returned.
36036 <Type type="DOMString"/>
36038 <Attribute name="attachments" id="::Messaging::Message::attachments">
36039 <webidl> attribute <ref>MessageAttachment</ref>[] attachments setraises(<ref>WebAPIException</ref>);</webidl>
36042 The list of the message attachments.
36046 This array is empty if the message does not have attachments or the message body is not loaded and the attachment info is inaccessible (in this case, the <em>hasAttachment</em> attribute is checked after loading message body).
36052 <Code> // Define the success callback.
36053 function serviceListCB(services) {
36054 if (services.length > 0) {
36055 var msg = new tizen.Message("messaging.email");
36056 msg.attachments = [new tizen.MessageAttachment("images/myimage.png", "image/png"),
36057 new tizen.MessageAttachment("documents/mydoc.pdf", "text/pdf")];
36061 tizen.messaging.getMessageServices("messaging.email", serviceListCB);
36066 <Type type="array">
36067 <Type name="MessageAttachment"/>
36070 <RaiseException name="WebAPIException"/>
36074 <Dictionary name="MessageInit" id="::Messaging::MessageInit">
36075 <webidl> dictionary MessageInit
36086 DOMString plainBody;
36088 DOMString htmlBody;
36090 boolean isHighPriority;
36094 Provides specific message attributes upon message creation.
36098 This interface is used to input parameters when messages are created using
36099 the Message constructor.
36102 All the attributes are optional and are <var>undefined </var>by default, unless otherwise stated in the parameter description.
36109 <DictionaryMember name="subject" id="::Messaging::MessageInit::subject">
36110 <webidl> DOMString subject;</webidl>
36113 The subject of a message.
36117 This property is used only with email and MMS messages.
36124 <Type type="DOMString"/>
36125 </DictionaryMember>
36126 <DictionaryMember name="to" id="::Messaging::MessageInit::to">
36127 <webidl> DOMString[] to;</webidl>
36130 The destination addresses (or phone numbers) of a message.
36136 <Type type="array">
36137 <Type type="DOMString"/>
36139 </DictionaryMember>
36140 <DictionaryMember name="cc" id="::Messaging::MessageInit::cc">
36141 <webidl> DOMString[] cc;</webidl>
36144 The carbon copy addresses of a message.
36148 This property is used only with email messages.
36155 <Type type="array">
36156 <Type type="DOMString"/>
36158 </DictionaryMember>
36159 <DictionaryMember name="bcc" id="::Messaging::MessageInit::bcc">
36160 <webidl> DOMString[] bcc;</webidl>
36163 The blind carbon copy addresses of a message.
36167 This property is used only with email messages.
36174 <Type type="array">
36175 <Type type="DOMString"/>
36177 </DictionaryMember>
36178 <DictionaryMember name="plainBody" id="::Messaging::MessageInit::plainBody">
36179 <webidl> DOMString plainBody;</webidl>
36182 The plain text representation of a message body.
36188 <Type type="DOMString"/>
36189 </DictionaryMember>
36190 <DictionaryMember name="htmlBody" id="::Messaging::MessageInit::htmlBody">
36191 <webidl> DOMString htmlBody;</webidl>
36194 The HTML representation of a message body.
36198 This property is used only with email messages.
36205 <Type type="DOMString"/>
36206 </DictionaryMember>
36207 <DictionaryMember name="isHighPriority" id="::Messaging::MessageInit::isHighPriority">
36208 <webidl> boolean isHighPriority;</webidl>
36211 The priority of a message.
36215 This property is set to <var>true</var> if the message has a high priority. Else it is set to <var>false</var> if the message has a normal or low priority.
36218 This property is used only with email messages.
36225 <Type type="boolean"/>
36226 </DictionaryMember>
36228 <Interface name="MessageBody" id="::Messaging::MessageBody">
36229 <webidl> [NoInterfaceObject] interface MessageBody {
36231 readonly attribute <ref>MessageId</ref> messageId;
36233 readonly attribute boolean loaded;
36235 attribute DOMString plainBody setraises(<ref>WebAPIException</ref>);
36237 attribute DOMString htmlBody setraises(<ref>WebAPIException</ref>);
36239 attribute <ref>MessageAttachment</ref>[] inlineAttachments setraises(<ref>WebAPIException</ref>);
36243 This interface describes a message body.
36247 Message body is comprised of a plain text, an HTML, and inline attachments.
36254 <ExtendedAttributeList>
36255 <ExtendedAttribute name="NoInterfaceObject">
36256 <webidl>NoInterfaceObject</webidl>
36257 </ExtendedAttribute>
36258 </ExtendedAttributeList>
36259 <Attribute readonly="readonly" name="messageId" id="::Messaging::MessageBody::messageId">
36260 <webidl> readonly attribute <ref>MessageId</ref> messageId;</webidl>
36263 The ID of a parent message.
36267 It holds the ID of the message containing this body.
36274 <Type name="MessageId"/>
36276 <Attribute readonly="readonly" name="loaded" id="::Messaging::MessageBody::loaded">
36277 <webidl> readonly attribute boolean loaded;</webidl>
36280 An attribute to indicate whether the message body has been loaded or not.
36284 It is set to <var>true </var>if the message body is loaded, else it is set to<var> false </var>if the object is not loaded.
36285 The default value is <var>false</var>.
36292 <Type type="boolean"/>
36294 <Attribute name="plainBody" id="::Messaging::MessageBody::plainBody">
36295 <webidl> attribute DOMString plainBody setraises(<ref>WebAPIException</ref>);</webidl>
36298 The plain text representation of a message body.
36304 <Type type="DOMString"/>
36306 <RaiseException name="WebAPIException"/>
36309 <Attribute name="htmlBody" id="::Messaging::MessageBody::htmlBody">
36310 <webidl> attribute DOMString htmlBody setraises(<ref>WebAPIException</ref>);</webidl>
36313 The HTML representation of a message body.
36317 This attribute holds an empty string if the message does not have any HTML body content.
36318 This property is used only with email messages.
36325 <Type type="DOMString"/>
36327 <RaiseException name="WebAPIException"/>
36330 <Attribute name="inlineAttachments" id="::Messaging::MessageBody::inlineAttachments">
36331 <webidl> attribute <ref>MessageAttachment</ref>[] inlineAttachments setraises(<ref>WebAPIException</ref>);</webidl>
36334 The list of the inline attachments.
36338 This array is empty, if the message does not have inline attachment or the message body is not loaded and attachments info is inaccessible (in this case the <em>loaded</em> attribute is checked).
36341 To indicate where to show an inline attachment within the HTML body, a link of the following format should be provided:
36342 "<img src="The file name of a inline attachment">"
36343 This property is used only with email messages.
36349 <Code> // Define the success callback.
36350 function serviceListCB(services) {
36351 if (services.length > 0) {
36352 var msg = new tizen.Message("messaging.email");
36353 msg.body.htmlBody = "<html><body><img src='myimage.png'></body></html>";
36354 msg.body.inlineAttachments = [new tizen.MessageAttachment("images/myimage.png")];
36358 tizen.messaging.getMessageServices("messaging.email", serviceListCB);
36362 <Type type="array">
36363 <Type name="MessageAttachment"/>
36366 <RaiseException name="WebAPIException"/>
36370 <Interface name="MessageAttachment" id="::Messaging::MessageAttachment">
36371 <webidl> [Constructor(DOMString filePath, optional DOMString? mimeType)]
36372 interface MessageAttachment {
36374 readonly attribute <ref>MessageAttachmentId</ref>? id;
36376 readonly attribute <ref>MessageId</ref>? messageId;
36378 readonly attribute DOMString? mimeType;
36380 readonly attribute DOMString? filePath;
36384 This interface defines the content and attributes of a message attachment.
36390 <ExtendedAttributeList>
36391 <ExtendedAttribute name="Constructor">
36392 <webidl>Constructor(DOMString filePath, optional DOMString? mimeType)</webidl>
36394 <Argument name="filePath">
36395 <Type type="DOMString"/>
36397 <Argument optional="optional" name="mimeType">
36398 <Type type="DOMString" nullable="nullable"/>
36401 </ExtendedAttribute>
36402 </ExtendedAttributeList>
36403 <Attribute readonly="readonly" name="id" id="::Messaging::MessageAttachment::id">
36404 <webidl> readonly attribute <ref>MessageAttachmentId</ref>? id;</webidl>
36407 The ID of an attachment.
36411 It holds the identifier of the attachment within its parent message.
36414 By default, this attribute is set to <var>null</var>.
36421 <Type name="MessageAttachmentId" nullable="nullable"/>
36423 <Attribute readonly="readonly" name="messageId" id="::Messaging::MessageAttachment::messageId">
36424 <webidl> readonly attribute <ref>MessageId</ref>? messageId;</webidl>
36427 The ID of a parent message.
36431 By default, this attribute is set to <var>null</var>.
36438 <Type name="MessageId" nullable="nullable"/>
36440 <Attribute readonly="readonly" name="mimeType" id="::Messaging::MessageAttachment::mimeType">
36441 <webidl> readonly attribute DOMString? mimeType;</webidl>
36444 The attachment MIME type.
36448 It describes the MIME type of an attachment, for example; "text/html".
36451 By default, this attribute is set to <var>null</var>.
36458 <Type type="DOMString" nullable="nullable"/>
36460 <Attribute readonly="readonly" name="filePath" id="::Messaging::MessageAttachment::filePath">
36461 <webidl> readonly attribute DOMString? filePath;</webidl>
36464 The location path to a loaded attachment file.
36468 It holds the location path to a loaded attachment file, appropriate for the Filesystem API. It is set to <var>null</var> if the attachment is not loaded from the remote servaer.
36475 <Type type="DOMString" nullable="nullable"/>
36478 <Interface name="Messaging" id="::Messaging::Messaging">
36479 <webidl> [NoInterfaceObject] interface Messaging {
36481 void getMessageServices(<ref>MessageServiceTag</ref> messageServiceType,
36482 <ref>MessageServiceArraySuccessCallback</ref> successCallback,
36483 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
36487 This interface retrieves messaging services.
36491 Fetches all existing messaging services by type or a messaging service of a given type
36492 for concrete account.
36498 <Code> // Define the success callback.
36499 function serviceListCB(services) {
36500 if (services.length > 0) {
36501 var msg = new tizen.Message("messaging.sms");
36505 // Define error callback.
36506 function errorCallback(error) {
36507 console.log("Cannot get messaging service " + error.message);
36510 tizen.messaging.getMessageServices("messaging.sms", serviceListCB,
36514 <ExtendedAttributeList>
36515 <ExtendedAttribute name="NoInterfaceObject">
36516 <webidl>NoInterfaceObject</webidl>
36517 </ExtendedAttribute>
36518 </ExtendedAttributeList>
36519 <Operation name="getMessageServices" id="::Messaging::Messaging::getMessageServices">
36520 <webidl> void getMessageServices(<ref>MessageServiceTag</ref> messageServiceType,
36521 <ref>MessageServiceArraySuccessCallback</ref> successCallback,
36522 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
36525 Gets the messaging service of a given type for a given account, or all existing services supporting the given type, if <em>serviceId </em>is not given.
36529 The errorCallback is launched with these error types:
36533 InvalidValuesError - If any of the input parameters contain an invalid value, the encoding is not valid or onsuccess is null.
36534 Please note that to allow developers to ignore errors, errorCallback accepts null as a valid value. </li>
36536 UnknownError - In any other error case. </li>
36542 <Code> // Define the error callback.
36543 function errorCallback(error) {
36544 console.log("Cannot get messaging service " + error.message);
36547 // Define the success callback.
36548 function serviceListCB(services) {
36549 console.log("Found " + services.length + "email services");
36552 tizen.messaging.getMessageServices("messaging.email", serviceListCB,
36556 <Type type="void"/>
36558 <Argument name="messageServiceType">
36561 Type of the services to be retrieved.
36564 <Type name="MessageServiceTag"/>
36566 <Argument name="successCallback">
36569 The method invoked when the services are successfully retrieved.
36572 <Type name="MessageServiceArraySuccessCallback"/>
36574 <Argument optional="optional" name="errorCallback">
36577 The method invoked when an error occurs.
36580 <Type name="ErrorCallback" nullable="nullable"/>
36584 <RaiseException name="WebAPIException">
36587 with error type TypeMismatchError, if any input parameter
36588 is not compatible with the expected type for that parameter.
36591 with error type NotSupportedError, if this feature is not supported.
36598 <Interface name="MessageServiceArraySuccessCallback" id="::Messaging::MessageServiceArraySuccessCallback">
36599 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface MessageServiceArraySuccessCallback {
36601 void onsuccess(<ref>MessageService</ref>[] services);
36606 Defines callback(s) for retrieving message services.
36612 <ExtendedAttributeList>
36613 <ExtendedAttribute name="Callback" value="FunctionOnly">
36614 <webidl>Callback</webidl>
36615 </ExtendedAttribute>
36616 <ExtendedAttribute name="NoInterfaceObject">
36617 <webidl> NoInterfaceObject</webidl>
36618 </ExtendedAttribute>
36619 </ExtendedAttributeList>
36620 <Operation name="onsuccess" id="::Messaging::MessageServiceArraySuccessCallback::onsuccess">
36621 <webidl> void onsuccess(<ref>MessageService</ref>[] services);</webidl>
36624 Called when finding message services is successful.
36630 <Type type="void"/>
36632 <Argument name="services">
36635 Array of available <em>MessageService</em> objects on the device.
36638 <Type type="array">
36639 <Type name="MessageService"/>
36645 <Interface name="MessageService" id="::Messaging::MessageService">
36646 <webidl> [NoInterfaceObject] interface MessageService {
36648 readonly attribute DOMString id;
36650 readonly attribute <ref>MessageServiceTag</ref> type;
36652 readonly attribute DOMString name;
36654 void sendMessage(<ref>Message</ref> message,
36655 optional <ref>MessageRecipientsCallback</ref>? successCallback,
36656 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
36658 void loadMessageBody(<ref>Message</ref> message,
36659 <ref>MessageBodySuccessCallback</ref> successCallback,
36660 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
36662 void loadMessageAttachment(<ref>MessageAttachment</ref> attachment,
36663 <ref>MessageAttachmentSuccessCallback</ref> successCallback,
36664 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
36666 long sync(optional <ref>SuccessCallback</ref>? successCallback,
36667 optional <ref>ErrorCallback</ref>? errorCallback,
36668 optional unsigned long? limit) raises(<ref>WebAPIException</ref>);
36670 long syncFolder(<ref>MessageFolder</ref> folder,
36671 optional <ref>SuccessCallback</ref>? successCallback,
36672 optional <ref>ErrorCallback</ref>? errorCallback,
36673 optional unsigned long? limit) raises(<ref>WebAPIException</ref>);
36675 void stopSync(long opId) raises(<ref>WebAPIException</ref>);
36677 readonly attribute <ref>MessageStorage</ref> messageStorage getraises(<ref>WebAPIException</ref>);
36681 This interface allows a web application to manipulate and send messages and supports the message creating, sending, and fetching capabilities.
36685 Messages created through this API are not persistent in device memory until the implementation attempts to send the message using the sendMessage() method. On performing the sendMessage() method, the message is available in the relevant folder (such as sent and drafts), depending on the result of the operation.
36688 The interface allows fetching of messages for all folders belonging to one account, with synchronizable flag set, using the sync() method, or for a given folder using the syncFolder() method.
36691 The interface allows fetching of the message body for a given message using loadMessageBody() method.
36697 <Code> // Define the success callback.
36698 function messageSent(recipients) {
36699 console.log("The SMS has been sent");
36702 // Define the error callback.
36703 function messageFailed(error) {
36704 console.log("The SMS could not be sent " + error.message);
36707 // Define service error callback.
36708 function serviceErrorCB(error) {
36709 console.log("Cannot get messaging service " + error.message);
36712 // Define the success callback.
36713 function serviceListCB(services) {
36714 if (services.length > 0) {
36715 // SMS sending example
36716 var msg = new tizen.Message("messaging.sms", {plainBody:"I will arrive in 10 minutes.",
36717 to:["+34666666666"]});
36719 services[0].sendMessage(msg, messageSent, messageFailed);
36723 tizen.messaging.getMessageServices("messaging.sms",
36728 <ExtendedAttributeList>
36729 <ExtendedAttribute name="NoInterfaceObject">
36730 <webidl>NoInterfaceObject</webidl>
36731 </ExtendedAttribute>
36732 </ExtendedAttributeList>
36733 <Attribute readonly="readonly" name="id" id="::Messaging::MessageService::id">
36734 <webidl> readonly attribute DOMString id;</webidl>
36737 The unique identifier of this Messaging service.
36743 <Type type="DOMString"/>
36745 <Attribute readonly="readonly" name="type" id="::Messaging::MessageService::type">
36746 <webidl> readonly attribute <ref>MessageServiceTag</ref> type;</webidl>
36749 The tag supported by this messaging service.
36755 <Type name="MessageServiceTag"/>
36757 <Attribute readonly="readonly" name="name" id="::Messaging::MessageService::name">
36758 <webidl> readonly attribute DOMString name;</webidl>
36761 The messaging service name taken from the messaging service
36767 <Type type="DOMString"/>
36769 <Operation name="sendMessage" id="::Messaging::MessageService::sendMessage">
36770 <webidl> void sendMessage(<ref>Message</ref> message,
36771 optional <ref>MessageRecipientsCallback</ref>? successCallback,
36772 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
36775 Sends a specified message.
36779 For messaging technologies in which the message is sent individually to every recipient(such as SMS), individual notification must be supported as follows:
36782 For every individual recipient in the destination list, if the message cannot be sent to that recipient, the onerror() method of the errorCallback argument must be invoked with the corresponding error type as input parameter.
36783 These error types may be passed, depending on the error conditions:
36787 NetworkError - If the network connection is not accessible. </li>
36789 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
36791 UnknownError - If any other error occurs. </li>
36794 The error message contains the name of the recipient who has failed to receive the sent message.
36797 When the operation is fully completed (that is, the implementation has the
36798 result of the send operation for all recipients), the onsuccess()
36799 method of the successCallback will be invoked with an array of recipients who received
36800 the sent message, as input parameter.
36810 http://tizen.org/privilege/messaging.write
36812 <Code> // Define the success callback
36813 function messageSent(recipients) {
36814 for (var i = 0; i < recipients.length; i++) {
36815 console.log("The SMS has been sent to " + recipients[i]);
36819 // Define the error callback.
36820 function messageFailed(error) {
36821 console.log("The SMS could not be sent " + error.message);
36824 // Define the success callback.
36825 function serviceListCB(services) {
36826 if (services.length > 0) {
36827 // SMS sending example
36828 var msg = new tizen.Message("messaging.sms", {plainBody: "I will arrive in 10 minutes.",
36829 to: ["+34666666666", "+34888888888"]});
36831 services[0].sendMessage(msg, messageSent, messageFailed);
36834 tizen.messaging.getMessageServices("messaging.sms", serviceListCB);
36837 <Type type="void"/>
36839 <Argument name="message">
36842 The message to be sent.
36845 <Type name="Message"/>
36847 <Argument optional="optional" name="successCallback">
36850 The method to be invoked when the message is successfully sent.
36853 <Type name="MessageRecipientsCallback" nullable="nullable"/>
36855 <Argument optional="optional" name="errorCallback">
36858 The method to be invoked when the sending request has failed.
36861 <Type name="ErrorCallback" nullable="nullable"/>
36865 <RaiseException name="WebAPIException">
36868 with error type TypeMismatchError, if any input parameter
36869 is not compatible with the expected type for that parameter.
36872 with error type SecurityError, if the application does not have the privilege to call this method.
36875 with error type NotSupportedError, if this feature is not supported.
36881 <Operation name="loadMessageBody" id="::Messaging::MessageService::loadMessageBody">
36882 <webidl> void loadMessageBody(<ref>Message</ref> message,
36883 <ref>MessageBodySuccessCallback</ref> successCallback,
36884 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
36887 Loads the body for a specified message.
36891 It is the back end's responsibility to detect which MIME parts of the message are related to the message body and should be loaded.
36892 If the message body is already loaded, the onsuccess() method of the successCallback will be invoked immediately.
36895 The errorCallback is launched with these error types:
36899 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
36901 UnknownError - If any other error occurs. </li>
36911 http://tizen.org/privilege/messaging.write
36913 <Code> // Assume messaging service is initialized.
36915 // Define the success body loaded callback.
36916 function successCallback(message) {
36917 console.log ("body for message: " + message.subject + "from: " + message.from + "loaded.");
36919 // Define error callback.
36920 function errorCallback(error) {
36921 console.log("Cannot load message body" + error.message);
36924 function messageQueryCallback(messages) {
36925 for (var i = 0; i < messages.length; i++) {
36926 var message = messages[i];
36927 if (!message.body.loaded) {
36928 service.loadMessageBody(message, successCallback, errorCallback);
36933 service.messageStorage.findMessages(new tizen.AttributeFilter("type", "EXACTLY", "messaging.email"), messageQueryCallback);
36936 <Type type="void"/>
36938 <Argument name="message">
36941 Message with the body to be loaded.
36944 <Type name="Message"/>
36946 <Argument name="successCallback">
36949 The method to be invoked when the message body is successfully loaded.
36952 <Type name="MessageBodySuccessCallback"/>
36954 <Argument optional="optional" name="errorCallback">
36957 The method to be invoked when the loading request fails.
36960 <Type name="ErrorCallback" nullable="nullable"/>
36964 <RaiseException name="WebAPIException">
36967 with error type TypeMismatchError, if any input parameter
36968 is not compatible with the expected type for that parameter.
36971 with error type SecurityError, if the application does not have the privilege to call this method.
36974 with error type NotSupportedError, if this feature is not supported.
36980 <Operation name="loadMessageAttachment" id="::Messaging::MessageService::loadMessageAttachment">
36981 <webidl> void loadMessageAttachment(<ref>MessageAttachment</ref> attachment,
36982 <ref>MessageAttachmentSuccessCallback</ref> successCallback,
36983 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
36986 Loads a specified message attachment.
36990 This method is used only for email services. If the message attachment is already loaded, the onsuccess() method of the successCallback is invoked immediately.
36993 The errorCallback is launched with these error types:
36997 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
36999 UnknownError - If any other error occurs. </li>
37009 http://tizen.org/privilege/messaging.write
37011 <Code> // Assume messaging service is initialized.
37013 // Define success body loaded callback
37014 function successCallback(attachment) {
37015 console.log("attachment" + attachment.id + "is loaded to:" + attachment.filePath);
37017 // Define error callback
37018 function errorCallback(error) {
37019 console.log("Cannot load message attachment" + error.message);
37022 function messagesFoundCB(messages) {
37023 for (var i = 0; i < messages.length; i++) {
37024 var message = messages[i];
37025 if (!message.attachments[0].loaded) {
37026 service.loadMessageAttachment(message.attachments[0], successCallback, errorCallback);
37031 service.messageStorage.findMessages(new tizen.AttributeFilter("hasAttachment", "EXACTLY", true), messagesFoundCB);
37034 <Type type="void"/>
37036 <Argument name="attachment">
37039 Message attachment to be loaded.
37042 <Type name="MessageAttachment"/>
37044 <Argument name="successCallback">
37047 The method to be invoked when the message attachment is successfully loaded.
37050 <Type name="MessageAttachmentSuccessCallback"/>
37052 <Argument optional="optional" name="errorCallback">
37055 The method to be invoked when the loading request fails.
37058 <Type name="ErrorCallback" nullable="nullable"/>
37062 <RaiseException name="WebAPIException">
37065 with error type TypeMismatchError, if any input parameter
37066 is not compatible with the expected type for that parameter.
37069 with error type SecurityError, if the application does not have the privilege to call this method.
37072 with error type NotSupportedError, if this feature is not supported.
37078 <Operation name="sync" id="::Messaging::MessageService::sync">
37079 <webidl> long sync(optional <ref>SuccessCallback</ref>? successCallback,
37080 optional <ref>ErrorCallback</ref>? errorCallback,
37081 optional unsigned long? limit) raises(<ref>WebAPIException</ref>);</webidl>
37084 Synchronizes the service content with an external mail server.
37088 This method is used only for email services. This method performs the same actions as syncFolder for every folder with Synchronizable flag set within the current Messaging service.
37091 The errorCallback is launched with these error types:
37095 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
37097 AbortError - If the operation has been stopped. </li>
37099 UnknownError - If any other error occurs. </li>
37109 http://tizen.org/privilege/messaging.write
37111 <Code> // Define the success callback.
37112 function serviceSynced() {
37113 console.log("New messages are fetched!");
37116 // Define the success callback.
37117 function servicesListSuccessCB(services) {
37118 services[0].sync(serviceSynced, null, 30);
37119 // Subscribe to MessageStorage notification
37121 tizen.messaging.getMessageServices("messaging.email", servicesListSuccessCB);
37127 long The identifier which can be used to stop this service operation.
37132 <Argument optional="optional" name="successCallback">
37135 The method to be invoked when all the actions are completed successfully.
37138 <Type name="SuccessCallback" nullable="nullable"/>
37140 <Argument optional="optional" name="errorCallback">
37143 The method to be invoked when the request fails.
37146 <Type name="ErrorCallback" nullable="nullable"/>
37148 <Argument optional="optional" name="limit">
37151 The maximum amount of messages retrieved within each folder.
37154 <Type type="unsigned long" nullable="nullable"/>
37158 <RaiseException name="WebAPIException">
37161 with error type TypeMismatchError, if any input parameter
37162 is not compatible with the expected type for that parameter.
37165 with error type SecurityError, if the application does not have the privilege to call this method.
37168 with error type NotSupportedError, if this feature is not supported.
37174 <Operation name="syncFolder" id="::Messaging::MessageService::syncFolder">
37175 <webidl> long syncFolder(<ref>MessageFolder</ref> folder,
37176 optional <ref>SuccessCallback</ref>? successCallback,
37177 optional <ref>ErrorCallback</ref>? errorCallback,
37178 optional unsigned long? limit) raises(<ref>WebAPIException</ref>);</webidl>
37181 Synchronizes the folder content with an external mail server.
37185 This method is used only for email services. This method performs the following actions:
37189 Exports local changes within a given folder from device to server. </li>
37191 Retrieves the list of available messages from within the given folder. </li>
37194 Messages that are retrieved from a given folder, even if synchronizable flag for this folder is not set.
37195 The backend is responsible in deciding which data is retrieved for every message. It can be:
37199 Message header details </li>
37201 Whole message body </li>
37204 The limit of latest messages for the given folder must be retrieved and put into <em>MessageStorage</em>. If the limit is not set, the entire folder must be retrieved.
37207 The errorCallback is launched with these error types:
37211 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
37213 AbortError - If the operation is stopped. </li>
37215 UnknownError - If any other error occurs. </li>
37225 http://tizen.org/privilege/messaging.write
37227 <Code> var emailService; // Assume email service is initialized
37228 // Define the error callback.
37229 function errorCallback(err) {
37230 console.log(err.name + " error: " + err.message);
37232 function serviceCallback(services) {
37233 emailService = services[0];
37234 var filter = new tizen.AttributeFilter("serviceId", "EXACTLY", emailService.id);
37236 emailService.messageStorage.findFolders(filter, folderQueryCallback);
37239 // Define the success callback.
37240 function folderSynced() {
37241 console.log("New messages are fetched!");
37243 function folderQueryCallback(folders) {
37244 console.log(folders.length + " folders(s) found!");
37245 for (var i = 0; i < folders.length; i++) {
37246 emailService.syncFolder (folders[i], folderSynced, null, 30);
37250 tizen.messaging.getMessageServices("messaging.email", serviceCallback, errorCallback);
37256 long The identifier which can be used to stop this service operation.
37261 <Argument name="folder">
37264 The folder to be synchronized.
37267 <Type name="MessageFolder"/>
37269 <Argument optional="optional" name="successCallback">
37272 The method to be invoked when all actions are completed successfully.
37275 <Type name="SuccessCallback" nullable="nullable"/>
37277 <Argument optional="optional" name="errorCallback">
37280 The method to be invoked when the request fails.
37283 <Type name="ErrorCallback" nullable="nullable"/>
37285 <Argument optional="optional" name="limit">
37288 The maximum amount of messages retrieved within a given folder.
37291 <Type type="unsigned long" nullable="nullable"/>
37295 <RaiseException name="WebAPIException">
37298 with error type TypeMismatchError, if any input parameter
37299 is not compatible with the expected type for that parameter.
37302 with error type SecurityError, if the application does not have the privilege to call this method.
37305 with error type NotSupportedError, if this feature is not supported.
37311 <Operation name="stopSync" id="::Messaging::MessageService::stopSync">
37312 <webidl> void stopSync(long opId) raises(<ref>WebAPIException</ref>);</webidl>
37315 Stops sync() and syncFoler() operation.
37319 If the <em>operationId </em>argument is valid and corresponds to a service operation already in progress, the operation must be stopped and its error callback must be invoked with error type AbortError.
37322 If the <em>operationId </em>argument is not valid or does not correspond to a valid service operation, the method will return without any further action.
37329 <Type type="void"/>
37331 <Argument name="opId">
37334 A service operation identifier.
37337 <Type type="long"/>
37341 <RaiseException name="WebAPIException">
37344 with error type TypeMismatchError, if any input parameter
37345 is not compatible with the expected type for that parameter.
37348 with error type InvalidValuesError, if any of the input parameters contains an invalid value.
37354 <Attribute readonly="readonly" name="messageStorage" id="::Messaging::MessageService::messageStorage">
37355 <webidl> readonly attribute <ref>MessageStorage</ref> messageStorage getraises(<ref>WebAPIException</ref>);</webidl>
37358 An attribute to access <em>MessageStorage </em>for this messaging service.
37362 If the backend does not support <em>MessageStorage </em>for this messaging service, a WebAPIException is raised with error type NotSupportedError.
37369 <Type name="MessageStorage"/>
37371 <RaiseException name="WebAPIException"/>
37375 <Interface name="MessageRecipientsCallback" id="::Messaging::MessageRecipientsCallback">
37376 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface MessageRecipientsCallback {
37378 void onsuccess(DOMString[] recipients);
37383 This interface specifies the methods to be called for the sendMessage() operation.
37389 <ExtendedAttributeList>
37390 <ExtendedAttribute name="Callback" value="FunctionOnly">
37391 <webidl>Callback</webidl>
37392 </ExtendedAttribute>
37393 <ExtendedAttribute name="NoInterfaceObject">
37394 <webidl> NoInterfaceObject</webidl>
37395 </ExtendedAttribute>
37396 </ExtendedAttributeList>
37397 <Operation name="onsuccess" id="::Messaging::MessageRecipientsCallback::onsuccess">
37398 <webidl> void onsuccess(DOMString[] recipients);</webidl>
37401 Called when the message sending is finished.
37407 <Type type="void"/>
37409 <Argument name="recipients">
37412 The recipients of the message.
37415 <Type type="array">
37416 <Type type="DOMString"/>
37422 <Interface name="MessageBodySuccessCallback" id="::Messaging::MessageBodySuccessCallback">
37423 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface MessageBodySuccessCallback {
37425 void onsuccess(<ref>Message</ref> message);
37429 This interface specifies a success callback function that takes a message as the input argument.
37430 It is used in the loadMessageBody() asynchronous operation.
37436 <ExtendedAttributeList>
37437 <ExtendedAttribute name="Callback" value="FunctionOnly">
37438 <webidl>Callback</webidl>
37439 </ExtendedAttribute>
37440 <ExtendedAttribute name="NoInterfaceObject">
37441 <webidl> NoInterfaceObject</webidl>
37442 </ExtendedAttribute>
37443 </ExtendedAttributeList>
37444 <Operation name="onsuccess" id="::Messaging::MessageBodySuccessCallback::onsuccess">
37445 <webidl> void onsuccess(<ref>Message</ref> message);</webidl>
37448 Called when the asynchronous query completes successfully.
37454 <Type type="void"/>
37456 <Argument name="message">
37459 The message containing the loaded body.
37462 <Type name="Message"/>
37467 <Interface name="MessageAttachmentSuccessCallback" id="::Messaging::MessageAttachmentSuccessCallback">
37468 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface MessageAttachmentSuccessCallback {
37470 void onsuccess(<ref>MessageAttachment</ref> attachment);
37474 This callback interface specifies a success callback function that takes the loaded attachment as the input argument.
37475 It is used in the loadMessageAttachment() asynchronous operation.
37481 <ExtendedAttributeList>
37482 <ExtendedAttribute name="Callback" value="FunctionOnly">
37483 <webidl>Callback</webidl>
37484 </ExtendedAttribute>
37485 <ExtendedAttribute name="NoInterfaceObject">
37486 <webidl> NoInterfaceObject</webidl>
37487 </ExtendedAttribute>
37488 </ExtendedAttributeList>
37489 <Operation name="onsuccess" id="::Messaging::MessageAttachmentSuccessCallback::onsuccess">
37490 <webidl> void onsuccess(<ref>MessageAttachment</ref> attachment);</webidl>
37493 Called when the asynchronous query completes successfully.
37499 <Type type="void"/>
37501 <Argument name="attachment">
37504 The loaded attachment.
37507 <Type name="MessageAttachment"/>
37512 <Interface name="MessageStorage" id="::Messaging::MessageStorage">
37513 <webidl> [NoInterfaceObject] interface MessageStorage {
37515 void addDraftMessage(<ref>Message</ref> message,
37516 optional <ref>SuccessCallback</ref>? successCallback,
37517 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
37519 void findMessages(<ref>AbstractFilter</ref> filter,
37520 <ref>MessageArraySuccessCallback</ref> successCallback,
37521 optional <ref>ErrorCallback</ref>? errorCallback,
37522 optional <ref>SortMode</ref>? sort,
37523 optional unsigned long? limit,
37524 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);
37526 void removeMessages(<ref>Message</ref>[] messages,
37527 optional <ref>SuccessCallback</ref>? successCallback,
37528 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
37530 void updateMessages(<ref>Message</ref>[] messages,
37531 optional <ref>SuccessCallback</ref>? successCallback,
37532 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
37534 void findConversations(<ref>AbstractFilter</ref> filter,
37535 <ref>MessageConversationArraySuccessCallback</ref> successCallback,
37536 optional <ref>ErrorCallback</ref>? errorCallback,
37537 optional <ref>SortMode</ref>? sort,
37538 optional unsigned long? limit,
37539 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);
37541 void removeConversations(<ref>MessageConversation</ref>[] conversations,
37542 optional <ref>SuccessCallback</ref>? successCallback,
37543 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
37546 void findFolders(<ref>AbstractFilter</ref> filter,
37547 <ref>MessageFolderArraySuccessCallback</ref> successCallback,
37548 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
37550 long addMessagesChangeListener(<ref>MessagesChangeCallback</ref> messagesChangeCallback,
37551 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);
37553 long addConversationsChangeListener(<ref>MessageConversationsChangeCallback</ref> conversationsChangeCallback,
37554 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);
37556 long addFoldersChangeListener(<ref>MessageFoldersChangeCallback</ref> foldersChangeCallback,
37557 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);
37559 void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
37563 This interface allows management capabilities using a web application to query, update, and delete messages, and subscribe to <em>MessageStorage </em>changes. In addition to simple message queries, the <em>MessageStorage </em>interface provides functionality to find conversations and folders.
37567 The conversation object represents a group of messages combined by the set of message fields. Email conversations are grouped by subject, while chat messages are grouped by sender and recipient fields.
37574 <ExtendedAttributeList>
37575 <ExtendedAttribute name="NoInterfaceObject">
37576 <webidl>NoInterfaceObject</webidl>
37577 </ExtendedAttribute>
37578 </ExtendedAttributeList>
37579 <Operation name="addDraftMessage" id="::Messaging::MessageStorage::addDraftMessage">
37580 <webidl> void addDraftMessage(<ref>Message</ref> message,
37581 optional <ref>SuccessCallback</ref>? successCallback,
37582 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
37585 Adds a draft message to <em>MessageStorage</em> and these messages are stored in the Drafts folder.
37589 The errorCallback is launched with these error types:
37593 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
37595 UnknownError - If any other error occurs. </li>
37605 http://tizen.org/privilege/messaging.write
37607 <Code> // Define success callback
37608 function successCallback() {
37609 console.log("Draft message added");
37612 // Define error callback
37613 function errorCallback(error) {
37614 console.log("Cannot add draft message " + error.message);
37617 // Define service query success callback.
37618 function serviceListCB(services) {
37619 if (services.length > 0) {
37620 var msg = new tizen.Message("messaging.sms", {plainBody: "Tizen draft SMS message."});
37621 services[0].messageStorage.addDraftMessage(msg,
37626 tizen.messaging.getMessageServices("messaging.sms", serviceListCB);
37629 <Type type="void"/>
37631 <Argument name="message">
37634 The draft message to add to the storage.
37637 <Type name="Message"/>
37639 <Argument optional="optional" name="successCallback">
37642 The method called when draft messages successfully added.
37645 <Type name="SuccessCallback" nullable="nullable"/>
37647 <Argument optional="optional" name="errorCallback">
37650 The method called when an error occurs.
37653 <Type name="ErrorCallback" nullable="nullable"/>
37657 <RaiseException name="WebAPIException">
37660 with error type TypeMismatchError, if any input parameter
37661 is not compatible with the expected type for that parameter or if the method is invoked for an incoming message.
37664 with error type SecurityError, if the application does not have the privilege to call this method.
37667 with error type NotSupportedError, if this feature is not supported.
37673 <Operation name="findMessages" id="::Messaging::MessageStorage::findMessages">
37674 <webidl> void findMessages(<ref>AbstractFilter</ref> filter,
37675 <ref>MessageArraySuccessCallback</ref> successCallback,
37676 optional <ref>ErrorCallback</ref>? errorCallback,
37677 optional <ref>SortMode</ref>? sort,
37678 optional unsigned long? limit,
37679 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);</webidl>
37682 Finds messages from <em>MessageStorage</em>.
37686 The errorCallback is launched with these error types:
37690 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
37692 UnknownError - If any other error occurs. </li>
37702 http://tizen.org/privilege/messaging.read
37704 <Code> var service; // Assume messaging service is initialized
37705 var messageStorage = service.messageStorage;
37706 function messageArrayCB(messages) {
37707 console.log(messages.length + " message(s) fetched!");
37708 for (var i = 0; i < messages.length; i++) {
37709 console.log(i + ". message from " + messages[i].from);
37713 // Define error callback
37714 function errorCallback(error) {
37715 console.log("Cannot query messages" + error.message);
37718 var filter = new tizen.AttributeFilter("from", "CONTAINS", "2593");
37719 messageStorage.findMessages(filter, messageArrayCB, errorCallback);
37722 <Type type="void"/>
37724 <Argument name="filter">
37727 The criteria to be used when filtering.
37730 <Type name="AbstractFilter"/>
37732 <Argument name="successCallback">
37735 The method called when the invocation ends successfully.
37738 <Type name="MessageArraySuccessCallback"/>
37740 <Argument optional="optional" name="errorCallback">
37743 The method called when an error occurs.
37746 <Type name="ErrorCallback" nullable="nullable"/>
37748 <Argument optional="optional" name="sort">
37751 The sorting mode for the query.
37754 <Type name="SortMode" nullable="nullable"/>
37756 <Argument optional="optional" name="limit">
37759 The maximum limit the query result is set to as specified by the parameter (It is the same meaning as SQL LIMIT).
37760 If <var>0</var>, there is no limit set.
37763 <Type type="unsigned long" nullable="nullable"/>
37765 <Argument optional="optional" name="offset">
37768 The offset in the result set, from where the results are listed (It is the same semantics as SQL OFFSET).<br/>The number of results listed is maximum the specified <em>limit</em> parameter. Defaults to<var> 0</var>, meaning no offset.
37771 <Type type="unsigned long" nullable="nullable"/>
37775 <RaiseException name="WebAPIException">
37778 with error type TypeMismatchError, if any input parameter
37779 is not compatible with the expected type for that parameter.
37782 with error type SecurityError, if the application does not have the privilege to call this method.
37785 with error type NotSupportedError, if this feature is not supported.
37791 <Operation name="removeMessages" id="::Messaging::MessageStorage::removeMessages">
37792 <webidl> void removeMessages(<ref>Message</ref>[] messages,
37793 optional <ref>SuccessCallback</ref>? successCallback,
37794 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
37797 Removes messages from <em>MessageStorage</em>.
37801 The errorCallback is launched with these error types:
37805 InvalidValuesError - If any of the input parameters contain an invalid value </li>
37807 UnknownError - If any other error occurs. </li>
37817 http://tizen.org/privilege/messaging.write
37819 <Code> // Define success callback
37820 var service; // Assume messaging service is initialized
37821 var messageStorage = service.messageStorage;
37822 function successCallback() {
37823 console.log("Messages were deleted");
37826 // Define error callback
37827 function errorCallback(error) {
37828 console.log("Cannot delete messages " + error.message);
37831 function messageArrayCB(messages) {
37832 if (messages.length > 0) {
37833 messageStorage.removeMessages(messages, successCallback, errorCallback);
37835 console.log("No messages found");
37839 var filter = new tizen.AttributeFilter("from", "CONTAINS", "2593");
37840 messageStorage.findMessages(filter, messageArrayCB);
37843 <Type type="void"/>
37845 <Argument name="messages">
37848 An array of messages to delete.
37851 <Type type="array">
37852 <Type name="Message"/>
37855 <Argument optional="optional" name="successCallback">
37858 The method called when messages are successfully deleted.
37861 <Type name="SuccessCallback" nullable="nullable"/>
37863 <Argument optional="optional" name="errorCallback">
37866 The method called when an error occurs.
37869 <Type name="ErrorCallback" nullable="nullable"/>
37873 <RaiseException name="WebAPIException">
37876 with error type TypeMismatchError, if any input parameter
37877 is not compatible with the expected type for that parameter.
37880 with error type SecurityError, if the application does not have the privilege to call this method.
37883 with error type NotSupportedError, if this feature is not supported.
37889 <Operation name="updateMessages" id="::Messaging::MessageStorage::updateMessages">
37890 <webidl> void updateMessages(<ref>Message</ref>[] messages,
37891 optional <ref>SuccessCallback</ref>? successCallback,
37892 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
37895 Updates messages in <em>MessageStorage</em>.
37899 The backend must check whether the required updates can be applied and invoke the errorCallback method, if they cannot be checked.
37900 Depending on the backend synchronization settings, the local changes in <em>MessageStorage</em> can be rewritten as a result of invoking the sync() or syncFolder() methods of the related message service.
37903 The errorCallback is launched with these error types:
37907 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
37909 UnknownError - If any other error occurs. </li>
37919 http://tizen.org/privilege/messaging.write
37921 <Code> var service; // Assume messaging service is initialized
37922 var messageStorage = service.messageStorage;
37924 // Define success callback
37925 function successCallback() {
37926 console.log("Messages were updated");
37929 // Define error callback
37930 function errorCallback(error) {
37931 console.log("Cannot update messages " + error.message);
37934 function messageArrayCB(messages) {
37935 if (messages.length > 0) {
37936 messages[0].isRead = true;
37937 messageStorage.updateMessages([messages[0]], successCallback, errorCallback);
37939 console.log("No messages found");
37943 var filter = new tizen.AttributeFilter('isRead', 'EXACTLY', false);
37944 messageStorage.findMessages(filter, messageArrayCB);
37948 <Type type="void"/>
37950 <Argument name="messages">
37956 <Type type="array">
37957 <Type name="Message"/>
37960 <Argument optional="optional" name="successCallback">
37963 The method called when messages are successfully updated.
37966 <Type name="SuccessCallback" nullable="nullable"/>
37968 <Argument optional="optional" name="errorCallback">
37971 The method called when an error occurs.
37974 <Type name="ErrorCallback" nullable="nullable"/>
37978 <RaiseException name="WebAPIException">
37981 with error type TypeMismatchError, if any input parameter
37982 is not compatible with the expected type for that parameter.
37985 with error type SecurityError, if the application does not have the privilege to call this method.
37988 with error type NotSupportedError, if this feature is not supported.
37994 <Operation name="findConversations" id="::Messaging::MessageStorage::findConversations">
37995 <webidl> void findConversations(<ref>AbstractFilter</ref> filter,
37996 <ref>MessageConversationArraySuccessCallback</ref> successCallback,
37997 optional <ref>ErrorCallback</ref>? errorCallback,
37998 optional <ref>SortMode</ref>? sort,
37999 optional unsigned long? limit,
38000 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);</webidl>
38003 Finds conversations from <em>MessageStorage</em>.
38007 The errorCallback is launched with these error types:
38011 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
38013 UnknownError - If any other error occurs. </li>
38023 http://tizen.org/privilege/messaging.read
38025 <Code> var service; // Assume messaging service is initialized
38026 var messageStorage = service.messageStorage;
38027 function conversationsArrayCB(conversations) {
38028 console.log(conversations.length + " conversation(s) found!");
38029 for (var i = 0; i < conversations.length; i++) {
38030 console.log(i + ". conversation preview " + conversations[i].preview);
38034 // Define error callback.
38035 function errorCallback(error) {
38036 console.log("Cannot query conversations" + error.message);
38039 var filter = new tizen.AttributeFilter('from', 'CONTAINS', '2593');
38040 messageStorage.findConversations(filter, conversationsArrayCB, errorCallback);
38043 <Type type="void"/>
38045 <Argument name="filter">
38048 The criteria to be used when filtering.
38051 <Type name="AbstractFilter"/>
38053 <Argument name="successCallback">
38056 The method called when the invocation ends successfully.
38059 <Type name="MessageConversationArraySuccessCallback"/>
38061 <Argument optional="optional" name="errorCallback">
38064 The method called when an error occurs.
38067 <Type name="ErrorCallback" nullable="nullable"/>
38069 <Argument optional="optional" name="sort">
38072 The sorting rules for the query.
38075 <Type name="SortMode" nullable="nullable"/>
38077 <Argument optional="optional" name="limit">
38080 The maximum limit the query result is set to as specified by the parameter (It is the same meaning as SQL LIMIT).
38081 If set to <var>0</var>, there is no limit set.
38084 <Type type="unsigned long" nullable="nullable"/>
38086 <Argument optional="optional" name="offset">
38089 The offset in the result set, from where the results are listed (It is the same semantics as SQL OFFSET).<br/>The number of results listed is maximum the specified <em>limit</em> parameter. Defaults to<var> 0</var>, meaning no offset.
38092 <Type type="unsigned long" nullable="nullable"/>
38096 <RaiseException name="WebAPIException">
38099 with error type TypeMismatchError, if any input parameter
38100 is not compatible with the expected type for that parameter.
38103 with error type SecurityError, if the application does not have the privilege to call this method.
38106 with error type NotSupportedError, if this feature is not supported.
38112 <Operation name="removeConversations" id="::Messaging::MessageStorage::removeConversations">
38113 <webidl> void removeConversations(<ref>MessageConversation</ref>[] conversations,
38114 optional <ref>SuccessCallback</ref>? successCallback,
38115 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
38118 Removes conversations from <em>MessageStorage</em>.
38122 The errorCallback is launched with these error types:
38126 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
38128 UnknownError - If any other error occurs. </li>
38138 http://tizen.org/privilege/messaging.write
38140 <Code> var service; // Assume messaging service is initialized
38141 var messageStorage = service.messageStorage;
38142 // Define success callback.
38143 function successCallback() {
38144 console.log("Conversations deleted");
38147 // Define error callback.
38148 function errorCallback(error) {
38149 console.log("Cannot delete conversations " + error.message);
38152 function conversationsArrayCB(conversations) {
38153 if (conversations.length > 0) {
38154 messageStorage.removeConversations(conversations, successCallback,
38157 console.log("No conversations found");
38159 console.log("Deleted " + conversations.length + " conversation(s)");
38162 // Define error callback.
38163 function queryErrorCB(error) {
38164 console.log("Cannot query conversations" + error.message);
38167 var filter = new tizen.AttributeFilter('from', 'CONTAINS', '2593');
38168 messageStorage.findConversations(filter, conversationsArrayCB,
38172 <Type type="void"/>
38174 <Argument name="conversations">
38177 An array of conversations to delete.
38180 <Type type="array">
38181 <Type name="MessageConversation"/>
38184 <Argument optional="optional" name="successCallback">
38187 The method called when conversations are successfully deleted.
38190 <Type name="SuccessCallback" nullable="nullable"/>
38192 <Argument optional="optional" name="errorCallback">
38195 The method called when an error occurs.
38198 <Type name="ErrorCallback" nullable="nullable"/>
38202 <RaiseException name="WebAPIException">
38205 with error type TypeMismatchError, if any input parameter
38206 is not compatible with the expected type for that parameter.
38209 with error type SecurityError, if the application does not have the privilege to call this method.
38212 with error type NotSupportedError, if this feature is not supported.
38218 <Operation name="findFolders" id="::Messaging::MessageStorage::findFolders">
38219 <webidl> void findFolders(<ref>AbstractFilter</ref> filter,
38220 <ref>MessageFolderArraySuccessCallback</ref> successCallback,
38221 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
38224 Queries folders from MessageStorage.
38228 The errorCallback is launched with these error types:
38232 InvalidValuesError: If any of the input parameters contains an invalid value. </li>
38234 UnknownError: In any other error case. </li>
38244 http://tizen.org/privilege/messaging.read
38246 <Code> var service; // Assume messaging service is initialized
38247 var messageStorage = service.messageStorage;
38248 function folderArrayCB(folders) {
38249 console.log(folders.length + " folders(s) found!");
38250 for (var i = 0; i < folders.length; i++) {
38251 console.log(i + ", folder: " + folders[i].name);
38254 var filter = new tizen.AttributeFilter("serviceId", "EXACTLY", service.id);
38255 messageStorage.findFolders(filter, folderArrayCB);
38258 <Type type="void"/>
38260 <Argument name="filter">
38263 The criteria used when filtering.
38266 <Type name="AbstractFilter"/>
38268 <Argument name="successCallback">
38271 The method called when the invocation ends successfully.
38274 <Type name="MessageFolderArraySuccessCallback"/>
38276 <Argument optional="optional" name="errorCallback">
38279 The method called when an error occurs.
38282 <Type name="ErrorCallback" nullable="nullable"/>
38286 <RaiseException name="WebAPIException">
38289 with error type TypeMismatchError, if any input parameter
38290 is not compatible with the expected type for that parameter.
38293 with error type SecurityError, if the application does not have the privilege to call this method.
38296 with error type NotSupportedError, if this feature is not supported.
38302 <Operation name="addMessagesChangeListener" id="::Messaging::MessageStorage::addMessagesChangeListener">
38303 <webidl> long addMessagesChangeListener(<ref>MessagesChangeCallback</ref> messagesChangeCallback,
38304 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);</webidl>
38307 Adds a listener to subscribe to notification for MessageStorage changes.
38311 The errorCallback is launched with these error types:
38315 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
38317 UnknownError - If any other error occurs. </li>
38327 http://tizen.org/privilege/messaging.read
38329 <Code> var service; // Assume messaging service is initialized
38330 var messageStorage = service.messageStorage;
38331 var messageChangeCallback = {
38332 messagesupdated: function(messages) {
38333 console.log(messages.length + " message(s) updated");},
38334 messagesadded: function(messages) {
38335 console.log(messages.length + " message(s) added");},
38336 messagesremoved: function(messages) {
38337 console.log(messages.length + " message(s) removed");}
38340 messageStorage.addMessagesChangeListener(messageChangeCallback);
38346 long The subscription identifier.
38351 <Argument name="messagesChangeCallback">
38354 Callback that is called when the MessageStorage is changed.
38357 <Type name="MessagesChangeCallback"/>
38359 <Argument optional="optional" name="filter">
38362 The criteria to be used when filtering.
38365 <Type name="AbstractFilter" nullable="nullable"/>
38369 <RaiseException name="WebAPIException">
38372 with error type TypeMismatchError, if any input parameter
38373 is not compatible with the expected type for that parameter.
38376 with error type SecurityError, if the application does not have the privilege to call this method.
38379 with error type NotSupportedError, if this feature is not supported.
38385 <Operation name="addConversationsChangeListener" id="::Messaging::MessageStorage::addConversationsChangeListener">
38386 <webidl> long addConversationsChangeListener(<ref>MessageConversationsChangeCallback</ref> conversationsChangeCallback,
38387 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);</webidl>
38390 Adds a listener to subscribe to notifications for MessageConversation changes.
38394 The errorCallback is launched with these error types:
38398 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
38400 UnknownError - If any other error occurs. </li>
38410 http://tizen.org/privilege/messaging.read
38412 <Code> var service; // Assume messaging service is initialized
38413 var messageStorage = service.messageStorage;
38414 var conversationChangeCB = {
38415 conversationsupdated: function(conversations) {
38416 console.log(conversations.length + " conversations(s) updated");},
38417 conversationsadded: function(conversations) {
38418 console.log(conversations.length + " conversations(s) added");},
38419 conversationsremoved: function(conversations) {
38420 console.log(conversations.length + " conversations(s) removed");}
38423 messageStorage.addConversationsChangeListener(conversationChangeCB);
38429 long The subscription identifier.
38434 <Argument name="conversationsChangeCallback">
38437 Callback that is called when the MessageStorage is changed.
38440 <Type name="MessageConversationsChangeCallback"/>
38442 <Argument optional="optional" name="filter">
38445 The criteria to be used when filtering.
38448 <Type name="AbstractFilter" nullable="nullable"/>
38452 <RaiseException name="WebAPIException">
38455 with error type TypeMismatchError, if any input parameter
38456 is not compatible with the expected type for that parameter.
38459 with error type SecurityError, if the application does not have the privilege to call this method.
38462 with error type NotSupportedError, if this feature is not supported.
38468 <Operation name="addFoldersChangeListener" id="::Messaging::MessageStorage::addFoldersChangeListener">
38469 <webidl> long addFoldersChangeListener(<ref>MessageFoldersChangeCallback</ref> foldersChangeCallback,
38470 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);</webidl>
38473 Adds a listener to subscribe to notifications for MessageFolder changes.
38477 The errorCallback is launched with these error types:
38481 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
38483 UnknownError - If any other error occurs. </li>
38493 http://tizen.org/privilege/messaging.read
38495 <Code> var service; // Assume messaging service is initialized
38496 var messageStorage = service.messageStorage;
38497 var folderChangeCB = {
38498 foldersupdated: function(folders) {
38499 console.log(folders.length + " folders(s) updated");},
38500 foldersadded: function(folders) {
38501 console.log(folders.length + " folders(s) added");},
38502 foldersremoved: function(folders) {
38503 console.log(folders.length + " folders(s) removed");}
38506 messageStorage.addFoldersChangeListener(folderChangeCB);
38512 long The subscription identifier.
38517 <Argument name="foldersChangeCallback">
38520 Callback that is called when the MessageStorage is changed.
38523 <Type name="MessageFoldersChangeCallback"/>
38525 <Argument optional="optional" name="filter">
38528 The criteria to be used when filtering.
38531 <Type name="AbstractFilter" nullable="nullable"/>
38535 <RaiseException name="WebAPIException">
38538 with error type TypeMismatchError, if any input parameter
38539 is not compatible with the expected type for that parameter.
38542 with error type SecurityError, if the application does not have the privilege to call this method.
38545 with error type NotSupportedError, if this feature is not supported.
38551 <Operation name="removeChangeListener" id="::Messaging::MessageStorage::removeChangeListener">
38552 <webidl> void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);</webidl>
38555 Removes a listener to unsubscribe from receiving message notifications.
38559 The errorCallback is launched with these error types:
38563 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
38565 UnknownError - If any other error occurs. </li>
38568 If the <em>subscriptionId </em>argument is valid and corresponds to a subscription already in place, the subscription process must stop immediately and further <em>MessagingStorage </em>change notifications must not be invoked.
38569 If the <em>subscriptionId argument does not correspond to a valid subscription, the method will return without any further action.
38579 http://tizen.org/privilege/messaging.read
38581 <Code> var watchId;
38582 var service; // Assume messaging service is initialized
38583 var messageStorage = service.messageStorage;
38584 var folderChangeCB = {
38585 foldersupdated: function(folders) {
38586 console.log(folders.length + " folders(s) updated. Cancel watching.");
38587 messageStorage.removeChangeListener(watchId); },
38588 foldersadded: function(folders) {
38589 console.log(folders.length + " folders(s) added. Cancel watching.");
38590 messageStorage.removeChangeListener(watchId); },
38591 foldersremoved: function(folders) {
38592 console.log(folders.length + " folders(s) removed. Cancel watching.");
38593 messageStorage.removeChangeListener(watchId);}
38596 watchId = messageStorage.addFoldersChangeListener(folderChangeCB);
38600 <Type type="void"/>
38602 <Argument name="watchId">
38605 An identifier of the subscription returned by addMessagesChangeListener, addConversationsChangeListener or
38606 addFoldersChangeListener methods.
38609 <Type type="long"/>
38613 <RaiseException name="WebAPIException">
38616 with error type TypeMismatchError, if any input parameter
38617 is not compatible with the expected type for that parameter.
38620 with error type SecurityError, if the application does not have the privilege to call this method.
38623 with error type NotSupportedError, if this feature is not supported.
38630 <Interface name="MessageArraySuccessCallback" id="::Messaging::MessageArraySuccessCallback">
38631 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface MessageArraySuccessCallback {
38633 void onsuccess(<ref>Message</ref>[] messages);
38637 findMessages specific success callback.
38641 This callback interface specifies a success callback function,
38642 taking a list of messages that satisfy the filtering criteria as the input argument.
38643 It is used in the findMessages asynchronous operation.
38650 <ExtendedAttributeList>
38651 <ExtendedAttribute name="Callback" value="FunctionOnly">
38652 <webidl>Callback</webidl>
38653 </ExtendedAttribute>
38654 <ExtendedAttribute name="NoInterfaceObject">
38655 <webidl> NoInterfaceObject</webidl>
38656 </ExtendedAttribute>
38657 </ExtendedAttributeList>
38658 <Operation name="onsuccess" id="::Messaging::MessageArraySuccessCallback::onsuccess">
38659 <webidl> void onsuccess(<ref>Message</ref>[] messages);</webidl>
38662 Method invoked when an asynchronous query completes successfully.
38668 <Type type="void"/>
38670 <Argument name="messages">
38673 Array of messages that satisfy the query.
38676 <Type type="array">
38677 <Type name="Message"/>
38683 <Interface name="MessageConversationArraySuccessCallback" id="::Messaging::MessageConversationArraySuccessCallback">
38684 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface MessageConversationArraySuccessCallback {
38686 void onsuccess(<ref>MessageConversation</ref>[] conversations);
38690 findConversations specific success callback.
38694 This callback interface specifies a success callback function,
38695 taking a list of conversations that satisfy the filtering criteria as the input argument.
38696 It is used in the findConversations asynchronous operation.
38703 <ExtendedAttributeList>
38704 <ExtendedAttribute name="Callback" value="FunctionOnly">
38705 <webidl>Callback</webidl>
38706 </ExtendedAttribute>
38707 <ExtendedAttribute name="NoInterfaceObject">
38708 <webidl> NoInterfaceObject</webidl>
38709 </ExtendedAttribute>
38710 </ExtendedAttributeList>
38711 <Operation name="onsuccess" id="::Messaging::MessageConversationArraySuccessCallback::onsuccess">
38712 <webidl> void onsuccess(<ref>MessageConversation</ref>[] conversations);</webidl>
38715 Method invoked when an asynchronous query completes successfully.
38721 <Type type="void"/>
38723 <Argument name="conversations">
38726 Array of conversations that satisfy the query.
38729 <Type type="array">
38730 <Type name="MessageConversation"/>
38736 <Interface name="MessageFolderArraySuccessCallback" id="::Messaging::MessageFolderArraySuccessCallback">
38737 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface MessageFolderArraySuccessCallback {
38739 void onsuccess(<ref>MessageFolder</ref>[] folders);
38743 findFolders specific success callback.
38747 This callback interface specifies a success callback function,
38748 taking a list of folders that satisfy the filtering criteria as the input argument.
38749 It is used in the findFolders asynchronous operation.
38756 <ExtendedAttributeList>
38757 <ExtendedAttribute name="Callback" value="FunctionOnly">
38758 <webidl>Callback</webidl>
38759 </ExtendedAttribute>
38760 <ExtendedAttribute name="NoInterfaceObject">
38761 <webidl> NoInterfaceObject</webidl>
38762 </ExtendedAttribute>
38763 </ExtendedAttributeList>
38764 <Operation name="onsuccess" id="::Messaging::MessageFolderArraySuccessCallback::onsuccess">
38765 <webidl> void onsuccess(<ref>MessageFolder</ref>[] folders);</webidl>
38768 Method invoked when an asynchronous query completes successfully.
38774 <Type type="void"/>
38776 <Argument name="folders">
38779 Array of folders that satisfy the query.
38782 <Type type="array">
38783 <Type name="MessageFolder"/>
38789 <Interface name="MessagesChangeCallback" id="::Messaging::MessagesChangeCallback">
38790 <webidl> [Callback, NoInterfaceObject] interface MessagesChangeCallback {
38792 void messagesadded(<ref>Message</ref>[] addedMessages);
38794 void messagesupdated(<ref>Message</ref>[] updatedMessages);
38796 void messagesremoved(<ref>Message</ref>[] removedMessages);
38800 watchMessagesChanges callback.
38804 This callback interface specifies a callback as a set of functions that will be
38805 invoked when messages from MessageStorage change. Each function takes a list of messages as the input argument.
38812 <ExtendedAttributeList>
38813 <ExtendedAttribute name="Callback">
38814 <webidl>Callback</webidl>
38815 </ExtendedAttribute>
38816 <ExtendedAttribute name="NoInterfaceObject">
38817 <webidl> NoInterfaceObject</webidl>
38818 </ExtendedAttribute>
38819 </ExtendedAttributeList>
38820 <Operation name="messagesadded" id="::Messaging::MessagesChangeCallback::messagesadded">
38821 <webidl> void messagesadded(<ref>Message</ref>[] addedMessages);</webidl>
38824 Method invoked when messages are added to the MessageStorage.
38830 <Type type="void"/>
38832 <Argument name="addedMessages">
38835 Array of added messages.
38838 <Type type="array">
38839 <Type name="Message"/>
38844 <Operation name="messagesupdated" id="::Messaging::MessagesChangeCallback::messagesupdated">
38845 <webidl> void messagesupdated(<ref>Message</ref>[] updatedMessages);</webidl>
38848 Method invoked when messages are updated in MessageStorage.
38854 <Type type="void"/>
38856 <Argument name="updatedMessages">
38859 Array of updated messages.
38862 <Type type="array">
38863 <Type name="Message"/>
38868 <Operation name="messagesremoved" id="::Messaging::MessagesChangeCallback::messagesremoved">
38869 <webidl> void messagesremoved(<ref>Message</ref>[] removedMessages);</webidl>
38872 Method invoked when messages are removed from MessageStorage.
38878 <Type type="void"/>
38880 <Argument name="removedMessages">
38883 Array of removed messages. It contains only MessageId attribute.
38886 <Type type="array">
38887 <Type name="Message"/>
38893 <Interface name="MessageConversationsChangeCallback" id="::Messaging::MessageConversationsChangeCallback">
38894 <webidl> [Callback, NoInterfaceObject] interface MessageConversationsChangeCallback {
38896 void conversationsadded(<ref>MessageConversation</ref>[] addedConversations);
38898 void conversationsupdated(<ref>MessageConversation</ref>[] updatedConversations);
38900 void conversationsremoved(<ref>MessageConversation</ref>[] removedConversations);
38904 watchConversationsChanges callback.
38908 This callback interface specifies a callback as a set of functions that will be
38909 invoked when conversations from MessageStorage change. Each function takes a list of conversations as the input argument.
38916 <ExtendedAttributeList>
38917 <ExtendedAttribute name="Callback">
38918 <webidl>Callback</webidl>
38919 </ExtendedAttribute>
38920 <ExtendedAttribute name="NoInterfaceObject">
38921 <webidl> NoInterfaceObject</webidl>
38922 </ExtendedAttribute>
38923 </ExtendedAttributeList>
38924 <Operation name="conversationsadded" id="::Messaging::MessageConversationsChangeCallback::conversationsadded">
38925 <webidl> void conversationsadded(<ref>MessageConversation</ref>[] addedConversations);</webidl>
38928 Method invoked when conversations are added to MessageStorage.
38934 <Type type="void"/>
38936 <Argument name="addedConversations">
38939 Array of added conversations.
38942 <Type type="array">
38943 <Type name="MessageConversation"/>
38948 <Operation name="conversationsupdated" id="::Messaging::MessageConversationsChangeCallback::conversationsupdated">
38949 <webidl> void conversationsupdated(<ref>MessageConversation</ref>[] updatedConversations);</webidl>
38952 Method invoked when conversations are updated in MessageStorage.
38958 <Type type="void"/>
38960 <Argument name="updatedConversations">
38963 Array of updated conversations.
38966 <Type type="array">
38967 <Type name="MessageConversation"/>
38972 <Operation name="conversationsremoved" id="::Messaging::MessageConversationsChangeCallback::conversationsremoved">
38973 <webidl> void conversationsremoved(<ref>MessageConversation</ref>[] removedConversations);</webidl>
38976 Method invoked when conversations are removed from MessageStorage.
38982 <Type type="void"/>
38984 <Argument name="removedConversations">
38987 Array of removed conversations. It contains only MessageConvId attribute.
38990 <Type type="array">
38991 <Type name="MessageConversation"/>
38997 <Interface name="MessageFoldersChangeCallback" id="::Messaging::MessageFoldersChangeCallback">
38998 <webidl> [Callback, NoInterfaceObject] interface MessageFoldersChangeCallback {
39000 void foldersadded(<ref>MessageFolder</ref>[] addedFolders);
39002 void foldersupdated(<ref>MessageFolder</ref>[] updatedFolders);
39004 void foldersremoved(<ref>MessageFolder</ref>[] removedFolders);
39008 This callback interface specifies a callback as a set of functions that are invoked when message folders from <em>MessageStorage </em>change. Each function takes a list of folders as the input argument.
39014 <ExtendedAttributeList>
39015 <ExtendedAttribute name="Callback">
39016 <webidl>Callback</webidl>
39017 </ExtendedAttribute>
39018 <ExtendedAttribute name="NoInterfaceObject">
39019 <webidl> NoInterfaceObject</webidl>
39020 </ExtendedAttribute>
39021 </ExtendedAttributeList>
39022 <Operation name="foldersadded" id="::Messaging::MessageFoldersChangeCallback::foldersadded">
39023 <webidl> void foldersadded(<ref>MessageFolder</ref>[] addedFolders);</webidl>
39026 Called when folders are added to <em>MessageStorage</em>.
39032 <Type type="void"/>
39034 <Argument name="addedFolders">
39037 An array of added folders.
39040 <Type type="array">
39041 <Type name="MessageFolder"/>
39046 <Operation name="foldersupdated" id="::Messaging::MessageFoldersChangeCallback::foldersupdated">
39047 <webidl> void foldersupdated(<ref>MessageFolder</ref>[] updatedFolders);</webidl>
39050 Called when folders are updated in <em>MessageStorage</em>.
39056 <Type type="void"/>
39058 <Argument name="updatedFolders">
39061 An array of updated folders.
39064 <Type type="array">
39065 <Type name="MessageFolder"/>
39070 <Operation name="foldersremoved" id="::Messaging::MessageFoldersChangeCallback::foldersremoved">
39071 <webidl> void foldersremoved(<ref>MessageFolder</ref>[] removedFolders);</webidl>
39074 Called when folders are removed from <em>MessageStorage</em>.
39080 <Type type="void"/>
39082 <Argument name="removedFolders">
39085 Array of removed folders. It contains only MessageFolderId attribute.
39088 <Type type="array">
39089 <Type name="MessageFolder"/>
39095 <Interface name="MessageConversation" id="::Messaging::MessageConversation">
39096 <webidl> [NoInterfaceObject] interface MessageConversation {
39098 readonly attribute <ref>MessageConvId</ref> id;
39100 readonly attribute <ref>MessageServiceTag</ref> type;
39102 readonly attribute Date timestamp;
39104 readonly attribute unsigned long messageCount;
39106 readonly attribute unsigned long unreadMessages;
39108 readonly attribute DOMString preview;
39110 readonly attribute DOMString subject;
39112 readonly attribute boolean isRead;
39114 readonly attribute DOMString from;
39116 readonly attribute DOMString[] to;
39118 readonly attribute DOMString[] cc;
39120 readonly attribute DOMString[] bcc;
39122 readonly attribute <ref>MessageId</ref> lastMessageId;
39126 This interface defines the message conversation (also known as the thread of messages).
39130 This interface allows a web application to get the set of properties linked to a conversation.
39131 This interface provides only read-only attributes.
39138 <ExtendedAttributeList>
39139 <ExtendedAttribute name="NoInterfaceObject">
39140 <webidl>NoInterfaceObject</webidl>
39141 </ExtendedAttribute>
39142 </ExtendedAttributeList>
39143 <Attribute readonly="readonly" name="id" id="::Messaging::MessageConversation::id">
39144 <webidl> readonly attribute <ref>MessageConvId</ref> id;</webidl>
39147 The conversation identifier.
39151 The ID is locally unique and persistent property, assigned by the device or the Web runtime (WRT).
39158 <Type name="MessageConvId"/>
39160 <Attribute readonly="readonly" name="type" id="::Messaging::MessageConversation::type">
39161 <webidl> readonly attribute <ref>MessageServiceTag</ref> type;</webidl>
39164 The type of a given conversation.
39170 <Type name="MessageServiceTag"/>
39172 <Attribute readonly="readonly" name="timestamp" id="::Messaging::MessageConversation::timestamp">
39173 <webidl> readonly attribute Date timestamp;</webidl>
39176 The timestamp of the latest message in a conversation.
39180 This property is set up by the device or the Web runtime environment.
39187 <Type type="Date"/>
39189 <Attribute readonly="readonly" name="messageCount" id="::Messaging::MessageConversation::messageCount">
39190 <webidl> readonly attribute unsigned long messageCount;</webidl>
39193 The count of messages in a conversation.
39199 <Type type="unsigned long"/>
39201 <Attribute readonly="readonly" name="unreadMessages" id="::Messaging::MessageConversation::unreadMessages">
39202 <webidl> readonly attribute unsigned long unreadMessages;</webidl>
39205 The count of unread messages in a conversation.
39211 <Type type="unsigned long"/>
39213 <Attribute readonly="readonly" name="preview" id="::Messaging::MessageConversation::preview">
39214 <webidl> readonly attribute DOMString preview;</webidl>
39217 A preview of the latest message in a conversation.
39223 <Type type="DOMString"/>
39225 <Attribute readonly="readonly" name="subject" id="::Messaging::MessageConversation::subject">
39226 <webidl> readonly attribute DOMString subject;</webidl>
39229 The subject of a conversation (applicable for group chats, MMS, email).
39235 <Type type="DOMString"/>
39237 <Attribute readonly="readonly" name="isRead" id="::Messaging::MessageConversation::isRead">
39238 <webidl> readonly attribute boolean isRead;</webidl>
39241 An attribute to indicate whether the latest message in a conversation has been read or not.
39245 This property is set to <var>true</var> if the message has been read, else it is set to <var>false</var>.
39252 <Type type="boolean"/>
39254 <Attribute readonly="readonly" name="from" id="::Messaging::MessageConversation::from">
39255 <webidl> readonly attribute DOMString from;</webidl>
39258 The source address (or source phone number) of the latest message in the conversation.
39262 This property is set up by the device or the Web runtime environment.
39269 <Type type="DOMString"/>
39271 <Attribute readonly="readonly" name="to" id="::Messaging::MessageConversation::to">
39272 <webidl> readonly attribute DOMString[] to;</webidl>
39275 The destination of the latest message in a conversation.
39281 <Type type="array">
39282 <Type type="DOMString"/>
39285 <Attribute readonly="readonly" name="cc" id="::Messaging::MessageConversation::cc">
39286 <webidl> readonly attribute DOMString[] cc;</webidl>
39289 The carbon copy (cc) address of the latest message in a conversation.
39293 This property is used only for email.
39300 <Type type="array">
39301 <Type type="DOMString"/>
39304 <Attribute readonly="readonly" name="bcc" id="::Messaging::MessageConversation::bcc">
39305 <webidl> readonly attribute DOMString[] bcc;</webidl>
39308 The blind carbon copy (bcc) address of the latest message in a conversation.
39312 This property is used only for email.
39319 <Type type="array">
39320 <Type type="DOMString"/>
39323 <Attribute readonly="readonly" name="lastMessageId" id="::Messaging::MessageConversation::lastMessageId">
39324 <webidl> readonly attribute <ref>MessageId</ref> lastMessageId;</webidl>
39327 The identifier of a latest message in a conversation.
39331 This property is set up by the device or the Web runtime environment.
39338 <Type name="MessageId"/>
39341 <Interface name="MessageFolder" id="::Messaging::MessageFolder">
39342 <webidl> [NoInterfaceObject] interface MessageFolder {
39344 readonly attribute <ref>MessageFolderId</ref> id;
39346 readonly attribute <ref>MessageFolderId</ref> parentId;
39348 readonly attribute DOMString serviceId;
39350 readonly attribute <ref>MessageServiceTag</ref> contentType;
39352 attribute DOMString name setraises(<ref>WebAPIException</ref>);
39354 readonly attribute DOMString path;
39356 readonly attribute DOMString type;
39358 attribute boolean synchronizable setraises(<ref>WebAPIException</ref>);
39362 This interface defines the email folder.
39366 This interface allows a web application to get the set of properties that are linked to an email folder.
39369 The concept of folders is present in several email protocols, such as IMAP, Mail For Exchange.
39372 If the Messaging service does not represent email or an email protocol supporting the concept of folders on a server, this service has one folder which is the standard INBOX folder.
39379 <ExtendedAttributeList>
39380 <ExtendedAttribute name="NoInterfaceObject">
39381 <webidl>NoInterfaceObject</webidl>
39382 </ExtendedAttribute>
39383 </ExtendedAttributeList>
39384 <Attribute readonly="readonly" name="id" id="::Messaging::MessageFolder::id">
39385 <webidl> readonly attribute <ref>MessageFolderId</ref> id;</webidl>
39388 The folder identifier.
39389 The ID is locally unique and persistent property, assigned by the device or the Web runtime (WRT).
39395 <Type name="MessageFolderId"/>
39397 <Attribute readonly="readonly" name="parentId" id="::Messaging::MessageFolder::parentId">
39398 <webidl> readonly attribute <ref>MessageFolderId</ref> parentId;</webidl>
39401 The identifier for the parent folder of a specified folder.
39405 If this folder is a root folder, the parent folder ID is <var>null</var>.
39412 <Type name="MessageFolderId"/>
39414 <Attribute readonly="readonly" name="serviceId" id="::Messaging::MessageFolder::serviceId">
39415 <webidl> readonly attribute DOMString serviceId;</webidl>
39418 The identifier of the service to which a specified folder belongs.
39424 <Type type="DOMString"/>
39426 <Attribute readonly="readonly" name="contentType" id="::Messaging::MessageFolder::contentType">
39427 <webidl> readonly attribute <ref>MessageServiceTag</ref> contentType;</webidl>
39430 The type of the messages contained within a folder.
39436 <Type name="MessageServiceTag"/>
39438 <Attribute name="name" id="::Messaging::MessageFolder::name">
39439 <webidl> attribute DOMString name setraises(<ref>WebAPIException</ref>);</webidl>
39442 The visible name of a folder.
39446 Can be modified. By default, it contains the folder name from the server.
39449 In case the current Messaging service does not support remote folders on the server (and this folder is the only one that the current service has), this attribute contains the service name, by default.
39456 <Type type="DOMString"/>
39458 <RaiseException name="WebAPIException"/>
39461 <Attribute readonly="readonly" name="path" id="::Messaging::MessageFolder::path">
39462 <webidl> readonly attribute DOMString path;</webidl>
39465 The whole path of a remote folder on the server.
39469 If the current Messaging service does not support remote folders on the server,
39470 this attribute will be empty.
39477 <Type type="DOMString"/>
39479 <Attribute readonly="readonly" name="type" id="::Messaging::MessageFolder::type">
39480 <webidl> readonly attribute DOMString type;</webidl>
39483 The standard type of a folder.
39487 It can be one of the following values:
39500 If this folder is not a standard folder, an empty value must be returned.
39503 This property is unique for each type within one Messaging service.
39510 <Type type="DOMString"/>
39512 <Attribute name="synchronizable" id="::Messaging::MessageFolder::synchronizable">
39513 <webidl> attribute boolean synchronizable setraises(<ref>WebAPIException</ref>);</webidl>
39516 An attribute to show whether this folder should be synchronized or not.
39520 This attribute affects the behavior of the MessageService.sync() method.
39527 <Type type="boolean"/>
39529 <RaiseException name="WebAPIException"/>
39534 <Module name="NetworkBearerSelection" id="::NetworkBearerSelection">
39535 <webidl>module NetworkBearerSelection {
39537 enum NetworkType { "CELLULAR", "UNKNOWN" };
39539 [NoInterfaceObject] interface NetworkBearerSelectionObject {
39540 readonly attribute <ref>NetworkBearerSelection</ref> networkbearerselection;
39542 <ref>Tizen</ref> implements <ref>NetworkBearerSelectionObject</ref>;
39544 [NoInterfaceObject] interface NetworkBearerSelection {
39546 void requestRouteToHost(<ref>NetworkType</ref> networkType,
39547 DOMString domainName,
39548 <ref>NetworkSuccessCallback</ref> successCallback,
39549 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
39551 void releaseRouteToHost(<ref>NetworkType</ref> networkType,
39552 DOMString domainName,
39553 <ref>SuccessCallback</ref> successCallback,
39554 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
39557 [Callback, NoInterfaceObject] interface NetworkSuccessCallback {
39560 void ondisconnected();
39565 This specification defines interfaces and methods providing Web applications to access the devices.
39569 This API provides interfaces and methods for users to set network bearer selection.
39575 <def-api-feature identifier="http://tizen.org/feature/network.telephony">
39580 To guarantee this application running on a device with telephony feature, define below in the config file:
39586 <Enum name="NetworkType" id="::NetworkBearerSelection::NetworkType">
39587 <webidl> enum NetworkType { "CELLULAR", "UNKNOWN" };</webidl>
39590 An enumerator that defines the type of a network.
39596 <EnumValue stringvalue="CELLULAR">
39597 <webidl> "CELLULAR</webidl>
39599 <EnumValue stringvalue="UNKNOWN">
39600 <webidl> "UNKNOWN</webidl>
39603 <Interface name="NetworkBearerSelectionObject" id="::NetworkBearerSelection::NetworkBearerSelectionObject">
39604 <webidl> [NoInterfaceObject] interface NetworkBearerSelectionObject {
39605 readonly attribute <ref>NetworkBearerSelection</ref> networkbearerselection;
39609 Defines what is instantiated the Tizen object from the Tizen Platform.
39613 There is a <em>tizen.networkbearerselection </em>object that allows accessing the functionality of the Networkbearerselection API.
39620 <ExtendedAttributeList>
39621 <ExtendedAttribute name="NoInterfaceObject">
39622 <webidl>NoInterfaceObject</webidl>
39623 </ExtendedAttribute>
39624 </ExtendedAttributeList>
39625 <Attribute readonly="readonly" name="networkbearerselection" id="::NetworkBearerSelection::NetworkBearerSelectionObject::networkbearerselection">
39626 <webidl> readonly attribute <ref>NetworkBearerSelection</ref> networkbearerselection;</webidl>
39627 <Type name="NetworkBearerSelection"/>
39630 <Implements name1="Tizen" name2="NetworkBearerSelectionObject">
39631 <webidl> <ref>Tizen</ref> implements <ref>NetworkBearerSelectionObject</ref>;</webidl>
39633 <Interface name="NetworkBearerSelection" id="::NetworkBearerSelection::NetworkBearerSelection">
39634 <webidl> [NoInterfaceObject] interface NetworkBearerSelection {
39636 void requestRouteToHost(<ref>NetworkType</ref> networkType,
39637 DOMString domainName,
39638 <ref>NetworkSuccessCallback</ref> successCallback,
39639 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
39641 void releaseRouteToHost(<ref>NetworkType</ref> networkType,
39642 DOMString domainName,
39643 <ref>SuccessCallback</ref> successCallback,
39644 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
39648 This entry interface provides methods to query the network bearer selection.
39652 This API offers methods for network bearer selection.
39659 <ExtendedAttributeList>
39660 <ExtendedAttribute name="NoInterfaceObject">
39661 <webidl>NoInterfaceObject</webidl>
39662 </ExtendedAttribute>
39663 </ExtendedAttributeList>
39664 <Operation name="requestRouteToHost" id="::NetworkBearerSelection::NetworkBearerSelection::requestRouteToHost">
39665 <webidl> void requestRouteToHost(<ref>NetworkType</ref> networkType,
39666 DOMString domainName,
39667 <ref>NetworkSuccessCallback</ref> successCallback,
39668 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
39671 Requests a specific network connection.
39675 The function must asynchronously acquire success or fail.
39678 When called, it starts a request process defined with these set of steps:
39682 1. Open "networkType" network connection. </li>
39684 2. Resolve "domainName" to IP. </li>
39686 3. Change the routing path bound to domainName's IP to use the specific network type. </li>
39688 4. If previous steps have been successfully accomplished, call onsuccess() callback function.<br/>If previous steps have failed, call ondisconnected() callback function.<br/>If network is disconnected, the routing path will be deleted and ondisconnected() is called. </li>
39694 <Code> var statuscb = {
39695 onsuccess: function() { console.log("onsuccess func is called"); },
39696 ondisconnected: function() { console.log("ondisconnected func is called"); }
39698 function ecb(e) { console.log("error callback is called : " + e.message + " : " + e.code); }
39699 tizen.networkbearerselection.requestRouteToHost("CELLULAR", "www.tizen.org", statuscb, ecb);
39706 http://tizen.org/privilege/networkbearerselection
39709 <Type type="void"/>
39711 <Argument name="networkType">
39717 <Type name="NetworkType"/>
39719 <Argument name="domainName">
39725 <Type type="DOMString"/>
39727 <Argument name="successCallback">
39730 To be invoked if data network connection is connected or not.
39733 <Type name="NetworkSuccessCallback"/>
39735 <Argument optional="optional" name="errorCallback">
39738 To be invoked if the request is failed.
39741 <Type name="ErrorCallback" nullable="nullable"/>
39745 <RaiseException name="WebAPIException">
39748 with error type NotSupportedError, if this feature is not supported.
39751 with error type SecurityError, if the application does not have the privilege to call this method.
39754 with error type UnknownError, if any other error occurs.
39760 <Operation name="releaseRouteToHost" id="::NetworkBearerSelection::NetworkBearerSelection::releaseRouteToHost">
39761 <webidl> void releaseRouteToHost(<ref>NetworkType</ref> networkType,
39762 DOMString domainName,
39763 <ref>SuccessCallback</ref> successCallback,
39764 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
39767 Releases a specific network connection.
39771 The function must asynchronously acquire success or fail.
39774 When called, it closes a network connection.
39780 <Code> function scb() { console.log("success callback is called"); }
39781 function ecb(e) { console.log("error callback is called : " + e.message + " : " + e.code); }
39783 onsuccess: function() {
39784 console.log("onsuccess func is called");
39785 tizen.networkbearerselection.releaseRouteToHost("CELLULAR", "www.google.com", scb, ecb);
39787 ondisconnected: function() { console.log("ondisconnected func is called"); }
39789 tizen.networkbearerselection.requestRouteToHost("CELLULAR", "www.google.com", statuscb, ecb);
39796 http://tizen.org/privilege/networkbearerselection
39799 <Type type="void"/>
39801 <Argument name="networkType">
39807 <Type name="NetworkType"/>
39809 <Argument name="domainName">
39815 <Type type="DOMString"/>
39817 <Argument name="successCallback">
39820 To be invoked if data network connection is released.
39823 <Type name="SuccessCallback"/>
39825 <Argument optional="optional" name="errorCallback">
39828 To be invoked if the release is failed.
39831 <Type name="ErrorCallback" nullable="nullable"/>
39835 <RaiseException name="WebAPIException">
39838 with error type NotSupportedError, if this feature is not supported.
39841 with error type SecurityError, if the application does not have the privilege to call this method.
39844 with error type UnknownError, if any other error occurs.
39851 <Interface name="NetworkSuccessCallback" id="::NetworkBearerSelection::NetworkSuccessCallback">
39852 <webidl> [Callback, NoInterfaceObject] interface NetworkSuccessCallback {
39855 void ondisconnected();
39859 This interface provides a success callback specific to NetworkBearerSelection.
39863 It is used in asynchronous operations with requestRouteToHost().
39870 <ExtendedAttributeList>
39871 <ExtendedAttribute name="Callback">
39872 <webidl>Callback</webidl>
39873 </ExtendedAttribute>
39874 <ExtendedAttribute name="NoInterfaceObject">
39875 <webidl> NoInterfaceObject</webidl>
39876 </ExtendedAttribute>
39877 </ExtendedAttributeList>
39878 <Operation name="onsuccess" id="::NetworkBearerSelection::NetworkSuccessCallback::onsuccess">
39879 <webidl> void onsuccess();</webidl>
39882 Called when a network is connected successfully.
39888 <Type type="void"/>
39891 <Operation name="ondisconnected" id="::NetworkBearerSelection::NetworkSuccessCallback::ondisconnected">
39892 <webidl> void ondisconnected();</webidl>
39895 Called when a network is disconnected.
39901 <Type type="void"/>
39906 <Module name="NFC" id="::NFC">
39907 <webidl>module NFC {
39908 enum NDEFRecordTextEncoding { "UTF8", "UTF16" };
39910 enum NFCTagType { "GENERIC_TARGET", "ISO14443_A", "ISO14443_4A", "ISO14443_3A",
39911 "MIFARE_MINI", "MIFARE_1K", "MIFARE_4K", "MIFARE_ULTRA", "MIFARE_DESFIRE",
39912 "ISO14443_B", "ISO14443_4B", "ISO14443_BPRIME", "FELICA", "JEWEL", "ISO15693",
39913 "UNKNOWN_TARGET" };
39915 [NoInterfaceObject] interface NFCManagerObject {
39916 readonly attribute <ref>NFCManager</ref> nfc;
39918 <ref>Tizen</ref> implements <ref>NFCManagerObject</ref>;
39920 [NoInterfaceObject] interface NFCManager {
39921 const short NFC_RECORD_TNF_EMPTY = 0;
39922 const short NFC_RECORD_TNF_WELL_KNOWN = 1;
39923 const short NFC_RECORD_TNF_MIME_MEDIA = 2;
39924 const short NFC_RECORD_TNF_URI = 3;
39925 const short NFC_RECORD_TNF_EXTERNAL_RTD = 4;
39926 const short NFC_RECORD_TNF_UNKNOWN = 5;
39927 const short NFC_RECORD_TNF_UNCHANGED = 6;
39929 <ref>NFCAdapter</ref> getDefaultAdapter() raises(<ref>WebAPIException</ref>);
39931 void setExclusiveMode(boolean mode) raises(<ref>WebAPIException</ref>);
39935 [NoInterfaceObject] interface NFCAdapter {
39936 readonly attribute boolean powered ;
39939 void setPowered(boolean state,
39940 optional <ref>SuccessCallback</ref>? successCallback,
39941 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
39944 void setTagListener(<ref>NFCTagDetectCallback</ref> detectCallback,
39945 optional <ref>NFCTagType</ref>[]? tagFilter) raises(<ref>WebAPIException</ref>);
39947 void setPeerListener(<ref>NFCPeerDetectCallback</ref> detectCallback) raises(<ref>WebAPIException</ref>);
39949 void unsetTagListener() raises(<ref>WebAPIException</ref>);
39951 void unsetPeerListener() raises(<ref>WebAPIException</ref>);
39953 <ref>NDEFMessage</ref>? getCachedMessage() raises(<ref>WebAPIException</ref>);
39958 [NoInterfaceObject] interface NFCTag {
39959 readonly attribute <ref>NFCTagType</ref> type;
39961 readonly attribute boolean isSupportedNDEF;
39963 readonly attribute long ndefSize;
39965 readonly attribute object properties;
39967 readonly attribute boolean isConnected;
39970 void readNDEF(<ref>NDEFMessageReadCallback</ref> readCallback,
39971 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
39973 void writeNDEF(<ref>NDEFMessage</ref> ndefMessage,
39974 optional <ref>SuccessCallback</ref>? successCallback,
39975 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
39977 void transceive(byte[] data,
39978 <ref>ByteArraySuccessCallback</ref> dataCallback,
39979 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
39983 [NoInterfaceObject] interface NFCPeer {
39984 readonly attribute boolean isConnected;
39986 void setReceiveNDEFListener(<ref>NDEFMessageReadCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);
39988 void unsetReceiveNDEFListener() raises(<ref>WebAPIException</ref>);
39990 void sendNDEF(<ref>NDEFMessage</ref> ndefMessage,
39991 optional <ref>SuccessCallback</ref>? successCallback,
39992 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
39997 Constructor(<ref>NDEFRecord</ref>[] ndefRecords),
39998 Constructor(byte[] rawData)]
39999 interface NDEFMessage {
40000 readonly attribute long recordCount;
40002 attribute <ref>NDEFRecord</ref>[] records;
40004 byte[] toByte() raises(<ref>WebAPIException</ref>);
40007 [Constructor(short tnf, byte[] type, byte[] payload, optional byte[]? id),
40008 Constructor(byte[] raw_data)]
40009 interface NDEFRecord {
40010 readonly attribute short tnf;
40012 readonly attribute byte[] type;
40014 readonly attribute byte[] id;
40016 readonly attribute byte[] payload;
40019 [Constructor(DOMString text, DOMString languageCode, optional DOMString? encoding)]
40020 interface NDEFRecordText : <ref>NDEFRecord</ref> {
40021 readonly attribute DOMString text;
40023 readonly attribute DOMString languageCode;
40025 readonly attribute <ref>NDEFRecordTextEncoding</ref> encoding;
40028 [Constructor(DOMString uri)]
40029 interface NDEFRecordURI : <ref>NDEFRecord</ref> {
40030 readonly attribute DOMString uri;
40032 [Constructor(DOMString mimeType, byte[] data)]
40033 interface NDEFRecordMedia : <ref>NDEFRecord</ref> {
40034 readonly attribute DOMString mimeType;
40038 [Callback, NoInterfaceObject] interface NFCTagDetectCallback {
40039 void onattach(<ref>NFCTag</ref> nfcTag);
40043 [Callback, NoInterfaceObject] interface NFCPeerDetectCallback {
40044 void onattach(<ref>NFCPeer</ref> nfcPeer);
40048 [Callback=FunctionOnly, NoInterfaceObject] interface NDEFMessageReadCallback {
40049 void onsuccess(<ref>NDEFMessage</ref> ndefMessage);
40052 [Callback=FunctionOnly, NoInterfaceObject] interface ByteArraySuccessCallback {
40053 void onsuccess(byte[] data);
40059 This interface specifies a protocol for simple wireless interconnection of
40060 closely coupled devices operating at 13.56 MHz using Near Field Communication (NFC),
40061 which is an international standard (ISO/IEC 18092).
40062 To know more, see <a href="http://www.nfc-forum.org/specs/spec_list/">Technical Specifications</a>.
40066 There are three groups of application scenarios for NFC:
40070 Exchanging some digital information or data by holding a device close to a wireless tag. </li>
40072 Exchanging some information or data between two devices by holding them close to each other. </li>
40074 Making payments by holding mobile phones close to point of sales terminals instead of swiping smart cards. </li>
40077 For more information on the NFC features, see <a href="../../org.tizen.web.appprogramming/html/guide/communication_guide/nfc.htm">NFC Guide</a>.
40083 <def-api-feature identifier="http://tizen.org/feature/network.nfc">
40087 To guarantee this application running on a device with NFC feature, define below in the config file:
40093 <Enum name="NDEFRecordTextEncoding" id="::NFC::NDEFRecordTextEncoding">
40094 <webidl> enum NDEFRecordTextEncoding { "UTF8", "UTF16" };</webidl>
40097 An enumerator that defines an encoding format for an NDEF record text.
40103 <EnumValue stringvalue="UTF8">
40104 <webidl> "UTF8</webidl>
40106 <EnumValue stringvalue="UTF16">
40107 <webidl> "UTF16</webidl>
40110 <Enum name="NFCTagType" id="::NFC::NFCTagType">
40111 <webidl> enum NFCTagType { "GENERIC_TARGET", "ISO14443_A", "ISO14443_4A", "ISO14443_3A",
40112 "MIFARE_MINI", "MIFARE_1K", "MIFARE_4K", "MIFARE_ULTRA", "MIFARE_DESFIRE",
40113 "ISO14443_B", "ISO14443_4B", "ISO14443_BPRIME", "FELICA", "JEWEL", "ISO15693",
40114 "UNKNOWN_TARGET" };</webidl>
40117 An enumerator that defines the type of NFC tag.
40121 The following values are supported:
40125 GENERIC_TARGET </li>
40141 MIFARE_DESFIRE </li>
40147 ISO14443_BPRIME </li>
40155 UNKNOWN_TARGET </li>
40162 <EnumValue stringvalue="GENERIC_TARGET">
40163 <webidl> "GENERIC_TARGET</webidl>
40165 <EnumValue stringvalue="ISO14443_A">
40166 <webidl> "ISO14443_A</webidl>
40168 <EnumValue stringvalue="ISO14443_4A">
40169 <webidl> "ISO14443_4A</webidl>
40171 <EnumValue stringvalue="ISO14443_3A">
40172 <webidl> "ISO14443_3A</webidl>
40174 <EnumValue stringvalue="MIFARE_MINI">
40175 <webidl> "MIFARE_MINI</webidl>
40177 <EnumValue stringvalue="MIFARE_1K">
40178 <webidl> "MIFARE_1K</webidl>
40180 <EnumValue stringvalue="MIFARE_4K">
40181 <webidl> "MIFARE_4K</webidl>
40183 <EnumValue stringvalue="MIFARE_ULTRA">
40184 <webidl> "MIFARE_ULTRA</webidl>
40186 <EnumValue stringvalue="MIFARE_DESFIRE">
40187 <webidl> "MIFARE_DESFIRE</webidl>
40189 <EnumValue stringvalue="ISO14443_B">
40190 <webidl> "ISO14443_B</webidl>
40192 <EnumValue stringvalue="ISO14443_4B">
40193 <webidl> "ISO14443_4B</webidl>
40195 <EnumValue stringvalue="ISO14443_BPRIME">
40196 <webidl> "ISO14443_BPRIME</webidl>
40198 <EnumValue stringvalue="FELICA">
40199 <webidl> "FELICA</webidl>
40201 <EnumValue stringvalue="JEWEL">
40202 <webidl> "JEWEL</webidl>
40204 <EnumValue stringvalue="ISO15693">
40205 <webidl> "ISO15693</webidl>
40207 <EnumValue stringvalue="UNKNOWN_TARGET">
40208 <webidl> "UNKNOWN_TARGET</webidl>
40211 <Interface name="NFCManagerObject" id="::NFC::NFCManagerObject">
40212 <webidl> [NoInterfaceObject] interface NFCManagerObject {
40213 readonly attribute <ref>NFCManager</ref> nfc;
40217 This interface defines what is instantiated by the <em>Tizen</em> object from the Tizen Platform.
40218 There will be a <em>tizen.nfc </em>object that allows access to the functionality of the NFC API.
40224 <ExtendedAttributeList>
40225 <ExtendedAttribute name="NoInterfaceObject">
40226 <webidl>NoInterfaceObject</webidl>
40227 </ExtendedAttribute>
40228 </ExtendedAttributeList>
40229 <Attribute readonly="readonly" name="nfc" id="::NFC::NFCManagerObject::nfc">
40230 <webidl> readonly attribute <ref>NFCManager</ref> nfc;</webidl>
40231 <Type name="NFCManager"/>
40234 <Implements name1="Tizen" name2="NFCManagerObject">
40235 <webidl> <ref>Tizen</ref> implements <ref>NFCManagerObject</ref>;</webidl>
40237 <Interface name="NFCManager" id="::NFC::NFCManager">
40238 <webidl> [NoInterfaceObject] interface NFCManager {
40239 const short NFC_RECORD_TNF_EMPTY = 0;
40240 const short NFC_RECORD_TNF_WELL_KNOWN = 1;
40241 const short NFC_RECORD_TNF_MIME_MEDIA = 2;
40242 const short NFC_RECORD_TNF_URI = 3;
40243 const short NFC_RECORD_TNF_EXTERNAL_RTD = 4;
40244 const short NFC_RECORD_TNF_UNKNOWN = 5;
40245 const short NFC_RECORD_TNF_UNCHANGED = 6;
40247 <ref>NFCAdapter</ref> getDefaultAdapter() raises(<ref>WebAPIException</ref>);
40249 void setExclusiveMode(boolean mode) raises(<ref>WebAPIException</ref>);
40253 Accesses to the NFC tag/target.
40257 It provides access to the API functionalities through the tizen.nfc interface.
40264 <ExtendedAttributeList>
40265 <ExtendedAttribute name="NoInterfaceObject">
40266 <webidl>NoInterfaceObject</webidl>
40267 </ExtendedAttribute>
40268 </ExtendedAttributeList>
40269 <Const name="NFC_RECORD_TNF_EMPTY" value="0" id="::NFC::NFCManager::NFC_RECORD_TNF_EMPTY">
40270 <webidl> const short NFC_RECORD_TNF_EMPTY = 0;</webidl>
40273 A constant to indicate empty format of NDEF record's type field.
40279 <Type type="short"/>
40281 <Const name="NFC_RECORD_TNF_WELL_KNOWN" value="1" id="::NFC::NFCManager::NFC_RECORD_TNF_WELL_KNOWN">
40282 <webidl> const short NFC_RECORD_TNF_WELL_KNOWN = 1;</webidl>
40285 A constant to indicate Record Type Definition (RTD) format of NDEF record's type field.
40291 <Type type="short"/>
40293 <Const name="NFC_RECORD_TNF_MIME_MEDIA" value="2" id="::NFC::NFCManager::NFC_RECORD_TNF_MIME_MEDIA">
40294 <webidl> const short NFC_RECORD_TNF_MIME_MEDIA = 2;</webidl>
40297 A constant to indicate MIME media types format in RFC 2046 [RFC 2046] of NDEF record's type field.
40303 <Type type="short"/>
40305 <Const name="NFC_RECORD_TNF_URI" value="3" id="::NFC::NFCManager::NFC_RECORD_TNF_URI">
40306 <webidl> const short NFC_RECORD_TNF_URI = 3;</webidl>
40309 A constant to indicate absolute URI, as defined in RFC 3986 [RFC 3986] format in RFC 2046 [RFC 2046] of NDEF record's type field.
40315 <Type type="short"/>
40317 <Const name="NFC_RECORD_TNF_EXTERNAL_RTD" value="4" id="::NFC::NFCManager::NFC_RECORD_TNF_EXTERNAL_RTD">
40318 <webidl> const short NFC_RECORD_TNF_EXTERNAL_RTD = 4;</webidl>
40321 A constant to indicate NFC forum external type [NFC RTD] format in RFC 2046 [RFC 2046] of NDEF record's type field.
40327 <Type type="short"/>
40329 <Const name="NFC_RECORD_TNF_UNKNOWN" value="5" id="::NFC::NFCManager::NFC_RECORD_TNF_UNKNOWN">
40330 <webidl> const short NFC_RECORD_TNF_UNKNOWN = 5;</webidl>
40333 A constant to indicate unknown type format in RFC 2046 [RFC 2046] of NDEF record's type field.
40339 <Type type="short"/>
40341 <Const name="NFC_RECORD_TNF_UNCHANGED" value="6" id="::NFC::NFCManager::NFC_RECORD_TNF_UNCHANGED">
40342 <webidl> const short NFC_RECORD_TNF_UNCHANGED = 6;</webidl>
40345 A constant to indicate whether the payload is an intermediate or final chunk of a chunked NDEF record.
40351 <Type type="short"/>
40353 <Operation name="getDefaultAdapter" id="::NFC::NFCManager::getDefaultAdapter">
40354 <webidl> <ref>NFCAdapter</ref> getDefaultAdapter() raises(<ref>WebAPIException</ref>);</webidl>
40357 Gets the default NFC adapter of the device.
40363 http://tizen.org/privilege/nfc.common
40369 var adapter = tizen.nfc.getDefaultAdapter() ;
40371 console.log (err.name +": " + err.message);
40375 <Type name="NFCAdapter">
40378 NFCAdapter The default NFCAdapter object.
40384 <RaiseException name="WebAPIException">
40387 with error type SecurityError, if the application does not have the privilege to call this method.
40390 with error type UnknownError in any other error case.
40396 <Operation name="setExclusiveMode" id="::NFC::NFCManager::setExclusiveMode">
40397 <webidl> void setExclusiveMode(boolean mode) raises(<ref>WebAPIException</ref>);</webidl>
40400 Gives priority to the current application for NFC operations over other applications when it is in the foreground.
40404 If the current application has the priority and is on the foreground, the system stops sending
40405 application control requests that are used to pick an application to handle a request about NFC.
40406 Such a request is usually sent, for example, when detecting an NFC tag or receiving an NDEF message
40407 from a connected NFC peer-to-peer target.
40410 When the current application moves to the background, it loses the priority.
40413 The exclusive mode can only be set when NFC is on. If NFC is off, the mode is ignored.
40420 http://tizen.org/privilege/nfc.common
40426 tizen.nfc.setExclusiveMode(true) ;
40428 console.log (err.name + ": " + err.message);
40432 <Type type="void"/>
40434 <Argument name="mode">
40437 The value of exclusive mode.
40440 <Type type="boolean"/>
40444 <RaiseException name="WebAPIException">
40447 with error type SecurityError, if the application does not have the privilege to call this method.
40450 with error type UnknownError in any other error case.
40457 <Interface name="NFCAdapter" id="::NFC::NFCAdapter">
40458 <webidl> [NoInterfaceObject] interface NFCAdapter {
40459 readonly attribute boolean powered ;
40462 void setPowered(boolean state,
40463 optional <ref>SuccessCallback</ref>? successCallback,
40464 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
40467 void setTagListener(<ref>NFCTagDetectCallback</ref> detectCallback,
40468 optional <ref>NFCTagType</ref>[]? tagFilter) raises(<ref>WebAPIException</ref>);
40470 void setPeerListener(<ref>NFCPeerDetectCallback</ref> detectCallback) raises(<ref>WebAPIException</ref>);
40472 void unsetTagListener() raises(<ref>WebAPIException</ref>);
40474 void unsetPeerListener() raises(<ref>WebAPIException</ref>);
40476 <ref>NDEFMessage</ref>? getCachedMessage() raises(<ref>WebAPIException</ref>);
40481 This interface provides access to control the adapter by offering methods to control local NFC behaviors, such as turning on/off an adapter.
40487 <ExtendedAttributeList>
40488 <ExtendedAttribute name="NoInterfaceObject">
40489 <webidl>NoInterfaceObject</webidl>
40490 </ExtendedAttribute>
40491 </ExtendedAttributeList>
40492 <Attribute readonly="readonly" name="powered" id="::NFC::NFCAdapter::powered">
40493 <webidl> readonly attribute boolean powered ;</webidl>
40496 The state of the NFC adapter.
40502 <Type type="boolean"/>
40504 <Operation name="setPowered" id="::NFC::NFCAdapter::setPowered">
40505 <webidl> void setPowered(boolean state,
40506 optional <ref>SuccessCallback</ref>? successCallback,
40507 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
40510 Sets the power of an NFC adapter to either a on state or a off state.
40514 The ErrorCallback is launched with these error types:
40518 ServiceNotAvailableError - If the NFC device is busy. </li>
40520 UnknownError - If any other error occurs. </li>
40527 http://tizen.org/privilege/nfc.admin
40532 <Code> var gNfcAdapter;
40533 var onPowerOn = function(){ // Called when NFC adapter is powered on
40535 console.log("Power on succeed");
40536 // Implement NFC communication routines ...
40537 gNfcAdapter.setPowered(
40538 false, // Disable NFC adapter
40539 function () {console.log("Power off succeed"); }, // Handle success
40540 function () {console.log("Power off failed"); }); // Handle failure
40542 console.log (err.name + ": " + err.message);
40546 gNfcAdapter = tizen.nfc.getDefaultAdapter();
40547 if (!gNfcAdapter.powered) {
40548 gNfcAdapter.setPowered(
40549 true, // Enable NFC adapter
40550 onPowerOn, // Handle succes
40551 function () {console.log("Power on failed")}); // Handle failure
40556 console.log (err.name + ": " + err.message);
40560 <Type type="void"/>
40562 <Argument name="state">
40565 The state of NFC adapter, <var>true</var> means on, <var>false</var> means off
40568 <Type type="boolean"/>
40570 <Argument optional="optional" name="successCallback">
40573 The method to call when NFC adapter is
40574 enabled or disabled successfully.
40577 <Type name="SuccessCallback" nullable="nullable"/>
40579 <Argument optional="optional" name="errorCallback">
40582 The method to call when an error occurs.
40585 <Type name="ErrorCallback" nullable="nullable"/>
40589 <RaiseException name="WebAPIException">
40592 with error type TypeMismatchError, if the input parameter
40593 is not compatible with the expected type for that parameter.
40596 with error type SecurityError, if this functionality is not allowed
40602 <Operation name="setTagListener" id="::NFC::NFCAdapter::setTagListener">
40603 <webidl> void setTagListener(<ref>NFCTagDetectCallback</ref> detectCallback,
40604 optional <ref>NFCTagType</ref>[]? tagFilter) raises(<ref>WebAPIException</ref>);</webidl>
40607 Registers a callback function to invoke when an NFC tag is detected.
40611 If the registration completes successfully, the detectCallback must be
40612 invoked when NFC tag is detected.
40615 If no tagFilter is passed, it shall consider the default tagFilter, that is to set all tag types.
40622 http://tizen.org/privilege/nfc.tag
40627 <Code> var adapter = tizen.nfc.getDefaultAdapter();
40628 var onSuccessCB = {onattach : function(nfcTag) {
40629 console.log("NFC Tag's type is " + nfcTag.type);
40630 }, ondetach : function() {
40631 console.log("NFC Tag is detached");
40633 adapter.setTagListener(onSuccessCB);
40636 <Type type="void"/>
40638 <Argument name="detectCallback">
40641 The method to invoke when a NFC tag is successfully detected.
40644 <Type name="NFCTagDetectCallback"/>
40646 <Argument optional="optional" name="tagFilter">
40649 A filter to be used when specific NFC tag is detected.
40652 <Type type="array" nullable="nullable">
40653 <Type name="NFCTagType"/>
40658 <RaiseException name="WebAPIException">
40661 with error type TypeMismatchError, if the input parameter
40662 is not compatible with the expected type for that parameter.
40665 with error type SecurityError, if the application does not have the privilege to call this method.
40668 with error type ServiceNotAvailableError, if the NFC service is not available.
40671 with error type UnknownError in any other error case.
40677 <Operation name="setPeerListener" id="::NFC::NFCAdapter::setPeerListener">
40678 <webidl> void setPeerListener(<ref>NFCPeerDetectCallback</ref> detectCallback) raises(<ref>WebAPIException</ref>);</webidl>
40681 Registers a callback function to be invoked when NFC peer-to-peer target is detected.
40685 If the registration completes successfully, the detectCallback must be
40686 invoked when NFC peer-to-peer target is detected.
40693 http://tizen.org/privilege/nfc.p2p
40698 <Code> var adapter = tizen.nfc.getDefaultAdapter();
40699 var onSuccessCB = {onattach : function(nfcPeer) {
40700 console.log("NFC Target is detected");
40701 }, ondetach : function() {
40702 console.log("NFC Target is detached");
40704 adapter.setPeerListener(onSuccessCB);
40707 <Type type="void"/>
40709 <Argument name="detectCallback">
40712 The method to invoke when a NFC peer-to-peer target is successfully detected.
40715 <Type name="NFCPeerDetectCallback"/>
40719 <RaiseException name="WebAPIException">
40722 with error type TypeMismatchError, if the input parameter
40723 is not compatible with the expected type for that parameter.
40726 with error type SecurityError, if the application does not have the privilege to call this method.
40729 with error type ServiceNotAvailableError, if the NFC service is not available.
40732 with error type UnknownError in any other error case.
40738 <Operation name="unsetTagListener" id="::NFC::NFCAdapter::unsetTagListener">
40739 <webidl> void unsetTagListener() raises(<ref>WebAPIException</ref>);</webidl>
40742 Unregisters the listener for detecting an NFC tag.
40748 http://tizen.org/privilege/nfc.tag
40753 <Code> var adapter = tizen.nfc.getDefaultAdapter();
40756 var onSuccessCB = {onattach : function(nfcTag) {
40757 console.log("NFC Tag's type is " + nfcTag.type);
40758 }, ondetach : function() {
40759 console.log("NFC Tag is detached");
40762 // Unregister the listener
40763 function unsetListen() {
40764 adapter.unsetTagListener();
40767 // Registers to be notified when NFC tag is detected.
40768 adapter.setTagListener(onSuccessCB)
40771 <Type type="void"/>
40774 <RaiseException name="WebAPIException">
40777 with error type SecurityError, if the application does not have the privilege to call this method.
40780 with error type ServiceNotAvailableError, if the NFC service is not available.
40783 with error type UnknownError in any other error case.
40789 <Operation name="unsetPeerListener" id="::NFC::NFCAdapter::unsetPeerListener">
40790 <webidl> void unsetPeerListener() raises(<ref>WebAPIException</ref>);</webidl>
40793 Unregisters the listener for detecting an NFC peer-to-peer target.
40799 http://tizen.org/privilege/nfc.p2p
40804 <Code> var adapter = tizen.nfc.getDefaultAdapter();
40806 // Receives an NFC peer.
40807 var onSuccessCB = {onattach : function(nfcPeer) {
40808 console.log("NFC Target is detected");
40809 }, ondetach : function() {
40810 console.log("NFC Target is detached");
40813 // Unregisters the listener.
40814 function unsetListen() {
40815 adapter.unsetPeerListener();
40818 // Registers to be notified when NFC peer-to-peer target is detected.
40819 adapter.setPeerListener(onSuccessCB)
40822 <Type type="void"/>
40825 <RaiseException name="WebAPIException">
40828 with error type SecurityError, if the application does not have the privilege to call this method.
40831 with error type ServiceNotAvailableError, if the NFC service is not available.
40834 with error type UnknownError in any other error case.
40840 <Operation name="getCachedMessage" id="::NFC::NFCAdapter::getCachedMessage">
40841 <webidl> <ref>NDEFMessage</ref>? getCachedMessage() raises(<ref>WebAPIException</ref>);</webidl>
40844 Gets the NDEF message cached when the tag is detected.
40848 If the operation completes successfully, the NDEF Message that was last read
40849 should be returned.
40856 http://tizen.org/privilege/nfc.common
40861 <Code> // Gets the cached message
40862 var cachedMessage = tizen.nfc.getDefaultAdapter().getCachedMessage();
40865 <Type name="NDEFMessage" nullable="nullable">
40868 The NDEF Message that was last read.
40874 <RaiseException name="WebAPIException">
40877 with error type SecurityError, if the application does not have the privilege to call this method.
40880 with error type UnknownError in any other error case.
40887 <Interface name="NFCTag" id="::NFC::NFCTag">
40888 <webidl> [NoInterfaceObject] interface NFCTag {
40889 readonly attribute <ref>NFCTagType</ref> type;
40891 readonly attribute boolean isSupportedNDEF;
40893 readonly attribute long ndefSize;
40895 readonly attribute object properties;
40897 readonly attribute boolean isConnected;
40900 void readNDEF(<ref>NDEFMessageReadCallback</ref> readCallback,
40901 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
40903 void writeNDEF(<ref>NDEFMessage</ref> ndefMessage,
40904 optional <ref>SuccessCallback</ref>? successCallback,
40905 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
40907 void transceive(byte[] data,
40908 <ref>ByteArraySuccessCallback</ref> dataCallback,
40909 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
40913 This interface provides accesses to the NFC tag.
40919 <ExtendedAttributeList>
40920 <ExtendedAttribute name="NoInterfaceObject">
40921 <webidl>NoInterfaceObject</webidl>
40922 </ExtendedAttribute>
40923 </ExtendedAttributeList>
40924 <Attribute readonly="readonly" name="type" id="::NFC::NFCTag::type">
40925 <webidl> readonly attribute <ref>NFCTagType</ref> type;</webidl>
40928 The type of the NFC tag.
40934 <Type name="NFCTagType"/>
40936 <Attribute readonly="readonly" name="isSupportedNDEF" id="::NFC::NFCTag::isSupportedNDEF">
40937 <webidl> readonly attribute boolean isSupportedNDEF;</webidl>
40940 An attribute to check if the NFC Tag supports NDEF format.
40946 <Type type="boolean"/>
40948 <Attribute readonly="readonly" name="ndefSize" id="::NFC::NFCTag::ndefSize">
40949 <webidl> readonly attribute long ndefSize;</webidl>
40952 The size of NDEF message stored in the tag.
40958 <Type type="long"/>
40960 <Attribute readonly="readonly" name="properties" id="::NFC::NFCTag::properties">
40961 <webidl> readonly attribute object properties;</webidl>
40964 The value is all tag information.
40968 It is pairs of key and value.
40969 The array's index is the pair's key and value is its value.
40972 <Code> var adapter = tizen.nfc.getDefaultAdapter();
40973 var onSuccessCB = {onattach : function(nfcTag) {
40974 console.log("NFC Tag's type is " + nfcTag.type);
40975 for(var i in nfcTag.properties) {
40976 console.log("key:" + i + " value:" + nfcTag.properties[i]);
40978 }, ondetach : function() {
40979 console.log("NFC Tag is detached");
40981 adapter.setTagListener(onSuccessCB);
40988 <Type type="object"/>
40990 <Attribute readonly="readonly" name="isConnected" id="::NFC::NFCTag::isConnected">
40991 <webidl> readonly attribute boolean isConnected;</webidl>
40994 The value is necessary to check if this tag is connected.
41000 <Type type="boolean"/>
41002 <Operation name="readNDEF" id="::NFC::NFCTag::readNDEF">
41003 <webidl> void readNDEF(<ref>NDEFMessageReadCallback</ref> readCallback,
41004 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
41007 Reads the NDEF data from the NFC tag.
41011 The ErrorCallback is launched with these error types:
41015 ServiceNotAvailableError - If the NFC service is not available. </li>
41017 UnknownError - If any other error occurs. </li>
41024 http://tizen.org/privilege/nfc.tag
41030 <Type type="void"/>
41032 <Argument name="readCallback">
41035 The method invoked in case of successfully reading the NDEF Data.
41038 <Type name="NDEFMessageReadCallback"/>
41040 <Argument optional="optional" name="errorCallback">
41043 The method invoked in case of any error during reading the NDEF Data.
41046 <Type name="ErrorCallback" nullable="nullable"/>
41050 <RaiseException name="WebAPIException">
41053 with error type TypeMismatchError, if the input parameter
41054 is not compatible with the expected type for that parameter.
41057 with error type SecurityError, if the application does not have the privilege to call this method.
41060 with error type NotSupportedError, if current Tag doesn't support NDEF format.
41066 <Operation name="writeNDEF" id="::NFC::NFCTag::writeNDEF">
41067 <webidl> void writeNDEF(<ref>NDEFMessage</ref> ndefMessage,
41068 optional <ref>SuccessCallback</ref>? successCallback,
41069 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
41072 Writes the NDEF data to the NFC tag.
41076 The ErrorCallback is launched with these error types:
41080 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
41082 ServiceNotAvailableError: If the NFC service is not available. </li>
41084 UnknownError: In any other error case. </li>
41091 http://tizen.org/privilege/nfc.tag
41097 <Type type="void"/>
41099 <Argument name="ndefMessage">
41102 The NDEF message to write to NFC tag.
41105 <Type name="NDEFMessage"/>
41107 <Argument optional="optional" name="successCallback">
41110 The method invoked in case of successfully writing the NDEF Data.
41113 <Type name="SuccessCallback" nullable="nullable"/>
41115 <Argument optional="optional" name="errorCallback">
41118 The method invoked in case of any error during writing the NDEF Data.
41121 <Type name="ErrorCallback" nullable="nullable"/>
41125 <RaiseException name="WebAPIException">
41128 with error type TypeMismatchError, if the input parameter
41129 is not compatible with the expected type for that parameter.
41132 with error type SecurityError, if the application does not have the privilege to call this method.
41135 with error type NotSupportedError, if current Tag doesn't support NDEF format.
41141 <Operation name="transceive" id="::NFC::NFCTag::transceive">
41142 <webidl> void transceive(byte[] data,
41143 <ref>ByteArraySuccessCallback</ref> dataCallback,
41144 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
41147 Access the raw format card. The transceive function is the only way to access the raw format card (not formatted).
41148 Each tag type requires its own command to access tags.
41149 This API provides low level access of tag operation. (Note that you must know each tag technology.)
41153 The ErrorCallback is launched with these error types:
41157 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
41159 ServiceNotAvailableError - If the NFC service is not available. </li>
41161 UnknownError - If any other error occurs. </li>
41168 http://tizen.org/privilege/nfc.tag
41174 <Type type="void"/>
41176 <Argument name="data">
41179 The raw data to transceive with the NFC tag.
41182 <Type type="array">
41183 <Type type="byte"/>
41186 <Argument name="dataCallback">
41189 Invoked in case of successfully transceiving the raw data.
41192 <Type name="ByteArraySuccessCallback"/>
41194 <Argument optional="optional" name="errorCallback">
41197 Invoked in case of any error during transceiving the NDEF Data.
41200 <Type name="ErrorCallback" nullable="nullable"/>
41204 <RaiseException name="WebAPIException">
41207 with error type TypeMismatchError, if the input parameter
41208 is not compatible with the expected type for that parameter.
41211 with error type SecurityError, if the application does not have the privilege to call this method.
41218 <Interface name="NFCPeer" id="::NFC::NFCPeer">
41219 <webidl> [NoInterfaceObject] interface NFCPeer {
41220 readonly attribute boolean isConnected;
41222 void setReceiveNDEFListener(<ref>NDEFMessageReadCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);
41224 void unsetReceiveNDEFListener() raises(<ref>WebAPIException</ref>);
41226 void sendNDEF(<ref>NDEFMessage</ref> ndefMessage,
41227 optional <ref>SuccessCallback</ref>? successCallback,
41228 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
41233 An interface that provides access to the NFC peer-to-peer target.
41239 <ExtendedAttributeList>
41240 <ExtendedAttribute name="NoInterfaceObject">
41241 <webidl>NoInterfaceObject</webidl>
41242 </ExtendedAttribute>
41243 </ExtendedAttributeList>
41244 <Attribute readonly="readonly" name="isConnected" id="::NFC::NFCPeer::isConnected">
41245 <webidl> readonly attribute boolean isConnected;</webidl>
41248 The value is necessary to check if this NFC peer-to-peer target is connected.
41254 <Type type="boolean"/>
41256 <Operation name="setReceiveNDEFListener" id="::NFC::NFCPeer::setReceiveNDEFListener">
41257 <webidl> void setReceiveNDEFListener(<ref>NDEFMessageReadCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);</webidl>
41260 Registers a callback function to be invoked when an NDEF message is received from the connected NFC peer-to-peer target.
41266 http://tizen.org/privilege/nfc.p2p
41271 <Code> var adapter = tizen.nfc.getDefaultAdapter();
41273 // Receives NFCPeer
41274 var onSuccessCB = {onattach : function(nfcPeer) {
41275 console.log("NFC Target is detected");
41276 nfcPeer.setReceiveNDEFListener(
41278 console.log("Receive message");
41280 }, ondetach : function() {
41281 console.log("NFC Target is detached");
41284 adapter.setPeerListener(onSuccessCB);
41287 <Type type="void"/>
41289 <Argument name="successCallback">
41292 Invoked in case of successful receiving the message.
41295 <Type name="NDEFMessageReadCallback"/>
41299 <RaiseException name="WebAPIException">
41302 with error type TypeMismatchError, if the input parameter
41303 is not compatible with the expected type for that parameter.
41306 with error type SecurityError, if the application does not have the privilege to call this method.
41309 with error type ServiceNotAvailableError, if the NFC service is not available.
41312 with error type UnknownError in any other error case.
41318 <Operation name="unsetReceiveNDEFListener" id="::NFC::NFCPeer::unsetReceiveNDEFListener">
41319 <webidl> void unsetReceiveNDEFListener() raises(<ref>WebAPIException</ref>);</webidl>
41322 Unregisters the listener for receiving NDEF messages from the NFC peer-to-peer target connected.
41328 http://tizen.org/privilege/nfc.p2p
41333 <Code> var adapter = tizen.nfc.getDefaultAdapter();
41334 var onSuccessCB = {onattach : function(nfcPeer) {
41335 console.log("NFC Target is detected");
41336 nfcPeer.setReceiveNDEFListener(
41338 console.log("Receive message");
41339 nfcPeer.unsetReceiveNDEFListener();
41341 }, ondetach : function() {
41342 console.log("NFC Target is detached");
41346 adapter.setPeerListener(onSuccessCB);
41349 <Type type="void"/>
41352 <RaiseException name="WebAPIException">
41355 with error type SecurityError, if the application does not have the privilege to call this method.
41358 with error type ServiceNotAvailableError, if the NFC service is not available.
41361 with error type UnknownError in any other error case.
41367 <Operation name="sendNDEF" id="::NFC::NFCPeer::sendNDEF">
41368 <webidl> void sendNDEF(<ref>NDEFMessage</ref> ndefMessage,
41369 optional <ref>SuccessCallback</ref>? successCallback,
41370 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
41373 Sends data to the NFC peer-to-peer target.
41377 The ErrorCallback is launched with these error types:
41381 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
41383 ServiceNotAvailableError: If the NFC service is not available. </li>
41385 UnknownError: In any other error case. </li>
41392 http://tizen.org/privilege/nfc.p2p
41398 <Type type="void"/>
41400 <Argument name="ndefMessage">
41403 The NDEF message to send to NFC peer-to-peer target.
41406 <Type name="NDEFMessage"/>
41408 <Argument optional="optional" name="successCallback">
41411 Invoked in case of successfully sending data to NFC peer-to-peer target.
41414 <Type name="SuccessCallback" nullable="nullable"/>
41416 <Argument optional="optional" name="errorCallback">
41419 Invoked in case of any error during sending.
41422 <Type name="ErrorCallback" nullable="nullable"/>
41426 <RaiseException name="WebAPIException">
41429 with error type TypeMismatchError, if the input parameter
41430 is not compatible with the expected type for that parameter.
41433 with error type SecurityError, if the application does not have the privilege to call this method.
41440 <Interface name="NDEFMessage" id="::NFC::NDEFMessage">
41441 <webidl> [Constructor(),
41442 Constructor(<ref>NDEFRecord</ref>[] ndefRecords),
41443 Constructor(byte[] rawData)]
41444 interface NDEFMessage {
41445 readonly attribute long recordCount;
41447 attribute <ref>NDEFRecord</ref>[] records;
41449 byte[] toByte() raises(<ref>WebAPIException</ref>);
41453 The NDEFMessage interface. An NDEFmessage is composed of multiple NDEFRecords.
41454 The NDEFMessage must have at least one NDEFRecord.
41460 <ExtendedAttributeList>
41461 <ExtendedAttribute name="Constructor">
41462 <webidl>Constructor()</webidl>
41464 </ExtendedAttribute>
41465 <ExtendedAttribute name="Constructor">
41466 <webidl> Constructor(<ref>NDEFRecord</ref>[] ndefRecords)</webidl>
41468 <Argument name="ndefRecords">
41469 <Type type="array">
41470 <Type name="NDEFRecord"/>
41474 </ExtendedAttribute>
41475 <ExtendedAttribute name="Constructor">
41476 <webidl> Constructor(byte[] rawData)</webidl>
41478 <Argument name="rawData">
41479 <Type type="array">
41480 <Type type="byte"/>
41484 </ExtendedAttribute>
41485 </ExtendedAttributeList>
41486 <Attribute readonly="readonly" name="recordCount" id="::NFC::NDEFMessage::recordCount">
41487 <webidl> readonly attribute long recordCount;</webidl>
41490 The number of records in the NDEFMessage.
41496 <Type type="long"/>
41498 <Attribute name="records" id="::NFC::NDEFMessage::records">
41499 <webidl> attribute <ref>NDEFRecord</ref>[] records;</webidl>
41502 The array of NDEFRecord objects in the NDEFMessage.
41508 <Type type="array">
41509 <Type name="NDEFRecord"/>
41512 <Operation name="toByte" id="::NFC::NDEFMessage::toByte">
41513 <webidl> byte[] toByte() raises(<ref>WebAPIException</ref>);</webidl>
41516 Gets the serial byte array of the NDEF message.
41520 If the operation completes successfully, it returns the serial byte array of the NDEF message.
41526 <Code> // Gets the cached message.
41527 var cachedMessage = tizen.nfc.getDefaultAdapter().getCachedMessage();
41528 var raw = cachedMessage.toByte();
41531 <Type type="array">
41534 byte[] The raw data in the NDEFMessage.
41537 <Type type="byte"/>
41541 <RaiseException name="WebAPIException">
41544 with error type TypeMismatchError, if the records whose type is not NDEFRecord are included in the NDEFMessage.
41547 with error type UnknownError in any other error case.
41554 <Interface name="NDEFRecord" id="::NFC::NDEFRecord">
41555 <webidl> [Constructor(short tnf, byte[] type, byte[] payload, optional byte[]? id),
41556 Constructor(byte[] raw_data)]
41557 interface NDEFRecord {
41558 readonly attribute short tnf;
41560 readonly attribute byte[] type;
41562 readonly attribute byte[] id;
41564 readonly attribute byte[] payload;
41568 The NDEFRecord interface.
41574 <ExtendedAttributeList>
41575 <ExtendedAttribute name="Constructor">
41576 <webidl>Constructor(short tnf, byte[] type, byte[] payload, optional byte[]? id)</webidl>
41578 <Argument name="tnf">
41579 <Type type="short"/>
41581 <Argument name="type">
41582 <Type type="array">
41583 <Type type="byte"/>
41586 <Argument name="payload">
41587 <Type type="array">
41588 <Type type="byte"/>
41591 <Argument optional="optional" name="id">
41592 <Type type="array" nullable="nullable">
41593 <Type type="byte"/>
41597 </ExtendedAttribute>
41598 <ExtendedAttribute name="Constructor">
41599 <webidl> Constructor(byte[] raw_data)</webidl>
41601 <Argument name="raw_data">
41602 <Type type="array">
41603 <Type type="byte"/>
41607 </ExtendedAttribute>
41608 </ExtendedAttributeList>
41609 <Attribute readonly="readonly" name="tnf" id="::NFC::NDEFRecord::tnf">
41610 <webidl> readonly attribute short tnf;</webidl>
41613 The value of the record type (TNF value).
41617 At least the following values must be supported:
41621 NFC_RECORD_TNF_EMPTY - The record type is empty </li>
41623 NFC_RECORD_TNF_WELL_KNOWN - Record Type Definition (RTD) format [NFC RTD] </li>
41625 NFC_RECORD_TNF_MIME_MEDIA - MIME media types in RFC 2046 [RFC 2046] </li>
41627 NFC_RECORD_TNF_URI - Absolute URI as defined in RFC 3986 [RFC 3986] </li>
41629 NFC_RECORD_TNF_EXTERNAL_RTD - NFC forum external type [NFC RTD] </li>
41631 NFC_RECORD_TNF_UNKNOWN - The payload type is unknown </li>
41633 NFC_RECORD_TNF_UNCHANGED - It means the payload is an intermediate or final chunk of a chunked NDEF record </li>
41640 <Type type="short"/>
41642 <Attribute readonly="readonly" name="type" id="::NFC::NDEFRecord::type">
41643 <webidl> readonly attribute byte[] type;</webidl>
41646 The specified type in byte array.
41650 The byte array contains <var>0</var> to <var>255</var> bytes.
41657 <Type type="array">
41658 <Type type="byte"/>
41661 <Attribute readonly="readonly" name="id" id="::NFC::NDEFRecord::id">
41662 <webidl> readonly attribute byte[] id;</webidl>
41669 The byte array contains <var>0</var> to <var>255</var> bytes.
41672 By default, this attribute is set to an empty array.
41679 <Type type="array">
41680 <Type type="byte"/>
41683 <Attribute readonly="readonly" name="payload" id="::NFC::NDEFRecord::payload">
41684 <webidl> readonly attribute byte[] payload;</webidl>
41687 The record payload.
41691 The byte array contains <var>0</var> to <var>(2 ** 32 - 1)</var> bytes.
41697 <Code> // Creates a new NDEF record.
41698 var newRecord = new tizen.NDEFRecordURI("https://www.tizen.org/");
41699 var payload = newRecord.payload;
41702 <Type type="array">
41703 <Type type="byte"/>
41707 <Interface name="NDEFRecordText" id="::NFC::NDEFRecordText">
41708 <webidl> [Constructor(DOMString text, DOMString languageCode, optional DOMString? encoding)]
41709 interface NDEFRecordText : <ref>NDEFRecord</ref> {
41710 readonly attribute DOMString text;
41712 readonly attribute DOMString languageCode;
41714 readonly attribute <ref>NDEFRecordTextEncoding</ref> encoding;
41718 The NDEFRecord that has the text type payload.
41724 <ExtendedAttributeList>
41725 <ExtendedAttribute name="Constructor">
41726 <webidl>Constructor(DOMString text, DOMString languageCode, optional DOMString? encoding)</webidl>
41728 <Argument name="text">
41729 <Type type="DOMString"/>
41731 <Argument name="languageCode">
41732 <Type type="DOMString"/>
41734 <Argument optional="optional" name="encoding">
41735 <Type type="DOMString" nullable="nullable"/>
41738 </ExtendedAttribute>
41739 </ExtendedAttributeList>
41740 <InterfaceInheritance>
41741 <Name name="NDEFRecord"/>
41742 </InterfaceInheritance>
41743 <Attribute readonly="readonly" name="text" id="::NFC::NDEFRecordText::text">
41744 <webidl> readonly attribute DOMString text;</webidl>
41753 <Type type="DOMString"/>
41755 <Attribute readonly="readonly" name="languageCode" id="::NFC::NDEFRecordText::languageCode">
41756 <webidl> readonly attribute DOMString languageCode;</webidl>
41759 The language code string value, followed by IANA[RFC 3066] (for example, en-US, ko-KR).
41765 <Type type="DOMString"/>
41767 <Attribute readonly="readonly" name="encoding" id="::NFC::NDEFRecordText::encoding">
41768 <webidl> readonly attribute <ref>NDEFRecordTextEncoding</ref> encoding;</webidl>
41771 The encoding type. By default, this attribute is set to UTF8.
41777 <Type name="NDEFRecordTextEncoding"/>
41780 <Interface name="NDEFRecordURI" id="::NFC::NDEFRecordURI">
41781 <webidl> [Constructor(DOMString uri)]
41782 interface NDEFRecordURI : <ref>NDEFRecord</ref> {
41783 readonly attribute DOMString uri;
41787 The NDEFRecord that has URI type payload.
41793 <ExtendedAttributeList>
41794 <ExtendedAttribute name="Constructor">
41795 <webidl>Constructor(DOMString uri)</webidl>
41797 <Argument name="uri">
41798 <Type type="DOMString"/>
41801 </ExtendedAttribute>
41802 </ExtendedAttributeList>
41803 <InterfaceInheritance>
41804 <Name name="NDEFRecord"/>
41805 </InterfaceInheritance>
41806 <Attribute readonly="readonly" name="uri" id="::NFC::NDEFRecordURI::uri">
41807 <webidl> readonly attribute DOMString uri;</webidl>
41810 The URI string that is stored in the payload.
41816 <Type type="DOMString"/>
41819 <Interface name="NDEFRecordMedia" id="::NFC::NDEFRecordMedia">
41820 <webidl> [Constructor(DOMString mimeType, byte[] data)]
41821 interface NDEFRecordMedia : <ref>NDEFRecord</ref> {
41822 readonly attribute DOMString mimeType;
41826 The NDEFRecord that has mime type payload.
41832 <ExtendedAttributeList>
41833 <ExtendedAttribute name="Constructor">
41834 <webidl>Constructor(DOMString mimeType, byte[] data)</webidl>
41839 <b>data</b> : Mime type payload. The byte array contains <var>0</var> to <var>(2 ** 32 - 1)</var> bytes. </li>
41844 <Argument name="mimeType">
41845 <Type type="DOMString"/>
41847 <Argument name="data">
41848 <Type type="array">
41849 <Type type="byte"/>
41853 </ExtendedAttribute>
41854 </ExtendedAttributeList>
41855 <InterfaceInheritance>
41856 <Name name="NDEFRecord"/>
41857 </InterfaceInheritance>
41858 <Attribute readonly="readonly" name="mimeType" id="::NFC::NDEFRecordMedia::mimeType">
41859 <webidl> readonly attribute DOMString mimeType;</webidl>
41862 The mime type [RFC 2046] (for example, text/plain, image/jpeg ).
41868 <Type type="DOMString"/>
41871 <Interface name="NFCTagDetectCallback" id="::NFC::NFCTagDetectCallback">
41872 <webidl> [Callback, NoInterfaceObject] interface NFCTagDetectCallback {
41873 void onattach(<ref>NFCTag</ref> nfcTag);
41878 The success callback to be invoked when an NFC tag is detected or lost.
41882 This callback interface specifies two methods:
41886 onattach: invoked when an NFC tag is detected </li>
41888 ondetach: invoked when the NFC tag is lost </li>
41891 It is used in NFCAdapter.setTagListener().
41898 <ExtendedAttributeList>
41899 <ExtendedAttribute name="Callback">
41900 <webidl>Callback</webidl>
41901 </ExtendedAttribute>
41902 <ExtendedAttribute name="NoInterfaceObject">
41903 <webidl> NoInterfaceObject</webidl>
41904 </ExtendedAttribute>
41905 </ExtendedAttributeList>
41906 <Operation name="onattach" id="::NFC::NFCTagDetectCallback::onattach">
41907 <webidl> void onattach(<ref>NFCTag</ref> nfcTag);</webidl>
41910 The method invoked when a tag is attached.
41916 <Type type="void"/>
41918 <Argument name="nfcTag">
41921 The attached NFC tag.
41924 <Type name="NFCTag"/>
41928 <Operation name="ondetach" id="::NFC::NFCTagDetectCallback::ondetach">
41929 <webidl> void ondetach();</webidl>
41932 The method invoked when the connected tag is detached.
41938 <Type type="void"/>
41942 <Interface name="NFCPeerDetectCallback" id="::NFC::NFCPeerDetectCallback">
41943 <webidl> [Callback, NoInterfaceObject] interface NFCPeerDetectCallback {
41944 void onattach(<ref>NFCPeer</ref> nfcPeer);
41949 The success callback to be invoked when an NFC peer-to-peer target is detected or lost.
41953 This callback interface specifies two methods:
41957 onattach: invoked when an NFC peer-to-peer target is detected </li>
41959 ondetach: invoked when the NFC peer-to-peer target is lost </li>
41962 It is used in NFCAdapter.setPeerListener().
41969 <ExtendedAttributeList>
41970 <ExtendedAttribute name="Callback">
41971 <webidl>Callback</webidl>
41972 </ExtendedAttribute>
41973 <ExtendedAttribute name="NoInterfaceObject">
41974 <webidl> NoInterfaceObject</webidl>
41975 </ExtendedAttribute>
41976 </ExtendedAttributeList>
41977 <Operation name="onattach" id="::NFC::NFCPeerDetectCallback::onattach">
41978 <webidl> void onattach(<ref>NFCPeer</ref> nfcPeer);</webidl>
41981 The method invoked when the NFC peer-to-peer target is attached.
41987 <Type type="void"/>
41989 <Argument name="nfcPeer">
41992 The attached NFC peer-to-peer target.
41995 <Type name="NFCPeer"/>
41999 <Operation name="ondetach" id="::NFC::NFCPeerDetectCallback::ondetach">
42000 <webidl> void ondetach();</webidl>
42003 The method invoked when the NFC peer-to-peer target connected is detached.
42009 <Type type="void"/>
42013 <Interface name="NDEFMessageReadCallback" id="::NFC::NDEFMessageReadCallback">
42014 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface NDEFMessageReadCallback {
42015 void onsuccess(<ref>NDEFMessage</ref> ndefMessage);
42019 The success callback to be invoked when data has been read successfully from the NFC tag or target.
42023 This callback interface specifies a success method with
42024 an NDEF message as an input parameter.
42025 It is used in asynchronous
42026 operations, such as NFCTag.readNDEF() or NFCPeer.setReceiveNDEFListener().
42033 <ExtendedAttributeList>
42034 <ExtendedAttribute name="Callback" value="FunctionOnly">
42035 <webidl>Callback</webidl>
42036 </ExtendedAttribute>
42037 <ExtendedAttribute name="NoInterfaceObject">
42038 <webidl> NoInterfaceObject</webidl>
42039 </ExtendedAttribute>
42040 </ExtendedAttributeList>
42041 <Operation name="onsuccess" id="::NFC::NDEFMessageReadCallback::onsuccess">
42042 <webidl> void onsuccess(<ref>NDEFMessage</ref> ndefMessage);</webidl>
42045 The method invoked when the asynchronous call completes successfully.
42051 <Type type="void"/>
42053 <Argument name="ndefMessage">
42056 NDEF message that is read from the NFC tag or target.
42059 <Type name="NDEFMessage"/>
42064 <Interface name="ByteArraySuccessCallback" id="::NFC::ByteArraySuccessCallback">
42065 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ByteArraySuccessCallback {
42066 void onsuccess(byte[] data);
42070 The success callback to be invoked when NFCTag.transceive() completes successfully.
42074 This callback interface specifies a success method, with
42075 a raw data as an input parameter. It is used in NFCTag.transceive().
42082 <ExtendedAttributeList>
42083 <ExtendedAttribute name="Callback" value="FunctionOnly">
42084 <webidl>Callback</webidl>
42085 </ExtendedAttribute>
42086 <ExtendedAttribute name="NoInterfaceObject">
42087 <webidl> NoInterfaceObject</webidl>
42088 </ExtendedAttribute>
42089 </ExtendedAttributeList>
42090 <Operation name="onsuccess" id="::NFC::ByteArraySuccessCallback::onsuccess">
42091 <webidl> void onsuccess(byte[] data);</webidl>
42094 The method invoked when the asynchronous call completes successfully.
42100 <Type type="void"/>
42102 <Argument name="data">
42105 The raw data that is read from NFC tag or response of transceive operation.
42108 <Type type="array">
42109 <Type type="byte"/>
42116 <Module name="Notification" id="::Notification">
42117 <webidl>module Notification {
42119 typedef DOMString NotificationId;
42121 enum NotificationType { "STATUS" };
42123 enum StatusNotificationType { "SIMPLE", "THUMBNAIL", "ONGOING", "PROGRESS" };
42125 enum NotificationProgressType { "PERCENTAGE", "BYTE" };
42128 [NoInterfaceObject] interface NotificationObject {
42129 readonly attribute <ref>NotificationManager</ref> notification;
42131 <ref>Tizen</ref> implements <ref>NotificationObject</ref>;
42133 [NoInterfaceObject] interface NotificationManager {
42135 void post(<ref>Notification</ref> notification) raises(<ref>WebAPIException</ref>);
42137 void update(<ref>Notification</ref> notification) raises(<ref>WebAPIException</ref>);
42139 void remove(<ref>NotificationId</ref> id) raises(<ref>WebAPIException</ref>);
42141 void removeAll() raises(<ref>WebAPIException</ref>);
42143 <ref>Notification</ref> get(<ref>NotificationId</ref> id) raises(<ref>WebAPIException</ref>);
42145 <ref>Notification</ref>[] getAll() raises(<ref>WebAPIException</ref>);
42150 [NoInterfaceObject] interface Notification {
42153 readonly attribute <ref>NotificationId</ref> id;
42155 readonly attribute <ref>NotificationType</ref> type;
42157 readonly attribute Date postedTime;
42159 attribute DOMString title;
42161 attribute DOMString? content;
42166 dictionary StatusNotificationInit {
42167 DOMString? content;
42168 DOMString? iconPath;
42169 DOMString? soundPath;
42170 boolean? vibration;
42171 <ref>ApplicationControl</ref>? appControl;
42172 <ref>ApplicationId</ref>? appId;
42173 <ref>NotificationProgressType</ref>? progressType;
42174 unsigned long? progressValue;
42176 DOMString? subIconPath;
42177 <ref>NotificationDetailInfo</ref>[]? detailInfo;
42178 DOMString? ledColor;
42179 unsigned long ledOnPeriod;
42180 unsigned long ledOffPeriod;
42181 DOMString? backgroundImagePath;
42182 DOMString[]? thumbnails;
42185 [Constructor(<ref>StatusNotificationType</ref> statusType, DOMString title, optional <ref>StatusNotificationInit</ref>? notificationInitDict)]
42188 interface StatusNotification : <ref>Notification</ref> {
42190 readonly attribute <ref>StatusNotificationType</ref> statusType;
42192 attribute DOMString? iconPath;
42194 attribute DOMString? subIconPath;
42196 attribute long? number;
42198 attribute <ref>NotificationDetailInfo</ref>[]? detailInfo;
42200 attribute DOMString? ledColor;
42202 attribute unsigned long ledOnPeriod;
42204 attribute unsigned long ledOffPeriod;
42206 attribute DOMString? backgroundImagePath;
42208 attribute DOMString[]? thumbnails;
42210 attribute DOMString? soundPath;
42212 attribute boolean vibration;
42214 attribute <ref>ApplicationControl</ref>? appControl;
42216 attribute <ref>ApplicationId</ref>? appId;
42218 attribute <ref>NotificationProgressType</ref> progressType;
42220 attribute unsigned long? progressValue;
42224 [Constructor(DOMString mainText, optional DOMString? subText)]
42225 interface NotificationDetailInfo {
42226 attribute DOMString mainText;
42228 attribute DOMString? subText;
42234 The Notification API provides a way to notify users of events that happen in an application.
42238 For more information on the Notification features, see <a href="../../org.tizen.web.appprogramming/html/guide/ui_guide/notification.htm">Notification Guide</a>.
42245 <Typedef name="NotificationId" id="::Notification::NotificationId">
42246 <webidl> typedef DOMString NotificationId;</webidl>
42255 <Type type="DOMString"/>
42257 <Enum name="NotificationType" id="::Notification::NotificationType">
42258 <webidl> enum NotificationType { "STATUS" };</webidl>
42261 A notification type.
42265 The following notification type is supported:
42269 STATUS - The posted status notification is displayed in status bar and the notification tray.
42270 The status notification consists of icon, title, content, and time. The status notification can have application control to launch the specific application when selected by the user. </li>
42277 <EnumValue stringvalue="STATUS">
42278 <webidl> "STATUS</webidl>
42281 <Enum name="StatusNotificationType" id="::Notification::StatusNotificationType">
42282 <webidl> enum StatusNotificationType { "SIMPLE", "THUMBNAIL", "ONGOING", "PROGRESS" };</webidl>
42285 A status notification type.
42289 The following status notification types are supported:
42293 SIMPLE - A basic status notification type that is removed automatically when selected by the user. All simple status notifications can be removed by user interaction. </li>
42295 THUMBNAIL - The thumbnail status notification posts a thumbnail-format notification which includes several thumbnail image paths.
42296 The thumbnail status notification is also removed by a user selection.
42299 ONGOING - A status notification type that informs the user about an application is running or not. However, an ongoing status notification should be removed by the application that posted the notification. </li>
42301 PROGRESS - A status notification that displays the information on the progress of a job. However, this status notification should be removed by the application that posted the notification. </li>
42308 <EnumValue stringvalue="SIMPLE">
42309 <webidl> "SIMPLE</webidl>
42311 <EnumValue stringvalue="THUMBNAIL">
42312 <webidl> "THUMBNAIL</webidl>
42314 <EnumValue stringvalue="ONGOING">
42315 <webidl> "ONGOING</webidl>
42317 <EnumValue stringvalue="PROGRESS">
42318 <webidl> "PROGRESS</webidl>
42321 <Enum name="NotificationProgressType" id="::Notification::NotificationProgressType">
42322 <webidl> enum NotificationProgressType { "PERCENTAGE", "BYTE" };</webidl>
42325 A notification progress type.
42329 Supporting notification progress types are:
42333 "BYTE" - The progress is indicated in bytes. </li>
42335 "PERCENTAGE" -The progress is indicated in percentage. </li>
42342 <EnumValue stringvalue="PERCENTAGE">
42343 <webidl> "PERCENTAGE</webidl>
42345 <EnumValue stringvalue="BYTE">
42346 <webidl> "BYTE</webidl>
42349 <Interface name="NotificationObject" id="::Notification::NotificationObject">
42350 <webidl> [NoInterfaceObject] interface NotificationObject {
42351 readonly attribute <ref>NotificationManager</ref> notification;
42355 Defines what is instantiated by the <em>Tizen</em> object.
42359 There is a <em>tizen.notification</em> object that allows access to the
42367 <ExtendedAttributeList>
42368 <ExtendedAttribute name="NoInterfaceObject">
42369 <webidl>NoInterfaceObject</webidl>
42370 </ExtendedAttribute>
42371 </ExtendedAttributeList>
42372 <Attribute readonly="readonly" name="notification" id="::Notification::NotificationObject::notification">
42373 <webidl> readonly attribute <ref>NotificationManager</ref> notification;</webidl>
42374 <Type name="NotificationManager"/>
42377 <Implements name1="Tizen" name2="NotificationObject">
42378 <webidl> <ref>Tizen</ref> implements <ref>NotificationObject</ref>;</webidl>
42380 <Interface name="NotificationManager" id="::Notification::NotificationManager">
42381 <webidl> [NoInterfaceObject] interface NotificationManager {
42383 void post(<ref>Notification</ref> notification) raises(<ref>WebAPIException</ref>);
42385 void update(<ref>Notification</ref> notification) raises(<ref>WebAPIException</ref>);
42387 void remove(<ref>NotificationId</ref> id) raises(<ref>WebAPIException</ref>);
42389 void removeAll() raises(<ref>WebAPIException</ref>);
42391 <ref>Notification</ref> get(<ref>NotificationId</ref> id) raises(<ref>WebAPIException</ref>);
42393 <ref>Notification</ref>[] getAll() raises(<ref>WebAPIException</ref>);
42398 Notification manager interface that provides access to the API.
42402 This interface provides access to the notification object.
42409 <ExtendedAttributeList>
42410 <ExtendedAttribute name="NoInterfaceObject">
42411 <webidl>NoInterfaceObject</webidl>
42412 </ExtendedAttribute>
42413 </ExtendedAttributeList>
42414 <Operation name="post" id="::Notification::NotificationManager::post">
42415 <webidl> void post(<ref>Notification</ref> notification) raises(<ref>WebAPIException</ref>);</webidl>
42418 Posts a notification to display.
42427 http://tizen.org/privilege/notification
42430 var appControl = new tizen.ApplicationControl(
42431 "http://tizen.org/appcontrol/operation/create_content",
42433 "image/jpg",
42435 var notificationDict = {
42436 content : "This is a simple notification.",
42437 iconPath : "images/image1.jpg",
42438 soundPath : "music/Over the horizon.mp3",
42440 appControl : appControl};
42442 var notification = new tizen.StatusNotification("SIMPLE",
42443 "Simple notification", notificationDict);
42445 tizen.notification.post(notification);
42447 console.log (err.name + ": " + err.message);
42451 <Type type="void"/>
42453 <Argument name="notification">
42456 A notification to post.
42459 <Type name="Notification"/>
42463 <RaiseException name="WebAPIException">
42466 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
42469 with error type InvalidValuesError, if any of the input
42470 parameters contain an invalid value.
42473 with error type SecurityError, if the application does not have the privilege to call this method.
42476 with error type UnknownError if any other error occurs.
42482 <Operation name="update" id="::Notification::NotificationManager::update">
42483 <webidl> void update(<ref>Notification</ref> notification) raises(<ref>WebAPIException</ref>);</webidl>
42486 Updates a previously posted notification.
42495 http://tizen.org/privilege/notification
42498 // Uses a variable for the previously posted notification.
42499 notification.content = "My notification";
42500 tizen.notification.update(notification);
42502 console.log (err.name + ": " + err.message);
42507 <Type type="void"/>
42509 <Argument name="notification">
42512 A notification to update.
42515 <Type name="Notification"/>
42519 <RaiseException name="WebAPIException">
42522 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
42525 with error type InvalidValuesError, if any of the input
42526 parameters contain an invalid value.
42529 with error type SecurityError, if the application does not have the privilege to call this method.
42532 with error type UnknownError if any other error occurs.
42538 <Operation name="remove" id="::Notification::NotificationManager::remove">
42539 <webidl> void remove(<ref>NotificationId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
42542 Removes a previously posted notification.
42551 http://tizen.org/privilege/notification
42554 // Uses a variable for the previously posted notification.
42555 tizen.notification.remove(notification.id);
42557 console.log (err.name + ": " + err.message);
42562 <Type type="void"/>
42564 <Argument name="id">
42567 A previously posted notification ID to remove.
42570 <Type name="NotificationId"/>
42574 <RaiseException name="WebAPIException">
42577 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
42580 with error type NotFoundError, if NotificationId is not found in the previously posted notifications.
42583 with error type SecurityError, if the application does not have the privilege to call this method.
42586 with error type UnknownError if any other error occurs.
42592 <Operation name="removeAll" id="::Notification::NotificationManager::removeAll">
42593 <webidl> void removeAll() raises(<ref>WebAPIException</ref>);</webidl>
42596 Removes all notifications that have been posted by the current application.
42605 http://tizen.org/privilege/notification
42608 tizen.notification.removeAll();
42610 console.log (err.name + ": " + err.message);
42615 <Type type="void"/>
42618 <RaiseException name="WebAPIException">
42621 with error type SecurityError, if the application does not have the privilege to call this method.
42624 with error type UnknownError if any other error occurs.
42630 <Operation name="get" id="::Notification::NotificationManager::get">
42631 <webidl> <ref>Notification</ref> get(<ref>NotificationId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
42634 Gets a notification that has previously been posted by the current application. Note that the obtaining notification's progressType is <em>PERCENTAGE</em> </brief>
42639 // Uses a variable for the previously posted notification
42640 // Saves notification ID for future use
42641 var myId = notification.id;
42643 var myNotification = tizen.notification.get(myId);
42645 console.log (err.name + ": " + err.message);
42650 <Type name="Notification"/>
42652 <Argument name="id">
42655 A previously posted notification ID.
42658 <Type name="NotificationId"/>
42662 <RaiseException name="WebAPIException">
42665 with error type NotFoundError, if NotificationId is not found in the previously posted notifications.
42668 with error type UnknownError if any other error occurs.
42674 <Operation name="getAll" id="::Notification::NotificationManager::getAll">
42675 <webidl> <ref>Notification</ref>[] getAll() raises(<ref>WebAPIException</ref>);</webidl>
42678 Gets all notifications that have previously been posted by the current application. Note that the obtaining notification's progressType is <em>PERCENTAGE</em> </brief>
42683 var notifications = tizen.notification.getAll();
42686 for ( index = 0; notifications.length > index; index++ )
42688 console.log(notifications[index].id);
42689 console.log(notifications[index].title);
42690 console.log(notifications[index].statusType);
42691 console.log(notifications[index].type);
42692 console.log(notifications[index].content);
42693 console.log(notifications[index].postedTime);
42694 console.log(notifications[index].iconPath);
42695 console.log(notifications[index].soundPath);
42696 console.log(notifications[index].vibration);
42697 console.log(notifications[index].appControl);
42700 console.log (err.name + ": " + err.message);
42704 <Type type="array">
42705 <Type name="Notification"/>
42709 <RaiseException name="WebAPIException">
42712 with error type UnknownError, if any other error occurs.
42719 <Interface name="Notification" id="::Notification::Notification">
42720 <webidl> [NoInterfaceObject] interface Notification {
42723 readonly attribute <ref>NotificationId</ref> id;
42725 readonly attribute <ref>NotificationType</ref> type;
42727 readonly attribute Date postedTime;
42729 attribute DOMString title;
42731 attribute DOMString? content;
42736 This interface offers common attributes to represent <em>Notification</em> object.
42742 <ExtendedAttributeList>
42743 <ExtendedAttribute name="NoInterfaceObject">
42744 <webidl>NoInterfaceObject</webidl>
42745 </ExtendedAttribute>
42746 </ExtendedAttributeList>
42747 <Attribute readonly="readonly" name="id" id="::Notification::Notification::id">
42748 <webidl> readonly attribute <ref>NotificationId</ref> id;</webidl>
42751 The Notification identifier. Before the notification is posted, this value is undefined.
42757 <Type name="NotificationId"/>
42759 <Attribute readonly="readonly" name="type" id="::Notification::Notification::type">
42760 <webidl> readonly attribute <ref>NotificationType</ref> type;</webidl>
42763 The Notification type.
42769 <Type name="NotificationType"/>
42771 <Attribute readonly="readonly" name="postedTime" id="::Notification::Notification::postedTime">
42772 <webidl> readonly attribute Date postedTime;</webidl>
42775 The time that the notification is posted. Before the notification is posted, this value is undefined.
42781 <Type type="Date"/>
42783 <Attribute name="title" id="::Notification::Notification::title">
42784 <webidl> attribute DOMString title;</webidl>
42787 The title to display in a notification.
42793 <Type type="DOMString"/>
42795 <Attribute name="content" id="::Notification::Notification::content">
42796 <webidl> attribute DOMString? content;</webidl>
42799 The content to display in a notification.
42805 <Type type="DOMString" nullable="nullable"/>
42808 <Dictionary name="StatusNotificationInit" id="::Notification::StatusNotificationInit">
42809 <webidl> dictionary StatusNotificationInit {
42810 DOMString? content;
42811 DOMString? iconPath;
42812 DOMString? soundPath;
42813 boolean? vibration;
42814 <ref>ApplicationControl</ref>? appControl;
42815 <ref>ApplicationId</ref>? appId;
42816 <ref>NotificationProgressType</ref>? progressType;
42817 unsigned long? progressValue;
42819 DOMString? subIconPath;
42820 <ref>NotificationDetailInfo</ref>[]? detailInfo;
42821 DOMString? ledColor;
42822 unsigned long ledOnPeriod;
42823 unsigned long ledOffPeriod;
42824 DOMString? backgroundImagePath;
42825 DOMString[]? thumbnails;
42829 The properties of StatusNotification, to pass a constructor.
42835 <DictionaryMember name="content" id="::Notification::StatusNotificationInit::content">
42836 <webidl> DOMString? content;</webidl>
42837 <Type type="DOMString" nullable="nullable"/>
42838 </DictionaryMember>
42839 <DictionaryMember name="iconPath" id="::Notification::StatusNotificationInit::iconPath">
42840 <webidl> DOMString? iconPath;</webidl>
42841 <Type type="DOMString" nullable="nullable"/>
42842 </DictionaryMember>
42843 <DictionaryMember name="soundPath" id="::Notification::StatusNotificationInit::soundPath">
42844 <webidl> DOMString? soundPath;</webidl>
42845 <Type type="DOMString" nullable="nullable"/>
42846 </DictionaryMember>
42847 <DictionaryMember name="vibration" id="::Notification::StatusNotificationInit::vibration">
42848 <webidl> boolean? vibration;</webidl>
42849 <Type type="boolean" nullable="nullable"/>
42850 </DictionaryMember>
42851 <DictionaryMember name="appControl" id="::Notification::StatusNotificationInit::appControl">
42852 <webidl> <ref>ApplicationControl</ref>? appControl;</webidl>
42853 <Type name="ApplicationControl" nullable="nullable"/>
42854 </DictionaryMember>
42855 <DictionaryMember name="appId" id="::Notification::StatusNotificationInit::appId">
42856 <webidl> <ref>ApplicationId</ref>? appId;</webidl>
42857 <Type name="ApplicationId" nullable="nullable"/>
42858 </DictionaryMember>
42859 <DictionaryMember name="progressType" id="::Notification::StatusNotificationInit::progressType">
42860 <webidl> <ref>NotificationProgressType</ref>? progressType;</webidl>
42861 <Type name="NotificationProgressType" nullable="nullable"/>
42862 </DictionaryMember>
42863 <DictionaryMember name="progressValue" id="::Notification::StatusNotificationInit::progressValue">
42864 <webidl> unsigned long? progressValue;</webidl>
42865 <Type type="unsigned long" nullable="nullable"/>
42866 </DictionaryMember>
42867 <DictionaryMember name="number" id="::Notification::StatusNotificationInit::number">
42868 <webidl> long? number;</webidl>
42869 <Type type="long" nullable="nullable"/>
42870 </DictionaryMember>
42871 <DictionaryMember name="subIconPath" id="::Notification::StatusNotificationInit::subIconPath">
42872 <webidl> DOMString? subIconPath;</webidl>
42873 <Type type="DOMString" nullable="nullable"/>
42874 </DictionaryMember>
42875 <DictionaryMember name="detailInfo" id="::Notification::StatusNotificationInit::detailInfo">
42876 <webidl> <ref>NotificationDetailInfo</ref>[]? detailInfo;</webidl>
42877 <Type type="array" nullable="nullable">
42878 <Type name="NotificationDetailInfo"/>
42880 </DictionaryMember>
42881 <DictionaryMember name="ledColor" id="::Notification::StatusNotificationInit::ledColor">
42882 <webidl> DOMString? ledColor;</webidl>
42883 <Type type="DOMString" nullable="nullable"/>
42884 </DictionaryMember>
42885 <DictionaryMember name="ledOnPeriod" id="::Notification::StatusNotificationInit::ledOnPeriod">
42886 <webidl> unsigned long ledOnPeriod;</webidl>
42887 <Type type="unsigned long"/>
42888 </DictionaryMember>
42889 <DictionaryMember name="ledOffPeriod" id="::Notification::StatusNotificationInit::ledOffPeriod">
42890 <webidl> unsigned long ledOffPeriod;</webidl>
42891 <Type type="unsigned long"/>
42892 </DictionaryMember>
42893 <DictionaryMember name="backgroundImagePath" id="::Notification::StatusNotificationInit::backgroundImagePath">
42894 <webidl> DOMString? backgroundImagePath;</webidl>
42895 <Type type="DOMString" nullable="nullable"/>
42896 </DictionaryMember>
42897 <DictionaryMember name="thumbnails" id="::Notification::StatusNotificationInit::thumbnails">
42898 <webidl> DOMString[]? thumbnails;</webidl>
42899 <Type type="array" nullable="nullable">
42900 <Type type="DOMString"/>
42902 </DictionaryMember>
42904 <Interface name="StatusNotification" id="::Notification::StatusNotification">
42905 <webidl> [Constructor(<ref>StatusNotificationType</ref> statusType, DOMString title, optional <ref>StatusNotificationInit</ref>? notificationInitDict)]
42908 interface StatusNotification : <ref>Notification</ref> {
42910 readonly attribute <ref>StatusNotificationType</ref> statusType;
42912 attribute DOMString? iconPath;
42914 attribute DOMString? subIconPath;
42916 attribute long? number;
42918 attribute <ref>NotificationDetailInfo</ref>[]? detailInfo;
42920 attribute DOMString? ledColor;
42922 attribute unsigned long ledOnPeriod;
42924 attribute unsigned long ledOffPeriod;
42926 attribute DOMString? backgroundImagePath;
42928 attribute DOMString[]? thumbnails;
42930 attribute DOMString? soundPath;
42932 attribute boolean vibration;
42934 attribute <ref>ApplicationControl</ref>? appControl;
42936 attribute <ref>ApplicationId</ref>? appId;
42938 attribute <ref>NotificationProgressType</ref> progressType;
42940 attribute unsigned long? progressValue;
42944 This interface represents status notification and offers additional attributes to represent notification displayed in notification tray.
42948 All notification must have a title attribute.
42955 <ExtendedAttributeList>
42956 <ExtendedAttribute name="Constructor">
42957 <webidl>Constructor(<ref>StatusNotificationType</ref> statusType, DOMString title, optional <ref>StatusNotificationInit</ref>? notificationInitDict)</webidl>
42959 <Argument name="statusType">
42960 <Type name="StatusNotificationType"/>
42962 <Argument name="title">
42963 <Type type="DOMString"/>
42965 <Argument optional="optional" name="notificationInitDict">
42966 <Type name="StatusNotificationInit" nullable="nullable"/>
42969 </ExtendedAttribute>
42970 </ExtendedAttributeList>
42971 <InterfaceInheritance>
42972 <Name name="Notification"/>
42973 </InterfaceInheritance>
42974 <Attribute readonly="readonly" name="statusType" id="::Notification::StatusNotification::statusType">
42975 <webidl> readonly attribute <ref>StatusNotificationType</ref> statusType;</webidl>
42978 The status notification type.
42984 <Type name="StatusNotificationType"/>
42986 <Attribute name="iconPath" id="::Notification::StatusNotification::iconPath">
42987 <webidl> attribute DOMString? iconPath;</webidl>
42990 The icon path to display in the notification.
42996 <Type type="DOMString" nullable="nullable"/>
42998 <Attribute name="subIconPath" id="::Notification::StatusNotification::subIconPath">
42999 <webidl> attribute DOMString? subIconPath;</webidl>
43002 The sub icon path to display in the notification.
43008 <Type type="DOMString" nullable="nullable"/>
43010 <Attribute name="number" id="::Notification::StatusNotification::number">
43011 <webidl> attribute long? number;</webidl>
43014 The number of events to display in the notification.
43020 <Type type="long" nullable="nullable"/>
43022 <Attribute name="detailInfo" id="::Notification::StatusNotification::detailInfo">
43023 <webidl> attribute <ref>NotificationDetailInfo</ref>[]? detailInfo;</webidl>
43026 Appends lines of the detail information to the notification.
43027 This attribute is available in simple status notification.
43028 By default, this attribute is initialized with an empty array.
43029 The maximum number of detail information elements in the array is 2.
43035 <Type type="array" nullable="nullable">
43036 <Type name="NotificationDetailInfo"/>
43039 <Attribute name="ledColor" id="::Notification::StatusNotification::ledColor">
43040 <webidl> attribute DOMString? ledColor;</webidl>
43043 Sets the notification LED indicator color property.
43044 The color is a numerical RGB value(#rrggbb). The format of a RGB value in hexadecimal notation is a "#" immediately followed by exactly six hexadecimal characters(0-9, A-F). The color format is case-insensitive.
43045 The LED indicator color will show its a close approximation.
43046 LED will only light on when screen is off. To turn the LED off, set "#000000" or null to ledColor.
43047 This method has effects when the device has notification LED.
43050 var notificationDict = {
43051 content : "This is a simple notification.",
43052 iconPath : "images/image1.jpg",
43053 soundPath : "music/Over the horizon.mp3",
43055 ledColor : "#FFFF00",
43057 ledOffPeriod : 500 };
43059 var notification = new tizen.StatusNotification("SIMPLE",
43060 "Simple notification", notificationDict);
43062 tizen.notification.post(notification);
43064 console.log (err.name + ": " + err.message);
43071 <Type type="DOMString" nullable="nullable"/>
43073 <Attribute name="ledOnPeriod" id="::Notification::StatusNotification::ledOnPeriod">
43074 <webidl> attribute unsigned long ledOnPeriod;</webidl>
43077 The milliseconds for which the light is on
43078 The light continuously toggles on (ledOnPeriod) and off (ledOffPeriod).
43079 By default, this attribute is set to 0
43085 <Type type="unsigned long"/>
43087 <Attribute name="ledOffPeriod" id="::Notification::StatusNotification::ledOffPeriod">
43088 <webidl> attribute unsigned long ledOffPeriod;</webidl>
43091 The milliseconds for which the light is off
43092 By default, this attribute is set to 0
43098 <Type type="unsigned long"/>
43100 <Attribute name="backgroundImagePath" id="::Notification::StatusNotification::backgroundImagePath">
43101 <webidl> attribute DOMString? backgroundImagePath;</webidl>
43104 The image path to use as the background of the notification.
43105 This attribute is available on simple or thumbnail status notifications.
43111 <Type type="DOMString" nullable="nullable"/>
43113 <Attribute name="thumbnails" id="::Notification::StatusNotification::thumbnails">
43114 <webidl> attribute DOMString[]? thumbnails;</webidl>
43117 The image paths associated with the thumbnail status notification.
43118 By default, this attribute is initialized with an empty array.
43119 The maximum number of thumbnail path elements in the array is 4.
43125 <Type type="array" nullable="nullable">
43126 <Type type="DOMString"/>
43129 <Attribute name="soundPath" id="::Notification::StatusNotification::soundPath">
43130 <webidl> attribute DOMString? soundPath;</webidl>
43133 The path of a sound file to play when the notification is shown.
43139 <Type type="DOMString" nullable="nullable"/>
43141 <Attribute name="vibration" id="::Notification::StatusNotification::vibration">
43142 <webidl> attribute boolean vibration;</webidl>
43145 Holds whether to vibrate when the notification is shown. By default, this attribute is set to false.
43151 <Type type="boolean"/>
43153 <Attribute name="appControl" id="::Notification::StatusNotification::appControl">
43154 <webidl> attribute <ref>ApplicationControl</ref>? appControl;</webidl>
43157 Holds the application control to launch an application when the notification is selected from the notification tray.
43163 <Type name="ApplicationControl" nullable="nullable"/>
43165 <Attribute name="appId" id="::Notification::StatusNotification::appId">
43166 <webidl> attribute <ref>ApplicationId</ref>? appId;</webidl>
43169 Holds the application ID to launch when the notification is selected from the notification tray.
43176 // Gets a current application information with tizen.application.getAppInfo
43177 var myappInfo = tizen.application.getAppInfo();
43179 var notificationDict = {
43180 content : "This is a simple notification.",
43181 iconPath : "images/image1.jpg",
43182 soundPath : "music/Over the horizon.mp3",
43184 appId : myappInfo.id };
43186 var notification = new tizen.StatusNotification("SIMPLE",
43187 "Simple notification", notificationDict);
43189 tizen.notification.post(notification);
43191 console.log (err.name + ": " + err.message);
43195 <Type name="ApplicationId" nullable="nullable"/>
43197 <Attribute name="progressType" id="::Notification::StatusNotification::progressType">
43198 <webidl> attribute <ref>NotificationProgressType</ref> progressType;</webidl>
43201 Defines the type for an ongoing notification's progress.
43202 By default, this attribute is set to PERCENTAGE.
43208 <Type name="NotificationProgressType"/>
43210 <Attribute name="progressValue" id="::Notification::StatusNotification::progressValue">
43211 <webidl> attribute unsigned long? progressValue;</webidl>
43214 Defines the current notification progress value (<em>PERCENTAGE</em> or <em>BYTE</em>), depending on the <em>progressType</em> </brief>
43217 If progressValue is set, the progressbar will be displayed in notification. The progressValue can change the amount of progress as it moves forward or backward. Or gets a progress value of current notification
43218 If 0, the indeterminate progressbar will be shown.
43219 This attribute is only available for StatusNotifcation of type <em>PROGRESS</em>.
43222 Application should keep the progress value for its job because
43223 the saved value in the notification status tray would be different from
43224 exact progress value.
43227 Range of <em>progressValue</em>: percent (0 to 100).
43231 var appControl = new tizen.ApplicationControl(
43232 "http://tizen.org/appcontrol/operation/create_content",
43234 "image/jpg",
43237 var notificationDict = {
43238 content : "This is a progress notificaiton.",
43239 iconPath : "images/image2.jpg",
43240 soundPath : "music/Over the horizon.mp3",
43242 appControl : appControl,
43243 progressValue : 20};
43244 // Constructs the progress notification
43245 var notification = new tizen.StatusNotification("PROGRESS",
43246 "Progress notification", notificationDict);
43247 // Posts the notification
43248 tizen.notification.post(notification);
43250 // Updates the progress value of the notification
43251 notification.progressValue = 59;
43252 tizen.notification.update(notification);
43256 console.log (err.name + ": " + err.message);
43263 <Type type="unsigned long" nullable="nullable"/>
43266 <Interface name="NotificationDetailInfo" id="::Notification::NotificationDetailInfo">
43267 <webidl>[Constructor(DOMString mainText, optional DOMString? subText)]
43268 interface NotificationDetailInfo {
43269 attribute DOMString mainText;
43271 attribute DOMString? subText;
43275 The NotificationDetailInfo object that contains the detail information to the notification.
43280 <Code> var detailInfo1 = new tizen.NotificationDetailInfo('Missed Call from James', 'Feb 11 2013');
43281 notification.detailInfo = [detailInfo1];
43284 <ExtendedAttributeList>
43285 <ExtendedAttribute name="Constructor">
43286 <webidl>Constructor(DOMString mainText, optional DOMString? subText)</webidl>
43288 <Argument name="mainText">
43289 <Type type="DOMString"/>
43291 <Argument optional="optional" name="subText">
43292 <Type type="DOMString" nullable="nullable"/>
43295 </ExtendedAttribute>
43296 </ExtendedAttributeList>
43297 <Attribute name="mainText" id="::Notification::NotificationDetailInfo::mainText">
43298 <webidl> attribute DOMString mainText;</webidl>
43301 The main content of the detail information.
43302 This attribute is available on simple status notifications.
43308 <Type type="DOMString"/>
43310 <Attribute name="subText" id="::Notification::NotificationDetailInfo::subText">
43311 <webidl> attribute DOMString? subText;</webidl>
43314 The secondary content of the detail information.
43318 By default, this attribute is set to null.
43325 <Type type="DOMString" nullable="nullable"/>
43329 <Module name="Package" id="::Package">
43330 <webidl>module Package {
43333 typedef DOMString PackageId;
43336 [NoInterfaceObject] interface PackageManagerObject {
43337 readonly attribute <ref>PackageManager</ref> package;
43339 <ref>Tizen</ref> implements <ref>PackageManagerObject</ref>;
43342 [NoInterfaceObject] interface PackageManager {
43345 void install(DOMString path,
43346 <ref>PackageProgressCallback</ref> progressCallback,
43347 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
43350 void uninstall(<ref>PackageId</ref> id,
43351 <ref>PackageProgressCallback</ref> progressCallback,
43352 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
43357 void getPackagesInfo(<ref>PackageInformationArraySuccessCallback</ref> successCallback,
43358 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
43361 <ref>PackageInformation</ref> getPackageInfo(optional <ref>PackageId</ref>? id) raises(<ref>WebAPIException</ref>);
43364 void setPackageInfoEventListener(<ref>PackageInformationEventCallback</ref> eventCallback) raises(<ref>WebAPIException</ref>);
43367 void unsetPackageInfoEventListener() raises(<ref>WebAPIException</ref>);
43372 [NoInterfaceObject] interface PackageInformation {
43374 readonly attribute <ref>PackageId</ref> id;
43377 readonly attribute DOMString name;
43380 readonly attribute DOMString iconPath;
43383 readonly attribute DOMString version;
43386 readonly attribute long totalSize;
43389 readonly attribute long dataSize;
43392 readonly attribute Date lastModified;
43395 readonly attribute DOMString author;
43398 readonly attribute DOMString description;
43401 readonly attribute <ref>ApplicationId</ref>[] appIds;
43406 [Callback=FunctionOnly, NoInterfaceObject] interface PackageInformationArraySuccessCallback {
43409 void onsuccess(<ref>PackageInformation</ref>[] informationArray);
43413 [Callback, NoInterfaceObject] interface PackageProgressCallback {
43416 void onprogress(<ref>PackageId</ref> id, short progress);
43419 void oncomplete(<ref>PackageId</ref> id);
43423 [Callback, NoInterfaceObject] interface PackageInformationEventCallback {
43426 void oninstalled(<ref>PackageInformation</ref> info);
43429 void onupdated(<ref>PackageInformation</ref> info);
43432 void onuninstalled(<ref>PackageId</ref> id);
43438 This API provides functionalities to install or uninstall packages, and retrieve information about installed packages.<br/>It also provides a listener method so that an application is able to be notified when there is a change on the installed packages.
43439 For more information on the Package features, see <a href="../../org.tizen.web.appprogramming/html/guide/app_guide/package.htm">Package Guide</a>.
43445 <Typedef name="PackageId" id="::Package::PackageId">
43446 <webidl> typedef DOMString PackageId;</webidl>
43449 A unique ID for an installed package.
43455 <Type type="DOMString"/>
43457 <Interface name="PackageManagerObject" id="::Package::PackageManagerObject">
43458 <webidl> [NoInterfaceObject] interface PackageManagerObject {
43459 readonly attribute <ref>PackageManager</ref> package;
43463 This interface defines what is instantiated by the <em>Tizen </em>object from the Tizen Platform.
43467 There is a <em>tizen.package </em>object that allows access to Package API functionality.
43474 <ExtendedAttributeList>
43475 <ExtendedAttribute name="NoInterfaceObject">
43476 <webidl>NoInterfaceObject</webidl>
43477 </ExtendedAttribute>
43478 </ExtendedAttributeList>
43479 <Attribute readonly="readonly" name="package" id="::Package::PackageManagerObject::package">
43480 <webidl> readonly attribute <ref>PackageManager</ref> package;</webidl>
43481 <Type name="PackageManager"/>
43484 <Implements name1="Tizen" name2="PackageManagerObject">
43485 <webidl> <ref>Tizen</ref> implements <ref>PackageManagerObject</ref>;</webidl>
43487 <Interface name="PackageManager" id="::Package::PackageManager">
43488 <webidl> [NoInterfaceObject] interface PackageManager {
43491 void install(DOMString path,
43492 <ref>PackageProgressCallback</ref> progressCallback,
43493 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
43496 void uninstall(<ref>PackageId</ref> id,
43497 <ref>PackageProgressCallback</ref> progressCallback,
43498 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
43503 void getPackagesInfo(<ref>PackageInformationArraySuccessCallback</ref> successCallback,
43504 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
43507 <ref>PackageInformation</ref> getPackageInfo(optional <ref>PackageId</ref>? id) raises(<ref>WebAPIException</ref>);
43510 void setPackageInfoEventListener(<ref>PackageInformationEventCallback</ref> eventCallback) raises(<ref>WebAPIException</ref>);
43513 void unsetPackageInfoEventListener() raises(<ref>WebAPIException</ref>);
43518 This interface defines the package manager.
43524 <ExtendedAttributeList>
43525 <ExtendedAttribute name="NoInterfaceObject">
43526 <webidl>NoInterfaceObject</webidl>
43527 </ExtendedAttribute>
43528 </ExtendedAttributeList>
43529 <Operation name="install" id="::Package::PackageManager::install">
43530 <webidl> void install(DOMString path,
43531 <ref>PackageProgressCallback</ref> progressCallback,
43532 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
43535 Installs a package with a specified package path on a device.
43539 This API provides a way to notify the progress and completion of an installation request through PackageProgressCallback.
43542 The <em>ErrorCallback() </em>is launched with these error types:
43546 NotFoundError - If the package is not found in the specified path. </li>
43548 UnknownError - If it is not allowed to install the package by platform or any other platform error occurs. </li>
43558 http://tizen.org/privilege/packagemanager.install
43561 Virtual path cannot be used for the parameter. First, you need to convert any virtual path to a file URI path using the resolve function in the Filesystem API before passing it to the function.
43563 <Code> var onInstallation = {
43564 onprogress: function(packageId, percentage) {
43565 console.log("On installation(" + packageId + ") : progress(" + percentage + ")");
43567 oncomplete: function(packageId) {
43568 console.log("Installation(" + packageId + ") Complete");
43572 var onError = function (err) {
43573 console.log("Error occurred on installation : " + err.name);
43576 // Let's assume that "test.wgt" file is exist in the downloads directory
43577 tizen.filesystem.resolve("downloads/test.wgt",
43579 console.log("file path : " + file.path);
43580 tizen.package.install(file.toURI(), onInstallation, onError);
43583 console.log("Error occurred on resolve : " + err.name);
43589 <Type type="void"/>
43591 <Argument name="path">
43594 The package path to install
43597 <Type type="DOMString"/>
43599 <Argument name="progressCallback">
43602 The method to invoke when the installation is in progress or has been completed
43605 <Type name="PackageProgressCallback"/>
43607 <Argument optional="optional" name="errorCallback">
43610 The method to invoke when an error occurs
43613 <Type name="ErrorCallback" nullable="nullable"/>
43617 <RaiseException name="WebAPIException">
43620 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
43623 with error type SecurityError, if the application does not have the privilege to call this method.
43629 <Operation name="uninstall" id="::Package::PackageManager::uninstall">
43630 <webidl> void uninstall(<ref>PackageId</ref> id,
43631 <ref>PackageProgressCallback</ref> progressCallback,
43632 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
43635 Uninstalls the package with a specified package ID.
43639 This API provides a way to notify about the progress and completion of an uninstallation request through PackageProgressCallback.
43642 The <em>ErrorCallback() </em>is launched with these error types:
43646 NotFoundError - If the package is not found with specified ID. </li>
43648 UnknownError - If it is not allowed to uninstall the package from the platform or any other platform error occurs. </li>
43658 http://tizen.org/privilege/packagemanager.install
43661 Some preloaded packages cannot be uninstalled. In this case, ErrorCallback with UnKnownError type will be launched.
43663 <Code> var onUninstallation = {
43664 onprogress: function(packageId, percentage) {
43665 console.log("On Uninstallation(" + packageId + ") : progress(" + percentage + ")");
43667 oncomplete: function(packageId) {
43668 console.log("Uninstallation(" + packageId + ") Complete");
43672 var onError = function (err) {
43673 console.log("Error occurred on installation : " + err.name);
43676 // Let's assume that the package id to uninstall is "testapp001"
43677 tizen.package.uninstall("testapp001", onUninstallation, onError);
43680 <Type type="void"/>
43682 <Argument name="id">
43685 The package ID to uninstall
43688 <Type name="PackageId"/>
43690 <Argument name="progressCallback">
43693 The method to invoke when uninstallation is in progress or has been completed
43696 <Type name="PackageProgressCallback"/>
43698 <Argument optional="optional" name="errorCallback">
43701 The method to invoke when an error occurs
43704 <Type name="ErrorCallback" nullable="nullable"/>
43708 <RaiseException name="WebAPIException">
43711 with error type TypeMismatchError, if an input parameter is not compatible with the expected type for that parameter.
43714 with error type SecurityError, if the application does not have the privilege to call this method.
43720 <Operation name="getPackagesInfo" id="::Package::PackageManager::getPackagesInfo">
43721 <webidl> void getPackagesInfo(<ref>PackageInformationArraySuccessCallback</ref> successCallback,
43722 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
43725 Gets information of the installed packages.
43729 The result contains the snapshots of the installed packages information.
43732 The <em>errorCallback()</em> is launched with this error type:
43736 UnknownError - If any other platform error occurs. </li>
43746 http://tizen.org/privilege/package.info
43748 <Code> function onListInstalledPackages(packages) {
43749 for (var i = 0; i < packages.length; i++) {
43750 console.log("Package id["+i+"] : " +packages[i].id);
43754 tizen.package.getPackagesInfo(
43755 onListInstalledPackages,
43756 function (err) {console.log("Can't obtain packages list" + err.name);});
43759 <Type type="void"/>
43761 <Argument name="successCallback">
43764 The method to call when an invocation ends successfully
43767 <Type name="PackageInformationArraySuccessCallback"/>
43769 <Argument optional="optional" name="errorCallback">
43772 The method to call when an error occurs
43775 <Type name="ErrorCallback" nullable="nullable"/>
43779 <RaiseException name="WebAPIException">
43782 with error type TypeMismatchError, if an input parameter is not compatible with the expected type for that parameter.
43785 with error type SecurityError, if the application does not have the privilege to call this method.
43791 <Operation name="getPackageInfo" id="::Package::PackageManager::getPackageInfo">
43792 <webidl> <ref>PackageInformation</ref> getPackageInfo(optional <ref>PackageId</ref>? id) raises(<ref>WebAPIException</ref>);</webidl>
43795 Gets information of an installed package.
43799 If the ID is set to <var>null</var> or not set at all, it returns package information of the current application.
43800 The list of installed packages and their package IDs is obtained using <em>getPackagesInfo()</em>.
43810 http://tizen.org/privilege/package.info
43812 <Code> var packageInfo = tizen.package.getPackageInfo(null);
43814 console.log("Current Package ID : " + packageInfo.id);
43817 <Type name="PackageInformation">
43820 PackageInformation The information of a package
43825 <Argument optional="optional" name="id">
43828 A string representing package ID. If the ID is not provided, the package information of the calling application is returned.
43831 <Type name="PackageId" nullable="nullable"/>
43835 <RaiseException name="WebAPIException">
43838 with error type TypeMismatchError, if an input parameter is not compatible with the expected type for that parameter.
43841 with error type SecurityError, if the application does not have the privilege to call this method.
43844 with error type NotFoundError, if the package with the specified ID is not found.
43847 with error type UnknownError, if the package information cannot be retrieved because of a platform error.
43853 <Operation name="setPackageInfoEventListener" id="::Package::PackageManager::setPackageInfoEventListener">
43854 <webidl> void setPackageInfoEventListener(<ref>PackageInformationEventCallback</ref> eventCallback) raises(<ref>WebAPIException</ref>);</webidl>
43857 Sets a listener to receive notifications for any changes made to the list of installed packages.
43861 This method sets a <em>PackageInformationEventCallback</em> type callback that is triggered when a package is installed, removed or updated.
43864 The callback lasts until <em>unsetPackageInfoEventListener()</em> method is called.
43874 http://tizen.org/privilege/package.info
43876 <Code> var packageEventCallback = {
43877 oninstalled: function(packageInfo) {
43878 console.log('The package ' + packageInfo.name + ' is installed');
43880 onupdated: function(packageInfo) {
43881 console.log('The package ' + packageInfo.name + ' is updated');
43883 onuninstalled: function(packageId) {
43884 console.log('The package ' + packageId + ' is uninstalled');
43888 tizen.package.setPackageInfoEventListener(packageEventCallback);
43891 <Type type="void"/>
43893 <Argument name="eventCallback">
43896 The method to be called when any change is made to the list of installed packages.
43899 <Type name="PackageInformationEventCallback"/>
43903 <RaiseException name="WebAPIException">
43906 with error type TypeMismatchError, if an input parameter is not compatible with the expected type for that parameter.
43909 with error type SecurityError, if the application does not have the privilege to call this method.
43912 with error type UnknownError, if the package list change event cannot be generated because of a platform error.
43918 <Operation name="unsetPackageInfoEventListener" id="::Package::PackageManager::unsetPackageInfoEventListener">
43919 <webidl> void unsetPackageInfoEventListener() raises(<ref>WebAPIException</ref>);</webidl>
43922 Unsets the listener to stop receiving package notifications.
43931 http://tizen.org/privilege/package.info
43933 <Code> tizen.package.unsetPackageInfoEventListener();
43936 <Type type="void"/>
43939 <RaiseException name="WebAPIException">
43942 with error type SecurityError, if the application does not have the privilege to call this method.
43945 with error type UnknownError, if the listener removal request fails because of a platform error.
43952 <Interface name="PackageInformation" id="::Package::PackageInformation">
43953 <webidl> [NoInterfaceObject] interface PackageInformation {
43955 readonly attribute <ref>PackageId</ref> id;
43958 readonly attribute DOMString name;
43961 readonly attribute DOMString iconPath;
43964 readonly attribute DOMString version;
43967 readonly attribute long totalSize;
43970 readonly attribute long dataSize;
43973 readonly attribute Date lastModified;
43976 readonly attribute DOMString author;
43979 readonly attribute DOMString description;
43982 readonly attribute <ref>ApplicationId</ref>[] appIds;
43987 This interface defines the general information available to an installed package.
43993 <ExtendedAttributeList>
43994 <ExtendedAttribute name="NoInterfaceObject">
43995 <webidl>NoInterfaceObject</webidl>
43996 </ExtendedAttribute>
43997 </ExtendedAttributeList>
43998 <Attribute readonly="readonly" name="id" id="::Package::PackageInformation::id">
43999 <webidl> readonly attribute <ref>PackageId</ref> id;</webidl>
44002 An attribute to store the identifier of a package.
44008 <Type name="PackageId"/>
44010 <Attribute readonly="readonly" name="name" id="::Package::PackageInformation::name">
44011 <webidl> readonly attribute DOMString name;</webidl>
44014 An attribute to store the package name.
44020 <Type type="DOMString"/>
44022 <Attribute readonly="readonly" name="iconPath" id="::Package::PackageInformation::iconPath">
44023 <webidl> readonly attribute DOMString iconPath;</webidl>
44026 An attribute to store the icon path of a package.
44032 <Type type="DOMString"/>
44034 <Attribute readonly="readonly" name="version" id="::Package::PackageInformation::version">
44035 <webidl> readonly attribute DOMString version;</webidl>
44038 An attribute to store the package version.
44044 <Type type="DOMString"/>
44046 <Attribute readonly="readonly" name="totalSize" id="::Package::PackageInformation::totalSize">
44047 <webidl> readonly attribute long totalSize;</webidl>
44050 An attribute to store the total installed size(package + data) of a package.
44056 <Type type="long"/>
44058 <Attribute readonly="readonly" name="dataSize" id="::Package::PackageInformation::dataSize">
44059 <webidl> readonly attribute long dataSize;</webidl>
44062 An attribute to store the current data size of a package.
44068 <Type type="long"/>
44070 <Attribute readonly="readonly" name="lastModified" id="::Package::PackageInformation::lastModified">
44071 <webidl> readonly attribute Date lastModified;</webidl>
44074 An attribute to store the latest installed or updated time of a package.
44080 <Type type="Date"/>
44082 <Attribute readonly="readonly" name="author" id="::Package::PackageInformation::author">
44083 <webidl> readonly attribute DOMString author;</webidl>
44086 An attribute to store the author of a package.
44092 <Type type="DOMString"/>
44094 <Attribute readonly="readonly" name="description" id="::Package::PackageInformation::description">
44095 <webidl> readonly attribute DOMString description;</webidl>
44098 An attribute to store the package description.
44104 <Type type="DOMString"/>
44106 <Attribute readonly="readonly" name="appIds" id="::Package::PackageInformation::appIds">
44107 <webidl> readonly attribute <ref>ApplicationId</ref>[] appIds;</webidl>
44110 An attribute to store the application ID list of a package.
44116 <Type type="array">
44117 <Type name="ApplicationId"/>
44121 <Interface name="PackageInformationArraySuccessCallback" id="::Package::PackageInformationArraySuccessCallback">
44122 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface PackageInformationArraySuccessCallback {
44125 void onsuccess(<ref>PackageInformation</ref>[] informationArray);
44129 This interface invokes the success callback with an array of <em>PackageInformation </em>objects as an input parameter when the installed package list is retrieved.
44133 It is used in <em>tizen.package.getPackagesInfo()</em>.
44140 <ExtendedAttributeList>
44141 <ExtendedAttribute name="Callback" value="FunctionOnly">
44142 <webidl>Callback</webidl>
44143 </ExtendedAttribute>
44144 <ExtendedAttribute name="NoInterfaceObject">
44145 <webidl> NoInterfaceObject</webidl>
44146 </ExtendedAttribute>
44147 </ExtendedAttributeList>
44148 <Operation name="onsuccess" id="::Package::PackageInformationArraySuccessCallback::onsuccess">
44149 <webidl> void onsuccess(<ref>PackageInformation</ref>[] informationArray);</webidl>
44152 Called when the asynchronous call completes successfully.
44158 <Type type="void"/>
44160 <Argument name="informationArray">
44163 A list of installed packages information.
44166 <Type type="array">
44167 <Type name="PackageInformation"/>
44173 <Interface name="PackageProgressCallback" id="::Package::PackageProgressCallback">
44174 <webidl> [Callback, NoInterfaceObject] interface PackageProgressCallback {
44177 void onprogress(<ref>PackageId</ref> id, short progress);
44180 void oncomplete(<ref>PackageId</ref> id);
44184 This callback interface specifies subscriptions for any notification on the progress or completion of requests.
44190 <ExtendedAttributeList>
44191 <ExtendedAttribute name="Callback">
44192 <webidl>Callback</webidl>
44193 </ExtendedAttribute>
44194 <ExtendedAttribute name="NoInterfaceObject">
44195 <webidl> NoInterfaceObject</webidl>
44196 </ExtendedAttribute>
44197 </ExtendedAttributeList>
44198 <Operation name="onprogress" id="::Package::PackageProgressCallback::onprogress">
44199 <webidl> void onprogress(<ref>PackageId</ref> id, short progress);</webidl>
44202 Called while the request is in progress.
44208 <Type type="void"/>
44210 <Argument name="id">
44216 <Type name="PackageId"/>
44218 <Argument name="progress">
44221 The progress in percentage.
44224 <Type type="short"/>
44228 <Operation name="oncomplete" id="::Package::PackageProgressCallback::oncomplete">
44229 <webidl> void oncomplete(<ref>PackageId</ref> id);</webidl>
44232 Called while the request is completed.
44238 <Type type="void"/>
44240 <Argument name="id">
44246 <Type name="PackageId"/>
44251 <Interface name="PackageInformationEventCallback" id="::Package::PackageInformationEventCallback">
44252 <webidl> [Callback, NoInterfaceObject] interface PackageInformationEventCallback {
44255 void oninstalled(<ref>PackageInformation</ref> info);
44258 void onupdated(<ref>PackageInformation</ref> info);
44261 void onuninstalled(<ref>PackageId</ref> id);
44265 This callback interface specifies methods that are invoked when a package is installed, updated, or uninstalled.
44271 <ExtendedAttributeList>
44272 <ExtendedAttribute name="Callback">
44273 <webidl>Callback</webidl>
44274 </ExtendedAttribute>
44275 <ExtendedAttribute name="NoInterfaceObject">
44276 <webidl> NoInterfaceObject</webidl>
44277 </ExtendedAttribute>
44278 </ExtendedAttributeList>
44279 <Operation name="oninstalled" id="::Package::PackageInformationEventCallback::oninstalled">
44280 <webidl> void oninstalled(<ref>PackageInformation</ref> info);</webidl>
44283 Called when a package is installed.
44289 <Type type="void"/>
44291 <Argument name="info">
44294 The information of the installed package
44297 <Type name="PackageInformation"/>
44301 <Operation name="onupdated" id="::Package::PackageInformationEventCallback::onupdated">
44302 <webidl> void onupdated(<ref>PackageInformation</ref> info);</webidl>
44305 Called when a package is updated.
44311 <Type type="void"/>
44313 <Argument name="info">
44316 The information of the updated package
44319 <Type name="PackageInformation"/>
44323 <Operation name="onuninstalled" id="::Package::PackageInformationEventCallback::onuninstalled">
44324 <webidl> void onuninstalled(<ref>PackageId</ref> id);</webidl>
44327 Called when a package is uninstalled.
44333 <Type type="void"/>
44335 <Argument name="id">
44338 The ID of the uninstalled package
44341 <Type name="PackageId"/>
44347 <Module name="Power" id="::Power">
44348 <webidl>module Power {
44350 enum PowerResource { "SCREEN", "CPU" };
44352 enum PowerScreenState { "SCREEN_OFF", "SCREEN_DIM", "SCREEN_NORMAL", "SCREEN_BRIGHT" };
44354 enum PowerCpuState { "CPU_AWAKE" };
44356 typedef (<ref>PowerScreenState</ref> or <ref>PowerCpuState</ref>) PowerState;
44358 [NoInterfaceObject] interface PowerManagerObject {
44359 readonly attribute <ref>PowerManager</ref> power;
44361 <ref>Tizen</ref> implements <ref>PowerManagerObject</ref>;
44363 [NoInterfaceObject] interface PowerManager {
44364 void request(<ref>PowerResource</ref> resource, <ref>PowerState</ref> state) raises(<ref>WebAPIException</ref>);
44366 void release(<ref>PowerResource</ref> resource) raises(<ref>WebAPIException</ref>);
44368 void setScreenStateChangeListener(<ref>ScreenStateChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);
44370 void unsetScreenStateChangeListener() raises(<ref>WebAPIException</ref>);
44372 double getScreenBrightness() raises(<ref>WebAPIException</ref>);
44374 void setScreenBrightness(double brightness) raises(<ref>WebAPIException</ref>);
44376 boolean isScreenOn() raises(<ref>WebAPIException</ref>);
44378 void restoreScreenBrightness() raises(<ref>WebAPIException</ref>);
44380 void turnScreenOn() raises(<ref>WebAPIException</ref>);
44382 void turnScreenOff() raises(<ref>WebAPIException</ref>);
44385 [Callback=FunctionOnly, NoInterfaceObject] interface ScreenStateChangeCallback {
44386 void onchanged(<ref>PowerScreenState</ref> previousState, <ref>PowerScreenState</ref> changedState);
44392 This API provides support for requesting power management related resource states.
44396 For more information on the Power features, see <a href="../../org.tizen.web.appprogramming/html/guide/sys_guide/power.htm">Power Guide</a>.
44403 <Enum name="PowerResource" id="::Power::PowerResource">
44404 <webidl> enum PowerResource { "SCREEN", "CPU" };</webidl>
44407 An enumerator that defines power resources with values aligned with <em>SystemInfo </em>property values.
44411 We support screen and cpu resources for now.
44412 Supported power resource states are provided in PowerScreenState and PowerCpuState enums respectively prefixed by the corresponding resource type.
44419 <EnumValue stringvalue="SCREEN">
44420 <webidl> "SCREEN</webidl>
44422 <EnumValue stringvalue="CPU">
44423 <webidl> "CPU</webidl>
44426 <Enum name="PowerScreenState" id="::Power::PowerScreenState">
44427 <webidl> enum PowerScreenState { "SCREEN_OFF", "SCREEN_DIM", "SCREEN_NORMAL", "SCREEN_BRIGHT" };</webidl>
44430 An enumerator that indicates the power state for screen resource.
44434 The supported values are:
44438 SCREEN_OFF - This screen state cannot be requested but can only be used in the state change callback. </li>
44440 SCREEN_DIM - The minimal screen state is set to <em>DIM</em> and device does not change to <em>OFF</em> state automatically. </li>
44442 SCREEN_NORMAL - The minimal screen state is set to <em>NORMAL</em> and device does not change to <em>DIM</em> state automatically. </li>
44444 SCREEN_BRIGHT (Deprecated) - The minimal screen state is set to <em>BRIGHT</em> and device does not change to <em>NORMAL</em> state automatically. </li>
44447 <em>DIM</em> state refers to the screen that the backlight is turned off
44448 <em>NORMAL</em> state refers to the default screen brightness that a user has configured for the device.
44449 <em>BRIGHT(Deprecated)</em> state refers to the maximum screen brightness that the device provides.
44450 Note that the change in brightness does not affect the system brightness setting, i.e., the system brightness value is automatically restored when the resource is released or the process is completed.
44454 SCREEN_BRIGHT is deprecated.
44460 <EnumValue stringvalue="SCREEN_OFF">
44461 <webidl> "SCREEN_OFF</webidl>
44463 <EnumValue stringvalue="SCREEN_DIM">
44464 <webidl> "SCREEN_DIM</webidl>
44466 <EnumValue stringvalue="SCREEN_NORMAL">
44467 <webidl> "SCREEN_NORMAL</webidl>
44469 <EnumValue stringvalue="SCREEN_BRIGHT">
44470 <webidl> "SCREEN_BRIGHT</webidl>
44473 <Enum name="PowerCpuState" id="::Power::PowerCpuState">
44474 <webidl> enum PowerCpuState { "CPU_AWAKE" };</webidl>
44477 An enumerator that indicates the power state for cpu resource.
44481 The supported values are:
44485 CPU_AWAKE - The cpu state is set to be awaken and it does not go to <em>SLEEP</em> state automatically. </li>
44492 <EnumValue stringvalue="CPU_AWAKE">
44493 <webidl> "CPU_AWAKE</webidl>
44496 <Typedef name="PowerState" id="::Power::PowerState">
44497 <webidl> typedef (<ref>PowerScreenState</ref> or <ref>PowerCpuState</ref>) PowerState;</webidl>
44500 The supported power states in general.
44501 It can be either a PowerScreenState or a PowerCpuState.
44507 <Type type="union">
44508 <Type name="PowerScreenState"/>
44509 <Type name="PowerCpuState"/>
44512 <Interface name="PowerManagerObject" id="::Power::PowerManagerObject">
44513 <webidl> [NoInterfaceObject] interface PowerManagerObject {
44514 readonly attribute <ref>PowerManager</ref> power;
44518 This interface defines what is instantiated by the <em>Tizen</em> object from the Tizen Platform.
44522 There will be a <em>tizen.power </em>object that allows accessing of a functionality of the Power API.
44529 <ExtendedAttributeList>
44530 <ExtendedAttribute name="NoInterfaceObject">
44531 <webidl>NoInterfaceObject</webidl>
44532 </ExtendedAttribute>
44533 </ExtendedAttributeList>
44534 <Attribute readonly="readonly" name="power" id="::Power::PowerManagerObject::power">
44535 <webidl> readonly attribute <ref>PowerManager</ref> power;</webidl>
44536 <Type name="PowerManager"/>
44539 <Implements name1="Tizen" name2="PowerManagerObject">
44540 <webidl> <ref>Tizen</ref> implements <ref>PowerManagerObject</ref>;</webidl>
44542 <Interface name="PowerManager" id="::Power::PowerManager">
44543 <webidl> [NoInterfaceObject] interface PowerManager {
44544 void request(<ref>PowerResource</ref> resource, <ref>PowerState</ref> state) raises(<ref>WebAPIException</ref>);
44546 void release(<ref>PowerResource</ref> resource) raises(<ref>WebAPIException</ref>);
44548 void setScreenStateChangeListener(<ref>ScreenStateChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);
44550 void unsetScreenStateChangeListener() raises(<ref>WebAPIException</ref>);
44552 double getScreenBrightness() raises(<ref>WebAPIException</ref>);
44554 void setScreenBrightness(double brightness) raises(<ref>WebAPIException</ref>);
44556 boolean isScreenOn() raises(<ref>WebAPIException</ref>);
44558 void restoreScreenBrightness() raises(<ref>WebAPIException</ref>);
44560 void turnScreenOn() raises(<ref>WebAPIException</ref>);
44562 void turnScreenOff() raises(<ref>WebAPIException</ref>);
44566 This interface is used to request resource states, however, these requests can be overridden by the system. If the requests are overridden, the application is notified with the provided listener callback.
44572 <ExtendedAttributeList>
44573 <ExtendedAttribute name="NoInterfaceObject">
44574 <webidl>NoInterfaceObject</webidl>
44575 </ExtendedAttribute>
44576 </ExtendedAttributeList>
44577 <Operation name="request" id="::Power::PowerManager::request">
44578 <webidl> void request(<ref>PowerResource</ref> resource, <ref>PowerState</ref> state) raises(<ref>WebAPIException</ref>);</webidl>
44581 Requests the minimum-state for a power resource.
44590 http://tizen.org/privilege/power
44592 <Code> tizen.power.request("SCREEN", "SCREEN_NORMAL");
44595 <Type type="void"/>
44597 <Argument name="resource">
44600 The power resource for which the request is made.
44603 <Type name="PowerResource"/>
44605 <Argument name="state">
44608 The minimal power state in which the power resource is desired to be.
44611 <Type name="PowerState"/>
44615 <RaiseException name="WebAPIException">
44618 with error type TypeMismatchError, if the input parameter is not
44619 compatible with the expected type.
44622 with error type NotSupportedError, if this feature is not supported.
44625 with error type InvalidValuesError, if any of the input
44626 parameters contain an invalid value.
44629 with error type SecurityError, if the application does not have the privilege to call this method.
44632 with error type UnknownError in any other error case.
44638 <Operation name="release" id="::Power::PowerManager::release">
44639 <webidl> void release(<ref>PowerResource</ref> resource) raises(<ref>WebAPIException</ref>);</webidl>
44642 Releases the power state request for the given resource.
44647 <Code> // Release SCREEN resource.
44648 tizen.power.release("SCREEN");
44651 <Type type="void"/>
44653 <Argument name="resource">
44656 The resource for which requests are to be removed.
44659 <Type name="PowerResource"/>
44663 <RaiseException name="WebAPIException">
44666 with error type TypeMismatchError, if the input parameter is not
44667 compatible with the expected type.
44670 with error type NotSupportedError, if this feature is not supported.
44673 with error type InvalidValuesError, if any of the input
44674 parameters contain an invalid value.
44677 with error type UnknownError in any other error case.
44683 <Operation name="setScreenStateChangeListener" id="::Power::PowerManager::setScreenStateChangeListener">
44684 <webidl> void setScreenStateChangeListener(<ref>ScreenStateChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);</webidl>
44687 Sets the screen state change callback and monitors its state changes.
44692 <Code> function onScreenStateChanged(previousState, changedState) {
44693 console.log("Screen state changed from " + previousState + " to " + changedState);
44696 // Set the screen state change listener.
44697 tizen.power.setScreenStateChangeListener(onScreenStateChanged);
44700 <Type type="void"/>
44702 <Argument name="listener">
44705 The screen state change callback.
44708 <Type name="ScreenStateChangeCallback"/>
44712 <RaiseException name="WebAPIException">
44715 with error type TypeMismatchError, if the input parameter is not
44716 compatible with the expected type.
44719 with error type NotSupportedError, if this feature is not supported.
44722 with error type InvalidValuesError, if any of the input
44723 parameters contain an invalid value.
44726 with error type UnknownError in any other error case.
44732 <Operation name="unsetScreenStateChangeListener" id="::Power::PowerManager::unsetScreenStateChangeListener">
44733 <webidl> void unsetScreenStateChangeListener() raises(<ref>WebAPIException</ref>);</webidl>
44736 Unsets the screen state change callback and stop monitoring it.
44741 <Code> // Unset the screen state change listener.
44742 tizen.power.unsetScreenStateChangeListener();
44745 <Type type="void"/>
44748 <RaiseException name="WebAPIException">
44751 with error type NotSupportedError, if this feature is not supported.
44754 with error type UnknownError in any other error case.
44760 <Operation name="getScreenBrightness" id="::Power::PowerManager::getScreenBrightness">
44761 <webidl> double getScreenBrightness() raises(<ref>WebAPIException</ref>);</webidl>
44764 Gets the screen brightness level of an application, from 0 to 1.
44769 <Code> // Get the current screen brightness value.
44770 var screenBrightness = tizen.power.getScreenBrightness();
44773 <Type type="double">
44776 double Current screen brightness value.
44782 <RaiseException name="WebAPIException">
44785 with error type NotSupportedError, if this feature is not supported.
44788 with error type UnknownError in any other error case.
44794 <Operation name="setScreenBrightness" id="::Power::PowerManager::setScreenBrightness">
44795 <webidl> void setScreenBrightness(double brightness) raises(<ref>WebAPIException</ref>);</webidl>
44798 Sets the screen brightness level for an application, from 0 to 1.
44802 An approximation is made for best effort when the given value is not exactly applicable by the hardware or system.
44812 http://tizen.org/privilege/power
44814 <Code> // Set the screen brightness value for the application.
44815 tizen.power.setScreenBrightness(1);
44818 <Type type="void"/>
44820 <Argument name="brightness">
44823 The screen brightness value to set.
44826 <Type type="double"/>
44830 <RaiseException name="WebAPIException">
44833 with error type TypeMismatchError, if the input parameter is not
44834 compatible with the expected type.
44837 with error type NotSupportedError, if this feature is not supported.
44840 with error type InvalidValuesError, if any of the input
44841 parameters contain an invalid value.
44844 with error type SecurityError, if the application does not have the privilege to call this method.
44847 with error type UnknownError in any other error case.
44853 <Operation name="isScreenOn" id="::Power::PowerManager::isScreenOn">
44854 <webidl> boolean isScreenOn() raises(<ref>WebAPIException</ref>);</webidl>
44857 Returns <var>true</var> if the screen is on.
44862 <Code> // Check whether the screen is on or off.
44863 var isScreenOn = tizen.power.isScreenOn();
44866 <Type type="boolean">
44869 boolean true if screen is on.
44875 <RaiseException name="WebAPIException">
44878 with error type NotSupportedError, if this feature is not supported.
44881 with error type UnknownError in any other error case.
44887 <Operation name="restoreScreenBrightness" id="::Power::PowerManager::restoreScreenBrightness">
44888 <webidl> void restoreScreenBrightness() raises(<ref>WebAPIException</ref>);</webidl>
44891 Restores the screen brightness to the system default setting value.
44896 <Code> // Restore the screen brightness value to the system default setting value.
44897 tizen.power.restoreScreenBrightness();
44900 <Type type="void"/>
44903 <RaiseException name="WebAPIException">
44906 with error type NotSupportedError, if this feature is not supported.
44909 with error type UnknownError in any other error case.
44915 <Operation name="turnScreenOn" id="::Power::PowerManager::turnScreenOn">
44916 <webidl> void turnScreenOn() raises(<ref>WebAPIException</ref>);</webidl>
44919 Turns on the screen.
44923 This API triggers turn-on process and then updates the status when it completes. While the operation is on-going, the isScreenOn() method returns false.
44933 http://tizen.org/privilege/power
44935 <Code> // Turn on the screen.
44936 tizen.power.turnScreenOn();
44939 <Type type="void"/>
44942 <RaiseException name="WebAPIException">
44945 with error type NotSupportedError, if this feature is not supported.
44948 with error type SecurityError, if the application does not have the privilege to call this method.
44951 with error type UnknownError in any other error case.
44957 <Operation name="turnScreenOff" id="::Power::PowerManager::turnScreenOff">
44958 <webidl> void turnScreenOff() raises(<ref>WebAPIException</ref>);</webidl>
44961 Turns off the screen.
44965 This API triggers turn-off process and then updates the status when it completes. While the operation is on-going, the isScreenOn() method returns true
44975 http://tizen.org/privilege/power
44977 <Code> // Turn off the screen.
44978 tizen.power.turnScreenOff();
44981 <Type type="void"/>
44984 <RaiseException name="WebAPIException">
44987 with error type NotSupportedError, if this feature is not supported.
44990 with error type SecurityError, if the application does not have the privilege to call this method.
44993 with error type UnknownError in any other error case.
45000 <Interface name="ScreenStateChangeCallback" id="::Power::ScreenStateChangeCallback">
45001 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ScreenStateChangeCallback {
45002 void onchanged(<ref>PowerScreenState</ref> previousState, <ref>PowerScreenState</ref> changedState);
45006 This callback interface defines notification for the screen state changes.
45012 <ExtendedAttributeList>
45013 <ExtendedAttribute name="Callback" value="FunctionOnly">
45014 <webidl>Callback</webidl>
45015 </ExtendedAttribute>
45016 <ExtendedAttribute name="NoInterfaceObject">
45017 <webidl> NoInterfaceObject</webidl>
45018 </ExtendedAttribute>
45019 </ExtendedAttributeList>
45020 <Operation name="onchanged" id="::Power::ScreenStateChangeCallback::onchanged">
45021 <webidl> void onchanged(<ref>PowerScreenState</ref> previousState, <ref>PowerScreenState</ref> changedState);</webidl>
45024 Called on screen state change.
45030 <Type type="void"/>
45032 <Argument name="previousState">
45035 The previous screen state.
45038 <Type name="PowerScreenState"/>
45040 <Argument name="changedState">
45043 The changed screen state.
45046 <Type name="PowerScreenState"/>
45052 <Module name="Push" id="::Push">
45053 <webidl>module Push {
45055 typedef DOMString PushRegistrationId;
45058 [NoInterfaceObject] interface PushManagerObject {
45059 readonly attribute <ref>PushManager</ref> push;
45061 <ref>Tizen</ref> implements <ref>PushManagerObject</ref>;
45064 [NoInterfaceObject] interface PushManager {
45066 void registerService(<ref>ApplicationControl</ref> appControl, <ref>PushRegisterSuccessCallback</ref> successCallback,
45067 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45070 void unregisterService(optional <ref>SuccessCallback</ref>? successCallback,
45071 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45074 void connectService(<ref>PushNotificationCallback</ref> notificationCallback) raises(<ref>WebAPIException</ref>);
45077 void disconnectService() raises(<ref>WebAPIException</ref>);
45080 <ref>PushRegistrationId</ref> getRegistrationId() raises(<ref>WebAPIException</ref>);
45084 [NoInterfaceObject] interface PushMessage {
45086 readonly attribute DOMString appData;
45089 readonly attribute DOMString alertMessage;
45092 readonly attribute Date date;
45096 [Callback=FunctionOnly, NoInterfaceObject]
45097 interface PushRegisterSuccessCallback {
45099 void onsuccess(<ref>PushRegistrationId</ref> id);
45103 [Callback=FunctionOnly, NoInterfaceObject]
45104 interface PushNotificationCallback {
45106 void onsuccess(<ref>PushMessage</ref> message);
45111 This API provides the functionality for receiving push notifications
45112 from Tizen push server.
45113 The push service is a client daemon that maintains a permanent connection
45114 between your device and Tizen push server in order to process your registration
45115 and deregistration requests, deliver push notifications to applications on a device.
45119 If the application is connected, the push service passes the notification data over
45120 the connection. Otherwise, the push service posts UI notification with the data.
45121 It will be delivered when a user launches the application by selecting the posting.
45124 To receive push notifications, follow the steps below:
45128 Get administrative permission for an application on your device </li>
45130 Register the application </li>
45132 Connect to the push service </li>
45134 Get notification data </li>
45137 For more information on the Push features, see <a href="../../org.tizen.web.appprogramming/html/guide/communication_guide/push.htm">Push Guide</a>.
45143 <def-api-feature identifier="http://tizen.org/feature/network.push">
45147 To guarantee this application running on a device with Push feature, define below in the config file:
45153 <Typedef name="PushRegistrationId" id="::Push::PushRegistrationId">
45154 <webidl> typedef DOMString PushRegistrationId;</webidl>
45157 A push service registration identifier.
45163 <Type type="DOMString"/>
45165 <Interface name="PushManagerObject" id="::Push::PushManagerObject">
45166 <webidl> [NoInterfaceObject] interface PushManagerObject {
45167 readonly attribute <ref>PushManager</ref> push;
45171 This interface defines what is instantiated by the <em>Tizen </em>object from the Tizen Platform.
45175 There will be a <em>tizen.push </em>object that allows access to the functionality of the Push API.
45182 <ExtendedAttributeList>
45183 <ExtendedAttribute name="NoInterfaceObject">
45184 <webidl>NoInterfaceObject</webidl>
45185 </ExtendedAttribute>
45186 </ExtendedAttributeList>
45187 <Attribute readonly="readonly" name="push" id="::Push::PushManagerObject::push">
45188 <webidl> readonly attribute <ref>PushManager</ref> push;</webidl>
45189 <Type name="PushManager"/>
45192 <Implements name1="Tizen" name2="PushManagerObject">
45193 <webidl> <ref>Tizen</ref> implements <ref>PushManagerObject</ref>;</webidl>
45195 <Interface name="PushManager" id="::Push::PushManager">
45196 <webidl> [NoInterfaceObject] interface PushManager {
45198 void registerService(<ref>ApplicationControl</ref> appControl, <ref>PushRegisterSuccessCallback</ref> successCallback,
45199 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45202 void unregisterService(optional <ref>SuccessCallback</ref>? successCallback,
45203 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45206 void connectService(<ref>PushNotificationCallback</ref> notificationCallback) raises(<ref>WebAPIException</ref>);
45209 void disconnectService() raises(<ref>WebAPIException</ref>);
45212 <ref>PushRegistrationId</ref> getRegistrationId() raises(<ref>WebAPIException</ref>);
45216 This interface provides methods to manage push registration and notification.
45222 <ExtendedAttributeList>
45223 <ExtendedAttribute name="NoInterfaceObject">
45224 <webidl>NoInterfaceObject</webidl>
45225 </ExtendedAttribute>
45226 </ExtendedAttributeList>
45227 <Operation name="registerService" id="::Push::PushManager::registerService">
45228 <webidl> void registerService(<ref>ApplicationControl</ref> appControl, <ref>PushRegisterSuccessCallback</ref> successCallback,
45229 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
45232 Registers an application to the Tizen push server.
45235 In order to use the push messaging service, see <a href="../../org.tizen.native.appprogramming/html/guide/messaging/push_messaging.htm">Push Messaging Guide</a>.
45239 The <em>ErrorCallback()</em> is launched with these error types:
45243 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
45245 UnknownError - If any other error occurs. </li>
45255 http://tizen.org/privilege/push
45257 <Code> // Defines the data to be used when this process is launched by notification service.
45258 var service = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/push_test");
45260 // Defines the error callback.
45261 function errorCallback(response) {
45262 console.log( 'The following error occurred: ' + response.name);
45265 // Defines the registration success callback
45266 function registerSuccessCallback(id) {
45267 console.log("Registration succeeded with id: " + id);
45270 // Requests registration.
45271 tizen.push.registerService(service, registerSuccessCallback, errorCallback);
45274 <Type type="void"/>
45276 <Argument name="appControl">
45279 The data to deliver via notification service when the process is not running.<br/> For more information, see <a href="../../org.tizen.web.device.apireference/tizen/application.html">Application API</a>.
45282 <Type name="ApplicationControl"/>
45284 <Argument name="successCallback">
45287 The method to be called when the registration request succeeds.
45290 <Type name="PushRegisterSuccessCallback"/>
45292 <Argument optional="optional" name="errorCallback">
45295 The method to be called when the registration request fails.
45298 <Type name="ErrorCallback" nullable="nullable"/>
45302 <RaiseException name="WebAPIException">
45305 with error type TypeMismatchError, if any input parameter
45306 is not compatible with the expected type for that parameter.
45309 with error type InvalidValuesError, if any input parameters
45310 does not contain a valid value.
45313 with error type SecurityError, if the application does not have the privilege to call this method.
45316 with error type NotSupportedError, if this feature is not supported.
45319 with error type UnknownError, if any other error occurs.
45325 <Operation name="unregisterService" id="::Push::PushManager::unregisterService">
45326 <webidl> void unregisterService(optional <ref>SuccessCallback</ref>? successCallback,
45327 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
45330 Unregisters an application from the Tizen push server.
45334 The <em>ErrorCallback()</em> is launched with these error types:
45338 UnknownError - If an unknown error occurs. </li>
45348 http://tizen.org/privilege/push
45350 <Code> // Defines the error callback
45351 function errorCallback(response) {
45352 console.log( 'The following error occurred: ' + response.name);
45355 // Defines the unregistration success callback
45356 function unregisterSuccessCallback() {
45357 console.log("Unregistration succeeded.");
45360 // Requests unregistration
45361 tizen.push.unregisterService(unregisterSuccessCallback, errorCallback);
45364 <Type type="void"/>
45366 <Argument optional="optional" name="successCallback">
45369 The method to be called when the request is successfully unregistered.
45372 <Type name="SuccessCallback" nullable="nullable"/>
45374 <Argument optional="optional" name="errorCallback">
45377 The method to be called when the unregistration request fails.
45380 <Type name="ErrorCallback" nullable="nullable"/>
45384 <RaiseException name="WebAPIException">
45387 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
45390 with error type InvalidValuesError, if any input parameters does not contain a valid value.
45393 with error type SecurityError, if the application does not have the privilege to call this method.
45396 with error type NotSupportedError, if this feature is not supported.
45399 with error type UnknownError, if any other error occurs.
45405 <Operation name="connectService" id="::Push::PushManager::connectService">
45406 <webidl> void connectService(<ref>PushNotificationCallback</ref> notificationCallback) raises(<ref>WebAPIException</ref>);</webidl>
45409 Connects to the push service and receives push notifications.
45418 http://tizen.org/privilege/push
45420 <Code> // Defines the connect success callback
45421 function notificationCallback(noti) {
45422 console.log("Notification received with alert message: " + noti.alertMessage);
45425 // Requests for push service connection
45426 tizen.push.connectService(notificationCallback, errorCallback);
45429 <Type type="void"/>
45431 <Argument name="notificationCallback">
45434 The method to be called when the notification message arrives.
45437 <Type name="PushNotificationCallback"/>
45441 <RaiseException name="WebAPIException">
45444 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
45447 with error type InvalidValuesError, if any input parameters does not contain a valid value.
45450 with error type SecurityError, if the application does not have the privilege to call this method.
45453 with error type NotSupportedError, if this feature is not supported.
45456 with error type UnknownError, if any other error occurs.
45462 <Operation name="disconnectService" id="::Push::PushManager::disconnectService">
45463 <webidl> void disconnectService() raises(<ref>WebAPIException</ref>);</webidl>
45466 Disconnects to the push service and stop receiving push notifications.
45475 http://tizen.org/privilege/push
45477 <Code> // Requests disconnection
45478 tizen.push.disconnectService();
45481 <Type type="void"/>
45484 <RaiseException name="WebAPIException">
45487 with error type SecurityError, if the application does not have the privilege to call this method.
45490 with error type NotSupportedError, if this feature is not supported.
45493 with error type UnknownError, if any other error occurs.
45499 <Operation name="getRegistrationId" id="::Push::PushManager::getRegistrationId">
45500 <webidl> <ref>PushRegistrationId</ref> getRegistrationId() raises(<ref>WebAPIException</ref>);</webidl>
45503 Gets the push service registration ID for this application if the registration process was successful. <var>null </var>is returned if the application has not been registered yet.
45512 http://tizen.org/privilege/push
45514 <Code> var registrationId = tizen.push.getRegistrationId();
45515 if ( registrationId != NULL ) {
45516 console.log("The registration id: " + registrationId);
45520 <Type name="PushRegistrationId"/>
45523 <RaiseException name="WebAPIException">
45526 with error type SecurityError, if the application does not have the privilege to call this method.
45529 with error type NotSupportedError, if this feature is not supported.
45532 with error type UnknownError, if any other error occurs.
45539 <Interface name="PushMessage" id="::Push::PushMessage">
45540 <webidl> [NoInterfaceObject] interface PushMessage {
45542 readonly attribute DOMString appData;
45545 readonly attribute DOMString alertMessage;
45548 readonly attribute Date date;
45552 This interface specifies the push message that is delivered from the push service.
45558 <ExtendedAttributeList>
45559 <ExtendedAttribute name="NoInterfaceObject">
45560 <webidl>NoInterfaceObject</webidl>
45561 </ExtendedAttribute>
45562 </ExtendedAttributeList>
45563 <Attribute readonly="readonly" name="appData" id="::Push::PushMessage::appData">
45564 <webidl> readonly attribute DOMString appData;</webidl>
45567 An attribute to store the push notification data.
45571 This data is the message that the sender wants to send and its length must be less than 1 KB.
45578 <Type type="DOMString"/>
45580 <Attribute readonly="readonly" name="alertMessage" id="::Push::PushMessage::alertMessage">
45581 <webidl> readonly attribute DOMString alertMessage;</webidl>
45584 An attribute to store the push notification message that is displayed as an alert message to the user.
45590 <Type type="DOMString"/>
45592 <Attribute readonly="readonly" name="date" id="::Push::PushMessage::date">
45593 <webidl> readonly attribute Date date;</webidl>
45596 An attribute to store the date/time when a push notification message is received.
45602 <Type type="Date"/>
45605 <Interface name="PushRegisterSuccessCallback" id="::Push::PushRegisterSuccessCallback">
45606 <webidl> [Callback=FunctionOnly, NoInterfaceObject]
45607 interface PushRegisterSuccessCallback {
45609 void onsuccess(<ref>PushRegistrationId</ref> id);
45613 This interface specifies the success callback for push service registration request.
45617 This success callback is invoked when a push service registration request is successful.
45624 <ExtendedAttributeList>
45625 <ExtendedAttribute name="Callback" value="FunctionOnly">
45626 <webidl>Callback</webidl>
45627 </ExtendedAttribute>
45628 <ExtendedAttribute name="NoInterfaceObject">
45629 <webidl> NoInterfaceObject</webidl>
45630 </ExtendedAttribute>
45631 </ExtendedAttributeList>
45632 <Operation name="onsuccess" id="::Push::PushRegisterSuccessCallback::onsuccess">
45633 <webidl> void onsuccess(<ref>PushRegistrationId</ref> id);</webidl>
45636 Called when a push service registration request is successful.
45642 <Type type="void"/>
45644 <Argument name="id">
45647 The registration ID.
45650 <Type name="PushRegistrationId"/>
45655 <Interface name="PushNotificationCallback" id="::Push::PushNotificationCallback">
45656 <webidl> [Callback=FunctionOnly, NoInterfaceObject]
45657 interface PushNotificationCallback {
45659 void onsuccess(<ref>PushMessage</ref> message);
45663 This interface specifies the notification callback for the received push notification message.
45667 This notification callback is invoked when the push notification message arrives.
45674 <ExtendedAttributeList>
45675 <ExtendedAttribute name="Callback" value="FunctionOnly">
45676 <webidl>Callback</webidl>
45677 </ExtendedAttribute>
45678 <ExtendedAttribute name="NoInterfaceObject">
45679 <webidl> NoInterfaceObject</webidl>
45680 </ExtendedAttribute>
45681 </ExtendedAttributeList>
45682 <Operation name="onsuccess" id="::Push::PushNotificationCallback::onsuccess">
45683 <webidl> void onsuccess(<ref>PushMessage</ref> message);</webidl>
45686 Called when the push notification message arrives.
45692 <Type type="void"/>
45694 <Argument name="message">
45697 The received push notification message.
45700 <Type name="PushMessage"/>
45706 <Module name="SecureElement" id="::SecureElement">
45707 <webidl>module SecureElement {
45709 [NoInterfaceObject] interface SEServiceManagerObject {
45710 readonly attribute <ref>SEService</ref> seService;
45712 <ref>Tizen</ref> implements <ref>SEServiceManagerObject</ref>;
45715 [NoInterfaceObject] interface SEService
45718 void getReaders(<ref>ReaderArraySuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45720 unsigned long registerSEListener(<ref>SEChangeListener</ref> listener) raises(<ref>WebAPIException</ref>);
45722 void unregisterSEListener(unsigned long id) raises(<ref>WebAPIException</ref>);
45725 void shutdown() raises(<ref>WebAPIException</ref>);
45729 [NoInterfaceObject] interface Reader
45732 readonly attribute boolean isPresent;
45734 DOMString getName() raises(<ref>WebAPIException</ref>);
45736 void openSession(<ref>SessionSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45738 void closeSessions() raises(<ref>WebAPIException</ref>);
45741 [NoInterfaceObject] interface Session
45744 readonly attribute boolean isClosed;
45746 void openBasicChannel(byte[] aid, <ref>ChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45748 void openLogicalChannel(byte[] aid, <ref>ChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45750 byte[] getATR() raises(<ref>WebAPIException</ref>);
45752 void close() raises(<ref>WebAPIException</ref>);
45754 void closeChannels() raises(<ref>WebAPIException</ref>);
45758 [NoInterfaceObject] interface Channel {
45760 readonly attribute boolean isBasicChannel;
45762 void close() raises(<ref>WebAPIException</ref>);
45765 void transmit(byte[] command, <ref>TransmitSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45769 [Callback, NoInterfaceObject] interface SEChangeListener {
45771 void onSEReady(<ref>Reader</ref> reader);
45773 void onSENotReady(<ref>Reader</ref> reader);
45777 [Callback=FunctionOnly, NoInterfaceObject] interface ReaderArraySuccessCallback {
45779 void onsuccess(<ref>Reader</ref>[] readers);
45783 [Callback=FunctionOnly, NoInterfaceObject] interface SessionSuccessCallback {
45785 void onsuccess(<ref>Session</ref> session);
45789 [Callback=FunctionOnly, NoInterfaceObject] interface ChannelSuccessCallback {
45791 void onsuccess(<ref>Channel</ref> channel);
45795 [Callback=FunctionOnly, NoInterfaceObject] interface TransmitSuccessCallback {
45797 void onsuccess(byte[] response);
45802 Secure Element is a secure smart card chip. It can be UICC/SIM, embedded Secure Element, or Secure SD card that is inserted in a device.
45806 This API provides functionality to communicate with applications in several Secure Elements.
45812 <def-api-feature identifier="http://tizen.org/feature/network.secure_element">
45816 To guarantee this application running on a device with SecureElement feature, define below in the config file:
45822 <Interface name="SEServiceManagerObject" id="::SecureElement::SEServiceManagerObject">
45823 <webidl> [NoInterfaceObject] interface SEServiceManagerObject {
45824 readonly attribute <ref>SEService</ref> seService;
45828 Defines what is instantiated by the Tizen object from the Tizen Platform.
45832 There is a <em>tizen.seService</em> object that allows access to the functionalities of the Secure Element API.
45839 <ExtendedAttributeList>
45840 <ExtendedAttribute name="NoInterfaceObject">
45841 <webidl>NoInterfaceObject</webidl>
45842 </ExtendedAttribute>
45843 </ExtendedAttributeList>
45844 <Attribute readonly="readonly" name="seService" id="::SecureElement::SEServiceManagerObject::seService">
45845 <webidl> readonly attribute <ref>SEService</ref> seService;</webidl>
45846 <Type name="SEService"/>
45849 <Implements name1="Tizen" name2="SEServiceManagerObject">
45850 <webidl> <ref>Tizen</ref> implements <ref>SEServiceManagerObject</ref>;</webidl>
45852 <Interface name="SEService" id="::SecureElement::SEService">
45853 <webidl> [NoInterfaceObject] interface SEService
45856 void getReaders(<ref>ReaderArraySuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45858 unsigned long registerSEListener(<ref>SEChangeListener</ref> listener) raises(<ref>WebAPIException</ref>);
45860 void unregisterSEListener(unsigned long id) raises(<ref>WebAPIException</ref>);
45863 void shutdown() raises(<ref>WebAPIException</ref>);
45867 This interface provides access to the available Secure Element readers.
45871 It provides access to the API functionalities through the <em>tizen.seService</em> interface.
45878 <ExtendedAttributeList>
45879 <ExtendedAttribute name="NoInterfaceObject">
45880 <webidl>NoInterfaceObject</webidl>
45881 </ExtendedAttribute>
45882 </ExtendedAttributeList>
45883 <Operation name="getReaders" id="::SecureElement::SEService::getReaders">
45884 <webidl> void getReaders(<ref>ReaderArraySuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
45887 Gets all the available Secure Element readers.
45891 The ErrorCallback is launched with these error types:
45895 UnknownError - If any error occurs during retrieval. </li>
45902 http://tizen.org/privilege/secureelement
45908 function success(readers) {
45909 for (var i = 0; i < readers.length; i++) {
45910 if (readers[i].isPresent) {
45911 console.log ("Reader Name : " + readers[i].getName());
45915 function error(err) {
45916 console.log (err.name + ": " + err.message);
45918 tizen.seService.getReaders(success, error);
45920 console.log (err.name + ": " + err.message);
45924 <Type type="void"/>
45926 <Argument name="successCallback">
45929 The method to be invoked when the list of available Secure Element readers has been successfully retrieved
45932 <Type name="ReaderArraySuccessCallback"/>
45934 <Argument optional="optional" name="errorCallback">
45937 The method to call when an error occurs
45940 <Type name="ErrorCallback" nullable="nullable"/>
45944 <RaiseException name="WebAPIException">
45947 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
45950 with error type SecurityError, if the application does not have the privilege to call this method.
45956 <Operation name="registerSEListener" id="::SecureElement::SEService::registerSEListener">
45957 <webidl> unsigned long registerSEListener(<ref>SEChangeListener</ref> listener) raises(<ref>WebAPIException</ref>);</webidl>
45960 Registers a callback function that is invoked when an available Secure Element reader is detected.
45966 http://tizen.org/privilege/secureelement
45972 var seListener = tizen.seService.registerSEListener({
45973 onSEReady:function(reader) {
45974 console.log (reader.getName() + "is ready.");
45975 }, onSENotReady:function(reader) {
45976 console.log (reader.getName() + "is not ready.");
45979 console.log (err.name + ": " + err.message);
45983 <Type type="unsigned long">
45986 unsigned long An identifier used to clear the watch subscription.
45991 <Argument name="listener">
45994 A listener to be invoked for successful detection of available Secure Element readers.
45997 <Type name="SEChangeListener"/>
46001 <RaiseException name="WebAPIException">
46004 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
46007 with error type SecurityError, if the application does not have the privilege to call this method.
46010 with error type UnknownError, if any other error occurs.
46016 <Operation name="unregisterSEListener" id="::SecureElement::SEService::unregisterSEListener">
46017 <webidl> void unregisterSEListener(unsigned long id) raises(<ref>WebAPIException</ref>);</webidl>
46020 Unregisters the listener from notifying any detection of an available Secure Element reader.
46026 http://tizen.org/privilege/secureelement
46031 <Code> var seListener; //seListener obtained from registerSEListener
46033 tizen.seService.unregisterSEListener(seListener);
46035 console.log (err.name + ": " + err.message);
46039 <Type type="void"/>
46041 <Argument name="id">
46044 A subscription identifier that is returned by the <em>registerSEListener()</em> method.
46047 <Type type="unsigned long"/>
46051 <RaiseException name="WebAPIException">
46054 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
46057 with error type InvalidValuesError, if any of the input parameters contains an invalid value.
46060 with error type SecurityError, if the application does not have the privilege to call this method.
46063 with error type UnknownError, if any other error occurs.
46069 <Operation name="shutdown" id="::SecureElement::SEService::shutdown">
46070 <webidl> void shutdown() raises(<ref>WebAPIException</ref>);</webidl>
46073 Shuts down Secure Elements after releasing all resources.
46079 http://tizen.org/privilege/secureelement
46085 tizen.seService.shutdown();
46087 console.log (err.name + ": " + err.message);
46091 <Type type="void"/>
46094 <RaiseException name="WebAPIException">
46097 with error type SecurityError, if the application does not have the privilege to call this method.
46100 with error type UnknownError, if any other error occurs.
46107 <Interface name="Reader" id="::SecureElement::Reader">
46108 <webidl> [NoInterfaceObject] interface Reader
46111 readonly attribute boolean isPresent;
46113 DOMString getName() raises(<ref>WebAPIException</ref>);
46115 void openSession(<ref>SessionSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
46117 void closeSessions() raises(<ref>WebAPIException</ref>);
46121 Reader interface that is connected to this device.
46125 This interface offers methods to control sessions on the reader.
46132 <ExtendedAttributeList>
46133 <ExtendedAttribute name="NoInterfaceObject">
46134 <webidl>NoInterfaceObject</webidl>
46135 </ExtendedAttribute>
46136 </ExtendedAttributeList>
46137 <Attribute readonly="readonly" name="isPresent" id="::SecureElement::Reader::isPresent">
46138 <webidl> readonly attribute boolean isPresent;</webidl>
46141 An attribute to check whether a Secure Element is present on a reader.
46147 <Type type="boolean"/>
46149 <Operation name="getName" id="::SecureElement::Reader::getName">
46150 <webidl> DOMString getName() raises(<ref>WebAPIException</ref>);</webidl>
46153 Gets reader's name.
46159 http://tizen.org/privilege/secureelement
46165 function success(readers) {
46166 for (var i = 0; i < readers.length; i++) {
46167 if (readers[i].isPresent) {
46168 console.log ("Reader Name : " + readers[i].getName());
46172 function error(err) {
46173 console.log (err.name + ": " + err.message);
46175 tizen.seService.getReaders(success, error);
46177 console.log (err.name + ": " + err.message);
46181 <Type type="DOMString">
46184 DOMString The name of the reader.
46190 <RaiseException name="WebAPIException">
46193 with error type SecurityError, if the application does not have the privilege to call this method.
46196 with error type UnknownError, if any other error occurs.
46202 <Operation name="openSession" id="::SecureElement::Reader::openSession">
46203 <webidl> void openSession(<ref>SessionSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
46206 Opens a session on a reader.
46210 The ErrorCallback is launched with these error types:
46214 IOError - An error occurred in communication with the Secure Element in this reader. </li>
46216 InvalidStateError - If a Secure Element is not present on this reader. </li>
46218 UnknownError - If any other error occurs. </li>
46225 http://tizen.org/privilege/secureelement
46231 function success(session) {
46232 console.log ("Open Session Success : " + !session.isClosed);
46234 function error(err) {
46235 console.log (err.name + ": " + err.message);
46237 reader.openSession(success, error);
46239 console.log (err.name + ": " + err.message);
46243 <Type type="void"/>
46245 <Argument name="successCallback">
46248 The method to be invoked when a session has been successfully opened
46251 <Type name="SessionSuccessCallback"/>
46253 <Argument optional="optional" name="errorCallback">
46256 The method to be called when an error occurs
46259 <Type name="ErrorCallback" nullable="nullable"/>
46263 <RaiseException name="WebAPIException">
46266 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
46269 with error type SecurityError, if the application does not have the privilege to call this method.
46275 <Operation name="closeSessions" id="::SecureElement::Reader::closeSessions">
46276 <webidl> void closeSessions() raises(<ref>WebAPIException</ref>);</webidl>
46279 Closes all sessions opened on a reader.
46285 http://tizen.org/privilege/secureelement
46291 reader.closeSessions();
46293 console.log (err.name + ": " + err.message);
46297 <Type type="void"/>
46300 <RaiseException name="WebAPIException">
46303 with error type SecurityError, if the application does not have the privilege to call this method.
46306 with error type UnknownError in any other error case.
46313 <Interface name="Session" id="::SecureElement::Session">
46314 <webidl> [NoInterfaceObject] interface Session
46317 readonly attribute boolean isClosed;
46319 void openBasicChannel(byte[] aid, <ref>ChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
46321 void openLogicalChannel(byte[] aid, <ref>ChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
46323 byte[] getATR() raises(<ref>WebAPIException</ref>);
46325 void close() raises(<ref>WebAPIException</ref>);
46327 void closeChannels() raises(<ref>WebAPIException</ref>);
46331 This interface is connected to one of the readers and offers methods to control channels in a session.
46337 <ExtendedAttributeList>
46338 <ExtendedAttribute name="NoInterfaceObject">
46339 <webidl>NoInterfaceObject</webidl>
46340 </ExtendedAttribute>
46341 </ExtendedAttributeList>
46342 <Attribute readonly="readonly" name="isClosed" id="::SecureElement::Session::isClosed">
46343 <webidl> readonly attribute boolean isClosed;</webidl>
46346 An attribute to check whether a session is closed or not.
46352 <Type type="boolean"/>
46354 <Operation name="openBasicChannel" id="::SecureElement::Session::openBasicChannel">
46355 <webidl> void openBasicChannel(byte[] aid, <ref>ChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
46358 Opens a basic channel in a session.
46359 The basic channel (defined in the ISO7816-4 specification) is opened by default and its channel ID is <var>0</var>.
46360 Once this channel has been opened by an application, it is considered to be "locked" to other applications, and they cannot open any channel, until the basic channel is closed.
46361 Some Secure Elements might always deny opening a basic channel.
46365 The ErrorCallback is launched with these error types:
46369 IOError - If an error occurs while communicating with the Secure Element in the reader. </li>
46371 SecurityError - If access to this AID or the default application on this session is not allowed . </li>
46373 InvalidStateError - If this session is closed. </li>
46375 NotFoundError - If the application of the AID does not exist in the Secure Element. </li>
46377 NoChannelError - If basic channel is unavailable. </li>
46379 UnknownError - If any other error occurs. </li>
46386 http://tizen.org/privilege/secureelement
46392 function successChannel(channel) {
46393 if (channel.isBasicChannel) {
46394 console.log ("Basic channel is opened.");
46396 console.log ("Logical channel is opened.");
46399 function errorChannel(err) {
46400 console.log ("openBasicChannel Error :" + err.name +": " + err.message);
46403 function successSession(session) {
46404 console.log ("Open Session Success : " + !session.isClosed);
46405 // This aid is for test. Use aid for your applet in secure element.
46406 session.openBasicChannel([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe], successChannel, errorChannel);
46408 function errorSession(err) {
46409 console.log ("openSession Error : " + err.name + ": " + err.message);
46411 reader.openSession(successSession, errorSession);
46413 console.log (err.name + ": " + err.message);
46417 <Type type="void"/>
46419 <Argument name="aid">
46422 The id of the applet to select on this channel.<br/>If the array is empty, the default applet is selected in this session.
46425 <Type type="array">
46426 <Type type="byte"/>
46429 <Argument name="successCallback">
46432 The method to be invoked when a basic channel has been successfully opened
46435 <Type name="ChannelSuccessCallback"/>
46437 <Argument optional="optional" name="errorCallback">
46440 The method to be called when an error occurs
46443 <Type name="ErrorCallback" nullable="nullable"/>
46447 <RaiseException name="WebAPIException">
46450 with error type TypeMismatchError, if the input parameter
46451 is not compatible with the expected type for that parameter.
46454 with error type InvalidValuesError, if the AID's length is not within the limit: 5 to 16(inclusive).
46457 with error type SecurityError, if the application does not have the privilege to call this method.
46463 <Operation name="openLogicalChannel" id="::SecureElement::Session::openLogicalChannel">
46464 <webidl> void openLogicalChannel(byte[] aid, <ref>ChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
46467 Opens a logical channel in a session by the specified applet id.
46468 The logical channel is defined in the ISO7816-4 specification.
46472 The ErrorCallback is launched with these error types:
46476 IOError - If an error occurs while communicating with the Secure Element in the reader. </li>
46478 SecurityError - If access to this AID or the default application in this session is not allowed. </li>
46480 InvalidStateError - If this session is closed. </li>
46482 NotFoundError - If the application of the AID does not exist in the Secure Element. </li>
46484 NoChannelError - If logical channel is unavailable. </li>
46486 UnknownError - If any other error occurs. </li>
46493 http://tizen.org/privilege/secureelement
46498 <Code> var session; //Session obtained from openSession callback
46500 function successChannel(channel) {
46501 if (channel.isBasicChannel) {
46502 console.log ("Basic channel is opened.");
46504 console.log ("Logical channel is opened.");
46507 function errorChannel(err) {
46508 console.log ("openLogicalChannel Error :" + err.name + ": " + err.message);
46511 // This aid is for test. Use aid for your applet in secure element.
46512 session.openLogicalChannel([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe], successChannel, errorChannel);
46514 console.log (err.name + ": " + err.message);
46518 <Type type="void"/>
46520 <Argument name="aid">
46523 The id of the applet to select on this channel<br/>If the array is empty, the default application is selected in this session.
46526 <Type type="array">
46527 <Type type="byte"/>
46530 <Argument name="successCallback">
46533 The method to be invoked when a logical channel has been successfully opened
46536 <Type name="ChannelSuccessCallback"/>
46538 <Argument optional="optional" name="errorCallback">
46541 The method to be called when an error occurs
46544 <Type name="ErrorCallback" nullable="nullable"/>
46548 <RaiseException name="WebAPIException">
46551 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
46554 with error type InvalidValuesError, if the AID's length is not within the limit: 5 to 16(inclusive).
46557 with error type SecurityError, if the application does not have the privilege to call this method.
46563 <Operation name="getATR" id="::SecureElement::Session::getATR">
46564 <webidl> byte[] getATR() raises(<ref>WebAPIException</ref>);</webidl>
46567 Gets the answer to reset(ATR) of a Secure Element.
46573 http://tizen.org/privilege/secureelement
46578 <Code> var session; //Session obtained from openSession callback
46580 var atr = session.getATR();
46582 console.log (err.name + ": " + err.message);
46586 <Type type="array">
46589 byte[] The ATR of a Secure Element.
46592 <Type type="byte"/>
46596 <RaiseException name="WebAPIException">
46599 with error type SecurityError, if the application does not have the privilege to call this method.
46602 with error type UnknownError, if any other error occurs.
46608 <Operation name="close" id="::SecureElement::Session::close">
46609 <webidl> void close() raises(<ref>WebAPIException</ref>);</webidl>
46618 http://tizen.org/privilege/secureelement
46623 <Code> var session; //Session obtained from openSession callback
46627 console.log (err.name + ": " + err.message);
46631 <Type type="void"/>
46634 <RaiseException name="WebAPIException">
46637 with error type SecurityError, if the application does not have the privilege to call this method.
46640 with error type UnknownError, if any other error occurs.
46646 <Operation name="closeChannels" id="::SecureElement::Session::closeChannels">
46647 <webidl> void closeChannels() raises(<ref>WebAPIException</ref>);</webidl>
46650 Closes all channels on this session.
46656 http://tizen.org/privilege/secureelement
46661 <Code> var session; //Session obtained from openSession callback
46663 session.closeChannels();
46665 console.log (err.name + ": " + err.message);
46669 <Type type="void"/>
46672 <RaiseException name="WebAPIException">
46675 with error type SecurityError, if the application does not have the privilege to call this method.
46678 with error type UnknownError in any other error case.
46685 <Interface name="Channel" id="::SecureElement::Channel">
46686 <webidl> [NoInterfaceObject] interface Channel {
46688 readonly attribute boolean isBasicChannel;
46690 void close() raises(<ref>WebAPIException</ref>);
46693 void transmit(byte[] command, <ref>TransmitSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
46697 This interface is open to a Secure Element and offers methods to send Application Protocol Data Units(APDU) to the Secure Element.
46698 The channel is defined in the ISO7816-4.
46704 <ExtendedAttributeList>
46705 <ExtendedAttribute name="NoInterfaceObject">
46706 <webidl>NoInterfaceObject</webidl>
46707 </ExtendedAttribute>
46708 </ExtendedAttributeList>
46709 <Attribute readonly="readonly" name="isBasicChannel" id="::SecureElement::Channel::isBasicChannel">
46710 <webidl> readonly attribute boolean isBasicChannel;</webidl>
46713 An attribute to check whether it is a basic channel or not.
46719 <Type type="boolean"/>
46721 <Operation name="close" id="::SecureElement::Channel::close">
46722 <webidl> void close() raises(<ref>WebAPIException</ref>);</webidl>
46731 http://tizen.org/privilege/secureelement
46736 <Code> var channel; //Obtained from openLogicalChannel or openBasicChannel
46740 console.log (err.name + ": " + err.message);
46744 <Type type="void"/>
46747 <RaiseException name="WebAPIException">
46750 with error type SecurityError, if the application does not have the privilege to call this method.
46753 with error type UnknownError, if any other error occurs.
46759 <Operation name="transmit" id="::SecureElement::Channel::transmit">
46760 <webidl> void transmit(byte[] command, <ref>TransmitSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
46763 Transmits an APDU command to a Secure Element. The APDU command is defined in ISO7816-4.
46767 Some commands that are not allowed to be sent are:
46771 MANAGE_CHANNEL commands. </li>
46773 SELECT by DF Name (p1=04). </li>
46775 The commands that CLA bytes with channel numbers are de-masked. </li>
46778 The ErrorCallback is launched with these error types:
46782 InvalidValuesError - If the command contain an invalid value. </li>
46784 IOError - An error occurred while communicating with the Secure Element in the reader. </li>
46786 SecurityError - If the command is not allowed. </li>
46788 InvalidStateError - If this channel is closed. </li>
46790 UnknownError - If any other error occurs. </li>
46797 http://tizen.org/privilege/secureelement
46803 <Type type="void"/>
46805 <Argument name="command">
46808 The APDU command to transmit through this channel
46811 <Type type="array">
46812 <Type type="byte"/>
46815 <Argument name="successCallback">
46818 The method to be invoked when a command has been successfully transmitted
46821 <Type name="TransmitSuccessCallback"/>
46823 <Argument optional="optional" name="errorCallback">
46826 The method to be called when an error occurs
46829 <Type name="ErrorCallback" nullable="nullable"/>
46833 <RaiseException name="WebAPIException">
46836 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
46839 with error type SecurityError, if the application does not have the privilege to call this method.
46846 <Interface name="SEChangeListener" id="::SecureElement::SEChangeListener">
46847 <webidl> [Callback, NoInterfaceObject] interface SEChangeListener {
46849 void onSEReady(<ref>Reader</ref> reader);
46851 void onSENotReady(<ref>Reader</ref> reader);
46855 This interface provides the success callback that is invoked when a Secure Element reader is detected or lost.
46859 It is used in <em>SEService.registerSEListener()</em>.
46866 <ExtendedAttributeList>
46867 <ExtendedAttribute name="Callback">
46868 <webidl>Callback</webidl>
46869 </ExtendedAttribute>
46870 <ExtendedAttribute name="NoInterfaceObject">
46871 <webidl> NoInterfaceObject</webidl>
46872 </ExtendedAttribute>
46873 </ExtendedAttributeList>
46874 <Operation name="onSEReady" id="::SecureElement::SEChangeListener::onSEReady">
46875 <webidl> void onSEReady(<ref>Reader</ref> reader);</webidl>
46878 Called when a Secure Element reader is detected.
46884 <Type type="void"/>
46886 <Argument name="reader">
46889 A newly detected Secure Element reader
46892 <Type name="Reader"/>
46896 <Operation name="onSENotReady" id="::SecureElement::SEChangeListener::onSENotReady">
46897 <webidl> void onSENotReady(<ref>Reader</ref> reader);</webidl>
46900 Called when a Secure Element reader is lost.
46906 <Type type="void"/>
46908 <Argument name="reader">
46911 A lost Secure Element reader
46914 <Type name="Reader"/>
46919 <Interface name="ReaderArraySuccessCallback" id="::SecureElement::ReaderArraySuccessCallback">
46920 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ReaderArraySuccessCallback {
46922 void onsuccess(<ref>Reader</ref>[] readers);
46926 This callback interface provides a success callback that is invoked when a list of available Secure Element readers is retrieved.
46930 It specifies a success method with an array of <em>Reader</em> objects as an input parameter.
46931 It is used in asynchronous operations such as <em>SEService.getReaders()</em>.
46938 <ExtendedAttributeList>
46939 <ExtendedAttribute name="Callback" value="FunctionOnly">
46940 <webidl>Callback</webidl>
46941 </ExtendedAttribute>
46942 <ExtendedAttribute name="NoInterfaceObject">
46943 <webidl> NoInterfaceObject</webidl>
46944 </ExtendedAttribute>
46945 </ExtendedAttributeList>
46946 <Operation name="onsuccess" id="::SecureElement::ReaderArraySuccessCallback::onsuccess">
46947 <webidl> void onsuccess(<ref>Reader</ref>[] readers);</webidl>
46950 Called when an asynchronous call completes successfully.
46956 <Type type="void"/>
46958 <Argument name="readers">
46961 A list of available Secure Element readers
46964 <Type type="array">
46965 <Type name="Reader"/>
46971 <Interface name="SessionSuccessCallback" id="::SecureElement::SessionSuccessCallback">
46972 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface SessionSuccessCallback {
46974 void onsuccess(<ref>Session</ref> session);
46978 This interface specifies the success callback that is invoked when a session on a specific reader is open.
46982 This callback interface specifies a success method with a <em>Session</em> object as an input parameter.
46983 It is used in asynchronous operations such as <em>Reader.openSession()</em>.
46990 <ExtendedAttributeList>
46991 <ExtendedAttribute name="Callback" value="FunctionOnly">
46992 <webidl>Callback</webidl>
46993 </ExtendedAttribute>
46994 <ExtendedAttribute name="NoInterfaceObject">
46995 <webidl> NoInterfaceObject</webidl>
46996 </ExtendedAttribute>
46997 </ExtendedAttributeList>
46998 <Operation name="onsuccess" id="::SecureElement::SessionSuccessCallback::onsuccess">
46999 <webidl> void onsuccess(<ref>Session</ref> session);</webidl>
47002 Called when an asynchronous call completes successfully.
47008 <Type type="void"/>
47010 <Argument name="session">
47016 <Type name="Session"/>
47021 <Interface name="ChannelSuccessCallback" id="::SecureElement::ChannelSuccessCallback">
47022 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ChannelSuccessCallback {
47024 void onsuccess(<ref>Channel</ref> channel);
47028 This interface specifies the success callback that is invoked when a channel is open to communicate with a specific applet.
47032 This callback interface specifies a success method with a <em>Channel</em> object as an input parameter.
47033 It is used in asynchronous operations such as <em>Session.openBasicChannel() </em>or <em>Session.openLogicalChannel()</em>.
47040 <ExtendedAttributeList>
47041 <ExtendedAttribute name="Callback" value="FunctionOnly">
47042 <webidl>Callback</webidl>
47043 </ExtendedAttribute>
47044 <ExtendedAttribute name="NoInterfaceObject">
47045 <webidl> NoInterfaceObject</webidl>
47046 </ExtendedAttribute>
47047 </ExtendedAttributeList>
47048 <Operation name="onsuccess" id="::SecureElement::ChannelSuccessCallback::onsuccess">
47049 <webidl> void onsuccess(<ref>Channel</ref> channel);</webidl>
47052 Called when an asynchronous call completes successfully.
47058 <Type type="void"/>
47060 <Argument name="channel">
47066 <Type name="Channel"/>
47071 <Interface name="TransmitSuccessCallback" id="::SecureElement::TransmitSuccessCallback">
47072 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface TransmitSuccessCallback {
47074 void onsuccess(byte[] response);
47078 This interface specifies the success callback that is invoked when <em>Channel.transmit() </em>completes successfully.
47082 This callback interface specifies a success method with an array of bytes as an input parameter. It is used in <em>Channel.transmit()</em>.
47089 <ExtendedAttributeList>
47090 <ExtendedAttribute name="Callback" value="FunctionOnly">
47091 <webidl>Callback</webidl>
47092 </ExtendedAttribute>
47093 <ExtendedAttribute name="NoInterfaceObject">
47094 <webidl> NoInterfaceObject</webidl>
47095 </ExtendedAttribute>
47096 </ExtendedAttributeList>
47097 <Operation name="onsuccess" id="::SecureElement::TransmitSuccessCallback::onsuccess">
47098 <webidl> void onsuccess(byte[] response);</webidl>
47101 Called when an asynchronous call completes successfully.
47107 <Type type="void"/>
47109 <Argument name="response">
47112 An APDU command response that is transmitted on a channel
47115 <Type type="array">
47116 <Type type="byte"/>
47123 <Module name="SystemInfo" id="::SystemInfo">
47124 <webidl>module SystemInfo {
47126 enum SystemInfoPropertyId { "BATTERY" , "CPU", "STORAGE", "DISPLAY", "DEVICE_ORIENTATION", "BUILD", "LOCALE", "NETWORK", "WIFI_NETWORK", "CELLULAR_NETWORK", "SIM", "PERIPHERAL" };
47128 enum SystemInfoNetworkType { "NONE", "2G", "2.5G", "3G", "4G", "WIFI", "ETHERNET", "UNKNOWN" };
47130 enum SystemInfoDeviceOrientationStatus { "PORTRAIT_PRIMARY", "PORTRAIT_SECONDARY", "LANDSCAPE_PRIMARY", "LANDSCAPE_SECONDARY" };
47132 enum SystemInfoSimState { "ABSENT", "INITIALIZING", "READY", "PIN_REQUIRED", "PUK_REQUIRED", "NETWORK_LOCKED", "SIM_LOCKED", "UNKNOWN" };
47134 enum SystemInfoProfile { "MOBILE_FULL", "MOBILE_WEB" };
47136 [NoInterfaceObject] interface SystemInfoObject {
47137 readonly attribute <ref>SystemInfo</ref> systeminfo;
47139 <ref>Tizen</ref> implements <ref>SystemInfoObject</ref>;
47141 [NoInterfaceObject] interface SystemInfo {
47143 <ref>SystemInfoDeviceCapability</ref> getCapabilities() raises(<ref>WebAPIException</ref>);
47145 void getPropertyValue(<ref>SystemInfoPropertyId</ref> property,
47146 <ref>SystemInfoPropertySuccessCallback</ref> successCallback,
47147 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
47149 unsigned long addPropertyValueChangeListener(<ref>SystemInfoPropertyId</ref> property,
47150 <ref>SystemInfoPropertySuccessCallback</ref> successCallback,
47151 optional <ref>SystemInfoOptions</ref>? options) raises(<ref>WebAPIException</ref>);
47153 void removePropertyValueChangeListener(unsigned long listenerId) raises(<ref>WebAPIException</ref>);
47156 [NoInterfaceObject] interface SystemInfoDeviceCapability {
47157 readonly attribute boolean bluetooth;
47159 readonly attribute boolean nfc;
47161 readonly attribute boolean nfcReservedPush ;
47163 readonly attribute unsigned short multiTouchCount;
47165 readonly attribute boolean inputKeyboard;
47167 readonly attribute boolean inputKeyboardLayout;
47169 readonly attribute boolean wifi;
47171 readonly attribute boolean wifiDirect;
47173 readonly attribute boolean opengles;
47175 readonly attribute DOMString openglestextureFormat;
47177 readonly attribute boolean openglesVersion1_1;
47179 readonly attribute boolean openglesVersion2_0;
47181 readonly attribute boolean fmRadio;
47183 readonly attribute DOMString platformVersion raises(<ref>WebAPIException</ref>);
47185 readonly attribute DOMString webApiVersion raises(<ref>WebAPIException</ref>);
47187 readonly attribute DOMString nativeApiVersion raises(<ref>WebAPIException</ref>);
47189 readonly attribute DOMString platformName;
47191 readonly attribute boolean camera;
47193 readonly attribute boolean cameraFront;
47195 readonly attribute boolean cameraFrontFlash;
47197 readonly attribute boolean cameraBack;
47199 readonly attribute boolean cameraBackFlash;
47201 readonly attribute boolean location;
47203 readonly attribute boolean locationGps;
47205 readonly attribute boolean locationWps;
47207 readonly attribute boolean microphone;
47209 readonly attribute boolean usbHost;
47211 readonly attribute boolean usbAccessory;
47213 readonly attribute boolean screenOutputRca;
47215 readonly attribute boolean screenOutputHdmi;
47217 readonly attribute DOMString platformCoreCpuArch;
47219 readonly attribute DOMString platformCoreFpuArch;
47221 readonly attribute boolean sipVoip;
47223 readonly attribute DOMString duid;
47225 readonly attribute boolean speechRecognition;
47227 readonly attribute boolean speechSynthesis;
47229 readonly attribute boolean accelerometer;
47231 readonly attribute boolean accelerometerWakeup;
47233 readonly attribute boolean barometer;
47235 readonly attribute boolean barometerWakeup;
47237 readonly attribute boolean gyroscope;
47239 readonly attribute boolean gyroscopeWakeup;
47241 readonly attribute boolean magnetometer;
47243 readonly attribute boolean magnetometerWakeup;
47245 readonly attribute boolean photometer;
47247 readonly attribute boolean photometerWakeup;
47249 readonly attribute boolean proximity;
47251 readonly attribute boolean proximityWakeup;
47253 readonly attribute boolean tiltmeter;
47255 readonly attribute boolean tiltmeterWakeup;
47257 readonly attribute boolean dataEncryption;
47259 readonly attribute boolean graphicsAcceleration;
47261 readonly attribute boolean push;
47263 readonly attribute boolean telephony;
47265 readonly attribute boolean telephonyMms;
47267 readonly attribute boolean telephonySms;
47269 readonly attribute boolean screenSizeNormal;
47271 readonly attribute boolean screenSize480_800;
47273 readonly attribute boolean screenSize720_1280;
47275 readonly attribute boolean autoRotation;
47277 readonly attribute boolean shellAppWidget;
47279 readonly attribute boolean visionImageRecognition;
47281 readonly attribute boolean visionQrcodeGeneration;
47283 readonly attribute boolean visionQrcodeRecognition;
47285 readonly attribute boolean visionFaceRecognition;
47287 readonly attribute boolean secureElement;
47289 readonly attribute boolean nativeOspCompatible;
47291 readonly attribute <ref>SystemInfoProfile</ref> profile;
47294 dictionary SystemInfoOptions {
47295 unsigned long timeout;
47297 double highThreshold;
47299 double lowThreshold;
47302 [Callback=FunctionOnly, NoInterfaceObject] interface SystemInfoPropertySuccessCallback {
47303 void onsuccess(<ref>SystemInfoProperty</ref> prop);
47306 [NoInterfaceObject] interface SystemInfoProperty {
47309 [NoInterfaceObject] interface SystemInfoBattery : <ref>SystemInfoProperty</ref> {
47310 readonly attribute double level;
47312 readonly attribute boolean isCharging;
47315 [NoInterfaceObject] interface SystemInfoCpu : <ref>SystemInfoProperty</ref> {
47316 readonly attribute double load;
47319 [NoInterfaceObject] interface SystemInfoStorage : <ref>SystemInfoProperty</ref> {
47320 readonly attribute <ref>SystemInfoStorageUnit</ref>[] units;
47323 [NoInterfaceObject] interface SystemInfoStorageUnit : <ref>SystemInfoProperty</ref> {
47324 readonly attribute DOMString type;
47326 readonly attribute unsigned long long capacity;
47328 readonly attribute unsigned long long availableCapacity;
47330 readonly attribute boolean isRemovable;
47332 readonly attribute boolean isRemoveable;
47335 [NoInterfaceObject] interface SystemInfoDisplay : <ref>SystemInfoProperty</ref> {
47336 readonly attribute unsigned long resolutionWidth;
47338 readonly attribute unsigned long resolutionHeight;
47340 readonly attribute unsigned long dotsPerInchWidth;
47342 readonly attribute unsigned long dotsPerInchHeight;
47344 readonly attribute double physicalWidth;
47346 readonly attribute double physicalHeight;
47348 readonly attribute double brightness;
47351 [NoInterfaceObject] interface SystemInfoDeviceOrientation : <ref>SystemInfoProperty</ref> {
47353 readonly attribute <ref>SystemInfoDeviceOrientationStatus</ref> status;
47354 readonly attribute boolean isAutoRotation;
47357 [NoInterfaceObject] interface SystemInfoBuild : <ref>SystemInfoProperty</ref> {
47359 readonly attribute DOMString model;
47360 readonly attribute DOMString manufacturer;
47361 readonly attribute DOMString buildVersion;
47364 [NoInterfaceObject] interface SystemInfoLocale : <ref>SystemInfoProperty</ref> {
47366 readonly attribute DOMString language;
47368 readonly attribute DOMString country;
47371 [NoInterfaceObject] interface SystemInfoNetwork : <ref>SystemInfoProperty</ref> {
47373 readonly attribute <ref>SystemInfoNetworkType</ref> networkType;
47376 [NoInterfaceObject] interface SystemInfoWifiNetwork : <ref>SystemInfoProperty</ref> {
47378 readonly attribute DOMString status;
47379 readonly attribute DOMString ssid;
47380 readonly attribute DOMString ipAddress;
47381 readonly attribute DOMString ipv6Address;
47382 readonly attribute double signalStrength;
47385 [NoInterfaceObject] interface SystemInfoCellularNetwork : <ref>SystemInfoProperty</ref> {
47387 readonly attribute DOMString status;
47388 readonly attribute DOMString apn;
47389 readonly attribute DOMString ipAddress;
47390 readonly attribute DOMString ipv6Address;
47391 readonly attribute unsigned short mcc;
47392 readonly attribute unsigned short mnc;
47393 readonly attribute unsigned short cellId;
47394 readonly attribute unsigned short lac;
47395 readonly attribute boolean isRoaming;
47396 readonly attribute boolean isFlightMode;
47397 readonly attribute DOMString imei raises(<ref>WebAPIException</ref>);
47400 [NoInterfaceObject] interface SystemInfoSIM : <ref>SystemInfoProperty</ref> {
47401 readonly attribute <ref>SystemInfoSimState</ref> state raises(<ref>WebAPIException</ref>);
47402 readonly attribute DOMString operatorName raises(<ref>WebAPIException</ref>);
47403 readonly attribute DOMString msisdn raises(<ref>WebAPIException</ref>);
47404 readonly attribute DOMString iccid raises(<ref>WebAPIException</ref>);
47405 readonly attribute unsigned short mcc raises(<ref>WebAPIException</ref>);
47406 readonly attribute unsigned short mnc raises(<ref>WebAPIException</ref>);
47407 readonly attribute DOMString msin raises(<ref>WebAPIException</ref>);
47408 readonly attribute DOMString spn raises(<ref>WebAPIException</ref>);
47411 [NoInterfaceObject] interface SystemInfoPeripheral : <ref>SystemInfoProperty</ref> {
47413 readonly attribute boolean isVideoOutputOn;
47418 This specification defines interfaces and methods that provide web applications with access to various properties of a system.
47422 This API also provides interfaces and methods that can retrieve statuses of hardware devices, get the value of selected properties, and subscribe to asynchronous notifications of changes for selected values.
47425 The following provides an overview of the tree data structure:
47437 DEVICE_ORIENTATION </li>
47447 CELLULAR_NETWORK </li>
47454 For more information on the SystemInfo features, see <a href="../../org.tizen.web.appprogramming/html/guide/sys_guide/systeminfo.htm">System Information Guide</a>.
47461 <Enum name="SystemInfoPropertyId" id="::SystemInfo::SystemInfoPropertyId">
47462 <webidl> enum SystemInfoPropertyId { "BATTERY" , "CPU", "STORAGE", "DISPLAY", "DEVICE_ORIENTATION", "BUILD", "LOCALE", "NETWORK", "WIFI_NETWORK", "CELLULAR_NETWORK", "SIM", "PERIPHERAL" };</webidl>
47465 The device property identifier.
47471 LOCALE and PERIPHERAL are supported Since 2.1
47474 <EnumValue stringvalue="BATTERY">
47475 <webidl> "BATTERY</webidl>
47477 <EnumValue stringvalue="CPU">
47478 <webidl> "CPU</webidl>
47480 <EnumValue stringvalue="STORAGE">
47481 <webidl> "STORAGE</webidl>
47483 <EnumValue stringvalue="DISPLAY">
47484 <webidl> "DISPLAY</webidl>
47486 <EnumValue stringvalue="DEVICE_ORIENTATION">
47487 <webidl> "DEVICE_ORIENTATION</webidl>
47489 <EnumValue stringvalue="BUILD">
47490 <webidl> "BUILD</webidl>
47492 <EnumValue stringvalue="LOCALE">
47493 <webidl> "LOCALE</webidl>
47495 <EnumValue stringvalue="NETWORK">
47496 <webidl> "NETWORK</webidl>
47498 <EnumValue stringvalue="WIFI_NETWORK">
47499 <webidl> "WIFI_NETWORK</webidl>
47501 <EnumValue stringvalue="CELLULAR_NETWORK">
47502 <webidl> "CELLULAR_NETWORK</webidl>
47504 <EnumValue stringvalue="SIM">
47505 <webidl> "SIM</webidl>
47507 <EnumValue stringvalue="PERIPHERAL">
47508 <webidl> "PERIPHERAL</webidl>
47511 <Enum name="SystemInfoNetworkType" id="::SystemInfo::SystemInfoNetworkType">
47512 <webidl> enum SystemInfoNetworkType { "NONE", "2G", "2.5G", "3G", "4G", "WIFI", "ETHERNET", "UNKNOWN" };</webidl>
47521 <EnumValue stringvalue="NONE">
47522 <webidl> "NONE</webidl>
47524 <EnumValue stringvalue="2G">
47525 <webidl> "2G</webidl>
47527 <EnumValue stringvalue="2.5G">
47528 <webidl> "2.5G</webidl>
47530 <EnumValue stringvalue="3G">
47531 <webidl> "3G</webidl>
47533 <EnumValue stringvalue="4G">
47534 <webidl> "4G</webidl>
47536 <EnumValue stringvalue="WIFI">
47537 <webidl> "WIFI</webidl>
47539 <EnumValue stringvalue="ETHERNET">
47540 <webidl> "ETHERNET</webidl>
47542 <EnumValue stringvalue="UNKNOWN">
47543 <webidl> "UNKNOWN</webidl>
47546 <Enum name="SystemInfoDeviceOrientationStatus" id="::SystemInfo::SystemInfoDeviceOrientationStatus">
47547 <webidl> enum SystemInfoDeviceOrientationStatus { "PORTRAIT_PRIMARY", "PORTRAIT_SECONDARY", "LANDSCAPE_PRIMARY", "LANDSCAPE_SECONDARY" };</webidl>
47550 Device Orientation Status.
47556 <EnumValue stringvalue="PORTRAIT_PRIMARY">
47557 <webidl> "PORTRAIT_PRIMARY</webidl>
47559 <EnumValue stringvalue="PORTRAIT_SECONDARY">
47560 <webidl> "PORTRAIT_SECONDARY</webidl>
47562 <EnumValue stringvalue="LANDSCAPE_PRIMARY">
47563 <webidl> "LANDSCAPE_PRIMARY</webidl>
47565 <EnumValue stringvalue="LANDSCAPE_SECONDARY">
47566 <webidl> "LANDSCAPE_SECONDARY</webidl>
47569 <Enum name="SystemInfoSimState" id="::SystemInfo::SystemInfoSimState">
47570 <webidl> enum SystemInfoSimState { "ABSENT", "INITIALIZING", "READY", "PIN_REQUIRED", "PUK_REQUIRED", "NETWORK_LOCKED", "SIM_LOCKED", "UNKNOWN" };</webidl>
47579 <EnumValue stringvalue="ABSENT">
47580 <webidl> "ABSENT</webidl>
47582 <EnumValue stringvalue="INITIALIZING">
47583 <webidl> "INITIALIZING</webidl>
47585 <EnumValue stringvalue="READY">
47586 <webidl> "READY</webidl>
47588 <EnumValue stringvalue="PIN_REQUIRED">
47589 <webidl> "PIN_REQUIRED</webidl>
47591 <EnumValue stringvalue="PUK_REQUIRED">
47592 <webidl> "PUK_REQUIRED</webidl>
47594 <EnumValue stringvalue="NETWORK_LOCKED">
47595 <webidl> "NETWORK_LOCKED</webidl>
47597 <EnumValue stringvalue="SIM_LOCKED">
47598 <webidl> "SIM_LOCKED</webidl>
47600 <EnumValue stringvalue="UNKNOWN">
47601 <webidl> "UNKNOWN</webidl>
47604 <Enum name="SystemInfoProfile" id="::SystemInfo::SystemInfoProfile">
47605 <webidl> enum SystemInfoProfile { "MOBILE_FULL", "MOBILE_WEB" };</webidl>
47614 <EnumValue stringvalue="MOBILE_FULL">
47615 <webidl> "MOBILE_FULL</webidl>
47617 <EnumValue stringvalue="MOBILE_WEB">
47618 <webidl> "MOBILE_WEB</webidl>
47621 <Interface name="SystemInfoObject" id="::SystemInfo::SystemInfoObject">
47622 <webidl> [NoInterfaceObject] interface SystemInfoObject {
47623 readonly attribute <ref>SystemInfo</ref> systeminfo;
47627 Defines what is instantiated by the <em>Tizen </em>object from the Tizen Platform.
47631 There will be a tizen.systeminfo object that allows accessing the
47632 functionality of the SystemInfo API.
47639 <ExtendedAttributeList>
47640 <ExtendedAttribute name="NoInterfaceObject">
47641 <webidl>NoInterfaceObject</webidl>
47642 </ExtendedAttribute>
47643 </ExtendedAttributeList>
47644 <Attribute readonly="readonly" name="systeminfo" id="::SystemInfo::SystemInfoObject::systeminfo">
47645 <webidl> readonly attribute <ref>SystemInfo</ref> systeminfo;</webidl>
47646 <Type name="SystemInfo"/>
47649 <Implements name1="Tizen" name2="SystemInfoObject">
47650 <webidl> <ref>Tizen</ref> implements <ref>SystemInfoObject</ref>;</webidl>
47652 <Interface name="SystemInfo" id="::SystemInfo::SystemInfo">
47653 <webidl> [NoInterfaceObject] interface SystemInfo {
47655 <ref>SystemInfoDeviceCapability</ref> getCapabilities() raises(<ref>WebAPIException</ref>);
47657 void getPropertyValue(<ref>SystemInfoPropertyId</ref> property,
47658 <ref>SystemInfoPropertySuccessCallback</ref> successCallback,
47659 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
47661 unsigned long addPropertyValueChangeListener(<ref>SystemInfoPropertyId</ref> property,
47662 <ref>SystemInfoPropertySuccessCallback</ref> successCallback,
47663 optional <ref>SystemInfoOptions</ref>? options) raises(<ref>WebAPIException</ref>);
47665 void removePropertyValueChangeListener(unsigned long listenerId) raises(<ref>WebAPIException</ref>);
47669 This entry interface queries the information of a system.
47673 This API offers methods for retrieving system information
47674 and for subscribing notifications of system information changes.
47678 <ExtendedAttributeList>
47679 <ExtendedAttribute name="NoInterfaceObject">
47680 <webidl>NoInterfaceObject</webidl>
47681 </ExtendedAttribute>
47682 </ExtendedAttributeList>
47683 <Operation name="getCapabilities" id="::SystemInfo::SystemInfo::getCapabilities">
47684 <webidl> <ref>SystemInfoDeviceCapability</ref> getCapabilities() raises(<ref>WebAPIException</ref>);</webidl>
47687 Gets the capabilities of the device.
47691 The function must synchronously acquire the capabilities of the device.
47697 <Code> var deviceCapabilities;
47698 deviceCapabilities = tizen.systeminfo.getCapabilities();
47699 if (deviceCapabilities.bluetooth)
47701 console.log("Bluetooth is supported");
47705 <Type name="SystemInfoDeviceCapability"/>
47708 <RaiseException name="WebAPIException">
47711 with error type NotSupportedError, if this feature is not supported.
47714 with error type SecurityError, if this functionality is not allowed.
47717 with error type UnknownError in any other error case.
47723 <Operation name="getPropertyValue" id="::SystemInfo::SystemInfo::getPropertyValue">
47724 <webidl> void getPropertyValue(<ref>SystemInfoPropertyId</ref> property,
47725 <ref>SystemInfoPropertySuccessCallback</ref> successCallback,
47726 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
47729 Gets the current value of a specified system property.
47733 The function must asynchronously acquire the current value of the requested property. If it is successful,
47734 the successCallback must be invoked with an object containing the information provided by the property.
47737 The <em>errorCallback() </em>can be launched with any of these error types:
47741 UnknownError - If any other error occurs. </li>
47747 <Code> function onSuccessCallback(battery) {
47748 console.log("The battery level is " + battery.level);
47751 function onErrorCallback(error) {
47752 console.log("An error occurred " + error.message);
47755 tizen.systeminfo.getPropertyValue("BATTERY", onSuccessCallback, onErrorCallback);
47758 <Type type="void"/>
47760 <Argument name="property">
47763 The name of the property to retrieve.
47766 <Type name="SystemInfoPropertyId"/>
47768 <Argument name="successCallback">
47771 Function called when the properties have been successfully retrieved.
47774 <Type name="SystemInfoPropertySuccessCallback"/>
47776 <Argument optional="optional" name="errorCallback">
47779 Function called when an error occurred while retrieving the properties.
47782 <Type name="ErrorCallback" nullable="nullable"/>
47786 <RaiseException name="WebAPIException">
47789 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
47792 with error type SecurityError, if this functionality is not allowed.
47795 with error type UnknownError in any other error case.
47801 <Operation name="addPropertyValueChangeListener" id="::SystemInfo::SystemInfo::addPropertyValueChangeListener">
47802 <webidl> unsigned long addPropertyValueChangeListener(<ref>SystemInfoPropertyId</ref> property,
47803 <ref>SystemInfoPropertySuccessCallback</ref> successCallback,
47804 optional <ref>SystemInfoOptions</ref>? options) raises(<ref>WebAPIException</ref>);</webidl>
47807 Adds a listener to allow tracking of changes in one or more system properties.
47811 When called, it immediately returns and then asynchronously starts a watch process defined by the following steps:
47814 1. Register the successCallback to receive system events that the status of the requested properties may have changed.
47817 2. When a system event is successfully received invoke the associated successCallback with an object containing the property
47821 3. Repeat step 2 until removePropertyValueChangeListener function is called.
47824 If property value is 'BUILD', listener would not be registered because 'BUILD' property's value is a fixed value.
47830 <Code> function onSuccessCallback(battery) {
47831 console.log("Low battery: " + battery.level);
47835 tizen.systeminfo.addPropertyValueChangeListener("BATTERY", onSuccessCallback, {lowThreshold : 0.2});
47838 <Type type="unsigned long">
47841 unsigned long An identifier used to clear the watch subscription.
47846 <Argument name="property">
47849 The name of the property to retrieve.
47852 <Type name="SystemInfoPropertyId"/>
47854 <Argument name="successCallback">
47857 Function called when the properties have been successfully retrieved.
47860 <Type name="SystemInfoPropertySuccessCallback"/>
47862 <Argument optional="optional" name="options">
47865 An object containing the various options for fetching the properties requested.
47868 <Type name="SystemInfoOptions" nullable="nullable"/>
47872 <RaiseException name="WebAPIException">
47875 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
47878 with error type NotSupportedError, if this feature is not supported.
47881 with error type InvalidValuesError, if any of the input
47882 parameters contain an invalid value.
47885 with error type SecurityError, if this functionality is not allowed.
47888 with error type UnknownError in any other error case.
47894 <Operation name="removePropertyValueChangeListener" id="::SystemInfo::SystemInfo::removePropertyValueChangeListener">
47895 <webidl> void removePropertyValueChangeListener(unsigned long listenerId) raises(<ref>WebAPIException</ref>);</webidl>
47898 Unsubscribes notifications for property changes set up by addPropertyValueChangeListener.
47902 If a valid listenerId argument is passed that corresponds to a subscription
47903 already place, then the watch process MUST immediately terminate and no further
47904 callback is invoked. If the listenerId argument does not correspond to a valid subscription,
47905 the method should return without any further action.
47911 <Code> var id = null;
47912 function onSuccessCallback(battery) {
47913 console.log("New value for Battery level is " + battery.level);
47914 if (id != null) { // After receiving the first notification, we clear it
47915 tizen.systeminfo.removePropertyValueChangeListener(id);
47919 id = tizen.systeminfo.addPropertyValueChangeListener("BATTERY", onSuccessCallback);
47922 <Type type="void"/>
47924 <Argument name="listenerId">
47927 An identifier of the subscription returned by the addPropertyValueChangeListener() method.
47930 <Type type="unsigned long"/>
47934 <RaiseException name="WebAPIException">
47937 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
47940 with error type NotSupportedError, if this feature is not supported.
47943 with error type InvalidValuesError, if any of the input
47944 parameters contain an invalid value.
47947 with error type SecurityError, if this functionality is not allowed.
47950 with error type UnknownError in any other error case.
47957 <Interface name="SystemInfoDeviceCapability" id="::SystemInfo::SystemInfoDeviceCapability">
47958 <webidl> [NoInterfaceObject] interface SystemInfoDeviceCapability {
47959 readonly attribute boolean bluetooth;
47961 readonly attribute boolean nfc;
47963 readonly attribute boolean nfcReservedPush ;
47965 readonly attribute unsigned short multiTouchCount;
47967 readonly attribute boolean inputKeyboard;
47969 readonly attribute boolean inputKeyboardLayout;
47971 readonly attribute boolean wifi;
47973 readonly attribute boolean wifiDirect;
47975 readonly attribute boolean opengles;
47977 readonly attribute DOMString openglestextureFormat;
47979 readonly attribute boolean openglesVersion1_1;
47981 readonly attribute boolean openglesVersion2_0;
47983 readonly attribute boolean fmRadio;
47985 readonly attribute DOMString platformVersion raises(<ref>WebAPIException</ref>);
47987 readonly attribute DOMString webApiVersion raises(<ref>WebAPIException</ref>);
47989 readonly attribute DOMString nativeApiVersion raises(<ref>WebAPIException</ref>);
47991 readonly attribute DOMString platformName;
47993 readonly attribute boolean camera;
47995 readonly attribute boolean cameraFront;
47997 readonly attribute boolean cameraFrontFlash;
47999 readonly attribute boolean cameraBack;
48001 readonly attribute boolean cameraBackFlash;
48003 readonly attribute boolean location;
48005 readonly attribute boolean locationGps;
48007 readonly attribute boolean locationWps;
48009 readonly attribute boolean microphone;
48011 readonly attribute boolean usbHost;
48013 readonly attribute boolean usbAccessory;
48015 readonly attribute boolean screenOutputRca;
48017 readonly attribute boolean screenOutputHdmi;
48019 readonly attribute DOMString platformCoreCpuArch;
48021 readonly attribute DOMString platformCoreFpuArch;
48023 readonly attribute boolean sipVoip;
48025 readonly attribute DOMString duid;
48027 readonly attribute boolean speechRecognition;
48029 readonly attribute boolean speechSynthesis;
48031 readonly attribute boolean accelerometer;
48033 readonly attribute boolean accelerometerWakeup;
48035 readonly attribute boolean barometer;
48037 readonly attribute boolean barometerWakeup;
48039 readonly attribute boolean gyroscope;
48041 readonly attribute boolean gyroscopeWakeup;
48043 readonly attribute boolean magnetometer;
48045 readonly attribute boolean magnetometerWakeup;
48047 readonly attribute boolean photometer;
48049 readonly attribute boolean photometerWakeup;
48051 readonly attribute boolean proximity;
48053 readonly attribute boolean proximityWakeup;
48055 readonly attribute boolean tiltmeter;
48057 readonly attribute boolean tiltmeterWakeup;
48059 readonly attribute boolean dataEncryption;
48061 readonly attribute boolean graphicsAcceleration;
48063 readonly attribute boolean push;
48065 readonly attribute boolean telephony;
48067 readonly attribute boolean telephonyMms;
48069 readonly attribute boolean telephonySms;
48071 readonly attribute boolean screenSizeNormal;
48073 readonly attribute boolean screenSize480_800;
48075 readonly attribute boolean screenSize720_1280;
48077 readonly attribute boolean autoRotation;
48079 readonly attribute boolean shellAppWidget;
48081 readonly attribute boolean visionImageRecognition;
48083 readonly attribute boolean visionQrcodeGeneration;
48085 readonly attribute boolean visionQrcodeRecognition;
48087 readonly attribute boolean visionFaceRecognition;
48089 readonly attribute boolean secureElement;
48091 readonly attribute boolean nativeOspCompatible;
48093 readonly attribute <ref>SystemInfoProfile</ref> profile;
48097 SystemInfoDeviceCapability object.
48103 <ExtendedAttributeList>
48104 <ExtendedAttribute name="NoInterfaceObject">
48105 <webidl>NoInterfaceObject</webidl>
48106 </ExtendedAttribute>
48107 </ExtendedAttributeList>
48108 <Attribute readonly="readonly" name="bluetooth" id="::SystemInfo::SystemInfoDeviceCapability::bluetooth">
48109 <webidl> readonly attribute boolean bluetooth;</webidl>
48112 Indicates whether the device supports Bluetooth.
48118 <Type type="boolean"/>
48120 <Attribute readonly="readonly" name="nfc" id="::SystemInfo::SystemInfoDeviceCapability::nfc">
48121 <webidl> readonly attribute boolean nfc;</webidl>
48124 Indicates whether the device supports NFC.
48130 <Type type="boolean"/>
48132 <Attribute readonly="readonly" name="nfcReservedPush" id="::SystemInfo::SystemInfoDeviceCapability::nfcReservedPush">
48133 <webidl> readonly attribute boolean nfcReservedPush ;</webidl>
48136 Indicates whether the device supports NFC reserved push.
48142 <Type type="boolean"/>
48144 <Attribute readonly="readonly" name="multiTouchCount" id="::SystemInfo::SystemInfoDeviceCapability::multiTouchCount">
48145 <webidl> readonly attribute unsigned short multiTouchCount;</webidl>
48148 The number of point in Multi-point touch.
48154 <Type type="unsigned short"/>
48156 <Attribute readonly="readonly" name="inputKeyboard" id="::SystemInfo::SystemInfoDeviceCapability::inputKeyboard">
48157 <webidl> readonly attribute boolean inputKeyboard;</webidl>
48160 Indicates whether the device supports the built-in Keyboard.
48166 <Type type="boolean"/>
48168 <Attribute readonly="readonly" name="inputKeyboardLayout" id="::SystemInfo::SystemInfoDeviceCapability::inputKeyboardLayout">
48169 <webidl> readonly attribute boolean inputKeyboardLayout;</webidl>
48172 Indicates whether the device supports the built-in keyboard layout.
48178 <Type type="boolean"/>
48180 <Attribute readonly="readonly" name="wifi" id="::SystemInfo::SystemInfoDeviceCapability::wifi">
48181 <webidl> readonly attribute boolean wifi;</webidl>
48184 Indicates whether the device supports Wi-Fi.
48190 <Type type="boolean"/>
48192 <Attribute readonly="readonly" name="wifiDirect" id="::SystemInfo::SystemInfoDeviceCapability::wifiDirect">
48193 <webidl> readonly attribute boolean wifiDirect;</webidl>
48196 Indicates whether the device supports Wi-Fi direct.
48202 <Type type="boolean"/>
48204 <Attribute readonly="readonly" name="opengles" id="::SystemInfo::SystemInfoDeviceCapability::opengles">
48205 <webidl> readonly attribute boolean opengles;</webidl>
48208 Indicates whether the device supports OpenGL-ES.
48214 <Type type="boolean"/>
48216 <Attribute readonly="readonly" name="openglestextureFormat" id="::SystemInfo::SystemInfoDeviceCapability::openglestextureFormat">
48217 <webidl> readonly attribute DOMString openglestextureFormat;</webidl>
48220 The device 3DC texture format for OpenGL-ES.
48221 One example of possible output is as follows: "3dc/atc/etc/ptc/pvrtc/utc"
48227 <Type type="DOMString"/>
48229 <Attribute readonly="readonly" name="openglesVersion1_1" id="::SystemInfo::SystemInfoDeviceCapability::openglesVersion1_1">
48230 <webidl> readonly attribute boolean openglesVersion1_1;</webidl>
48233 Indicates whether the device supports OpenGL-ES version 1.1.
48239 <Type type="boolean"/>
48241 <Attribute readonly="readonly" name="openglesVersion2_0" id="::SystemInfo::SystemInfoDeviceCapability::openglesVersion2_0">
48242 <webidl> readonly attribute boolean openglesVersion2_0;</webidl>
48245 Indicates whether the device supports OpenGL-ES version 2.0.
48251 <Type type="boolean"/>
48253 <Attribute readonly="readonly" name="fmRadio" id="::SystemInfo::SystemInfoDeviceCapability::fmRadio">
48254 <webidl> readonly attribute boolean fmRadio;</webidl>
48257 Indicates whether the device supports FM radio.
48263 <Type type="boolean"/>
48265 <Attribute readonly="readonly" name="platformVersion" id="::SystemInfo::SystemInfoDeviceCapability::platformVersion">
48266 <webidl> readonly attribute DOMString platformVersion raises(<ref>WebAPIException</ref>);</webidl>
48269 The version of the platform in the <em>[Major].[Minor].[Patch Version] </em> format. <br/>For example, <var>1.0.0 </var> represents a platform version where the major version is <var>1 </var>and the minor and build versions are <var>0</var>.
48278 http://tizen.org/privilege/system
48281 <Type type="DOMString"/>
48283 <RaiseException name="WebAPIException">
48286 with error type SecurityError, if this attribute is not allowed.
48292 <Attribute readonly="readonly" name="webApiVersion" id="::SystemInfo::SystemInfoDeviceCapability::webApiVersion">
48293 <webidl> readonly attribute DOMString webApiVersion raises(<ref>WebAPIException</ref>);</webidl>
48296 The version of the Web API in the <em>[Major].[Minor] </em> format. <br/>For example, <var>1.0 </var>represents a web api version where the major version is <var>1 </var> and the minor version is <var>0</var>.
48305 http://tizen.org/privilege/system
48308 <Type type="DOMString"/>
48310 <RaiseException name="WebAPIException">
48313 with error type SecurityError, if this attribute is not allowed.
48319 <Attribute readonly="readonly" name="nativeApiVersion" id="::SystemInfo::SystemInfoDeviceCapability::nativeApiVersion">
48320 <webidl> readonly attribute DOMString nativeApiVersion raises(<ref>WebAPIException</ref>);</webidl>
48323 The version of the native API in the <em>[Major].[Minor] </em>format.<br/>For example, <var>1.0</var> represents a native api version where the major version is <var>1 </var>and the minor version is <var>0</var>.
48332 http://tizen.org/privilege/system
48335 <Type type="DOMString"/>
48337 <RaiseException name="WebAPIException">
48340 with error type SecurityError, if this attribute is not allowed.
48346 <Attribute readonly="readonly" name="platformName" id="::SystemInfo::SystemInfoDeviceCapability::platformName">
48347 <webidl> readonly attribute DOMString platformName;</webidl>
48350 The name of the platform.
48356 <Type type="DOMString"/>
48358 <Attribute readonly="readonly" name="camera" id="::SystemInfo::SystemInfoDeviceCapability::camera">
48359 <webidl> readonly attribute boolean camera;</webidl>
48362 Indicates whether the device supports camera.
48368 <Type type="boolean"/>
48370 <Attribute readonly="readonly" name="cameraFront" id="::SystemInfo::SystemInfoDeviceCapability::cameraFront">
48371 <webidl> readonly attribute boolean cameraFront;</webidl>
48374 Indicates whether the device supports front camera.
48380 <Type type="boolean"/>
48382 <Attribute readonly="readonly" name="cameraFrontFlash" id="::SystemInfo::SystemInfoDeviceCapability::cameraFrontFlash">
48383 <webidl> readonly attribute boolean cameraFrontFlash;</webidl>
48386 Indicates whether the device supports flash on the front camera.
48392 <Type type="boolean"/>
48394 <Attribute readonly="readonly" name="cameraBack" id="::SystemInfo::SystemInfoDeviceCapability::cameraBack">
48395 <webidl> readonly attribute boolean cameraBack;</webidl>
48398 Indicates whether the device supports back-side camera.
48404 <Type type="boolean"/>
48406 <Attribute readonly="readonly" name="cameraBackFlash" id="::SystemInfo::SystemInfoDeviceCapability::cameraBackFlash">
48407 <webidl> readonly attribute boolean cameraBackFlash;</webidl>
48410 Indicates whether the device supports flash on the back-side camera.
48416 <Type type="boolean"/>
48418 <Attribute readonly="readonly" name="location" id="::SystemInfo::SystemInfoDeviceCapability::location">
48419 <webidl> readonly attribute boolean location;</webidl>
48422 Indicates whether the device supports CPS or not.
48428 <Type type="boolean"/>
48430 <Attribute readonly="readonly" name="locationGps" id="::SystemInfo::SystemInfoDeviceCapability::locationGps">
48431 <webidl> readonly attribute boolean locationGps;</webidl>
48434 Indicates whether the device supports GPS based location feature.
48440 <Type type="boolean"/>
48442 <Attribute readonly="readonly" name="locationWps" id="::SystemInfo::SystemInfoDeviceCapability::locationWps">
48443 <webidl> readonly attribute boolean locationWps;</webidl>
48446 Indicates whether the device supports WPS based location feature.
48452 <Type type="boolean"/>
48454 <Attribute readonly="readonly" name="microphone" id="::SystemInfo::SystemInfoDeviceCapability::microphone">
48455 <webidl> readonly attribute boolean microphone;</webidl>
48458 Indicates whether the device supports microphone.
48464 <Type type="boolean"/>
48466 <Attribute readonly="readonly" name="usbHost" id="::SystemInfo::SystemInfoDeviceCapability::usbHost">
48467 <webidl> readonly attribute boolean usbHost;</webidl>
48470 Indicates whether the device supports USB host.
48476 <Type type="boolean"/>
48478 <Attribute readonly="readonly" name="usbAccessory" id="::SystemInfo::SystemInfoDeviceCapability::usbAccessory">
48479 <webidl> readonly attribute boolean usbAccessory;</webidl>
48482 Indicates whether the device supports USB accessory.
48488 <Type type="boolean"/>
48490 <Attribute readonly="readonly" name="screenOutputRca" id="::SystemInfo::SystemInfoDeviceCapability::screenOutputRca">
48491 <webidl> readonly attribute boolean screenOutputRca;</webidl>
48494 Indicates whether the device supports RCA output.
48500 <Type type="boolean"/>
48502 <Attribute readonly="readonly" name="screenOutputHdmi" id="::SystemInfo::SystemInfoDeviceCapability::screenOutputHdmi">
48503 <webidl> readonly attribute boolean screenOutputHdmi;</webidl>
48506 Indicates whether the device supports HDMI output.
48512 <Type type="boolean"/>
48514 <Attribute readonly="readonly" name="platformCoreCpuArch" id="::SystemInfo::SystemInfoDeviceCapability::platformCoreCpuArch">
48515 <webidl> readonly attribute DOMString platformCoreCpuArch;</webidl>
48518 The device CPU architecture.
48519 The possible values for this attribute are: armv6, armv7, x86.
48525 <Type type="DOMString"/>
48527 <Attribute readonly="readonly" name="platformCoreFpuArch" id="::SystemInfo::SystemInfoDeviceCapability::platformCoreFpuArch">
48528 <webidl> readonly attribute DOMString platformCoreFpuArch;</webidl>
48531 The device FPU architecture.
48532 The possible values for this attribute are: vfpv3 / sse2 / sse3 / ssse3.
48538 <Type type="DOMString"/>
48540 <Attribute readonly="readonly" name="sipVoip" id="::SystemInfo::SystemInfoDeviceCapability::sipVoip">
48541 <webidl> readonly attribute boolean sipVoip;</webidl>
48544 Indicates whether the device supports VOIP.
48550 <Type type="boolean"/>
48552 <Attribute readonly="readonly" name="duid" id="::SystemInfo::SystemInfoDeviceCapability::duid">
48553 <webidl> readonly attribute DOMString duid;</webidl>
48556 The device unique ID.
48562 <Type type="DOMString"/>
48564 <Attribute readonly="readonly" name="speechRecognition" id="::SystemInfo::SystemInfoDeviceCapability::speechRecognition">
48565 <webidl> readonly attribute boolean speechRecognition;</webidl>
48568 Indicates whether the device supports speech recognition.
48574 <Type type="boolean"/>
48576 <Attribute readonly="readonly" name="speechSynthesis" id="::SystemInfo::SystemInfoDeviceCapability::speechSynthesis">
48577 <webidl> readonly attribute boolean speechSynthesis;</webidl>
48580 Indicates whether the device supports speech synthesis.
48586 <Type type="boolean"/>
48588 <Attribute readonly="readonly" name="accelerometer" id="::SystemInfo::SystemInfoDeviceCapability::accelerometer">
48589 <webidl> readonly attribute boolean accelerometer;</webidl>
48592 Indicates whether the device supports Accelerometer sensor.
48598 <Type type="boolean"/>
48600 <Attribute readonly="readonly" name="accelerometerWakeup" id="::SystemInfo::SystemInfoDeviceCapability::accelerometerWakeup">
48601 <webidl> readonly attribute boolean accelerometerWakeup;</webidl>
48604 Indicates whether the device supports Accelerometer sensor wake-up feature.
48610 <Type type="boolean"/>
48612 <Attribute readonly="readonly" name="barometer" id="::SystemInfo::SystemInfoDeviceCapability::barometer">
48613 <webidl> readonly attribute boolean barometer;</webidl>
48616 Indicates whether the device supports Barometer sensor.
48622 <Type type="boolean"/>
48624 <Attribute readonly="readonly" name="barometerWakeup" id="::SystemInfo::SystemInfoDeviceCapability::barometerWakeup">
48625 <webidl> readonly attribute boolean barometerWakeup;</webidl>
48628 Indicates whether the device supports Barometer sensor wake-up feature.
48634 <Type type="boolean"/>
48636 <Attribute readonly="readonly" name="gyroscope" id="::SystemInfo::SystemInfoDeviceCapability::gyroscope">
48637 <webidl> readonly attribute boolean gyroscope;</webidl>
48640 Indicates whether the device supports Gyroscope sensor.
48646 <Type type="boolean"/>
48648 <Attribute readonly="readonly" name="gyroscopeWakeup" id="::SystemInfo::SystemInfoDeviceCapability::gyroscopeWakeup">
48649 <webidl> readonly attribute boolean gyroscopeWakeup;</webidl>
48652 Indicates whether the device supports Gyroscope sensor wake-up feature.
48658 <Type type="boolean"/>
48660 <Attribute readonly="readonly" name="magnetometer" id="::SystemInfo::SystemInfoDeviceCapability::magnetometer">
48661 <webidl> readonly attribute boolean magnetometer;</webidl>
48664 Indicates whether the device supports Magnetometer sensor.
48670 <Type type="boolean"/>
48672 <Attribute readonly="readonly" name="magnetometerWakeup" id="::SystemInfo::SystemInfoDeviceCapability::magnetometerWakeup">
48673 <webidl> readonly attribute boolean magnetometerWakeup;</webidl>
48676 Indicates whether the device supports Magnetometer sensor wake-up feature.
48682 <Type type="boolean"/>
48684 <Attribute readonly="readonly" name="photometer" id="::SystemInfo::SystemInfoDeviceCapability::photometer">
48685 <webidl> readonly attribute boolean photometer;</webidl>
48688 Indicates whether the device supports Photometer sensor.
48694 <Type type="boolean"/>
48696 <Attribute readonly="readonly" name="photometerWakeup" id="::SystemInfo::SystemInfoDeviceCapability::photometerWakeup">
48697 <webidl> readonly attribute boolean photometerWakeup;</webidl>
48700 Indicates whether the device supports Photometer sensor wake-up feature.
48706 <Type type="boolean"/>
48708 <Attribute readonly="readonly" name="proximity" id="::SystemInfo::SystemInfoDeviceCapability::proximity">
48709 <webidl> readonly attribute boolean proximity;</webidl>
48712 Indicates whether the device supports Proximity sensor.
48718 <Type type="boolean"/>
48720 <Attribute readonly="readonly" name="proximityWakeup" id="::SystemInfo::SystemInfoDeviceCapability::proximityWakeup">
48721 <webidl> readonly attribute boolean proximityWakeup;</webidl>
48724 Indicates whether the device supports Proximity sensor wake-up feature.
48730 <Type type="boolean"/>
48732 <Attribute readonly="readonly" name="tiltmeter" id="::SystemInfo::SystemInfoDeviceCapability::tiltmeter">
48733 <webidl> readonly attribute boolean tiltmeter;</webidl>
48736 Indicates whether the device supports Tiltmeter sensor.
48742 <Type type="boolean"/>
48744 <Attribute readonly="readonly" name="tiltmeterWakeup" id="::SystemInfo::SystemInfoDeviceCapability::tiltmeterWakeup">
48745 <webidl> readonly attribute boolean tiltmeterWakeup;</webidl>
48748 Indicates whether the device supports Tiltmeter sensor wake-up feature.
48754 <Type type="boolean"/>
48756 <Attribute readonly="readonly" name="dataEncryption" id="::SystemInfo::SystemInfoDeviceCapability::dataEncryption">
48757 <webidl> readonly attribute boolean dataEncryption;</webidl>
48760 Indicates whether the device supports data encryption.
48766 <Type type="boolean"/>
48768 <Attribute readonly="readonly" name="graphicsAcceleration" id="::SystemInfo::SystemInfoDeviceCapability::graphicsAcceleration">
48769 <webidl> readonly attribute boolean graphicsAcceleration;</webidl>
48772 Indicates whether the device supports hardware acceleration for 2D/3D graphics.
48778 <Type type="boolean"/>
48780 <Attribute readonly="readonly" name="push" id="::SystemInfo::SystemInfoDeviceCapability::push">
48781 <webidl> readonly attribute boolean push;</webidl>
48784 Indicates whether the device supports push service.
48790 <Type type="boolean"/>
48792 <Attribute readonly="readonly" name="telephony" id="::SystemInfo::SystemInfoDeviceCapability::telephony">
48793 <webidl> readonly attribute boolean telephony;</webidl>
48796 Indicates whether the device supports the telephony feature.
48802 <Type type="boolean"/>
48804 <Attribute readonly="readonly" name="telephonyMms" id="::SystemInfo::SystemInfoDeviceCapability::telephonyMms">
48805 <webidl> readonly attribute boolean telephonyMms;</webidl>
48808 Indicates whether the device supports the mms feature.
48814 <Type type="boolean"/>
48816 <Attribute readonly="readonly" name="telephonySms" id="::SystemInfo::SystemInfoDeviceCapability::telephonySms">
48817 <webidl> readonly attribute boolean telephonySms;</webidl>
48820 Indicates whether the device supports the sms feature.
48826 <Type type="boolean"/>
48828 <Attribute readonly="readonly" name="screenSizeNormal" id="::SystemInfo::SystemInfoDeviceCapability::screenSizeNormal">
48829 <webidl> readonly attribute boolean screenSizeNormal;</webidl>
48832 Indicates whether the device supports the screen normal size.
48838 <Type type="boolean"/>
48840 <Attribute readonly="readonly" name="screenSize480_800" id="::SystemInfo::SystemInfoDeviceCapability::screenSize480_800">
48841 <webidl> readonly attribute boolean screenSize480_800;</webidl>
48844 Indicates whether the device supports the 480 * 800 screen size.
48850 <Type type="boolean"/>
48852 <Attribute readonly="readonly" name="screenSize720_1280" id="::SystemInfo::SystemInfoDeviceCapability::screenSize720_1280">
48853 <webidl> readonly attribute boolean screenSize720_1280;</webidl>
48856 Indicates whether the device supports the 720 * 1280 screen size.
48862 <Type type="boolean"/>
48864 <Attribute readonly="readonly" name="autoRotation" id="::SystemInfo::SystemInfoDeviceCapability::autoRotation">
48865 <webidl> readonly attribute boolean autoRotation;</webidl>
48868 Indicates whether the device supports auto rotation.
48874 <Type type="boolean"/>
48876 <Attribute readonly="readonly" name="shellAppWidget" id="::SystemInfo::SystemInfoDeviceCapability::shellAppWidget">
48877 <webidl> readonly attribute boolean shellAppWidget;</webidl>
48880 Indicates whether the device supports shell app widget.
48886 <Type type="boolean"/>
48888 <Attribute readonly="readonly" name="visionImageRecognition" id="::SystemInfo::SystemInfoDeviceCapability::visionImageRecognition">
48889 <webidl> readonly attribute boolean visionImageRecognition;</webidl>
48892 Indicates whether the device supports vision image recognition.
48898 <Type type="boolean"/>
48900 <Attribute readonly="readonly" name="visionQrcodeGeneration" id="::SystemInfo::SystemInfoDeviceCapability::visionQrcodeGeneration">
48901 <webidl> readonly attribute boolean visionQrcodeGeneration;</webidl>
48904 Indicates whether the device supports vision qrcode generation.
48910 <Type type="boolean"/>
48912 <Attribute readonly="readonly" name="visionQrcodeRecognition" id="::SystemInfo::SystemInfoDeviceCapability::visionQrcodeRecognition">
48913 <webidl> readonly attribute boolean visionQrcodeRecognition;</webidl>
48916 Indicates whether the device supports vision qrcode recognition.
48922 <Type type="boolean"/>
48924 <Attribute readonly="readonly" name="visionFaceRecognition" id="::SystemInfo::SystemInfoDeviceCapability::visionFaceRecognition">
48925 <webidl> readonly attribute boolean visionFaceRecognition;</webidl>
48928 Indicates whether the device supports vision face recognition.
48934 <Type type="boolean"/>
48936 <Attribute readonly="readonly" name="secureElement" id="::SystemInfo::SystemInfoDeviceCapability::secureElement">
48937 <webidl> readonly attribute boolean secureElement;</webidl>
48940 Indicates whether the device supports secure element.
48946 <Type type="boolean"/>
48948 <Attribute readonly="readonly" name="nativeOspCompatible" id="::SystemInfo::SystemInfoDeviceCapability::nativeOspCompatible">
48949 <webidl> readonly attribute boolean nativeOspCompatible;</webidl>
48952 Indicates whether the device supports native osp API.
48958 <Type type="boolean"/>
48960 <Attribute readonly="readonly" name="profile" id="::SystemInfo::SystemInfoDeviceCapability::profile">
48961 <webidl> readonly attribute <ref>SystemInfoProfile</ref> profile;</webidl>
48964 Represents the profile of the current device.
48970 <Type name="SystemInfoProfile"/>
48973 <Dictionary name="SystemInfoOptions" id="::SystemInfo::SystemInfoOptions">
48974 <webidl> dictionary SystemInfoOptions {
48975 unsigned long timeout;
48977 double highThreshold;
48979 double lowThreshold;
48983 An object containing the various options for fetching the properties requested.
48989 <DictionaryMember name="timeout" id="::SystemInfo::SystemInfoOptions::timeout">
48990 <webidl> unsigned long timeout;</webidl>
48993 The number of milliseconds beyond which the operation must be interrupted.
48999 <Type type="unsigned long"/>
49000 </DictionaryMember>
49001 <DictionaryMember name="highThreshold" id="::SystemInfo::SystemInfoOptions::highThreshold">
49002 <webidl> double highThreshold;</webidl>
49005 An attribute to indicate that the <em>successCallback()</em> method in the watch
49006 operation will be triggered only if the device property is a number and its value is greater than or equal to this number.
49007 This attribute has no effect on the <em>get()</em> method.
49013 <Type type="double"/>
49014 </DictionaryMember>
49015 <DictionaryMember name="lowThreshold" id="::SystemInfo::SystemInfoOptions::lowThreshold">
49016 <webidl> double lowThreshold;</webidl>
49019 An attribute to indicate that the <em>successCallback()</em> method in the watch operation must be triggered only if the property is a number and its value is lower than or equal to this number.
49020 If both <em>highThreshold </em>and <em>lowThreshold </em>parameters are specified, the <em>successCallback()</em> is triggered if and only if the property value is either lower than the value of <em>lowThreshold</em> or higher than the value of <em>highThreshold</em>.
49021 This attribute has no effect on the get method.
49027 <Type type="double"/>
49028 </DictionaryMember>
49030 <Interface name="SystemInfoPropertySuccessCallback" id="::SystemInfo::SystemInfoPropertySuccessCallback">
49031 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface SystemInfoPropertySuccessCallback {
49032 void onsuccess(<ref>SystemInfoProperty</ref> prop);
49036 Systemfinfo specific success callback.
49040 This callback interface specifies a success callback with SystemInfoProperty as input argument.
49041 It is used in asynchronous
49042 operations, such as getPropertyValue() or addPropertyValueChangeListener()
49049 <ExtendedAttributeList>
49050 <ExtendedAttribute name="Callback" value="FunctionOnly">
49051 <webidl>Callback</webidl>
49052 </ExtendedAttribute>
49053 <ExtendedAttribute name="NoInterfaceObject">
49054 <webidl> NoInterfaceObject</webidl>
49055 </ExtendedAttribute>
49056 </ExtendedAttributeList>
49057 <Operation name="onsuccess" id="::SystemInfo::SystemInfoPropertySuccessCallback::onsuccess">
49058 <webidl> void onsuccess(<ref>SystemInfoProperty</ref> prop);</webidl>
49061 Method invoked when the asynchronous call completes successfully.
49067 <Type type="void"/>
49069 <Argument name="prop">
49072 The property returned from a successful asynchronous operation.
49075 <Type name="SystemInfoProperty"/>
49080 <Interface name="SystemInfoProperty" id="::SystemInfo::SystemInfoProperty">
49081 <webidl> [NoInterfaceObject] interface SystemInfoProperty {
49085 This is a common abstract interface used by different types of system information objects.
49091 <ExtendedAttributeList>
49092 <ExtendedAttribute name="NoInterfaceObject">
49093 <webidl>NoInterfaceObject</webidl>
49094 </ExtendedAttribute>
49095 </ExtendedAttributeList>
49097 <Interface name="SystemInfoBattery" id="::SystemInfo::SystemInfoBattery">
49098 <webidl> [NoInterfaceObject] interface SystemInfoBattery : <ref>SystemInfoProperty</ref> {
49099 readonly attribute double level;
49101 readonly attribute boolean isCharging;
49105 This property reflects the general state of the system's battery
49111 <ExtendedAttributeList>
49112 <ExtendedAttribute name="NoInterfaceObject">
49113 <webidl>NoInterfaceObject</webidl>
49114 </ExtendedAttribute>
49115 </ExtendedAttributeList>
49116 <InterfaceInheritance>
49117 <Name name="SystemInfoProperty"/>
49118 </InterfaceInheritance>
49119 <Attribute readonly="readonly" name="level" id="::SystemInfo::SystemInfoBattery::level">
49120 <webidl> readonly attribute double level;</webidl>
49123 An attribute to specify the remaining level of an internal battery, scaled from <var>0 </var>to <var>1</var>:
49128 <var>0 </var>indicates that the battery level is the lowest and the system is about to enter shutdown mode. </li>
49130 <var>1 </var>indicates that the system's charge is maximum. </li>
49133 Any threshold parameter used in a watch operation to monitor this property applies to this attribute.
49140 <Type type="double"/>
49142 <Attribute readonly="readonly" name="isCharging" id="::SystemInfo::SystemInfoBattery::isCharging">
49143 <webidl> readonly attribute boolean isCharging;</webidl>
49146 Indicates whether the battery source is currently charging.
49152 <Type type="boolean"/>
49155 <Interface name="SystemInfoCpu" id="::SystemInfo::SystemInfoCpu">
49156 <webidl> [NoInterfaceObject] interface SystemInfoCpu : <ref>SystemInfoProperty</ref> {
49157 readonly attribute double load;
49161 This property reflects the state of the CPUs available to this system.
49167 <ExtendedAttributeList>
49168 <ExtendedAttribute name="NoInterfaceObject">
49169 <webidl>NoInterfaceObject</webidl>
49170 </ExtendedAttribute>
49171 </ExtendedAttributeList>
49172 <InterfaceInheritance>
49173 <Name name="SystemInfoProperty"/>
49174 </InterfaceInheritance>
49175 <Attribute readonly="readonly" name="load" id="::SystemInfo::SystemInfoCpu::load">
49176 <webidl> readonly attribute double load;</webidl>
49179 An attribute to indicate the current CPU load, as a number between <var>0.0 </var>and <var>1.0</var>, representing the minimum and maximum values allowed on this system.
49180 Any threshold parameter used in a watch function to monitor this property applies to this attribute.
49186 <Type type="double"/>
49189 <Interface name="SystemInfoStorage" id="::SystemInfo::SystemInfoStorage">
49190 <webidl> [NoInterfaceObject] interface SystemInfoStorage : <ref>SystemInfoProperty</ref> {
49191 readonly attribute <ref>SystemInfoStorageUnit</ref>[] units;
49195 This property exposes the data storage devices connected to this system.
49201 <ExtendedAttributeList>
49202 <ExtendedAttribute name="NoInterfaceObject">
49203 <webidl>NoInterfaceObject</webidl>
49204 </ExtendedAttribute>
49205 </ExtendedAttributeList>
49206 <InterfaceInheritance>
49207 <Name name="SystemInfoProperty"/>
49208 </InterfaceInheritance>
49209 <Attribute readonly="readonly" name="units" id="::SystemInfo::SystemInfoStorage::units">
49210 <webidl> readonly attribute <ref>SystemInfoStorageUnit</ref>[] units;</webidl>
49213 The array of storage units connected to this device.
49219 <Type type="array">
49220 <Type name="SystemInfoStorageUnit"/>
49224 <Interface name="SystemInfoStorageUnit" id="::SystemInfo::SystemInfoStorageUnit">
49225 <webidl> [NoInterfaceObject] interface SystemInfoStorageUnit : <ref>SystemInfoProperty</ref> {
49226 readonly attribute DOMString type;
49228 readonly attribute unsigned long long capacity;
49230 readonly attribute unsigned long long availableCapacity;
49232 readonly attribute boolean isRemovable;
49234 readonly attribute boolean isRemoveable;
49238 This property exposes a single storage device connected to this system.
49241 <ExtendedAttributeList>
49242 <ExtendedAttribute name="NoInterfaceObject">
49243 <webidl>NoInterfaceObject</webidl>
49244 </ExtendedAttribute>
49245 </ExtendedAttributeList>
49246 <InterfaceInheritance>
49247 <Name name="SystemInfoProperty"/>
49248 </InterfaceInheritance>
49249 <Attribute readonly="readonly" name="type" id="::SystemInfo::SystemInfoStorageUnit::type">
49250 <webidl> readonly attribute DOMString type;</webidl>
49253 The type of a storage device. The value is one of the constants defined for this type.
49257 The supported storage unit types are:
49276 <Type type="DOMString"/>
49278 <Attribute readonly="readonly" name="capacity" id="::SystemInfo::SystemInfoStorageUnit::capacity">
49279 <webidl> readonly attribute unsigned long long capacity;</webidl>
49282 The amount of data that this device can hold, in bytes.
49288 <Type type="unsigned long long"/>
49290 <Attribute readonly="readonly" name="availableCapacity" id="::SystemInfo::SystemInfoStorageUnit::availableCapacity">
49291 <webidl> readonly attribute unsigned long long availableCapacity;</webidl>
49294 The amount of available data that this device can hold, in bytes.
49300 <Type type="unsigned long long"/>
49302 <Attribute readonly="readonly" name="isRemovable" id="::SystemInfo::SystemInfoStorageUnit::isRemovable">
49303 <webidl> readonly attribute boolean isRemovable;</webidl>
49306 An attribute to indicate whether a device can be removed or not.
49310 The following values are supported:
49314 <var>true </var> - If this storage unit can be removed from the system (such as an sdcard unplugged) </li>
49316 <var>false</var> - If this storage unit cannot be removed from the system </li>
49323 <Type type="boolean"/>
49325 <Attribute readonly="readonly" name="isRemoveable" id="::SystemInfo::SystemInfoStorageUnit::isRemoveable">
49326 <webidl> readonly attribute boolean isRemoveable;</webidl>
49329 true if this unit can be removed from the system (such as an sdcard unplugged), false otherwise.
49335 A typographic error.
49338 <Type type="boolean"/>
49341 <Interface name="SystemInfoDisplay" id="::SystemInfo::SystemInfoDisplay">
49342 <webidl> [NoInterfaceObject] interface SystemInfoDisplay : <ref>SystemInfoProperty</ref> {
49343 readonly attribute unsigned long resolutionWidth;
49345 readonly attribute unsigned long resolutionHeight;
49347 readonly attribute unsigned long dotsPerInchWidth;
49349 readonly attribute unsigned long dotsPerInchHeight;
49351 readonly attribute double physicalWidth;
49353 readonly attribute double physicalHeight;
49355 readonly attribute double brightness;
49359 This property reflects the information of the Display.
49365 <ExtendedAttributeList>
49366 <ExtendedAttribute name="NoInterfaceObject">
49367 <webidl>NoInterfaceObject</webidl>
49368 </ExtendedAttribute>
49369 </ExtendedAttributeList>
49370 <InterfaceInheritance>
49371 <Name name="SystemInfoProperty"/>
49372 </InterfaceInheritance>
49373 <Attribute readonly="readonly" name="resolutionWidth" id="::SystemInfo::SystemInfoDisplay::resolutionWidth">
49374 <webidl> readonly attribute unsigned long resolutionWidth;</webidl>
49377 The total number of addressable pixels in the horizontal direction of a rectangular entity
49378 (such as Camera, Display, Image, Video, ...) when held in its default orientation.
49384 <Type type="unsigned long"/>
49386 <Attribute readonly="readonly" name="resolutionHeight" id="::SystemInfo::SystemInfoDisplay::resolutionHeight">
49387 <webidl> readonly attribute unsigned long resolutionHeight;</webidl>
49390 The total number of addressable pixels in the vertical direction of a rectangular element
49391 (such as Camera, Display, Image, Video, ...) when held in its default orientation.
49397 <Type type="unsigned long"/>
49399 <Attribute readonly="readonly" name="dotsPerInchWidth" id="::SystemInfo::SystemInfoDisplay::dotsPerInchWidth">
49400 <webidl> readonly attribute unsigned long dotsPerInchWidth;</webidl>
49403 Resolution of this device, along its width, in dots per inch.
49409 <Type type="unsigned long"/>
49411 <Attribute readonly="readonly" name="dotsPerInchHeight" id="::SystemInfo::SystemInfoDisplay::dotsPerInchHeight">
49412 <webidl> readonly attribute unsigned long dotsPerInchHeight;</webidl>
49415 Resolution of this device, along its height, in dots per inch.
49421 <Type type="unsigned long"/>
49423 <Attribute readonly="readonly" name="physicalWidth" id="::SystemInfo::SystemInfoDisplay::physicalWidth">
49424 <webidl> readonly attribute double physicalWidth;</webidl>
49427 The display's physical width in millimeters.
49433 <Type type="double"/>
49435 <Attribute readonly="readonly" name="physicalHeight" id="::SystemInfo::SystemInfoDisplay::physicalHeight">
49436 <webidl> readonly attribute double physicalHeight;</webidl>
49439 The display's physical height in millimeters.
49445 <Type type="double"/>
49447 <Attribute readonly="readonly" name="brightness" id="::SystemInfo::SystemInfoDisplay::brightness">
49448 <webidl> readonly attribute double brightness;</webidl>
49451 The current brightness of a display ranging between <var>0 </var>to <var>1</var>.
49457 <Type type="double"/>
49460 <Interface name="SystemInfoDeviceOrientation" id="::SystemInfo::SystemInfoDeviceOrientation">
49461 <webidl> [NoInterfaceObject] interface SystemInfoDeviceOrientation : <ref>SystemInfoProperty</ref> {
49463 readonly attribute <ref>SystemInfoDeviceOrientationStatus</ref> status;
49464 readonly attribute boolean isAutoRotation;
49468 This property reflects the information of the device orientation in this system.
49474 <ExtendedAttributeList>
49475 <ExtendedAttribute name="NoInterfaceObject">
49476 <webidl>NoInterfaceObject</webidl>
49477 </ExtendedAttribute>
49478 </ExtendedAttributeList>
49479 <InterfaceInheritance>
49480 <Name name="SystemInfoProperty"/>
49481 </InterfaceInheritance>
49482 <Attribute readonly="readonly" name="status" id="::SystemInfo::SystemInfoDeviceOrientation::status">
49483 <webidl> readonly attribute <ref>SystemInfoDeviceOrientationStatus</ref> status;</webidl>
49486 Represents the status of the current device orientation.
49492 <Type name="SystemInfoDeviceOrientationStatus"/>
49494 <Attribute readonly="readonly" name="isAutoRotation" id="::SystemInfo::SystemInfoDeviceOrientation::isAutoRotation">
49495 <webidl> readonly attribute boolean isAutoRotation;</webidl>
49498 whether the device is in autorotation.
49504 <Type type="boolean"/>
49507 <Interface name="SystemInfoBuild" id="::SystemInfo::SystemInfoBuild">
49508 <webidl> [NoInterfaceObject] interface SystemInfoBuild : <ref>SystemInfoProperty</ref> {
49510 readonly attribute DOMString model;
49511 readonly attribute DOMString manufacturer;
49512 readonly attribute DOMString buildVersion;
49516 This property reflects the information of the current device.
49522 <ExtendedAttributeList>
49523 <ExtendedAttribute name="NoInterfaceObject">
49524 <webidl>NoInterfaceObject</webidl>
49525 </ExtendedAttribute>
49526 </ExtendedAttributeList>
49527 <InterfaceInheritance>
49528 <Name name="SystemInfoProperty"/>
49529 </InterfaceInheritance>
49530 <Attribute readonly="readonly" name="model" id="::SystemInfo::SystemInfoBuild::model">
49531 <webidl> readonly attribute DOMString model;</webidl>
49534 Represents the model name of the current device.
49540 <Type type="DOMString"/>
49542 <Attribute readonly="readonly" name="manufacturer" id="::SystemInfo::SystemInfoBuild::manufacturer">
49543 <webidl> readonly attribute DOMString manufacturer;</webidl>
49546 Represents the manufacturer of the device.
49552 <Type type="DOMString"/>
49554 <Attribute readonly="readonly" name="buildVersion" id="::SystemInfo::SystemInfoBuild::buildVersion">
49555 <webidl> readonly attribute DOMString buildVersion;</webidl>
49558 Represents the build version information of the device.
49564 <Type type="DOMString"/>
49567 <Interface name="SystemInfoLocale" id="::SystemInfo::SystemInfoLocale">
49568 <webidl> [NoInterfaceObject] interface SystemInfoLocale : <ref>SystemInfoProperty</ref> {
49570 readonly attribute DOMString language;
49572 readonly attribute DOMString country;
49576 This property reflects the locale information of the current device.
49582 <ExtendedAttributeList>
49583 <ExtendedAttribute name="NoInterfaceObject">
49584 <webidl>NoInterfaceObject</webidl>
49585 </ExtendedAttribute>
49586 </ExtendedAttributeList>
49587 <InterfaceInheritance>
49588 <Name name="SystemInfoProperty"/>
49589 </InterfaceInheritance>
49590 <Attribute readonly="readonly" name="language" id="::SystemInfo::SystemInfoLocale::language">
49591 <webidl> readonly attribute DOMString language;</webidl>
49594 Indicates the current language setting in the (LANGUAGE)_(REGION) syntax.
49595 The language setting is in the ISO 630-2 format and the region setting is in the ISO 3166-1 format.
49596 The language setting is case-sensitive.
49602 <Type type="DOMString"/>
49604 <Attribute readonly="readonly" name="country" id="::SystemInfo::SystemInfoLocale::country">
49605 <webidl> readonly attribute DOMString country;</webidl>
49608 Indicates the current country setting in the (LANGUAGE)_(REGION) syntax.
49609 The language setting is in the ISO 630-2 format and the region setting is in the ISO 3166-1 format.
49610 The country setting is case-sensitive.
49616 <Type type="DOMString"/>
49619 <Interface name="SystemInfoNetwork" id="::SystemInfo::SystemInfoNetwork">
49620 <webidl> [NoInterfaceObject] interface SystemInfoNetwork : <ref>SystemInfoProperty</ref> {
49622 readonly attribute <ref>SystemInfoNetworkType</ref> networkType;
49626 This property reflects the information of the data network in this system.
49632 <ExtendedAttributeList>
49633 <ExtendedAttribute name="NoInterfaceObject">
49634 <webidl>NoInterfaceObject</webidl>
49635 </ExtendedAttribute>
49636 </ExtendedAttributeList>
49637 <InterfaceInheritance>
49638 <Name name="SystemInfoProperty"/>
49639 </InterfaceInheritance>
49640 <Attribute readonly="readonly" name="networkType" id="::SystemInfo::SystemInfoNetwork::networkType">
49641 <webidl> readonly attribute <ref>SystemInfoNetworkType</ref> networkType;</webidl>
49644 Represents the network type of the current data network.
49650 <Type name="SystemInfoNetworkType"/>
49653 <Interface name="SystemInfoWifiNetwork" id="::SystemInfo::SystemInfoWifiNetwork">
49654 <webidl> [NoInterfaceObject] interface SystemInfoWifiNetwork : <ref>SystemInfoProperty</ref> {
49656 readonly attribute DOMString status;
49657 readonly attribute DOMString ssid;
49658 readonly attribute DOMString ipAddress;
49659 readonly attribute DOMString ipv6Address;
49660 readonly attribute double signalStrength;
49664 This property reflects the information of the Wi-Fi network in this system.
49670 <ExtendedAttributeList>
49671 <ExtendedAttribute name="NoInterfaceObject">
49672 <webidl>NoInterfaceObject</webidl>
49673 </ExtendedAttribute>
49674 </ExtendedAttributeList>
49675 <InterfaceInheritance>
49676 <Name name="SystemInfoProperty"/>
49677 </InterfaceInheritance>
49678 <Attribute readonly="readonly" name="status" id="::SystemInfo::SystemInfoWifiNetwork::status">
49679 <webidl> readonly attribute DOMString status;</webidl>
49682 Represents the status (ON or OFF) of the Wi-Fi interface.
49688 <Type type="DOMString"/>
49690 <Attribute readonly="readonly" name="ssid" id="::SystemInfo::SystemInfoWifiNetwork::ssid">
49691 <webidl> readonly attribute DOMString ssid;</webidl>
49694 Represents the SSID of a Wi-Fi network.
49700 <Type type="DOMString"/>
49702 <Attribute readonly="readonly" name="ipAddress" id="::SystemInfo::SystemInfoWifiNetwork::ipAddress">
49703 <webidl> readonly attribute DOMString ipAddress;</webidl>
49706 Represents the IPv4 address of Wi-Fi network.
49712 <Type type="DOMString"/>
49714 <Attribute readonly="readonly" name="ipv6Address" id="::SystemInfo::SystemInfoWifiNetwork::ipv6Address">
49715 <webidl> readonly attribute DOMString ipv6Address;</webidl>
49718 Represents the IPv6 address of Wi-Fi network.
49724 <Type type="DOMString"/>
49726 <Attribute readonly="readonly" name="signalStrength" id="::SystemInfo::SystemInfoWifiNetwork::signalStrength">
49727 <webidl> readonly attribute double signalStrength;</webidl>
49730 This connection's signal strength, as a normalized value between 0 (no signal detected) and 1 (the level is at its maximum value).
49736 <Type type="double"/>
49739 <Interface name="SystemInfoCellularNetwork" id="::SystemInfo::SystemInfoCellularNetwork">
49740 <webidl> [NoInterfaceObject] interface SystemInfoCellularNetwork : <ref>SystemInfoProperty</ref> {
49742 readonly attribute DOMString status;
49743 readonly attribute DOMString apn;
49744 readonly attribute DOMString ipAddress;
49745 readonly attribute DOMString ipv6Address;
49746 readonly attribute unsigned short mcc;
49747 readonly attribute unsigned short mnc;
49748 readonly attribute unsigned short cellId;
49749 readonly attribute unsigned short lac;
49750 readonly attribute boolean isRoaming;
49751 readonly attribute boolean isFlightMode;
49752 readonly attribute DOMString imei raises(<ref>WebAPIException</ref>);
49756 This property reflects the information of the Cellular network in this system.
49762 <ExtendedAttributeList>
49763 <ExtendedAttribute name="NoInterfaceObject">
49764 <webidl>NoInterfaceObject</webidl>
49765 </ExtendedAttribute>
49766 </ExtendedAttributeList>
49767 <InterfaceInheritance>
49768 <Name name="SystemInfoProperty"/>
49769 </InterfaceInheritance>
49770 <Attribute readonly="readonly" name="status" id="::SystemInfo::SystemInfoCellularNetwork::status">
49771 <webidl> readonly attribute DOMString status;</webidl>
49774 Represents the status (ON or OFF) of the cellular network.
49780 <Type type="DOMString"/>
49782 <Attribute readonly="readonly" name="apn" id="::SystemInfo::SystemInfoCellularNetwork::apn">
49783 <webidl> readonly attribute DOMString apn;</webidl>
49786 Represents an Access Point Name of the cellular network.
49792 <Type type="DOMString"/>
49794 <Attribute readonly="readonly" name="ipAddress" id="::SystemInfo::SystemInfoCellularNetwork::ipAddress">
49795 <webidl> readonly attribute DOMString ipAddress;</webidl>
49798 Represents the IPv4 address of the cellular network.
49804 <Type type="DOMString"/>
49806 <Attribute readonly="readonly" name="ipv6Address" id="::SystemInfo::SystemInfoCellularNetwork::ipv6Address">
49807 <webidl> readonly attribute DOMString ipv6Address;</webidl>
49810 Represents the IPv6 address of the cellular network.
49816 <Type type="DOMString"/>
49818 <Attribute readonly="readonly" name="mcc" id="::SystemInfo::SystemInfoCellularNetwork::mcc">
49819 <webidl> readonly attribute unsigned short mcc;</webidl>
49822 Represents Mobile Country Code (MCC) of the cellular network.
49828 <Type type="unsigned short"/>
49830 <Attribute readonly="readonly" name="mnc" id="::SystemInfo::SystemInfoCellularNetwork::mnc">
49831 <webidl> readonly attribute unsigned short mnc;</webidl>
49834 Represents Mobile Network Code (MNC) of the cellular network. MNC is used in combination with MCC (also known as a "MCC / MNC tuple") to uniquely
49835 identify a mobile phone operator/carrier using the GSM, CDMA, iDEN, TETRA and UMTS public land mobile networks and some satellite mobile networks.
49841 <Type type="unsigned short"/>
49843 <Attribute readonly="readonly" name="cellId" id="::SystemInfo::SystemInfoCellularNetwork::cellId">
49844 <webidl> readonly attribute unsigned short cellId;</webidl>
49847 Represents Cell Id.
49853 <Type type="unsigned short"/>
49855 <Attribute readonly="readonly" name="lac" id="::SystemInfo::SystemInfoCellularNetwork::lac">
49856 <webidl> readonly attribute unsigned short lac;</webidl>
49859 Represents Location Area Code.
49865 <Type type="unsigned short"/>
49867 <Attribute readonly="readonly" name="isRoaming" id="::SystemInfo::SystemInfoCellularNetwork::isRoaming">
49868 <webidl> readonly attribute boolean isRoaming;</webidl>
49871 Whether the connection is set up while the device is roaming.
49877 <Type type="boolean"/>
49879 <Attribute readonly="readonly" name="isFlightMode" id="::SystemInfo::SystemInfoCellularNetwork::isFlightMode">
49880 <webidl> readonly attribute boolean isFlightMode;</webidl>
49883 Indicates whether the device is in flight mode.
49889 <Type type="boolean"/>
49891 <Attribute readonly="readonly" name="imei" id="::SystemInfo::SystemInfoCellularNetwork::imei">
49892 <webidl> readonly attribute DOMString imei raises(<ref>WebAPIException</ref>);</webidl>
49895 Represents the International Mobile Equipment Identity (IMEI).
49904 http://tizen.org/privilege/systemmanager
49907 <Type type="DOMString"/>
49909 <RaiseException name="WebAPIException">
49912 with error type SecurityError, if this attribute is not allowed.
49919 <Interface name="SystemInfoSIM" id="::SystemInfo::SystemInfoSIM">
49920 <webidl> [NoInterfaceObject] interface SystemInfoSIM : <ref>SystemInfoProperty</ref> {
49921 readonly attribute <ref>SystemInfoSimState</ref> state raises(<ref>WebAPIException</ref>);
49922 readonly attribute DOMString operatorName raises(<ref>WebAPIException</ref>);
49923 readonly attribute DOMString msisdn raises(<ref>WebAPIException</ref>);
49924 readonly attribute DOMString iccid raises(<ref>WebAPIException</ref>);
49925 readonly attribute unsigned short mcc raises(<ref>WebAPIException</ref>);
49926 readonly attribute unsigned short mnc raises(<ref>WebAPIException</ref>);
49927 readonly attribute DOMString msin raises(<ref>WebAPIException</ref>);
49928 readonly attribute DOMString spn raises(<ref>WebAPIException</ref>);
49932 This property reflects the information of the SIM card information.
49938 <ExtendedAttributeList>
49939 <ExtendedAttribute name="NoInterfaceObject">
49940 <webidl>NoInterfaceObject</webidl>
49941 </ExtendedAttribute>
49942 </ExtendedAttributeList>
49943 <InterfaceInheritance>
49944 <Name name="SystemInfoProperty"/>
49945 </InterfaceInheritance>
49946 <Attribute readonly="readonly" name="state" id="::SystemInfo::SystemInfoSIM::state">
49947 <webidl> readonly attribute <ref>SystemInfoSimState</ref> state raises(<ref>WebAPIException</ref>);</webidl>
49950 Represents the SIM card state.
49959 http://tizen.org/privilege/system
49962 <Type name="SystemInfoSimState"/>
49964 <RaiseException name="WebAPIException">
49967 with error type SecurityError, if this attribute is not allowed.
49973 <Attribute readonly="readonly" name="operatorName" id="::SystemInfo::SystemInfoSIM::operatorName">
49974 <webidl> readonly attribute DOMString operatorName raises(<ref>WebAPIException</ref>);</webidl>
49977 Represents the Operator Name String (ONS) of Common PCN Handset Specification (CPHS) in SIM card.
49986 http://tizen.org/privilege/system
49989 <Type type="DOMString"/>
49991 <RaiseException name="WebAPIException">
49994 with error type SecurityError, if this attribute is not allowed.
50000 <Attribute readonly="readonly" name="msisdn" id="::SystemInfo::SystemInfoSIM::msisdn">
50001 <webidl> readonly attribute DOMString msisdn raises(<ref>WebAPIException</ref>);</webidl>
50004 Represents the SIM card subscriber number.
50013 http://tizen.org/privilege/systemmanager
50016 <Type type="DOMString"/>
50018 <RaiseException name="WebAPIException">
50021 with error type SecurityError, if this attribute is not allowed.
50027 <Attribute readonly="readonly" name="iccid" id="::SystemInfo::SystemInfoSIM::iccid">
50028 <webidl> readonly attribute DOMString iccid raises(<ref>WebAPIException</ref>);</webidl>
50031 Represents the Integrated Circuit Card ID.
50040 http://tizen.org/privilege/system
50043 <Type type="DOMString"/>
50045 <RaiseException name="WebAPIException">
50048 with error type SecurityError, if this attribute is not allowed.
50054 <Attribute readonly="readonly" name="mcc" id="::SystemInfo::SystemInfoSIM::mcc">
50055 <webidl> readonly attribute unsigned short mcc raises(<ref>WebAPIException</ref>);</webidl>
50058 Represents the Mobile Country Code (MCC) of SIM provider.
50067 http://tizen.org/privilege/system
50070 <Type type="unsigned short"/>
50072 <RaiseException name="WebAPIException">
50075 with error type SecurityError, if this attribute is not allowed.
50081 <Attribute readonly="readonly" name="mnc" id="::SystemInfo::SystemInfoSIM::mnc">
50082 <webidl> readonly attribute unsigned short mnc raises(<ref>WebAPIException</ref>);</webidl>
50085 Represents the Mobile Network Code (MNC) of SIM provider.
50094 http://tizen.org/privilege/system
50097 <Type type="unsigned short"/>
50099 <RaiseException name="WebAPIException">
50102 with error type SecurityError, if this attribute is not allowed.
50108 <Attribute readonly="readonly" name="msin" id="::SystemInfo::SystemInfoSIM::msin">
50109 <webidl> readonly attribute DOMString msin raises(<ref>WebAPIException</ref>);</webidl>
50112 Represents the Mobile Subscription Identification Number (MSIN) of SIM provider.
50121 http://tizen.org/privilege/systemmanager
50124 <Type type="DOMString"/>
50126 <RaiseException name="WebAPIException">
50129 with error type SecurityError, if this attribute is not allowed.
50135 <Attribute readonly="readonly" name="spn" id="::SystemInfo::SystemInfoSIM::spn">
50136 <webidl> readonly attribute DOMString spn raises(<ref>WebAPIException</ref>);</webidl>
50139 Represents the Service Provider Name (SPN) of SIM card.
50148 http://tizen.org/privilege/system
50151 <Type type="DOMString"/>
50153 <RaiseException name="WebAPIException">
50156 with error type SecurityError, if this attribute is not allowed.
50163 <Interface name="SystemInfoPeripheral" id="::SystemInfo::SystemInfoPeripheral">
50164 <webidl> [NoInterfaceObject] interface SystemInfoPeripheral : <ref>SystemInfoProperty</ref> {
50166 readonly attribute boolean isVideoOutputOn;
50170 This property reflects the peripheral information of the current device.
50176 <ExtendedAttributeList>
50177 <ExtendedAttribute name="NoInterfaceObject">
50178 <webidl>NoInterfaceObject</webidl>
50179 </ExtendedAttribute>
50180 </ExtendedAttributeList>
50181 <InterfaceInheritance>
50182 <Name name="SystemInfoProperty"/>
50183 </InterfaceInheritance>
50184 <Attribute readonly="readonly" name="isVideoOutputOn" id="::SystemInfo::SystemInfoPeripheral::isVideoOutputOn">
50185 <webidl> readonly attribute boolean isVideoOutputOn;</webidl>
50188 Represents the video out status.
50194 <Type type="boolean"/>
50198 <Module name="SystemSetting" id="::SystemSetting">
50199 <webidl>module SystemSetting {
50201 [NoInterfaceObject] interface SystemSettingObject {
50202 readonly attribute <ref>SystemSettingManager</ref> systemsetting;
50204 <ref>Tizen</ref> implements <ref>SystemSettingObject</ref>;
50206 enum SystemSettingType {"HOME_SCREEN", "LOCK_SCREEN", "INCOMING_CALL", "NOTIFICATION_EMAIL"};
50208 [NoInterfaceObject] interface SystemSettingManager {
50210 void setProperty(<ref>SystemSettingType</ref> type,
50212 <ref>SuccessCallback</ref> successCallback,
50213 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);
50215 void getProperty(<ref>SystemSettingType</ref> type,
50216 <ref>SystemSettingSuccessCallback</ref> successCallback,
50217 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);
50221 [Callback=FunctionOnly, NoInterfaceObject] interface SystemSettingSuccessCallback {
50222 void onsuccess(DOMString value);
50228 This API provides interfaces and methods providing Web applications with access to various values of the system.
50232 This API provides an interface and method through features such as:
50240 INCOMING_CALL </li>
50242 NOTIFICATION_EMAIL </li>
50245 For more information on the SystemSetting features, see <a href="../../org.tizen.web.appprogramming/html/guide/sys_guide/systemsetting.htm">System Setting Guide</a>.
50252 <Interface name="SystemSettingObject" id="::SystemSetting::SystemSettingObject">
50253 <webidl> [NoInterfaceObject] interface SystemSettingObject {
50254 readonly attribute <ref>SystemSettingManager</ref> systemsetting;
50258 This interface defines what is instantiated by the <em>Tizen </em>object from the Tizen Platform.
50262 There will be a <em>tizen.systemsetting </em>object that allows accessing the functionality of the SystemSetting API.
50269 <ExtendedAttributeList>
50270 <ExtendedAttribute name="NoInterfaceObject">
50271 <webidl>NoInterfaceObject</webidl>
50272 </ExtendedAttribute>
50273 </ExtendedAttributeList>
50274 <Attribute readonly="readonly" name="systemsetting" id="::SystemSetting::SystemSettingObject::systemsetting">
50275 <webidl> readonly attribute <ref>SystemSettingManager</ref> systemsetting;</webidl>
50276 <Type name="SystemSettingManager"/>
50279 <Implements name1="Tizen" name2="SystemSettingObject">
50280 <webidl> <ref>Tizen</ref> implements <ref>SystemSettingObject</ref>;</webidl>
50282 <Enum name="SystemSettingType" id="::SystemSetting::SystemSettingType">
50283 <webidl> enum SystemSettingType {"HOME_SCREEN", "LOCK_SCREEN", "INCOMING_CALL", "NOTIFICATION_EMAIL"};</webidl>
50286 This enumerator indicates the type of supported system setting.
50287 The following values are supported in this release:
50292 HOME_SCREEN - For homescreen background image. </li>
50294 LOCK_SCREEN - For lockscreen background image. </li>
50296 INCOMING_CALL - For incoming call ringtone. </li>
50298 NOTIFICATION_EMAIL - For email notification alert tone. </li>
50301 Defines supporting setting types.
50302 The HOME_SCREEN and LOCK_SCREEN are supported for images files.
50303 The INCOMING_CALL and NOTIFICATION_EMAIL are support for sound files.
50310 <EnumValue stringvalue="HOME_SCREEN">
50311 <webidl>"HOME_SCREEN</webidl>
50313 <EnumValue stringvalue="LOCK_SCREEN">
50314 <webidl> "LOCK_SCREEN</webidl>
50316 <EnumValue stringvalue="INCOMING_CALL">
50317 <webidl> "INCOMING_CALL</webidl>
50319 <EnumValue stringvalue="NOTIFICATION_EMAIL">
50320 <webidl> "NOTIFICATION_EMAIL</webidl>
50323 <Interface name="SystemSettingManager" id="::SystemSetting::SystemSettingManager">
50324 <webidl> [NoInterfaceObject] interface SystemSettingManager {
50326 void setProperty(<ref>SystemSettingType</ref> type,
50328 <ref>SuccessCallback</ref> successCallback,
50329 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);
50331 void getProperty(<ref>SystemSettingType</ref> type,
50332 <ref>SystemSettingSuccessCallback</ref> successCallback,
50333 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);
50338 This is the top-level interface for the SystemSetting API that provides
50339 access to the module functionalities.
50342 <ExtendedAttributeList>
50343 <ExtendedAttribute name="NoInterfaceObject">
50344 <webidl>NoInterfaceObject</webidl>
50345 </ExtendedAttribute>
50346 </ExtendedAttributeList>
50347 <Operation name="setProperty" id="::SystemSetting::SystemSettingManager::setProperty">
50348 <webidl> void setProperty(<ref>SystemSettingType</ref> type,
50350 <ref>SuccessCallback</ref> successCallback,
50351 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);</webidl>
50354 Sets the property of a device.
50358 This method allows the user to set the image or sound file specified as an input parameter as the wallpaper or ringtone of a device.
50366 The ErrorCallback is launched with these error types:
50370 TypeMismatchError - If any input parameter is not compatible with the expected type for that parameter. </li>
50372 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
50374 UnknownError - If any other error occurs. </li>
50381 http://tizen.org/privilege/setting
50383 <Code> // Define the success callback
50384 function successCallback() {
50385 console.log("Success to setProperty");
50388 // Define the error callback.
50389 function errorCallback(error) {
50390 console.log("Fail to setProperty" + error.message);
50393 tizen.systemsetting.setProperty("HOME_SCREEN", "/opt/usr/media/Images/image1.jpg", successCallback, errorCallback);
50397 <Type type="void"/>
50399 <Argument name="type">
50402 The setting type to set.
50405 <Type name="SystemSettingType"/>
50407 <Argument name="value">
50410 The location path of a wallpaper or ringtone file.
50413 <Type type="DOMString"/>
50415 <Argument name="successCallback">
50418 To be invoked if the setting value is successfully set.
50421 <Type name="SuccessCallback"/>
50423 <Argument optional="optional" name="errorCallback">
50426 To be invoked if the setting value cannot be set.
50429 <Type name="ErrorCallback" nullable="nullable"/>
50433 <RaiseException name="WebAPIException">
50436 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
50439 with error type NotSupportedError, if this feature is not supported.
50442 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
50445 with error type SecurityError, if this functionality is not allowed.
50448 with error type UnknownError in any other error case.
50454 <Operation name="getProperty" id="::SystemSetting::SystemSettingManager::getProperty">
50455 <webidl> void getProperty(<ref>SystemSettingType</ref> type,
50456 <ref>SystemSettingSuccessCallback</ref> successCallback,
50457 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);</webidl>
50460 Gets the value of the property of a device.
50464 This method allows the user to get the value of the specified system property as wallpaper or ringtone of a device.
50472 The ErrorCallback is launched with these error types:
50476 TypeMismatchError - If any input parameter is not compatible with the expected type for that parameter. </li>
50478 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
50480 UnknownError - If any other error occurs. </li>
50483 <Code> // Define the success callback
50484 function getPropertySuccessCallback(value) {
50485 console.log("Success to getProperty : " + value);
50488 // Define the error callback.
50489 function errorCallback(error) {
50490 console.log("Fail to getProperty" + error.message);
50493 tizen.systemsetting.getProperty("HOME_SCREEN", getPropertySuccessCallback, errorCallback);
50497 <Type type="void"/>
50499 <Argument name="type">
50502 The type of the property to get.
50505 <Type name="SystemSettingType"/>
50507 <Argument name="successCallback">
50510 To be invoked if the setting value is successfully retrieved.
50513 <Type name="SystemSettingSuccessCallback"/>
50515 <Argument optional="optional" name="errorCallback">
50518 To be invoked if the setting value cannot be retrieved.
50521 <Type name="ErrorCallback" nullable="nullable"/>
50525 <RaiseException name="WebAPIException">
50528 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
50531 with error type NotSupportedError, if this feature is not supported.
50534 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
50537 with error type UnknownError in any other error case.
50544 <Interface name="SystemSettingSuccessCallback" id="::SystemSetting::SystemSettingSuccessCallback">
50545 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface SystemSettingSuccessCallback {
50546 void onsuccess(DOMString value);
50550 The success callback for getProperty().
50556 <ExtendedAttributeList>
50557 <ExtendedAttribute name="Callback" value="FunctionOnly">
50558 <webidl>Callback</webidl>
50559 </ExtendedAttribute>
50560 <ExtendedAttribute name="NoInterfaceObject">
50561 <webidl> NoInterfaceObject</webidl>
50562 </ExtendedAttribute>
50563 </ExtendedAttributeList>
50564 <Operation name="onsuccess" id="::SystemSetting::SystemSettingSuccessCallback::onsuccess">
50565 <webidl> void onsuccess(DOMString value);</webidl>
50566 <Type type="void"/>
50568 <Argument name="value">
50569 <Type type="DOMString"/>
50575 <Module name="Time" id="::Time">
50576 <webidl>module Time {
50578 enum TimeDurationUnit { "MSECS", "SECS", "MINS", "HOURS", "DAYS" };
50580 [NoInterfaceObject] interface TimeManagerObject {
50581 readonly attribute <ref>TimeUtil</ref> time;
50583 <ref>Tizen</ref> implements <ref>TimeManagerObject</ref>;
50585 [NoInterfaceObject] interface TimeUtil {
50586 <ref>TZDate</ref> getCurrentDateTime() raises(<ref>WebAPIException</ref>);
50588 DOMString getLocalTimezone() raises(<ref>WebAPIException</ref>);
50590 DOMString[] getAvailableTimezones() raises(<ref>WebAPIException</ref>);
50592 DOMString getDateFormat(optional boolean? shortformat) raises(<ref>WebAPIException</ref>);
50594 DOMString getTimeFormat() raises(<ref>WebAPIException</ref>);
50596 boolean isLeapYear(long year) raises(<ref>WebAPIException</ref>);
50600 [Constructor(optional Date? datetime, optional DOMString? timezone),
50601 Constructor(long year, long month, long day, optional long? hours, optional long? minutes, optional long? seconds, optional long? milliseconds, optional DOMString? timezone)]
50606 void setDate(long date);
50610 long getFullYear();
50612 void setFullYear(long year);
50616 void setHours(long hours);
50618 long getMilliseconds();
50620 void setMilliseconds(long ms);
50624 void setMinutes(long minutes);
50628 void setMonth(long month);
50632 void setSeconds(long seconds);
50636 void setUTCDate(long date);
50640 long getUTCFullYear();
50642 void setUTCFullYear(long year);
50644 long getUTCHours();
50646 void setUTCHours(long hours);
50648 long getUTCMilliseconds();
50650 void setUTCMilliseconds(long ms);
50652 long getUTCMinutes();
50654 void setUTCMinutes(long minutes);
50656 long getUTCMonth();
50658 void setUTCMonth(long month);
50660 long getUTCSeconds();
50662 void setUTCSeconds(long seconds);
50664 DOMString getTimezone();
50666 <ref>TZDate</ref> toTimezone(DOMString tzid) raises(<ref>WebAPIException</ref>);
50668 <ref>TZDate</ref> toLocalTimezone() raises(<ref>WebAPIException</ref>);
50670 <ref>TZDate</ref> toUTC() raises(<ref>WebAPIException</ref>);
50672 <ref>TimeDuration</ref> difference(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);
50674 boolean equalsTo(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);
50676 boolean earlierThan(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);
50678 boolean laterThan(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);
50680 <ref>TZDate</ref> addDuration(<ref>TimeDuration</ref> duration) raises(<ref>WebAPIException</ref>);
50682 DOMString toLocaleDateString();
50684 DOMString toLocaleTimeString();
50686 DOMString toLocaleString();
50688 DOMString toDateString();
50690 DOMString toTimeString();
50692 DOMString toString();
50694 DOMString getTimezoneAbbreviation() raises(<ref>WebAPIException</ref>);
50696 long secondsFromUTC() raises(<ref>WebAPIException</ref>);
50698 boolean isDST() raises(<ref>WebAPIException</ref>);
50700 <ref>TZDate</ref>? getPreviousDSTTransition() raises(<ref>WebAPIException</ref>);
50702 <ref>TZDate</ref>? getNextDSTTransition() raises(<ref>WebAPIException</ref>);
50705 [Constructor(long long length, optional <ref>TimeDurationUnit</ref>? unit)]
50706 interface TimeDuration
50708 attribute long long length;
50710 attribute <ref>TimeDurationUnit</ref> unit;
50712 <ref>TimeDuration</ref> difference(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);
50714 boolean equalsTo(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);
50716 boolean lessThan(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);
50718 boolean greaterThan(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);
50723 The Time API provides information regarding date / time and time zones.
50730 The JavaScript Date object does not have full timezone support.
50731 Date objects allow only simple representations to denote a particular location's
50732 offset from Universal Coordinated Time (UTC). This is typically provided as a +/-
50733 offset from UTC-0 (also known as Greenwich Mean Time, or GMT) for example, +05:30 denotes
50734 that a location is 5 hours and 30 minutes ahead of UTC +00:00.
50735 The issue with this method is not getting the correct
50736 local time for a given date. The existing methods are sufficient for this purpose.
50737 The issue is correctly converting to and from local time and UTC for all points in
50738 time - in any of the past, present, and future - based on an initial time provided.
50739 This is important for defining relative dates, where a time in a given location may
50740 observe different UTC offsets, according to any Daylight Savings Rules (DST) in effect
50741 or any other changes that may occur to a location's time zone over time.
50742 Without the communication of the explicit time zone rules governing a given date and
50743 time, the ability to effectively calculate the offset of the local time to UTC or to
50744 any other time zone at any point in the past or future is lost.
50747 This API can be used to get TZDate objects with full time zone support, convert them
50748 between timezones, retrieve available timezones.
50751 For more information on the Time features, see <a href="../../org.tizen.web.appprogramming/html/guide/sys_guide/time.htm">Time Guide</a>.
50755 <Enum name="TimeDurationUnit" id="::Time::TimeDurationUnit">
50756 <webidl> enum TimeDurationUnit { "MSECS", "SECS", "MINS", "HOURS", "DAYS" };</webidl>
50759 TimeDuration unit (milliseconds, seconds, minutes, hours or days).
50763 At least the following values must be supported:
50767 MSECS - Indicates a duration in milliseconds </li>
50769 SECS - Indicates a duration in seconds </li>
50771 MINS - Indicates a duration in minutes </li>
50773 HOURS - Indicates a duration in hours </li>
50775 DAYS - Indicates a duration in days </li>
50782 <EnumValue stringvalue="MSECS">
50783 <webidl> "MSECS</webidl>
50785 <EnumValue stringvalue="SECS">
50786 <webidl> "SECS</webidl>
50788 <EnumValue stringvalue="MINS">
50789 <webidl> "MINS</webidl>
50791 <EnumValue stringvalue="HOURS">
50792 <webidl> "HOURS</webidl>
50794 <EnumValue stringvalue="DAYS">
50795 <webidl> "DAYS</webidl>
50798 <Interface name="TimeManagerObject" id="::Time::TimeManagerObject">
50799 <webidl> [NoInterfaceObject] interface TimeManagerObject {
50800 readonly attribute <ref>TimeUtil</ref> time;
50804 Defines what is instantiated in the tizen object by the Tizen Platform.
50808 There will be a tizen.time object that allows accessing the
50809 functionality of the Time API.
50816 <ExtendedAttributeList>
50817 <ExtendedAttribute name="NoInterfaceObject">
50818 <webidl>NoInterfaceObject</webidl>
50819 </ExtendedAttribute>
50820 </ExtendedAttributeList>
50821 <Attribute readonly="readonly" name="time" id="::Time::TimeManagerObject::time">
50822 <webidl> readonly attribute <ref>TimeUtil</ref> time;</webidl>
50823 <Type name="TimeUtil"/>
50826 <Implements name1="Tizen" name2="TimeManagerObject">
50827 <webidl> <ref>Tizen</ref> implements <ref>TimeManagerObject</ref>;</webidl>
50829 <Interface name="TimeUtil" id="::Time::TimeUtil">
50830 <webidl> [NoInterfaceObject] interface TimeUtil {
50831 <ref>TZDate</ref> getCurrentDateTime() raises(<ref>WebAPIException</ref>);
50833 DOMString getLocalTimezone() raises(<ref>WebAPIException</ref>);
50835 DOMString[] getAvailableTimezones() raises(<ref>WebAPIException</ref>);
50837 DOMString getDateFormat(optional boolean? shortformat) raises(<ref>WebAPIException</ref>);
50839 DOMString getTimeFormat() raises(<ref>WebAPIException</ref>);
50841 boolean isLeapYear(long year) raises(<ref>WebAPIException</ref>);
50845 The TimeUtil class that provides access to the time API.
50849 This interface offers methods to manage date / time as well as timezones such as:
50853 Get the current date / time using getCurrentDateTime(). </li>
50855 Get timezones using getLocalTimezone() and getAvailableTimezones(). </li>
50862 <ExtendedAttributeList>
50863 <ExtendedAttribute name="NoInterfaceObject">
50864 <webidl>NoInterfaceObject</webidl>
50865 </ExtendedAttribute>
50866 </ExtendedAttributeList>
50867 <Operation name="getCurrentDateTime" id="::Time::TimeUtil::getCurrentDateTime">
50868 <webidl> <ref>TZDate</ref> getCurrentDateTime() raises(<ref>WebAPIException</ref>);</webidl>
50871 Returns the current date / time.
50876 <Code> var current_dt = tizen.time.getCurrentDateTime();
50877 console.log("current date / time is " + current_dt.toLocaleString());
50880 <Type name="TZDate">
50883 TZDate Current TZDate object.
50889 <RaiseException name="WebAPIException">
50892 with error type UnknownError, if the call failed due to an unknown error.
50898 <Operation name="getLocalTimezone" id="::Time::TimeUtil::getLocalTimezone">
50899 <webidl> DOMString getLocalTimezone() raises(<ref>WebAPIException</ref>);</webidl>
50902 Returns identifier of the local system timezone.
50907 <Code> console.log("The local time zone is " + tizen.time.getLocalTimezone());
50910 <Type type="DOMString">
50913 Timezone Local timezone.
50919 <RaiseException name="WebAPIException">
50922 with error type UnknownError, if the call failed due to an unknown error.
50928 <Operation name="getAvailableTimezones" id="::Time::TimeUtil::getAvailableTimezones">
50929 <webidl> DOMString[] getAvailableTimezones() raises(<ref>WebAPIException</ref>);</webidl>
50932 Returns synchronously the identifiers of the timezones supported by the device.
50936 Zero or more slashes separate different components of a timezone identifier,
50937 with the most general descriptor first and the most specific one last. For example,
50938 'Europe/Berlin', 'America/Argentina/Buenos_Aires'.
50944 <Code> var tzids = tizen.time.getAvailableTimezones();
50945 console.log("The device supports " + tzids.length + " time zones.");
50948 <Type type="array">
50951 Array of time zone identifiers.
50954 <Type type="DOMString"/>
50958 <RaiseException name="WebAPIException">
50961 with error type UnknownError, if the call failed due to an unknown error.
50967 <Operation name="getDateFormat" id="::Time::TimeUtil::getDateFormat">
50968 <webidl> DOMString getDateFormat(optional boolean? shortformat) raises(<ref>WebAPIException</ref>);</webidl>
50972 Returns the date format according to the system's locale settings.
50975 These expressions may be used in the returned string:
50979 "d" = day number (1 to 31) </li>
50981 "D" = day name </li>
50983 "m" = month number (1 to 12) </li>
50985 "M" = month name </li>
50987 "y" = year </li>
50990 Examples of string formats include: "d/m/y", "y-d-m", "D, M d y".
50997 <Type type="DOMString">
51000 DOMString The date format according to the system's locale settings.
51005 <Argument optional="optional" name="shortformat">
51008 Flag indicating if the user is interested in the short
51009 date format (23/10/2011) instead of a long date format ("Monday, October 23 2011").
51010 By default, this attribute is set to false.
51013 <Type type="boolean" nullable="nullable"/>
51017 <RaiseException name="WebAPIException">
51020 with error type UnknownError, if the call failed due to an unknown error.
51026 <Operation name="getTimeFormat" id="::Time::TimeUtil::getTimeFormat">
51027 <webidl> DOMString getTimeFormat() raises(<ref>WebAPIException</ref>);</webidl>
51031 Returns the time format according to the system's locale settings.
51034 These expressions may be used in the returned string:
51038 "h" = hours (0 to 23 or 1 to 12 if AM/PM display) </li>
51040 "m" = minutes (0 to 59) </li>
51042 "s" = seconds (0 to 59) </li>
51044 "ap" = AM/PM display </li>
51047 Examples of string formats include: "h:m:s ap", "h:m:s".
51054 <Type type="DOMString">
51057 DOMString The time format according to the system's locale settings.
51063 <RaiseException name="WebAPIException">
51066 with error type UnknownError, if the call failed due to an unknown error.
51072 <Operation name="isLeapYear" id="::Time::TimeUtil::isLeapYear">
51073 <webidl> boolean isLeapYear(long year) raises(<ref>WebAPIException</ref>);</webidl>
51076 Returns <em>true</em> if the given year is a leap year.
51081 <Code> var current_dt = tizen.time.getCurrentDateTime();
51082 var is_leap = tizen.time.isLeapYear(current_dt.getFullYear());
51084 console.log("This year is a leap year.");
51087 <Type type="boolean">
51090 boolean <em>true</em>, if the year is a leap year.
51095 <Argument name="year">
51101 <Type type="long"/>
51105 <RaiseException name="WebAPIException">
51108 with error type TypeMismatchError, if the input parameter
51109 is not compatible with the expected type for that parameter.
51112 with error type InvalidValuesError, if any of the input
51113 parameters contain an invalid value.
51116 with error type UnknownError, if the call failed due to an unknown error.
51123 <Interface name="TZDate" id="::Time::TZDate">
51124 <webidl> [Constructor(optional Date? datetime, optional DOMString? timezone),
51125 Constructor(long year, long month, long day, optional long? hours, optional long? minutes, optional long? seconds, optional long? milliseconds, optional DOMString? timezone)]
51130 void setDate(long date);
51134 long getFullYear();
51136 void setFullYear(long year);
51140 void setHours(long hours);
51142 long getMilliseconds();
51144 void setMilliseconds(long ms);
51148 void setMinutes(long minutes);
51152 void setMonth(long month);
51156 void setSeconds(long seconds);
51160 void setUTCDate(long date);
51164 long getUTCFullYear();
51166 void setUTCFullYear(long year);
51168 long getUTCHours();
51170 void setUTCHours(long hours);
51172 long getUTCMilliseconds();
51174 void setUTCMilliseconds(long ms);
51176 long getUTCMinutes();
51178 void setUTCMinutes(long minutes);
51180 long getUTCMonth();
51182 void setUTCMonth(long month);
51184 long getUTCSeconds();
51186 void setUTCSeconds(long seconds);
51188 DOMString getTimezone();
51190 <ref>TZDate</ref> toTimezone(DOMString tzid) raises(<ref>WebAPIException</ref>);
51192 <ref>TZDate</ref> toLocalTimezone() raises(<ref>WebAPIException</ref>);
51194 <ref>TZDate</ref> toUTC() raises(<ref>WebAPIException</ref>);
51196 <ref>TimeDuration</ref> difference(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);
51198 boolean equalsTo(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);
51200 boolean earlierThan(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);
51202 boolean laterThan(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);
51204 <ref>TZDate</ref> addDuration(<ref>TimeDuration</ref> duration) raises(<ref>WebAPIException</ref>);
51206 DOMString toLocaleDateString();
51208 DOMString toLocaleTimeString();
51210 DOMString toLocaleString();
51212 DOMString toDateString();
51214 DOMString toTimeString();
51216 DOMString toString();
51218 DOMString getTimezoneAbbreviation() raises(<ref>WebAPIException</ref>);
51220 long secondsFromUTC() raises(<ref>WebAPIException</ref>);
51222 boolean isDST() raises(<ref>WebAPIException</ref>);
51224 <ref>TZDate</ref>? getPreviousDSTTransition() raises(<ref>WebAPIException</ref>);
51226 <ref>TZDate</ref>? getNextDSTTransition() raises(<ref>WebAPIException</ref>);
51230 The TZDate object represents information regarding a given
51231 date / time in a predefined timezone.
51232 If its date / time is exceed the platform limit, TZDate will be invalid.
51238 <ExtendedAttributeList>
51239 <ExtendedAttribute name="Constructor">
51240 <webidl>Constructor(optional Date? datetime, optional DOMString? timezone)</webidl>
51242 <Argument optional="optional" name="datetime">
51243 <Type type="Date" nullable="nullable"/>
51245 <Argument optional="optional" name="timezone">
51246 <Type type="DOMString" nullable="nullable"/>
51249 </ExtendedAttribute>
51250 <ExtendedAttribute name="Constructor">
51251 <webidl> Constructor(long year, long month, long day, optional long? hours, optional long? minutes, optional long? seconds, optional long? milliseconds, optional DOMString? timezone)</webidl>
51256 <b>year</b> : The year of TZDate. If it is between 0 and 99, 1900 will be added to it like Javascript Date object. </li>
51261 <Argument name="year">
51262 <Type type="long"/>
51264 <Argument name="month">
51265 <Type type="long"/>
51267 <Argument name="day">
51268 <Type type="long"/>
51270 <Argument optional="optional" name="hours">
51271 <Type type="long" nullable="nullable"/>
51273 <Argument optional="optional" name="minutes">
51274 <Type type="long" nullable="nullable"/>
51276 <Argument optional="optional" name="seconds">
51277 <Type type="long" nullable="nullable"/>
51279 <Argument optional="optional" name="milliseconds">
51280 <Type type="long" nullable="nullable"/>
51282 <Argument optional="optional" name="timezone">
51283 <Type type="DOMString" nullable="nullable"/>
51286 </ExtendedAttribute>
51287 </ExtendedAttributeList>
51288 <Operation name="getDate" id="::Time::TZDate::getDate">
51289 <webidl> long getDate();</webidl>
51292 Returns the day of the month (from 1-31).
51301 long The day of the month.
51307 <Operation name="setDate" id="::Time::TZDate::setDate">
51308 <webidl> void setDate(long date);</webidl>
51311 Sets the day of the month (from 1-31).
51315 If it tries to set the day bigger than the last day of the month or smaller than 1, it will be calculated automatically.
51316 For example, if TZDate's month is May and parameter is 32, it will be June 1.
51323 <Type type="void"/>
51325 <Argument name="date">
51331 <Type type="long"/>
51335 <Operation name="getDay" id="::Time::TZDate::getDay">
51336 <webidl> long getDay();</webidl>
51339 Returns the day of the week (from 0-6).
51348 long The day of the week.
51354 <Operation name="getFullYear" id="::Time::TZDate::getFullYear">
51355 <webidl> long getFullYear();</webidl>
51362 Positive values indicate AD(Anno Domini) years. 0 and negative values indicate BC(Before Christ) years.
51363 For example, 1 = AD 1, 0 = BC 1, -1 = BC 2.
51379 <Operation name="setFullYear" id="::Time::TZDate::setFullYear">
51380 <webidl> void setFullYear(long year);</webidl>
51389 <Type type="void"/>
51391 <Argument name="year">
51397 <Type type="long"/>
51401 <Operation name="getHours" id="::Time::TZDate::getHours">
51402 <webidl> long getHours();</webidl>
51405 Returns the hour (0-23).
51420 <Operation name="setHours" id="::Time::TZDate::setHours">
51421 <webidl> void setHours(long hours);</webidl>
51424 Sets the hour (0-23).
51428 If it tries to set the hour bigger than 23 or smaller than 0, it will be calculated automatically.
51429 For example, if hours is 24, it will set 0 and add to a date.
51436 <Type type="void"/>
51438 <Argument name="hours">
51444 <Type type="long"/>
51448 <Operation name="getMilliseconds" id="::Time::TZDate::getMilliseconds">
51449 <webidl> long getMilliseconds();</webidl>
51452 Returns the milliseconds (from 0-999).
51461 long The milliseconds.
51467 <Operation name="setMilliseconds" id="::Time::TZDate::setMilliseconds">
51468 <webidl> void setMilliseconds(long ms);</webidl>
51471 Sets the milliseconds (from 0-999).
51475 If it tries to set the millisecond bigger than 999 or smaller than 0, it will be calculated automatically.
51476 For example, if ms is 1000, it will set 0 and add to a second.
51483 <Type type="void"/>
51485 <Argument name="ms">
51488 Milliseconds to set.
51491 <Type type="long"/>
51495 <Operation name="getMinutes" id="::Time::TZDate::getMinutes">
51496 <webidl> long getMinutes();</webidl>
51499 Returns the minutes (from 0-59).
51514 <Operation name="setMinutes" id="::Time::TZDate::setMinutes">
51515 <webidl> void setMinutes(long minutes);</webidl>
51522 If it tries to set the minute bigger than 59 or smaller than 0, it will be calculated automatically.
51523 For example, if minutes is 60, it will set 0 and add to an hour.
51530 <Type type="void"/>
51532 <Argument name="minutes">
51538 <Type type="long"/>
51542 <Operation name="getMonth" id="::Time::TZDate::getMonth">
51543 <webidl> long getMonth();</webidl>
51546 Returns the month (from 0-11).
51561 <Operation name="setMonth" id="::Time::TZDate::setMonth">
51562 <webidl> void setMonth(long month);</webidl>
51565 Sets the month (from 0-11).
51569 If it tries to set the month bigger than 11 or smaller than 0, it will be calculated automatically.
51570 For example, if month is 12, it will set 0 and add to a year.
51577 <Type type="void"/>
51579 <Argument name="month">
51585 <Type type="long"/>
51589 <Operation name="getSeconds" id="::Time::TZDate::getSeconds">
51590 <webidl> long getSeconds();</webidl>
51593 Returns the seconds (from 0-59).
51608 <Operation name="setSeconds" id="::Time::TZDate::setSeconds">
51609 <webidl> void setSeconds(long seconds);</webidl>
51612 Sets the seconds (from 0-59).
51616 If it tries to set the second bigger than 59 or smaller than 0, it will be calculated automatically.
51617 For example, if seconds is 60, it will set 0 and add to a minute.
51624 <Type type="void"/>
51626 <Argument name="seconds">
51632 <Type type="long"/>
51636 <Operation name="getUTCDate" id="::Time::TZDate::getUTCDate">
51637 <webidl> long getUTCDate();</webidl>
51640 Returns the day of the month, according to universal time (from 1-31).
51649 long The day of the month, according to universal time.
51655 <Operation name="setUTCDate" id="::Time::TZDate::setUTCDate">
51656 <webidl> void setUTCDate(long date);</webidl>
51659 Sets the day of the month, according to universal time (from 1-31).
51663 If it tries to set the day bigger than the last day of the month or smaller than 1, it will be calculated automatically.
51664 For example, if TZDate's month is May and date is 32, it will be June 1.
51671 <Type type="void"/>
51673 <Argument name="date">
51679 <Type type="long"/>
51683 <Operation name="getUTCDay" id="::Time::TZDate::getUTCDay">
51684 <webidl> long getUTCDay();</webidl>
51687 Returns the day of the week, according to universal time (from 0-6).
51696 long The day of the week, according to universal time.
51702 <Operation name="getUTCFullYear" id="::Time::TZDate::getUTCFullYear">
51703 <webidl> long getUTCFullYear();</webidl>
51706 Returns the year, according to universal time.
51710 Positive values indicate AD(Anno Domini) years. 0 and negative values indicate BC(Before Christ) years.
51711 For example, 1 = AD 1, 0 = BC 1, -1 = BC 2.
51721 long The year, according to universal time.
51727 <Operation name="setUTCFullYear" id="::Time::TZDate::setUTCFullYear">
51728 <webidl> void setUTCFullYear(long year);</webidl>
51731 Sets the year, according to universal time.
51737 <Type type="void"/>
51739 <Argument name="year">
51745 <Type type="long"/>
51749 <Operation name="getUTCHours" id="::Time::TZDate::getUTCHours">
51750 <webidl> long getUTCHours();</webidl>
51753 Returns the hour, according to universal time (0-23).
51762 long The hour, according to universal time.
51768 <Operation name="setUTCHours" id="::Time::TZDate::setUTCHours">
51769 <webidl> void setUTCHours(long hours);</webidl>
51772 Sets the hour, according to universal time (0-23).
51776 If it tries to set the hour bigger than 23 or smaller than 0, it will be calculated automatically.
51777 For example, if hours is 24, it will set 0 and add to a date.
51784 <Type type="void"/>
51786 <Argument name="hours">
51792 <Type type="long"/>
51796 <Operation name="getUTCMilliseconds" id="::Time::TZDate::getUTCMilliseconds">
51797 <webidl> long getUTCMilliseconds();</webidl>
51800 Returns the milliseconds, according to universal time (from 0-999).
51809 long The milliseconds, according to universal time.
51815 <Operation name="setUTCMilliseconds" id="::Time::TZDate::setUTCMilliseconds">
51816 <webidl> void setUTCMilliseconds(long ms);</webidl>
51819 Sets the milliseconds, according to universal time (from 0-999).
51823 If it tries to set the millisecond bigger than 999 or smaller than 0, it will be calculated automatically.
51824 For example, if ms is 1000, it will set 0 and add to a second.
51831 <Type type="void"/>
51833 <Argument name="ms">
51836 Milliseconds to set.
51839 <Type type="long"/>
51843 <Operation name="getUTCMinutes" id="::Time::TZDate::getUTCMinutes">
51844 <webidl> long getUTCMinutes();</webidl>
51847 Returns the minutes, according to universal time (from 0-59).
51856 long The minutes, according to universal time.
51862 <Operation name="setUTCMinutes" id="::Time::TZDate::setUTCMinutes">
51863 <webidl> void setUTCMinutes(long minutes);</webidl>
51866 Sets the minutes, according to universal time (from 0-59).
51870 If it tries to set the minute bigger than 59 or smaller than 0, it will be calculated automatically.
51871 For example, if minutes is 60, it will set 0 and add to an hour.
51878 <Type type="void"/>
51880 <Argument name="minutes">
51886 <Type type="long"/>
51890 <Operation name="getUTCMonth" id="::Time::TZDate::getUTCMonth">
51891 <webidl> long getUTCMonth();</webidl>
51894 Returns the month, according to universal time (from 0-11).
51903 long The month, according to universal time.
51909 <Operation name="setUTCMonth" id="::Time::TZDate::setUTCMonth">
51910 <webidl> void setUTCMonth(long month);</webidl>
51913 Sets the month, according to universal time (from 0-11).
51917 If it tries to set the month bigger than 11 or smaller than 0, it will be calculated automatically.
51918 For example, if month is 12, it will set 0 and add to a year.
51925 <Type type="void"/>
51927 <Argument name="month">
51933 <Type type="long"/>
51937 <Operation name="getUTCSeconds" id="::Time::TZDate::getUTCSeconds">
51938 <webidl> long getUTCSeconds();</webidl>
51941 Returns the seconds, according to universal time (from 0-59).
51950 long The seconds, according to universal time.
51956 <Operation name="setUTCSeconds" id="::Time::TZDate::setUTCSeconds">
51957 <webidl> void setUTCSeconds(long seconds);</webidl>
51960 Sets the seconds, according to universal time (from 0-59).
51964 If it tries to set the second bigger than 59 or smaller than 0, it will be calculated automatically.
51965 For example, if seconds is 60, it will set 0 and add to a minute.
51972 <Type type="void"/>
51974 <Argument name="seconds">
51980 <Type type="long"/>
51984 <Operation name="getTimezone" id="::Time::TZDate::getTimezone">
51985 <webidl> DOMString getTimezone();</webidl>
51988 Returns timezone identifier.
51992 Zero or more slashes separate different components, with the most general
51993 descriptor first and the most specific one last. For example,
51994 'Europe/Berlin', 'America/Argentina/Buenos_Aires'.
51997 This attribute uniquely identifies the timezone.
52004 <Type type="DOMString">
52007 DOMString String timezone identifier. If TZDate is invalid, it will return 'Invalid Date'.
52013 <Operation name="toTimezone" id="::Time::TZDate::toTimezone">
52014 <webidl> <ref>TZDate</ref> toTimezone(DOMString tzid) raises(<ref>WebAPIException</ref>);</webidl>
52017 Returns a copy of the TZDate converted to a given time zone.
52023 <Type name="TZDate">
52026 TZDate New TZDate in given Timezone.
52031 <Argument name="tzid">
52034 Timezone identifier to set.
52037 <Type type="DOMString"/>
52041 <RaiseException name="WebAPIException">
52044 with error type TypeMismatchError, if the input parameter
52045 is not compatible with the expected type for that parameter.
52048 with error type InvalidValuesError, if the provided TZID
52049 is not recognized as a valid timezone identifier.
52052 with error type UnknownError, if the call failed due to an unknown error.
52058 <Operation name="toLocalTimezone" id="::Time::TZDate::toLocalTimezone">
52059 <webidl> <ref>TZDate</ref> toLocalTimezone() raises(<ref>WebAPIException</ref>);</webidl>
52062 Returns a copy of the TZDate converted to the local time zone.
52068 <Type name="TZDate">
52071 TZDate The new TZDate in local Timezone.
52077 <RaiseException name="WebAPIException">
52080 with error type UnknownError, if the call failed due to an unknown error.
52086 <Operation name="toUTC" id="::Time::TZDate::toUTC">
52087 <webidl> <ref>TZDate</ref> toUTC() raises(<ref>WebAPIException</ref>);</webidl>
52090 Returns a copy of the TZDate converted to Coordinated Universal Time (UTC).
52096 <Type name="TZDate">
52099 TZDate Date/Time in UTC.
52105 <RaiseException name="WebAPIException">
52108 with error type UnknownError, if the call failed due to an unknown error.
52114 <Operation name="difference" id="::Time::TZDate::difference">
52115 <webidl> <ref>TimeDuration</ref> difference(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);</webidl>
52118 Calculates the difference with another TZDate object.
52122 Calculates the difference in time between <em>this</em> and other.
52123 This comparison method takes timezones into consideration for the comparison.
52126 The TimeDuration that is returned is effectively <em>this</em> - other.
52127 The return value is a duration in milliseconds both TZDate objects have a time component, in days, otherwise.
52128 The result value will be:
52132 Negative, if other is in the future </li>
52134 0 if the two date / times are equal </li>
52136 Positive, if other is in the past </li>
52143 <Type name="TimeDuration">
52146 TimeDuration Duration in milliseconds between the two date / time objects
52147 (or in days for comparison between dates with no time component).
52152 <Argument name="other">
52155 Other Date/Time to compare to.
52158 <Type name="TZDate"/>
52162 <RaiseException name="WebAPIException">
52165 with error type TypeMismatchError, if the input parameter
52166 is not compatible with the expected type for that parameter.
52169 with error type UnknownError, if the call failed due to an unknown error.
52175 <Operation name="equalsTo" id="::Time::TZDate::equalsTo">
52176 <webidl> boolean equalsTo(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);</webidl>
52179 Checks if the TZDate is equal to another.
52183 This method takes the timezones into consideration and will return <em>true</em>if the two TZDate objects represent the same instant in different timezones.
52190 <Type type="boolean">
52193 boolean <em>true</em> if the 2 date/times are the same.
52198 <Argument name="other">
52201 Other Date/Time to compare to.
52204 <Type name="TZDate"/>
52208 <RaiseException name="WebAPIException">
52211 with error type TypeMismatchError, if the input parameter
52212 is not compatible with the expected type for that parameter.
52215 with error type UnknownError, if the call failed due to an unknown error.
52221 <Operation name="earlierThan" id="::Time::TZDate::earlierThan">
52222 <webidl> boolean earlierThan(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);</webidl>
52225 Checks if the TZDate is earlier than another.
52229 This method takes the timezones into consideration.
52236 <Type type="boolean">
52239 boolean <em>true</em>, if the Date/Time is earlier than the one passed in argument.
52244 <Argument name="other">
52247 Other Date/Time to compare to.
52250 <Type name="TZDate"/>
52254 <RaiseException name="WebAPIException">
52257 with error type TypeMismatchError, if the input parameter
52258 is not compatible with the expected type for that parameter.
52261 with error type UnknownError, if the call failed due to an unknown error.
52267 <Operation name="laterThan" id="::Time::TZDate::laterThan">
52268 <webidl> boolean laterThan(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);</webidl>
52271 Checks if the TZDate is later than another.
52275 This method takes the timezones into consideration.
52282 <Type type="boolean">
52285 boolean <em>true</em>, if the Date/Time is later than the one passed in argument.
52290 <Argument name="other">
52293 Other Date/Time to compare to.
52296 <Type name="TZDate"/>
52300 <RaiseException name="WebAPIException">
52303 with error type TypeMismatchError, if the input parameter
52304 is not compatible with the expected type for that parameter.
52307 with error type UnknownError, if the call failed due to an unknown error.
52313 <Operation name="addDuration" id="::Time::TZDate::addDuration">
52314 <webidl> <ref>TZDate</ref> addDuration(<ref>TimeDuration</ref> duration) raises(<ref>WebAPIException</ref>);</webidl>
52317 Returns a new date by adding a duration to the current TZDate object.
52321 If the length of duration is negative, the new date / time will be
52322 earlier than it used to.
52325 Note that calling this method does not alter the current object.
52331 <Code> var now = tizen.time.getCurrentDateTime();
52332 var in_one_week = now.addDuration(new tizen.TimeDuration(7, "DAYS"));
52335 <Type name="TZDate">
52338 TZDate The new TZDate by adding a duration.
52343 <Argument name="duration">
52346 TimeDuration to add.
52349 <Type name="TimeDuration"/>
52353 <RaiseException name="WebAPIException">
52356 with error type TypeMismatchError, if the input parameter
52357 is not compatible with the expected type for that parameter.
52360 with error type UnknownError, if the call failed due to an unknown error.
52366 <Operation name="toLocaleDateString" id="::Time::TZDate::toLocaleDateString">
52367 <webidl> DOMString toLocaleDateString();</webidl>
52370 Returns the date portion of a TZDate object as a string, using locale conventions.
52376 <Type type="DOMString">
52379 DOMString Date portion of the TZDate object as a string, using locale conventions. If TZDate is invalid, it will return 'Invalid Date'.
52385 <Operation name="toLocaleTimeString" id="::Time::TZDate::toLocaleTimeString">
52386 <webidl> DOMString toLocaleTimeString();</webidl>
52389 Returns the time portion of a TZDate object as a string, using locale conventions.
52395 <Type type="DOMString">
52398 DOMString Time portion of the TZDate object as a string, using locale conventions. If TZDate is invalid, it will return 'Invalid Date'.
52404 <Operation name="toLocaleString" id="::Time::TZDate::toLocaleString">
52405 <webidl> DOMString toLocaleString();</webidl>
52408 Converts a TZDate object to a string, using locale conventions.
52414 <Type type="DOMString">
52417 DOMString String representation of the TZDate object, using locale conventions. If TZDate is invalid, it will return 'Invalid Date'.
52423 <Operation name="toDateString" id="::Time::TZDate::toDateString">
52424 <webidl> DOMString toDateString();</webidl>
52427 Returns the date portion of a TZDate object as a string.
52433 <Type type="DOMString">
52436 DOMString Date portion of the TZDate object as a string. If TZDate is invalid, it will return 'Invalid Date'.
52442 <Operation name="toTimeString" id="::Time::TZDate::toTimeString">
52443 <webidl> DOMString toTimeString();</webidl>
52446 Returns the time portion of a TZDate object as a string.
52452 <Type type="DOMString">
52455 DOMString Time portion of the TZDate object as a string. If TZDate is invalid, it will return 'Invalid Date'.
52461 <Operation name="toString" id="::Time::TZDate::toString">
52462 <webidl> DOMString toString();</webidl>
52465 Converts a TZDate object to a string.
52471 <Type type="DOMString">
52474 DOMString String representation of the TZDate object. If TZDate is invalid, it will return 'Invalid Date'.
52480 <Operation name="getTimezoneAbbreviation" id="::Time::TZDate::getTimezoneAbbreviation">
52481 <webidl> DOMString getTimezoneAbbreviation() raises(<ref>WebAPIException</ref>);</webidl>
52484 Determines the time zone abbreviation to be used at a particular date in the time zone.
52488 For example, in Toronto this is currently "EST" during the winter months and "EDT" during the
52489 summer months when daylight savings time is in effect.
52496 Some timezones return "GMT[+-]hh:mm". It is inconsistent.
52499 <Type type="DOMString">
52502 DOMString Abbreviation of the time zone (such as "EST"). If TZDate is invalid, it will return 'Invalid Date'.
52508 <RaiseException name="WebAPIException">
52511 with error type UnknownError, if the call failed due to an unknown error.
52517 <Operation name="secondsFromUTC" id="::Time::TZDate::secondsFromUTC">
52518 <webidl> long secondsFromUTC() raises(<ref>WebAPIException</ref>);</webidl>
52521 Gets the number of seconds from Coordinated Universal Time (UTC) offset for the timezone.
52525 Returns the offset (in seconds) from UTC of the timezone, accounting for daylight
52526 savings if in effect in the timezone. For example, if time zone is GMT+8, it will return -32,400.
52532 <Code> var offset = tizen.time.getCurrentDateTime().secondsFromUTC();
52533 var myDate = new Date();
52534 var exp_offset = myDate.getTimezoneOffset()*60;
52535 //offset is equals to exp_offset.
52541 long Offset from UTC in seconds.
52547 <RaiseException name="WebAPIException">
52550 with error type UnknownError, if the call failed due to an unknown error.
52556 <Operation name="isDST" id="::Time::TZDate::isDST">
52557 <webidl> boolean isDST() raises(<ref>WebAPIException</ref>);</webidl>
52560 Indicates if Daylight Saving Time(DST) is active for this TZDate.
52564 Indicates if daylight savings are in effect for the time zone and instant
52565 identified by the TZDate object.
52572 <Type type="boolean">
52575 boolean Flag indicating if daylight saving are in effect.
52581 <RaiseException name="WebAPIException">
52584 with error type UnknownError, if the call failed due to an unknown error.
52590 <Operation name="getPreviousDSTTransition" id="::Time::TZDate::getPreviousDSTTransition">
52591 <webidl> <ref>TZDate</ref>? getPreviousDSTTransition() raises(<ref>WebAPIException</ref>);</webidl>
52594 Returns the date of the previous daylight saving time transition for the timezone.
52600 <Type name="TZDate" nullable="nullable">
52603 TZDate The date of the previous daylight saving transition (before the instant identified by the TZDate).
52609 <RaiseException name="WebAPIException">
52612 with error type UnknownError, if the call failed due to an unknown error.
52618 <Operation name="getNextDSTTransition" id="::Time::TZDate::getNextDSTTransition">
52619 <webidl> <ref>TZDate</ref>? getNextDSTTransition() raises(<ref>WebAPIException</ref>);</webidl>
52622 Returns the date of the next daylight saving time transition for the timezone.
52628 <Type name="TZDate" nullable="nullable">
52631 TZDate The date of the next daylight saving transition (after the instant identified by the TZDate).
52637 <RaiseException name="WebAPIException">
52640 with error type UnknownError, if the call failed due to an unknown error.
52647 <Interface name="TimeDuration" id="::Time::TimeDuration">
52648 <webidl> [Constructor(long long length, optional <ref>TimeDurationUnit</ref>? unit)]
52649 interface TimeDuration
52651 attribute long long length;
52653 attribute <ref>TimeDurationUnit</ref> unit;
52655 <ref>TimeDuration</ref> difference(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);
52657 boolean equalsTo(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);
52659 boolean lessThan(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);
52661 boolean greaterThan(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);
52665 The TimeDuration object that contains the length and its associated
52671 <Code> var now = tizen.time.getCurrentDateTime();
52672 var tomorrow = now.addDuration(new tizen.TimeDuration(1, "DAYS")); // Becomes tomorrow, same time.
52675 <ExtendedAttributeList>
52676 <ExtendedAttribute name="Constructor">
52677 <webidl>Constructor(long long length, optional <ref>TimeDurationUnit</ref>? unit)</webidl>
52679 <Argument name="length">
52680 <Type type="long long"/>
52682 <Argument optional="optional" name="unit">
52683 <Type name="TimeDurationUnit" nullable="nullable"/>
52686 </ExtendedAttribute>
52687 </ExtendedAttributeList>
52688 <Attribute name="length" id="::Time::TimeDuration::length">
52689 <webidl> attribute long long length;</webidl>
52696 The unit of the duration length (milliseconds, seconds, minutes, hours, or days)
52697 is determined by the duration unit attribute.
52704 <Type type="long long"/>
52706 <Attribute name="unit" id="::Time::TimeDuration::unit">
52707 <webidl> attribute <ref>TimeDurationUnit</ref> unit;</webidl>
52710 Duration unit (milliseconds, seconds, minutes, hours, or days).
52714 The default value is "MSECS" (milliseconds unit).
52721 <Type name="TimeDurationUnit"/>
52723 <Operation name="difference" id="::Time::TimeDuration::difference">
52724 <webidl> <ref>TimeDuration</ref> difference(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);</webidl>
52727 Calculates the difference between two TimeDuration objects.
52731 Calculates the difference in time between <em>this</em> and <em>other</em>.
52732 The TimeDuration that is returned is effectively <em>first</em> - <em>other</em> (that is: positive if the first parameter is larger).
52735 The returned TimeDuration is the biggest possible unit without losing the precision.
52741 <Code> // Compute event1.duration - event2.duration
52742 var diff = event1.duration.difference(event2.duration);
52743 if (diff.length > 0)
52744 console.log("event 1's duration is longer than event 2's");
52745 else if (diff.length == 0)
52746 console.log("event 1's duration is as long as event 2's");
52748 console.log("event 1's duration is shorter than event 2's");
52751 <Type name="TimeDuration">
52754 New TimeDuration object corresponding to the result of <em>this</em> - <em>other</em>.
52759 <Argument name="other">
52762 Other TimeDuration object to compare to.
52765 <Type name="TimeDuration"/>
52769 <RaiseException name="WebAPIException">
52772 with error type TypeMismatchError, if the input parameter
52773 is not compatible with the expected type for that parameter.
52776 with error type UnknownError, if the call failed due to an unknown error.
52782 <Operation name="equalsTo" id="::Time::TimeDuration::equalsTo">
52783 <webidl> boolean equalsTo(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);</webidl>
52786 Checks if the TimeDuration is equal to another.
52790 This method takes the units into consideration and will return true
52791 if the two TimeDuration objects represent the same duration in different units.
52797 <Code> var d1 = new tizen.TimeDuration(60, "MINS"); // 60 minutes
52798 var d2 = new tizen.TimeDuration(1, "HOURS"); // 1 hour
52799 var ret = d1.equalsTo(d2); // Returns true
52802 <Type type="boolean">
52805 boolean <em>true</em> if the two TimeDuration object represent the same duration.
52810 <Argument name="other">
52813 Other TimeDuration object to compare to.
52816 <Type name="TimeDuration"/>
52820 <RaiseException name="WebAPIException">
52823 with error type TypeMismatchError, if the input parameter
52824 is not compatible with the expected type for that parameter.
52827 with error type UnknownError, if the call failed due to an unknown error.
52833 <Operation name="lessThan" id="::Time::TimeDuration::lessThan">
52834 <webidl> boolean lessThan(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);</webidl>
52837 Checks if the TimeDuration is lower than another.
52841 This method takes the units into consideration when doing the comparison.
52847 <Code> var d1 = new tizen.TimeDuration(1, "HOURS"); // 1 hour
52848 var d2 = new tizen.TimeDuration(120, "MINS"); // 120 minutes
52849 var ret = d1.lessThan(d2); // Returns true
52852 <Type type="boolean">
52855 boolean <em>true</em> if the TimeDuration is less than <em>other</em>.
52860 <Argument name="other">
52863 Other TimeDuration object to compare to.
52866 <Type name="TimeDuration"/>
52870 <RaiseException name="WebAPIException">
52873 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
52876 with error type UnknownError, if the call failed due to an unknown error.
52882 <Operation name="greaterThan" id="::Time::TimeDuration::greaterThan">
52883 <webidl> boolean greaterThan(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);</webidl>
52886 Checks if the TimeDuration is greater than another.
52890 This method takes the units into consideration when doing the comparison.
52896 <Code> var d1 = new tizen.TimeDuration(120, "MINS"); // 120 minutes
52897 var d2 = new tizen.TimeDuration(1, "HOURS"); // 1 hour
52898 var ret = d1.greaterThan(d2); // Returns true
52901 <Type type="boolean">
52904 boolean <em>true</em> if the TimeDuration is greater than <em>other</em>.
52909 <Argument name="other">
52912 Other TimeDuration object to compare to.
52915 <Type name="TimeDuration"/>
52919 <RaiseException name="WebAPIException">
52922 with error type TypeMismatchError, if the input parameter
52923 is not compatible with the expected type for that parameter.
52926 with error type UnknownError, if the call failed due to an unknown error.
52934 <Module name="Tizen" id="::Tizen">
52935 <webidl>module Tizen {
52936 enum FilterMatchFlag { "EXACTLY", "FULLSTRING", "CONTAINS", "STARTSWITH", "ENDSWITH", "EXISTS" };
52938 enum SortModeOrder { "ASC", "DESC" };
52940 enum CompositeFilterType { "UNION", "INTERSECTION" };
52942 [NoInterfaceObject] interface TizenObject {
52943 readonly attribute <ref>Tizen</ref> tizen;
52945 <ref>Window</ref> implements <ref>TizenObject</ref>;
52947 [NoInterfaceObject] interface Tizen {
52950 [NoInterfaceObject] interface AbstractFilter {
52953 [Constructor(DOMString attributeName, optional <ref>FilterMatchFlag</ref>? matchFlag, optional any matchValue)]
52954 interface AttributeFilter : <ref>AbstractFilter</ref> {
52955 attribute DOMString attributeName;
52957 attribute <ref>FilterMatchFlag</ref> matchFlag setraises(<ref>WebAPIException</ref>);
52959 attribute any matchValue;
52962 [Constructor(DOMString attributeName, optional any initialValue, optional any endValue)]
52963 interface AttributeRangeFilter : <ref>AbstractFilter</ref> {
52964 attribute DOMString attributeName;
52966 attribute any initialValue;
52968 attribute any endValue;
52971 [Constructor(<ref>CompositeFilterType</ref> type, optional <ref>AbstractFilter</ref>[]? filters)]
52972 interface CompositeFilter : <ref>AbstractFilter</ref> {
52974 attribute <ref>CompositeFilterType</ref> type;
52976 attribute <ref>AbstractFilter</ref>[] filters;
52979 [Constructor(DOMString attributeName, optional <ref>SortModeOrder</ref>? order)]
52980 interface SortMode {
52981 attribute DOMString attributeName;
52983 attribute <ref>SortModeOrder</ref> order setraises(<ref>WebAPIException</ref>);
52986 [Constructor(double latitude, double longitude)]
52987 interface SimpleCoordinates {
52988 attribute double latitude setraises(<ref>WebAPIException</ref>);
52990 attribute double longitude setraises(<ref>WebAPIException</ref>);
52993 [NoInterfaceObject]
52994 interface WebAPIException {
52995 readonly attribute unsigned short code;
52997 readonly attribute DOMString name;
52999 readonly attribute DOMString message;
53001 const unsigned short INDEX_SIZE_ERR = 1;
53002 const unsigned short DOMSTRING_SIZE_ERR = 2;
53003 const unsigned short HIERARCHY_REQUEST_ERR = 3;
53004 const unsigned short WRONG_DOCUMENT_ERR = 4;
53005 const unsigned short INVALID_CHARACTER_ERR = 5;
53006 const unsigned short NO_DATA_ALLOWED_ERR = 6;
53007 const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7;
53008 const unsigned short NOT_FOUND_ERR = 8;
53009 const unsigned short NOT_SUPPORTED_ERR = 9;
53010 const unsigned short INUSE_ATTRIBUTE_ERR = 10;
53011 const unsigned short INVALID_STATE_ERR = 11;
53012 const unsigned short SYNTAX_ERR = 12;
53013 const unsigned short INVALID_MODIFICATION_ERR = 13;
53014 const unsigned short NAMESPACE_ERR = 14;
53015 const unsigned short INVALID_ACCESS_ERR = 15;
53016 const unsigned short VALIDATION_ERR = 16;
53017 const unsigned short TYPE_MISMATCH_ERR = 17;
53018 const unsigned short SECURITY_ERR = 18;
53019 const unsigned short NETWORK_ERR = 19;
53020 const unsigned short ABORT_ERR = 20;
53021 const unsigned short URL_MISMATCH_ERR = 21;
53022 const unsigned short QUOTA_EXCEEDED_ERR = 22;
53023 const unsigned short TIMEOUT_ERR = 23;
53024 const unsigned short INVALID_NODE_TYPE_ERR = 24;
53025 const unsigned short DATA_CLONE_ERR = 25;
53028 [NoInterfaceObject]
53029 interface WebAPIError {
53030 readonly attribute unsigned short code;
53032 readonly attribute DOMString name;
53034 readonly attribute DOMString message;
53037 [Callback=FunctionOnly, NoInterfaceObject]
53038 interface SuccessCallback {
53042 [Callback=FunctionOnly, NoInterfaceObject]
53043 interface ErrorCallback {
53045 void onerror (<ref>WebAPIError</ref> error);
53050 This API provides common Tizen functionality.
53054 The API provides the basic definitions that are used in the Tizen Web Device API.
53055 These include generic callbacks that are invoked when the operations succeed or fail,
53056 WebAPIError and WebAPIException that gives information of the platform's error and
53057 filters interfaces that are used to make query for searching.
53060 Additionally, this API specifies the location in the ECMAScript hierarchy in which
53061 the Tizen Web Device API is instantiated (<em>window.tizen</em>).
53064 For more information on the Tizen features, see <a href="../../org.tizen.web.appprogramming/html/guide/tizen_guide/tizen.htm">Tizen Guide</a>.
53071 <Enum name="FilterMatchFlag" id="::Tizen::FilterMatchFlag">
53072 <webidl> enum FilterMatchFlag { "EXACTLY", "FULLSTRING", "CONTAINS", "STARTSWITH", "ENDSWITH", "EXISTS" };</webidl>
53079 These values are supported:
53083 EXACTLY - Indicates that an attribute value should match exactly with the specified default value.
53084 For strings, this type of comparison is case-sensitive. </li>
53086 FULLSTRING - Indicates String-based comparison and that the attribute value should match the whole string (case insensitive). </li>
53088 CONTAINS - Indicates that an attribute value should contain the specified string. This type of comparison works only on strings and is case insensitive. </li>
53090 STARTSWITH - Indicates that an attribute value should start with the specified string.
53091 This type of comparison works only on strings and is case insensitive. </li>
53093 ENDSWITH - Indicates that an attribute value should end with the specified string. This type of comparison works only on strings and is case insensitive. </li>
53095 EXISTS - Indicates that a filter comparison should match if the specified attribute exists. </li>
53102 <EnumValue stringvalue="EXACTLY">
53103 <webidl> "EXACTLY</webidl>
53105 <EnumValue stringvalue="FULLSTRING">
53106 <webidl> "FULLSTRING</webidl>
53108 <EnumValue stringvalue="CONTAINS">
53109 <webidl> "CONTAINS</webidl>
53111 <EnumValue stringvalue="STARTSWITH">
53112 <webidl> "STARTSWITH</webidl>
53114 <EnumValue stringvalue="ENDSWITH">
53115 <webidl> "ENDSWITH</webidl>
53117 <EnumValue stringvalue="EXISTS">
53118 <webidl> "EXISTS</webidl>
53121 <Enum name="SortModeOrder" id="::Tizen::SortModeOrder">
53122 <webidl> enum SortModeOrder { "ASC", "DESC" };</webidl>
53125 An enumerator that indicates the sorting order.
53129 The following values are supported:
53133 ASC - Indicates the sorting order is ascending </li>
53135 DESC - Indicates the sorting order is descending </li>
53142 <EnumValue stringvalue="ASC">
53143 <webidl> "ASC</webidl>
53145 <EnumValue stringvalue="DESC">
53146 <webidl> "DESC</webidl>
53149 <Enum name="CompositeFilterType" id="::Tizen::CompositeFilterType">
53150 <webidl> enum CompositeFilterType { "UNION", "INTERSECTION" };</webidl>
53153 An enumerator that indicates the type of composite filter.
53157 The following values are supported:
53161 UNION - Indicates that the composite is a union of filters ("OR" operator) </li>
53163 INTERSECTION - Indicates that the composite is an intersection of filters ("AND" operator) </li>
53170 <EnumValue stringvalue="UNION">
53171 <webidl> "UNION</webidl>
53173 <EnumValue stringvalue="INTERSECTION">
53174 <webidl> "INTERSECTION</webidl>
53177 <Interface name="TizenObject" id="::Tizen::TizenObject">
53178 <webidl> [NoInterfaceObject] interface TizenObject {
53179 readonly attribute <ref>Tizen</ref> tizen;
53183 Defines the tizen interface as a part of the window global object.
53187 The <em>Tizen</em> interface is always available within the <em>Window </em>object in the ECMAScript hierarchy.
53194 <ExtendedAttributeList>
53195 <ExtendedAttribute name="NoInterfaceObject">
53196 <webidl>NoInterfaceObject</webidl>
53197 </ExtendedAttribute>
53198 </ExtendedAttributeList>
53199 <Attribute readonly="readonly" name="tizen" id="::Tizen::TizenObject::tizen">
53200 <webidl> readonly attribute <ref>Tizen</ref> tizen;</webidl>
53201 <Type name="Tizen"/>
53204 <Implements name1="Window" name2="TizenObject">
53205 <webidl> <ref>Window</ref> implements <ref>TizenObject</ref>;</webidl>
53207 <Interface name="Tizen" id="::Tizen::Tizen">
53208 <webidl> [NoInterfaceObject] interface Tizen {
53212 The root of Tizen Web Device API.
53216 This is the Tizen root interface.
53217 It is a property of the ECMAScript global object, as specified by the <em>TizenObject</em> interface.
53224 <ExtendedAttributeList>
53225 <ExtendedAttribute name="NoInterfaceObject">
53226 <webidl>NoInterfaceObject</webidl>
53227 </ExtendedAttribute>
53228 </ExtendedAttributeList>
53230 <Interface name="AbstractFilter" id="::Tizen::AbstractFilter">
53231 <webidl> [NoInterfaceObject] interface AbstractFilter {
53235 This is a common interface used by different types of
53240 Never use this base interface directly, instead use <em>AbstractFilter</em> subtypes,
53241 such as <em>AttributeFilter</em>, <em>AttributeRangeFilter</em>, and <em>CompositeFilter</em>.
53248 <ExtendedAttributeList>
53249 <ExtendedAttribute name="NoInterfaceObject">
53250 <webidl>NoInterfaceObject</webidl>
53251 </ExtendedAttribute>
53252 </ExtendedAttributeList>
53254 <Interface name="AttributeFilter" id="::Tizen::AttributeFilter">
53255 <webidl> [Constructor(DOMString attributeName, optional <ref>FilterMatchFlag</ref>? matchFlag, optional any matchValue)]
53256 interface AttributeFilter : <ref>AbstractFilter</ref> {
53257 attribute DOMString attributeName;
53259 attribute <ref>FilterMatchFlag</ref> matchFlag setraises(<ref>WebAPIException</ref>);
53261 attribute any matchValue;
53265 This interface represents a set of filter.
53269 It represents the query statement for the specified value of the <em>matchValue</em> by the rule of <em>matchFlag</em>.
53272 If no <em>matchValue</em> is defined, the filter will match all objects that have the attribute
53273 defined (same as the "EXISTS" filter works), otherwise, it will only match objects which have an attribute that matches
53274 the specified value.
53280 <Code> // Define success callback
53281 function successCallback(contacts) {
53282 console.log(contacts.length + " contacts found.");
53285 // Define error callback
53286 function errorCallback(error) {
53287 console.log("An error occurred: " + error.message);
53290 // Create an attribute filter based on first name: "First name should contain 'Chris' (case insensitive)"
53291 var filter = new tizen.AttributeFilter("name.firstName", "CONTAINS", "Chris");
53292 // Send request on contact address book.
53293 tizen.contact.getDefaultAddressBook().find(successCallback, errorCallback, filter);
53296 <ExtendedAttributeList>
53297 <ExtendedAttribute name="Constructor">
53298 <webidl>Constructor(DOMString attributeName, optional <ref>FilterMatchFlag</ref>? matchFlag, optional any matchValue)</webidl>
53300 <Argument name="attributeName">
53301 <Type type="DOMString"/>
53303 <Argument optional="optional" name="matchFlag">
53304 <Type name="FilterMatchFlag" nullable="nullable"/>
53306 <Argument optional="optional" name="matchValue">
53310 </ExtendedAttribute>
53311 </ExtendedAttributeList>
53312 <InterfaceInheritance>
53313 <Name name="AbstractFilter"/>
53314 </InterfaceInheritance>
53315 <Attribute name="attributeName" id="::Tizen::AttributeFilter::attributeName">
53316 <webidl> attribute DOMString attributeName;</webidl>
53319 The name of the object attribute used for filtering.
53323 This is the name of the object attribute exactly as it is defined in
53324 the object's interface. For attributes of complex type, use fully-qualified names
53325 (such as 'organizations.role' to filter on a contact's role in an organization).
53328 For attributes of an array type, the filter will match if any value in the array
53336 <Type type="DOMString"/>
53338 <Attribute name="matchFlag" id="::Tizen::AttributeFilter::matchFlag">
53339 <webidl> attribute <ref>FilterMatchFlag</ref> matchFlag setraises(<ref>WebAPIException</ref>);</webidl>
53342 The match flag used for attribute-based filtering.
53346 By default, this attribute is set to "EXACTLY".
53353 <Type name="FilterMatchFlag"/>
53355 <RaiseException name="WebAPIException"/>
53358 <Attribute name="matchValue" id="::Tizen::AttributeFilter::matchValue">
53359 <webidl> attribute any matchValue;</webidl>
53362 The value used for matching.
53366 The filter will match if the attribute value matches the given matchValue.
53369 This value is not used if the <em>matchFlag</em> is set to "EXISTS".
53370 By default, this attribute is set to null.
53380 <Interface name="AttributeRangeFilter" id="::Tizen::AttributeRangeFilter">
53381 <webidl> [Constructor(DOMString attributeName, optional any initialValue, optional any endValue)]
53382 interface AttributeRangeFilter : <ref>AbstractFilter</ref> {
53383 attribute DOMString attributeName;
53385 attribute any initialValue;
53387 attribute any endValue;
53391 <em>AttributeRangeFilter</em> represents a filter based on an object attribute
53392 which has values that are within a particular range.
53396 Range filters, where only one boundary is set, are available.
53402 <Code> // Define success callback
53403 function successCallback(events) {
53404 console.log(events.length + " events today.");
53407 // Define error callback
53408 function errorCallback(error) {
53409 console.log("An error occurred: " + error.message);
53412 // Create an attribute range filter based on event start date: "All events occurring today".
53413 var now_dt = tizen.time.getCurrentDateTime();
53414 var today_begin = new tizen.TZDate(now_dt.getFullYear(), now_dt.getMonth(), now_dt.getDate());
53415 var today_end = today_begin.addDuration(new tizen.TimeDuration(1, "DAYS"));
53416 var filter = new tizen.AttributeRangeFilter("startDate", today_begin, today_end);
53418 // Send a search request to default event calendar.
53419 tizen.calendar.getDefaultCalendar("EVENT").find(successCallback, errorCallback, filter);
53422 <ExtendedAttributeList>
53423 <ExtendedAttribute name="Constructor">
53424 <webidl>Constructor(DOMString attributeName, optional any initialValue, optional any endValue)</webidl>
53426 <Argument name="attributeName">
53427 <Type type="DOMString"/>
53429 <Argument optional="optional" name="initialValue">
53432 <Argument optional="optional" name="endValue">
53436 </ExtendedAttribute>
53437 </ExtendedAttributeList>
53438 <InterfaceInheritance>
53439 <Name name="AbstractFilter"/>
53440 </InterfaceInheritance>
53441 <Attribute name="attributeName" id="::Tizen::AttributeRangeFilter::attributeName">
53442 <webidl> attribute DOMString attributeName;</webidl>
53445 The name of the object attribute used for filtering.
53449 The value of this attribute is exactly as it is defined in the object's interface. For attributes of complex type, use fully-qualified names
53450 (such as 'organizations.role' to filter on a contact's role in an organization).
53453 For attributes of array type, the filter will match if any value in the array
53461 <Type type="DOMString"/>
53463 <Attribute name="initialValue" id="::Tizen::AttributeRangeFilter::initialValue">
53464 <webidl> attribute any initialValue;</webidl>
53467 Objects with an attribute that is greater than or equal to <em>initialValue</em> will match.
53471 By default, this attribute is set to <var>null</var>.
53480 <Attribute name="endValue" id="::Tizen::AttributeRangeFilter::endValue">
53481 <webidl> attribute any endValue;</webidl>
53484 Objects with an attribute that is strictly lower than to <em>endValue</em> will match.
53488 By default, this attribute is set to <var>null</var>.
53498 <Interface name="CompositeFilter" id="::Tizen::CompositeFilter">
53499 <webidl> [Constructor(<ref>CompositeFilterType</ref> type, optional <ref>AbstractFilter</ref>[]? filters)]
53500 interface CompositeFilter : <ref>AbstractFilter</ref> {
53502 attribute <ref>CompositeFilterType</ref> type;
53504 attribute <ref>AbstractFilter</ref>[] filters;
53508 <em>CompositeFilter</em> represents a set of filters.
53512 The composite filters can be one of the 2 types:
53516 The union - used to filter objects that match any of the filters it includes. </li>
53518 The intersection - used to filter objects that match all filters it includes. </li>
53524 <Code> // Define success callback
53525 function successCallback(contacts) {
53526 console.log(contacts.length + " contacts found.");
53529 // Define error callback
53530 function errorCallback(error) {
53531 console.log("An error occurred: " + error.message);
53534 // Create an attribute filter based on first name: "First name should contain 'Chris' (case insensitive)
53535 var firstNameFilter = new tizen.AttributeFilter("name.firstName", "CONTAINS", "Chris");
53537 // Create an attribute filter based on last name: "Last name should be exactly 'Smith' (case insensitive)
53538 var lastNameFilter = new tizen.AttributeFilter("name.lastName", "EXACTLY", "Smith"};
53540 // Create a filter based on the intersection of these two filter:
53541 // "First name should contain 'Chris' AND last name should be 'Smith'".
53542 var filter = new tizen.CompositeFilter("INTERSECTION", [firstNameFilter, lastNameFilter]);
53544 // Send request on contact address book.
53545 tizen.contact.getDefaultAddressBook().find(successCallback, errorCallback, filter);
53548 <ExtendedAttributeList>
53549 <ExtendedAttribute name="Constructor">
53550 <webidl>Constructor(<ref>CompositeFilterType</ref> type, optional <ref>AbstractFilter</ref>[]? filters)</webidl>
53552 <Argument name="type">
53553 <Type name="CompositeFilterType"/>
53555 <Argument optional="optional" name="filters">
53556 <Type type="array" nullable="nullable">
53557 <Type name="AbstractFilter"/>
53561 </ExtendedAttribute>
53562 </ExtendedAttributeList>
53563 <InterfaceInheritance>
53564 <Name name="AbstractFilter"/>
53565 </InterfaceInheritance>
53566 <Attribute name="type" id="::Tizen::CompositeFilter::type">
53567 <webidl> attribute <ref>CompositeFilterType</ref> type;</webidl>
53570 The composite filter type.
53576 <Type name="CompositeFilterType"/>
53578 <Attribute name="filters" id="::Tizen::CompositeFilter::filters">
53579 <webidl> attribute <ref>AbstractFilter</ref>[] filters;</webidl>
53582 The list of filters in the composite filter.
53588 <Type type="array">
53589 <Type name="AbstractFilter"/>
53593 <Interface name="SortMode" id="::Tizen::SortMode">
53594 <webidl> [Constructor(DOMString attributeName, optional <ref>SortModeOrder</ref>? order)]
53595 interface SortMode {
53596 attribute DOMString attributeName;
53598 attribute <ref>SortModeOrder</ref> order setraises(<ref>WebAPIException</ref>);
53602 <em>SortMode</em> is a common interface used for sorting of queried data.
53606 Note that the sorting result of list type attributes is not determined.
53612 <Code> // Define a success callback
53613 function successCallback(contacts) {
53614 // The returned contacts are sorted by first name (ascending)
53615 console.log(contacts.length + " contacts found.");
53618 // Define an error callback
53619 function errorCallback(error) {
53620 console.log("An error occurred: " + error.message);
53623 // Create an attribute filter based on first name: "First name should contain 'Chris' (case insensitive)"
53624 var filter = new tizen.AttributeFilter("name.firstName", "CONTAINS", "Chris");
53625 // Sort by first name, ascending
53626 var sortMode = new tizen.SortMode("name.firstName", "ASC");
53627 // Send request on contact address book.
53628 tizen.contact.getDefaultAddressBook().find(successCallback, errorCallback, filter, sortMode);
53631 <ExtendedAttributeList>
53632 <ExtendedAttribute name="Constructor">
53633 <webidl>Constructor(DOMString attributeName, optional <ref>SortModeOrder</ref>? order)</webidl>
53635 <Argument name="attributeName">
53636 <Type type="DOMString"/>
53638 <Argument optional="optional" name="order">
53639 <Type name="SortModeOrder" nullable="nullable"/>
53642 </ExtendedAttribute>
53643 </ExtendedAttributeList>
53644 <Attribute name="attributeName" id="::Tizen::SortMode::attributeName">
53645 <webidl> attribute DOMString attributeName;</webidl>
53648 The name of the object attribute used for sorting.
53654 <Type type="DOMString"/>
53656 <Attribute name="order" id="::Tizen::SortMode::order">
53657 <webidl> attribute <ref>SortModeOrder</ref> order setraises(<ref>WebAPIException</ref>);</webidl>
53660 The type of the sorting.
53664 By default, this attribute is set to <var>ASC</var>.
53671 <Type name="SortModeOrder"/>
53673 <RaiseException name="WebAPIException"/>
53677 <Interface name="SimpleCoordinates" id="::Tizen::SimpleCoordinates">
53678 <webidl> [Constructor(double latitude, double longitude)]
53679 interface SimpleCoordinates {
53680 attribute double latitude setraises(<ref>WebAPIException</ref>);
53682 attribute double longitude setraises(<ref>WebAPIException</ref>);
53686 <em>SimpleCoordinates</em> represents a point (latitude and longitude) in map coordinate system.
53690 Latitude and longitude are of the WGS84 datum.
53697 <ExtendedAttributeList>
53698 <ExtendedAttribute name="Constructor">
53699 <webidl>Constructor(double latitude, double longitude)</webidl>
53701 <Argument name="latitude">
53702 <Type type="double"/>
53704 <Argument name="longitude">
53705 <Type type="double"/>
53708 </ExtendedAttribute>
53709 </ExtendedAttributeList>
53710 <Attribute name="latitude" id="::Tizen::SimpleCoordinates::latitude">
53711 <webidl> attribute double latitude setraises(<ref>WebAPIException</ref>);</webidl>
53720 <Type type="double"/>
53722 <RaiseException name="WebAPIException"/>
53725 <Attribute name="longitude" id="::Tizen::SimpleCoordinates::longitude">
53726 <webidl> attribute double longitude setraises(<ref>WebAPIException</ref>);</webidl>
53735 <Type type="double"/>
53737 <RaiseException name="WebAPIException"/>
53741 <Interface name="WebAPIException" id="::Tizen::WebAPIException">
53742 <webidl> [NoInterfaceObject]
53743 interface WebAPIException {
53744 readonly attribute unsigned short code;
53746 readonly attribute DOMString name;
53748 readonly attribute DOMString message;
53750 const unsigned short INDEX_SIZE_ERR = 1;
53751 const unsigned short DOMSTRING_SIZE_ERR = 2;
53752 const unsigned short HIERARCHY_REQUEST_ERR = 3;
53753 const unsigned short WRONG_DOCUMENT_ERR = 4;
53754 const unsigned short INVALID_CHARACTER_ERR = 5;
53755 const unsigned short NO_DATA_ALLOWED_ERR = 6;
53756 const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7;
53757 const unsigned short NOT_FOUND_ERR = 8;
53758 const unsigned short NOT_SUPPORTED_ERR = 9;
53759 const unsigned short INUSE_ATTRIBUTE_ERR = 10;
53760 const unsigned short INVALID_STATE_ERR = 11;
53761 const unsigned short SYNTAX_ERR = 12;
53762 const unsigned short INVALID_MODIFICATION_ERR = 13;
53763 const unsigned short NAMESPACE_ERR = 14;
53764 const unsigned short INVALID_ACCESS_ERR = 15;
53765 const unsigned short VALIDATION_ERR = 16;
53766 const unsigned short TYPE_MISMATCH_ERR = 17;
53767 const unsigned short SECURITY_ERR = 18;
53768 const unsigned short NETWORK_ERR = 19;
53769 const unsigned short ABORT_ERR = 20;
53770 const unsigned short URL_MISMATCH_ERR = 21;
53771 const unsigned short QUOTA_EXCEEDED_ERR = 22;
53772 const unsigned short TIMEOUT_ERR = 23;
53773 const unsigned short INVALID_NODE_TYPE_ERR = 24;
53774 const unsigned short DATA_CLONE_ERR = 25;
53778 Generic exception interface.
53782 This interface will be used by the APIs to throw errors synchronously.
53785 The attempt to set an attribute value may or may not raise WebAPIException synchronously with error type TypeMismatchError or InvalidValuesError.
53792 <ExtendedAttributeList>
53793 <ExtendedAttribute name="NoInterfaceObject">
53794 <webidl>NoInterfaceObject</webidl>
53795 </ExtendedAttribute>
53796 </ExtendedAttributeList>
53797 <Attribute readonly="readonly" name="code" id="::Tizen::WebAPIException::code">
53798 <webidl> readonly attribute unsigned short code;</webidl>
53802 For the possible values for this attribute, see <a href="http://www.w3.org/TR/dom/#domexception">DOMException</a>.
53808 <Type type="unsigned short"/>
53810 <Attribute readonly="readonly" name="name" id="::Tizen::WebAPIException::name">
53811 <webidl> readonly attribute DOMString name;</webidl>
53814 An error type. The name attribute must return the value it was initialized with.
53815 This attribute can have one of the following values:
53820 UnknownError - An unknown error has occurred. </li>
53822 InvalidValuesError - The content of an object does not contain valid values. </li>
53824 IOError - An error occurred in communication with the underlying implementation and so the requested method cannot be completed. </li>
53826 ServiceNotAvailableError - The requested service is not available. </li>
53829 For other possible values for this attribute, see the values defined in <a href="http://www.w3.org/TR/dom/#error-types">DOM error types</a>
53836 <Type type="DOMString"/>
53838 <Attribute readonly="readonly" name="message" id="::Tizen::WebAPIException::message">
53839 <webidl> readonly attribute DOMString message;</webidl>
53842 An error message that describes the details of an encountered error.
53843 This attribute is mainly intended to be used for developers rather than end users, so it should not be used directly in the user interfaces as it is.
53849 <Type type="DOMString"/>
53851 <Const name="INDEX_SIZE_ERR" value="1" id="::Tizen::WebAPIException::INDEX_SIZE_ERR">
53852 <webidl> const unsigned short INDEX_SIZE_ERR = 1;</webidl>
53855 The index is not in the allowed range.
53861 <Type type="unsigned short"/>
53863 <Const name="DOMSTRING_SIZE_ERR" value="2" id="::Tizen::WebAPIException::DOMSTRING_SIZE_ERR">
53864 <webidl> const unsigned short DOMSTRING_SIZE_ERR = 2;</webidl>
53867 The specified range of text is too large.
53873 <Type type="unsigned short"/>
53875 <Const name="HIERARCHY_REQUEST_ERR" value="3" id="::Tizen::WebAPIException::HIERARCHY_REQUEST_ERR">
53876 <webidl> const unsigned short HIERARCHY_REQUEST_ERR = 3;</webidl>
53879 The operation would yield an incorrect node tree.
53885 <Type type="unsigned short"/>
53887 <Const name="WRONG_DOCUMENT_ERR" value="4" id="::Tizen::WebAPIException::WRONG_DOCUMENT_ERR">
53888 <webidl> const unsigned short WRONG_DOCUMENT_ERR = 4;</webidl>
53891 The object is in the wrong document.
53897 <Type type="unsigned short"/>
53899 <Const name="INVALID_CHARACTER_ERR" value="5" id="::Tizen::WebAPIException::INVALID_CHARACTER_ERR">
53900 <webidl> const unsigned short INVALID_CHARACTER_ERR = 5;</webidl>
53903 The string contains invalid characters.
53909 <Type type="unsigned short"/>
53911 <Const name="NO_DATA_ALLOWED_ERR" value="6" id="::Tizen::WebAPIException::NO_DATA_ALLOWED_ERR">
53912 <webidl> const unsigned short NO_DATA_ALLOWED_ERR = 6;</webidl>
53915 Data is specified for a node that does not support data.
53921 <Type type="unsigned short"/>
53923 <Const name="NO_MODIFICATION_ALLOWED_ERR" value="7" id="::Tizen::WebAPIException::NO_MODIFICATION_ALLOWED_ERR">
53924 <webidl> const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7;</webidl>
53927 The object cannot be modified.
53933 <Type type="unsigned short"/>
53935 <Const name="NOT_FOUND_ERR" value="8" id="::Tizen::WebAPIException::NOT_FOUND_ERR">
53936 <webidl> const unsigned short NOT_FOUND_ERR = 8;</webidl>
53939 The object cannot be found here.
53945 <Type type="unsigned short"/>
53947 <Const name="NOT_SUPPORTED_ERR" value="9" id="::Tizen::WebAPIException::NOT_SUPPORTED_ERR">
53948 <webidl> const unsigned short NOT_SUPPORTED_ERR = 9;</webidl>
53951 The operation is not supported.
53957 <Type type="unsigned short"/>
53959 <Const name="INUSE_ATTRIBUTE_ERR" value="10" id="::Tizen::WebAPIException::INUSE_ATTRIBUTE_ERR">
53960 <webidl> const unsigned short INUSE_ATTRIBUTE_ERR = 10;</webidl>
53963 The specified attribute is already in use elsewhere.
53969 <Type type="unsigned short"/>
53971 <Const name="INVALID_STATE_ERR" value="11" id="::Tizen::WebAPIException::INVALID_STATE_ERR">
53972 <webidl> const unsigned short INVALID_STATE_ERR = 11;</webidl>
53975 The object is in an invalid state.
53981 <Type type="unsigned short"/>
53983 <Const name="SYNTAX_ERR" value="12" id="::Tizen::WebAPIException::SYNTAX_ERR">
53984 <webidl> const unsigned short SYNTAX_ERR = 12;</webidl>
53987 The string did not match the expected pattern.
53993 <Type type="unsigned short"/>
53995 <Const name="INVALID_MODIFICATION_ERR" value="13" id="::Tizen::WebAPIException::INVALID_MODIFICATION_ERR">
53996 <webidl> const unsigned short INVALID_MODIFICATION_ERR = 13;</webidl>
53999 The object cannot be modified in this way.
54005 <Type type="unsigned short"/>
54007 <Const name="NAMESPACE_ERR" value="14" id="::Tizen::WebAPIException::NAMESPACE_ERR">
54008 <webidl> const unsigned short NAMESPACE_ERR = 14;</webidl>
54011 The operation is not allowed by Namespaces in XML.
54017 <Type type="unsigned short"/>
54019 <Const name="INVALID_ACCESS_ERR" value="15" id="::Tizen::WebAPIException::INVALID_ACCESS_ERR">
54020 <webidl> const unsigned short INVALID_ACCESS_ERR = 15;</webidl>
54023 The object does not support the operation or argument.
54029 <Type type="unsigned short"/>
54031 <Const name="VALIDATION_ERR" value="16" id="::Tizen::WebAPIException::VALIDATION_ERR">
54032 <webidl> const unsigned short VALIDATION_ERR = 16;</webidl>
54035 The operation would cause the node to fail validation.
54041 <Type type="unsigned short"/>
54043 <Const name="TYPE_MISMATCH_ERR" value="17" id="::Tizen::WebAPIException::TYPE_MISMATCH_ERR">
54044 <webidl> const unsigned short TYPE_MISMATCH_ERR = 17;</webidl>
54047 The type of the object does not match the expected type.
54053 <Type type="unsigned short"/>
54055 <Const name="SECURITY_ERR" value="18" id="::Tizen::WebAPIException::SECURITY_ERR">
54056 <webidl> const unsigned short SECURITY_ERR = 18;</webidl>
54059 The operation is insecure.
54065 <Type type="unsigned short"/>
54067 <Const name="NETWORK_ERR" value="19" id="::Tizen::WebAPIException::NETWORK_ERR">
54068 <webidl> const unsigned short NETWORK_ERR = 19;</webidl>
54071 A network error occurred.
54077 <Type type="unsigned short"/>
54079 <Const name="ABORT_ERR" value="20" id="::Tizen::WebAPIException::ABORT_ERR">
54080 <webidl> const unsigned short ABORT_ERR = 20;</webidl>
54083 The operation was aborted.
54089 <Type type="unsigned short"/>
54091 <Const name="URL_MISMATCH_ERR" value="21" id="::Tizen::WebAPIException::URL_MISMATCH_ERR">
54092 <webidl> const unsigned short URL_MISMATCH_ERR = 21;</webidl>
54095 The given URL does not match another URL.
54101 <Type type="unsigned short"/>
54103 <Const name="QUOTA_EXCEEDED_ERR" value="22" id="::Tizen::WebAPIException::QUOTA_EXCEEDED_ERR">
54104 <webidl> const unsigned short QUOTA_EXCEEDED_ERR = 22;</webidl>
54107 The quota has been exceeded.
54113 <Type type="unsigned short"/>
54115 <Const name="TIMEOUT_ERR" value="23" id="::Tizen::WebAPIException::TIMEOUT_ERR">
54116 <webidl> const unsigned short TIMEOUT_ERR = 23;</webidl>
54119 The operation timed out.
54125 <Type type="unsigned short"/>
54127 <Const name="INVALID_NODE_TYPE_ERR" value="24" id="::Tizen::WebAPIException::INVALID_NODE_TYPE_ERR">
54128 <webidl> const unsigned short INVALID_NODE_TYPE_ERR = 24;</webidl>
54131 The supplied node is incorrect or has an incorrect ancestor for this operation.
54137 <Type type="unsigned short"/>
54139 <Const name="DATA_CLONE_ERR" value="25" id="::Tizen::WebAPIException::DATA_CLONE_ERR">
54140 <webidl> const unsigned short DATA_CLONE_ERR = 25;</webidl>
54143 The object cannot be cloned.
54149 <Type type="unsigned short"/>
54152 <Interface name="WebAPIError" id="::Tizen::WebAPIError">
54153 <webidl> [NoInterfaceObject]
54154 interface WebAPIError {
54155 readonly attribute unsigned short code;
54157 readonly attribute DOMString name;
54159 readonly attribute DOMString message;
54163 Generic error interface.
54167 This interface will be used by the APIs in order to return them in the error callback of asynchronous methods.
54174 <ExtendedAttributeList>
54175 <ExtendedAttribute name="NoInterfaceObject">
54176 <webidl>NoInterfaceObject</webidl>
54177 </ExtendedAttribute>
54178 </ExtendedAttributeList>
54179 <Attribute readonly="readonly" name="code" id="::Tizen::WebAPIError::code">
54180 <webidl> readonly attribute unsigned short code;</webidl>
54184 Possible values are defined in <a href="http://www.w3.org/TR/dom/#domexception">DOMException</a>.
54190 <Type type="unsigned short"/>
54192 <Attribute readonly="readonly" name="name" id="::Tizen::WebAPIError::name">
54193 <webidl> readonly attribute DOMString name;</webidl>
54196 An error type. The name attribute must return the value it was initialized with.
54197 This attribute can have one of the following values:
54202 UnknownError - An unknown error has occurred. </li>
54204 InvalidValuesError - The content of an object does not contain valid values. </li>
54206 IOError - An error occurred in communication with the underlying implementation and so the requested method cannot be completed. </li>
54208 ServiceNotAvailableError - The requested service is not available. </li>
54211 For other possible values for this attribute, see the values defined in <a href="http://www.w3.org/TR/dom/#error-types">DOM error types</a>
54218 <Type type="DOMString"/>
54220 <Attribute readonly="readonly" name="message" id="::Tizen::WebAPIError::message">
54221 <webidl> readonly attribute DOMString message;</webidl>
54224 An error message that describes the details of the error encountered. This attribute is not intended
54225 to be used directly in the user interfaces as it is mainly intended to be useful for developers rather than end users.
54231 <Type type="DOMString"/>
54234 <Interface name="SuccessCallback" id="::Tizen::SuccessCallback">
54235 <webidl> [Callback=FunctionOnly, NoInterfaceObject]
54236 interface SuccessCallback {
54241 This interface is used in methods that do not require any return value in the success callback.
54242 In case of successful execution of an asynchronous call, <em>SuccessCallback</em> or an API defined callback must be called immediately to notify the user.
54247 <Code> function onSuccess() {
54248 console.log("Application launched successfully");
54250 tizen.application.launch('0pnxz8hbsr.MyFiles', onSuccess);
54253 <ExtendedAttributeList>
54254 <ExtendedAttribute name="Callback" value="FunctionOnly">
54255 <webidl>Callback</webidl>
54256 </ExtendedAttribute>
54257 <ExtendedAttribute name="NoInterfaceObject">
54258 <webidl> NoInterfaceObject</webidl>
54259 </ExtendedAttribute>
54260 </ExtendedAttributeList>
54261 <Operation name="onsuccess" id="::Tizen::SuccessCallback::onsuccess">
54262 <webidl> void onsuccess ();</webidl>
54265 Method invoked when the asynchronous call completes successfully.
54271 <Type type="void"/>
54275 <Interface name="ErrorCallback" id="::Tizen::ErrorCallback">
54276 <webidl> [Callback=FunctionOnly, NoInterfaceObject]
54277 interface ErrorCallback {
54279 void onerror (<ref>WebAPIError</ref> error);
54283 This interface is used in methods that require only an error as input parameter in the error callback.
54284 If an invalid function (such as null) is passed to the API that accepts ErrorCallback,
54285 it silently fails and there is no further action.
54290 <Code> // Define the error callback.
54291 function onError(error) {
54292 console.log(error.message);
54295 // Define the success callback.
54296 function onSuccess(services) {
54297 //send a message using the found service
54299 tizen.messaging.getMessageServices("messaging.sms", onSuccess, onError);
54302 <ExtendedAttributeList>
54303 <ExtendedAttribute name="Callback" value="FunctionOnly">
54304 <webidl>Callback</webidl>
54305 </ExtendedAttribute>
54306 <ExtendedAttribute name="NoInterfaceObject">
54307 <webidl> NoInterfaceObject</webidl>
54308 </ExtendedAttribute>
54309 </ExtendedAttributeList>
54310 <Operation name="onerror" id="::Tizen::ErrorCallback::onerror">
54311 <webidl> void onerror (<ref>WebAPIError</ref> error);</webidl>
54314 Method that is invoked when the error occurs.
54320 <Type type="void"/>
54322 <Argument name="error">
54328 <Type name="WebAPIError"/>
54334 <Module name="WebSetting" id="::WebSetting">
54335 <webidl>module WebSetting {
54337 [NoInterfaceObject] interface WebSettingObject {
54338 readonly attribute <ref>WebSettingManager</ref> websetting;
54340 <ref>Tizen</ref> implements <ref>WebSettingObject</ref>;
54342 [NoInterfaceObject] interface WebSettingManager {
54344 void setUserAgentString(DOMString userAgent,
54345 optional <ref>SuccessCallback</ref>? successCallback,
54346 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);
54348 void removeAllCookies(optional <ref>SuccessCallback</ref>? successCallback,
54349 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);
54355 This Web setting API defines a set of APIs that manages the setting states of the Web view in your Web application.
54359 A Tizen Web application includes a web view and the properties below of the web view can be managed via the Web setting API:
54363 Delete all the cookies saved for the web view in the Web application. </li>
54365 Set a custom user agent string of the web view in the Web application. </li>
54368 Note that all the settings using the Web setting API is bound to your application; thus, no other applications are affected via the Web setting API calls within your application.
54375 <Interface name="WebSettingObject" id="::WebSetting::WebSettingObject">
54376 <webidl> [NoInterfaceObject] interface WebSettingObject {
54377 readonly attribute <ref>WebSettingManager</ref> websetting;
54381 This interface defines what is instantiated for the Web setting API by the <em>Tizen</em> object from the Tizen Platform.
54385 <em>tizen.websetting</em> object is available to manage the settings of the Web view in your Web application.
54392 <ExtendedAttributeList>
54393 <ExtendedAttribute name="NoInterfaceObject">
54394 <webidl>NoInterfaceObject</webidl>
54395 </ExtendedAttribute>
54396 </ExtendedAttributeList>
54397 <Attribute readonly="readonly" name="websetting" id="::WebSetting::WebSettingObject::websetting">
54398 <webidl> readonly attribute <ref>WebSettingManager</ref> websetting;</webidl>
54399 <Type name="WebSettingManager"/>
54402 <Implements name1="Tizen" name2="WebSettingObject">
54403 <webidl> <ref>Tizen</ref> implements <ref>WebSettingObject</ref>;</webidl>
54405 <Interface name="WebSettingManager" id="::WebSetting::WebSettingManager">
54406 <webidl> [NoInterfaceObject] interface WebSettingManager {
54408 void setUserAgentString(DOMString userAgent,
54409 optional <ref>SuccessCallback</ref>? successCallback,
54410 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);
54412 void removeAllCookies(optional <ref>SuccessCallback</ref>? successCallback,
54413 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);
54418 This is the top-level interface for the WebSetting API that managed the settings of the Web view in your Web application.
54421 <ExtendedAttributeList>
54422 <ExtendedAttribute name="NoInterfaceObject">
54423 <webidl>NoInterfaceObject</webidl>
54424 </ExtendedAttribute>
54425 </ExtendedAttributeList>
54426 <Operation name="setUserAgentString" id="::WebSetting::WebSettingManager::setUserAgentString">
54427 <webidl> void setUserAgentString(DOMString userAgent,
54428 optional <ref>SuccessCallback</ref>? successCallback,
54429 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);</webidl>
54432 Sets the custom user agent string for your Web application.
54436 This method allows the user to set the user agent string of the Web view in the Web application. By default, the Web view in your application
54437 has the same user agent string as the Tizen browser on the device.
54440 The <em>ErrorCallback</em> is launched with these error types:
54444 UnknownError - If any error occurs while setting the user agent string. </li>
54446 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
54452 <Code> function successCallback() {
54453 console.log("The requested user agent string has just been set successfully.");
54456 tizen.websetting.setUserAgentString("the new user agent string to set", successCallback);
54460 <Type type="void"/>
54462 <Argument name="userAgent">
54465 User agent to set for the Web view in your Web application.
54468 <Type type="DOMString"/>
54470 <Argument optional="optional" name="successCallback">
54473 To be invoked if the requested setting operation succeeds.
54476 <Type name="SuccessCallback" nullable="nullable"/>
54478 <Argument optional="optional" name="errorCallback">
54481 To be invoked if the requested setting operation fails.
54484 <Type name="ErrorCallback" nullable="nullable"/>
54488 <RaiseException name="WebAPIException">
54491 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
54497 <Operation name="removeAllCookies" id="::WebSetting::WebSettingManager::removeAllCookies">
54498 <webidl> void removeAllCookies(optional <ref>SuccessCallback</ref>? successCallback,
54499 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);</webidl>
54502 Removes all the cookies saved for the Web view in your Web application.
54506 The Web view in your Web application can store cookies like a browser. This method allows the user to remove all the cookies saved for the Web application.
54509 The <em>ErrorCallback</em> is launched with these error types:
54513 UnknownError - If any error occurs while deleting the cookies. </li>
54523 http://tizen.org/privilege/websetting
54525 <Code> function successCallback() {
54526 console.log("The cookies saved for your application have just been removed.");
54529 tizen.websetting.removeAllCookies(successCallback);
54533 <Type type="void"/>
54535 <Argument optional="optional" name="successCallback">
54538 To be invoked if the requested delete operation succeeds.
54541 <Type name="SuccessCallback" nullable="nullable"/>
54543 <Argument optional="optional" name="errorCallback">
54546 To be invoked if the requested delete operation fails.
54549 <Type name="ErrorCallback" nullable="nullable"/>
54553 <RaiseException name="WebAPIException">
54556 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
54559 with error type SecurityError, if the application does not have the privilege to call this method.