1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
4 <Module name="Vehicle" id="::Vehicle">
5 <webidl> module Vehicle {
6 [NoInterfaceObject] interface VehicleManagerObject {
7 readonly attribute <ref>Vehicle</ref> vehicle;
10 <ref>Navigator</ref> implements <ref>VehicleManagerObject</ref>;
14 readonly attribute <ref>VehicleConfigurationInterface</ref> identification;
15 readonly attribute <ref>VehicleConfigurationInterface</ref> sizeConfiguration;
16 readonly attribute <ref>VehicleConfigurationInterface</ref> fuelConfiguration;
17 readonly attribute <ref>VehicleConfigurationInterface</ref> transmissionConfiguration;
18 readonly attribute <ref>VehicleConfigurationInterface</ref> wheelConfiguration;
19 readonly attribute <ref>VehicleSignalInterface</ref> steeringWheelConfiguration;
21 readonly attribute <ref>VehicleSignalInterface</ref> vehicleSpeed;
22 readonly attribute <ref>VehicleSignalInterface</ref> wheelSpeed;
23 readonly attribute <ref>VehicleSignalInterface</ref> engineSpeed;
24 readonly attribute <ref>VehicleSignalInterface</ref> powerTrainTorque;
25 readonly attribute <ref>VehicleSignalInterface</ref> acceleratorPedalPosition;
26 readonly attribute <ref>VehicleSignalInterface</ref> throttlePosition;
27 readonly attribute <ref>VehicleSignalInterface</ref> tripMeters;
28 readonly attribute <ref>VehicleSignalInterface</ref> transmission;
29 readonly attribute <ref>VehicleSignalInterface</ref> cruiseControlStatus;
30 readonly attribute <ref>VehicleSignalInterface</ref> lightStatus;
31 readonly attribute <ref>VehicleSignalInterface</ref> interiorLightStatus;
32 readonly attribute <ref>VehicleSignalInterface</ref> horn;
33 readonly attribute <ref>VehicleSignalInterface</ref> chime;
34 readonly attribute <ref>VehicleSignalInterface</ref> fuel;
35 readonly attribute <ref>VehicleSignalInterface</ref> engineOil;
36 readonly attribute <ref>VehicleSignalInterface</ref> acceleration;
37 readonly attribute <ref>VehicleSignalInterface</ref> engineCoolant;
38 readonly attribute <ref>VehicleSignalInterface</ref> steeringWheel;
39 readonly attribute <ref>VehicleSignalInterface</ref> ignitionTime;
40 readonly attribute <ref>VehicleSignalInterface</ref> yawRate;
41 readonly attribute <ref>VehicleSignalInterface</ref> brakeOperation;
42 readonly attribute <ref>VehicleSignalInterface</ref> wheelTick;
43 readonly attribute <ref>VehicleSignalInterface</ref> buttonEvent;
44 readonly attribute <ref>VehicleSignalInterface</ref> drivingMode;
45 readonly attribute <ref>VehicleSignalInterface</ref> nightMode;
47 readonly attribute <ref>VehicleSignalInterface</ref> odometer;
48 readonly attribute <ref>VehicleSignalInterface</ref> transmissionOil;
49 readonly attribute <ref>VehicleSignalInterface</ref> transmissionClutch;
50 readonly attribute <ref>VehicleSignalInterface</ref> brakeMaintenance;
51 readonly attribute <ref>VehicleSignalInterface</ref> washerFluid;
52 readonly attribute <ref>VehicleSignalInterface</ref> malfunctionIndicator;
53 readonly attribute <ref>VehicleSignalInterface</ref> batteryStatus;
54 readonly attribute <ref>VehicleSignalInterface</ref> tire;
55 readonly attribute <ref>VehicleSignalInterface</ref> diagnostic;
57 readonly attribute <ref>VehicleSignalInterface</ref>? languageConfiguration;
58 readonly attribute <ref>VehicleSignalInterface</ref> unitsOfMeasure;
59 readonly attribute <ref>VehicleSignalInterface</ref> mirror;
60 readonly attribute <ref>VehicleSignalInterface</ref> driveMode;
61 readonly attribute <ref>VehicleSignalInterface</ref> seatAdjustment;
62 readonly attribute <ref>VehicleSignalInterface</ref> dashboardIllumination;
63 readonly attribute <ref>VehicleSignalInterface</ref> vehicleSound;
65 readonly attribute <ref>VehicleSignalInterface</ref> antilockBrakingSystem;
66 readonly attribute <ref>VehicleSignalInterface</ref> tractionControlSystem;
67 readonly attribute <ref>VehicleSignalInterface</ref> electronicStabilityControl;
68 readonly attribute <ref>VehicleSignalInterface</ref> topSpeedLimit;
69 readonly attribute <ref>VehicleSignalInterface</ref> airbagStatus;
70 readonly attribute <ref>VehicleSignalInterface</ref> door;
71 readonly attribute <ref>VehicleSignalInterface</ref> childSafetyLock;
72 readonly attribute <ref>VehicleSignalInterface</ref> seat;
74 readonly attribute <ref>VehicleSignalInterface</ref> temperature;
75 readonly attribute <ref>VehicleSignalInterface</ref> rainSensor;
76 readonly attribute <ref>VehicleSignalInterface</ref> wiperStatus;
77 readonly attribute <ref>VehicleSignalInterface</ref> wiperSetting;
78 readonly attribute <ref>VehicleSignalInterface</ref> defrost;
79 readonly attribute <ref>VehicleSignalInterface</ref> sunroof;
80 readonly attribute <ref>VehicleSignalInterface</ref> convertibleRoof;
81 readonly attribute <ref>VehicleSignalInterface</ref> sideWindow;
82 readonly attribute <ref>VehicleSignalInterface</ref> climateControl;
83 readonly attribute <ref>VehicleSignalInterface</ref> atmosphericPressure;
85 readonly attribute <ref>VehicleSignalInterface</ref> laneDepartureStatus;
86 readonly attribute <ref>VehicleSignalInterface</ref> alarm;
87 readonly attribute <ref>VehicleSignalInterface</ref> parkingBrake;
88 readonly attribute <ref>VehicleSignalInterface</ref> parkingLights;
101 attribute DOMString[] value;
102 readonly attribute <ref>Zone</ref> driver;
103 boolean equals (<ref>Zone</ref> zone);
104 boolean contains (<ref>Zone</ref> zone);
107 [Callback=FunctionOnly, NoInterfaceObject]
108 interface VehicleInterfaceCallback {
109 void onsuccess(object value);
112 [Callback=FunctionOnly, NoInterfaceObject]
113 interface AvailableCallback {
114 void onsuccess(<ref>Availability</ref> available);
118 "permission_denied",
119 "invalid_operation",
121 "invalid_zone",
126 interface VehicleInterfaceError {
127 readonly attribute <ref>VehicleError</ref> error;
128 readonly attribute DOMString message;
131 interface VehicleInterface {
132 <ref>Availability</ref> availableForRetrieval (DOMString attributeName);
133 <ref>Promise</ref> get (optional <ref>Zone</ref> zone);
134 <ref>Promise</ref> getHistory (Date begin, Date end, optional <ref>Zone</ref> zone);
135 short availabilityChangedListener (<ref>AvailableCallback</ref> callback);
136 void removeAvailabilityChangedListener (short handle);
137 readonly attribute <ref>Zone</ref>[] zones;
138 readonly attribute boolean supported;
139 readonly attribute boolean isLogged;
140 readonly attribute Date ? from;
141 readonly attribute Date ? to;
145 interface VehicleConfigurationInterface : <ref>VehicleInterface</ref> {};
148 interface VehicleSignalInterface : <ref>VehicleInterface</ref> {
149 <ref>Availability</ref> availableForSubscription (DOMString attributeName);
150 <ref>Availability</ref> availableForSetting (DOMString attributeName);
151 <ref>Promise</ref> set (object value, optional <ref>Zone</ref> zone);
152 unsigned short subscribe (<ref>VehicleInterfaceCallback</ref> callback, optional <ref>Zone</ref> zone);
153 void unsubscribe (unsigned short handle);
157 "available",
158 "not_supported",
159 "not_supported_yet",
160 "not_supported_security_policy",
161 "not_supported_business_policy",
162 "not_supported_other"
166 interface VehicleCommonDataType {
167 readonly attribute <ref>DOMTimeStamp</ref>? timeStamp;
170 enum VehicleTypeEnum {
171 "passengerCarMini",
172 "passengerCarLight",
173 "passengerCarCompact",
174 "passengerCarMedium",
175 "passengerCarHeavy",
176 "sportUtilityVehicle",
177 "pickupTruck",
182 interface Identification : <ref>VehicleCommonDataType</ref> {
183 readonly attribute DOMString? VIN;
184 readonly attribute DOMString? WMI;
185 readonly attribute <ref>VehicleTypeEnum</ref>? vehicleType;
186 readonly attribute DOMString? brand;
187 readonly attribute DOMString? model;
188 readonly attribute unsigned short? year;
192 interface SizeConfiguration : <ref>VehicleCommonDataType</ref> {
193 readonly attribute unsigned short? width;
194 readonly attribute unsigned short? height;
195 readonly attribute unsigned short? length;
196 readonly attribute unsigned short[]? doorsCount;
197 readonly attribute unsigned short? totalDoors;
201 "gasoline",
202 "methanol",
211 interface FuelConfiguration : <ref>VehicleCommonDataType</ref> {
212 readonly attribute <ref>FuelTypeEnum</ref>[]? fuelType;
213 readonly attribute <ref>Zone</ref>? refuelPosition;
216 enum TransmissionGearTypeEnum {
222 interface TransmissionConfiguration : <ref>VehicleCommonDataType</ref> {
223 readonly attribute <ref>TransmissionGearTypeEnum</ref>? transmissionGearType;
227 interface WheelConfiguration : <ref>VehicleCommonDataType</ref> {
228 readonly attribute unsigned short? wheelRadius;
229 readonly attribute <ref>Zone</ref>? zone;
233 interface SteeringWheelConfiguration : <ref>VehicleCommonDataType</ref> {
234 readonly attribute boolean? steeringWheelLeft;
235 attribute unsigned short? steeringWheelTelescopingPosition;
236 attribute unsigned short? steeringWheelPositionTilt;
240 interface VehicleSpeed : <ref>VehicleCommonDataType</ref> {
241 readonly attribute unsigned short speed;
245 interface WheelSpeed : <ref>VehicleCommonDataType</ref> {
246 readonly attribute unsigned short speed;
247 readonly attribute <ref>Zone</ref>? zone;
251 interface EngineSpeed : <ref>VehicleCommonDataType</ref> {
252 readonly attribute unsigned long speed;
255 enum VehiclePowerMode {
257 "accessory1",
258 "accessory2",
263 interface VehiclePowerModeType : <ref>VehicleCommonDataType</ref> {
264 readonly attribute <ref>VehiclePowerMode</ref> value;
268 interface PowerTrainTorque : <ref>VehicleCommonDataType</ref> {
269 readonly attribute short value;
273 interface AcceleratorPedalPosition : <ref>VehicleCommonDataType</ref> {
274 readonly attribute unsigned short value;
278 interface ThrottlePosition : <ref>VehicleCommonDataType</ref> {
279 readonly attribute unsigned short value;
284 readonly attribute unsigned long distance;
285 readonly attribute unsigned short? averageSpeed;
286 readonly attribute unsigned short? fuelConsumption;
290 interface TripMeters : <ref>VehicleCommonDataType</ref> {
291 readonly attribute <ref>Trip</ref>[] meters;
294 enum TransmissionMode {
300 "overdrive"
304 interface Transmission : <ref>VehicleCommonDataType</ref> {
305 readonly attribute octet? gear;
306 readonly attribute <ref>TransmissionMode</ref>? mode;
310 interface CruiseControlStatus : <ref>VehicleCommonDataType</ref> {
311 readonly attribute boolean status;
312 readonly attribute unsigned short speed;
316 interface LightStatus : <ref>VehicleCommonDataType</ref> {
317 attribute boolean head;
318 attribute boolean rightTurn;
319 attribute boolean leftTurn;
320 attribute boolean brake;
321 attribute boolean? fog;
322 attribute boolean hazard;
323 attribute boolean parking;
324 attribute boolean highBeam;
325 attribute boolean? automaticHeadlights;
326 attribute boolean? dynamicHighBeam;
327 readonly attribute <ref>Zone</ref>? zone;
331 interface InteriorLightStatus : <ref>VehicleCommonDataType</ref> {
332 attribute boolean status;
333 readonly attribute <ref>Zone</ref>? zone;
337 interface Horn : <ref>VehicleCommonDataType</ref> {
338 attribute boolean status;
342 interface Chime : <ref>VehicleCommonDataType</ref> {
343 readonly attribute boolean status;
347 interface Fuel : <ref>VehicleCommonDataType</ref> {
348 readonly attribute unsigned short? level;
349 readonly attribute unsigned long? range;
350 readonly attribute unsigned long? instantConsumption;
351 attribute unsigned long? averageConsumption;
352 readonly attribute unsigned long? fuelConsumedSinceRestart;
353 readonly attribute unsigned long? timeSinceRestart;
357 interface EngineOil : <ref>VehicleCommonDataType</ref> {
358 readonly attribute unsigned short level;
359 readonly attribute unsigned short lifeRemaining;
360 readonly attribute long temperature;
361 readonly attribute unsigned short pressure;
362 readonly attribute boolean change;
366 interface Acceleration : <ref>VehicleCommonDataType</ref> {
367 readonly attribute long x;
368 readonly attribute long y;
369 readonly attribute long z;
373 interface EngineCoolant : <ref>VehicleCommonDataType</ref> {
374 readonly attribute octet level;
375 readonly attribute short temperature;
379 interface SteeringWheel : <ref>VehicleCommonDataType</ref> {
380 readonly attribute short angle;
384 interface WheelTick : <ref>VehicleCommonDataType</ref> {
385 readonly attribute unsigned long value;
386 readonly attribute <ref>Zone</ref>? zone;
390 interface IgnitionTime : <ref>VehicleCommonDataType</ref> {
391 readonly attribute <ref>DOMTimeStamp</ref> ignitionOnTime;
392 readonly attribute <ref>DOMTimeStamp</ref> ignitionOffTime;
396 interface YawRate : <ref>VehicleCommonDataType</ref> {
397 readonly attribute short value;
401 interface BrakeOperation : <ref>VehicleCommonDataType</ref> {
402 readonly attribute boolean brakePedalDepressed;
410 "end_call",
411 "media_play",
412 "media_next",
413 "media_previous",
414 "media_pause",
415 "voice_recognize",
423 enum ButtonEventType {
425 "long_press",
430 interface VehicleButton {
431 readonly attribute <ref>Button</ref> button;
432 readonly attribute <ref>ButtonEventType</ref> state;
436 interface ButtonEvent : <ref>VehicleCommonDataType</ref> {
437 readonly attribute <ref>VehicleButton</ref>[] button;
441 interface DrivingMode : <ref>VehicleCommonDataType</ref> {
442 readonly attribute boolean mode;
446 interface DrivingMode : <ref>VehicleCommonDataType</ref> {
447 readonly attribute boolean mode;
451 interface NightMode : <ref>VehicleCommonDataType</ref> {
452 readonly attribute boolean mode;
456 interface Odometer : <ref>VehicleCommonDataType</ref> {
457 readonly attribute unsigned long? distanceSinceStart;
458 readonly attribute unsigned long distanceTotal;
462 interface TransmissionOil : <ref>VehicleCommonDataType</ref> {
463 readonly attribute octet? wear;
464 readonly attribute short? temperature;
468 interface TransmissionClutch : <ref>VehicleCommonDataType</ref> {
469 readonly attribute octet wear;
473 interface BrakeMaintenance : <ref>VehicleCommonDataType</ref> {
474 readonly attribute octet? fluidLevel;
475 readonly attribute boolean? fluidLevelLow;
476 readonly attribute octet? padWear;
477 readonly attribute boolean? brakesWorn;
478 readonly attribute <ref>Zone</ref>? zone;
482 interface WasherFluid : <ref>VehicleCommonDataType</ref> {
483 readonly attribute unsigned short? level;
484 readonly attribute boolean? levelLow;
488 interface MalfunctionIndicator : <ref>VehicleCommonDataType</ref> {
489 readonly attribute boolean on;
493 interface BatteryStatus : <ref>VehicleCommonDataType</ref> {
494 readonly attribute unsigned short? chargeLevel;
495 readonly attribute unsigned short? voltage;
496 readonly attribute unsigned short? current;
497 readonly attribute <ref>Zone</ref>? zone;
501 interface Tire : <ref>VehicleCommonDataType</ref> {
502 readonly attribute boolean? pressureLow;
503 readonly attribute unsigned short? pressure;
504 readonly attribute short? temperature;
505 readonly attribute <ref>Zone</ref>? zone;
509 interface Diagnostic : <ref>VehicleCommonDataType</ref> {
510 readonly attribute unsigned long accumulatedEngineRuntime;
511 readonly attribute unsigned long distanceWithMILOn;
512 readonly attribute unsigned long distanceSinceCodeCleared;
513 readonly attribute unsigned long timeRunMILOn;
514 readonly attribute unsigned long timeTroubleCodeClear;
518 interface LanguageConfiguration : <ref>VehicleCommonDataType</ref> {
519 attribute DOMString? language;
523 interface UnitsOfMeasure : <ref>VehicleCommonDataType</ref> {
524 attribute boolean? isMKSSystem;
525 attribute DOMString? unitsFuelVolume;
526 attribute DOMString? unitsDistance;
527 attribute DOMString? unitsSpeed;
528 attribute DOMString? unitsFuelConsumption;
532 interface Mirror : <ref>VehicleCommonDataType</ref> {
533 attribute unsigned short? mirrorTilt;
534 attribute unsigned short? mirrorPan;
535 readonly attribute <ref>Zone</ref>? zone;
539 interface SeatAdjustment : <ref>VehicleCommonDataType</ref> {
540 attribute unsigned short? reclineSeatBack;
541 attribute unsigned short? seatSlide;
542 attribute unsigned short? seatCushionHeight;
543 attribute unsigned short? seatHeadrest;
544 attribute unsigned short? seatBackCushion;
545 attribute unsigned short? seatSideCushion;
546 readonly attribute <ref>Zone</ref>? zone;
559 interface DriveMode : <ref>VehicleCommonDataType</ref> {
560 attribute <ref>DriveModeEnum</ref>? driveMode;
564 interface DashboardIllumination : <ref>VehicleCommonDataType</ref> {
565 attribute DOMString? dashboardIllumination;
569 interface VehicleSound : <ref>VehicleCommonDataType</ref> {
570 attribute boolean activeNoiseControlMode;
571 attribute DOMString? engineSoundEnhancementMode;
575 interface AntilockBrakingSystem : <ref>VehicleCommonDataType</ref> {
576 readonly attribute boolean enabled;
577 readonly attribute boolean engaged;
581 interface TractionControlSystem : <ref>VehicleCommonDataType</ref> {
582 readonly attribute boolean enabled;
583 readonly attribute boolean engaged;
587 interface ElectronicStabilityControl : <ref>VehicleCommonDataType</ref> {
588 readonly attribute boolean enabled;
589 readonly attribute boolean engaged;
593 interface TopSpeedLimit : <ref>VehicleCommonDataType</ref> {
594 readonly attribute unsigned short speed;
598 interface AirbagStatus : <ref>VehicleCommonDataType</ref> {
599 readonly attribute boolean activated;
600 readonly attribute boolean deployed;
601 readonly attribute <ref>Zone</ref>? zone;
604 enum DoorOpenStatus {
611 interface Door : <ref>VehicleCommonDataType</ref> {
612 readonly attribute <ref>DoorOpenStatus</ref> status;
613 attribute boolean lock;
614 readonly attribute <ref>Zone</ref>? zone;
618 interface ChildSafetyLock : <ref>VehicleCommonDataType</ref> {
619 attribute boolean lock;
620 readonly attribute <ref>Zone</ref>? zone;
623 enum OccupantStatus {
629 enum IdentificationType {
632 "Bluetooth",
634 "fingerprint",
640 interface Seat : <ref>VehicleCommonDataType</ref> {
641 readonly attribute <ref>OccupantStatus</ref> occupant;
642 readonly attribute boolean seatbelt;
643 readonly attribute DOMString? occupantName;
644 readonly attribute <ref>IdentificationType</ref> identificationType;
645 readonly attribute <ref>Zone</ref>? zone;
649 interface Temperature : <ref>VehicleCommonDataType</ref> {
650 readonly attribute float interiorTemperature;
651 readonly attribute float exteriorTemperature;
655 interface RainSensor : <ref>VehicleCommonDataType</ref> {
656 readonly attribute unsigned short rain;
657 readonly attribute <ref>Zone</ref>? zone;
661 interface WiperStatus : <ref>VehicleCommonDataType</ref> {
662 readonly attribute unsigned short wiperSpeed;
663 readonly attribute <ref>Zone</ref>? zone;
678 interface WiperSetting : <ref>VehicleCommonDataType</ref> {
679 attribute <ref>WiperControl</ref> wiperControl;
680 readonly attribute <ref>Zone</ref>? zone;
684 interface Defrost : <ref>VehicleCommonDataType</ref> {
685 attribute boolean? defrostWindow;
686 attribute boolean? defrostMirrors;
687 readonly attribute <ref>Zone</ref>? zone;
691 interface Sunroof : <ref>VehicleCommonDataType</ref> {
692 attribute unsigned short openness;
693 attribute unsigned short tilt;
694 readonly attribute <ref>Zone</ref>? zone;
697 enum ConvertibleRoofStatus {
705 interface ConvertibleRoof : <ref>VehicleCommonDataType</ref> {
706 attribute <ref>ConvertibleRoofStatus</ref> status;
710 interface SideWindow : <ref>VehicleCommonDataType</ref> {
711 attribute boolean? lock;
712 attribute unsigned short? openness;
713 readonly attribute <ref>Zone</ref>? zone;
716 enum AirflowDirection {
717 "frontpanel",
718 "floorduct",
720 "defrostfloor"
724 interface ClimateControl : <ref>VehicleCommonDataType</ref> {
725 attribute <ref>AirflowDirection</ref> airflowDirection;
726 attribute unsigned short fanSpeedLevel;
727 attribute short? targetTemperature;
728 attribute boolean airConditioning;
729 attribute boolean heater;
730 attribute unsigned short? seatHeater;
731 attribute unsigned short? seatCooler;
732 attribute boolean airRecirculation;
733 attribute unsigned short? steeringWheelHeater;
734 readonly attribute <ref>Zone</ref>? zone;
738 interface AtmosphericPressure : <ref>VehicleCommonDataType</ref> {
739 readonly attribute unsigned short pressure;
742 enum LaneDepartureStatus {
749 interface LaneDepartureDetection : <ref>VehicleCommonDataType</ref> {
750 readonly attribute <ref>LaneDepartureStatus</ref> status;
754 "disarmed",
755 "preArmed",
761 interface Alarm : <ref>VehicleCommonDataType</ref> {
762 attribute <ref>AlarmStatus</ref> status;
765 enum ParkingBrakeStatus {
766 "inactive",
772 interface ParkingBrake : <ref>VehicleCommonDataType</ref> {
773 readonly attribute <ref>ParkingBrakeStatus</ref> status;
777 interface ParkingLights : <ref>VehicleCommonDataType</ref> {
778 readonly attribute boolean status;
779 attribute boolean setting;
781 <Interface name="VehicleManagerObject" id="::VehicleManagerObject">
782 <webidl>[NoInterfaceObject] interface VehicleManagerObject {
783 readonly attribute <ref>Vehicle</ref> vehicle;
785 <Attribute readonly="readonly" name="vehicle" id="::VehicleManagerObject::vehicle">
786 <webidl> readonly attribute <ref>Vehicle</ref> vehicle;</webidl>
787 <Type name="Vehicle"/>
790 <Implements name1="Navigator" name2="VehicleManagerObject">
791 <webidl><ref>Navigator</ref> implements <ref>VehicleManagerObject</ref>;</webidl>
793 <Interface name="Vehicle" id="::Vehicle">
794 <webidl>[NoInterfaceObject]
796 readonly attribute <ref>VehicleConfigurationInterface</ref> identification;
797 readonly attribute <ref>VehicleConfigurationInterface</ref> sizeConfiguration;
798 readonly attribute <ref>VehicleConfigurationInterface</ref> fuelConfiguration;
799 readonly attribute <ref>VehicleConfigurationInterface</ref> transmissionConfiguration;
800 readonly attribute <ref>VehicleConfigurationInterface</ref> wheelConfiguration;
801 readonly attribute <ref>VehicleSignalInterface</ref> steeringWheelConfiguration;
803 readonly attribute <ref>VehicleSignalInterface</ref> vehicleSpeed;
804 readonly attribute <ref>VehicleSignalInterface</ref> wheelSpeed;
805 readonly attribute <ref>VehicleSignalInterface</ref> engineSpeed;
806 readonly attribute <ref>VehicleSignalInterface</ref> powerTrainTorque;
807 readonly attribute <ref>VehicleSignalInterface</ref> acceleratorPedalPosition;
808 readonly attribute <ref>VehicleSignalInterface</ref> throttlePosition;
809 readonly attribute <ref>VehicleSignalInterface</ref> tripMeters;
810 readonly attribute <ref>VehicleSignalInterface</ref> transmission;
811 readonly attribute <ref>VehicleSignalInterface</ref> cruiseControlStatus;
812 readonly attribute <ref>VehicleSignalInterface</ref> lightStatus;
813 readonly attribute <ref>VehicleSignalInterface</ref> interiorLightStatus;
814 readonly attribute <ref>VehicleSignalInterface</ref> horn;
815 readonly attribute <ref>VehicleSignalInterface</ref> chime;
816 readonly attribute <ref>VehicleSignalInterface</ref> fuel;
817 readonly attribute <ref>VehicleSignalInterface</ref> engineOil;
818 readonly attribute <ref>VehicleSignalInterface</ref> acceleration;
819 readonly attribute <ref>VehicleSignalInterface</ref> engineCoolant;
820 readonly attribute <ref>VehicleSignalInterface</ref> steeringWheel;
821 readonly attribute <ref>VehicleSignalInterface</ref> ignitionTime;
822 readonly attribute <ref>VehicleSignalInterface</ref> yawRate;
823 readonly attribute <ref>VehicleSignalInterface</ref> brakeOperation;
824 readonly attribute <ref>VehicleSignalInterface</ref> wheelTick;
825 readonly attribute <ref>VehicleSignalInterface</ref> buttonEvent;
826 readonly attribute <ref>VehicleSignalInterface</ref> drivingMode;
827 readonly attribute <ref>VehicleSignalInterface</ref> nightMode;
829 readonly attribute <ref>VehicleSignalInterface</ref> odometer;
830 readonly attribute <ref>VehicleSignalInterface</ref> transmissionOil;
831 readonly attribute <ref>VehicleSignalInterface</ref> transmissionClutch;
832 readonly attribute <ref>VehicleSignalInterface</ref> brakeMaintenance;
833 readonly attribute <ref>VehicleSignalInterface</ref> washerFluid;
834 readonly attribute <ref>VehicleSignalInterface</ref> malfunctionIndicator;
835 readonly attribute <ref>VehicleSignalInterface</ref> batteryStatus;
836 readonly attribute <ref>VehicleSignalInterface</ref> tire;
837 readonly attribute <ref>VehicleSignalInterface</ref> diagnostic;
839 readonly attribute <ref>VehicleSignalInterface</ref>? languageConfiguration;
840 readonly attribute <ref>VehicleSignalInterface</ref> unitsOfMeasure;
841 readonly attribute <ref>VehicleSignalInterface</ref> mirror;
842 readonly attribute <ref>VehicleSignalInterface</ref> driveMode;
843 readonly attribute <ref>VehicleSignalInterface</ref> seatAdjustment;
844 readonly attribute <ref>VehicleSignalInterface</ref> dashboardIllumination;
845 readonly attribute <ref>VehicleSignalInterface</ref> vehicleSound;
847 readonly attribute <ref>VehicleSignalInterface</ref> antilockBrakingSystem;
848 readonly attribute <ref>VehicleSignalInterface</ref> tractionControlSystem;
849 readonly attribute <ref>VehicleSignalInterface</ref> electronicStabilityControl;
850 readonly attribute <ref>VehicleSignalInterface</ref> topSpeedLimit;
851 readonly attribute <ref>VehicleSignalInterface</ref> airbagStatus;
852 readonly attribute <ref>VehicleSignalInterface</ref> door;
853 readonly attribute <ref>VehicleSignalInterface</ref> childSafetyLock;
854 readonly attribute <ref>VehicleSignalInterface</ref> seat;
856 readonly attribute <ref>VehicleSignalInterface</ref> temperature;
857 readonly attribute <ref>VehicleSignalInterface</ref> rainSensor;
858 readonly attribute <ref>VehicleSignalInterface</ref> wiperStatus;
859 readonly attribute <ref>VehicleSignalInterface</ref> wiperSetting;
860 readonly attribute <ref>VehicleSignalInterface</ref> defrost;
861 readonly attribute <ref>VehicleSignalInterface</ref> sunroof;
862 readonly attribute <ref>VehicleSignalInterface</ref> convertibleRoof;
863 readonly attribute <ref>VehicleSignalInterface</ref> sideWindow;
864 readonly attribute <ref>VehicleSignalInterface</ref> climateControl;
865 readonly attribute <ref>VehicleSignalInterface</ref> atmosphericPressure;
867 readonly attribute <ref>VehicleSignalInterface</ref> laneDepartureStatus;
868 readonly attribute <ref>VehicleSignalInterface</ref> alarm;
869 readonly attribute <ref>VehicleSignalInterface</ref> parkingBrake;
870 readonly attribute <ref>VehicleSignalInterface</ref> parkingLights;
872 <ExtendedAttributeList>
873 <ExtendedAttribute name="NoInterfaceObject">
874 <webidl>NoInterfaceObject</webidl>
876 </ExtendedAttributeList>
877 <Attribute readonly="readonly" name="identification" id="::Vehicle::identification">
878 <webidl> readonly attribute <ref>VehicleConfigurationInterface</ref> identification;</webidl>
879 <Type name="VehicleConfigurationInterface"/>
881 <Attribute readonly="readonly" name="sizeConfiguration" id="::Vehicle::sizeConfiguration">
882 <webidl> readonly attribute <ref>VehicleConfigurationInterface</ref> sizeConfiguration;</webidl>
883 <Type name="VehicleConfigurationInterface"/>
885 <Attribute readonly="readonly" name="fuelConfiguration" id="::Vehicle::fuelConfiguration">
886 <webidl> readonly attribute <ref>VehicleConfigurationInterface</ref> fuelConfiguration;</webidl>
887 <Type name="VehicleConfigurationInterface"/>
889 <Attribute readonly="readonly" name="transmissionConfiguration" id="::Vehicle::transmissionConfiguration">
890 <webidl> readonly attribute <ref>VehicleConfigurationInterface</ref> transmissionConfiguration;</webidl>
891 <Type name="VehicleConfigurationInterface"/>
893 <Attribute readonly="readonly" name="wheelConfiguration" id="::Vehicle::wheelConfiguration">
894 <webidl> readonly attribute <ref>VehicleConfigurationInterface</ref> wheelConfiguration;</webidl>
895 <Type name="VehicleConfigurationInterface"/>
897 <Attribute readonly="readonly" name="steeringWheelConfiguration" id="::Vehicle::steeringWheelConfiguration">
898 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> steeringWheelConfiguration;</webidl>
899 <Type name="VehicleSignalInterface"/>
901 <Attribute readonly="readonly" name="vehicleSpeed" id="::Vehicle::vehicleSpeed">
902 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> vehicleSpeed;</webidl>
903 <Type name="VehicleSignalInterface"/>
905 <Attribute readonly="readonly" name="wheelSpeed" id="::Vehicle::wheelSpeed">
906 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> wheelSpeed;</webidl>
907 <Type name="VehicleSignalInterface"/>
909 <Attribute readonly="readonly" name="engineSpeed" id="::Vehicle::engineSpeed">
910 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> engineSpeed;</webidl>
911 <Type name="VehicleSignalInterface"/>
913 <Attribute readonly="readonly" name="powerTrainTorque" id="::Vehicle::powerTrainTorque">
914 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> powerTrainTorque;</webidl>
915 <Type name="VehicleSignalInterface"/>
917 <Attribute readonly="readonly" name="acceleratorPedalPosition" id="::Vehicle::acceleratorPedalPosition">
918 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> acceleratorPedalPosition;</webidl>
919 <Type name="VehicleSignalInterface"/>
921 <Attribute readonly="readonly" name="throttlePosition" id="::Vehicle::throttlePosition">
922 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> throttlePosition;</webidl>
923 <Type name="VehicleSignalInterface"/>
925 <Attribute readonly="readonly" name="tripMeters" id="::Vehicle::tripMeters">
926 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> tripMeters;</webidl>
927 <Type name="VehicleSignalInterface"/>
929 <Attribute readonly="readonly" name="transmission" id="::Vehicle::transmission">
930 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> transmission;</webidl>
931 <Type name="VehicleSignalInterface"/>
933 <Attribute readonly="readonly" name="cruiseControlStatus" id="::Vehicle::cruiseControlStatus">
934 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> cruiseControlStatus;</webidl>
935 <Type name="VehicleSignalInterface"/>
937 <Attribute readonly="readonly" name="lightStatus" id="::Vehicle::lightStatus">
938 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> lightStatus;</webidl>
939 <Type name="VehicleSignalInterface"/>
941 <Attribute readonly="readonly" name="interiorLightStatus" id="::Vehicle::interiorLightStatus">
942 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> interiorLightStatus;</webidl>
943 <Type name="VehicleSignalInterface"/>
945 <Attribute readonly="readonly" name="horn" id="::Vehicle::horn">
946 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> horn;</webidl>
947 <Type name="VehicleSignalInterface"/>
949 <Attribute readonly="readonly" name="chime" id="::Vehicle::chime">
950 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> chime;</webidl>
951 <Type name="VehicleSignalInterface"/>
953 <Attribute readonly="readonly" name="fuel" id="::Vehicle::fuel">
954 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> fuel;</webidl>
955 <Type name="VehicleSignalInterface"/>
957 <Attribute readonly="readonly" name="engineOil" id="::Vehicle::engineOil">
958 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> engineOil;</webidl>
959 <Type name="VehicleSignalInterface"/>
961 <Attribute readonly="readonly" name="acceleration" id="::Vehicle::acceleration">
962 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> acceleration;</webidl>
963 <Type name="VehicleSignalInterface"/>
965 <Attribute readonly="readonly" name="engineCoolant" id="::Vehicle::engineCoolant">
966 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> engineCoolant;</webidl>
967 <Type name="VehicleSignalInterface"/>
969 <Attribute readonly="readonly" name="steeringWheel" id="::Vehicle::steeringWheel">
970 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> steeringWheel;</webidl>
971 <Type name="VehicleSignalInterface"/>
973 <Attribute readonly="readonly" name="ignitionTime" id="::Vehicle::ignitionTime">
974 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> ignitionTime;</webidl>
975 <Type name="VehicleSignalInterface"/>
977 <Attribute readonly="readonly" name="yawRate" id="::Vehicle::yawRate">
978 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> yawRate;</webidl>
979 <Type name="VehicleSignalInterface"/>
981 <Attribute readonly="readonly" name="brakeOperation" id="::Vehicle::brakeOperation">
982 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> brakeOperation;</webidl>
983 <Type name="VehicleSignalInterface"/>
985 <Attribute readonly="readonly" name="wheelTick" id="::Vehicle::wheelTick">
986 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> wheelTick;</webidl>
987 <Type name="VehicleSignalInterface"/>
989 <Attribute readonly="readonly" name="buttonEvent" id="::Vehicle::buttonEvent">
990 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> buttonEvent;</webidl>
991 <Type name="VehicleSignalInterface"/>
993 <Attribute readonly="readonly" name="drivingMode" id="::Vehicle::drivingMode">
994 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> drivingMode;</webidl>
995 <Type name="VehicleSignalInterface"/>
997 <Attribute readonly="readonly" name="nightMode" id="::Vehicle::nightMode">
998 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> nightMode;</webidl>
999 <Type name="VehicleSignalInterface"/>
1001 <Attribute readonly="readonly" name="odometer" id="::Vehicle::odometer">
1002 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> odometer;</webidl>
1003 <Type name="VehicleSignalInterface"/>
1005 <Attribute readonly="readonly" name="transmissionOil" id="::Vehicle::transmissionOil">
1006 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> transmissionOil;</webidl>
1007 <Type name="VehicleSignalInterface"/>
1009 <Attribute readonly="readonly" name="transmissionClutch" id="::Vehicle::transmissionClutch">
1010 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> transmissionClutch;</webidl>
1011 <Type name="VehicleSignalInterface"/>
1013 <Attribute readonly="readonly" name="brakeMaintenance" id="::Vehicle::brakeMaintenance">
1014 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> brakeMaintenance;</webidl>
1015 <Type name="VehicleSignalInterface"/>
1017 <Attribute readonly="readonly" name="washerFluid" id="::Vehicle::washerFluid">
1018 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> washerFluid;</webidl>
1019 <Type name="VehicleSignalInterface"/>
1021 <Attribute readonly="readonly" name="malfunctionIndicator" id="::Vehicle::malfunctionIndicator">
1022 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> malfunctionIndicator;</webidl>
1023 <Type name="VehicleSignalInterface"/>
1025 <Attribute readonly="readonly" name="batteryStatus" id="::Vehicle::batteryStatus">
1026 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> batteryStatus;</webidl>
1027 <Type name="VehicleSignalInterface"/>
1029 <Attribute readonly="readonly" name="tire" id="::Vehicle::tire">
1030 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> tire;</webidl>
1031 <Type name="VehicleSignalInterface"/>
1033 <Attribute readonly="readonly" name="diagnostic" id="::Vehicle::diagnostic">
1034 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> diagnostic;</webidl>
1035 <Type name="VehicleSignalInterface"/>
1037 <Attribute readonly="readonly" name="languageConfiguration" id="::Vehicle::languageConfiguration">
1038 <webidl> readonly attribute <ref>VehicleSignalInterface</ref>? languageConfiguration;</webidl>
1039 <Type name="VehicleSignalInterface" nullable="nullable"/>
1041 <Attribute readonly="readonly" name="unitsOfMeasure" id="::Vehicle::unitsOfMeasure">
1042 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> unitsOfMeasure;</webidl>
1043 <Type name="VehicleSignalInterface"/>
1045 <Attribute readonly="readonly" name="mirror" id="::Vehicle::mirror">
1046 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> mirror;</webidl>
1047 <Type name="VehicleSignalInterface"/>
1049 <Attribute readonly="readonly" name="driveMode" id="::Vehicle::driveMode">
1050 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> driveMode;</webidl>
1051 <Type name="VehicleSignalInterface"/>
1053 <Attribute readonly="readonly" name="seatAdjustment" id="::Vehicle::seatAdjustment">
1054 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> seatAdjustment;</webidl>
1055 <Type name="VehicleSignalInterface"/>
1057 <Attribute readonly="readonly" name="dashboardIllumination" id="::Vehicle::dashboardIllumination">
1058 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> dashboardIllumination;</webidl>
1059 <Type name="VehicleSignalInterface"/>
1061 <Attribute readonly="readonly" name="vehicleSound" id="::Vehicle::vehicleSound">
1062 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> vehicleSound;</webidl>
1063 <Type name="VehicleSignalInterface"/>
1065 <Attribute readonly="readonly" name="antilockBrakingSystem" id="::Vehicle::antilockBrakingSystem">
1066 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> antilockBrakingSystem;</webidl>
1067 <Type name="VehicleSignalInterface"/>
1069 <Attribute readonly="readonly" name="tractionControlSystem" id="::Vehicle::tractionControlSystem">
1070 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> tractionControlSystem;</webidl>
1071 <Type name="VehicleSignalInterface"/>
1073 <Attribute readonly="readonly" name="electronicStabilityControl" id="::Vehicle::electronicStabilityControl">
1074 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> electronicStabilityControl;</webidl>
1075 <Type name="VehicleSignalInterface"/>
1077 <Attribute readonly="readonly" name="topSpeedLimit" id="::Vehicle::topSpeedLimit">
1078 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> topSpeedLimit;</webidl>
1079 <Type name="VehicleSignalInterface"/>
1081 <Attribute readonly="readonly" name="airbagStatus" id="::Vehicle::airbagStatus">
1082 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> airbagStatus;</webidl>
1083 <Type name="VehicleSignalInterface"/>
1085 <Attribute readonly="readonly" name="door" id="::Vehicle::door">
1086 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> door;</webidl>
1087 <Type name="VehicleSignalInterface"/>
1089 <Attribute readonly="readonly" name="childSafetyLock" id="::Vehicle::childSafetyLock">
1090 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> childSafetyLock;</webidl>
1091 <Type name="VehicleSignalInterface"/>
1093 <Attribute readonly="readonly" name="seat" id="::Vehicle::seat">
1094 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> seat;</webidl>
1095 <Type name="VehicleSignalInterface"/>
1097 <Attribute readonly="readonly" name="temperature" id="::Vehicle::temperature">
1098 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> temperature;</webidl>
1099 <Type name="VehicleSignalInterface"/>
1101 <Attribute readonly="readonly" name="rainSensor" id="::Vehicle::rainSensor">
1102 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> rainSensor;</webidl>
1103 <Type name="VehicleSignalInterface"/>
1105 <Attribute readonly="readonly" name="wiperStatus" id="::Vehicle::wiperStatus">
1106 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> wiperStatus;</webidl>
1107 <Type name="VehicleSignalInterface"/>
1109 <Attribute readonly="readonly" name="wiperSetting" id="::Vehicle::wiperSetting">
1110 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> wiperSetting;</webidl>
1111 <Type name="VehicleSignalInterface"/>
1113 <Attribute readonly="readonly" name="defrost" id="::Vehicle::defrost">
1114 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> defrost;</webidl>
1115 <Type name="VehicleSignalInterface"/>
1117 <Attribute readonly="readonly" name="sunroof" id="::Vehicle::sunroof">
1118 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> sunroof;</webidl>
1119 <Type name="VehicleSignalInterface"/>
1121 <Attribute readonly="readonly" name="convertibleRoof" id="::Vehicle::convertibleRoof">
1122 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> convertibleRoof;</webidl>
1123 <Type name="VehicleSignalInterface"/>
1125 <Attribute readonly="readonly" name="sideWindow" id="::Vehicle::sideWindow">
1126 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> sideWindow;</webidl>
1127 <Type name="VehicleSignalInterface"/>
1129 <Attribute readonly="readonly" name="climateControl" id="::Vehicle::climateControl">
1130 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> climateControl;</webidl>
1131 <Type name="VehicleSignalInterface"/>
1133 <Attribute readonly="readonly" name="atmosphericPressure" id="::Vehicle::atmosphericPressure">
1134 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> atmosphericPressure;</webidl>
1135 <Type name="VehicleSignalInterface"/>
1137 <Attribute readonly="readonly" name="laneDepartureStatus" id="::Vehicle::laneDepartureStatus">
1138 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> laneDepartureStatus;</webidl>
1139 <Type name="VehicleSignalInterface"/>
1141 <Attribute readonly="readonly" name="alarm" id="::Vehicle::alarm">
1142 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> alarm;</webidl>
1143 <Type name="VehicleSignalInterface"/>
1145 <Attribute readonly="readonly" name="parkingBrake" id="::Vehicle::parkingBrake">
1146 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> parkingBrake;</webidl>
1147 <Type name="VehicleSignalInterface"/>
1149 <Attribute readonly="readonly" name="parkingLights" id="::Vehicle::parkingLights">
1150 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> parkingLights;</webidl>
1151 <Type name="VehicleSignalInterface"/>
1154 <Enum name="ZonePosition" id="::ZonePosition">
1155 <webidl>enum ZonePosition {
1163 <EnumValue stringvalue="front">
1164 <webidl> "front</webidl>
1166 <EnumValue stringvalue="middle">
1167 <webidl> "middle</webidl>
1169 <EnumValue stringvalue="right">
1170 <webidl> "right</webidl>
1172 <EnumValue stringvalue="left">
1173 <webidl> "left</webidl>
1175 <EnumValue stringvalue="rear">
1176 <webidl> "rear</webidl>
1178 <EnumValue stringvalue="center">
1179 <webidl> "center</webidl>
1182 <Interface name="Zone" id="::Zone">
1183 <webidl>interface Zone {
1184 attribute DOMString[] value;
1185 readonly attribute <ref>Zone</ref> driver;
1186 boolean equals (<ref>Zone</ref> zone);
1187 boolean contains (<ref>Zone</ref> zone);
1189 <Attribute name="value" id="::Zone::value">
1190 <webidl> attribute DOMString[] value;</webidl>
1192 <Type type="DOMString"/>
1195 <Attribute readonly="readonly" name="driver" id="::Zone::driver">
1196 <webidl> readonly attribute <ref>Zone</ref> driver;</webidl>
1199 <Operation name="equals" id="::Zone::equals">
1200 <webidl> boolean equals (<ref>Zone</ref> zone);</webidl>
1201 <Type type="boolean"/>
1203 <Argument name="zone">
1208 <Operation name="contains" id="::Zone::contains">
1209 <webidl> boolean contains (<ref>Zone</ref> zone);</webidl>
1210 <Type type="boolean"/>
1212 <Argument name="zone">
1218 <Interface name="VehicleInterfaceCallback" id="::VehicleInterfaceCallback">
1219 <webidl>[Callback=FunctionOnly, NoInterfaceObject]
1220 interface VehicleInterfaceCallback {
1221 void onsuccess(object value);
1223 <ExtendedAttributeList>
1224 <ExtendedAttribute name="Callback" value="FunctionOnly">
1225 <webidl>Callback</webidl>
1226 </ExtendedAttribute>
1227 <ExtendedAttribute name="NoInterfaceObject">
1228 <webidl> NoInterfaceObject</webidl>
1229 </ExtendedAttribute>
1230 </ExtendedAttributeList>
1231 <Operation name="onsuccess" id="::VehicleInterfaceCallback::onsuccess">
1232 <webidl> void onsuccess(object value);</webidl>
1235 <Argument name="value">
1236 <Type type="object"/>
1241 <Interface name="AvailableCallback" id="::AvailableCallback">
1242 <webidl>[Callback=FunctionOnly, NoInterfaceObject]
1243 interface AvailableCallback {
1244 void onsuccess(<ref>Availability</ref> available);
1246 <ExtendedAttributeList>
1247 <ExtendedAttribute name="Callback" value="FunctionOnly">
1248 <webidl>Callback</webidl>
1249 </ExtendedAttribute>
1250 <ExtendedAttribute name="NoInterfaceObject">
1251 <webidl> NoInterfaceObject</webidl>
1252 </ExtendedAttribute>
1253 </ExtendedAttributeList>
1254 <Operation name="onsuccess" id="::AvailableCallback::onsuccess">
1255 <webidl> void onsuccess(<ref>Availability</ref> available);</webidl>
1258 <Argument name="available">
1259 <Type name="Availability"/>
1264 <Enum name="VehicleError" id="::VehicleError">
1265 <webidl>enum VehicleError {
1266 "permission_denied",
1267 "invalid_operation",
1268 "timeout",
1269 "invalid_zone",
1272 <EnumValue stringvalue="permission_denied">
1273 <webidl> "permission_denied</webidl>
1275 <EnumValue stringvalue="invalid_operation">
1276 <webidl> "invalid_operation</webidl>
1278 <EnumValue stringvalue="timeout">
1279 <webidl> "timeout</webidl>
1281 <EnumValue stringvalue="invalid_zone">
1282 <webidl> "invalid_zone</webidl>
1284 <EnumValue stringvalue="unknown">
1285 <webidl> "unknown</webidl>
1288 <Interface name="VehicleInterfaceError" id="::VehicleInterfaceError">
1289 <webidl>[NoInterfaceObject]
1290 interface VehicleInterfaceError {
1291 readonly attribute <ref>VehicleError</ref> error;
1292 readonly attribute DOMString message;
1294 <ExtendedAttributeList>
1295 <ExtendedAttribute name="NoInterfaceObject">
1296 <webidl>NoInterfaceObject</webidl>
1297 </ExtendedAttribute>
1298 </ExtendedAttributeList>
1299 <Attribute readonly="readonly" name="error" id="::VehicleInterfaceError::error">
1300 <webidl> readonly attribute <ref>VehicleError</ref> error;</webidl>
1301 <Type name="VehicleError"/>
1303 <Attribute readonly="readonly" name="message" id="::VehicleInterfaceError::message">
1304 <webidl> readonly attribute DOMString message;</webidl>
1305 <Type type="DOMString"/>
1308 <Interface name="VehicleInterface" id="::VehicleInterface">
1309 <webidl>interface VehicleInterface {
1310 <ref>Availability</ref> availableForRetrieval (DOMString attributeName);
1311 <ref>Promise</ref> get (optional <ref>Zone</ref> zone);
1312 <ref>Promise</ref> getHistory (Date begin, Date end, optional <ref>Zone</ref> zone);
1313 short availabilityChangedListener (<ref>AvailableCallback</ref> callback);
1314 void removeAvailabilityChangedListener (short handle);
1315 readonly attribute <ref>Zone</ref>[] zones;
1316 readonly attribute boolean supported;
1317 readonly attribute boolean isLogged;
1318 readonly attribute Date ? from;
1319 readonly attribute Date ? to;
1321 <Operation name="availableForRetrieval" id="::VehicleInterface::availableForRetrieval">
1322 <webidl> <ref>Availability</ref> availableForRetrieval (DOMString attributeName);</webidl>
1323 <Type name="Availability"/>
1325 <Argument name="attributeName">
1326 <Type type="DOMString"/>
1330 <Operation name="get" id="::VehicleInterface::get">
1331 <webidl> <ref>Promise</ref> get (optional <ref>Zone</ref> zone);</webidl>
1332 <Type name="Promise"/>
1334 <Argument optional="optional" name="zone">
1339 <Operation name="getHistory" id="::VehicleInterface::getHistory">
1340 <webidl> <ref>Promise</ref> getHistory (Date begin, Date end, optional <ref>Zone</ref> zone);</webidl>
1341 <Type name="Promise"/>
1343 <Argument name="begin">
1346 <Argument name="end">
1349 <Argument optional="optional" name="zone">
1354 <Operation name="availabilityChangedListener" id="::VehicleInterface::availabilityChangedListener">
1355 <webidl> short availabilityChangedListener (<ref>AvailableCallback</ref> callback);</webidl>
1356 <Type type="short"/>
1358 <Argument name="callback">
1359 <Type name="AvailableCallback"/>
1363 <Operation name="removeAvailabilityChangedListener" id="::VehicleInterface::removeAvailabilityChangedListener">
1364 <webidl> void removeAvailabilityChangedListener (short handle);</webidl>
1367 <Argument name="handle">
1368 <Type type="short"/>
1372 <Attribute readonly="readonly" name="zones" id="::VehicleInterface::zones">
1373 <webidl> readonly attribute <ref>Zone</ref>[] zones;</webidl>
1378 <Attribute readonly="readonly" name="supported" id="::VehicleInterface::supported">
1379 <webidl> readonly attribute boolean supported;</webidl>
1380 <Type type="boolean"/>
1382 <Attribute readonly="readonly" name="isLogged" id="::VehicleInterface::isLogged">
1383 <webidl> readonly attribute boolean isLogged;</webidl>
1384 <Type type="boolean"/>
1386 <Attribute readonly="readonly" name="from" id="::VehicleInterface::from">
1387 <webidl> readonly attribute Date ? from;</webidl>
1388 <Type type="Date" nullable="nullable"/>
1390 <Attribute readonly="readonly" name="to" id="::VehicleInterface::to">
1391 <webidl> readonly attribute Date ? to;</webidl>
1392 <Type type="Date" nullable="nullable"/>
1395 <Interface name="VehicleConfigurationInterface" id="::VehicleConfigurationInterface">
1396 <webidl>[NoInterfaceObject]
1397 interface VehicleConfigurationInterface : <ref>VehicleInterface</ref> {};</webidl>
1398 <ExtendedAttributeList>
1399 <ExtendedAttribute name="NoInterfaceObject">
1400 <webidl>NoInterfaceObject</webidl>
1401 </ExtendedAttribute>
1402 </ExtendedAttributeList>
1403 <InterfaceInheritance>
1404 <Name name="VehicleInterface"/>
1405 </InterfaceInheritance>
1407 <Interface name="VehicleSignalInterface" id="::VehicleSignalInterface">
1408 <webidl>[NoInterfaceObject]
1409 interface VehicleSignalInterface : <ref>VehicleInterface</ref> {
1410 <ref>Availability</ref> availableForSubscription (DOMString attributeName);
1411 <ref>Availability</ref> availableForSetting (DOMString attributeName);
1412 <ref>Promise</ref> set (object value, optional <ref>Zone</ref> zone);
1413 unsigned short subscribe (<ref>VehicleInterfaceCallback</ref> callback, optional <ref>Zone</ref> zone);
1414 void unsubscribe (unsigned short handle);
1416 <ExtendedAttributeList>
1417 <ExtendedAttribute name="NoInterfaceObject">
1418 <webidl>NoInterfaceObject</webidl>
1419 </ExtendedAttribute>
1420 </ExtendedAttributeList>
1421 <InterfaceInheritance>
1422 <Name name="VehicleInterface"/>
1423 </InterfaceInheritance>
1424 <Operation name="availableForSubscription" id="::VehicleSignalInterface::availableForSubscription">
1425 <webidl> <ref>Availability</ref> availableForSubscription (DOMString attributeName);</webidl>
1426 <Type name="Availability"/>
1428 <Argument name="attributeName">
1429 <Type type="DOMString"/>
1433 <Operation name="availableForSetting" id="::VehicleSignalInterface::availableForSetting">
1434 <webidl> <ref>Availability</ref> availableForSetting (DOMString attributeName);</webidl>
1435 <Type name="Availability"/>
1437 <Argument name="attributeName">
1438 <Type type="DOMString"/>
1442 <Operation name="set" id="::VehicleSignalInterface::set">
1443 <webidl> <ref>Promise</ref> set (object value, optional <ref>Zone</ref> zone);</webidl>
1444 <Type name="Promise"/>
1446 <Argument name="value">
1447 <Type type="object"/>
1449 <Argument optional="optional" name="zone">
1454 <Operation name="subscribe" id="::VehicleSignalInterface::subscribe">
1455 <webidl> unsigned short subscribe (<ref>VehicleInterfaceCallback</ref> callback, optional <ref>Zone</ref> zone);</webidl>
1456 <Type type="unsigned short"/>
1458 <Argument name="callback">
1459 <Type name="VehicleInterfaceCallback"/>
1461 <Argument optional="optional" name="zone">
1466 <Operation name="unsubscribe" id="::VehicleSignalInterface::unsubscribe">
1467 <webidl> void unsubscribe (unsigned short handle);</webidl>
1470 <Argument name="handle">
1471 <Type type="unsigned short"/>
1476 <Enum name="Availability" id="::Availability">
1477 <webidl>enum Availability {
1478 "available",
1479 "not_supported",
1480 "not_supported_yet",
1481 "not_supported_security_policy",
1482 "not_supported_business_policy",
1483 "not_supported_other"
1485 <EnumValue stringvalue="available">
1486 <webidl> "available</webidl>
1488 <EnumValue stringvalue="not_supported">
1489 <webidl> "not_supported</webidl>
1491 <EnumValue stringvalue="not_supported_yet">
1492 <webidl> "not_supported_yet</webidl>
1494 <EnumValue stringvalue="not_supported_security_policy">
1495 <webidl> "not_supported_security_policy</webidl>
1497 <EnumValue stringvalue="not_supported_business_policy">
1498 <webidl> "not_supported_business_policy</webidl>
1500 <EnumValue stringvalue="not_supported_other">
1501 <webidl> "not_supported_other</webidl>
1504 <Interface name="VehicleCommonDataType" id="::VehicleCommonDataType">
1505 <webidl>[NoInterfaceObject]
1506 interface VehicleCommonDataType {
1507 readonly attribute <ref>DOMTimeStamp</ref>? timeStamp;
1509 <ExtendedAttributeList>
1510 <ExtendedAttribute name="NoInterfaceObject">
1511 <webidl>NoInterfaceObject</webidl>
1512 </ExtendedAttribute>
1513 </ExtendedAttributeList>
1514 <Attribute readonly="readonly" name="timeStamp" id="::VehicleCommonDataType::timeStamp">
1515 <webidl> readonly attribute <ref>DOMTimeStamp</ref>? timeStamp;</webidl>
1516 <Type name="DOMTimeStamp" nullable="nullable"/>
1519 <Enum name="VehicleTypeEnum" id="::VehicleTypeEnum">
1520 <webidl>enum VehicleTypeEnum {
1521 "passengerCarMini",
1522 "passengerCarLight",
1523 "passengerCarCompact",
1524 "passengerCarMedium",
1525 "passengerCarHeavy",
1526 "sportUtilityVehicle",
1527 "pickupTruck",
1530 <EnumValue stringvalue="passengerCarMini">
1531 <webidl> "passengerCarMini</webidl>
1533 <EnumValue stringvalue="passengerCarLight">
1534 <webidl> "passengerCarLight</webidl>
1536 <EnumValue stringvalue="passengerCarCompact">
1537 <webidl> "passengerCarCompact</webidl>
1539 <EnumValue stringvalue="passengerCarMedium">
1540 <webidl> "passengerCarMedium</webidl>
1542 <EnumValue stringvalue="passengerCarHeavy">
1543 <webidl> "passengerCarHeavy</webidl>
1545 <EnumValue stringvalue="sportUtilityVehicle">
1546 <webidl> "sportUtilityVehicle</webidl>
1548 <EnumValue stringvalue="pickupTruck">
1549 <webidl> "pickupTruck</webidl>
1551 <EnumValue stringvalue="van">
1552 <webidl> "van</webidl>
1555 <Interface name="Identification" id="::Identification">
1556 <webidl>[NoInterfaceObject]
1557 interface Identification : <ref>VehicleCommonDataType</ref> {
1558 readonly attribute DOMString? VIN;
1559 readonly attribute DOMString? WMI;
1560 readonly attribute <ref>VehicleTypeEnum</ref>? vehicleType;
1561 readonly attribute DOMString? brand;
1562 readonly attribute DOMString? model;
1563 readonly attribute unsigned short? year;
1565 <ExtendedAttributeList>
1566 <ExtendedAttribute name="NoInterfaceObject">
1567 <webidl>NoInterfaceObject</webidl>
1568 </ExtendedAttribute>
1569 </ExtendedAttributeList>
1570 <InterfaceInheritance>
1571 <Name name="VehicleCommonDataType"/>
1572 </InterfaceInheritance>
1573 <Attribute readonly="readonly" name="VIN" id="::Identification::VIN">
1574 <webidl> readonly attribute DOMString? VIN;</webidl>
1575 <Type type="DOMString" nullable="nullable"/>
1577 <Attribute readonly="readonly" name="WMI" id="::Identification::WMI">
1578 <webidl> readonly attribute DOMString? WMI;</webidl>
1579 <Type type="DOMString" nullable="nullable"/>
1581 <Attribute readonly="readonly" name="vehicleType" id="::Identification::vehicleType">
1582 <webidl> readonly attribute <ref>VehicleTypeEnum</ref>? vehicleType;</webidl>
1583 <Type name="VehicleTypeEnum" nullable="nullable"/>
1585 <Attribute readonly="readonly" name="brand" id="::Identification::brand">
1586 <webidl> readonly attribute DOMString? brand;</webidl>
1587 <Type type="DOMString" nullable="nullable"/>
1589 <Attribute readonly="readonly" name="model" id="::Identification::model">
1590 <webidl> readonly attribute DOMString? model;</webidl>
1591 <Type type="DOMString" nullable="nullable"/>
1593 <Attribute readonly="readonly" name="year" id="::Identification::year">
1594 <webidl> readonly attribute unsigned short? year;</webidl>
1595 <Type type="unsigned short" nullable="nullable"/>
1598 <Interface name="SizeConfiguration" id="::SizeConfiguration">
1599 <webidl>[NoInterfaceObject]
1600 interface SizeConfiguration : <ref>VehicleCommonDataType</ref> {
1601 readonly attribute unsigned short? width;
1602 readonly attribute unsigned short? height;
1603 readonly attribute unsigned short? length;
1604 readonly attribute unsigned short[]? doorsCount;
1605 readonly attribute unsigned short? totalDoors;
1607 <ExtendedAttributeList>
1608 <ExtendedAttribute name="NoInterfaceObject">
1609 <webidl>NoInterfaceObject</webidl>
1610 </ExtendedAttribute>
1611 </ExtendedAttributeList>
1612 <InterfaceInheritance>
1613 <Name name="VehicleCommonDataType"/>
1614 </InterfaceInheritance>
1615 <Attribute readonly="readonly" name="width" id="::SizeConfiguration::width">
1616 <webidl> readonly attribute unsigned short? width;</webidl>
1617 <Type type="unsigned short" nullable="nullable"/>
1619 <Attribute readonly="readonly" name="height" id="::SizeConfiguration::height">
1620 <webidl> readonly attribute unsigned short? height;</webidl>
1621 <Type type="unsigned short" nullable="nullable"/>
1623 <Attribute readonly="readonly" name="length" id="::SizeConfiguration::length">
1624 <webidl> readonly attribute unsigned short? length;</webidl>
1625 <Type type="unsigned short" nullable="nullable"/>
1627 <Attribute readonly="readonly" name="doorsCount" id="::SizeConfiguration::doorsCount">
1628 <webidl> readonly attribute unsigned short[]? doorsCount;</webidl>
1629 <Type type="array" nullable="nullable">
1630 <Type type="unsigned short"/>
1633 <Attribute readonly="readonly" name="totalDoors" id="::SizeConfiguration::totalDoors">
1634 <webidl> readonly attribute unsigned short? totalDoors;</webidl>
1635 <Type type="unsigned short" nullable="nullable"/>
1638 <Enum name="FuelTypeEnum" id="::FuelTypeEnum">
1639 <webidl>enum FuelTypeEnum {
1640 "gasoline",
1641 "methanol",
1642 "ethanol",
1646 "electric"
1648 <EnumValue stringvalue="gasoline">
1649 <webidl> "gasoline</webidl>
1651 <EnumValue stringvalue="methanol">
1652 <webidl> "methanol</webidl>
1654 <EnumValue stringvalue="ethanol">
1655 <webidl> "ethanol</webidl>
1657 <EnumValue stringvalue="diesel">
1658 <webidl> "diesel</webidl>
1660 <EnumValue stringvalue="lpg">
1661 <webidl> "lpg</webidl>
1663 <EnumValue stringvalue="cng">
1664 <webidl> "cng</webidl>
1666 <EnumValue stringvalue="electric">
1667 <webidl> "electric</webidl>
1670 <Interface name="FuelConfiguration" id="::FuelConfiguration">
1671 <webidl>[NoInterfaceObject]
1672 interface FuelConfiguration : <ref>VehicleCommonDataType</ref> {
1673 readonly attribute <ref>FuelTypeEnum</ref>[]? fuelType;
1674 readonly attribute <ref>Zone</ref>? refuelPosition;
1676 <ExtendedAttributeList>
1677 <ExtendedAttribute name="NoInterfaceObject">
1678 <webidl>NoInterfaceObject</webidl>
1679 </ExtendedAttribute>
1680 </ExtendedAttributeList>
1681 <InterfaceInheritance>
1682 <Name name="VehicleCommonDataType"/>
1683 </InterfaceInheritance>
1684 <Attribute readonly="readonly" name="fuelType" id="::FuelConfiguration::fuelType">
1685 <webidl> readonly attribute <ref>FuelTypeEnum</ref>[]? fuelType;</webidl>
1686 <Type type="array" nullable="nullable">
1687 <Type name="FuelTypeEnum"/>
1690 <Attribute readonly="readonly" name="refuelPosition" id="::FuelConfiguration::refuelPosition">
1691 <webidl> readonly attribute <ref>Zone</ref>? refuelPosition;</webidl>
1692 <Type name="Zone" nullable="nullable"/>
1695 <Enum name="TransmissionGearTypeEnum" id="::TransmissionGearTypeEnum">
1696 <webidl>enum TransmissionGearTypeEnum {
1700 <EnumValue stringvalue="auto">
1701 <webidl> "auto</webidl>
1703 <EnumValue stringvalue="manual">
1704 <webidl> "manual</webidl>
1707 <Interface name="TransmissionConfiguration" id="::TransmissionConfiguration">
1708 <webidl>[NoInterfaceObject]
1709 interface TransmissionConfiguration : <ref>VehicleCommonDataType</ref> {
1710 readonly attribute <ref>TransmissionGearTypeEnum</ref>? transmissionGearType;
1712 <ExtendedAttributeList>
1713 <ExtendedAttribute name="NoInterfaceObject">
1714 <webidl>NoInterfaceObject</webidl>
1715 </ExtendedAttribute>
1716 </ExtendedAttributeList>
1717 <InterfaceInheritance>
1718 <Name name="VehicleCommonDataType"/>
1719 </InterfaceInheritance>
1720 <Attribute readonly="readonly" name="transmissionGearType" id="::TransmissionConfiguration::transmissionGearType">
1721 <webidl> readonly attribute <ref>TransmissionGearTypeEnum</ref>? transmissionGearType;</webidl>
1722 <Type name="TransmissionGearTypeEnum" nullable="nullable"/>
1725 <Interface name="WheelConfiguration" id="::WheelConfiguration">
1726 <webidl>[NoInterfaceObject]
1727 interface WheelConfiguration : <ref>VehicleCommonDataType</ref> {
1728 readonly attribute unsigned short? wheelRadius;
1729 readonly attribute <ref>Zone</ref>? zone;
1731 <ExtendedAttributeList>
1732 <ExtendedAttribute name="NoInterfaceObject">
1733 <webidl>NoInterfaceObject</webidl>
1734 </ExtendedAttribute>
1735 </ExtendedAttributeList>
1736 <InterfaceInheritance>
1737 <Name name="VehicleCommonDataType"/>
1738 </InterfaceInheritance>
1739 <Attribute readonly="readonly" name="wheelRadius" id="::WheelConfiguration::wheelRadius">
1740 <webidl> readonly attribute unsigned short? wheelRadius;</webidl>
1741 <Type type="unsigned short" nullable="nullable"/>
1743 <Attribute readonly="readonly" name="zone" id="::WheelConfiguration::zone">
1744 <webidl> readonly attribute <ref>Zone</ref>? zone;</webidl>
1745 <Type name="Zone" nullable="nullable"/>
1748 <Interface name="SteeringWheelConfiguration" id="::SteeringWheelConfiguration">
1749 <webidl>[NoInterfaceObject]
1750 interface SteeringWheelConfiguration : <ref>VehicleCommonDataType</ref> {
1751 readonly attribute boolean? steeringWheelLeft;
1752 attribute unsigned short? steeringWheelTelescopingPosition;
1753 attribute unsigned short? steeringWheelPositionTilt;
1755 <ExtendedAttributeList>
1756 <ExtendedAttribute name="NoInterfaceObject">
1757 <webidl>NoInterfaceObject</webidl>
1758 </ExtendedAttribute>
1759 </ExtendedAttributeList>
1760 <InterfaceInheritance>
1761 <Name name="VehicleCommonDataType"/>
1762 </InterfaceInheritance>
1763 <Attribute readonly="readonly" name="steeringWheelLeft" id="::SteeringWheelConfiguration::steeringWheelLeft">
1764 <webidl> readonly attribute boolean? steeringWheelLeft;</webidl>
1765 <Type type="boolean" nullable="nullable"/>
1767 <Attribute name="steeringWheelTelescopingPosition" id="::SteeringWheelConfiguration::steeringWheelTelescopingPosition">
1768 <webidl> attribute unsigned short? steeringWheelTelescopingPosition;</webidl>
1769 <Type type="unsigned short" nullable="nullable"/>
1771 <Attribute name="steeringWheelPositionTilt" id="::SteeringWheelConfiguration::steeringWheelPositionTilt">
1772 <webidl> attribute unsigned short? steeringWheelPositionTilt;</webidl>
1773 <Type type="unsigned short" nullable="nullable"/>
1776 <Interface name="VehicleSpeed" id="::VehicleSpeed">
1777 <webidl>[NoInterfaceObject]
1778 interface VehicleSpeed : <ref>VehicleCommonDataType</ref> {
1779 readonly attribute unsigned short speed;
1781 <ExtendedAttributeList>
1782 <ExtendedAttribute name="NoInterfaceObject">
1783 <webidl>NoInterfaceObject</webidl>
1784 </ExtendedAttribute>
1785 </ExtendedAttributeList>
1786 <InterfaceInheritance>
1787 <Name name="VehicleCommonDataType"/>
1788 </InterfaceInheritance>
1789 <Attribute readonly="readonly" name="speed" id="::VehicleSpeed::speed">
1790 <webidl> readonly attribute unsigned short speed;</webidl>
1791 <Type type="unsigned short"/>
1794 <Interface name="WheelSpeed" id="::WheelSpeed">
1795 <webidl>[NoInterfaceObject]
1796 interface WheelSpeed : <ref>VehicleCommonDataType</ref> {
1797 readonly attribute unsigned short speed;
1798 readonly attribute <ref>Zone</ref>? zone;
1800 <ExtendedAttributeList>
1801 <ExtendedAttribute name="NoInterfaceObject">
1802 <webidl>NoInterfaceObject</webidl>
1803 </ExtendedAttribute>
1804 </ExtendedAttributeList>
1805 <InterfaceInheritance>
1806 <Name name="VehicleCommonDataType"/>
1807 </InterfaceInheritance>
1808 <Attribute readonly="readonly" name="speed" id="::WheelSpeed::speed">
1809 <webidl> readonly attribute unsigned short speed;</webidl>
1810 <Type type="unsigned short"/>
1812 <Attribute readonly="readonly" name="zone" id="::WheelSpeed::zone">
1813 <webidl> readonly attribute <ref>Zone</ref>? zone;</webidl>
1814 <Type name="Zone" nullable="nullable"/>
1817 <Interface name="EngineSpeed" id="::EngineSpeed">
1818 <webidl>[NoInterfaceObject]
1819 interface EngineSpeed : <ref>VehicleCommonDataType</ref> {
1820 readonly attribute unsigned long speed;
1822 <ExtendedAttributeList>
1823 <ExtendedAttribute name="NoInterfaceObject">
1824 <webidl>NoInterfaceObject</webidl>
1825 </ExtendedAttribute>
1826 </ExtendedAttributeList>
1827 <InterfaceInheritance>
1828 <Name name="VehicleCommonDataType"/>
1829 </InterfaceInheritance>
1830 <Attribute readonly="readonly" name="speed" id="::EngineSpeed::speed">
1831 <webidl> readonly attribute unsigned long speed;</webidl>
1832 <Type type="unsigned long"/>
1835 <Enum name="VehiclePowerMode" id="::VehiclePowerMode">
1836 <webidl>enum VehiclePowerMode {
1838 "accessory1",
1839 "accessory2",
1842 <EnumValue stringvalue="off">
1843 <webidl> "off</webidl>
1845 <EnumValue stringvalue="accessory1">
1846 <webidl> "accessory1</webidl>
1848 <EnumValue stringvalue="accessory2">
1849 <webidl> "accessory2</webidl>
1851 <EnumValue stringvalue="running">
1852 <webidl> "running</webidl>
1855 <Interface name="VehiclePowerModeType" id="::VehiclePowerModeType">
1856 <webidl>[NoInterfaceObject]
1857 interface VehiclePowerModeType : <ref>VehicleCommonDataType</ref> {
1858 readonly attribute <ref>VehiclePowerMode</ref> value;
1860 <ExtendedAttributeList>
1861 <ExtendedAttribute name="NoInterfaceObject">
1862 <webidl>NoInterfaceObject</webidl>
1863 </ExtendedAttribute>
1864 </ExtendedAttributeList>
1865 <InterfaceInheritance>
1866 <Name name="VehicleCommonDataType"/>
1867 </InterfaceInheritance>
1868 <Attribute readonly="readonly" name="value" id="::VehiclePowerModeType::value">
1869 <webidl> readonly attribute <ref>VehiclePowerMode</ref> value;</webidl>
1870 <Type name="VehiclePowerMode"/>
1873 <Interface name="PowerTrainTorque" id="::PowerTrainTorque">
1874 <webidl>[NoInterfaceObject]
1875 interface PowerTrainTorque : <ref>VehicleCommonDataType</ref> {
1876 readonly attribute short value;
1878 <ExtendedAttributeList>
1879 <ExtendedAttribute name="NoInterfaceObject">
1880 <webidl>NoInterfaceObject</webidl>
1881 </ExtendedAttribute>
1882 </ExtendedAttributeList>
1883 <InterfaceInheritance>
1884 <Name name="VehicleCommonDataType"/>
1885 </InterfaceInheritance>
1886 <Attribute readonly="readonly" name="value" id="::PowerTrainTorque::value">
1887 <webidl> readonly attribute short value;</webidl>
1888 <Type type="short"/>
1891 <Interface name="AcceleratorPedalPosition" id="::AcceleratorPedalPosition">
1892 <webidl>[NoInterfaceObject]
1893 interface AcceleratorPedalPosition : <ref>VehicleCommonDataType</ref> {
1894 readonly attribute unsigned short value;
1896 <ExtendedAttributeList>
1897 <ExtendedAttribute name="NoInterfaceObject">
1898 <webidl>NoInterfaceObject</webidl>
1899 </ExtendedAttribute>
1900 </ExtendedAttributeList>
1901 <InterfaceInheritance>
1902 <Name name="VehicleCommonDataType"/>
1903 </InterfaceInheritance>
1904 <Attribute readonly="readonly" name="value" id="::AcceleratorPedalPosition::value">
1905 <webidl> readonly attribute unsigned short value;</webidl>
1906 <Type type="unsigned short"/>
1909 <Interface name="ThrottlePosition" id="::ThrottlePosition">
1910 <webidl>[NoInterfaceObject]
1911 interface ThrottlePosition : <ref>VehicleCommonDataType</ref> {
1912 readonly attribute unsigned short value;
1914 <ExtendedAttributeList>
1915 <ExtendedAttribute name="NoInterfaceObject">
1916 <webidl>NoInterfaceObject</webidl>
1917 </ExtendedAttribute>
1918 </ExtendedAttributeList>
1919 <InterfaceInheritance>
1920 <Name name="VehicleCommonDataType"/>
1921 </InterfaceInheritance>
1922 <Attribute readonly="readonly" name="value" id="::ThrottlePosition::value">
1923 <webidl> readonly attribute unsigned short value;</webidl>
1924 <Type type="unsigned short"/>
1927 <Interface name="Trip" id="::Trip">
1928 <webidl>[NoInterfaceObject]
1930 readonly attribute unsigned long distance;
1931 readonly attribute unsigned short? averageSpeed;
1932 readonly attribute unsigned short? fuelConsumption;
1934 <ExtendedAttributeList>
1935 <ExtendedAttribute name="NoInterfaceObject">
1936 <webidl>NoInterfaceObject</webidl>
1937 </ExtendedAttribute>
1938 </ExtendedAttributeList>
1939 <Attribute readonly="readonly" name="distance" id="::Trip::distance">
1940 <webidl> readonly attribute unsigned long distance;</webidl>
1941 <Type type="unsigned long"/>
1943 <Attribute readonly="readonly" name="averageSpeed" id="::Trip::averageSpeed">
1944 <webidl> readonly attribute unsigned short? averageSpeed;</webidl>
1945 <Type type="unsigned short" nullable="nullable"/>
1947 <Attribute readonly="readonly" name="fuelConsumption" id="::Trip::fuelConsumption">
1948 <webidl> readonly attribute unsigned short? fuelConsumption;</webidl>
1949 <Type type="unsigned short" nullable="nullable"/>
1952 <Interface name="TripMeters" id="::TripMeters">
1953 <webidl>[NoInterfaceObject]
1954 interface TripMeters : <ref>VehicleCommonDataType</ref> {
1955 readonly attribute <ref>Trip</ref>[] meters;
1957 <ExtendedAttributeList>
1958 <ExtendedAttribute name="NoInterfaceObject">
1959 <webidl>NoInterfaceObject</webidl>
1960 </ExtendedAttribute>
1961 </ExtendedAttributeList>
1962 <InterfaceInheritance>
1963 <Name name="VehicleCommonDataType"/>
1964 </InterfaceInheritance>
1965 <Attribute readonly="readonly" name="meters" id="::TripMeters::meters">
1966 <webidl> readonly attribute <ref>Trip</ref>[] meters;</webidl>
1972 <Enum name="TransmissionMode" id="::TransmissionMode">
1973 <webidl>enum TransmissionMode {
1975 "reverse",
1976 "neutral",
1979 "overdrive"
1981 <EnumValue stringvalue="park">
1982 <webidl> "park</webidl>
1984 <EnumValue stringvalue="reverse">
1985 <webidl> "reverse</webidl>
1987 <EnumValue stringvalue="neutral">
1988 <webidl> "neutral</webidl>
1990 <EnumValue stringvalue="low">
1991 <webidl> "low</webidl>
1993 <EnumValue stringvalue="drive">
1994 <webidl> "drive</webidl>
1996 <EnumValue stringvalue="overdrive">
1997 <webidl> "overdrive</webidl>
2000 <Interface name="Transmission" id="::Transmission">
2001 <webidl>[NoInterfaceObject]
2002 interface Transmission : <ref>VehicleCommonDataType</ref> {
2003 readonly attribute octet? gear;
2004 readonly attribute <ref>TransmissionMode</ref>? mode;
2006 <ExtendedAttributeList>
2007 <ExtendedAttribute name="NoInterfaceObject">
2008 <webidl>NoInterfaceObject</webidl>
2009 </ExtendedAttribute>
2010 </ExtendedAttributeList>
2011 <InterfaceInheritance>
2012 <Name name="VehicleCommonDataType"/>
2013 </InterfaceInheritance>
2014 <Attribute readonly="readonly" name="gear" id="::Transmission::gear">
2015 <webidl> readonly attribute octet? gear;</webidl>
2016 <Type type="octet" nullable="nullable"/>
2018 <Attribute readonly="readonly" name="mode" id="::Transmission::mode">
2019 <webidl> readonly attribute <ref>TransmissionMode</ref>? mode;</webidl>
2020 <Type name="TransmissionMode" nullable="nullable"/>
2023 <Interface name="CruiseControlStatus" id="::CruiseControlStatus">
2024 <webidl>[NoInterfaceObject]
2025 interface CruiseControlStatus : <ref>VehicleCommonDataType</ref> {
2026 readonly attribute boolean status;
2027 readonly attribute unsigned short speed;
2029 <ExtendedAttributeList>
2030 <ExtendedAttribute name="NoInterfaceObject">
2031 <webidl>NoInterfaceObject</webidl>
2032 </ExtendedAttribute>
2033 </ExtendedAttributeList>
2034 <InterfaceInheritance>
2035 <Name name="VehicleCommonDataType"/>
2036 </InterfaceInheritance>
2037 <Attribute readonly="readonly" name="status" id="::CruiseControlStatus::status">
2038 <webidl> readonly attribute boolean status;</webidl>
2039 <Type type="boolean"/>
2041 <Attribute readonly="readonly" name="speed" id="::CruiseControlStatus::speed">
2042 <webidl> readonly attribute unsigned short speed;</webidl>
2043 <Type type="unsigned short"/>
2046 <Interface name="LightStatus" id="::LightStatus">
2047 <webidl>[NoInterfaceObject]
2048 interface LightStatus : <ref>VehicleCommonDataType</ref> {
2049 attribute boolean head;
2050 attribute boolean rightTurn;
2051 attribute boolean leftTurn;
2052 attribute boolean brake;
2053 attribute boolean? fog;
2054 attribute boolean hazard;
2055 attribute boolean parking;
2056 attribute boolean highBeam;
2057 attribute boolean? automaticHeadlights;
2058 attribute boolean? dynamicHighBeam;
2059 readonly attribute <ref>Zone</ref>? zone;
2061 <ExtendedAttributeList>
2062 <ExtendedAttribute name="NoInterfaceObject">
2063 <webidl>NoInterfaceObject</webidl>
2064 </ExtendedAttribute>
2065 </ExtendedAttributeList>
2066 <InterfaceInheritance>
2067 <Name name="VehicleCommonDataType"/>
2068 </InterfaceInheritance>
2069 <Attribute name="head" id="::LightStatus::head">
2070 <webidl> attribute boolean head;</webidl>
2071 <Type type="boolean"/>
2073 <Attribute name="rightTurn" id="::LightStatus::rightTurn">
2074 <webidl> attribute boolean rightTurn;</webidl>
2075 <Type type="boolean"/>
2077 <Attribute name="leftTurn" id="::LightStatus::leftTurn">
2078 <webidl> attribute boolean leftTurn;</webidl>
2079 <Type type="boolean"/>
2081 <Attribute name="brake" id="::LightStatus::brake">
2082 <webidl> attribute boolean brake;</webidl>
2083 <Type type="boolean"/>
2085 <Attribute name="fog" id="::LightStatus::fog">
2086 <webidl> attribute boolean? fog;</webidl>
2087 <Type type="boolean" nullable="nullable"/>
2089 <Attribute name="hazard" id="::LightStatus::hazard">
2090 <webidl> attribute boolean hazard;</webidl>
2091 <Type type="boolean"/>
2093 <Attribute name="parking" id="::LightStatus::parking">
2094 <webidl> attribute boolean parking;</webidl>
2095 <Type type="boolean"/>
2097 <Attribute name="highBeam" id="::LightStatus::highBeam">
2098 <webidl> attribute boolean highBeam;</webidl>
2099 <Type type="boolean"/>
2101 <Attribute name="automaticHeadlights" id="::LightStatus::automaticHeadlights">
2102 <webidl> attribute boolean? automaticHeadlights;</webidl>
2103 <Type type="boolean" nullable="nullable"/>
2105 <Attribute name="dynamicHighBeam" id="::LightStatus::dynamicHighBeam">
2106 <webidl> attribute boolean? dynamicHighBeam;</webidl>
2107 <Type type="boolean" nullable="nullable"/>
2109 <Attribute readonly="readonly" name="zone" id="::LightStatus::zone">
2110 <webidl> readonly attribute <ref>Zone</ref>? zone;</webidl>
2111 <Type name="Zone" nullable="nullable"/>
2114 <Interface name="InteriorLightStatus" id="::InteriorLightStatus">
2115 <webidl>[NoInterfaceObject]
2116 interface InteriorLightStatus : <ref>VehicleCommonDataType</ref> {
2117 attribute boolean status;
2118 readonly attribute <ref>Zone</ref>? zone;
2120 <ExtendedAttributeList>
2121 <ExtendedAttribute name="NoInterfaceObject">
2122 <webidl>NoInterfaceObject</webidl>
2123 </ExtendedAttribute>
2124 </ExtendedAttributeList>
2125 <InterfaceInheritance>
2126 <Name name="VehicleCommonDataType"/>
2127 </InterfaceInheritance>
2128 <Attribute name="status" id="::InteriorLightStatus::status">
2129 <webidl> attribute boolean status;</webidl>
2130 <Type type="boolean"/>
2132 <Attribute readonly="readonly" name="zone" id="::InteriorLightStatus::zone">
2133 <webidl> readonly attribute <ref>Zone</ref>? zone;</webidl>
2134 <Type name="Zone" nullable="nullable"/>
2137 <Interface name="Horn" id="::Horn">
2138 <webidl>[NoInterfaceObject]
2139 interface Horn : <ref>VehicleCommonDataType</ref> {
2140 attribute boolean status;
2142 <ExtendedAttributeList>
2143 <ExtendedAttribute name="NoInterfaceObject">
2144 <webidl>NoInterfaceObject</webidl>
2145 </ExtendedAttribute>
2146 </ExtendedAttributeList>
2147 <InterfaceInheritance>
2148 <Name name="VehicleCommonDataType"/>
2149 </InterfaceInheritance>
2150 <Attribute name="status" id="::Horn::status">
2151 <webidl> attribute boolean status;</webidl>
2152 <Type type="boolean"/>
2155 <Interface name="Chime" id="::Chime">
2156 <webidl>[NoInterfaceObject]
2157 interface Chime : <ref>VehicleCommonDataType</ref> {
2158 readonly attribute boolean status;
2160 <ExtendedAttributeList>
2161 <ExtendedAttribute name="NoInterfaceObject">
2162 <webidl>NoInterfaceObject</webidl>
2163 </ExtendedAttribute>
2164 </ExtendedAttributeList>
2165 <InterfaceInheritance>
2166 <Name name="VehicleCommonDataType"/>
2167 </InterfaceInheritance>
2168 <Attribute readonly="readonly" name="status" id="::Chime::status">
2169 <webidl> readonly attribute boolean status;</webidl>
2170 <Type type="boolean"/>
2173 <Interface name="Fuel" id="::Fuel">
2174 <webidl>[NoInterfaceObject]
2175 interface Fuel : <ref>VehicleCommonDataType</ref> {
2176 readonly attribute unsigned short? level;
2177 readonly attribute unsigned long? range;
2178 readonly attribute unsigned long? instantConsumption;
2179 attribute unsigned long? averageConsumption;
2180 readonly attribute unsigned long? fuelConsumedSinceRestart;
2181 readonly attribute unsigned long? timeSinceRestart;
2183 <ExtendedAttributeList>
2184 <ExtendedAttribute name="NoInterfaceObject">
2185 <webidl>NoInterfaceObject</webidl>
2186 </ExtendedAttribute>
2187 </ExtendedAttributeList>
2188 <InterfaceInheritance>
2189 <Name name="VehicleCommonDataType"/>
2190 </InterfaceInheritance>
2191 <Attribute readonly="readonly" name="level" id="::Fuel::level">
2192 <webidl> readonly attribute unsigned short? level;</webidl>
2193 <Type type="unsigned short" nullable="nullable"/>
2195 <Attribute readonly="readonly" name="range" id="::Fuel::range">
2196 <webidl> readonly attribute unsigned long? range;</webidl>
2197 <Type type="unsigned long" nullable="nullable"/>
2199 <Attribute readonly="readonly" name="instantConsumption" id="::Fuel::instantConsumption">
2200 <webidl> readonly attribute unsigned long? instantConsumption;</webidl>
2201 <Type type="unsigned long" nullable="nullable"/>
2203 <Attribute name="averageConsumption" id="::Fuel::averageConsumption">
2204 <webidl> attribute unsigned long? averageConsumption;</webidl>
2205 <Type type="unsigned long" nullable="nullable"/>
2207 <Attribute readonly="readonly" name="fuelConsumedSinceRestart" id="::Fuel::fuelConsumedSinceRestart">
2208 <webidl> readonly attribute unsigned long? fuelConsumedSinceRestart;</webidl>
2209 <Type type="unsigned long" nullable="nullable"/>
2211 <Attribute readonly="readonly" name="timeSinceRestart" id="::Fuel::timeSinceRestart">
2212 <webidl> readonly attribute unsigned long? timeSinceRestart;</webidl>
2213 <Type type="unsigned long" nullable="nullable"/>
2216 <Interface name="EngineOil" id="::EngineOil">
2217 <webidl>[NoInterfaceObject]
2218 interface EngineOil : <ref>VehicleCommonDataType</ref> {
2219 readonly attribute unsigned short level;
2220 readonly attribute unsigned short lifeRemaining;
2221 readonly attribute long temperature;
2222 readonly attribute unsigned short pressure;
2223 readonly attribute boolean change;
2225 <ExtendedAttributeList>
2226 <ExtendedAttribute name="NoInterfaceObject">
2227 <webidl>NoInterfaceObject</webidl>
2228 </ExtendedAttribute>
2229 </ExtendedAttributeList>
2230 <InterfaceInheritance>
2231 <Name name="VehicleCommonDataType"/>
2232 </InterfaceInheritance>
2233 <Attribute readonly="readonly" name="level" id="::EngineOil::level">
2234 <webidl> readonly attribute unsigned short level;</webidl>
2235 <Type type="unsigned short"/>
2237 <Attribute readonly="readonly" name="lifeRemaining" id="::EngineOil::lifeRemaining">
2238 <webidl> readonly attribute unsigned short lifeRemaining;</webidl>
2239 <Type type="unsigned short"/>
2241 <Attribute readonly="readonly" name="temperature" id="::EngineOil::temperature">
2242 <webidl> readonly attribute long temperature;</webidl>
2245 <Attribute readonly="readonly" name="pressure" id="::EngineOil::pressure">
2246 <webidl> readonly attribute unsigned short pressure;</webidl>
2247 <Type type="unsigned short"/>
2249 <Attribute readonly="readonly" name="change" id="::EngineOil::change">
2250 <webidl> readonly attribute boolean change;</webidl>
2251 <Type type="boolean"/>
2254 <Interface name="Acceleration" id="::Acceleration">
2255 <webidl>[NoInterfaceObject]
2256 interface Acceleration : <ref>VehicleCommonDataType</ref> {
2257 readonly attribute long x;
2258 readonly attribute long y;
2259 readonly attribute long z;
2261 <ExtendedAttributeList>
2262 <ExtendedAttribute name="NoInterfaceObject">
2263 <webidl>NoInterfaceObject</webidl>
2264 </ExtendedAttribute>
2265 </ExtendedAttributeList>
2266 <InterfaceInheritance>
2267 <Name name="VehicleCommonDataType"/>
2268 </InterfaceInheritance>
2269 <Attribute readonly="readonly" name="x" id="::Acceleration::x">
2270 <webidl> readonly attribute long x;</webidl>
2273 <Attribute readonly="readonly" name="y" id="::Acceleration::y">
2274 <webidl> readonly attribute long y;</webidl>
2277 <Attribute readonly="readonly" name="z" id="::Acceleration::z">
2278 <webidl> readonly attribute long z;</webidl>
2282 <Interface name="EngineCoolant" id="::EngineCoolant">
2283 <webidl>[NoInterfaceObject]
2284 interface EngineCoolant : <ref>VehicleCommonDataType</ref> {
2285 readonly attribute octet level;
2286 readonly attribute short temperature;
2288 <ExtendedAttributeList>
2289 <ExtendedAttribute name="NoInterfaceObject">
2290 <webidl>NoInterfaceObject</webidl>
2291 </ExtendedAttribute>
2292 </ExtendedAttributeList>
2293 <InterfaceInheritance>
2294 <Name name="VehicleCommonDataType"/>
2295 </InterfaceInheritance>
2296 <Attribute readonly="readonly" name="level" id="::EngineCoolant::level">
2297 <webidl> readonly attribute octet level;</webidl>
2298 <Type type="octet"/>
2300 <Attribute readonly="readonly" name="temperature" id="::EngineCoolant::temperature">
2301 <webidl> readonly attribute short temperature;</webidl>
2302 <Type type="short"/>
2305 <Interface name="SteeringWheel" id="::SteeringWheel">
2306 <webidl>[NoInterfaceObject]
2307 interface SteeringWheel : <ref>VehicleCommonDataType</ref> {
2308 readonly attribute short angle;
2310 <ExtendedAttributeList>
2311 <ExtendedAttribute name="NoInterfaceObject">
2312 <webidl>NoInterfaceObject</webidl>
2313 </ExtendedAttribute>
2314 </ExtendedAttributeList>
2315 <InterfaceInheritance>
2316 <Name name="VehicleCommonDataType"/>
2317 </InterfaceInheritance>
2318 <Attribute readonly="readonly" name="angle" id="::SteeringWheel::angle">
2319 <webidl> readonly attribute short angle;</webidl>
2320 <Type type="short"/>
2323 <Interface name="WheelTick" id="::WheelTick">
2324 <webidl>[NoInterfaceObject]
2325 interface WheelTick : <ref>VehicleCommonDataType</ref> {
2326 readonly attribute unsigned long value;
2327 readonly attribute <ref>Zone</ref>? zone;
2329 <ExtendedAttributeList>
2330 <ExtendedAttribute name="NoInterfaceObject">
2331 <webidl>NoInterfaceObject</webidl>
2332 </ExtendedAttribute>
2333 </ExtendedAttributeList>
2334 <InterfaceInheritance>
2335 <Name name="VehicleCommonDataType"/>
2336 </InterfaceInheritance>
2337 <Attribute readonly="readonly" name="value" id="::WheelTick::value">
2338 <webidl> readonly attribute unsigned long value;</webidl>
2339 <Type type="unsigned long"/>
2341 <Attribute readonly="readonly" name="zone" id="::WheelTick::zone">
2342 <webidl> readonly attribute <ref>Zone</ref>? zone;</webidl>
2343 <Type name="Zone" nullable="nullable"/>
2346 <Interface name="IgnitionTime" id="::IgnitionTime">
2347 <webidl>[NoInterfaceObject]
2348 interface IgnitionTime : <ref>VehicleCommonDataType</ref> {
2349 readonly attribute <ref>DOMTimeStamp</ref> ignitionOnTime;
2350 readonly attribute <ref>DOMTimeStamp</ref> ignitionOffTime;
2352 <ExtendedAttributeList>
2353 <ExtendedAttribute name="NoInterfaceObject">
2354 <webidl>NoInterfaceObject</webidl>
2355 </ExtendedAttribute>
2356 </ExtendedAttributeList>
2357 <InterfaceInheritance>
2358 <Name name="VehicleCommonDataType"/>
2359 </InterfaceInheritance>
2360 <Attribute readonly="readonly" name="ignitionOnTime" id="::IgnitionTime::ignitionOnTime">
2361 <webidl> readonly attribute <ref>DOMTimeStamp</ref> ignitionOnTime;</webidl>
2362 <Type name="DOMTimeStamp"/>
2364 <Attribute readonly="readonly" name="ignitionOffTime" id="::IgnitionTime::ignitionOffTime">
2365 <webidl> readonly attribute <ref>DOMTimeStamp</ref> ignitionOffTime;</webidl>
2366 <Type name="DOMTimeStamp"/>
2369 <Interface name="YawRate" id="::YawRate">
2370 <webidl>[NoInterfaceObject]
2371 interface YawRate : <ref>VehicleCommonDataType</ref> {
2372 readonly attribute short value;
2374 <ExtendedAttributeList>
2375 <ExtendedAttribute name="NoInterfaceObject">
2376 <webidl>NoInterfaceObject</webidl>
2377 </ExtendedAttribute>
2378 </ExtendedAttributeList>
2379 <InterfaceInheritance>
2380 <Name name="VehicleCommonDataType"/>
2381 </InterfaceInheritance>
2382 <Attribute readonly="readonly" name="value" id="::YawRate::value">
2383 <webidl> readonly attribute short value;</webidl>
2384 <Type type="short"/>
2387 <Interface name="BrakeOperation" id="::BrakeOperation">
2388 <webidl>[NoInterfaceObject]
2389 interface BrakeOperation : <ref>VehicleCommonDataType</ref> {
2390 readonly attribute boolean brakePedalDepressed;
2392 <ExtendedAttributeList>
2393 <ExtendedAttribute name="NoInterfaceObject">
2394 <webidl>NoInterfaceObject</webidl>
2395 </ExtendedAttribute>
2396 </ExtendedAttributeList>
2397 <InterfaceInheritance>
2398 <Name name="VehicleCommonDataType"/>
2399 </InterfaceInheritance>
2400 <Attribute readonly="readonly" name="brakePedalDepressed" id="::BrakeOperation::brakePedalDepressed">
2401 <webidl> readonly attribute boolean brakePedalDepressed;</webidl>
2402 <Type type="boolean"/>
2405 <Enum name="Button" id="::Button">
2406 <webidl>enum Button {
2411 "end_call",
2412 "media_play",
2413 "media_next",
2414 "media_previous",
2415 "media_pause",
2416 "voice_recognize",
2423 <EnumValue stringvalue="home">
2424 <webidl> "home</webidl>
2426 <EnumValue stringvalue="back">
2427 <webidl> "back</webidl>
2429 <EnumValue stringvalue="search">
2430 <webidl> "search</webidl>
2432 <EnumValue stringvalue="call">
2433 <webidl> "call</webidl>
2435 <EnumValue stringvalue="end_call">
2436 <webidl> "end_call</webidl>
2438 <EnumValue stringvalue="media_play">
2439 <webidl> "media_play</webidl>
2441 <EnumValue stringvalue="media_next">
2442 <webidl> "media_next</webidl>
2444 <EnumValue stringvalue="media_previous">
2445 <webidl> "media_previous</webidl>
2447 <EnumValue stringvalue="media_pause">
2448 <webidl> "media_pause</webidl>
2450 <EnumValue stringvalue="voice_recognize">
2451 <webidl> "voice_recognize</webidl>
2453 <EnumValue stringvalue="enter">
2454 <webidl> "enter</webidl>
2456 <EnumValue stringvalue="left">
2457 <webidl> "left</webidl>
2459 <EnumValue stringvalue="right">
2460 <webidl> "right</webidl>
2462 <EnumValue stringvalue="up">
2463 <webidl> "up</webidl>
2465 <EnumValue stringvalue="down">
2466 <webidl> "down</webidl>
2469 <Enum name="ButtonEventType" id="::ButtonEventType">
2470 <webidl>enum ButtonEventType {
2472 "long_press",
2475 <EnumValue stringvalue="press">
2476 <webidl> "press</webidl>
2478 <EnumValue stringvalue="long_press">
2479 <webidl> "long_press</webidl>
2481 <EnumValue stringvalue="release">
2482 <webidl> "release</webidl>
2485 <Interface name="VehicleButton" id="::VehicleButton">
2486 <webidl>[NoInterfaceObject]
2487 interface VehicleButton {
2488 readonly attribute <ref>Button</ref> button;
2489 readonly attribute <ref>ButtonEventType</ref> state;
2491 <ExtendedAttributeList>
2492 <ExtendedAttribute name="NoInterfaceObject">
2493 <webidl>NoInterfaceObject</webidl>
2494 </ExtendedAttribute>
2495 </ExtendedAttributeList>
2496 <Attribute readonly="readonly" name="button" id="::VehicleButton::button">
2497 <webidl> readonly attribute <ref>Button</ref> button;</webidl>
2498 <Type name="Button"/>
2500 <Attribute readonly="readonly" name="state" id="::VehicleButton::state">
2501 <webidl> readonly attribute <ref>ButtonEventType</ref> state;</webidl>
2502 <Type name="ButtonEventType"/>
2505 <Interface name="ButtonEvent" id="::ButtonEvent">
2506 <webidl>[NoInterfaceObject]
2507 interface ButtonEvent : <ref>VehicleCommonDataType</ref> {
2508 readonly attribute <ref>VehicleButton</ref>[] button;
2510 <ExtendedAttributeList>
2511 <ExtendedAttribute name="NoInterfaceObject">
2512 <webidl>NoInterfaceObject</webidl>
2513 </ExtendedAttribute>
2514 </ExtendedAttributeList>
2515 <InterfaceInheritance>
2516 <Name name="VehicleCommonDataType"/>
2517 </InterfaceInheritance>
2518 <Attribute readonly="readonly" name="button" id="::ButtonEvent::button">
2519 <webidl> readonly attribute <ref>VehicleButton</ref>[] button;</webidl>
2521 <Type name="VehicleButton"/>
2525 <Interface name="DrivingMode" id="::DrivingMode">
2526 <webidl>[NoInterfaceObject]
2527 interface DrivingMode : <ref>VehicleCommonDataType</ref> {
2528 readonly attribute boolean mode;
2530 <ExtendedAttributeList>
2531 <ExtendedAttribute name="NoInterfaceObject">
2532 <webidl>NoInterfaceObject</webidl>
2533 </ExtendedAttribute>
2534 </ExtendedAttributeList>
2535 <InterfaceInheritance>
2536 <Name name="VehicleCommonDataType"/>
2537 </InterfaceInheritance>
2538 <Attribute readonly="readonly" name="mode" id="::DrivingMode::mode">
2539 <webidl> readonly attribute boolean mode;</webidl>
2540 <Type type="boolean"/>
2543 <Interface name="DrivingMode" id="::DrivingMode">
2544 <webidl>[NoInterfaceObject]
2545 interface DrivingMode : <ref>VehicleCommonDataType</ref> {
2546 readonly attribute boolean mode;
2548 <ExtendedAttributeList>
2549 <ExtendedAttribute name="NoInterfaceObject">
2550 <webidl>NoInterfaceObject</webidl>
2551 </ExtendedAttribute>
2552 </ExtendedAttributeList>
2553 <InterfaceInheritance>
2554 <Name name="VehicleCommonDataType"/>
2555 </InterfaceInheritance>
2556 <Attribute readonly="readonly" name="mode" id="::DrivingMode::mode">
2557 <webidl> readonly attribute boolean mode;</webidl>
2558 <Type type="boolean"/>
2561 <Interface name="NightMode" id="::NightMode">
2562 <webidl>[NoInterfaceObject]
2563 interface NightMode : <ref>VehicleCommonDataType</ref> {
2564 readonly attribute boolean mode;
2566 <ExtendedAttributeList>
2567 <ExtendedAttribute name="NoInterfaceObject">
2568 <webidl>NoInterfaceObject</webidl>
2569 </ExtendedAttribute>
2570 </ExtendedAttributeList>
2571 <InterfaceInheritance>
2572 <Name name="VehicleCommonDataType"/>
2573 </InterfaceInheritance>
2574 <Attribute readonly="readonly" name="mode" id="::NightMode::mode">
2575 <webidl> readonly attribute boolean mode;</webidl>
2576 <Type type="boolean"/>
2579 <Interface name="Odometer" id="::Odometer">
2580 <webidl>[NoInterfaceObject]
2581 interface Odometer : <ref>VehicleCommonDataType</ref> {
2582 readonly attribute unsigned long? distanceSinceStart;
2583 readonly attribute unsigned long distanceTotal;
2585 <ExtendedAttributeList>
2586 <ExtendedAttribute name="NoInterfaceObject">
2587 <webidl>NoInterfaceObject</webidl>
2588 </ExtendedAttribute>
2589 </ExtendedAttributeList>
2590 <InterfaceInheritance>
2591 <Name name="VehicleCommonDataType"/>
2592 </InterfaceInheritance>
2593 <Attribute readonly="readonly" name="distanceSinceStart" id="::Odometer::distanceSinceStart">
2594 <webidl> readonly attribute unsigned long? distanceSinceStart;</webidl>
2595 <Type type="unsigned long" nullable="nullable"/>
2597 <Attribute readonly="readonly" name="distanceTotal" id="::Odometer::distanceTotal">
2598 <webidl> readonly attribute unsigned long distanceTotal;</webidl>
2599 <Type type="unsigned long"/>
2602 <Interface name="TransmissionOil" id="::TransmissionOil">
2603 <webidl>[NoInterfaceObject]
2604 interface TransmissionOil : <ref>VehicleCommonDataType</ref> {
2605 readonly attribute octet? wear;
2606 readonly attribute short? temperature;
2608 <ExtendedAttributeList>
2609 <ExtendedAttribute name="NoInterfaceObject">
2610 <webidl>NoInterfaceObject</webidl>
2611 </ExtendedAttribute>
2612 </ExtendedAttributeList>
2613 <InterfaceInheritance>
2614 <Name name="VehicleCommonDataType"/>
2615 </InterfaceInheritance>
2616 <Attribute readonly="readonly" name="wear" id="::TransmissionOil::wear">
2617 <webidl> readonly attribute octet? wear;</webidl>
2618 <Type type="octet" nullable="nullable"/>
2620 <Attribute readonly="readonly" name="temperature" id="::TransmissionOil::temperature">
2621 <webidl> readonly attribute short? temperature;</webidl>
2622 <Type type="short" nullable="nullable"/>
2625 <Interface name="TransmissionClutch" id="::TransmissionClutch">
2626 <webidl>[NoInterfaceObject]
2627 interface TransmissionClutch : <ref>VehicleCommonDataType</ref> {
2628 readonly attribute octet wear;
2630 <ExtendedAttributeList>
2631 <ExtendedAttribute name="NoInterfaceObject">
2632 <webidl>NoInterfaceObject</webidl>
2633 </ExtendedAttribute>
2634 </ExtendedAttributeList>
2635 <InterfaceInheritance>
2636 <Name name="VehicleCommonDataType"/>
2637 </InterfaceInheritance>
2638 <Attribute readonly="readonly" name="wear" id="::TransmissionClutch::wear">
2639 <webidl> readonly attribute octet wear;</webidl>
2640 <Type type="octet"/>
2643 <Interface name="BrakeMaintenance" id="::BrakeMaintenance">
2644 <webidl>[NoInterfaceObject]
2645 interface BrakeMaintenance : <ref>VehicleCommonDataType</ref> {
2646 readonly attribute octet? fluidLevel;
2647 readonly attribute boolean? fluidLevelLow;
2648 readonly attribute octet? padWear;
2649 readonly attribute boolean? brakesWorn;
2650 readonly attribute <ref>Zone</ref>? zone;
2652 <ExtendedAttributeList>
2653 <ExtendedAttribute name="NoInterfaceObject">
2654 <webidl>NoInterfaceObject</webidl>
2655 </ExtendedAttribute>
2656 </ExtendedAttributeList>
2657 <InterfaceInheritance>
2658 <Name name="VehicleCommonDataType"/>
2659 </InterfaceInheritance>
2660 <Attribute readonly="readonly" name="fluidLevel" id="::BrakeMaintenance::fluidLevel">
2661 <webidl> readonly attribute octet? fluidLevel;</webidl>
2662 <Type type="octet" nullable="nullable"/>
2664 <Attribute readonly="readonly" name="fluidLevelLow" id="::BrakeMaintenance::fluidLevelLow">
2665 <webidl> readonly attribute boolean? fluidLevelLow;</webidl>
2666 <Type type="boolean" nullable="nullable"/>
2668 <Attribute readonly="readonly" name="padWear" id="::BrakeMaintenance::padWear">
2669 <webidl> readonly attribute octet? padWear;</webidl>
2670 <Type type="octet" nullable="nullable"/>
2672 <Attribute readonly="readonly" name="brakesWorn" id="::BrakeMaintenance::brakesWorn">
2673 <webidl> readonly attribute boolean? brakesWorn;</webidl>
2674 <Type type="boolean" nullable="nullable"/>
2676 <Attribute readonly="readonly" name="zone" id="::BrakeMaintenance::zone">
2677 <webidl> readonly attribute <ref>Zone</ref>? zone;</webidl>
2678 <Type name="Zone" nullable="nullable"/>
2681 <Interface name="WasherFluid" id="::WasherFluid">
2682 <webidl>[NoInterfaceObject]
2683 interface WasherFluid : <ref>VehicleCommonDataType</ref> {
2684 readonly attribute unsigned short? level;
2685 readonly attribute boolean? levelLow;
2687 <ExtendedAttributeList>
2688 <ExtendedAttribute name="NoInterfaceObject">
2689 <webidl>NoInterfaceObject</webidl>
2690 </ExtendedAttribute>
2691 </ExtendedAttributeList>
2692 <InterfaceInheritance>
2693 <Name name="VehicleCommonDataType"/>
2694 </InterfaceInheritance>
2695 <Attribute readonly="readonly" name="level" id="::WasherFluid::level">
2696 <webidl> readonly attribute unsigned short? level;</webidl>
2697 <Type type="unsigned short" nullable="nullable"/>
2699 <Attribute readonly="readonly" name="levelLow" id="::WasherFluid::levelLow">
2700 <webidl> readonly attribute boolean? levelLow;</webidl>
2701 <Type type="boolean" nullable="nullable"/>
2704 <Interface name="MalfunctionIndicator" id="::MalfunctionIndicator">
2705 <webidl>[NoInterfaceObject]
2706 interface MalfunctionIndicator : <ref>VehicleCommonDataType</ref> {
2707 readonly attribute boolean on;
2709 <ExtendedAttributeList>
2710 <ExtendedAttribute name="NoInterfaceObject">
2711 <webidl>NoInterfaceObject</webidl>
2712 </ExtendedAttribute>
2713 </ExtendedAttributeList>
2714 <InterfaceInheritance>
2715 <Name name="VehicleCommonDataType"/>
2716 </InterfaceInheritance>
2717 <Attribute readonly="readonly" name="on" id="::MalfunctionIndicator::on">
2718 <webidl> readonly attribute boolean on;</webidl>
2719 <Type type="boolean"/>
2722 <Interface name="BatteryStatus" id="::BatteryStatus">
2723 <webidl>[NoInterfaceObject]
2724 interface BatteryStatus : <ref>VehicleCommonDataType</ref> {
2725 readonly attribute unsigned short? chargeLevel;
2726 readonly attribute unsigned short? voltage;
2727 readonly attribute unsigned short? current;
2728 readonly attribute <ref>Zone</ref>? zone;
2730 <ExtendedAttributeList>
2731 <ExtendedAttribute name="NoInterfaceObject">
2732 <webidl>NoInterfaceObject</webidl>
2733 </ExtendedAttribute>
2734 </ExtendedAttributeList>
2735 <InterfaceInheritance>
2736 <Name name="VehicleCommonDataType"/>
2737 </InterfaceInheritance>
2738 <Attribute readonly="readonly" name="chargeLevel" id="::BatteryStatus::chargeLevel">
2739 <webidl> readonly attribute unsigned short? chargeLevel;</webidl>
2740 <Type type="unsigned short" nullable="nullable"/>
2742 <Attribute readonly="readonly" name="voltage" id="::BatteryStatus::voltage">
2743 <webidl> readonly attribute unsigned short? voltage;</webidl>
2744 <Type type="unsigned short" nullable="nullable"/>
2746 <Attribute readonly="readonly" name="current" id="::BatteryStatus::current">
2747 <webidl> readonly attribute unsigned short? current;</webidl>
2748 <Type type="unsigned short" nullable="nullable"/>
2750 <Attribute readonly="readonly" name="zone" id="::BatteryStatus::zone">
2751 <webidl> readonly attribute <ref>Zone</ref>? zone;</webidl>
2752 <Type name="Zone" nullable="nullable"/>
2755 <Interface name="Tire" id="::Tire">
2756 <webidl>[NoInterfaceObject]
2757 interface Tire : <ref>VehicleCommonDataType</ref> {
2758 readonly attribute boolean? pressureLow;
2759 readonly attribute unsigned short? pressure;
2760 readonly attribute short? temperature;
2761 readonly attribute <ref>Zone</ref>? zone;
2763 <ExtendedAttributeList>
2764 <ExtendedAttribute name="NoInterfaceObject">
2765 <webidl>NoInterfaceObject</webidl>
2766 </ExtendedAttribute>
2767 </ExtendedAttributeList>
2768 <InterfaceInheritance>
2769 <Name name="VehicleCommonDataType"/>
2770 </InterfaceInheritance>
2771 <Attribute readonly="readonly" name="pressureLow" id="::Tire::pressureLow">
2772 <webidl> readonly attribute boolean? pressureLow;</webidl>
2773 <Type type="boolean" nullable="nullable"/>
2775 <Attribute readonly="readonly" name="pressure" id="::Tire::pressure">
2776 <webidl> readonly attribute unsigned short? pressure;</webidl>
2777 <Type type="unsigned short" nullable="nullable"/>
2779 <Attribute readonly="readonly" name="temperature" id="::Tire::temperature">
2780 <webidl> readonly attribute short? temperature;</webidl>
2781 <Type type="short" nullable="nullable"/>
2783 <Attribute readonly="readonly" name="zone" id="::Tire::zone">
2784 <webidl> readonly attribute <ref>Zone</ref>? zone;</webidl>
2785 <Type name="Zone" nullable="nullable"/>
2788 <Interface name="Diagnostic" id="::Diagnostic">
2789 <webidl>[NoInterfaceObject]
2790 interface Diagnostic : <ref>VehicleCommonDataType</ref> {
2791 readonly attribute unsigned long accumulatedEngineRuntime;
2792 readonly attribute unsigned long distanceWithMILOn;
2793 readonly attribute unsigned long distanceSinceCodeCleared;
2794 readonly attribute unsigned long timeRunMILOn;
2795 readonly attribute unsigned long timeTroubleCodeClear;
2797 <ExtendedAttributeList>
2798 <ExtendedAttribute name="NoInterfaceObject">
2799 <webidl>NoInterfaceObject</webidl>
2800 </ExtendedAttribute>
2801 </ExtendedAttributeList>
2802 <InterfaceInheritance>
2803 <Name name="VehicleCommonDataType"/>
2804 </InterfaceInheritance>
2805 <Attribute readonly="readonly" name="accumulatedEngineRuntime" id="::Diagnostic::accumulatedEngineRuntime">
2806 <webidl> readonly attribute unsigned long accumulatedEngineRuntime;</webidl>
2807 <Type type="unsigned long"/>
2809 <Attribute readonly="readonly" name="distanceWithMILOn" id="::Diagnostic::distanceWithMILOn">
2810 <webidl> readonly attribute unsigned long distanceWithMILOn;</webidl>
2811 <Type type="unsigned long"/>
2813 <Attribute readonly="readonly" name="distanceSinceCodeCleared" id="::Diagnostic::distanceSinceCodeCleared">
2814 <webidl> readonly attribute unsigned long distanceSinceCodeCleared;</webidl>
2815 <Type type="unsigned long"/>
2817 <Attribute readonly="readonly" name="timeRunMILOn" id="::Diagnostic::timeRunMILOn">
2818 <webidl> readonly attribute unsigned long timeRunMILOn;</webidl>
2819 <Type type="unsigned long"/>
2821 <Attribute readonly="readonly" name="timeTroubleCodeClear" id="::Diagnostic::timeTroubleCodeClear">
2822 <webidl> readonly attribute unsigned long timeTroubleCodeClear;</webidl>
2823 <Type type="unsigned long"/>
2826 <Interface name="LanguageConfiguration" id="::LanguageConfiguration">
2827 <webidl>[NoInterfaceObject]
2828 interface LanguageConfiguration : <ref>VehicleCommonDataType</ref> {
2829 attribute DOMString? language;
2831 <ExtendedAttributeList>
2832 <ExtendedAttribute name="NoInterfaceObject">
2833 <webidl>NoInterfaceObject</webidl>
2834 </ExtendedAttribute>
2835 </ExtendedAttributeList>
2836 <InterfaceInheritance>
2837 <Name name="VehicleCommonDataType"/>
2838 </InterfaceInheritance>
2839 <Attribute name="language" id="::LanguageConfiguration::language">
2840 <webidl> attribute DOMString? language;</webidl>
2841 <Type type="DOMString" nullable="nullable"/>
2844 <Interface name="UnitsOfMeasure" id="::UnitsOfMeasure">
2845 <webidl>[NoInterfaceObject]
2846 interface UnitsOfMeasure : <ref>VehicleCommonDataType</ref> {
2847 attribute boolean? isMKSSystem;
2848 attribute DOMString? unitsFuelVolume;
2849 attribute DOMString? unitsDistance;
2850 attribute DOMString? unitsSpeed;
2851 attribute DOMString? unitsFuelConsumption;
2853 <ExtendedAttributeList>
2854 <ExtendedAttribute name="NoInterfaceObject">
2855 <webidl>NoInterfaceObject</webidl>
2856 </ExtendedAttribute>
2857 </ExtendedAttributeList>
2858 <InterfaceInheritance>
2859 <Name name="VehicleCommonDataType"/>
2860 </InterfaceInheritance>
2861 <Attribute name="isMKSSystem" id="::UnitsOfMeasure::isMKSSystem">
2862 <webidl> attribute boolean? isMKSSystem;</webidl>
2863 <Type type="boolean" nullable="nullable"/>
2865 <Attribute name="unitsFuelVolume" id="::UnitsOfMeasure::unitsFuelVolume">
2866 <webidl> attribute DOMString? unitsFuelVolume;</webidl>
2867 <Type type="DOMString" nullable="nullable"/>
2869 <Attribute name="unitsDistance" id="::UnitsOfMeasure::unitsDistance">
2870 <webidl> attribute DOMString? unitsDistance;</webidl>
2871 <Type type="DOMString" nullable="nullable"/>
2873 <Attribute name="unitsSpeed" id="::UnitsOfMeasure::unitsSpeed">
2874 <webidl> attribute DOMString? unitsSpeed;</webidl>
2875 <Type type="DOMString" nullable="nullable"/>
2877 <Attribute name="unitsFuelConsumption" id="::UnitsOfMeasure::unitsFuelConsumption">
2878 <webidl> attribute DOMString? unitsFuelConsumption;</webidl>
2879 <Type type="DOMString" nullable="nullable"/>
2882 <Interface name="Mirror" id="::Mirror">
2883 <webidl>[NoInterfaceObject]
2884 interface Mirror : <ref>VehicleCommonDataType</ref> {
2885 attribute unsigned short? mirrorTilt;
2886 attribute unsigned short? mirrorPan;
2887 readonly attribute <ref>Zone</ref>? zone;
2889 <ExtendedAttributeList>
2890 <ExtendedAttribute name="NoInterfaceObject">
2891 <webidl>NoInterfaceObject</webidl>
2892 </ExtendedAttribute>
2893 </ExtendedAttributeList>
2894 <InterfaceInheritance>
2895 <Name name="VehicleCommonDataType"/>
2896 </InterfaceInheritance>
2897 <Attribute name="mirrorTilt" id="::Mirror::mirrorTilt">
2898 <webidl> attribute unsigned short? mirrorTilt;</webidl>
2899 <Type type="unsigned short" nullable="nullable"/>
2901 <Attribute name="mirrorPan" id="::Mirror::mirrorPan">
2902 <webidl> attribute unsigned short? mirrorPan;</webidl>
2903 <Type type="unsigned short" nullable="nullable"/>
2905 <Attribute readonly="readonly" name="zone" id="::Mirror::zone">
2906 <webidl> readonly attribute <ref>Zone</ref>? zone;</webidl>
2907 <Type name="Zone" nullable="nullable"/>
2910 <Interface name="SeatAdjustment" id="::SeatAdjustment">
2911 <webidl>[NoInterfaceObject]
2912 interface SeatAdjustment : <ref>VehicleCommonDataType</ref> {
2913 attribute unsigned short? reclineSeatBack;
2914 attribute unsigned short? seatSlide;
2915 attribute unsigned short? seatCushionHeight;
2916 attribute unsigned short? seatHeadrest;
2917 attribute unsigned short? seatBackCushion;
2918 attribute unsigned short? seatSideCushion;
2919 readonly attribute <ref>Zone</ref>? zone;
2921 <ExtendedAttributeList>
2922 <ExtendedAttribute name="NoInterfaceObject">
2923 <webidl>NoInterfaceObject</webidl>
2924 </ExtendedAttribute>
2925 </ExtendedAttributeList>
2926 <InterfaceInheritance>
2927 <Name name="VehicleCommonDataType"/>
2928 </InterfaceInheritance>
2929 <Attribute name="reclineSeatBack" id="::SeatAdjustment::reclineSeatBack">
2930 <webidl> attribute unsigned short? reclineSeatBack;</webidl>
2931 <Type type="unsigned short" nullable="nullable"/>
2933 <Attribute name="seatSlide" id="::SeatAdjustment::seatSlide">
2934 <webidl> attribute unsigned short? seatSlide;</webidl>
2935 <Type type="unsigned short" nullable="nullable"/>
2937 <Attribute name="seatCushionHeight" id="::SeatAdjustment::seatCushionHeight">
2938 <webidl> attribute unsigned short? seatCushionHeight;</webidl>
2939 <Type type="unsigned short" nullable="nullable"/>
2941 <Attribute name="seatHeadrest" id="::SeatAdjustment::seatHeadrest">
2942 <webidl> attribute unsigned short? seatHeadrest;</webidl>
2943 <Type type="unsigned short" nullable="nullable"/>
2945 <Attribute name="seatBackCushion" id="::SeatAdjustment::seatBackCushion">
2946 <webidl> attribute unsigned short? seatBackCushion;</webidl>
2947 <Type type="unsigned short" nullable="nullable"/>
2949 <Attribute name="seatSideCushion" id="::SeatAdjustment::seatSideCushion">
2950 <webidl> attribute unsigned short? seatSideCushion;</webidl>
2951 <Type type="unsigned short" nullable="nullable"/>
2953 <Attribute readonly="readonly" name="zone" id="::SeatAdjustment::zone">
2954 <webidl> readonly attribute <ref>Zone</ref>? zone;</webidl>
2955 <Type name="Zone" nullable="nullable"/>
2958 <Enum name="DriveModeEnum" id="::DriveModeEnum">
2959 <webidl>enum DriveModeEnum {
2960 "comfort",
2967 <EnumValue stringvalue="comfort">
2968 <webidl> "comfort</webidl>
2970 <EnumValue stringvalue="auto">
2971 <webidl> "auto</webidl>
2973 <EnumValue stringvalue="sport">
2974 <webidl> "sport</webidl>
2976 <EnumValue stringvalue="eco">
2977 <webidl> "eco</webidl>
2979 <EnumValue stringvalue="manual">
2980 <webidl> "manual</webidl>
2982 <EnumValue stringvalue="winter">
2983 <webidl> "winter</webidl>
2986 <Interface name="DriveMode" id="::DriveMode">
2987 <webidl>[NoInterfaceObject]
2988 interface DriveMode : <ref>VehicleCommonDataType</ref> {
2989 attribute <ref>DriveModeEnum</ref>? driveMode;
2991 <ExtendedAttributeList>
2992 <ExtendedAttribute name="NoInterfaceObject">
2993 <webidl>NoInterfaceObject</webidl>
2994 </ExtendedAttribute>
2995 </ExtendedAttributeList>
2996 <InterfaceInheritance>
2997 <Name name="VehicleCommonDataType"/>
2998 </InterfaceInheritance>
2999 <Attribute name="driveMode" id="::DriveMode::driveMode">
3000 <webidl> attribute <ref>DriveModeEnum</ref>? driveMode;</webidl>
3001 <Type name="DriveModeEnum" nullable="nullable"/>
3004 <Interface name="DashboardIllumination" id="::DashboardIllumination">
3005 <webidl>[NoInterfaceObject]
3006 interface DashboardIllumination : <ref>VehicleCommonDataType</ref> {
3007 attribute DOMString? dashboardIllumination;
3009 <ExtendedAttributeList>
3010 <ExtendedAttribute name="NoInterfaceObject">
3011 <webidl>NoInterfaceObject</webidl>
3012 </ExtendedAttribute>
3013 </ExtendedAttributeList>
3014 <InterfaceInheritance>
3015 <Name name="VehicleCommonDataType"/>
3016 </InterfaceInheritance>
3017 <Attribute name="dashboardIllumination" id="::DashboardIllumination::dashboardIllumination">
3018 <webidl> attribute DOMString? dashboardIllumination;</webidl>
3019 <Type type="DOMString" nullable="nullable"/>
3022 <Interface name="VehicleSound" id="::VehicleSound">
3023 <webidl>[NoInterfaceObject]
3024 interface VehicleSound : <ref>VehicleCommonDataType</ref> {
3025 attribute boolean activeNoiseControlMode;
3026 attribute DOMString? engineSoundEnhancementMode;
3028 <ExtendedAttributeList>
3029 <ExtendedAttribute name="NoInterfaceObject">
3030 <webidl>NoInterfaceObject</webidl>
3031 </ExtendedAttribute>
3032 </ExtendedAttributeList>
3033 <InterfaceInheritance>
3034 <Name name="VehicleCommonDataType"/>
3035 </InterfaceInheritance>
3036 <Attribute name="activeNoiseControlMode" id="::VehicleSound::activeNoiseControlMode">
3037 <webidl> attribute boolean activeNoiseControlMode;</webidl>
3038 <Type type="boolean"/>
3040 <Attribute name="engineSoundEnhancementMode" id="::VehicleSound::engineSoundEnhancementMode">
3041 <webidl> attribute DOMString? engineSoundEnhancementMode;</webidl>
3042 <Type type="DOMString" nullable="nullable"/>
3045 <Interface name="AntilockBrakingSystem" id="::AntilockBrakingSystem">
3046 <webidl>[NoInterfaceObject]
3047 interface AntilockBrakingSystem : <ref>VehicleCommonDataType</ref> {
3048 readonly attribute boolean enabled;
3049 readonly attribute boolean engaged;
3051 <ExtendedAttributeList>
3052 <ExtendedAttribute name="NoInterfaceObject">
3053 <webidl>NoInterfaceObject</webidl>
3054 </ExtendedAttribute>
3055 </ExtendedAttributeList>
3056 <InterfaceInheritance>
3057 <Name name="VehicleCommonDataType"/>
3058 </InterfaceInheritance>
3059 <Attribute readonly="readonly" name="enabled" id="::AntilockBrakingSystem::enabled">
3060 <webidl> readonly attribute boolean enabled;</webidl>
3061 <Type type="boolean"/>
3063 <Attribute readonly="readonly" name="engaged" id="::AntilockBrakingSystem::engaged">
3064 <webidl> readonly attribute boolean engaged;</webidl>
3065 <Type type="boolean"/>
3068 <Interface name="TractionControlSystem" id="::TractionControlSystem">
3069 <webidl>[NoInterfaceObject]
3070 interface TractionControlSystem : <ref>VehicleCommonDataType</ref> {
3071 readonly attribute boolean enabled;
3072 readonly attribute boolean engaged;
3074 <ExtendedAttributeList>
3075 <ExtendedAttribute name="NoInterfaceObject">
3076 <webidl>NoInterfaceObject</webidl>
3077 </ExtendedAttribute>
3078 </ExtendedAttributeList>
3079 <InterfaceInheritance>
3080 <Name name="VehicleCommonDataType"/>
3081 </InterfaceInheritance>
3082 <Attribute readonly="readonly" name="enabled" id="::TractionControlSystem::enabled">
3083 <webidl> readonly attribute boolean enabled;</webidl>
3084 <Type type="boolean"/>
3086 <Attribute readonly="readonly" name="engaged" id="::TractionControlSystem::engaged">
3087 <webidl> readonly attribute boolean engaged;</webidl>
3088 <Type type="boolean"/>
3091 <Interface name="ElectronicStabilityControl" id="::ElectronicStabilityControl">
3092 <webidl>[NoInterfaceObject]
3093 interface ElectronicStabilityControl : <ref>VehicleCommonDataType</ref> {
3094 readonly attribute boolean enabled;
3095 readonly attribute boolean engaged;
3097 <ExtendedAttributeList>
3098 <ExtendedAttribute name="NoInterfaceObject">
3099 <webidl>NoInterfaceObject</webidl>
3100 </ExtendedAttribute>
3101 </ExtendedAttributeList>
3102 <InterfaceInheritance>
3103 <Name name="VehicleCommonDataType"/>
3104 </InterfaceInheritance>
3105 <Attribute readonly="readonly" name="enabled" id="::ElectronicStabilityControl::enabled">
3106 <webidl> readonly attribute boolean enabled;</webidl>
3107 <Type type="boolean"/>
3109 <Attribute readonly="readonly" name="engaged" id="::ElectronicStabilityControl::engaged">
3110 <webidl> readonly attribute boolean engaged;</webidl>
3111 <Type type="boolean"/>
3114 <Interface name="TopSpeedLimit" id="::TopSpeedLimit">
3115 <webidl>[NoInterfaceObject]
3116 interface TopSpeedLimit : <ref>VehicleCommonDataType</ref> {
3117 readonly attribute unsigned short speed;
3119 <ExtendedAttributeList>
3120 <ExtendedAttribute name="NoInterfaceObject">
3121 <webidl>NoInterfaceObject</webidl>
3122 </ExtendedAttribute>
3123 </ExtendedAttributeList>
3124 <InterfaceInheritance>
3125 <Name name="VehicleCommonDataType"/>
3126 </InterfaceInheritance>
3127 <Attribute readonly="readonly" name="speed" id="::TopSpeedLimit::speed">
3128 <webidl> readonly attribute unsigned short speed;</webidl>
3129 <Type type="unsigned short"/>
3132 <Interface name="AirbagStatus" id="::AirbagStatus">
3133 <webidl>[NoInterfaceObject]
3134 interface AirbagStatus : <ref>VehicleCommonDataType</ref> {
3135 readonly attribute boolean activated;
3136 readonly attribute boolean deployed;
3137 readonly attribute <ref>Zone</ref>? zone;
3139 <ExtendedAttributeList>
3140 <ExtendedAttribute name="NoInterfaceObject">
3141 <webidl>NoInterfaceObject</webidl>
3142 </ExtendedAttribute>
3143 </ExtendedAttributeList>
3144 <InterfaceInheritance>
3145 <Name name="VehicleCommonDataType"/>
3146 </InterfaceInheritance>
3147 <Attribute readonly="readonly" name="activated" id="::AirbagStatus::activated">
3148 <webidl> readonly attribute boolean activated;</webidl>
3149 <Type type="boolean"/>
3151 <Attribute readonly="readonly" name="deployed" id="::AirbagStatus::deployed">
3152 <webidl> readonly attribute boolean deployed;</webidl>
3153 <Type type="boolean"/>
3155 <Attribute readonly="readonly" name="zone" id="::AirbagStatus::zone">
3156 <webidl> readonly attribute <ref>Zone</ref>? zone;</webidl>
3157 <Type name="Zone" nullable="nullable"/>
3160 <Enum name="DoorOpenStatus" id="::DoorOpenStatus">
3161 <webidl>enum DoorOpenStatus {
3166 <EnumValue stringvalue="open">
3167 <webidl> "open</webidl>
3169 <EnumValue stringvalue="ajar">
3170 <webidl> "ajar</webidl>
3172 <EnumValue stringvalue="closed">
3173 <webidl> "closed</webidl>
3176 <Interface name="Door" id="::Door">
3177 <webidl>[NoInterfaceObject]
3178 interface Door : <ref>VehicleCommonDataType</ref> {
3179 readonly attribute <ref>DoorOpenStatus</ref> status;
3180 attribute boolean lock;
3181 readonly attribute <ref>Zone</ref>? zone;
3183 <ExtendedAttributeList>
3184 <ExtendedAttribute name="NoInterfaceObject">
3185 <webidl>NoInterfaceObject</webidl>
3186 </ExtendedAttribute>
3187 </ExtendedAttributeList>
3188 <InterfaceInheritance>
3189 <Name name="VehicleCommonDataType"/>
3190 </InterfaceInheritance>
3191 <Attribute readonly="readonly" name="status" id="::Door::status">
3192 <webidl> readonly attribute <ref>DoorOpenStatus</ref> status;</webidl>
3193 <Type name="DoorOpenStatus"/>
3195 <Attribute name="lock" id="::Door::lock">
3196 <webidl> attribute boolean lock;</webidl>
3197 <Type type="boolean"/>
3199 <Attribute readonly="readonly" name="zone" id="::Door::zone">
3200 <webidl> readonly attribute <ref>Zone</ref>? zone;</webidl>
3201 <Type name="Zone" nullable="nullable"/>
3204 <Interface name="ChildSafetyLock" id="::ChildSafetyLock">
3205 <webidl>[NoInterfaceObject]
3206 interface ChildSafetyLock : <ref>VehicleCommonDataType</ref> {
3207 attribute boolean lock;
3208 readonly attribute <ref>Zone</ref>? zone;
3210 <ExtendedAttributeList>
3211 <ExtendedAttribute name="NoInterfaceObject">
3212 <webidl>NoInterfaceObject</webidl>
3213 </ExtendedAttribute>
3214 </ExtendedAttributeList>
3215 <InterfaceInheritance>
3216 <Name name="VehicleCommonDataType"/>
3217 </InterfaceInheritance>
3218 <Attribute name="lock" id="::ChildSafetyLock::lock">
3219 <webidl> attribute boolean lock;</webidl>
3220 <Type type="boolean"/>
3222 <Attribute readonly="readonly" name="zone" id="::ChildSafetyLock::zone">
3223 <webidl> readonly attribute <ref>Zone</ref>? zone;</webidl>
3224 <Type name="Zone" nullable="nullable"/>
3227 <Enum name="OccupantStatus" id="::OccupantStatus">
3228 <webidl>enum OccupantStatus {
3233 <EnumValue stringvalue="adult">
3234 <webidl> "adult</webidl>
3236 <EnumValue stringvalue="child">
3237 <webidl> "child</webidl>
3239 <EnumValue stringvalue="vacant">
3240 <webidl> "vacant</webidl>
3243 <Enum name="IdentificationType" id="::IdentificationType">
3244 <webidl>enum IdentificationType {
3247 "Bluetooth",
3249 "fingerprint",
3253 <EnumValue stringvalue="pin">
3254 <webidl> "pin</webidl>
3256 <EnumValue stringvalue="keyfob">
3257 <webidl> "keyfob</webidl>
3259 <EnumValue stringvalue="Bluetooth">
3260 <webidl> "Bluetooth</webidl>
3262 <EnumValue stringvalue="NFC">
3263 <webidl> "NFC</webidl>
3265 <EnumValue stringvalue="fingerprint">
3266 <webidl> "fingerprint</webidl>
3268 <EnumValue stringvalue="camera">
3269 <webidl> "camera</webidl>
3271 <EnumValue stringvalue="voice">
3272 <webidl> "voice</webidl>
3275 <Interface name="Seat" id="::Seat">
3276 <webidl>[NoInterfaceObject]
3277 interface Seat : <ref>VehicleCommonDataType</ref> {
3278 readonly attribute <ref>OccupantStatus</ref> occupant;
3279 readonly attribute boolean seatbelt;
3280 readonly attribute DOMString? occupantName;
3281 readonly attribute <ref>IdentificationType</ref> identificationType;
3282 readonly attribute <ref>Zone</ref>? zone;
3284 <ExtendedAttributeList>
3285 <ExtendedAttribute name="NoInterfaceObject">
3286 <webidl>NoInterfaceObject</webidl>
3287 </ExtendedAttribute>
3288 </ExtendedAttributeList>
3289 <InterfaceInheritance>
3290 <Name name="VehicleCommonDataType"/>
3291 </InterfaceInheritance>
3292 <Attribute readonly="readonly" name="occupant" id="::Seat::occupant">
3293 <webidl> readonly attribute <ref>OccupantStatus</ref> occupant;</webidl>
3294 <Type name="OccupantStatus"/>
3296 <Attribute readonly="readonly" name="seatbelt" id="::Seat::seatbelt">
3297 <webidl> readonly attribute boolean seatbelt;</webidl>
3298 <Type type="boolean"/>
3300 <Attribute readonly="readonly" name="occupantName" id="::Seat::occupantName">
3301 <webidl> readonly attribute DOMString? occupantName;</webidl>
3302 <Type type="DOMString" nullable="nullable"/>
3304 <Attribute readonly="readonly" name="identificationType" id="::Seat::identificationType">
3305 <webidl> readonly attribute <ref>IdentificationType</ref> identificationType;</webidl>
3306 <Type name="IdentificationType"/>
3308 <Attribute readonly="readonly" name="zone" id="::Seat::zone">
3309 <webidl> readonly attribute <ref>Zone</ref>? zone;</webidl>
3310 <Type name="Zone" nullable="nullable"/>
3313 <Interface name="Temperature" id="::Temperature">
3314 <webidl>[NoInterfaceObject]
3315 interface Temperature : <ref>VehicleCommonDataType</ref> {
3316 readonly attribute float interiorTemperature;
3317 readonly attribute float exteriorTemperature;
3319 <ExtendedAttributeList>
3320 <ExtendedAttribute name="NoInterfaceObject">
3321 <webidl>NoInterfaceObject</webidl>
3322 </ExtendedAttribute>
3323 </ExtendedAttributeList>
3324 <InterfaceInheritance>
3325 <Name name="VehicleCommonDataType"/>
3326 </InterfaceInheritance>
3327 <Attribute readonly="readonly" name="interiorTemperature" id="::Temperature::interiorTemperature">
3328 <webidl> readonly attribute float interiorTemperature;</webidl>
3329 <Type type="float"/>
3331 <Attribute readonly="readonly" name="exteriorTemperature" id="::Temperature::exteriorTemperature">
3332 <webidl> readonly attribute float exteriorTemperature;</webidl>
3333 <Type type="float"/>
3336 <Interface name="RainSensor" id="::RainSensor">
3337 <webidl>[NoInterfaceObject]
3338 interface RainSensor : <ref>VehicleCommonDataType</ref> {
3339 readonly attribute unsigned short rain;
3340 readonly attribute <ref>Zone</ref>? zone;
3342 <ExtendedAttributeList>
3343 <ExtendedAttribute name="NoInterfaceObject">
3344 <webidl>NoInterfaceObject</webidl>
3345 </ExtendedAttribute>
3346 </ExtendedAttributeList>
3347 <InterfaceInheritance>
3348 <Name name="VehicleCommonDataType"/>
3349 </InterfaceInheritance>
3350 <Attribute readonly="readonly" name="rain" id="::RainSensor::rain">
3351 <webidl> readonly attribute unsigned short rain;</webidl>
3352 <Type type="unsigned short"/>
3354 <Attribute readonly="readonly" name="zone" id="::RainSensor::zone">
3355 <webidl> readonly attribute <ref>Zone</ref>? zone;</webidl>
3356 <Type name="Zone" nullable="nullable"/>
3359 <Interface name="WiperStatus" id="::WiperStatus">
3360 <webidl>[NoInterfaceObject]
3361 interface WiperStatus : <ref>VehicleCommonDataType</ref> {
3362 readonly attribute unsigned short wiperSpeed;
3363 readonly attribute <ref>Zone</ref>? zone;
3365 <ExtendedAttributeList>
3366 <ExtendedAttribute name="NoInterfaceObject">
3367 <webidl>NoInterfaceObject</webidl>
3368 </ExtendedAttribute>
3369 </ExtendedAttributeList>
3370 <InterfaceInheritance>
3371 <Name name="VehicleCommonDataType"/>
3372 </InterfaceInheritance>
3373 <Attribute readonly="readonly" name="wiperSpeed" id="::WiperStatus::wiperSpeed">
3374 <webidl> readonly attribute unsigned short wiperSpeed;</webidl>
3375 <Type type="unsigned short"/>
3377 <Attribute readonly="readonly" name="zone" id="::WiperStatus::zone">
3378 <webidl> readonly attribute <ref>Zone</ref>? zone;</webidl>
3379 <Type name="Zone" nullable="nullable"/>
3382 <Enum name="WiperControl" id="::WiperControl">
3383 <webidl>enum WiperControl {
3386 "slowest",
3390 "fastest",
3393 <EnumValue stringvalue="off">
3394 <webidl> "off</webidl>
3396 <EnumValue stringvalue="once">
3397 <webidl> "once</webidl>
3399 <EnumValue stringvalue="slowest">
3400 <webidl> "slowest</webidl>
3402 <EnumValue stringvalue="slow">
3403 <webidl> "slow</webidl>
3405 <EnumValue stringvalue="middle">
3406 <webidl> "middle</webidl>
3408 <EnumValue stringvalue="fast">
3409 <webidl> "fast</webidl>
3411 <EnumValue stringvalue="fastest">
3412 <webidl> "fastest</webidl>
3414 <EnumValue stringvalue="auto">
3415 <webidl> "auto</webidl>
3418 <Interface name="WiperSetting" id="::WiperSetting">
3419 <webidl>[NoInterfaceObject]
3420 interface WiperSetting : <ref>VehicleCommonDataType</ref> {
3421 attribute <ref>WiperControl</ref> wiperControl;
3422 readonly attribute <ref>Zone</ref>? zone;
3424 <ExtendedAttributeList>
3425 <ExtendedAttribute name="NoInterfaceObject">
3426 <webidl>NoInterfaceObject</webidl>
3427 </ExtendedAttribute>
3428 </ExtendedAttributeList>
3429 <InterfaceInheritance>
3430 <Name name="VehicleCommonDataType"/>
3431 </InterfaceInheritance>
3432 <Attribute name="wiperControl" id="::WiperSetting::wiperControl">
3433 <webidl> attribute <ref>WiperControl</ref> wiperControl;</webidl>
3434 <Type name="WiperControl"/>
3436 <Attribute readonly="readonly" name="zone" id="::WiperSetting::zone">
3437 <webidl> readonly attribute <ref>Zone</ref>? zone;</webidl>
3438 <Type name="Zone" nullable="nullable"/>
3441 <Interface name="Defrost" id="::Defrost">
3442 <webidl>[NoInterfaceObject]
3443 interface Defrost : <ref>VehicleCommonDataType</ref> {
3444 attribute boolean? defrostWindow;
3445 attribute boolean? defrostMirrors;
3446 readonly attribute <ref>Zone</ref>? zone;
3448 <ExtendedAttributeList>
3449 <ExtendedAttribute name="NoInterfaceObject">
3450 <webidl>NoInterfaceObject</webidl>
3451 </ExtendedAttribute>
3452 </ExtendedAttributeList>
3453 <InterfaceInheritance>
3454 <Name name="VehicleCommonDataType"/>
3455 </InterfaceInheritance>
3456 <Attribute name="defrostWindow" id="::Defrost::defrostWindow">
3457 <webidl> attribute boolean? defrostWindow;</webidl>
3458 <Type type="boolean" nullable="nullable"/>
3460 <Attribute name="defrostMirrors" id="::Defrost::defrostMirrors">
3461 <webidl> attribute boolean? defrostMirrors;</webidl>
3462 <Type type="boolean" nullable="nullable"/>
3464 <Attribute readonly="readonly" name="zone" id="::Defrost::zone">
3465 <webidl> readonly attribute <ref>Zone</ref>? zone;</webidl>
3466 <Type name="Zone" nullable="nullable"/>
3469 <Interface name="Sunroof" id="::Sunroof">
3470 <webidl>[NoInterfaceObject]
3471 interface Sunroof : <ref>VehicleCommonDataType</ref> {
3472 attribute unsigned short openness;
3473 attribute unsigned short tilt;
3474 readonly attribute <ref>Zone</ref>? zone;
3476 <ExtendedAttributeList>
3477 <ExtendedAttribute name="NoInterfaceObject">
3478 <webidl>NoInterfaceObject</webidl>
3479 </ExtendedAttribute>
3480 </ExtendedAttributeList>
3481 <InterfaceInheritance>
3482 <Name name="VehicleCommonDataType"/>
3483 </InterfaceInheritance>
3484 <Attribute name="openness" id="::Sunroof::openness">
3485 <webidl> attribute unsigned short openness;</webidl>
3486 <Type type="unsigned short"/>
3488 <Attribute name="tilt" id="::Sunroof::tilt">
3489 <webidl> attribute unsigned short tilt;</webidl>
3490 <Type type="unsigned short"/>
3492 <Attribute readonly="readonly" name="zone" id="::Sunroof::zone">
3493 <webidl> readonly attribute <ref>Zone</ref>? zone;</webidl>
3494 <Type name="Zone" nullable="nullable"/>
3497 <Enum name="ConvertibleRoofStatus" id="::ConvertibleRoofStatus">
3498 <webidl>enum ConvertibleRoofStatus {
3500 "closing",
3501 "opening",
3504 <EnumValue stringvalue="closed">
3505 <webidl> "closed</webidl>
3507 <EnumValue stringvalue="closing">
3508 <webidl> "closing</webidl>
3510 <EnumValue stringvalue="opening">
3511 <webidl> "opening</webidl>
3513 <EnumValue stringvalue="opened">
3514 <webidl> "opened</webidl>
3517 <Interface name="ConvertibleRoof" id="::ConvertibleRoof">
3518 <webidl>[NoInterfaceObject]
3519 interface ConvertibleRoof : <ref>VehicleCommonDataType</ref> {
3520 attribute <ref>ConvertibleRoofStatus</ref> status;
3522 <ExtendedAttributeList>
3523 <ExtendedAttribute name="NoInterfaceObject">
3524 <webidl>NoInterfaceObject</webidl>
3525 </ExtendedAttribute>
3526 </ExtendedAttributeList>
3527 <InterfaceInheritance>
3528 <Name name="VehicleCommonDataType"/>
3529 </InterfaceInheritance>
3530 <Attribute name="status" id="::ConvertibleRoof::status">
3531 <webidl> attribute <ref>ConvertibleRoofStatus</ref> status;</webidl>
3532 <Type name="ConvertibleRoofStatus"/>
3535 <Interface name="SideWindow" id="::SideWindow">
3536 <webidl>[NoInterfaceObject]
3537 interface SideWindow : <ref>VehicleCommonDataType</ref> {
3538 attribute boolean? lock;
3539 attribute unsigned short? openness;
3540 readonly attribute <ref>Zone</ref>? zone;
3542 <ExtendedAttributeList>
3543 <ExtendedAttribute name="NoInterfaceObject">
3544 <webidl>NoInterfaceObject</webidl>
3545 </ExtendedAttribute>
3546 </ExtendedAttributeList>
3547 <InterfaceInheritance>
3548 <Name name="VehicleCommonDataType"/>
3549 </InterfaceInheritance>
3550 <Attribute name="lock" id="::SideWindow::lock">
3551 <webidl> attribute boolean? lock;</webidl>
3552 <Type type="boolean" nullable="nullable"/>
3554 <Attribute name="openness" id="::SideWindow::openness">
3555 <webidl> attribute unsigned short? openness;</webidl>
3556 <Type type="unsigned short" nullable="nullable"/>
3558 <Attribute readonly="readonly" name="zone" id="::SideWindow::zone">
3559 <webidl> readonly attribute <ref>Zone</ref>? zone;</webidl>
3560 <Type name="Zone" nullable="nullable"/>
3563 <Enum name="AirflowDirection" id="::AirflowDirection">
3564 <webidl>enum AirflowDirection {
3565 "frontpanel",
3566 "floorduct",
3567 "bilevel",
3568 "defrostfloor"
3570 <EnumValue stringvalue="frontpanel">
3571 <webidl> "frontpanel</webidl>
3573 <EnumValue stringvalue="floorduct">
3574 <webidl> "floorduct</webidl>
3576 <EnumValue stringvalue="bilevel">
3577 <webidl> "bilevel</webidl>
3579 <EnumValue stringvalue="defrostfloor">
3580 <webidl> "defrostfloor</webidl>
3583 <Interface name="ClimateControl" id="::ClimateControl">
3584 <webidl>[NoInterfaceObject]
3585 interface ClimateControl : <ref>VehicleCommonDataType</ref> {
3586 attribute <ref>AirflowDirection</ref> airflowDirection;
3587 attribute unsigned short fanSpeedLevel;
3588 attribute short? targetTemperature;
3589 attribute boolean airConditioning;
3590 attribute boolean heater;
3591 attribute unsigned short? seatHeater;
3592 attribute unsigned short? seatCooler;
3593 attribute boolean airRecirculation;
3594 attribute unsigned short? steeringWheelHeater;
3595 readonly attribute <ref>Zone</ref>? zone;
3597 <ExtendedAttributeList>
3598 <ExtendedAttribute name="NoInterfaceObject">
3599 <webidl>NoInterfaceObject</webidl>
3600 </ExtendedAttribute>
3601 </ExtendedAttributeList>
3602 <InterfaceInheritance>
3603 <Name name="VehicleCommonDataType"/>
3604 </InterfaceInheritance>
3605 <Attribute name="airflowDirection" id="::ClimateControl::airflowDirection">
3606 <webidl> attribute <ref>AirflowDirection</ref> airflowDirection;</webidl>
3607 <Type name="AirflowDirection"/>
3609 <Attribute name="fanSpeedLevel" id="::ClimateControl::fanSpeedLevel">
3610 <webidl> attribute unsigned short fanSpeedLevel;</webidl>
3611 <Type type="unsigned short"/>
3613 <Attribute name="targetTemperature" id="::ClimateControl::targetTemperature">
3614 <webidl> attribute short? targetTemperature;</webidl>
3615 <Type type="short" nullable="nullable"/>
3617 <Attribute name="airConditioning" id="::ClimateControl::airConditioning">
3618 <webidl> attribute boolean airConditioning;</webidl>
3619 <Type type="boolean"/>
3621 <Attribute name="heater" id="::ClimateControl::heater">
3622 <webidl> attribute boolean heater;</webidl>
3623 <Type type="boolean"/>
3625 <Attribute name="seatHeater" id="::ClimateControl::seatHeater">
3626 <webidl> attribute unsigned short? seatHeater;</webidl>
3627 <Type type="unsigned short" nullable="nullable"/>
3629 <Attribute name="seatCooler" id="::ClimateControl::seatCooler">
3630 <webidl> attribute unsigned short? seatCooler;</webidl>
3631 <Type type="unsigned short" nullable="nullable"/>
3633 <Attribute name="airRecirculation" id="::ClimateControl::airRecirculation">
3634 <webidl> attribute boolean airRecirculation;</webidl>
3635 <Type type="boolean"/>
3637 <Attribute name="steeringWheelHeater" id="::ClimateControl::steeringWheelHeater">
3638 <webidl> attribute unsigned short? steeringWheelHeater;</webidl>
3639 <Type type="unsigned short" nullable="nullable"/>
3641 <Attribute readonly="readonly" name="zone" id="::ClimateControl::zone">
3642 <webidl> readonly attribute <ref>Zone</ref>? zone;</webidl>
3643 <Type name="Zone" nullable="nullable"/>
3646 <Interface name="AtmosphericPressure" id="::AtmosphericPressure">
3647 <webidl>[NoInterfaceObject]
3648 interface AtmosphericPressure : <ref>VehicleCommonDataType</ref> {
3649 readonly attribute unsigned short pressure;
3651 <ExtendedAttributeList>
3652 <ExtendedAttribute name="NoInterfaceObject">
3653 <webidl>NoInterfaceObject</webidl>
3654 </ExtendedAttribute>
3655 </ExtendedAttributeList>
3656 <InterfaceInheritance>
3657 <Name name="VehicleCommonDataType"/>
3658 </InterfaceInheritance>
3659 <Attribute readonly="readonly" name="pressure" id="::AtmosphericPressure::pressure">
3660 <webidl> readonly attribute unsigned short pressure;</webidl>
3661 <Type type="unsigned short"/>
3664 <Enum name="LaneDepartureStatus" id="::LaneDepartureStatus">
3665 <webidl>enum LaneDepartureStatus {
3670 <EnumValue stringvalue="off">
3671 <webidl> "off</webidl>
3673 <EnumValue stringvalue="pause">
3674 <webidl> "pause</webidl>
3676 <EnumValue stringvalue="running">
3677 <webidl> "running</webidl>
3680 <Interface name="LaneDepartureDetection" id="::LaneDepartureDetection">
3681 <webidl>[NoInterfaceObject]
3682 interface LaneDepartureDetection : <ref>VehicleCommonDataType</ref> {
3683 readonly attribute <ref>LaneDepartureStatus</ref> status;
3685 <ExtendedAttributeList>
3686 <ExtendedAttribute name="NoInterfaceObject">
3687 <webidl>NoInterfaceObject</webidl>
3688 </ExtendedAttribute>
3689 </ExtendedAttributeList>
3690 <InterfaceInheritance>
3691 <Name name="VehicleCommonDataType"/>
3692 </InterfaceInheritance>
3693 <Attribute readonly="readonly" name="status" id="::LaneDepartureDetection::status">
3694 <webidl> readonly attribute <ref>LaneDepartureStatus</ref> status;</webidl>
3695 <Type name="LaneDepartureStatus"/>
3698 <Enum name="AlarmStatus" id="::AlarmStatus">
3699 <webidl>enum AlarmStatus {
3700 "disarmed",
3701 "preArmed",
3705 <EnumValue stringvalue="disarmed">
3706 <webidl> "disarmed</webidl>
3708 <EnumValue stringvalue="preArmed">
3709 <webidl> "preArmed</webidl>
3711 <EnumValue stringvalue="armed">
3712 <webidl> "armed</webidl>
3714 <EnumValue stringvalue="alarmed">
3715 <webidl> "alarmed</webidl>
3718 <Interface name="Alarm" id="::Alarm">
3719 <webidl>[NoInterfaceObject]
3720 interface Alarm : <ref>VehicleCommonDataType</ref> {
3721 attribute <ref>AlarmStatus</ref> status;
3723 <ExtendedAttributeList>
3724 <ExtendedAttribute name="NoInterfaceObject">
3725 <webidl>NoInterfaceObject</webidl>
3726 </ExtendedAttribute>
3727 </ExtendedAttributeList>
3728 <InterfaceInheritance>
3729 <Name name="VehicleCommonDataType"/>
3730 </InterfaceInheritance>
3731 <Attribute name="status" id="::Alarm::status">
3732 <webidl> attribute <ref>AlarmStatus</ref> status;</webidl>
3733 <Type name="AlarmStatus"/>
3736 <Enum name="ParkingBrakeStatus" id="::ParkingBrakeStatus">
3737 <webidl>enum ParkingBrakeStatus {
3738 "inactive",
3742 <EnumValue stringvalue="inactive">
3743 <webidl> "inactive</webidl>
3745 <EnumValue stringvalue="active">
3746 <webidl> "active</webidl>
3748 <EnumValue stringvalue="error">
3749 <webidl> "error</webidl>
3752 <Interface name="ParkingBrake" id="::ParkingBrake">
3753 <webidl>[NoInterfaceObject]
3754 interface ParkingBrake : <ref>VehicleCommonDataType</ref> {
3755 readonly attribute <ref>ParkingBrakeStatus</ref> status;
3757 <ExtendedAttributeList>
3758 <ExtendedAttribute name="NoInterfaceObject">
3759 <webidl>NoInterfaceObject</webidl>
3760 </ExtendedAttribute>
3761 </ExtendedAttributeList>
3762 <InterfaceInheritance>
3763 <Name name="VehicleCommonDataType"/>
3764 </InterfaceInheritance>
3765 <Attribute readonly="readonly" name="status" id="::ParkingBrake::status">
3766 <webidl> readonly attribute <ref>ParkingBrakeStatus</ref> status;</webidl>
3767 <Type name="ParkingBrakeStatus"/>
3770 <Interface name="ParkingLights" id="::ParkingLights">
3771 <webidl>[NoInterfaceObject]
3772 interface ParkingLights : <ref>VehicleCommonDataType</ref> {
3773 readonly attribute boolean status;
3774 attribute boolean setting;
3776 <ExtendedAttributeList>
3777 <ExtendedAttribute name="NoInterfaceObject">
3778 <webidl>NoInterfaceObject</webidl>
3779 </ExtendedAttribute>
3780 </ExtendedAttributeList>
3781 <InterfaceInheritance>
3782 <Name name="VehicleCommonDataType"/>
3783 </InterfaceInheritance>
3784 <Attribute readonly="readonly" name="status" id="::ParkingLights::status">
3785 <webidl> readonly attribute boolean status;</webidl>
3786 <Type type="boolean"/>
3788 <Attribute name="setting" id="::ParkingLights::setting">
3789 <webidl> attribute boolean setting;</webidl>
3790 <Type type="boolean"/>
3794 <Module name="MediaServer" id="::MediaServer">
3795 <webidl> module MediaServer {
3796 [NoInterfaceObject] interface MediaServerManagerObject {
3797 readonly attribute <ref>MediaServerManager</ref> mediaserver;
3800 <ref>Navigator</ref> implements <ref>MediaServerManagerObject</ref>;
3802 [NoInterfaceObject] interface MediaServerManager {
3803 void scanNetwork(<ref>MediaServerFoundServerCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
3806 [NoInterfaceObject] interface MediaServer {
3807 readonly attribute DOMString id;
3808 readonly attribute DOMString friendlyName;
3809 readonly attribute object root;
3811 void browse(DOMString containerId, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
3812 void find(DOMString containerId, DOMString searchFilter, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
3815 [NoInterfaceObject] interface MediaServerError {
3816 const unsigned short GENERIC = 1;
3817 attribute unsigned short code;
3818 attribute DOMString message;
3821 [Callback=FunctionOnly, NoInterfaceObject] interface MediaServerFoundServerCallback {
3822 void onsuccess(<ref>MediaServer</ref> value);
3825 [Callback=FunctionOnly, NoInterfaceObject] interface MediaServerBrowseFindCallback {
3826 void onsuccess(sequence< object > value);
3829 [Callback=FunctionOnly, NoInterfaceObject] interface MediaServerErrorCallback {
3830 void onfailure(<ref>MediaServerError</ref> error);
3832 <Interface name="MediaServerManagerObject" id="::MediaServerManagerObject">
3833 <webidl>[NoInterfaceObject] interface MediaServerManagerObject {
3834 readonly attribute <ref>MediaServerManager</ref> mediaserver;
3836 <ExtendedAttributeList>
3837 <ExtendedAttribute name="NoInterfaceObject">
3838 <webidl>NoInterfaceObject</webidl>
3839 </ExtendedAttribute>
3840 </ExtendedAttributeList>
3841 <Attribute readonly="readonly" name="mediaserver" id="::MediaServerManagerObject::mediaserver">
3842 <webidl> readonly attribute <ref>MediaServerManager</ref> mediaserver;</webidl>
3843 <Type name="MediaServerManager"/>
3846 <Implements name1="Navigator" name2="MediaServerManagerObject">
3847 <webidl><ref>Navigator</ref> implements <ref>MediaServerManagerObject</ref>;</webidl>
3849 <Interface name="MediaServerManager" id="::MediaServerManager">
3850 <webidl>[NoInterfaceObject] interface MediaServerManager {
3851 void scanNetwork(<ref>MediaServerFoundServerCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
3853 <ExtendedAttributeList>
3854 <ExtendedAttribute name="NoInterfaceObject">
3855 <webidl>NoInterfaceObject</webidl>
3856 </ExtendedAttribute>
3857 </ExtendedAttributeList>
3858 <Operation name="scanNetwork" id="::MediaServerManager::scanNetwork">
3859 <webidl> void scanNetwork(<ref>MediaServerFoundServerCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);</webidl>
3862 <Argument name="successCallback">
3863 <Type name="MediaServerFoundServerCallback"/>
3865 <Argument optional="optional" name="errorCallback">
3866 <Type name="MediaServerErrorCallback"/>
3871 <Interface name="MediaServer" id="::MediaServer">
3872 <webidl>[NoInterfaceObject] interface MediaServer {
3873 readonly attribute DOMString id;
3874 readonly attribute DOMString friendlyName;
3875 readonly attribute object root;
3877 void browse(DOMString containerId, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
3878 void find(DOMString containerId, DOMString searchFilter, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
3880 <ExtendedAttributeList>
3881 <ExtendedAttribute name="NoInterfaceObject">
3882 <webidl>NoInterfaceObject</webidl>
3883 </ExtendedAttribute>
3884 </ExtendedAttributeList>
3885 <Attribute readonly="readonly" name="id" id="::MediaServer::id">
3886 <webidl> readonly attribute DOMString id;</webidl>
3887 <Type type="DOMString"/>
3889 <Attribute readonly="readonly" name="friendlyName" id="::MediaServer::friendlyName">
3890 <webidl> readonly attribute DOMString friendlyName;</webidl>
3891 <Type type="DOMString"/>
3893 <Attribute readonly="readonly" name="root" id="::MediaServer::root">
3894 <webidl> readonly attribute object root;</webidl>
3895 <Type type="object"/>
3897 <Operation name="browse" id="::MediaServer::browse">
3898 <webidl> void browse(DOMString containerId, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);</webidl>
3901 <Argument name="containerId">
3902 <Type type="DOMString"/>
3904 <Argument name="sortMode">
3905 <Type type="DOMString"/>
3907 <Argument name="count">
3908 <Type type="unsigned long"/>
3910 <Argument name="offset">
3911 <Type type="unsigned long"/>
3913 <Argument name="successCallback">
3914 <Type name="MediaServerBrowseFindCallback"/>
3916 <Argument optional="optional" name="errorCallback">
3917 <Type name="MediaServerErrorCallback"/>
3921 <Operation name="find" id="::MediaServer::find">
3922 <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>
3925 <Argument name="containerId">
3926 <Type type="DOMString"/>
3928 <Argument name="searchFilter">
3929 <Type type="DOMString"/>
3931 <Argument name="sortMode">
3932 <Type type="DOMString"/>
3934 <Argument name="count">
3935 <Type type="unsigned long"/>
3937 <Argument name="offset">
3938 <Type type="unsigned long"/>
3940 <Argument name="successCallback">
3941 <Type name="MediaServerBrowseFindCallback"/>
3943 <Argument optional="optional" name="errorCallback">
3944 <Type name="MediaServerErrorCallback"/>
3949 <Interface name="MediaServerError" id="::MediaServerError">
3950 <webidl>[NoInterfaceObject] interface MediaServerError {
3951 const unsigned short GENERIC = 1;
3952 attribute unsigned short code;
3953 attribute DOMString message;
3955 <ExtendedAttributeList>
3956 <ExtendedAttribute name="NoInterfaceObject">
3957 <webidl>NoInterfaceObject</webidl>
3958 </ExtendedAttribute>
3959 </ExtendedAttributeList>
3960 <Const name="GENERIC" value="1" id="::MediaServerError::GENERIC">
3961 <webidl> const unsigned short GENERIC = 1;</webidl>
3962 <Type type="unsigned short"/>
3964 <Attribute name="code" id="::MediaServerError::code">
3965 <webidl> attribute unsigned short code;</webidl>
3966 <Type type="unsigned short"/>
3968 <Attribute name="message" id="::MediaServerError::message">
3969 <webidl> attribute DOMString message;</webidl>
3970 <Type type="DOMString"/>
3973 <Interface name="MediaServerFoundServerCallback" id="::MediaServerFoundServerCallback">
3974 <webidl>[Callback=FunctionOnly, NoInterfaceObject] interface MediaServerFoundServerCallback {
3975 void onsuccess(<ref>MediaServer</ref> value);
3977 <ExtendedAttributeList>
3978 <ExtendedAttribute name="Callback" value="FunctionOnly">
3979 <webidl>Callback</webidl>
3980 </ExtendedAttribute>
3981 <ExtendedAttribute name="NoInterfaceObject">
3982 <webidl> NoInterfaceObject</webidl>
3983 </ExtendedAttribute>
3984 </ExtendedAttributeList>
3985 <Operation name="onsuccess" id="::MediaServerFoundServerCallback::onsuccess">
3986 <webidl> void onsuccess(<ref>MediaServer</ref> value);</webidl>
3989 <Argument name="value">
3990 <Type name="MediaServer"/>
3995 <Interface name="MediaServerBrowseFindCallback" id="::MediaServerBrowseFindCallback">
3996 <webidl>[Callback=FunctionOnly, NoInterfaceObject] interface MediaServerBrowseFindCallback {
3997 void onsuccess(sequence< object > value);
3999 <ExtendedAttributeList>
4000 <ExtendedAttribute name="Callback" value="FunctionOnly">
4001 <webidl>Callback</webidl>
4002 </ExtendedAttribute>
4003 <ExtendedAttribute name="NoInterfaceObject">
4004 <webidl> NoInterfaceObject</webidl>
4005 </ExtendedAttribute>
4006 </ExtendedAttributeList>
4007 <Operation name="onsuccess" id="::MediaServerBrowseFindCallback::onsuccess">
4008 <webidl> void onsuccess(sequence< object > value);</webidl>
4011 <Argument name="value">
4012 <Type type="sequence">
4013 <Type type="object"/>
4019 <Interface name="MediaServerErrorCallback" id="::MediaServerErrorCallback">
4020 <webidl>[Callback=FunctionOnly, NoInterfaceObject] interface MediaServerErrorCallback {
4021 void onfailure(<ref>MediaServerError</ref> error);
4023 <ExtendedAttributeList>
4024 <ExtendedAttribute name="Callback" value="FunctionOnly">
4025 <webidl>Callback</webidl>
4026 </ExtendedAttribute>
4027 <ExtendedAttribute name="NoInterfaceObject">
4028 <webidl> NoInterfaceObject</webidl>
4029 </ExtendedAttribute>
4030 </ExtendedAttributeList>
4031 <Operation name="onfailure" id="::MediaServerErrorCallback::onfailure">
4032 <webidl> void onfailure(<ref>MediaServerError</ref> error);</webidl>
4035 <Argument name="error">
4036 <Type name="MediaServerError"/>
4042 <Module name="Speech" id="::Speech">
4043 <webidl> module Speech {
4045 interface SpeechManagerObject {
4046 readonly attribute <ref>SpeechManager</ref> speech;
4048 <ref>Tizen</ref> implements <ref>SpeechManagerObject</ref>;
4052 interface SpeechManager {
4053 void vocalizeString(DOMString speakString);
4057 interface SpeechRecognition : <ref>EventTarget</ref> {
4058 attribute <ref>SpeechGrammarList</ref> grammars;
4059 attribute DOMString lang;
4060 attribute boolean continuous;
4061 attribute boolean interimResults;
4062 attribute unsigned long maxAlternatives;
4063 attribute DOMString serviceURI;
4069 attribute <ref>EventHandler</ref> onaudiostart;
4070 attribute <ref>EventHandler</ref> onsoundstart;
4071 attribute <ref>EventHandler</ref> onspeechstart;
4072 attribute <ref>EventHandler</ref> onspeechend;
4073 attribute <ref>EventHandler</ref> onsoundend;
4074 attribute <ref>EventHandler</ref> onaudioend;
4075 attribute <ref>EventHandler</ref> onresult;
4076 attribute <ref>EventHandler</ref> onnomatch;
4077 attribute <ref>EventHandler</ref> onerror;
4078 attribute <ref>EventHandler</ref> onstart;
4079 attribute <ref>EventHandler</ref> onend;
4083 "no-speech",
4084 "aborted",
4085 "audio-capture",
4086 "network",
4087 "not-allowed",
4088 "service-not-allowed",
4089 "bad-grammar",
4090 "language-not-supported"
4093 interface SpeechRecognitionError : <ref>Event</ref> {
4094 readonly attribute <ref>ErrorCode</ref> error;
4095 readonly attribute DOMString message;
4098 interface SpeechRecognitionAlternative {
4099 readonly attribute DOMString transcript;
4100 readonly attribute float confidence;
4103 interface SpeechRecognitionResult {
4104 readonly attribute unsigned long length;
4105 getter <ref>SpeechRecognitionAlternative</ref> item(unsigned long index);
4106 readonly attribute boolean final;
4109 interface SpeechRecognitionResultList {
4110 readonly attribute unsigned long length;
4111 getter <ref>SpeechRecognitionResult</ref> item(unsigned long index);
4114 interface SpeechRecognitionEvent : <ref>Event</ref> {
4115 readonly attribute unsigned long resultIndex;
4116 readonly attribute <ref>SpeechRecognitionResultList</ref> results;
4117 readonly attribute any interpretation;
4118 readonly attribute <ref>Document</ref> emma;
4122 interface SpeechGrammar {
4123 attribute DOMString src;
4124 attribute float weight;
4128 interface SpeechGrammarList {
4129 readonly attribute unsigned long length;
4130 getter <ref>SpeechGrammar</ref> item(unsigned long index);
4131 void addFromURI(DOMString src, optional float weight);
4132 void addFromString(DOMString string, optional float weight);
4135 <Interface name="SpeechManagerObject" id="::SpeechManagerObject">
4136 <webidl> [NoInterfaceObject]
4137 interface SpeechManagerObject {
4138 readonly attribute <ref>SpeechManager</ref> speech;
4140 <ExtendedAttributeList>
4141 <ExtendedAttribute name="NoInterfaceObject">
4142 <webidl>NoInterfaceObject</webidl>
4143 </ExtendedAttribute>
4144 </ExtendedAttributeList>
4145 <Attribute readonly="readonly" name="speech" id="::SpeechManagerObject::speech">
4146 <webidl> readonly attribute <ref>SpeechManager</ref> speech;</webidl>
4147 <Type name="SpeechManager"/>
4150 <Implements name1="Tizen" name2="SpeechManagerObject">
4151 <webidl> <ref>Tizen</ref> implements <ref>SpeechManagerObject</ref>;</webidl>
4153 <Interface name="SpeechManager" id="::SpeechManager">
4154 <webidl> [NoInterfaceObject]
4155 interface SpeechManager {
4156 void vocalizeString(DOMString speakString);
4158 <ExtendedAttributeList>
4159 <ExtendedAttribute name="NoInterfaceObject">
4160 <webidl>NoInterfaceObject</webidl>
4161 </ExtendedAttribute>
4162 </ExtendedAttributeList>
4163 <Operation name="vocalizeString" id="::SpeechManager::vocalizeString">
4164 <webidl> void vocalizeString(DOMString speakString);</webidl>
4167 <Argument name="speakString">
4168 <Type type="DOMString"/>
4173 <Interface name="SpeechRecognition" id="::SpeechRecognition">
4174 <webidl> [Constructor]
4175 interface SpeechRecognition : <ref>EventTarget</ref> {
4176 attribute <ref>SpeechGrammarList</ref> grammars;
4177 attribute DOMString lang;
4178 attribute boolean continuous;
4179 attribute boolean interimResults;
4180 attribute unsigned long maxAlternatives;
4181 attribute DOMString serviceURI;
4187 attribute <ref>EventHandler</ref> onaudiostart;
4188 attribute <ref>EventHandler</ref> onsoundstart;
4189 attribute <ref>EventHandler</ref> onspeechstart;
4190 attribute <ref>EventHandler</ref> onspeechend;
4191 attribute <ref>EventHandler</ref> onsoundend;
4192 attribute <ref>EventHandler</ref> onaudioend;
4193 attribute <ref>EventHandler</ref> onresult;
4194 attribute <ref>EventHandler</ref> onnomatch;
4195 attribute <ref>EventHandler</ref> onerror;
4196 attribute <ref>EventHandler</ref> onstart;
4197 attribute <ref>EventHandler</ref> onend;
4199 <ExtendedAttributeList>
4200 <ExtendedAttribute name="Constructor">
4201 <webidl>Constructor</webidl>
4202 </ExtendedAttribute>
4203 </ExtendedAttributeList>
4204 <InterfaceInheritance>
4205 <Name name="EventTarget"/>
4206 </InterfaceInheritance>
4207 <Attribute name="grammars" id="::SpeechRecognition::grammars">
4208 <webidl> attribute <ref>SpeechGrammarList</ref> grammars;</webidl>
4209 <Type name="SpeechGrammarList"/>
4211 <Attribute name="lang" id="::SpeechRecognition::lang">
4212 <webidl> attribute DOMString lang;</webidl>
4213 <Type type="DOMString"/>
4215 <Attribute name="continuous" id="::SpeechRecognition::continuous">
4216 <webidl> attribute boolean continuous;</webidl>
4217 <Type type="boolean"/>
4219 <Attribute name="interimResults" id="::SpeechRecognition::interimResults">
4220 <webidl> attribute boolean interimResults;</webidl>
4221 <Type type="boolean"/>
4223 <Attribute name="maxAlternatives" id="::SpeechRecognition::maxAlternatives">
4224 <webidl> attribute unsigned long maxAlternatives;</webidl>
4225 <Type type="unsigned long"/>
4227 <Attribute name="serviceURI" id="::SpeechRecognition::serviceURI">
4228 <webidl> attribute DOMString serviceURI;</webidl>
4229 <Type type="DOMString"/>
4231 <Operation name="start" id="::SpeechRecognition::start">
4232 <webidl> void start();</webidl>
4236 <Operation name="stop" id="::SpeechRecognition::stop">
4237 <webidl> void stop();</webidl>
4241 <Operation name="abort" id="::SpeechRecognition::abort">
4242 <webidl> void abort();</webidl>
4246 <Attribute name="onaudiostart" id="::SpeechRecognition::onaudiostart">
4247 <webidl> attribute <ref>EventHandler</ref> onaudiostart;</webidl>
4248 <Type name="EventHandler"/>
4250 <Attribute name="onsoundstart" id="::SpeechRecognition::onsoundstart">
4251 <webidl> attribute <ref>EventHandler</ref> onsoundstart;</webidl>
4252 <Type name="EventHandler"/>
4254 <Attribute name="onspeechstart" id="::SpeechRecognition::onspeechstart">
4255 <webidl> attribute <ref>EventHandler</ref> onspeechstart;</webidl>
4256 <Type name="EventHandler"/>
4258 <Attribute name="onspeechend" id="::SpeechRecognition::onspeechend">
4259 <webidl> attribute <ref>EventHandler</ref> onspeechend;</webidl>
4260 <Type name="EventHandler"/>
4262 <Attribute name="onsoundend" id="::SpeechRecognition::onsoundend">
4263 <webidl> attribute <ref>EventHandler</ref> onsoundend;</webidl>
4264 <Type name="EventHandler"/>
4266 <Attribute name="onaudioend" id="::SpeechRecognition::onaudioend">
4267 <webidl> attribute <ref>EventHandler</ref> onaudioend;</webidl>
4268 <Type name="EventHandler"/>
4270 <Attribute name="onresult" id="::SpeechRecognition::onresult">
4271 <webidl> attribute <ref>EventHandler</ref> onresult;</webidl>
4272 <Type name="EventHandler"/>
4274 <Attribute name="onnomatch" id="::SpeechRecognition::onnomatch">
4275 <webidl> attribute <ref>EventHandler</ref> onnomatch;</webidl>
4276 <Type name="EventHandler"/>
4278 <Attribute name="onerror" id="::SpeechRecognition::onerror">
4279 <webidl> attribute <ref>EventHandler</ref> onerror;</webidl>
4280 <Type name="EventHandler"/>
4282 <Attribute name="onstart" id="::SpeechRecognition::onstart">
4283 <webidl> attribute <ref>EventHandler</ref> onstart;</webidl>
4284 <Type name="EventHandler"/>
4286 <Attribute name="onend" id="::SpeechRecognition::onend">
4287 <webidl> attribute <ref>EventHandler</ref> onend;</webidl>
4288 <Type name="EventHandler"/>
4291 <Enum name="ErrorCode" id="::ErrorCode">
4292 <webidl> enum ErrorCode {
4293 "no-speech",
4294 "aborted",
4295 "audio-capture",
4296 "network",
4297 "not-allowed",
4298 "service-not-allowed",
4299 "bad-grammar",
4300 "language-not-supported"
4302 <EnumValue stringvalue="no-speech">
4303 <webidl> "no-speech</webidl>
4305 <EnumValue stringvalue="aborted">
4306 <webidl> "aborted</webidl>
4308 <EnumValue stringvalue="audio-capture">
4309 <webidl> "audio-capture</webidl>
4311 <EnumValue stringvalue="network">
4312 <webidl> "network</webidl>
4314 <EnumValue stringvalue="not-allowed">
4315 <webidl> "not-allowed</webidl>
4317 <EnumValue stringvalue="service-not-allowed">
4318 <webidl> "service-not-allowed</webidl>
4320 <EnumValue stringvalue="bad-grammar">
4321 <webidl> "bad-grammar</webidl>
4323 <EnumValue stringvalue="language-not-supported">
4324 <webidl> "language-not-supported</webidl>
4327 <Interface name="SpeechRecognitionError" id="::SpeechRecognitionError">
4328 <webidl> interface SpeechRecognitionError : <ref>Event</ref> {
4329 readonly attribute <ref>ErrorCode</ref> error;
4330 readonly attribute DOMString message;
4332 <InterfaceInheritance>
4333 <Name name="Event"/>
4334 </InterfaceInheritance>
4335 <Attribute readonly="readonly" name="error" id="::SpeechRecognitionError::error">
4336 <webidl> readonly attribute <ref>ErrorCode</ref> error;</webidl>
4337 <Type name="ErrorCode"/>
4339 <Attribute readonly="readonly" name="message" id="::SpeechRecognitionError::message">
4340 <webidl> readonly attribute DOMString message;</webidl>
4341 <Type type="DOMString"/>
4344 <Interface name="SpeechRecognitionAlternative" id="::SpeechRecognitionAlternative">
4345 <webidl> interface SpeechRecognitionAlternative {
4346 readonly attribute DOMString transcript;
4347 readonly attribute float confidence;
4349 <Attribute readonly="readonly" name="transcript" id="::SpeechRecognitionAlternative::transcript">
4350 <webidl> readonly attribute DOMString transcript;</webidl>
4351 <Type type="DOMString"/>
4353 <Attribute readonly="readonly" name="confidence" id="::SpeechRecognitionAlternative::confidence">
4354 <webidl> readonly attribute float confidence;</webidl>
4355 <Type type="float"/>
4358 <Interface name="SpeechRecognitionResult" id="::SpeechRecognitionResult">
4359 <webidl> interface SpeechRecognitionResult {
4360 readonly attribute unsigned long length;
4361 getter <ref>SpeechRecognitionAlternative</ref> item(unsigned long index);
4362 readonly attribute boolean final;
4364 <Attribute readonly="readonly" name="length" id="::SpeechRecognitionResult::length">
4365 <webidl> readonly attribute unsigned long length;</webidl>
4366 <Type type="unsigned long"/>
4368 <Operation getter="getter" name="item" id="::SpeechRecognitionResult::item">
4369 <webidl> getter <ref>SpeechRecognitionAlternative</ref> item(unsigned long index);</webidl>
4370 <Type name="SpeechRecognitionAlternative"/>
4372 <Argument name="index">
4373 <Type type="unsigned long"/>
4377 <Attribute readonly="readonly" name="final" id="::SpeechRecognitionResult::final">
4378 <webidl> readonly attribute boolean final;</webidl>
4379 <Type type="boolean"/>
4382 <Interface name="SpeechRecognitionResultList" id="::SpeechRecognitionResultList">
4383 <webidl> interface SpeechRecognitionResultList {
4384 readonly attribute unsigned long length;
4385 getter <ref>SpeechRecognitionResult</ref> item(unsigned long index);
4387 <Attribute readonly="readonly" name="length" id="::SpeechRecognitionResultList::length">
4388 <webidl> readonly attribute unsigned long length;</webidl>
4389 <Type type="unsigned long"/>
4391 <Operation getter="getter" name="item" id="::SpeechRecognitionResultList::item">
4392 <webidl> getter <ref>SpeechRecognitionResult</ref> item(unsigned long index);</webidl>
4393 <Type name="SpeechRecognitionResult"/>
4395 <Argument name="index">
4396 <Type type="unsigned long"/>
4401 <Interface name="SpeechRecognitionEvent" id="::SpeechRecognitionEvent">
4402 <webidl> interface SpeechRecognitionEvent : <ref>Event</ref> {
4403 readonly attribute unsigned long resultIndex;
4404 readonly attribute <ref>SpeechRecognitionResultList</ref> results;
4405 readonly attribute any interpretation;
4406 readonly attribute <ref>Document</ref> emma;
4408 <InterfaceInheritance>
4409 <Name name="Event"/>
4410 </InterfaceInheritance>
4411 <Attribute readonly="readonly" name="resultIndex" id="::SpeechRecognitionEvent::resultIndex">
4412 <webidl> readonly attribute unsigned long resultIndex;</webidl>
4413 <Type type="unsigned long"/>
4415 <Attribute readonly="readonly" name="results" id="::SpeechRecognitionEvent::results">
4416 <webidl> readonly attribute <ref>SpeechRecognitionResultList</ref> results;</webidl>
4417 <Type name="SpeechRecognitionResultList"/>
4419 <Attribute readonly="readonly" name="interpretation" id="::SpeechRecognitionEvent::interpretation">
4420 <webidl> readonly attribute any interpretation;</webidl>
4423 <Attribute readonly="readonly" name="emma" id="::SpeechRecognitionEvent::emma">
4424 <webidl> readonly attribute <ref>Document</ref> emma;</webidl>
4425 <Type name="Document"/>
4428 <Interface name="SpeechGrammar" id="::SpeechGrammar">
4429 <webidl> [Constructor]
4430 interface SpeechGrammar {
4431 attribute DOMString src;
4432 attribute float weight;
4434 <ExtendedAttributeList>
4435 <ExtendedAttribute name="Constructor">
4436 <webidl>Constructor</webidl>
4437 </ExtendedAttribute>
4438 </ExtendedAttributeList>
4439 <Attribute name="src" id="::SpeechGrammar::src">
4440 <webidl> attribute DOMString src;</webidl>
4441 <Type type="DOMString"/>
4443 <Attribute name="weight" id="::SpeechGrammar::weight">
4444 <webidl> attribute float weight;</webidl>
4445 <Type type="float"/>
4448 <Interface name="SpeechGrammarList" id="::SpeechGrammarList">
4449 <webidl> [Constructor]
4450 interface SpeechGrammarList {
4451 readonly attribute unsigned long length;
4452 getter <ref>SpeechGrammar</ref> item(unsigned long index);
4453 void addFromURI(DOMString src, optional float weight);
4454 void addFromString(DOMString string, optional float weight);
4456 <ExtendedAttributeList>
4457 <ExtendedAttribute name="Constructor">
4458 <webidl>Constructor</webidl>
4459 </ExtendedAttribute>
4460 </ExtendedAttributeList>
4461 <Attribute readonly="readonly" name="length" id="::SpeechGrammarList::length">
4462 <webidl> readonly attribute unsigned long length;</webidl>
4463 <Type type="unsigned long"/>
4465 <Operation getter="getter" name="item" id="::SpeechGrammarList::item">
4466 <webidl> getter <ref>SpeechGrammar</ref> item(unsigned long index);</webidl>
4467 <Type name="SpeechGrammar"/>
4469 <Argument name="index">
4470 <Type type="unsigned long"/>
4474 <Operation name="addFromURI" id="::SpeechGrammarList::addFromURI">
4475 <webidl> void addFromURI(DOMString src, optional float weight);</webidl>
4478 <Argument name="src">
4479 <Type type="DOMString"/>
4481 <Argument optional="optional" name="weight">
4482 <Type type="float"/>
4486 <Operation name="addFromString" id="::SpeechGrammarList::addFromString">
4487 <webidl> void addFromString(DOMString string, optional float weight);</webidl>
4490 <Argument name="string">
4491 <Type type="DOMString"/>
4493 <Argument optional="optional" name="weight">
4494 <Type type="float"/>
4500 <Module name="Alarm" id="::Alarm">
4501 <webidl>module Alarm {
4503 typedef DOMString AlarmId;
4507 [NoInterfaceObject] interface AlarmManagerObject {
4508 readonly attribute <ref>AlarmManager</ref> alarm;
4510 <ref>Tizen</ref> implements <ref>AlarmManagerObject</ref>;
4513 [NoInterfaceObject] interface AlarmManager {
4515 const long PERIOD_MINUTE = 60;
4518 const long PERIOD_HOUR = 3600;
4521 const long PERIOD_DAY = 86400;
4524 const long PERIOD_WEEK = 604800;
4527 void add(<ref>Alarm</ref> alarm, <ref>ApplicationId</ref> applicationId, optional <ref>ApplicationControl</ref>? appControl) raises(<ref>WebAPIException</ref>);
4530 void remove(<ref>AlarmId</ref> id) raises(<ref>WebAPIException</ref>);
4533 void removeAll() raises(<ref>WebAPIException</ref>);
4536 <ref>Alarm</ref> get(<ref>AlarmId</ref> id) raises(<ref>WebAPIException</ref>);
4539 <ref>Alarm</ref>[] getAll() raises(<ref>WebAPIException</ref>);
4543 [NoInterfaceObject] interface Alarm {
4545 readonly attribute <ref>AlarmId</ref>? id;
4548 [Constructor(long delay, optional long? period)]
4550 interface AlarmRelative : <ref>Alarm</ref> {
4552 readonly attribute long delay;
4555 readonly attribute long? period;
4558 long? getRemainingSeconds() raises(<ref>WebAPIException</ref>);
4561 [Constructor(Date date),
4563 Constructor(Date date, <ref>ByDayValue</ref>[] daysOfTheWeek),
4565 Constructor(Date date, long period)]
4567 interface AlarmAbsolute : <ref>Alarm</ref> {
4569 readonly attribute Date date;
4572 readonly attribute long? period;
4575 readonly attribute <ref>ByDayValue</ref>[] daysOfTheWeek;
4578 Date? getNextScheduledDate() raises(<ref>WebAPIException</ref>);
4583 This API provides the functionality for scheduling the system alarm.
4584 It allows you to run other applications and have them perform operations at the specific time.
4585 You can schedule an alarm to go off once or to repeat at specific intervals.
4589 Each application has its own individual alarm storage, that is, applications cannot view or edit alarms set by other applications.
4592 Once an alarm goes off, it will be removed from the alarm storage automatically.
4593 <em>AlarmManager</em> provides methods to manage alarms such as adding and removing.
4594 For more information on the Alarm features, see <a href="../../org.tizen.web.appprogramming/html/guide/app_guide/alarm.htm">Alarm Guide</a>.
4601 <Typedef name="AlarmId" id="::Alarm::AlarmId">
4602 <webidl> typedef DOMString AlarmId;</webidl>
4605 An alarm identifier.
4611 <Type type="DOMString"/>
4613 <Interface name="AlarmManagerObject" id="::Alarm::AlarmManagerObject">
4614 <webidl> [NoInterfaceObject] interface AlarmManagerObject {
4615 readonly attribute <ref>AlarmManager</ref> alarm;
4619 This interface defines what is instantiated by the <em>Tizen </em>object from the Tizen Platform.
4620 There will be a <em>tizen.alarm </em>object that allows access to the functionality of the Alarm API.
4626 <ExtendedAttributeList>
4627 <ExtendedAttribute name="NoInterfaceObject">
4628 <webidl>NoInterfaceObject</webidl>
4629 </ExtendedAttribute>
4630 </ExtendedAttributeList>
4631 <Attribute readonly="readonly" name="alarm" id="::Alarm::AlarmManagerObject::alarm">
4632 <webidl> readonly attribute <ref>AlarmManager</ref> alarm;</webidl>
4633 <Type name="AlarmManager"/>
4636 <Implements name1="Tizen" name2="AlarmManagerObject">
4637 <webidl> <ref>Tizen</ref> implements <ref>AlarmManagerObject</ref>;</webidl>
4639 <Interface name="AlarmManager" id="::Alarm::AlarmManager">
4640 <webidl> [NoInterfaceObject] interface AlarmManager {
4642 const long PERIOD_MINUTE = 60;
4645 const long PERIOD_HOUR = 3600;
4648 const long PERIOD_DAY = 86400;
4651 const long PERIOD_WEEK = 604800;
4654 void add(<ref>Alarm</ref> alarm, <ref>ApplicationId</ref> applicationId, optional <ref>ApplicationControl</ref>? appControl) raises(<ref>WebAPIException</ref>);
4657 void remove(<ref>AlarmId</ref> id) raises(<ref>WebAPIException</ref>);
4660 void removeAll() raises(<ref>WebAPIException</ref>);
4663 <ref>Alarm</ref> get(<ref>AlarmId</ref> id) raises(<ref>WebAPIException</ref>);
4666 <ref>Alarm</ref>[] getAll() raises(<ref>WebAPIException</ref>);
4670 This interface provides methods to manage alarms.
4676 <ExtendedAttributeList>
4677 <ExtendedAttribute name="NoInterfaceObject">
4678 <webidl>NoInterfaceObject</webidl>
4679 </ExtendedAttribute>
4680 </ExtendedAttributeList>
4681 <Const name="PERIOD_MINUTE" value="60" id="::Alarm::AlarmManager::PERIOD_MINUTE">
4682 <webidl> const long PERIOD_MINUTE = 60;</webidl>
4685 The period of a minute.
4686 It defines the number of seconds per minute.
4694 <Const name="PERIOD_HOUR" value="3600" id="::Alarm::AlarmManager::PERIOD_HOUR">
4695 <webidl> const long PERIOD_HOUR = 3600;</webidl>
4698 The period of an hour.
4699 It defines the number of seconds per hour.
4707 <Const name="PERIOD_DAY" value="86400" id="::Alarm::AlarmManager::PERIOD_DAY">
4708 <webidl> const long PERIOD_DAY = 86400;</webidl>
4711 The period of a day.
4712 It defines the number of seconds per day.
4720 <Const name="PERIOD_WEEK" value="604800" id="::Alarm::AlarmManager::PERIOD_WEEK">
4721 <webidl> const long PERIOD_WEEK = 604800;</webidl>
4724 The period of a week.
4725 It defines the number of seconds in a week.
4733 <Operation name="add" id="::Alarm::AlarmManager::add">
4734 <webidl> void add(<ref>Alarm</ref> alarm, <ref>ApplicationId</ref> applicationId, optional <ref>ApplicationControl</ref>? appControl) raises(<ref>WebAPIException</ref>);</webidl>
4737 Adds an alarm to the storage.
4741 Set an alarm with the application ID to be run. You should definitely provide the application ID to run
4742 and the <a href=" ../../org.tizen.web.appprogramming/html/guide/app_guide/application_service.htm">application control </a>information if it is necessary.
4743 For more information about the application contorl, see <a href="../../org.tizen.web.device.apireference/tizen/application.html">The Application API</a>.
4753 http://tizen.org/privilege/alarm
4755 <Code> // Triggers an alarm on a given date/time
4756 var alarm = new tizen.AlarmAbsolute(new Date(2014, 10, 4, 8, 0));
4757 var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/view");
4758 tizen.alarm.add(alarm, tizen.application.getCurrentApplication().appInfo.id, appControl);
4759 console.log("Alarm added with id: " + alarm.id);
4764 <Argument name="alarm">
4767 An alarm to add. It can be either <em>AlarmRelative </em> or <em>AlarmAbsolute</em>.
4770 <Type name="Alarm"/>
4772 <Argument name="applicationId">
4775 The application ID to run when the alarm is triggered.
4778 <Type name="ApplicationId"/>
4780 <Argument optional="optional" name="appControl">
4783 The data structure describing application control details.
4786 <Type name="ApplicationControl" nullable="nullable"/>
4790 <RaiseException name="WebAPIException">
4793 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
4796 with error type InvalidValuesError, if any input parameter does not contain a valid value.
4799 with error type SecurityError, if the application does not have the privilege to call this method.
4802 with error type UnknownError, if any other error occurs.
4808 <Operation name="remove" id="::Alarm::AlarmManager::remove">
4809 <webidl> void remove(<ref>AlarmId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
4812 Removes an alarm from the storage.
4816 If an alarm goes off, it will be removed from the storage automatically.
4826 http://tizen.org/privilege/alarm
4828 <Code> var alarms = tizen.alarm.getAll();
4830 // Removes the first alarm
4831 if (alarms.length > 0) {
4833 tizen.alarm.remove(alarms[0].id);
4834 console.log("Successfully removed the first alarm.");
4836 console.log("Failed to remove the first alarm.");
4843 <Argument name="id">
4846 The ID of the alarm to remove
4849 <Type name="AlarmId"/>
4853 <RaiseException name="WebAPIException">
4856 with error type NotFoundError, if this alarm identifier cannot be found in the storage.
4859 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
4862 with error type InvalidValuesError, if any input parameter does not contain a valid value.
4865 with error type SecurityError, if the application does not have the privilege to call this method.
4868 with error type UnknownError, if the method cannot be completed because of an unknown error.
4874 <Operation name="removeAll" id="::Alarm::AlarmManager::removeAll">
4875 <webidl> void removeAll() raises(<ref>WebAPIException</ref>);</webidl>
4878 Removes all alarms added by an application.
4882 Because each application has its own alarm storage, this method removes alarms only added by the calling application.
4892 http://tizen.org/privilege/alarm
4894 <Code> tizen.alarm.removeAll();
4895 console.log("remove all registered alarms in the storage.");
4901 <RaiseException name="WebAPIException">
4904 with error type SecurityError, if the application does not have the privilege to call this method.
4907 with error type UnknownError, if the method cannot be completed because of an unknown error.
4913 <Operation name="get" id="::Alarm::AlarmManager::get">
4914 <webidl> <ref>Alarm</ref> get(<ref>AlarmId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
4917 Returns an alarm as per the specified identifier.
4922 <Code> // Sets an alarm
4923 var date = new Date();
4924 date.setHours(date.getHours()+1);
4925 var abs_alarm = new tizen.AlarmAbsolute(date);
4928 tizen.alarm.add(abs_alarm, tizen.application.getCurrentApplication().appInfo.id);
4931 var alarm = tizen.alarm.get(abs_alarm.id);
4932 console.log("The alarm will trigger at " + alarm.getNextScheduledDate());
4938 Alarm An alarm object with the specified ID.
4943 <Argument name="id">
4946 The alarm ID to retrieve.
4949 <Type name="AlarmId"/>
4953 <RaiseException name="WebAPIException">
4956 with error type NotFoundError, if this alarm identifier cannot be found in the storage.
4959 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
4962 with error type InvalidValuesError, if any input parameter does not contain a valid value.
4965 with error type UnknownError, if the method cannot be completed because of an unknown error.
4971 <Operation name="getAll" id="::Alarm::AlarmManager::getAll">
4972 <webidl> <ref>Alarm</ref>[] getAll() raises(<ref>WebAPIException</ref>);</webidl>
4975 Retrieves all alarms in an application storage..
4979 Alarms that have already been triggered are removed automatically from the storage.
4985 <Code> var alarms = tizen.alarm.getAll();
4986 console.log(alarms.length + " alarms present in the storage.");
4992 Alarm[] All Alarm objects.
4995 <Type name="Alarm"/>
4999 <RaiseException name="WebAPIException">
5002 with error type UnknownError, if the method cannot be completed because of an unknown error.
5009 <Interface name="Alarm" id="::Alarm::Alarm">
5010 <webidl> [NoInterfaceObject] interface Alarm {
5012 readonly attribute <ref>AlarmId</ref>? id;
5016 This interface is an abstract interface for alarm types.
5022 <ExtendedAttributeList>
5023 <ExtendedAttribute name="NoInterfaceObject">
5024 <webidl>NoInterfaceObject</webidl>
5025 </ExtendedAttribute>
5026 </ExtendedAttributeList>
5027 <Attribute readonly="readonly" name="id" id="::Alarm::Alarm::id">
5028 <webidl> readonly attribute <ref>AlarmId</ref>? id;</webidl>
5031 The alarm identifier.
5037 <Type name="AlarmId" nullable="nullable"/>
5040 <Interface name="AlarmRelative" id="::Alarm::AlarmRelative">
5041 <webidl> [Constructor(long delay, optional long? period)]
5043 interface AlarmRelative : <ref>Alarm</ref> {
5045 readonly attribute long delay;
5048 readonly attribute long? period;
5051 long? getRemainingSeconds() raises(<ref>WebAPIException</ref>);
5055 This interface provides the relative alarm, which occurs at a fixed interval in future.
5059 This alarm triggers after a duration mentioned in <em>delay</em> attribute from the moment the alarm is added.
5060 If a <em>period</em> is provided, the alarm keeps triggering for the given interval.
5066 <Code> // Gets the current application id.
5067 var appId = tizen.application.getCurrentApplication().appInfo.id;
5069 // Sets an alarm in 3 hours from now
5070 var alarm1 = new tizen.AlarmRelative(3 * tizen.alarm.PERIOD_HOUR);
5071 tizen.alarm.add(alarm1, appId);
5073 // Sets an alarm in one hour, recurring after every 2 minutes
5074 var alarm2 = new tizen.AlarmRelative(tizen.alarm.PERIOD_HOUR, 2 * tizen.alarm.PERIOD_MINUTE);
5075 tizen.alarm.add(alarm2, appId);
5078 <ExtendedAttributeList>
5079 <ExtendedAttribute name="Constructor">
5080 <webidl>Constructor(long delay, optional long? period)</webidl>
5082 <Argument name="delay">
5085 <Argument optional="optional" name="period">
5086 <Type type="long" nullable="nullable"/>
5089 </ExtendedAttribute>
5090 </ExtendedAttributeList>
5091 <InterfaceInheritance>
5092 <Name name="Alarm"/>
5093 </InterfaceInheritance>
5094 <Attribute readonly="readonly" name="delay" id="::Alarm::AlarmRelative::delay">
5095 <webidl> readonly attribute long delay;</webidl>
5098 An attribute to store the difference in time (in seconds) between when an alarm is added and it is triggered.
5106 <Attribute readonly="readonly" name="period" id="::Alarm::AlarmRelative::period">
5107 <webidl> readonly attribute long? period;</webidl>
5110 An attribute to store the duration in seconds between each trigger of an alarm.
5111 By default, this attribute is set to <var>null</var>, indicating that this alarm does not repeat.
5117 <Type type="long" nullable="nullable"/>
5119 <Operation name="getRemainingSeconds" id="::Alarm::AlarmRelative::getRemainingSeconds">
5120 <webidl> long? getRemainingSeconds() raises(<ref>WebAPIException</ref>);</webidl>
5123 Returns duration in seconds before the next alarm is triggered.
5127 If the alarm has expired, this method returns <var>null</var>.
5133 <Code> // Gets the current application id.
5134 var appId = tizen.application.getCurrentApplication().appInfo.id;
5136 // Sets an alarm in 3 hours from now
5137 var alarm = new tizen.AlarmRelative(3 * tizen.alarm.PERIOD_HOUR);
5138 tizen.alarm.add(alarm, appId);
5140 var sec = alarm.getRemainingSeconds();
5141 console.log("remaining time is " + sec);
5144 <Type type="long" nullable="nullable">
5147 long The duration before the next alarm trigger.
5153 <RaiseException name="WebAPIException">
5156 with error type UnknownError, if the method cannot be completed because of an unknown error.
5163 <Interface name="AlarmAbsolute" id="::Alarm::AlarmAbsolute">
5164 <webidl> [Constructor(Date date),
5166 Constructor(Date date, <ref>ByDayValue</ref>[] daysOfTheWeek),
5168 Constructor(Date date, long period)]
5170 interface AlarmAbsolute : <ref>Alarm</ref> {
5172 readonly attribute Date date;
5175 readonly attribute long? period;
5178 readonly attribute <ref>ByDayValue</ref>[] daysOfTheWeek;
5181 Date? getNextScheduledDate() raises(<ref>WebAPIException</ref>);
5185 This interface provides an absolute alarm, which triggers at a specified absolute date.
5189 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.
5195 <Code> // Gets the current application id.
5196 var appId = tizen.application.getCurrentApplication().appInfo.id;
5198 // Sets an alarm on January 1st 2014 08:00
5199 var date = new Date(2014, 0, 1, 8, 0);
5200 var alarm1 = new tizen.AlarmAbsolute(date);
5201 tizen.alarm.add(alarm1, appId);
5203 // Sets an alarm on January 1st 2014 08:00, repeating every 2 days
5204 var alarm2 = new tizen.AlarmAbsolute(date, 2 * tizen.alarm.PERIOD_DAY);
5205 tizen.alarm.add(alarm2, appId);
5207 // Sets an alarm occurring on every Saturday and Sunday, at 08:00, starting from January 1st 2014
5208 var alarm3 = new tizen.AlarmAbsolute(date, ["SA", "SU"]);
5209 tizen.alarm.add(alarm3, appId);
5212 <ExtendedAttributeList>
5213 <ExtendedAttribute name="Constructor">
5214 <webidl>Constructor(Date date)</webidl>
5216 <Argument name="date">
5220 </ExtendedAttribute>
5221 <ExtendedAttribute name="Constructor">
5222 <webidl> Constructor(Date date, <ref>ByDayValue</ref>[] daysOfTheWeek)</webidl>
5224 <Argument name="date">
5227 <Argument name="daysOfTheWeek">
5229 <Type name="ByDayValue"/>
5233 </ExtendedAttribute>
5234 <ExtendedAttribute name="Constructor">
5235 <webidl> Constructor(Date date, long period)</webidl>
5237 <Argument name="date">
5240 <Argument name="period">
5244 </ExtendedAttribute>
5245 </ExtendedAttributeList>
5246 <InterfaceInheritance>
5247 <Name name="Alarm"/>
5248 </InterfaceInheritance>
5249 <Attribute readonly="readonly" name="date" id="::Alarm::AlarmAbsolute::date">
5250 <webidl> readonly attribute Date date;</webidl>
5253 An attribute to store the absolute date/time when the alarm is initially triggered.
5257 This attribute is precise to the second. Milliseconds will be ignored.
5266 <Attribute readonly="readonly" name="period" id="::Alarm::AlarmAbsolute::period">
5267 <webidl> readonly attribute long? period;</webidl>
5270 An attribute to store the duration in seconds between each trigger of the alarm.
5274 By default, this attribute is set to <var>null</var>, indicating that this alarm does not repeat.
5275 The <em>period</em> and <em>daysOfTheWeek</em> attributes are mutually exclusive.
5282 <Type type="long" nullable="nullable"/>
5284 <Attribute readonly="readonly" name="daysOfTheWeek" id="::Alarm::AlarmAbsolute::daysOfTheWeek">
5285 <webidl> readonly attribute <ref>ByDayValue</ref>[] daysOfTheWeek;</webidl>
5288 An attribute to store the days of the week associated with the recurrence rule.
5292 By default, this attribute is set to an empty array.
5293 The <em>period</em> and <em>daysOfTheWeek</em> attributes are mutually exclusive.
5301 <Type name="ByDayValue"/>
5304 <Operation name="getNextScheduledDate" id="::Alarm::AlarmAbsolute::getNextScheduledDate">
5305 <webidl> Date? getNextScheduledDate() raises(<ref>WebAPIException</ref>);</webidl>
5308 Returns the date / time of the next alarm trigger.
5312 If the alarm has expired, this method returns <var>null</var>. The returned date is precise to the second.
5318 <Code> // Gets the current application id.
5319 var appId = tizen.application.getCurrentApplication().appInfo.id;
5321 // Sets an alarm on January 1st 2014 08:00
5322 var date = new Date(2014, 0, 1, 8, 0);
5323 var alarm1 = new tizen.AlarmAbsolute(date);
5324 tizen.alarm.add(alarm1, appId);
5326 var date = alarm1.getNextScheduledDate();
5327 console.log("next scheduled time is " + date);
5330 <Type type="Date" nullable="nullable">
5333 Date The date/time of the next alarm trigger.
5339 <RaiseException name="WebAPIException">
5342 with error type UnknownError, if the method cannot be completed because of an unknown error.
5350 <Module name="Application" id="::Application">
5351 <webidl>module Application {
5353 typedef DOMString ApplicationId;
5355 typedef DOMString ApplicationContextId;
5357 [NoInterfaceObject] interface ApplicationManagerObject {
5358 readonly attribute <ref>ApplicationManager</ref> application;
5360 <ref>Tizen</ref> implements <ref>ApplicationManagerObject</ref>;
5362 [NoInterfaceObject] interface ApplicationManager {
5364 <ref>Application</ref> getCurrentApplication() raises(<ref>WebAPIException</ref>);
5366 void kill(<ref>ApplicationContextId</ref> contextId,
5367 optional <ref>SuccessCallback</ref>? successCallback,
5368 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5370 void launch(<ref>ApplicationId</ref> id,
5371 optional <ref>SuccessCallback</ref>? successCallback,
5372 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5374 void launchAppControl(<ref>ApplicationControl</ref> appControl,
5375 optional <ref>ApplicationId</ref>? id,
5376 optional <ref>SuccessCallback</ref>? successCallback,
5377 optional <ref>ErrorCallback</ref>? errorCallback,
5378 optional <ref>ApplicationControlDataArrayReplyCallback</ref>? replyCallback) raises(<ref>WebAPIException</ref>);
5380 void findAppControl(<ref>ApplicationControl</ref> appControl,
5381 <ref>FindAppControlSuccessCallback</ref> successCallback,
5382 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5384 void getAppsContext(<ref>ApplicationContextArraySuccessCallback</ref> successCallback,
5385 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5387 <ref>ApplicationContext</ref> getAppContext(optional <ref>ApplicationContextId</ref>? contextId) raises(<ref>WebAPIException</ref>);
5389 void getAppsInfo(<ref>ApplicationInformationArraySuccessCallback</ref> successCallback,
5390 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5392 <ref>ApplicationInformation</ref> getAppInfo(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);
5394 <ref>ApplicationCertificate</ref>[] getAppCerts(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);
5396 DOMString getAppSharedURI(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);
5398 <ref>ApplicationMetaData</ref>[] getAppMetaData(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);
5400 long addAppInfoEventListener(<ref>ApplicationInformationEventCallback</ref> eventCallback) raises(<ref>WebAPIException</ref>);
5402 void removeAppInfoEventListener(long watchId) raises(<ref>WebAPIException</ref>);
5406 [NoInterfaceObject] interface Application {
5408 readonly attribute <ref>ApplicationInformation</ref> appInfo;
5410 readonly attribute <ref>ApplicationContextId</ref> contextId;
5412 void exit() raises(<ref>WebAPIException</ref>);
5414 void hide() raises(<ref>WebAPIException</ref>);
5416 <ref>RequestedApplicationControl</ref> getRequestedAppControl() raises(<ref>WebAPIException</ref>);
5420 [NoInterfaceObject] interface ApplicationInformation {
5422 readonly attribute <ref>ApplicationId</ref> id;
5424 readonly attribute DOMString name;
5426 readonly attribute DOMString iconPath;
5428 readonly attribute DOMString version;
5430 readonly attribute boolean show;
5432 readonly attribute DOMString[] categories;
5434 readonly attribute Date installDate;
5436 readonly attribute long size raises(<ref>WebAPIException</ref>);
5438 readonly attribute <ref>PackageId</ref> packageId;
5441 [NoInterfaceObject] interface ApplicationContext {
5443 readonly attribute <ref>ApplicationContextId</ref> id;
5445 readonly attribute <ref>ApplicationId</ref> appId;
5449 [Constructor(DOMString key, DOMString[] value)]
5450 interface ApplicationControlData {
5452 attribute DOMString key;
5454 attribute DOMString[] value;
5458 [Constructor(DOMString operation, optional DOMString? uri,
5459 optional DOMString? mime, optional DOMString? category,
5460 optional <ref>ApplicationControlData</ref>[]? data)]
5461 interface ApplicationControl {
5463 attribute DOMString operation;
5465 attribute DOMString? uri;
5467 attribute DOMString? mime;
5469 attribute DOMString? category;
5471 attribute <ref>ApplicationControlData</ref>[] data;
5475 [NoInterfaceObject] interface RequestedApplicationControl {
5477 readonly attribute <ref>ApplicationControl</ref> appControl;
5479 readonly attribute <ref>ApplicationId</ref> callerAppId;
5481 void replyResult(optional <ref>ApplicationControlData</ref>[]? data) raises(<ref>WebAPIException</ref>);
5483 void replyFailure() raises(<ref>WebAPIException</ref>);
5488 [NoInterfaceObject] interface ApplicationCertificate {
5490 readonly attribute DOMString type;
5492 readonly attribute DOMString value;
5497 [NoInterfaceObject] interface ApplicationMetaData {
5499 readonly attribute DOMString key;
5501 readonly attribute DOMString value;
5506 [Callback=FunctionOnly, NoInterfaceObject] interface ApplicationInformationArraySuccessCallback {
5507 void onsuccess(<ref>ApplicationInformation</ref>[] informationArray);
5510 [Callback=FunctionOnly, NoInterfaceObject] interface FindAppControlSuccessCallback {
5511 void onsuccess(<ref>ApplicationInformation</ref>[] informationArray, <ref>ApplicationControl</ref> appControl);
5514 [Callback=FunctionOnly, NoInterfaceObject] interface ApplicationContextArraySuccessCallback {
5515 void onsuccess(<ref>ApplicationContext</ref>[] contexts);
5518 [Callback, NoInterfaceObject] interface ApplicationControlDataArrayReplyCallback {
5519 void onsuccess(optional <ref>ApplicationControlData</ref>[]? data);
5524 [Callback, NoInterfaceObject] interface ApplicationInformationEventCallback {
5525 void oninstalled(<ref>ApplicationInformation</ref> info);
5527 void onupdated(<ref>ApplicationInformation</ref> info);
5529 void onuninstalled(<ref>ApplicationId</ref> id);
5535 This API provides a way to launch other applications and access
5536 application management.
5540 The <em>ApplicationManager</em> interface also provides methods to launch other applications
5541 explicitly and implicitly through the <em>ApplicationControl</em> interface.
5542 The <em>ApplicationControl</em> interface consists of an operation, URI, and MIME type
5543 and also describes an action to be performed by other
5544 applications and can carry the result from the subsequent application.
5545 The <em>ApplicationManager</em> interface also provides methods to handle the application
5546 lifecycle, to access the installed applications on the device, and to let
5547 an application be notified of a change in the application list.
5550 The <em>Application</em> interface defines the current application's information and
5551 the basic operations for current application such as exit or hide.
5554 For more information on the Application features, see <a href="../../org.tizen.web.appprogramming/html/guide/app_guide/application.htm">Application Guide</a>.
5561 <Typedef name="ApplicationId" id="::Application::ApplicationId">
5562 <webidl> typedef DOMString ApplicationId;</webidl>
5565 The unique ID for an installed application.
5571 <Type type="DOMString"/>
5573 <Typedef name="ApplicationContextId" id="::Application::ApplicationContextId">
5574 <webidl> typedef DOMString ApplicationContextId;</webidl>
5577 The unique ID for a running application.
5583 <Type type="DOMString"/>
5585 <Interface name="ApplicationManagerObject" id="::Application::ApplicationManagerObject">
5586 <webidl> [NoInterfaceObject] interface ApplicationManagerObject {
5587 readonly attribute <ref>ApplicationManager</ref> application;
5591 This interface defines what is instantiated by the <em>Tizen </em>object by the Tizen Platform.
5595 There will be a <em>tizen.application </em>object that allows access to Application API functionality.
5602 <ExtendedAttributeList>
5603 <ExtendedAttribute name="NoInterfaceObject">
5604 <webidl>NoInterfaceObject</webidl>
5605 </ExtendedAttribute>
5606 </ExtendedAttributeList>
5607 <Attribute readonly="readonly" name="application" id="::Application::ApplicationManagerObject::application">
5608 <webidl> readonly attribute <ref>ApplicationManager</ref> application;</webidl>
5609 <Type name="ApplicationManager"/>
5612 <Implements name1="Tizen" name2="ApplicationManagerObject">
5613 <webidl> <ref>Tizen</ref> implements <ref>ApplicationManagerObject</ref>;</webidl>
5615 <Interface name="ApplicationManager" id="::Application::ApplicationManager">
5616 <webidl> [NoInterfaceObject] interface ApplicationManager {
5618 <ref>Application</ref> getCurrentApplication() raises(<ref>WebAPIException</ref>);
5620 void kill(<ref>ApplicationContextId</ref> contextId,
5621 optional <ref>SuccessCallback</ref>? successCallback,
5622 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5624 void launch(<ref>ApplicationId</ref> id,
5625 optional <ref>SuccessCallback</ref>? successCallback,
5626 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5628 void launchAppControl(<ref>ApplicationControl</ref> appControl,
5629 optional <ref>ApplicationId</ref>? id,
5630 optional <ref>SuccessCallback</ref>? successCallback,
5631 optional <ref>ErrorCallback</ref>? errorCallback,
5632 optional <ref>ApplicationControlDataArrayReplyCallback</ref>? replyCallback) raises(<ref>WebAPIException</ref>);
5634 void findAppControl(<ref>ApplicationControl</ref> appControl,
5635 <ref>FindAppControlSuccessCallback</ref> successCallback,
5636 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5638 void getAppsContext(<ref>ApplicationContextArraySuccessCallback</ref> successCallback,
5639 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5641 <ref>ApplicationContext</ref> getAppContext(optional <ref>ApplicationContextId</ref>? contextId) raises(<ref>WebAPIException</ref>);
5643 void getAppsInfo(<ref>ApplicationInformationArraySuccessCallback</ref> successCallback,
5644 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5646 <ref>ApplicationInformation</ref> getAppInfo(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);
5648 <ref>ApplicationCertificate</ref>[] getAppCerts(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);
5650 DOMString getAppSharedURI(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);
5652 <ref>ApplicationMetaData</ref>[] getAppMetaData(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);
5654 long addAppInfoEventListener(<ref>ApplicationInformationEventCallback</ref> eventCallback) raises(<ref>WebAPIException</ref>);
5656 void removeAppInfoEventListener(long watchId) raises(<ref>WebAPIException</ref>);
5661 This section defines the application manager interface.
5667 <ExtendedAttributeList>
5668 <ExtendedAttribute name="NoInterfaceObject">
5669 <webidl>NoInterfaceObject</webidl>
5670 </ExtendedAttribute>
5671 </ExtendedAttributeList>
5672 <Operation name="getCurrentApplication" id="::Application::ApplicationManager::getCurrentApplication">
5673 <webidl> <ref>Application</ref> getCurrentApplication() raises(<ref>WebAPIException</ref>);</webidl>
5676 Gets the <em>Application </em>object defining the current application.
5681 <Code> var app = tizen.application.getCurrentApplication();
5682 console.log("Current application's app id is " + app.appInfo.id);
5685 <Type name="Application">
5688 Application The data structure that defines current application.
5694 <RaiseException name="WebAPIException">
5697 with error type UnknownError, if the application cannot be retrieved because of an unknown error.
5703 <Operation name="kill" id="::Application::ApplicationManager::kill">
5704 <webidl> void kill(<ref>ApplicationContextId</ref> contextId,
5705 optional <ref>SuccessCallback</ref>? successCallback,
5706 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
5709 Kills an application with the specified application context ID.
5713 The <em>ErrorCallback() </em>is launched with these error types:
5717 NotFoundError - If the context is not found with specified context ID. </li>
5719 InvalidValuesError - If any of the input parameters contain an invalid value
5720 or if the specified context ID matches the context ID of the calling application. </li>
5722 UnknownError - If any other error occurs. </li>
5732 http://tizen.org/privilege/appmanager.kill
5734 <Code> function onKillSuccess() {
5735 console.log("Application terminated successfully");
5738 function onRunningAppsContext(contexts) {
5739 // let's assume that the application "targetApp0.main" has been installed.
5740 var targetId = "targetApp0.main";
5742 for (var i = 0; i < contexts.length; i++) {
5743 if (contexts[i].appId == targetId) {
5744 tizen.application.kill(contexts[i].id, onKillSuccess);
5749 tizen.application.getAppsContext(onRunningAppsContext);
5754 <Argument name="contextId">
5757 The identifier of the application to kill
5760 <Type name="ApplicationContextId"/>
5762 <Argument optional="optional" name="successCallback">
5765 The method to invoke when an application is killed successfully.
5768 <Type name="SuccessCallback" nullable="nullable"/>
5770 <Argument optional="optional" name="errorCallback">
5773 The method to invoke when an error occurs.
5776 <Type name="ErrorCallback" nullable="nullable"/>
5780 <RaiseException name="WebAPIException">
5783 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
5786 with error type SecurityError, if the application does not have the privilege to call this method.
5792 <Operation name="launch" id="::Application::ApplicationManager::launch">
5793 <webidl> void launch(<ref>ApplicationId</ref> id,
5794 optional <ref>SuccessCallback</ref>? successCallback,
5795 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
5798 Launches an application with the given application ID.
5802 The <em>ErrorCallback()</em> is launched with these error types:
5806 NotFoundError - If the application is not found with given ID. </li>
5808 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
5810 UnknownError - If any other error occurs. </li>
5820 http://tizen.org/privilege/application.launch
5822 <Code> function onsuccess() {
5823 console.log("The application has launched successfully");
5826 // let's assume that application "targetApp0.main" has been installed
5827 tizen.application.launch("targetApp0.main", onsuccess);
5832 <Argument name="id">
5835 A unique string representing application ID.
5838 <Type name="ApplicationId"/>
5840 <Argument optional="optional" name="successCallback">
5843 The method to call when the invocation ends successfully.
5846 <Type name="SuccessCallback" nullable="nullable"/>
5848 <Argument optional="optional" name="errorCallback">
5851 The method to call when an error occurs.
5854 <Type name="ErrorCallback" nullable="nullable"/>
5858 <RaiseException name="WebAPIException">
5861 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
5864 with error type SecurityError, if the application does not have the privilege to call this method.
5870 <Operation name="launchAppControl" id="::Application::ApplicationManager::launchAppControl">
5871 <webidl> void launchAppControl(<ref>ApplicationControl</ref> appControl,
5872 optional <ref>ApplicationId</ref>? id,
5873 optional <ref>SuccessCallback</ref>? successCallback,
5874 optional <ref>ErrorCallback</ref>? errorCallback,
5875 optional <ref>ApplicationControlDataArrayReplyCallback</ref>? replyCallback) raises(<ref>WebAPIException</ref>);</webidl>
5878 Launches an application with the specified application control.
5882 An application can launch other applications with the application control,
5883 and get back the results from the launched applications.
5886 The application control consists of an operation, URI, and MIME type, and describes
5887 the request to be performed by the newly launched application. The
5888 application control is passed to the <em>launchAppControl()</em> method to launch an
5889 application. The system tries to find the proper application
5890 to perform the requested application control, then launches the selected application.
5893 The application control request is passed to the newly launched application
5894 and it can be accessed by <em>getRequestedAppControl() </em>method. The passed
5895 application control contains the reason the application was launched and
5896 information about what the application is doing. The launched application
5897 can send a result to the caller application with the <em>replyResult() </em>method of
5898 <em>RequestedApplicationControl</em> interface.
5901 The <em>ErrorCallback() </em>is launched with these error types:
5905 NotFoundError - If system cannot find the application that matches the specified application control. </li>
5907 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
5909 UnknownError: If any other error occurs. </li>
5919 http://tizen.org/privilege/application.launch
5921 <Code> var appControl = new tizen.ApplicationControl(
5922 "http://tizen.org/appcontrol/operation/pick",
5924 "image/jpeg",
5927 var appControlReplyCallback = {
5928 // callee sent a reply
5929 onsuccess: function(data) {
5930 for (var i = 0; i < data.length; i++) {
5931 if (data[i].key == "http://tizen.org/appcontrol/data/selected") {
5932 console.log('Selected image is ' + data[i].value[0]);
5936 // callee returned failure
5937 onfailure: function() {
5938 console.log('The launch application control failed');
5942 tizen.application.launchAppControl(
5945 function() {console.log("launch application control succeed"); },
5946 function(e) {console.log("launch application control failed. reason: " + e.message); },
5947 appControlReplyCallback );
5952 <Argument name="appControl">
5955 The data structure describing application control details.
5958 <Type name="ApplicationControl"/>
5960 <Argument optional="optional" name="id">
5963 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.
5966 <Type name="ApplicationId" nullable="nullable"/>
5968 <Argument optional="optional" name="successCallback">
5971 The method to call when the invocation ends successfully.
5974 <Type name="SuccessCallback" nullable="nullable"/>
5976 <Argument optional="optional" name="errorCallback">
5979 The method to invoke when an error occurs.
5982 <Type name="ErrorCallback" nullable="nullable"/>
5984 <Argument optional="optional" name="replyCallback">
5987 The method to invoke when the application gets back results from the launched application.
5990 <Type name="ApplicationControlDataArrayReplyCallback" nullable="nullable"/>
5994 <RaiseException name="WebAPIException">
5997 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6000 with error type SecurityError, if the application does not have the privilege to call this method.
6006 <Operation name="findAppControl" id="::Application::ApplicationManager::findAppControl">
6007 <webidl> void findAppControl(<ref>ApplicationControl</ref> appControl,
6008 <ref>FindAppControlSuccessCallback</ref> successCallback,
6009 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
6012 Finds application information can be launched with the given application control.
6016 An application can get a list of other applications can be launched with the application control.
6019 The <em>ErrorCallback()<em> is launched with these error types:
6023 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
6025 UnknownError - If any other error occurs. </li>
6031 <Code> var appControl = new tizen.ApplicationControl(
6032 "http://tizen.org/appcontrol/operation/pick",
6034 "image/jpeg",
6037 function successCB(appInfos, appControl)
6039 // em>appControl/em> is same object with the value passed as first parameter to em>findAppControl()/em>
6040 var appControlReplyCallback = {
6041 // callee sent a reply
6042 onsuccess: function(data) {
6043 for (var i = 0; i < data.length; i++) {
6044 if (data[i].key == "http://tizen.org/appcontrol/data/selected") {
6045 console.log('Selected image is ' + data[i].value[0]);
6049 // callee returned failure
6050 onfailure: function() {
6051 console.log('The launch application control failed');
6055 var appId = appInfos[0].id; // select first app's id
6057 tizen.application.launchAppControl(
6060 function() {console.log("launch application control succeed"); },
6061 function(e) {console.log("launch application control failed. reason: " + e.message); },
6062 appControlReplyCallback );
6065 tizen.application.findAppControl(appControl, successCB);
6070 <Argument name="appControl">
6073 A data structure describing application control details.
6076 <Type name="ApplicationControl"/>
6078 <Argument name="successCallback">
6081 The method to call that returns a list of application information.
6084 <Type name="FindAppControlSuccessCallback"/>
6086 <Argument optional="optional" name="errorCallback">
6089 The method to call when an error occurs.
6092 <Type name="ErrorCallback" nullable="nullable"/>
6096 <RaiseException name="WebAPIException">
6099 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6105 <Operation name="getAppsContext" id="::Application::ApplicationManager::getAppsContext">
6106 <webidl> void getAppsContext(<ref>ApplicationContextArraySuccessCallback</ref> successCallback,
6107 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
6110 Gets a list of application contexts for applications that are currently running on a device.
6111 The information contained for each application corresponds to the application state at the time when the list was generated.
6115 The <em>errorCallback()</em> is launched with this error type:
6119 UnknownError - If an unknown error occurs. </li>
6125 <Code> function onRunningAppsContext(contexts) {
6126 for (var i = 0; i < contexts.length; i++)
6127 console.log("ID : " + contexts[i].id);
6130 tizen.application.getAppsContext(onRunningAppsContext);
6135 <Argument name="successCallback">
6138 The method to call when the invocation ends successfully.
6141 <Type name="ApplicationContextArraySuccessCallback"/>
6143 <Argument optional="optional" name="errorCallback">
6146 The method to call when an error occurs.
6149 <Type name="ErrorCallback" nullable="nullable"/>
6153 <RaiseException name="WebAPIException">
6156 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6162 <Operation name="getAppContext" id="::Application::ApplicationManager::getAppContext">
6163 <webidl> <ref>ApplicationContext</ref> getAppContext(optional <ref>ApplicationContextId</ref>? contextId) raises(<ref>WebAPIException</ref>);</webidl>
6166 Gets the application context for the specified application context ID.
6167 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.
6168 The list of running applications and their application IDs is obtained with <em>getAppsContext()</em>.
6173 <Code> var appContext = tizen.application.getAppContext(null);
6174 console.log("Application context retrieved for app " + appContext.appId);
6177 <Type name="ApplicationContext">
6180 ApplicationContext A data structure that lists running application details.
6185 <Argument optional="optional" name="contextId">
6188 A string representing an application context ID. If the ID is not provided, the application context of the calling application will be returned.
6191 <Type name="ApplicationContextId" nullable="nullable"/>
6195 <RaiseException name="WebAPIException">
6198 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6201 with error type NotFoundError, if the application context is not found with provided ID.
6204 with error type UnknownError, if the application context cannot be retrieved because of an unknown error.
6210 <Operation name="getAppsInfo" id="::Application::ApplicationManager::getAppsInfo">
6211 <webidl> void getAppsInfo(<ref>ApplicationInformationArraySuccessCallback</ref> successCallback,
6212 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
6215 Gets the list of installed application's information on a device.
6216 The information contained on each application corresponds to the application state at the moment when the list was generated.
6220 The <em>errorCallback()</em> is launched with this error type:
6224 UnknownError - If an unknown error occurs. </li>
6230 <Code> function onListInstalledApps(applications) {
6231 for (var i = 0; i < applications.length; i++)
6232 console.log("ID : " + applications[i].id);
6235 tizen.application.getAppsInfo(onListInstalledApps);
6240 <Argument name="successCallback">
6243 The method to call when the invocation ends successfully.
6246 <Type name="ApplicationInformationArraySuccessCallback"/>
6248 <Argument optional="optional" name="errorCallback">
6251 The method to call when an error occurs.
6254 <Type name="ErrorCallback" nullable="nullable"/>
6258 <RaiseException name="WebAPIException">
6261 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6267 <Operation name="getAppInfo" id="::Application::ApplicationManager::getAppInfo">
6268 <webidl> <ref>ApplicationInformation</ref> getAppInfo(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);</webidl>
6271 Gets application information for a specified application ID.
6275 If the ID is set to <var>null</var> or not set at all, it returns application information for the current application.
6276 The list of installed applications and their application IDs is obtained with <em>getAppsInfo()</em>.
6282 <Code> var appInfo = tizen.application.getAppInfo(null);
6283 console.log("Current application name : " + appInfo.name);
6286 <Type name="ApplicationInformation">
6289 ApplicationInformation The information of an application.
6294 <Argument optional="optional" name="id">
6297 A string representing application ID. If the ID is not provided, the application information of the calling application will be returned.
6300 <Type name="ApplicationId" nullable="nullable"/>
6304 <RaiseException name="WebAPIException">
6307 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6310 with error type NotFoundError, if the application is not found with specified ID.
6313 with error type UnknownError, if the application cannot be retrieved because of an unknown error.
6319 <Operation name="getAppCerts" id="::Application::ApplicationManager::getAppCerts">
6320 <webidl> <ref>ApplicationCertificate</ref>[] getAppCerts(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);</webidl>
6323 Gets application certificates for a specified application ID.
6327 If the ID is set to <var>null</var> or not set at all, it returns application certificates for the current application.
6330 The certificate types are listed below
6334 AUTHOR_ROOT - Author Root Certificate </li>
6336 AUTHOR_INTERMEDIATE - Author Intermediate Certificate </li>
6338 AUTHOR_SIGNER - Author Signer Certificate </li>
6340 DISTRIBUTOR_ROOT - Distributor Root Certificate </li>
6342 DISTRIBUTOR_INTERMEDIATE - Distributor Intermediate Certificate </li>
6344 DISTRIBUTOR_SIGNER - Distributor Signer Certificate </li>
6346 DISTRIBUTOR2_ROOT - Distributor2 Root Certificate </li>
6348 DISTRIBUTOR2_INTERMEDIATE - Distributor2 Intermediate Certificate </li>
6350 DISTRIBUTOR2_SIGNER - Distributor2 Signer Certificate </li>
6360 http://tizen.org/privilege/appmanager.certificate
6362 <Code> var appCerts = tizen.application.getAppCerts(null);
6364 for (var i = 0; i < appCerts.length; i++) {
6365 console.log("#" + i + " type:" + appCerts[i].type);
6366 console.log("#" + i + " value:" + appCerts[i].value);
6373 ApplicationCertificate[] Array of certificate information of a specified application
6376 <Type name="ApplicationCertificate"/>
6379 <Argument optional="optional" name="id">
6382 A string representing application ID. If the ID is not provided, the application certificate of the calling application will be returned.
6385 <Type name="ApplicationId" nullable="nullable"/>
6389 <RaiseException name="WebAPIException">
6392 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6395 with error type SecurityError, if the application does not have the privilege to call this method.
6398 with error type NotFoundError, if the application is not found with specified ID.
6401 with error type UnknownError, if the application cannot be retrieved because of an unknown error.
6407 <Operation name="getAppSharedURI" id="::Application::ApplicationManager::getAppSharedURI">
6408 <webidl> DOMString getAppSharedURI(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);</webidl>
6411 Gets URI of read-only shared directory of application for a specified application ID.
6415 The shared directory is used to export data to other applications.
6416 If the ID is set to <var>null</var> or not set at all, it returns shared directory URI for the current application.
6422 <Code> var sharedDir = tizen.application.getAppSharedURI(null);
6423 console.log("shared directory : " + sharedDir);
6426 <Type type="DOMString">
6429 DOMString The shared directory URI of application
6434 <Argument optional="optional" name="id">
6437 A string representing application ID. If the ID is not provided, the shared directory URI of the calling application will be returned.
6440 <Type name="ApplicationId" nullable="nullable"/>
6444 <RaiseException name="WebAPIException">
6447 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6450 with error type NotFoundError, if the application is not found with specified ID.
6453 with error type UnknownError, if the application cannot be retrieved because of an unknown error.
6459 <Operation name="getAppMetaData" id="::Application::ApplicationManager::getAppMetaData">
6460 <webidl> <ref>ApplicationMetaData</ref>[] getAppMetaData(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);</webidl>
6463 Gets application meta data array for a specified application ID.
6467 If the ID is set to <var>null</var> or not set at all, it returns application meta data array for the current application.
6477 http://tizen.org/privilege/application.info
6479 <Code> var metaDataArray = tizen.application.getAppMetaData(null);
6480 console.log("size of metadata : " + metaDataArray.length);
6487 ApplicationMetaData[] Array of meta data of a specified application. If there are no meta data for a specified application,
6488 empty array will be returned
6491 <Type name="ApplicationMetaData"/>
6494 <Argument optional="optional" name="id">
6497 A string representing application ID. If the ID is not provided, the application metadata array of the calling application will be returned.
6500 <Type name="ApplicationId" nullable="nullable"/>
6504 <RaiseException name="WebAPIException">
6507 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6510 with error type SecurityError, if the application does not have the privilege to call this method.
6513 with error type NotFoundError, if the application is not found with specified ID.
6516 with error type UnknownError, if the application cannot be retrieved because of an unknown error.
6522 <Operation name="addAppInfoEventListener" id="::Application::ApplicationManager::addAppInfoEventListener">
6523 <webidl> long addAppInfoEventListener(<ref>ApplicationInformationEventCallback</ref> eventCallback) raises(<ref>WebAPIException</ref>);</webidl>
6526 Adds a listener for receiving any notification for changes in the list of the installed applications
6531 It install a callback that is triggered every time a change occurs on
6532 the list of installed applications on a device. This change may
6533 be occurred by a new installation, uninstallation, or update of an application.
6536 When executed, the implementation must immediately return a listener
6537 ID that identifies the listener. After returning the ID, the change
6538 detection operation is started asynchronously.
6541 The <em>ApplicationInformationEventCallback </em>must be invoked every time a new
6542 application is installed, removed, or updated.
6545 The change detection must continue until the <em>removeAppInfoEventListener()</em> method is called
6546 with the corresponding listener identifier.
6552 <Code> var appEventCallback = {
6553 oninstalled: function(appInfo) {
6554 console.log('The application ' + appInfo.name + ' is installed');
6556 onupdated: function(appInfo) {
6557 console.log('The application ' + appInfo.name + ' is updated');
6559 onuninstalled: function(appid) {
6560 console.log('The application ' + appid + ' is uninstalled');
6563 var watchId = tizen.application.addAppInfoEventListener(appEventCallback);
6569 long ID of the listener that can be used to remove the listener later.
6574 <Argument name="eventCallback">
6577 The method to call when a change on the installed applications is made.
6580 <Type name="ApplicationInformationEventCallback"/>
6584 <RaiseException name="WebAPIException">
6587 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6590 with error type UnknownError, if fails to add listener because of an unknown error.
6596 <Operation name="removeAppInfoEventListener" id="::Application::ApplicationManager::removeAppInfoEventListener">
6597 <webidl> void removeAppInfoEventListener(long watchId) raises(<ref>WebAPIException</ref>);</webidl>
6600 Removes the listener to stop receiving notifications for changes on the list of installed
6601 applications on a device.
6606 <Code> tizen.application.removeAppInfoEventListener(watchId);
6611 <Argument name="watchId">
6614 An ID that identifies the listener.
6621 <RaiseException name="WebAPIException">
6624 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6627 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
6630 with error type NotFoundError, if the listener is not found with specified ID.
6633 with error type UnknownError, if fails to remove listener because of an unknown error.
6640 <Interface name="Application" id="::Application::Application">
6641 <webidl> [NoInterfaceObject] interface Application {
6643 readonly attribute <ref>ApplicationInformation</ref> appInfo;
6645 readonly attribute <ref>ApplicationContextId</ref> contextId;
6647 void exit() raises(<ref>WebAPIException</ref>);
6649 void hide() raises(<ref>WebAPIException</ref>);
6651 <ref>RequestedApplicationControl</ref> getRequestedAppControl() raises(<ref>WebAPIException</ref>);
6655 This interface defines the current application's information and
6656 the basic operations (such as exit or hide) for the current application .
6662 <ExtendedAttributeList>
6663 <ExtendedAttribute name="NoInterfaceObject">
6664 <webidl>NoInterfaceObject</webidl>
6665 </ExtendedAttribute>
6666 </ExtendedAttributeList>
6667 <Attribute readonly="readonly" name="appInfo" id="::Application::Application::appInfo">
6668 <webidl> readonly attribute <ref>ApplicationInformation</ref> appInfo;</webidl>
6671 An attribute to store the application information for the current application.
6677 <Type name="ApplicationInformation"/>
6679 <Attribute readonly="readonly" name="contextId" id="::Application::Application::contextId">
6680 <webidl> readonly attribute <ref>ApplicationContextId</ref> contextId;</webidl>
6683 An attribute to store the ID of a running application.
6689 <Type name="ApplicationContextId"/>
6691 <Operation name="exit" id="::Application::Application::exit">
6692 <webidl> void exit() raises(<ref>WebAPIException</ref>);</webidl>
6695 Exits the current application.
6700 <Code> var app = tizen.application.getCurrentApplication();
6708 <RaiseException name="WebAPIException">
6711 with error type UnknownError, if any other error occurs.
6717 <Operation name="hide" id="::Application::Application::hide">
6718 <webidl> void hide() raises(<ref>WebAPIException</ref>);</webidl>
6721 Hides the current application.
6726 <Code> var app = tizen.application.getCurrentApplication();
6734 <RaiseException name="WebAPIException">
6737 with error type UnknownError, if any other error occurs.
6743 <Operation name="getRequestedAppControl" id="::Application::Application::getRequestedAppControl">
6744 <webidl> <ref>RequestedApplicationControl</ref> getRequestedAppControl() raises(<ref>WebAPIException</ref>);</webidl>
6747 Gets the requested application control passed to the current application.
6751 Gets the requested application control that contains the application control
6752 passed by the <em>launchAppControl()</em> method from the calling application.
6753 The requested application control contains the reason the application
6754 was launched and what it has to perform. For example, an application
6755 might be launched to display an image on a page by other
6756 application's request. In all of these cases, the application is
6757 responsible for checking the contents of the application control and responding
6758 appropriately when it is launched.
6764 <Code> var reqAppControl = tizen.application.getCurrentApplication().getRequestedAppControl();
6766 if (reqAppControl) {
6767 console.log("Requester AppID : " + reqAppControl.callerAppId);
6771 <Type name="RequestedApplicationControl">
6774 RequestedApplicationControl The details of an requested application control
6780 <RaiseException name="WebAPIException">
6783 with error type UnknownError, if the application control cannot be retrieved because of an unknown error.
6790 <Interface name="ApplicationInformation" id="::Application::ApplicationInformation">
6791 <webidl> [NoInterfaceObject] interface ApplicationInformation {
6793 readonly attribute <ref>ApplicationId</ref> id;
6795 readonly attribute DOMString name;
6797 readonly attribute DOMString iconPath;
6799 readonly attribute DOMString version;
6801 readonly attribute boolean show;
6803 readonly attribute DOMString[] categories;
6805 readonly attribute Date installDate;
6807 readonly attribute long size raises(<ref>WebAPIException</ref>);
6809 readonly attribute <ref>PackageId</ref> packageId;
6813 This interface defines the general information available to an installed application.
6819 <ExtendedAttributeList>
6820 <ExtendedAttribute name="NoInterfaceObject">
6821 <webidl>NoInterfaceObject</webidl>
6822 </ExtendedAttribute>
6823 </ExtendedAttributeList>
6824 <Attribute readonly="readonly" name="id" id="::Application::ApplicationInformation::id">
6825 <webidl> readonly attribute <ref>ApplicationId</ref> id;</webidl>
6828 An attribute to store the identifier of an application for application management.
6834 <Type name="ApplicationId"/>
6836 <Attribute readonly="readonly" name="name" id="::Application::ApplicationInformation::name">
6837 <webidl> readonly attribute DOMString name;</webidl>
6840 An attribute to store the name of an application.
6846 <Type type="DOMString"/>
6848 <Attribute readonly="readonly" name="iconPath" id="::Application::ApplicationInformation::iconPath">
6849 <webidl> readonly attribute DOMString iconPath;</webidl>
6852 An attribute to store the icon path of an application.
6858 <Type type="DOMString"/>
6860 <Attribute readonly="readonly" name="version" id="::Application::ApplicationInformation::version">
6861 <webidl> readonly attribute DOMString version;</webidl>
6864 An attribute to store the version of an application.
6870 <Type type="DOMString"/>
6872 <Attribute readonly="readonly" name="show" id="::Application::ApplicationInformation::show">
6873 <webidl> readonly attribute boolean show;</webidl>
6876 An attribute that determines whether the application information should
6877 be shown (such as in the menus) or not.
6883 <Type type="boolean"/>
6885 <Attribute readonly="readonly" name="categories" id="::Application::ApplicationInformation::categories">
6886 <webidl> readonly attribute DOMString[] categories;</webidl>
6889 An array of attributes to store the categories that the app belongs to.
6896 <Type type="DOMString"/>
6899 <Attribute readonly="readonly" name="installDate" id="::Application::ApplicationInformation::installDate">
6900 <webidl> readonly attribute Date installDate;</webidl>
6903 An attribute to store the application install/update time.
6911 <Attribute readonly="readonly" name="size" id="::Application::ApplicationInformation::size">
6912 <webidl> readonly attribute long size raises(<ref>WebAPIException</ref>);</webidl>
6915 An attribute to store the application size (installed space).
6924 http://tizen.org/privilege/application.info
6929 <RaiseException name="WebAPIException">
6932 with error type SecurityError, if this attribute is not allowed.
6938 <Attribute readonly="readonly" name="packageId" id="::Application::ApplicationInformation::packageId">
6939 <webidl> readonly attribute <ref>PackageId</ref> packageId;</webidl>
6942 An attribute to store the package ID of application.
6948 <Type name="PackageId"/>
6951 <Interface name="ApplicationContext" id="::Application::ApplicationContext">
6952 <webidl> [NoInterfaceObject] interface ApplicationContext {
6954 readonly attribute <ref>ApplicationContextId</ref> id;
6956 readonly attribute <ref>ApplicationId</ref> appId;
6961 This interface defines the information available about a running
6968 <ExtendedAttributeList>
6969 <ExtendedAttribute name="NoInterfaceObject">
6970 <webidl>NoInterfaceObject</webidl>
6971 </ExtendedAttribute>
6972 </ExtendedAttributeList>
6973 <Attribute readonly="readonly" name="id" id="::Application::ApplicationContext::id">
6974 <webidl> readonly attribute <ref>ApplicationContextId</ref> id;</webidl>
6977 An attribute to store the ID of a running application.
6983 <Type name="ApplicationContextId"/>
6985 <Attribute readonly="readonly" name="appId" id="::Application::ApplicationContext::appId">
6986 <webidl> readonly attribute <ref>ApplicationId</ref> appId;</webidl>
6989 An attribute to store the ID of an installed application.
6995 <Type name="ApplicationId"/>
6998 <Interface name="ApplicationControlData" id="::Application::ApplicationControlData">
6999 <webidl> [Constructor(DOMString key, DOMString[] value)]
7000 interface ApplicationControlData {
7002 attribute DOMString key;
7004 attribute DOMString[] value;
7009 This interface defines a key/value pair used to pass data
7010 between applications through the <em>ApplicationControl </em>interface.
7015 <Code> var appControlData = new tizen.ApplicationControlData("image", [imagedata1]);
7018 <ExtendedAttributeList>
7019 <ExtendedAttribute name="Constructor">
7020 <webidl>Constructor(DOMString key, DOMString[] value)</webidl>
7022 <Argument name="key">
7023 <Type type="DOMString"/>
7025 <Argument name="value">
7027 <Type type="DOMString"/>
7031 </ExtendedAttribute>
7032 </ExtendedAttributeList>
7033 <Attribute name="key" id="::Application::ApplicationControlData::key">
7034 <webidl> attribute DOMString key;</webidl>
7037 An attribute to store the name of a key.
7043 <Type type="DOMString"/>
7045 <Attribute name="value" id="::Application::ApplicationControlData::value">
7046 <webidl> attribute DOMString[] value;</webidl>
7049 An attribute to store the value associated with a key.
7056 <Type type="DOMString"/>
7060 <Interface name="ApplicationControl" id="::Application::ApplicationControl">
7061 <webidl> [Constructor(DOMString operation, optional DOMString? uri,
7062 optional DOMString? mime, optional DOMString? category,
7063 optional <ref>ApplicationControlData</ref>[]? data)]
7064 interface ApplicationControl {
7066 attribute DOMString operation;
7068 attribute DOMString? uri;
7070 attribute DOMString? mime;
7072 attribute DOMString? category;
7074 attribute <ref>ApplicationControlData</ref>[] data;
7079 This interface consists of an operation, URI, MIME type,
7080 and data. It describes an action to be performed by other applications
7081 and is passed to launch other applications.
7082 If the system gets the application control request, it finds
7083 the corresponding application to be launched with the delivered application control
7084 and launches the selected application.
7089 <Code> var appControl =
7090 new tizen.ApplicationControl(
7091 "http://tizen.org/appcontrol/operation/view",
7093 "image/jpeg",
7095 [new tizen.ApplicationControlData("images",
7096 [imagedata1, imagedata2])] );
7099 <ExtendedAttributeList>
7100 <ExtendedAttribute name="Constructor">
7101 <webidl>Constructor(DOMString operation, optional DOMString? uri,
7102 optional DOMString? mime, optional DOMString? category,
7103 optional <ref>ApplicationControlData</ref>[]? data)</webidl>
7105 <Argument name="operation">
7106 <Type type="DOMString"/>
7108 <Argument optional="optional" name="uri">
7109 <Type type="DOMString" nullable="nullable"/>
7111 <Argument optional="optional" name="mime">
7112 <Type type="DOMString" nullable="nullable"/>
7114 <Argument optional="optional" name="category">
7115 <Type type="DOMString" nullable="nullable"/>
7117 <Argument optional="optional" name="data">
7118 <Type type="array" nullable="nullable">
7119 <Type name="ApplicationControlData"/>
7123 </ExtendedAttribute>
7124 </ExtendedAttributeList>
7125 <Attribute name="operation" id="::Application::ApplicationControl::operation">
7126 <webidl> attribute DOMString operation;</webidl>
7129 An attribute to store the string that defines the action to be
7130 performed by an application control.
7136 <Type type="DOMString"/>
7138 <Attribute name="uri" id="::Application::ApplicationControl::uri">
7139 <webidl> attribute DOMString? uri;</webidl>
7142 An attribute to store the URI needed by application control.
7148 <Type type="DOMString" nullable="nullable"/>
7150 <Attribute name="mime" id="::Application::ApplicationControl::mime">
7151 <webidl> attribute DOMString? mime;</webidl>
7154 An attribute to store the MIME type of a content.
7160 <Type type="DOMString" nullable="nullable"/>
7162 <Attribute name="category" id="::Application::ApplicationControl::category">
7163 <webidl> attribute DOMString? category;</webidl>
7166 An attribute to store the category of the application to be launched.
7172 <Type type="DOMString" nullable="nullable"/>
7174 <Attribute name="data" id="::Application::ApplicationControl::data">
7175 <webidl> attribute <ref>ApplicationControlData</ref>[] data;</webidl>
7178 An array of attributes to store the data needed for an application control.
7185 <Type name="ApplicationControlData"/>
7189 <Interface name="RequestedApplicationControl" id="::Application::RequestedApplicationControl">
7190 <webidl> [NoInterfaceObject] interface RequestedApplicationControl {
7192 readonly attribute <ref>ApplicationControl</ref> appControl;
7194 readonly attribute <ref>ApplicationId</ref> callerAppId;
7196 void replyResult(optional <ref>ApplicationControlData</ref>[]? data) raises(<ref>WebAPIException</ref>);
7198 void replyFailure() raises(<ref>WebAPIException</ref>);
7203 This interface has an application control information requested and passed
7204 from other application and is passed to launch other applications. The newly
7205 launched application can get the requested application control through <em>getRequestedAppControl()</em> method, and send the results
7206 to the calling application through the <em>replyResult()</em> method after performing the
7207 required action requested the calling application.
7212 <Code> var reqAppControl = tizen.application.getCurrentApplication().getRequestedAppControl();
7213 if (reqAppControl) {
7214 console.log("Requester AppID : " + reqAppControl.callerAppId);
7216 var appControl = reqAppControl.appControl;
7217 if (appControl.operation == "http://tizen.org/appcontrol/operation/pick") {
7218 var data = new tizen.ApplicationControlData("http://tizen.org/appcontrol/data/selected", ["Image1.jpg"]);
7219 reqAppControl.replyResult([data]);
7224 <ExtendedAttributeList>
7225 <ExtendedAttribute name="NoInterfaceObject">
7226 <webidl>NoInterfaceObject</webidl>
7227 </ExtendedAttribute>
7228 </ExtendedAttributeList>
7229 <Attribute readonly="readonly" name="appControl" id="::Application::RequestedApplicationControl::appControl">
7230 <webidl> readonly attribute <ref>ApplicationControl</ref> appControl;</webidl>
7233 An attribute to store the application control object that describes caller application's request.
7234 It contains the information that the calling application passed to <em>launchAppControl</em>.
7240 <Type name="ApplicationControl"/>
7242 <Attribute readonly="readonly" name="callerAppId" id="::Application::RequestedApplicationControl::callerAppId">
7243 <webidl> readonly attribute <ref>ApplicationId</ref> callerAppId;</webidl>
7246 An attribute to store the caller application's ID
7252 <Type name="ApplicationId"/>
7254 <Operation name="replyResult" id="::Application::RequestedApplicationControl::replyResult">
7255 <webidl> void replyResult(optional <ref>ApplicationControlData</ref>[]? data) raises(<ref>WebAPIException</ref>);</webidl>
7258 Sends the results to the caller application.
7266 <Argument optional="optional" name="data">
7269 An array of ApplicationControlData objects.
7272 <Type type="array" nullable="nullable">
7273 <Type name="ApplicationControlData"/>
7278 <RaiseException name="WebAPIException">
7281 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
7284 with error type NotFoundError, if the caller app is not alive or there is no response from the caller app
7287 with error type UnknownError, if the reply request fails because of an unknown error
7293 <Operation name="replyFailure" id="::Application::RequestedApplicationControl::replyFailure">
7294 <webidl> void replyFailure() raises(<ref>WebAPIException</ref>);</webidl>
7297 Notifies the calling application that the application failed
7298 to perform the requested action.
7307 <RaiseException name="WebAPIException">
7310 with error type NotFoundError, if the caller app is not alive or there is no response from the caller app
7313 with error type UnknownError, if the reply request fails because of an unknown error
7320 <Interface name="ApplicationCertificate" id="::Application::ApplicationCertificate">
7321 <webidl> [NoInterfaceObject] interface ApplicationCertificate {
7323 readonly attribute DOMString type;
7325 readonly attribute DOMString value;
7330 This interface defines the certificate information of an installed application.
7336 <ExtendedAttributeList>
7337 <ExtendedAttribute name="NoInterfaceObject">
7338 <webidl>NoInterfaceObject</webidl>
7339 </ExtendedAttribute>
7340 </ExtendedAttributeList>
7341 <Attribute readonly="readonly" name="type" id="::Application::ApplicationCertificate::type">
7342 <webidl> readonly attribute DOMString type;</webidl>
7345 An attribute to store the type of the application certificate.
7351 <Type type="DOMString"/>
7353 <Attribute readonly="readonly" name="value" id="::Application::ApplicationCertificate::value">
7354 <webidl> readonly attribute DOMString value;</webidl>
7357 An attribute to store the value of the application certificate.
7363 <Type type="DOMString"/>
7366 <Interface name="ApplicationMetaData" id="::Application::ApplicationMetaData">
7367 <webidl> [NoInterfaceObject] interface ApplicationMetaData {
7369 readonly attribute DOMString key;
7371 readonly attribute DOMString value;
7376 This interface defines the meta data of an installed application.
7382 <ExtendedAttributeList>
7383 <ExtendedAttribute name="NoInterfaceObject">
7384 <webidl>NoInterfaceObject</webidl>
7385 </ExtendedAttribute>
7386 </ExtendedAttributeList>
7387 <Attribute readonly="readonly" name="key" id="::Application::ApplicationMetaData::key">
7388 <webidl> readonly attribute DOMString key;</webidl>
7391 An attribute to store the key of the application meta data.
7397 <Type type="DOMString"/>
7399 <Attribute readonly="readonly" name="value" id="::Application::ApplicationMetaData::value">
7400 <webidl> readonly attribute DOMString value;</webidl>
7403 An attribute to store the value of the application meta data.
7409 <Type type="DOMString"/>
7412 <Interface name="ApplicationInformationArraySuccessCallback" id="::Application::ApplicationInformationArraySuccessCallback">
7413 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ApplicationInformationArraySuccessCallback {
7414 void onsuccess(<ref>ApplicationInformation</ref>[] informationArray);
7418 This interface invokes the success callback that is invoked when the installed application list is retrieved.
7422 This callback interface specifies a success method with an array of
7423 <em>ApplicationInformation </em>objects as an input parameter. It is used in <em>ApplicationManager.getAppsInfo()</em>.
7430 <ExtendedAttributeList>
7431 <ExtendedAttribute name="Callback" value="FunctionOnly">
7432 <webidl>Callback</webidl>
7433 </ExtendedAttribute>
7434 <ExtendedAttribute name="NoInterfaceObject">
7435 <webidl> NoInterfaceObject</webidl>
7436 </ExtendedAttribute>
7437 </ExtendedAttributeList>
7438 <Operation name="onsuccess" id="::Application::ApplicationInformationArraySuccessCallback::onsuccess">
7439 <webidl> void onsuccess(<ref>ApplicationInformation</ref>[] informationArray);</webidl>
7442 Called when the asynchronous call completes successfully.
7450 <Argument name="informationArray">
7453 A list of installed applications.
7457 <Type name="ApplicationInformation"/>
7463 <Interface name="FindAppControlSuccessCallback" id="::Application::FindAppControlSuccessCallback">
7464 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface FindAppControlSuccessCallback {
7465 void onsuccess(<ref>ApplicationInformation</ref>[] informationArray, <ref>ApplicationControl</ref> appControl);
7469 This interface specified a success callback that is invoked when system finished searching applications which is matched by specific application control .
7473 This callback interface specifies a success method with an array of
7474 <em>ApplicationInformation </em>objects and application control as an input parameter.
7475 It is used in <em>ApplicationManager.findAppControl()</em>.
7482 <ExtendedAttributeList>
7483 <ExtendedAttribute name="Callback" value="FunctionOnly">
7484 <webidl>Callback</webidl>
7485 </ExtendedAttribute>
7486 <ExtendedAttribute name="NoInterfaceObject">
7487 <webidl> NoInterfaceObject</webidl>
7488 </ExtendedAttribute>
7489 </ExtendedAttributeList>
7490 <Operation name="onsuccess" id="::Application::FindAppControlSuccessCallback::onsuccess">
7491 <webidl> void onsuccess(<ref>ApplicationInformation</ref>[] informationArray, <ref>ApplicationControl</ref> appControl);</webidl>
7494 Called when the asynchronous call completes successfully.
7502 <Argument name="informationArray">
7505 A list of installed applications.
7509 <Type name="ApplicationInformation"/>
7512 <Argument name="appControl">
7515 The application control which were passed on <em>ApplicationManager.findAppControl()</em>.
7518 <Type name="ApplicationControl"/>
7523 <Interface name="ApplicationContextArraySuccessCallback" id="::Application::ApplicationContextArraySuccessCallback">
7524 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ApplicationContextArraySuccessCallback {
7525 void onsuccess(<ref>ApplicationContext</ref>[] contexts);
7529 This callback interface that specifies the success callback that is invoked when the list of running applications is retrieved.
7533 This callback interface specifies a success method with
7534 an array of <em>ApplicationContext </em>objects as an input parameter. It is used in <em>ApplicationManager.getAppsContext()</em>.
7541 <ExtendedAttributeList>
7542 <ExtendedAttribute name="Callback" value="FunctionOnly">
7543 <webidl>Callback</webidl>
7544 </ExtendedAttribute>
7545 <ExtendedAttribute name="NoInterfaceObject">
7546 <webidl> NoInterfaceObject</webidl>
7547 </ExtendedAttribute>
7548 </ExtendedAttributeList>
7549 <Operation name="onsuccess" id="::Application::ApplicationContextArraySuccessCallback::onsuccess">
7550 <webidl> void onsuccess(<ref>ApplicationContext</ref>[] contexts);</webidl>
7553 Called when <em>ApplicationManager.getAppsContext() </em>completes successfully.
7561 <Argument name="contexts">
7564 A list of running applications.
7568 <Type name="ApplicationContext"/>
7574 <Interface name="ApplicationControlDataArrayReplyCallback" id="::Application::ApplicationControlDataArrayReplyCallback">
7575 <webidl> [Callback, NoInterfaceObject] interface ApplicationControlDataArrayReplyCallback {
7576 void onsuccess(optional <ref>ApplicationControlData</ref>[]? data);
7582 This callback interface specifies success callbacks that are invoked as a reply from the requested application control within the application control requester.
7586 This callback interface specifies two methods:
7590 <em>onsuccess()</em> - Invoked by the callee application calls <em>RequestedApplicationControl.replyResult()</em>. </li>
7592 <em>onfailure()</em> - Invoked if the callee application calls <em>RequestedApplicationControl.replyFailure()</em>. </li>
7599 <ExtendedAttributeList>
7600 <ExtendedAttribute name="Callback">
7601 <webidl>Callback</webidl>
7602 </ExtendedAttribute>
7603 <ExtendedAttribute name="NoInterfaceObject">
7604 <webidl> NoInterfaceObject</webidl>
7605 </ExtendedAttribute>
7606 </ExtendedAttributeList>
7607 <Operation name="onsuccess" id="::Application::ApplicationControlDataArrayReplyCallback::onsuccess">
7608 <webidl> void onsuccess(optional <ref>ApplicationControlData</ref>[]? data);</webidl>
7611 Called when the callee application calls <em>RequestedApplicationControl.replyResult()</em>.
7619 <Argument optional="optional" name="data">
7622 An array of <em>ApplicationControlData </em>objects.
7625 <Type type="array" nullable="nullable">
7626 <Type name="ApplicationControlData"/>
7631 <Operation name="onfailure" id="::Application::ApplicationControlDataArrayReplyCallback::onfailure">
7632 <webidl> void onfailure();</webidl>
7635 Called when the callee application calls <em>RequestedApplicationControl.replyFailure()</em>.
7645 <Interface name="ApplicationInformationEventCallback" id="::Application::ApplicationInformationEventCallback">
7646 <webidl> [Callback, NoInterfaceObject] interface ApplicationInformationEventCallback {
7647 void oninstalled(<ref>ApplicationInformation</ref> info);
7649 void onupdated(<ref>ApplicationInformation</ref> info);
7651 void onuninstalled(<ref>ApplicationId</ref> id);
7655 The callback interface to specify for subscribing for notification of changes in the list of installed
7656 applications on a device.
7660 This callback interface specifies methods that will be invoked when
7661 an application is installed, updated, or uninstalled.
7668 <ExtendedAttributeList>
7669 <ExtendedAttribute name="Callback">
7670 <webidl>Callback</webidl>
7671 </ExtendedAttribute>
7672 <ExtendedAttribute name="NoInterfaceObject">
7673 <webidl> NoInterfaceObject</webidl>
7674 </ExtendedAttribute>
7675 </ExtendedAttributeList>
7676 <Operation name="oninstalled" id="::Application::ApplicationInformationEventCallback::oninstalled">
7677 <webidl> void oninstalled(<ref>ApplicationInformation</ref> info);</webidl>
7680 Called when an application is installed.
7688 <Argument name="info">
7691 The application information of the installed application.
7694 <Type name="ApplicationInformation"/>
7698 <Operation name="onupdated" id="::Application::ApplicationInformationEventCallback::onupdated">
7699 <webidl> void onupdated(<ref>ApplicationInformation</ref> info);</webidl>
7702 Called when an application is updated.
7710 <Argument name="info">
7713 The application information of the updated application.
7716 <Type name="ApplicationInformation"/>
7720 <Operation name="onuninstalled" id="::Application::ApplicationInformationEventCallback::onuninstalled">
7721 <webidl> void onuninstalled(<ref>ApplicationId</ref> id);</webidl>
7724 Called when an application is uninstalled.
7732 <Argument name="id">
7735 The ID of the uninstalled application.
7738 <Type name="ApplicationId"/>
7744 <Module name="Bluetooth" id="::Bluetooth">
7745 <webidl>module Bluetooth {
7746 typedef DOMString BluetoothAddress;
7748 typedef DOMString BluetoothUUID;
7750 enum BluetoothSocketState { "CLOSED", "OPEN" };
7752 enum BluetoothProfileType { "HEALTH" };
7754 enum BluetoothHealthChannelType { "RELIABLE", "STREAMING" };
7756 [NoInterfaceObject] interface BluetoothManagerObject {
7757 readonly attribute <ref>BluetoothManager</ref> bluetooth;
7759 <ref>Tizen</ref> implements <ref>BluetoothManagerObject</ref>;
7761 [NoInterfaceObject] interface BluetoothManager {
7762 readonly attribute <ref>BluetoothClassDeviceMajor</ref> deviceMajor;
7763 readonly attribute <ref>BluetoothClassDeviceMinor</ref> deviceMinor;
7764 readonly attribute <ref>BluetoothClassDeviceService</ref> deviceService;
7765 <ref>BluetoothAdapter</ref> getDefaultAdapter() raises(<ref>WebAPIException</ref>);
7769 [NoInterfaceObject] interface BluetoothAdapter {
7770 readonly attribute DOMString name;
7771 readonly attribute <ref>BluetoothAddress</ref> address;
7772 readonly attribute boolean powered;
7773 readonly attribute boolean visible;
7775 void setName(DOMString name,
7776 optional <ref>SuccessCallback</ref>? successCallback,
7777 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
7779 void setPowered(boolean state,
7780 optional <ref>SuccessCallback</ref>? successCallback,
7781 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
7783 void setVisible(boolean mode,
7784 optional <ref>SuccessCallback</ref>? successCallback,
7785 optional <ref>ErrorCallback</ref>? errorCallback,
7786 optional unsigned short? timeout) raises(<ref>WebAPIException</ref>);
7788 void setChangeListener(<ref>BluetoothAdapterChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);
7790 void unsetChangeListener() raises(<ref>WebAPIException</ref>);
7792 void discoverDevices(<ref>BluetoothDiscoverDevicesSuccessCallback</ref> successCallback,
7793 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
7795 void stopDiscovery(optional <ref>SuccessCallback</ref>? successCallback,
7796 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
7798 void getKnownDevices(<ref>BluetoothDeviceArraySuccessCallback</ref> successCallback,
7799 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
7804 void getDevice(<ref>BluetoothAddress</ref> address,
7805 <ref>BluetoothDeviceSuccessCallback</ref> successCallback,
7806 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
7811 void createBonding(<ref>BluetoothAddress</ref> address,
7812 <ref>BluetoothDeviceSuccessCallback</ref> successCallback,
7813 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
7815 void destroyBonding(<ref>BluetoothAddress</ref> address,
7816 optional <ref>SuccessCallback</ref>? successCallback,
7817 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
7821 void registerRFCOMMServiceByUUID(<ref>BluetoothUUID</ref> uuid,
7823 <ref>BluetoothServiceSuccessCallback</ref> successCallback,
7824 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
7826 <ref>BluetoothProfileHandler</ref> getBluetoothProfileHandler(<ref>BluetoothProfileType</ref> profileType) raises(<ref>WebAPIException</ref>);
7829 [NoInterfaceObject] interface BluetoothDevice {
7830 readonly attribute DOMString name;
7831 readonly attribute <ref>BluetoothAddress</ref> address;
7832 readonly attribute <ref>BluetoothClass</ref> deviceClass;
7833 readonly attribute boolean isBonded;
7834 readonly attribute boolean isTrusted;
7835 readonly attribute boolean isConnected;
7836 readonly attribute <ref>BluetoothUUID</ref>[] uuids;
7838 void connectToServiceByUUID(<ref>BluetoothUUID</ref> uuid,
7839 <ref>BluetoothSocketSuccessCallback</ref> successCallback,
7840 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
7842 [NoInterfaceObject] interface BluetoothSocket {
7843 readonly attribute <ref>BluetoothUUID</ref> uuid;
7844 readonly attribute <ref>BluetoothSocketState</ref> state;
7845 readonly attribute <ref>BluetoothDevice</ref> peer;
7846 [TreatNonCallableAsNull] attribute <ref>SuccessCallback</ref>? onmessage raises(<ref>WebAPIException</ref>);
7847 [TreatNonCallableAsNull] attribute <ref>SuccessCallback</ref>? onclose raises(<ref>WebAPIException</ref>);
7848 unsigned long writeData(byte[] data) raises(<ref>WebAPIException</ref>);
7851 byte[] readData() raises(<ref>WebAPIException</ref>);
7854 void close() raises(<ref>WebAPIException</ref>);
7857 [NoInterfaceObject] interface BluetoothClass {
7858 readonly attribute octet major;
7860 readonly attribute octet minor;
7862 readonly attribute unsigned short [] services ;
7864 boolean hasService(unsigned short service) raises(<ref>WebAPIException</ref>);
7867 [NoInterfaceObject] interface BluetoothClassDeviceMajor {
7869 const octet MISC = 0x00;
7870 const octet COMPUTER = 0x01;
7871 const octet PHONE = 0x02;
7872 const octet NETWORK = 0x03;
7873 const octet AUDIO_VIDEO = 0x04;
7874 const octet PERIPHERAL = 0x05;
7875 const octet IMAGING = 0x06;
7876 const octet WEARABLE = 0x07;
7877 const octet TOY = 0x08;
7878 const octet HEALTH = 0x09;
7879 const octet UNCATEGORIZED = 0x1F;
7882 [NoInterfaceObject] interface BluetoothClassDeviceMinor {
7883 const octet COMPUTER_UNCATEGORIZED = 0x00;
7884 const octet COMPUTER_DESKTOP = 0x01;
7885 const octet COMPUTER_SERVER = 0x02;
7886 const octet COMPUTER_LAPTOP = 0x03;
7887 const octet COMPUTER_HANDHELD_PC_OR_PDA = 0x04;
7888 const octet COMPUTER_PALM_PC_OR_PDA = 0x05;
7889 const octet COMPUTER_WEARABLE = 0x06;
7891 const octet PHONE_UNCATEGORIZED = 0x00;
7892 const octet PHONE_CELLULAR = 0x01;
7893 const octet PHONE_CORDLESS = 0x02;
7894 const octet PHONE_SMARTPHONE = 0x03;
7895 const octet PHONE_MODEM_OR_GATEWAY = 0x04;
7896 const octet PHONE_ISDN = 0x05;
7898 const octet AV_UNRECOGNIZED = 0x00;
7899 const octet AV_WEARABLE_HEADSET = 0x01;
7900 const octet AV_HANDSFREE = 0x02;
7901 const octet AV_MICROPHONE = 0x04;
7902 const octet AV_LOUDSPEAKER = 0x05;
7903 const octet AV_HEADPHONES = 0x06;
7904 const octet AV_PORTABLE_AUDIO = 0x07;
7905 const octet AV_CAR_AUDIO = 0x08;
7906 const octet AV_SETTOP_BOX = 0x09;
7907 const octet AV_HIFI = 0x0a;
7908 const octet AV_VCR = 0x0b;
7909 const octet AV_VIDEO_CAMERA = 0x0c;
7910 const octet AV_CAMCORDER = 0x0d;
7911 const octet AV_MONITOR = 0x0e;
7912 const octet AV_DISPLAY_AND_LOUDSPEAKER = 0x0f;
7913 const octet AV_VIDEO_CONFERENCING = 0x10;
7914 const octet AV_GAMING_TOY = 0x12;
7916 const octet PERIPHERAL_UNCATEGORIZED = 0;
7917 const octet PERIPHERAL_KEYBOARD = 0x10;
7918 const octet PERIPHERAL_POINTING_DEVICE = 0x20;
7919 const octet PERIPHERAL_KEYBOARD_AND_POINTING_DEVICE = 0x30;
7920 const octet PERIPHERAL_JOYSTICK = 0x01;
7921 const octet PERIPHERAL_GAMEPAD = 0x02;
7922 const octet PERIPHERAL_REMOTE_CONTROL = 0x03;
7923 const octet PERIPHERAL_SENSING_DEVICE = 0x04;
7924 const octet PERIPHERAL_DEGITIZER_TABLET = 0x05;
7925 const octet PERIPHERAL_CARD_READER = 0x06;
7926 const octet PERIPHERAL_DIGITAL_PEN = 0x07;
7927 const octet PERIPHERAL_HANDHELD_SCANNER = 0x08;
7928 const octet PERIPHERAL_HANDHELD_INPUT_DEVICE = 0x09;
7930 const octet IMAGING_UNCATEGORIZED = 0x00;
7931 const octet IMAGING_DISPLAY = 0x04;
7932 const octet IMAGING_CAMERA = 0x08;
7933 const octet IMAGING_SCANNER = 0x10;
7934 const octet IMAGING_PRINTER = 0x20;
7936 const octet WEARABLE_WRITST_WATCH = 0x01;
7937 const octet WEARABLE_PAGER = 0x02;
7938 const octet WEARABLE_JACKET = 0x03;
7939 const octet WEARABLE_HELMET = 0x04;
7940 const octet WEARABLE_GLASSES = 0x05;
7942 const octet TOY_ROBOT = 0x01;
7943 const octet TOY_VEHICLE = 0x02;
7944 const octet TOY_DOLL = 0x03;
7945 const octet TOY_CONTROLLER = 0x04;
7946 const octet TOY_GAME = 0x05;
7948 const octet HEALTH_UNDEFINED = 0x00;
7949 const octet HEALTH_BLOOD_PRESSURE_MONITOR = 0x01;
7950 const octet HEALTH_THERMOMETER = 0x02;
7951 const octet HEALTH_WEIGHING_SCALE = 0x03;
7952 const octet HEALTH_GLUCOSE_METER = 0x04;
7953 const octet HEALTH_PULSE_OXIMETER = 0x05;
7954 const octet HEALTH_PULSE_RATE_MONITOR = 0x06;
7955 const octet HEALTH_DATA_DISPLAY = 0x07;
7956 const octet HEALTH_STEP_COUNTER = 0x08;
7957 const octet HEALTH_BODY_COMPOSITION_ANALYZER = 0x09;
7958 const octet HEALTH_PEAK_FLOW_MONITOR = 0x0a;
7959 const octet HEALTH_MEDICATION_MONITOR = 0x0b;
7960 const octet HEALTH_KNEE_PROSTHESIS = 0x0c;
7961 const octet HEALTH_ANKLE_PROSTHESIS = 0x0d;
7964 [NoInterfaceObject] interface BluetoothClassDeviceService {
7965 const unsigned short LIMITED_DISCOVERABILITY = 0x0001;
7966 const unsigned short POSITIONING = 0x0008;
7967 const unsigned short NETWORKING = 0x0010;
7968 const unsigned short RENDERING = 0x0020;
7969 const unsigned short CAPTURING = 0x0040;
7970 const unsigned short OBJECT_TRANSFER = 0x0080;
7971 const unsigned short AUDIO = 0x0100;
7972 const unsigned short TELEPHONY = 0x0200;
7973 const unsigned short INFORMATION = 0x0400;
7976 [NoInterfaceObject] interface BluetoothServiceHandler {
7977 readonly attribute <ref>BluetoothUUID</ref> uuid;
7978 readonly attribute DOMString name;
7979 readonly attribute boolean isConnected;
7980 [TreatNonCallableAsNull] attribute <ref>BluetoothSocketSuccessCallback</ref>? onconnect raises(<ref>WebAPIException</ref>);
7982 void unregister(optional <ref>SuccessCallback</ref>? successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
7985 [NoInterfaceObject] interface BluetoothProfileHandler {
7987 readonly attribute <ref>BluetoothProfileType</ref> profileType;
7992 [NoInterfaceObject] interface BluetoothHealthProfileHandler : <ref>BluetoothProfileHandler</ref> {
7994 void registerSinkApplication(unsigned short dataType, DOMString name, <ref>BluetoothHealthApplicationSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
7996 void connectToSource(<ref>BluetoothDevice</ref> peer, <ref>BluetoothHealthApplication</ref> application, <ref>BluetoothHealthChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8001 [NoInterfaceObject] interface BluetoothHealthApplication {
8003 readonly attribute unsigned short dataType;
8005 readonly attribute DOMString name;
8007 [TreatNonCallableAsNull] attribute <ref>BluetoothHealthChannelSuccessCallback</ref>? onconnect raises(<ref>WebAPIException</ref>);
8009 void unregister(optional <ref>SuccessCallback</ref>? successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8014 [NoInterfaceObject] interface BluetoothHealthChannel {
8016 readonly attribute <ref>BluetoothDevice</ref> peer;
8018 readonly attribute <ref>BluetoothHealthChannelType</ref> channelType;
8020 readonly attribute <ref>BluetoothHealthApplication</ref> application;
8022 readonly attribute boolean isConnected;
8024 void close() raises(<ref>WebAPIException</ref>);
8026 unsigned long sendData(byte[] data) raises(<ref>WebAPIException</ref>);
8028 void setListener(<ref>BluetoothHealthChannelChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);
8030 void unsetListener() raises(<ref>WebAPIException</ref>);
8035 [Callback, NoInterfaceObject] interface BluetoothAdapterChangeCallback {
8036 void onstatechanged(boolean powered);
8037 void onnamechanged(DOMString name);
8038 void onvisibilitychanged(boolean visible);
8041 [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothDeviceSuccessCallback {
8042 void onsuccess(<ref>BluetoothDevice</ref> device);
8045 [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothDeviceArraySuccessCallback {
8046 void onsuccess(<ref>BluetoothDevice</ref>[] devices);
8049 [Callback, NoInterfaceObject] interface BluetoothDiscoverDevicesSuccessCallback {
8051 void ondevicefound(<ref>BluetoothDevice</ref> device);
8052 void ondevicedisappeared(<ref>BluetoothAddress</ref> address);
8053 void onfinished(<ref>BluetoothDevice</ref>[] foundDevices);
8056 [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothSocketSuccessCallback {
8057 void onsuccess(<ref>BluetoothSocket</ref> socket);
8060 [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothServiceSuccessCallback {
8061 void onsuccess(<ref>BluetoothServiceHandler</ref> handler);
8064 [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothHealthApplicationSuccessCallback {
8065 void onsuccess(<ref>BluetoothHealthApplication</ref> application);
8069 [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothHealthChannelSuccessCallback {
8070 void onsuccess(<ref>BluetoothHealthChannel</ref> channel);
8073 [Callback, NoInterfaceObject] interface BluetoothHealthChannelChangeCallback {
8074 void onmessage(byte[] data);
8082 This specification defines interfaces and methods to manage Bluetooth.
8086 The following Bluetooth functionalities are provided:
8090 Controls local Bluetooth device, that is, turn Bluetooth on/off, etc. </li>
8092 Sets visibility </li>
8094 Discovers nearby Bluetooth devices (Device discovery). </li>
8096 Gets bonded devices information. </li>
8098 Controls bonding. </li>
8100 Connects to a service on a remote device and exchanges data. </li>
8102 Registers a service (RFCOMM) on a local device, which can be consumed by remote devices to exchange data. </li>
8105 For more information on the Bluetooth features, see <a href="../../org.tizen.web.appprogramming/html/guide/communication_guide/bluetooth.htm">Bluetooth Guide</a>.
8111 <def-api-feature identifier="http://tizen.org/feature/network.bluetooth">
8115 To guarantee this application running on a device with Bluetooth feature, define below in the config file:
8121 <Typedef name="BluetoothAddress" id="::Bluetooth::BluetoothAddress">
8122 <webidl> typedef DOMString BluetoothAddress;</webidl>
8125 The address of a Bluetooth device.
8131 <Type type="DOMString"/>
8133 <Typedef name="BluetoothUUID" id="::Bluetooth::BluetoothUUID">
8134 <webidl> typedef DOMString BluetoothUUID;</webidl>
8137 The UUID of a Bluetooth service.
8143 <Type type="DOMString"/>
8145 <Enum name="BluetoothSocketState" id="::Bluetooth::BluetoothSocketState">
8146 <webidl> enum BluetoothSocketState { "CLOSED", "OPEN" };</webidl>
8149 The Bluetooth socket state.
8155 <EnumValue stringvalue="CLOSED">
8156 <webidl> "CLOSED</webidl>
8158 <EnumValue stringvalue="OPEN">
8159 <webidl> "OPEN</webidl>
8162 <Enum name="BluetoothProfileType" id="::Bluetooth::BluetoothProfileType">
8163 <webidl> enum BluetoothProfileType { "HEALTH" };</webidl>
8166 The Bluetooth profile.
8172 <EnumValue stringvalue="HEALTH">
8173 <webidl> "HEALTH</webidl>
8176 <Enum name="BluetoothHealthChannelType" id="::Bluetooth::BluetoothHealthChannelType">
8177 <webidl> enum BluetoothHealthChannelType { "RELIABLE", "STREAMING" };</webidl>
8180 The channel type of health device profile.
8186 <EnumValue stringvalue="RELIABLE">
8187 <webidl> "RELIABLE</webidl>
8189 <EnumValue stringvalue="STREAMING">
8190 <webidl> "STREAMING</webidl>
8193 <Interface name="BluetoothManagerObject" id="::Bluetooth::BluetoothManagerObject">
8194 <webidl> [NoInterfaceObject] interface BluetoothManagerObject {
8195 readonly attribute <ref>BluetoothManager</ref> bluetooth;
8199 This interface defines what is instantiated by the <em>Tizen</em> object from the Tizen platform.
8203 There is a <em>tizen.bluetooth</em> object that allows access to the Bluetooth API.
8210 <ExtendedAttributeList>
8211 <ExtendedAttribute name="NoInterfaceObject">
8212 <webidl>NoInterfaceObject</webidl>
8213 </ExtendedAttribute>
8214 </ExtendedAttributeList>
8215 <Attribute readonly="readonly" name="bluetooth" id="::Bluetooth::BluetoothManagerObject::bluetooth">
8216 <webidl> readonly attribute <ref>BluetoothManager</ref> bluetooth;</webidl>
8217 <Type name="BluetoothManager"/>
8220 <Implements name1="Tizen" name2="BluetoothManagerObject">
8221 <webidl> <ref>Tizen</ref> implements <ref>BluetoothManagerObject</ref>;</webidl>
8223 <Interface name="BluetoothManager" id="::Bluetooth::BluetoothManager">
8224 <webidl> [NoInterfaceObject] interface BluetoothManager {
8225 readonly attribute <ref>BluetoothClassDeviceMajor</ref> deviceMajor;
8226 readonly attribute <ref>BluetoothClassDeviceMinor</ref> deviceMinor;
8227 readonly attribute <ref>BluetoothClassDeviceService</ref> deviceService;
8228 <ref>BluetoothAdapter</ref> getDefaultAdapter() raises(<ref>WebAPIException</ref>);
8232 This interface provides access to the <em>BluetoothAdapter</em> object.
8238 <ExtendedAttributeList>
8239 <ExtendedAttribute name="NoInterfaceObject">
8240 <webidl>NoInterfaceObject</webidl>
8241 </ExtendedAttribute>
8242 </ExtendedAttributeList>
8243 <Attribute readonly="readonly" name="deviceMajor" id="::Bluetooth::BluetoothManager::deviceMajor">
8244 <webidl> readonly attribute <ref>BluetoothClassDeviceMajor</ref> deviceMajor;</webidl>
8247 An attribute to access to a major device class identifiers of Bluetooth class of device (CoD).
8253 <Type name="BluetoothClassDeviceMajor"/>
8255 <Attribute readonly="readonly" name="deviceMinor" id="::Bluetooth::BluetoothManager::deviceMinor">
8256 <webidl> readonly attribute <ref>BluetoothClassDeviceMinor</ref> deviceMinor;</webidl>
8259 An attribute to access to a minor device class identifiers of Bluetooth class of device (CoD).
8265 <Type name="BluetoothClassDeviceMinor"/>
8267 <Attribute readonly="readonly" name="deviceService" id="::Bluetooth::BluetoothManager::deviceService">
8268 <webidl> readonly attribute <ref>BluetoothClassDeviceService</ref> deviceService;</webidl>
8271 Accessor to major service class identifiers of Bluetooth class of device (CoD).
8277 <Type name="BluetoothClassDeviceService"/>
8279 <Operation name="getDefaultAdapter" id="::Bluetooth::BluetoothManager::getDefaultAdapter">
8280 <webidl> <ref>BluetoothAdapter</ref> getDefaultAdapter() raises(<ref>WebAPIException</ref>);</webidl>
8283 Gets the default local Bluetooth adapter.
8292 http://tizen.org/privilege/bluetooth.gap
8295 var adapter = tizen.bluetooth.getDefaultAdapter() ;
8297 console.log (err.name +": " + err.message);
8301 <Type name="BluetoothAdapter">
8304 BluetoothAdapter The local <em>BluetoothAdapter </em>object.
8310 <RaiseException name="WebAPIException">
8313 with error type SecurityError, if the application does not have the privilege to call this method.
8316 with error type NotSupportedError, if this feature is not supported.
8319 with error type UnknownError, if any other error occurs.
8326 <Interface name="BluetoothAdapter" id="::Bluetooth::BluetoothAdapter">
8327 <webidl> [NoInterfaceObject] interface BluetoothAdapter {
8328 readonly attribute DOMString name;
8329 readonly attribute <ref>BluetoothAddress</ref> address;
8330 readonly attribute boolean powered;
8331 readonly attribute boolean visible;
8333 void setName(DOMString name,
8334 optional <ref>SuccessCallback</ref>? successCallback,
8335 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8337 void setPowered(boolean state,
8338 optional <ref>SuccessCallback</ref>? successCallback,
8339 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8341 void setVisible(boolean mode,
8342 optional <ref>SuccessCallback</ref>? successCallback,
8343 optional <ref>ErrorCallback</ref>? errorCallback,
8344 optional unsigned short? timeout) raises(<ref>WebAPIException</ref>);
8346 void setChangeListener(<ref>BluetoothAdapterChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);
8348 void unsetChangeListener() raises(<ref>WebAPIException</ref>);
8350 void discoverDevices(<ref>BluetoothDiscoverDevicesSuccessCallback</ref> successCallback,
8351 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8353 void stopDiscovery(optional <ref>SuccessCallback</ref>? successCallback,
8354 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8356 void getKnownDevices(<ref>BluetoothDeviceArraySuccessCallback</ref> successCallback,
8357 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8362 void getDevice(<ref>BluetoothAddress</ref> address,
8363 <ref>BluetoothDeviceSuccessCallback</ref> successCallback,
8364 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8369 void createBonding(<ref>BluetoothAddress</ref> address,
8370 <ref>BluetoothDeviceSuccessCallback</ref> successCallback,
8371 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8373 void destroyBonding(<ref>BluetoothAddress</ref> address,
8374 optional <ref>SuccessCallback</ref>? successCallback,
8375 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8379 void registerRFCOMMServiceByUUID(<ref>BluetoothUUID</ref> uuid,
8381 <ref>BluetoothServiceSuccessCallback</ref> successCallback,
8382 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8384 <ref>BluetoothProfileHandler</ref> getBluetoothProfileHandler(<ref>BluetoothProfileType</ref> profileType) raises(<ref>WebAPIException</ref>);
8389 This interface provides access to control the device's Bluetooth adapter.
8393 This interface offers methods to control local Bluetooth behavior, such as:
8397 Turning on/off Bluetooth radio </li>
8399 Changing device visibility </li>
8401 Scanning for remote devices </li>
8403 Accessing known devices </li>
8405 Registering a service in the device service database </li>
8412 <ExtendedAttributeList>
8413 <ExtendedAttribute name="NoInterfaceObject">
8414 <webidl>NoInterfaceObject</webidl>
8415 </ExtendedAttribute>
8416 </ExtendedAttributeList>
8417 <Attribute readonly="readonly" name="name" id="::Bluetooth::BluetoothAdapter::name">
8418 <webidl> readonly attribute DOMString name;</webidl>
8421 An attribute to store the readable name of the Bluetooth adapter.
8427 // Access adapter name
8428 var adapter = tizen.bluetooth.getDefaultAdapter();
8429 console.log ("Bluetooth adapter name: " + adapter.name);
8432 <Type type="DOMString"/>
8434 <Attribute readonly="readonly" name="address" id="::Bluetooth::BluetoothAdapter::address">
8435 <webidl> readonly attribute <ref>BluetoothAddress</ref> address;</webidl>
8438 An attribute to store the unique hardware address of the Bluetooth adapter, also known as the MAC address.
8443 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
8444 console.log("Bluetooth device address: " + adapter.address);
8447 <Type name="BluetoothAddress"/>
8449 <Attribute readonly="readonly" name="powered" id="::Bluetooth::BluetoothAdapter::powered">
8450 <webidl> readonly attribute boolean powered;</webidl>
8453 An attribute to indicate the current state of the Bluetooth adapter.
8454 This attribute holds one of the following 2 values:
8459 <var>true</var> - If Bluetooth adapter is currently on </li>
8461 <var>false</var> - If Bluetooth adapter is currently off </li>
8467 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
8468 console.log("Bluetooth state: " + (adapter.powered ? "On" : "Off"));
8471 <Type type="boolean"/>
8473 <Attribute readonly="readonly" name="visible" id="::Bluetooth::BluetoothAdapter::visible">
8474 <webidl> readonly attribute boolean visible;</webidl>
8477 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.
8482 <Code> // Queries current visible state
8483 var adapter = tizen.bluetooth.getDefaultAdapter();
8484 console.log ("Bluetooth Visibility: " + (adapter.visible ? "On" : "Off"));
8487 <Type type="boolean"/>
8489 <Operation name="setName" id="::Bluetooth::BluetoothAdapter::setName">
8490 <webidl> void setName(DOMString name,
8491 optional <ref>SuccessCallback</ref>? successCallback,
8492 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
8495 Sets the local Bluetooth adapter name.
8499 Sends a request to Bluetooth hardware to change the name of the local Bluetooth adapter to <em>name</em>.
8502 The ErrorCallback is launched with these error types:
8506 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
8508 ServiceNotAvailableError: If a Bluetooth device is turned off. </li>
8510 UnknownError: In any other error case. </li>
8520 http://tizen.org/privilege/bluetooth.admin
8522 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
8524 function changeName(newName)
8526 if(adapter.name != newName) {
8527 // initiate change name
8528 adapter.setName(newName, function() {
8529 console.log("Adapter name changed to " + adapter.name);
8532 console.log("Failed to change name: " + e.message);
8537 changeName("myDevice");
8542 <Argument name="name">
8548 <Type type="DOMString"/>
8550 <Argument optional="optional" name="successCallback">
8553 The method to invoke when the asynchronous call completes successfully.
8556 <Type name="SuccessCallback" nullable="nullable"/>
8558 <Argument optional="optional" name="errorCallback">
8561 The method to invoke when an error occurs.
8564 <Type name="ErrorCallback" nullable="nullable"/>
8568 <RaiseException name="WebAPIException">
8571 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
8574 with error type SecurityError, if the application does not have the privilege to call this method.
8577 with error type NotSupportedError, if this feature is not supported.
8583 <Operation name="setPowered" id="::Bluetooth::BluetoothAdapter::setPowered">
8584 <webidl> void setPowered(boolean state,
8585 optional <ref>SuccessCallback</ref>? successCallback,
8586 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
8589 Sets the state of a Bluetooth adapter to on or off by sending a request to Bluetooth hardware to change the power state.
8590 For most Bluetooth actions, the Bluetooth adapter must be powered on.
8594 The ErrorCallback is launched with these error names:
8598 ServiceNotAvailableError - If a Bluetooth device is busy. </li>
8600 UnknownError - If any other error occurs. </li>
8610 http://tizen.org/privilege/bluetooth.admin
8612 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
8616 // If adapter is not powered on
8617 if(!adapter.powered) {
8618 // Initiates power on
8619 adapter.setPowered(true, function() {
8620 console.log("Bluetooth powered on success.");
8623 console.log("Failed to power on Bluetooth: " + e.message);
8631 if(adapter.powered) {
8632 // Initiates power off
8633 adapter.setPowered(false, function() {
8634 console.log("Bluetooth powered off successfully.");
8637 console.log("Failed to power off Bluetooth: " + e.message);
8645 <Argument name="state">
8648 The state to set: <var>true</var> to power on Bluetooth, <var>false</var> to power it off.
8651 <Type type="boolean"/>
8653 <Argument optional="optional" name="successCallback">
8656 The method to invoke on successful Bluetooth activation/deactivation.
8659 <Type name="SuccessCallback" nullable="nullable"/>
8661 <Argument optional="optional" name="errorCallback">
8664 The method to invoke on failure of a Bluetooth activation/deactivation.
8667 <Type name="ErrorCallback" nullable="nullable"/>
8671 <RaiseException name="WebAPIException">
8674 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
8677 with error type SecurityError, if the application does not have the privilege to call this method.
8680 with error type NotSupportedError, if this feature is not supported.
8686 <Operation name="setVisible" id="::Bluetooth::BluetoothAdapter::setVisible">
8687 <webidl> void setVisible(boolean mode,
8688 optional <ref>SuccessCallback</ref>? successCallback,
8689 optional <ref>ErrorCallback</ref>? errorCallback,
8690 optional unsigned short? timeout) raises(<ref>WebAPIException</ref>);</webidl>
8693 Sets the local device visibility by sending a request to a Bluetooth hardware to change the device visible state to <em>mode</em>.
8694 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.
8698 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.
8701 The ErrorCallback is launched with these error types:
8705 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
8707 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
8709 UnknownError - If any other error case occurs. </li>
8719 http://tizen.org/privilege/bluetoothmanager
8721 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
8725 if (adapter.visible == false) {
8727 adapter.setVisible(true,
8728 function() { console.log ('Device is visible to other devices for 3 minutes.'); },
8729 function(e) { console.log ('Error: ' + e.message + '(' + e.name + ')'); });
8732 console.log("Device is already in discoverable mode.");
8738 if (adapter.visible) {
8740 adapter.setVisible(false,
8741 function() { console.log('Device is in-visible now.'); },
8742 function(e) { console.log ('Error: ' + e.message + '(' + e.name + ')'); });
8745 console.log("Device is already in invisible mode.");
8752 <Argument name="mode">
8755 The boolean value to set visibility.
8756 It can either be set to: <var>true</var> - to show the device or <var>false</var> - to hide the device.
8759 <Type type="boolean"/>
8761 <Argument optional="optional" name="successCallback">
8764 The method to invoke when an asynchronous call completes successfully.
8767 <Type name="SuccessCallback" nullable="nullable"/>
8769 <Argument optional="optional" name="errorCallback">
8772 The method to invoke when an error occurs.
8775 <Type name="ErrorCallback" nullable="nullable"/>
8777 <Argument optional="optional" name="timeout">
8780 The visible timeout in seconds, used only when <em>mode</em> is <var>true</var>.
8783 <Type type="unsigned short" nullable="nullable"/>
8787 <RaiseException name="WebAPIException">
8790 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
8793 with error type SecurityError, if the application does not have the privilege to call this method.
8796 with error type NotSupportedError, if this feature is not supported.
8802 <Operation name="setChangeListener" id="::Bluetooth::BluetoothAdapter::setChangeListener">
8803 <webidl> void setChangeListener(<ref>BluetoothAdapterChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);</webidl>
8806 Sets the listener to receive notifications about changes of Bluetooth adapter.
8811 <Code> var changeListener = {
8812 onstatechanged: function(powered) {
8813 console.log ("Power state is changed into: " + powered);
8815 onnamechanged: function(name) {
8816 console.log("Name is changed to: " + name);
8818 onvisibilitychanged: function(visible) {
8819 console.log("Visibility is changed into: " + visible);
8823 var adapter = tizen.bluetooth.getDefaultAdapter();
8824 adapter.setChangeListener(changeListener);
8829 <Argument name="listener">
8832 The Bluetooth Adapter event listener to set.
8835 <Type name="BluetoothAdapterChangeCallback"/>
8839 <RaiseException name="WebAPIException">
8842 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
8845 with error type SecurityError, if this functionality is not allowed.
8848 with error type UnknownError, if any other error occurs.
8854 <Operation name="unsetChangeListener" id="::Bluetooth::BluetoothAdapter::unsetChangeListener">
8855 <webidl> void unsetChangeListener() raises(<ref>WebAPIException</ref>);</webidl>
8858 Unsets the listener, so stop receiving notifications about changes of Bluetooth adapter.
8863 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
8865 var changeListener = {
8866 onstatechanged: function(powered) {
8867 console.log ("Power state is changed into: " + powered);
8869 adapter.unsetChangeListener();
8871 onnamechanged: function(name) {
8872 console.log("Name is changed to: " + name);
8874 onvisibilitychanged: function(visible) {
8875 console.log("Visibility is changed into: " + visible);
8879 adapter.setChangeListener(changeListener);
8885 <RaiseException name="WebAPIException">
8888 with error type SecurityError, if this functionality is not allowed.
8891 with error type UnknownError, if any other error occurs.
8897 <Operation name="discoverDevices" id="::Bluetooth::BluetoothAdapter::discoverDevices">
8898 <webidl> void discoverDevices(<ref>BluetoothDiscoverDevicesSuccessCallback</ref> successCallback,
8899 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
8902 Discovers nearby Bluetooth devices if any, that is, devices within proximity to the local device.
8906 This method initiates the device discovery process. Depending on the progress of this process the following methods are invoked:
8910 <em>BluetoothDiscoverDevicesSuccessCallback.onstarted()</em> - when a discovery process starts successfully. </li>
8912 <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>
8914 <em>BluetoothDiscoverDevicesSuccessCallback.ondevicedisappeared()</em> - when a device goes out of proximity and this method is invoked with the address of the device. </li>
8916 <em>BluetoothDiscoverDevicesSuccessCallback.onfinished()</em> - when a discovery process is completed. </li>
8919 A discovery process can be canceled anytime, by calling <em>stopDiscovery() </em>on the <em>BluetoothAdapter</em>.
8922 The ErrorCallback is launched with these error types:
8926 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
8928 UnknownError - If any other error occurs. </li>
8938 http://tizen.org/privilege/bluetooth.gap
8940 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
8942 function startDiscovery() {
8944 var discoverDevicesSuccessCallback = {
8945 onstarted: function() {
8946 console.log ("Device discovery started...");
8948 ondevicefound: function(device) {
8949 console.log("Found device - name: " + device.name + ", Address: "+ device.address);
8951 ondevicedisappeared: function(address) {
8952 console.log("Device disappeared: " + address);
8954 onfinished: function(devices) {
8955 console.log("Found Devices");
8956 for (var i = 0; i < devices.length; i++) {
8957 console.log("Name: " + devices[i].name + ", Address: " + devices[i].address);
8959 console.log("Total: " + devices.length);
8963 // Starts searching for nearby devices, for about 12 sec.
8964 adapter.discoverDevices(discoverDevicesSuccessCallback, function(e){
8965 console.log ("Failed to search devices: " + e.message + "(" + e.name + ")");
8969 function onSetPoweredError(e) {
8970 console.log ("Could not turn on device, reason: " + e.message + "(" + e.name + ")");
8973 adapter.setPowered(true, startDiscovery, onSetPoweredError);
8978 <Argument name="successCallback">
8981 The method to invoke when an asynchronous call completes successfully.
8984 <Type name="BluetoothDiscoverDevicesSuccessCallback"/>
8986 <Argument optional="optional" name="errorCallback">
8989 The method to invoke when an error occurs.
8992 <Type name="ErrorCallback" nullable="nullable"/>
8996 <RaiseException name="WebAPIException">
8999 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
9002 with error type SecurityError, if the application does not have the privilege to call this method.
9005 with error type NotSupportedError, if this feature is not supported.
9011 <Operation name="stopDiscovery" id="::Bluetooth::BluetoothAdapter::stopDiscovery">
9012 <webidl> void stopDiscovery(optional <ref>SuccessCallback</ref>? successCallback,
9013 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
9016 Stops an active device discovery session.
9020 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.
9023 The ErrorCallback is launched with these error types:
9027 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
9029 UnknownError - If any other error occurs. </li>
9039 http://tizen.org/privilege/bluetooth.gap
9041 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9043 // Calls this method whenever user finds one of the device
9044 function cancelDiscovery() {
9045 adapter.stopDiscovery(function() {
9046 console.log("Stop discovery success.");
9049 console.log("Error while stopDiscovery:" + e.message);
9053 function startDiscovery() {
9055 var discoverDevicesSuccessCallback = {
9056 onstarted: function() {
9057 console.log ("Device discovery started...") ;
9059 ondevicefound: function(device) {
9060 console.log("Found device - name: " + device.name + ", Address: "+ device.address);
9061 // Shows the device to user to check if this is the device user is looking for.
9062 // For example, add this to list view.
9066 ondevicedisappeared: function(address) {
9067 console.log("Device disappeared: " + address);
9068 // Removes from list, as it is no longer valid.
9070 onfinished: function(devices) {
9071 console.log("Found Devices");
9072 for (var i = 0; i < devices.length; i++) {
9073 console.log("Name: " + devices[i].name + ", Address: " + devices[i].address);
9075 console.log("Total: " + devices.length);
9079 // Starts searching for nearby devices, for about 12 sec.
9080 adapter.discoverDevices(discoverDevicesSuccessCallback, function(e){
9081 console.log ("Failed to search devices: " + e.message + "(" + e.name + ")");
9085 function onSetPoweredError(e) {
9086 console.log ("Could not turn on device, reason: " + e.message + "(" + e.name + ")");
9089 adapter.setPowered(true, startDiscovery, onSetPoweredError);
9094 <Argument optional="optional" name="successCallback">
9097 The method to invoke when an asynchronous call completes successfully.
9100 <Type name="SuccessCallback" nullable="nullable"/>
9102 <Argument optional="optional" name="errorCallback">
9105 The method to invoke when an error occurs.
9108 <Type name="ErrorCallback" nullable="nullable"/>
9112 <RaiseException name="WebAPIException">
9115 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
9118 with error type SecurityError, if the application does not have the privilege to call this method.
9121 with error type NotSupportedError, if this feature is not supported.
9127 <Operation name="getKnownDevices" id="::Bluetooth::BluetoothAdapter::getKnownDevices">
9128 <webidl> void getKnownDevices(<ref>BluetoothDeviceArraySuccessCallback</ref> successCallback,
9129 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
9132 Gets all the known devices that have information stored in the local Bluetooth adapter.
9136 A known device is one of the following:
9140 a bonded device </li>
9142 a device found in last inquiry process </li>
9145 On success, it returns the list of currently known devices through <em>BluetoothDeviceArraySuccessCallback</em>.
9148 The ErrorCallback is launched with these error types:
9152 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
9154 UnknownError - If any other error occurs. </li>
9164 http://tizen.org/privilege/bluetooth.gap
9166 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9168 function onGotDevices(devices) {
9169 console.log("Devices");
9170 for (var i = 0; i < devices.length; i++) {
9171 console.log(" Name: " + devices[i].name + ", Address: " + devices[i].address);
9173 console.log("Total: " + devices.length);
9176 function onError(e) {
9177 console.log ("Error: " + e.message);
9180 function onBluetoothsetPowered() {
9181 adapter.getKnownDevices(onGotDevices, onError);
9184 // Turns on Bluetooth
9185 adapter.setPowered(true, onBluetoothsetPowered);
9190 <Argument name="successCallback">
9193 The method to invoke at retrieval of a list of Bluetooth devices that were bonded (paired) to the local Bluetooth adapter.
9196 <Type name="BluetoothDeviceArraySuccessCallback"/>
9198 <Argument optional="optional" name="errorCallback">
9201 The method to invoke in case of failure in finding any bonded devices.
9204 <Type name="ErrorCallback" nullable="nullable"/>
9208 <RaiseException name="WebAPIException">
9211 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter
9214 with error type SecurityError, if the application does not have the privilege to call this method.
9217 with error type NotSupportedError, if this feature is not supported.
9223 <Operation name="getDevice" id="::Bluetooth::BluetoothAdapter::getDevice">
9224 <webidl> void getDevice(<ref>BluetoothAddress</ref> address,
9225 <ref>BluetoothDeviceSuccessCallback</ref> successCallback,
9226 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
9229 Gets the <em>BluetoothDevice</em> object for a given device hardware address.
9233 This method returns device information stored in the local Bluetooth adapter for the specified device <em>address</em> through
9234 BluetoothDeviceSuccessCallback.
9235 A valid hardware address must be passed, such as "35:F4:59:D1:7A:03".
9238 The ErrorCallback is launched with these error types:
9242 NotFoundError - If there is no device with the given address. </li>
9244 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
9246 UnknownError - If any other error occurs. </li>
9256 http://tizen.org/privilege/bluetooth.gap
9258 <Code> function gotDeviceInfo(device) {
9259 console.log("Device Name: " + device.name);
9260 console.log("Device Address: " + device.address);
9261 console.log("Device Class: " + device.deviceClass.major);
9262 console.log("Is Bonded: " + (device.isBonded ? "Yes" : "No"));
9265 function onError(e) {
9266 console.log ("Could not get device info:" + e.message);
9269 var adapter = tizen.bluetooth.getDefaultAdapter();
9270 adapter.getDevice("35:F4:59:D1:7A:03", gotDeviceInfo, onError);
9275 <Argument name="address">
9278 The address of a remote Bluetooth device to get.
9281 <Type name="BluetoothAddress"/>
9283 <Argument name="successCallback">
9286 The method to invoke when an asynchronous call completes successfully.
9289 <Type name="BluetoothDeviceSuccessCallback"/>
9291 <Argument optional="optional" name="errorCallback">
9294 The method to invoke when an error occurs.
9297 <Type name="ErrorCallback" nullable="nullable"/>
9301 <RaiseException name="WebAPIException">
9304 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter
9307 with error type SecurityError, if the application does not have the privilege to call this method.
9310 with error type NotSupportedError, if this feature is not supported.
9316 <Operation name="createBonding" id="::Bluetooth::BluetoothAdapter::createBonding">
9317 <webidl> void createBonding(<ref>BluetoothAddress</ref> address,
9318 <ref>BluetoothDeviceSuccessCallback</ref> successCallback,
9319 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
9322 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.
9326 If the bonding process is successful, the device information is sent in <em>successCallback</em>.
9329 The ErrorCallback is launched with these error types:
9333 NotFoundError - If there is no device with the given address. </li>
9335 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
9337 UnknownError - If any other error occurs. </li>
9347 http://tizen.org/privilege/bluetooth.gap
9349 <Code> function onBondingSuccess(device) {
9350 console.log("Device Name:" + device.name);
9351 console.log("Device Address:" + device.address);
9352 console.log("Device Service UUIDs:" + device.uuids.join("\n"));
9355 function onError(e) {
9356 console.log ("Could not create bonding, reason:" + e.message);
9359 var adapter = tizen.bluetooth.getDefaultAdapter();
9360 adapter.createBonding("35:F4:59:D1:7A:03", onBondingSuccess, onError);
9365 <Argument name="address">
9368 The MAC address of remote Bluetooth address to bond with.
9371 <Type name="BluetoothAddress"/>
9373 <Argument name="successCallback">
9376 The method to invoke when an asynchronous call completes successfully.
9379 <Type name="BluetoothDeviceSuccessCallback"/>
9381 <Argument optional="optional" name="errorCallback">
9384 The method to invoke when an error occurs.
9387 <Type name="ErrorCallback" nullable="nullable"/>
9391 <RaiseException name="WebAPIException">
9394 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
9397 with error type SecurityError, if the application does not have the privilege to call this method.
9400 with error type NotSupportedError, if this feature is not supported.
9406 <Operation name="destroyBonding" id="::Bluetooth::BluetoothAdapter::destroyBonding">
9407 <webidl> void destroyBonding(<ref>BluetoothAddress</ref> address,
9408 optional <ref>SuccessCallback</ref>? successCallback,
9409 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
9412 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.
9416 The ErrorCallback is launched with these error types:
9420 NotFoundError - If there is no device with the given address. </li>
9422 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
9424 UnknownError - If any other error occurs. </li>
9434 http://tizen.org/privilege/bluetooth.gap
9436 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9438 function gotDevice(device) {
9439 if (device.isBonded) {
9440 // Initiates destroying bonding
9441 adapter.destroyBonding(device.address, function() {
9442 console.log("Succeeded to destroy the bond success with:" + device.address);
9445 console.log("Failed to destroy the bond with " + device.address + ", reason: " + e.message);
9450 var deviceAddress = "35:F4:59:D1:7A:03";
9451 adapter.getDevice(deviceAddress, gotDevice, function(e) {
9452 console.log("Failed to get device info for " + deviceAddress + ", reason: " + e.message);
9458 <Argument name="address">
9461 The address of a bonded device.
9464 <Type name="BluetoothAddress"/>
9466 <Argument optional="optional" name="successCallback">
9469 The method to invoke when an asynchronous call completes successfully.
9472 <Type name="SuccessCallback" nullable="nullable"/>
9474 <Argument optional="optional" name="errorCallback">
9477 The method to invoke when an error occurs.
9480 <Type name="ErrorCallback" nullable="nullable"/>
9484 <RaiseException name="WebAPIException">
9487 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter
9490 with error type SecurityError, if the application does not have the privilege to call this method.
9493 with error type NotSupportedError, if this feature is not supported.
9499 <Operation name="registerRFCOMMServiceByUUID" id="::Bluetooth::BluetoothAdapter::registerRFCOMMServiceByUUID">
9500 <webidl> void registerRFCOMMServiceByUUID(<ref>BluetoothUUID</ref> uuid,
9502 <ref>BluetoothServiceSuccessCallback</ref> successCallback,
9503 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
9506 Registers a service record in the device service record database with the specified <em>uuid</em>, <em>name</em>.
9510 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.
9511 The service handler can be used to be notified on client connections or to unregister the service.
9512 User interaction is mandatory to connect to a registered service.
9515 If any client(remote device) connects to this service, then <em>BluetoothServiceHandler.onconnect()</em> is invoked with <em>BluetoothSocket</em> object.
9518 <em>BluetoothServiceHandler.unregister()</em> can be used to unregister the service record from the device service database and stop listening for client connections.
9521 The ErrorCallback is launched with these error types:
9525 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
9527 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
9529 UnknownError - If any other error occurs. </li>
9539 http://tizen.org/privilege/bluetooth.spp
9541 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9542 // Holds currently registered service record
9543 var chatServiceHandler = null;
9544 // Holds currently open socket
9545 var serviceSocket = null;
9547 function chatServiceSuccessCb(recordHandler) {
9548 console.log("Chat service registration succeeds!");
9549 chatServiceHandler = recordHandler;
9550 recordHandler.onconnect = function(socket) {
9551 console.log("Client connected: " + socket.peer.name + "," + socket.peer.address);
9552 serviceSocket = socket;
9553 // Messages received from remote device
9554 socket.onmessage = function() {
9555 var data = socket.readData();
9556 // Handles message code goes here
9560 socket.onclose = function() {
9561 console.log('The socket is closed.');
9562 serviceSocket = null;
9567 function publishChatService()
9569 var CHAT_SERVICE_UUID = "5BCE9431-6C75-32AB-AFE0-2EC108A30860";
9570 adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCb,
9573 console.log( "Could not register service record, Error: " + e.message);
9577 function unregisterChatService()
9579 if (chatServiceHandler != null) {
9580 chatServiceHandler.unregister(function() {
9581 console.log("Chat service is unregistered");
9582 chatServiceHandler = null;
9584 console.log("Failed to unregister service: " + e.message);
9592 <Argument name="uuid">
9595 The UUID of the service, to which clients connects.
9598 <Type name="BluetoothUUID"/>
9600 <Argument name="name">
9603 The Name of a service.
9606 <Type type="DOMString"/>
9608 <Argument name="successCallback">
9611 The method to invoke on successful service registration.
9614 <Type name="BluetoothServiceSuccessCallback"/>
9616 <Argument optional="optional" name="errorCallback">
9619 The method to invoke when an error occurs.
9622 <Type name="ErrorCallback" nullable="nullable"/>
9626 <RaiseException name="WebAPIException">
9629 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
9632 with error type SecurityError, if the application does not have the privilege to call this method.
9635 with error type NotSupportedError, if this feature is not supported.
9641 <Operation name="getBluetoothProfileHandler" id="::Bluetooth::BluetoothAdapter::getBluetoothProfileHandler">
9642 <webidl> <ref>BluetoothProfileHandler</ref> getBluetoothProfileHandler(<ref>BluetoothProfileType</ref> profileType) raises(<ref>WebAPIException</ref>);</webidl>
9645 Gets the profile handler for the given type.
9650 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9651 var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
9654 <Type name="BluetoothProfileHandler"/>
9656 <Argument name="profileType">
9659 The type of Bluetooth Profile.
9662 <Type name="BluetoothProfileType"/>
9666 <RaiseException name="WebAPIException">
9669 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
9672 with error type NotSupportedError, if this feature is not supported.
9675 with error type UnknownError, if any other error occurs.
9682 <Interface name="BluetoothDevice" id="::Bluetooth::BluetoothDevice">
9683 <webidl> [NoInterfaceObject] interface BluetoothDevice {
9684 readonly attribute DOMString name;
9685 readonly attribute <ref>BluetoothAddress</ref> address;
9686 readonly attribute <ref>BluetoothClass</ref> deviceClass;
9687 readonly attribute boolean isBonded;
9688 readonly attribute boolean isTrusted;
9689 readonly attribute boolean isConnected;
9690 readonly attribute <ref>BluetoothUUID</ref>[] uuids;
9692 void connectToServiceByUUID(<ref>BluetoothUUID</ref> uuid,
9693 <ref>BluetoothSocketSuccessCallback</ref> successCallback,
9694 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
9698 This interface represents a remote Bluetooth device.
9702 A <em>BluetoothDevice</em> object can be retrieved using one of the following APIs:
9706 BluetoothAdapter.getDevice() </li>
9708 BluetoothAdapter.getKnownDevices() </li>
9710 BluetoothAdapter.discoverDevices() </li>
9712 BluetoothAdapter.createBonding() </li>
9719 <ExtendedAttributeList>
9720 <ExtendedAttribute name="NoInterfaceObject">
9721 <webidl>NoInterfaceObject</webidl>
9722 </ExtendedAttribute>
9723 </ExtendedAttributeList>
9724 <Attribute readonly="readonly" name="name" id="::Bluetooth::BluetoothDevice::name">
9725 <webidl> readonly attribute DOMString name;</webidl>
9728 An attribute to store the readable name of this remote device.
9733 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9734 adapter.getDevice("11:22:33:44:55:66", function(device) {
9735 console.log("Device Name: " + device.name);
9739 <Type type="DOMString"/>
9741 <Attribute readonly="readonly" name="address" id="::Bluetooth::BluetoothDevice::address">
9742 <webidl> readonly attribute <ref>BluetoothAddress</ref> address;</webidl>
9745 An attribute to store the hardware address of this remote device.
9750 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9751 adapter.getDevice("11:22:33:44:55:66", function(device) {
9752 console.log("Device Address: " + device.address);
9756 <Type name="BluetoothAddress"/>
9758 <Attribute readonly="readonly" name="deviceClass" id="::Bluetooth::BluetoothDevice::deviceClass">
9759 <webidl> readonly attribute <ref>BluetoothClass</ref> deviceClass;</webidl>
9762 An attribute to indicate a device class, which represents the type of the device and the services it provides.
9767 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9768 adapter.getDevice("11:22:33:44:55:66", function(device) {
9769 console.log("Device Major Class: " + device.deviceClass.major);
9773 <Type name="BluetoothClass"/>
9775 <Attribute readonly="readonly" name="isBonded" id="::Bluetooth::BluetoothDevice::isBonded">
9776 <webidl> readonly attribute boolean isBonded;</webidl>
9779 An attribute to check the bond state of this remote device with the local device.
9784 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9785 adapter.getDevice("11:22:33:44:55:66", function(device) {
9786 console.log("Is bonded: " + (device.isBonded ? "Yes" : "No"));
9790 <Type type="boolean"/>
9792 <Attribute readonly="readonly" name="isTrusted" id="::Bluetooth::BluetoothDevice::isTrusted">
9793 <webidl> readonly attribute boolean isTrusted;</webidl>
9796 An attribute to check whether the local device recognizes this remote device as a trusted device or not.
9801 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9802 adapter.getDevice("11:22:33:44:55:66", function(device) {
9803 console.log("Is trusted: " + (device.isTrusted ? "Yes" : "No"));
9807 <Type type="boolean"/>
9809 <Attribute readonly="readonly" name="isConnected" id="::Bluetooth::BluetoothDevice::isConnected">
9810 <webidl> readonly attribute boolean isConnected;</webidl>
9813 An attribute to check the connection state of this remote device with the local device.
9818 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9819 adapter.getDevice("11:22:33:44:55:66", function(device) {
9820 console.log("Is connected: " + (device.isConnected ? "Yes" : "No"));
9824 <Type type="boolean"/>
9826 <Attribute readonly="readonly" name="uuids" id="::Bluetooth::BluetoothDevice::uuids">
9827 <webidl> readonly attribute <ref>BluetoothUUID</ref>[] uuids;</webidl>
9830 An attribute to store the list of 128 bit service UUIDs available on this remote device.
9835 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9836 var CHAT_SERVICE_UUID = "5BCE9431-6C75-32AB-AFE0-2EC108A30860";
9837 adapter.getDevice("11:22:33:44:55:66", function(device) {
9838 var uuids = device.uuids;
9839 var services = "";
9840 for (var i = 0; i < uuids.length; i++) {
9841 services += uuids[i] + "\n";
9843 console.log ("Services found: " + services);
9844 if (uuids.indexOf(CHAT_SERVICE_UUID) != -1) {
9845 // Connects to service
9846 device.connectToServiceByUUID(CHAT_SERVICE_UUID, function(socket) {
9848 // Connected to service, handle socket
9851 console.log("Could not connect to chat service !!!. Error: " + e.message);
9858 <Type name="BluetoothUUID"/>
9861 <Operation name="connectToServiceByUUID" id="::Bluetooth::BluetoothDevice::connectToServiceByUUID">
9862 <webidl> void connectToServiceByUUID(<ref>BluetoothUUID</ref> uuid,
9863 <ref>BluetoothSocketSuccessCallback</ref> successCallback,
9864 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
9867 Connects to a specified service identified by <em>uuid</em> on this remote device.
9871 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.
9874 The ErrorCallback is launched with these error types:
9878 NotFoundError - If there is no service with the specified <em>uuid</em>. </li>
9880 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
9882 UnknownError - If any other error occurs. </li>
9892 http://tizen.org/privilege/bluetooth.spp
9894 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9895 var clientSocket = null;
9897 // Calls a method that is invoked when user wants to send a message to a remote device
9898 function sendMessage(msg) {
9899 // Validates socket state, if everything is ok.
9900 if (clientSocket != null && clientSocket.state == "OPEN") {
9901 // Sends the message
9902 clientSocket.writeData(msg);
9906 // Calls a method that is invoked when a socket is open
9907 function onSocketConnected(socket) {
9908 clientSocket = socket;
9909 console.log("Opening a socket successfully!!!");
9910 socket.onmessage = function () {
9911 var data = socket.readData();
9912 var recvmsg = "";
9913 for (var i = 0; i < data.length; i++)
9915 recvmsg += String.fromCharCode(data[i]);
9917 console.log("server msg >> " + recvmsg);
9920 socket.onclose = function() {
9921 console.log("socket disconnected.");
9925 function onDeviceReady(device) {
9926 // Validates device and service uuid
9927 if (device.uuids.indexOf("5BCE9431-6C75-32AB-AFE0-2EC108A30860") != -1) {
9929 device.connectToServiceByUUID("5BCE9431-6C75-32AB-AFE0-2EC108A30860", onSocketConnected, function(e) {
9930 console.log ("Error connecting to service. Reason: " + e.message);
9934 console.log ("Chat service is not supported by this device");
9938 function onSetPowered() {
9939 // Gets the BluetoothDevice object
9940 adapter.getDevice("35:F4:59:D1:7A:03", onDeviceReady, function(e) { console.log("Error: " + e.message); });
9943 adapter.setPowered(true, onSetPowered, function(e) {console.log ("Could not turn on Bluetooth adapter. reason: " + e.message); });
9948 <Argument name="uuid">
9951 The 128 bit unique identifier, which represents the service record on the device.
9954 <Type name="BluetoothUUID"/>
9956 <Argument name="successCallback">
9959 The method to invoke when an asynchronous call completes successfully.
9962 <Type name="BluetoothSocketSuccessCallback"/>
9964 <Argument optional="optional" name="errorCallback">
9967 The method to invoke when opening of a socket fails.
9970 <Type name="ErrorCallback" nullable="nullable"/>
9974 <RaiseException name="WebAPIException">
9977 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter
9980 with error type SecurityError, if the application does not have the privilege to call this method.
9983 with error type NotSupportedError, if this feature is not supported.
9990 <Interface name="BluetoothSocket" id="::Bluetooth::BluetoothSocket">
9991 <webidl> [NoInterfaceObject] interface BluetoothSocket {
9992 readonly attribute <ref>BluetoothUUID</ref> uuid;
9993 readonly attribute <ref>BluetoothSocketState</ref> state;
9994 readonly attribute <ref>BluetoothDevice</ref> peer;
9995 [TreatNonCallableAsNull] attribute <ref>SuccessCallback</ref>? onmessage raises(<ref>WebAPIException</ref>);
9996 [TreatNonCallableAsNull] attribute <ref>SuccessCallback</ref>? onclose raises(<ref>WebAPIException</ref>);
9997 unsigned long writeData(byte[] data) raises(<ref>WebAPIException</ref>);
10000 byte[] readData() raises(<ref>WebAPIException</ref>);
10003 void close() raises(<ref>WebAPIException</ref>);
10007 This interface represents the Bluetooth socket.
10011 The socket object is created by <em>BluetoothDevice.connectToServiceByUUID()</em> or <em>BluetoothAdapter.registerRFCOMMServiceByUUID()</em>.
10018 <ExtendedAttributeList>
10019 <ExtendedAttribute name="NoInterfaceObject">
10020 <webidl>NoInterfaceObject</webidl>
10021 </ExtendedAttribute>
10022 </ExtendedAttributeList>
10023 <Attribute readonly="readonly" name="uuid" id="::Bluetooth::BluetoothSocket::uuid">
10024 <webidl> readonly attribute <ref>BluetoothUUID</ref> uuid;</webidl>
10027 An attribute to store the service UUID to which this socket is connected.
10033 <Type name="BluetoothUUID"/>
10035 <Attribute readonly="readonly" name="state" id="::Bluetooth::BluetoothSocket::state">
10036 <webidl> readonly attribute <ref>BluetoothSocketState</ref> state;</webidl>
10039 An attribute to indicate the socket state.
10045 <Type name="BluetoothSocketState"/>
10047 <Attribute readonly="readonly" name="peer" id="::Bluetooth::BluetoothSocket::peer">
10048 <webidl> readonly attribute <ref>BluetoothDevice</ref> peer;</webidl>
10051 The peer device to which this socket is connected.
10057 <Type name="BluetoothDevice"/>
10059 <Attribute name="onmessage" id="::Bluetooth::BluetoothSocket::onmessage">
10060 <webidl> [TreatNonCallableAsNull] attribute <ref>SuccessCallback</ref>? onmessage raises(<ref>WebAPIException</ref>);</webidl>
10063 The success callback to be invoked when an incoming message is received from the peer.
10064 By default, this attribute is set to null.
10070 <ExtendedAttributeList>
10071 <ExtendedAttribute name="TreatNonCallableAsNull">
10072 <webidl>TreatNonCallableAsNull</webidl>
10073 </ExtendedAttribute>
10074 </ExtendedAttributeList>
10075 <Type name="SuccessCallback" nullable="nullable"/>
10077 <RaiseException name="WebAPIException">
10080 with error type TypeMismatchError, if any input attribute is not compatible with the expected type for this attribute.
10086 <Attribute name="onclose" id="::Bluetooth::BluetoothSocket::onclose">
10087 <webidl> [TreatNonCallableAsNull] attribute <ref>SuccessCallback</ref>? onclose raises(<ref>WebAPIException</ref>);</webidl>
10090 The success callback to be invoked when the socket is closed.
10091 By default, this attribute is set to null.
10097 <ExtendedAttributeList>
10098 <ExtendedAttribute name="TreatNonCallableAsNull">
10099 <webidl>TreatNonCallableAsNull</webidl>
10100 </ExtendedAttribute>
10101 </ExtendedAttributeList>
10102 <Type name="SuccessCallback" nullable="nullable"/>
10104 <RaiseException name="WebAPIException">
10107 with error type TypeMismatchError, if any input attribute is not compatible with the expected type for this attribute.
10113 <Operation name="writeData" id="::Bluetooth::BluetoothSocket::writeData">
10114 <webidl> unsigned long writeData(byte[] data) raises(<ref>WebAPIException</ref>);</webidl>
10117 Writes data as a sequence of bytes onto the socket and returns the number of bytes actually written.
10126 http://tizen.org/privilege/bluetooth.spp
10129 var adapter = tizen.bluetooth.getDefaultAdapter();
10131 function onSocketConnected(socket) {
10132 console.log ("Opened connection to remote device");
10133 socket.onmessage = function () {
10134 console.log ("Message received: " + socket.readData());
10137 socket.onclose = function() {
10138 console.log("Socket closed with " + socket.peer.name);
10141 // Sends data to peer.
10142 var textmsg = "Test";
10143 var sendtextmsg = new Array();
10144 for (var i = 0; i < textmsg.length; i++)
10146 sendtextmsg[i] = textmsg.charCodeAt(i);
10148 socket.writeData (sendtextmsg);
10151 function onSocketError(e) {
10152 console.log ("Error connecting to service. Reason: " + e.message);
10155 function onDeviceReady(device) {
10156 // Validates device and service uuid
10157 if (device.uuids.indexOf("5BCE9431-6C75-32AB-AFE0-2EC108A30860") != -1) {
10159 device.connectToServiceByUUID("5BCE9431-6C75-32AB-AFE0-2EC108A30860", onSocketConnected, onSocketError );
10162 function onSetPowered() {
10163 // Gets the BluetoothDevice object
10164 adapter.getDevice("35:F4:59:D1:7A:03", onDeviceReady, function(e) { console.log("Error: " + e.message); });
10167 adapter.setPowered(true, onSetPowered, function(e) {console.log ("Could not turn on Bluetooth adapter. reason: " + e.message); });
10170 <Type type="unsigned long">
10173 unsigned long The number of bytes actually sent.
10178 <Argument name="data">
10184 <Type type="array">
10185 <Type type="byte"/>
10190 <RaiseException name="WebAPIException">
10193 with error type TypeMismatchError, if any input parameters not compatible with the expected type for that parameter.
10196 with error type SecurityError, if the application does not have the privilege to call this method.
10199 with error type NotSupportedError, if this feature is not supported.
10202 with error type UnknownError, if any other error occurs.
10208 <Operation name="readData" id="::Bluetooth::BluetoothSocket::readData">
10209 <webidl> byte[] readData() raises(<ref>WebAPIException</ref>);</webidl>
10212 Reads data from the socket.
10216 This method should be called only in the <em>BluetoothSocket.onmessage</em> handler, that is, when data is ready on the socket.
10226 http://tizen.org/privilege/bluetooth.spp
10228 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10230 function onError(e) {
10231 console.log ("Error connecting to service. Reason: " + e.message);
10234 function onSocketConnected(socket) {
10235 console.log ("Opening socket success!!!");
10237 socket.onmessage = function() {
10238 // Has got a message from peer, reads it
10239 var data = socket.readData();
10242 // Code to evaluate message goes here
10246 socket.onclose = function() {
10247 console.log("Socket closed with " + socket.peer.name);
10251 function onDeviceReady(device) {
10252 // Validates device and service uuid
10253 if (device.uuids.indexOf("5BCE9431-6C75-32AB-AFE0-2EC108A30860") != -1) {
10255 device.connectToServiceByUUID("5BCE9431-6C75-32AB-AFE0-2EC108A30860", onSocketConnected, onError);
10258 function onSetPowered() {
10259 // Gets the BluetoothDevice object
10260 adapter.getDevice("35:F4:59:D1:7A:03", onDeviceReady, function(e) { console.log("Error: " + e.message); });
10263 adapter.setPowered(true, onSetPowered, function(e) {console.log ("Could not turn on Bluetooth adapter. reason: " + e.message); });
10266 <Type type="array">
10269 byte[] The sequence of bytes successfully read.
10272 <Type type="byte"/>
10276 <RaiseException name="WebAPIException">
10279 with error type SecurityError, if the application does not have the privilege to call this method.
10282 with error type NotSupportedError, if this feature is not supported.
10285 with error type UnknownError, if any other error occurs.
10291 <Operation name="close" id="::Bluetooth::BluetoothSocket::close">
10292 <webidl> void close() raises(<ref>WebAPIException</ref>);</webidl>
10299 <b>BluetoothSocket.state</b> changes to <var>CLOSED</var>, and <em>BluetoothSocket.onclose()</em> is invoked on success.
10309 http://tizen.org/privilege/bluetooth.spp
10312 <Type type="void"/>
10315 <RaiseException name="WebAPIException">
10318 with error type NotSupportedError, if this feature is not supported.
10321 with error type SecurityError, if the application does not have the privilege to call this method.
10324 with error type UnknownError, if any other error occurs.
10331 <Interface name="BluetoothClass" id="::Bluetooth::BluetoothClass">
10332 <webidl> [NoInterfaceObject] interface BluetoothClass {
10333 readonly attribute octet major;
10335 readonly attribute octet minor;
10337 readonly attribute unsigned short [] services ;
10339 boolean hasService(unsigned short service) raises(<ref>WebAPIException</ref>);
10343 This interface represents Bluetooth Class of Device/Service(CoD).
10347 Bluetooth device class describes the characteristics and capabilities of a device.
10350 Bluetooth CoD is a 24 bit integer created by the union of three components:
10354 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>
10356 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>
10358 Zero or more <b>Major Service Classes</b>(bits 13-23) - Represents the services supported by the device. </li>
10361 The Major and Minor classes are intended to define a general family of devices with which any particular implementation wishes to be associated.
10362 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.
10369 <ExtendedAttributeList>
10370 <ExtendedAttribute name="NoInterfaceObject">
10371 <webidl>NoInterfaceObject</webidl>
10372 </ExtendedAttribute>
10373 </ExtendedAttributeList>
10374 <Attribute readonly="readonly" name="major" id="::Bluetooth::BluetoothClass::major">
10375 <webidl> readonly attribute octet major;</webidl>
10378 The major device class and it refers to the <em>BluetoothClassDeviceMajor</em> interface for the list of possible
10384 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10386 function evaluateDevice(address) {
10387 adapter.getDevice(address, function(device) {
10388 if (device.deviceClass.major == tizen.bluetooth.deviceMajor.COMPUTER) {
10389 // Shows computer icon for this device
10390 console.log("Device is computer");
10391 } else if (device.deviceClass.major == tizen.bluetooth.deviceMajor.PHONE) {
10392 // Shows phone icon
10393 console.log("Device is a Phone");
10396 console.log("Couldn't get any device with the given address: " + e.message);
10400 evaluateDevice("11:22:33:44:55:66");
10404 <Type type="octet"/>
10406 <Attribute readonly="readonly" name="minor" id="::Bluetooth::BluetoothClass::minor">
10407 <webidl> readonly attribute octet minor;</webidl>
10410 The minor device class and it refer to the <em>BluetoothClassDeviceMinor</em> interface for the list of possible values.
10416 <Type type="octet"/>
10418 <Attribute readonly="readonly" name="services" id="::Bluetooth::BluetoothClass::services">
10419 <webidl> readonly attribute unsigned short [] services ;</webidl>
10422 The services provided by this device and it refers to the <em>BluetoothClassDeviceService</em> interface for the list of possible
10429 <Type type="array">
10430 <Type type="unsigned short"/>
10433 <Operation name="hasService" id="::Bluetooth::BluetoothClass::hasService">
10434 <webidl> boolean hasService(unsigned short service) raises(<ref>WebAPIException</ref>);</webidl>
10437 Checks whether the given service exists in the <em>services</em>.
10446 http://tizen.org/privilege/bluetooth.gap
10448 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10449 adapter.getDevice("12:34:56:78:9A:BC", function(device) {
10450 if (device.deviceClass.hasService(tizen.bluetooth.deviceService.POSITIONING)) {
10451 console.log("Device supports Positioning service");
10454 console.log("Couldn't get device for given address: " + e.message);
10458 <Type type="boolean"/>
10460 <Argument name="service">
10463 The service to check.
10466 <Type type="unsigned short"/>
10470 <RaiseException name="WebAPIException">
10473 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
10476 with error type NotSupportedError, if this feature is not supported.
10479 with error type SecurityError, if the application does not have the privilege to call this method.
10482 with error type UnknownError, if any other error occurs.
10489 <Interface name="BluetoothClassDeviceMajor" id="::Bluetooth::BluetoothClassDeviceMajor">
10490 <webidl> [NoInterfaceObject] interface BluetoothClassDeviceMajor {
10492 const octet MISC = 0x00;
10493 const octet COMPUTER = 0x01;
10494 const octet PHONE = 0x02;
10495 const octet NETWORK = 0x03;
10496 const octet AUDIO_VIDEO = 0x04;
10497 const octet PERIPHERAL = 0x05;
10498 const octet IMAGING = 0x06;
10499 const octet WEARABLE = 0x07;
10500 const octet TOY = 0x08;
10501 const octet HEALTH = 0x09;
10502 const octet UNCATEGORIZED = 0x1F;
10506 This interface holds the identifiers for major device classes of Bluetooth CoD.
10512 <ExtendedAttributeList>
10513 <ExtendedAttribute name="NoInterfaceObject">
10514 <webidl>NoInterfaceObject</webidl>
10515 </ExtendedAttribute>
10516 </ExtendedAttributeList>
10517 <Const name="MISC" value="0x00" id="::Bluetooth::BluetoothClassDeviceMajor::MISC">
10518 <webidl> const octet MISC = 0x00;</webidl>
10519 <Type type="octet"/>
10521 <Const name="COMPUTER" value="0x01" id="::Bluetooth::BluetoothClassDeviceMajor::COMPUTER">
10522 <webidl> const octet COMPUTER = 0x01;</webidl>
10523 <Type type="octet"/>
10525 <Const name="PHONE" value="0x02" id="::Bluetooth::BluetoothClassDeviceMajor::PHONE">
10526 <webidl> const octet PHONE = 0x02;</webidl>
10527 <Type type="octet"/>
10529 <Const name="NETWORK" value="0x03" id="::Bluetooth::BluetoothClassDeviceMajor::NETWORK">
10530 <webidl> const octet NETWORK = 0x03;</webidl>
10531 <Type type="octet"/>
10533 <Const name="AUDIO_VIDEO" value="0x04" id="::Bluetooth::BluetoothClassDeviceMajor::AUDIO_VIDEO">
10534 <webidl> const octet AUDIO_VIDEO = 0x04;</webidl>
10535 <Type type="octet"/>
10537 <Const name="PERIPHERAL" value="0x05" id="::Bluetooth::BluetoothClassDeviceMajor::PERIPHERAL">
10538 <webidl> const octet PERIPHERAL = 0x05;</webidl>
10539 <Type type="octet"/>
10541 <Const name="IMAGING" value="0x06" id="::Bluetooth::BluetoothClassDeviceMajor::IMAGING">
10542 <webidl> const octet IMAGING = 0x06;</webidl>
10543 <Type type="octet"/>
10545 <Const name="WEARABLE" value="0x07" id="::Bluetooth::BluetoothClassDeviceMajor::WEARABLE">
10546 <webidl> const octet WEARABLE = 0x07;</webidl>
10547 <Type type="octet"/>
10549 <Const name="TOY" value="0x08" id="::Bluetooth::BluetoothClassDeviceMajor::TOY">
10550 <webidl> const octet TOY = 0x08;</webidl>
10551 <Type type="octet"/>
10553 <Const name="HEALTH" value="0x09" id="::Bluetooth::BluetoothClassDeviceMajor::HEALTH">
10554 <webidl> const octet HEALTH = 0x09;</webidl>
10555 <Type type="octet"/>
10557 <Const name="UNCATEGORIZED" value="0x1F" id="::Bluetooth::BluetoothClassDeviceMajor::UNCATEGORIZED">
10558 <webidl> const octet UNCATEGORIZED = 0x1F;</webidl>
10559 <Type type="octet"/>
10562 <Interface name="BluetoothClassDeviceMinor" id="::Bluetooth::BluetoothClassDeviceMinor">
10563 <webidl> [NoInterfaceObject] interface BluetoothClassDeviceMinor {
10564 const octet COMPUTER_UNCATEGORIZED = 0x00;
10565 const octet COMPUTER_DESKTOP = 0x01;
10566 const octet COMPUTER_SERVER = 0x02;
10567 const octet COMPUTER_LAPTOP = 0x03;
10568 const octet COMPUTER_HANDHELD_PC_OR_PDA = 0x04;
10569 const octet COMPUTER_PALM_PC_OR_PDA = 0x05;
10570 const octet COMPUTER_WEARABLE = 0x06;
10572 const octet PHONE_UNCATEGORIZED = 0x00;
10573 const octet PHONE_CELLULAR = 0x01;
10574 const octet PHONE_CORDLESS = 0x02;
10575 const octet PHONE_SMARTPHONE = 0x03;
10576 const octet PHONE_MODEM_OR_GATEWAY = 0x04;
10577 const octet PHONE_ISDN = 0x05;
10579 const octet AV_UNRECOGNIZED = 0x00;
10580 const octet AV_WEARABLE_HEADSET = 0x01;
10581 const octet AV_HANDSFREE = 0x02;
10582 const octet AV_MICROPHONE = 0x04;
10583 const octet AV_LOUDSPEAKER = 0x05;
10584 const octet AV_HEADPHONES = 0x06;
10585 const octet AV_PORTABLE_AUDIO = 0x07;
10586 const octet AV_CAR_AUDIO = 0x08;
10587 const octet AV_SETTOP_BOX = 0x09;
10588 const octet AV_HIFI = 0x0a;
10589 const octet AV_VCR = 0x0b;
10590 const octet AV_VIDEO_CAMERA = 0x0c;
10591 const octet AV_CAMCORDER = 0x0d;
10592 const octet AV_MONITOR = 0x0e;
10593 const octet AV_DISPLAY_AND_LOUDSPEAKER = 0x0f;
10594 const octet AV_VIDEO_CONFERENCING = 0x10;
10595 const octet AV_GAMING_TOY = 0x12;
10597 const octet PERIPHERAL_UNCATEGORIZED = 0;
10598 const octet PERIPHERAL_KEYBOARD = 0x10;
10599 const octet PERIPHERAL_POINTING_DEVICE = 0x20;
10600 const octet PERIPHERAL_KEYBOARD_AND_POINTING_DEVICE = 0x30;
10601 const octet PERIPHERAL_JOYSTICK = 0x01;
10602 const octet PERIPHERAL_GAMEPAD = 0x02;
10603 const octet PERIPHERAL_REMOTE_CONTROL = 0x03;
10604 const octet PERIPHERAL_SENSING_DEVICE = 0x04;
10605 const octet PERIPHERAL_DEGITIZER_TABLET = 0x05;
10606 const octet PERIPHERAL_CARD_READER = 0x06;
10607 const octet PERIPHERAL_DIGITAL_PEN = 0x07;
10608 const octet PERIPHERAL_HANDHELD_SCANNER = 0x08;
10609 const octet PERIPHERAL_HANDHELD_INPUT_DEVICE = 0x09;
10611 const octet IMAGING_UNCATEGORIZED = 0x00;
10612 const octet IMAGING_DISPLAY = 0x04;
10613 const octet IMAGING_CAMERA = 0x08;
10614 const octet IMAGING_SCANNER = 0x10;
10615 const octet IMAGING_PRINTER = 0x20;
10617 const octet WEARABLE_WRITST_WATCH = 0x01;
10618 const octet WEARABLE_PAGER = 0x02;
10619 const octet WEARABLE_JACKET = 0x03;
10620 const octet WEARABLE_HELMET = 0x04;
10621 const octet WEARABLE_GLASSES = 0x05;
10623 const octet TOY_ROBOT = 0x01;
10624 const octet TOY_VEHICLE = 0x02;
10625 const octet TOY_DOLL = 0x03;
10626 const octet TOY_CONTROLLER = 0x04;
10627 const octet TOY_GAME = 0x05;
10629 const octet HEALTH_UNDEFINED = 0x00;
10630 const octet HEALTH_BLOOD_PRESSURE_MONITOR = 0x01;
10631 const octet HEALTH_THERMOMETER = 0x02;
10632 const octet HEALTH_WEIGHING_SCALE = 0x03;
10633 const octet HEALTH_GLUCOSE_METER = 0x04;
10634 const octet HEALTH_PULSE_OXIMETER = 0x05;
10635 const octet HEALTH_PULSE_RATE_MONITOR = 0x06;
10636 const octet HEALTH_DATA_DISPLAY = 0x07;
10637 const octet HEALTH_STEP_COUNTER = 0x08;
10638 const octet HEALTH_BODY_COMPOSITION_ANALYZER = 0x09;
10639 const octet HEALTH_PEAK_FLOW_MONITOR = 0x0a;
10640 const octet HEALTH_MEDICATION_MONITOR = 0x0b;
10641 const octet HEALTH_KNEE_PROSTHESIS = 0x0c;
10642 const octet HEALTH_ANKLE_PROSTHESIS = 0x0d;
10646 This interface holds the identifiers for minor device classes of Bluetooth CoD.
10652 <ExtendedAttributeList>
10653 <ExtendedAttribute name="NoInterfaceObject">
10654 <webidl>NoInterfaceObject</webidl>
10655 </ExtendedAttribute>
10656 </ExtendedAttributeList>
10657 <Const name="COMPUTER_UNCATEGORIZED" value="0x00" id="::Bluetooth::BluetoothClassDeviceMinor::COMPUTER_UNCATEGORIZED">
10658 <webidl> const octet COMPUTER_UNCATEGORIZED = 0x00;</webidl>
10659 <Type type="octet"/>
10661 <Const name="COMPUTER_DESKTOP" value="0x01" id="::Bluetooth::BluetoothClassDeviceMinor::COMPUTER_DESKTOP">
10662 <webidl> const octet COMPUTER_DESKTOP = 0x01;</webidl>
10663 <Type type="octet"/>
10665 <Const name="COMPUTER_SERVER" value="0x02" id="::Bluetooth::BluetoothClassDeviceMinor::COMPUTER_SERVER">
10666 <webidl> const octet COMPUTER_SERVER = 0x02;</webidl>
10667 <Type type="octet"/>
10669 <Const name="COMPUTER_LAPTOP" value="0x03" id="::Bluetooth::BluetoothClassDeviceMinor::COMPUTER_LAPTOP">
10670 <webidl> const octet COMPUTER_LAPTOP = 0x03;</webidl>
10671 <Type type="octet"/>
10673 <Const name="COMPUTER_HANDHELD_PC_OR_PDA" value="0x04" id="::Bluetooth::BluetoothClassDeviceMinor::COMPUTER_HANDHELD_PC_OR_PDA">
10674 <webidl> const octet COMPUTER_HANDHELD_PC_OR_PDA = 0x04;</webidl>
10675 <Type type="octet"/>
10677 <Const name="COMPUTER_PALM_PC_OR_PDA" value="0x05" id="::Bluetooth::BluetoothClassDeviceMinor::COMPUTER_PALM_PC_OR_PDA">
10678 <webidl> const octet COMPUTER_PALM_PC_OR_PDA = 0x05;</webidl>
10679 <Type type="octet"/>
10681 <Const name="COMPUTER_WEARABLE" value="0x06" id="::Bluetooth::BluetoothClassDeviceMinor::COMPUTER_WEARABLE">
10682 <webidl> const octet COMPUTER_WEARABLE = 0x06;</webidl>
10683 <Type type="octet"/>
10685 <Const name="PHONE_UNCATEGORIZED" value="0x00" id="::Bluetooth::BluetoothClassDeviceMinor::PHONE_UNCATEGORIZED">
10686 <webidl> const octet PHONE_UNCATEGORIZED = 0x00;</webidl>
10687 <Type type="octet"/>
10689 <Const name="PHONE_CELLULAR" value="0x01" id="::Bluetooth::BluetoothClassDeviceMinor::PHONE_CELLULAR">
10690 <webidl> const octet PHONE_CELLULAR = 0x01;</webidl>
10691 <Type type="octet"/>
10693 <Const name="PHONE_CORDLESS" value="0x02" id="::Bluetooth::BluetoothClassDeviceMinor::PHONE_CORDLESS">
10694 <webidl> const octet PHONE_CORDLESS = 0x02;</webidl>
10695 <Type type="octet"/>
10697 <Const name="PHONE_SMARTPHONE" value="0x03" id="::Bluetooth::BluetoothClassDeviceMinor::PHONE_SMARTPHONE">
10698 <webidl> const octet PHONE_SMARTPHONE = 0x03;</webidl>
10699 <Type type="octet"/>
10701 <Const name="PHONE_MODEM_OR_GATEWAY" value="0x04" id="::Bluetooth::BluetoothClassDeviceMinor::PHONE_MODEM_OR_GATEWAY">
10702 <webidl> const octet PHONE_MODEM_OR_GATEWAY = 0x04;</webidl>
10703 <Type type="octet"/>
10705 <Const name="PHONE_ISDN" value="0x05" id="::Bluetooth::BluetoothClassDeviceMinor::PHONE_ISDN">
10706 <webidl> const octet PHONE_ISDN = 0x05;</webidl>
10707 <Type type="octet"/>
10709 <Const name="AV_UNRECOGNIZED" value="0x00" id="::Bluetooth::BluetoothClassDeviceMinor::AV_UNRECOGNIZED">
10710 <webidl> const octet AV_UNRECOGNIZED = 0x00;</webidl>
10711 <Type type="octet"/>
10713 <Const name="AV_WEARABLE_HEADSET" value="0x01" id="::Bluetooth::BluetoothClassDeviceMinor::AV_WEARABLE_HEADSET">
10714 <webidl> const octet AV_WEARABLE_HEADSET = 0x01;</webidl>
10715 <Type type="octet"/>
10717 <Const name="AV_HANDSFREE" value="0x02" id="::Bluetooth::BluetoothClassDeviceMinor::AV_HANDSFREE">
10718 <webidl> const octet AV_HANDSFREE = 0x02;</webidl>
10719 <Type type="octet"/>
10721 <Const name="AV_MICROPHONE" value="0x04" id="::Bluetooth::BluetoothClassDeviceMinor::AV_MICROPHONE">
10722 <webidl> const octet AV_MICROPHONE = 0x04;</webidl>
10723 <Type type="octet"/>
10725 <Const name="AV_LOUDSPEAKER" value="0x05" id="::Bluetooth::BluetoothClassDeviceMinor::AV_LOUDSPEAKER">
10726 <webidl> const octet AV_LOUDSPEAKER = 0x05;</webidl>
10727 <Type type="octet"/>
10729 <Const name="AV_HEADPHONES" value="0x06" id="::Bluetooth::BluetoothClassDeviceMinor::AV_HEADPHONES">
10730 <webidl> const octet AV_HEADPHONES = 0x06;</webidl>
10731 <Type type="octet"/>
10733 <Const name="AV_PORTABLE_AUDIO" value="0x07" id="::Bluetooth::BluetoothClassDeviceMinor::AV_PORTABLE_AUDIO">
10734 <webidl> const octet AV_PORTABLE_AUDIO = 0x07;</webidl>
10735 <Type type="octet"/>
10737 <Const name="AV_CAR_AUDIO" value="0x08" id="::Bluetooth::BluetoothClassDeviceMinor::AV_CAR_AUDIO">
10738 <webidl> const octet AV_CAR_AUDIO = 0x08;</webidl>
10739 <Type type="octet"/>
10741 <Const name="AV_SETTOP_BOX" value="0x09" id="::Bluetooth::BluetoothClassDeviceMinor::AV_SETTOP_BOX">
10742 <webidl> const octet AV_SETTOP_BOX = 0x09;</webidl>
10743 <Type type="octet"/>
10745 <Const name="AV_HIFI" value="0x0a" id="::Bluetooth::BluetoothClassDeviceMinor::AV_HIFI">
10746 <webidl> const octet AV_HIFI = 0x0a;</webidl>
10747 <Type type="octet"/>
10749 <Const name="AV_VCR" value="0x0b" id="::Bluetooth::BluetoothClassDeviceMinor::AV_VCR">
10750 <webidl> const octet AV_VCR = 0x0b;</webidl>
10751 <Type type="octet"/>
10753 <Const name="AV_VIDEO_CAMERA" value="0x0c" id="::Bluetooth::BluetoothClassDeviceMinor::AV_VIDEO_CAMERA">
10754 <webidl> const octet AV_VIDEO_CAMERA = 0x0c;</webidl>
10755 <Type type="octet"/>
10757 <Const name="AV_CAMCORDER" value="0x0d" id="::Bluetooth::BluetoothClassDeviceMinor::AV_CAMCORDER">
10758 <webidl> const octet AV_CAMCORDER = 0x0d;</webidl>
10759 <Type type="octet"/>
10761 <Const name="AV_MONITOR" value="0x0e" id="::Bluetooth::BluetoothClassDeviceMinor::AV_MONITOR">
10762 <webidl> const octet AV_MONITOR = 0x0e;</webidl>
10763 <Type type="octet"/>
10765 <Const name="AV_DISPLAY_AND_LOUDSPEAKER" value="0x0f" id="::Bluetooth::BluetoothClassDeviceMinor::AV_DISPLAY_AND_LOUDSPEAKER">
10766 <webidl> const octet AV_DISPLAY_AND_LOUDSPEAKER = 0x0f;</webidl>
10767 <Type type="octet"/>
10769 <Const name="AV_VIDEO_CONFERENCING" value="0x10" id="::Bluetooth::BluetoothClassDeviceMinor::AV_VIDEO_CONFERENCING">
10770 <webidl> const octet AV_VIDEO_CONFERENCING = 0x10;</webidl>
10771 <Type type="octet"/>
10773 <Const name="AV_GAMING_TOY" value="0x12" id="::Bluetooth::BluetoothClassDeviceMinor::AV_GAMING_TOY">
10774 <webidl> const octet AV_GAMING_TOY = 0x12;</webidl>
10775 <Type type="octet"/>
10777 <Const name="PERIPHERAL_UNCATEGORIZED" value="0" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_UNCATEGORIZED">
10778 <webidl> const octet PERIPHERAL_UNCATEGORIZED = 0;</webidl>
10779 <Type type="octet"/>
10781 <Const name="PERIPHERAL_KEYBOARD" value="0x10" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_KEYBOARD">
10782 <webidl> const octet PERIPHERAL_KEYBOARD = 0x10;</webidl>
10783 <Type type="octet"/>
10785 <Const name="PERIPHERAL_POINTING_DEVICE" value="0x20" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_POINTING_DEVICE">
10786 <webidl> const octet PERIPHERAL_POINTING_DEVICE = 0x20;</webidl>
10787 <Type type="octet"/>
10789 <Const name="PERIPHERAL_KEYBOARD_AND_POINTING_DEVICE" value="0x30" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_KEYBOARD_AND_POINTING_DEVICE">
10790 <webidl> const octet PERIPHERAL_KEYBOARD_AND_POINTING_DEVICE = 0x30;</webidl>
10791 <Type type="octet"/>
10793 <Const name="PERIPHERAL_JOYSTICK" value="0x01" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_JOYSTICK">
10794 <webidl> const octet PERIPHERAL_JOYSTICK = 0x01;</webidl>
10795 <Type type="octet"/>
10797 <Const name="PERIPHERAL_GAMEPAD" value="0x02" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_GAMEPAD">
10798 <webidl> const octet PERIPHERAL_GAMEPAD = 0x02;</webidl>
10799 <Type type="octet"/>
10801 <Const name="PERIPHERAL_REMOTE_CONTROL" value="0x03" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_REMOTE_CONTROL">
10802 <webidl> const octet PERIPHERAL_REMOTE_CONTROL = 0x03;</webidl>
10803 <Type type="octet"/>
10805 <Const name="PERIPHERAL_SENSING_DEVICE" value="0x04" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_SENSING_DEVICE">
10806 <webidl> const octet PERIPHERAL_SENSING_DEVICE = 0x04;</webidl>
10807 <Type type="octet"/>
10809 <Const name="PERIPHERAL_DEGITIZER_TABLET" value="0x05" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_DEGITIZER_TABLET">
10810 <webidl> const octet PERIPHERAL_DEGITIZER_TABLET = 0x05;</webidl>
10811 <Type type="octet"/>
10813 <Const name="PERIPHERAL_CARD_READER" value="0x06" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_CARD_READER">
10814 <webidl> const octet PERIPHERAL_CARD_READER = 0x06;</webidl>
10815 <Type type="octet"/>
10817 <Const name="PERIPHERAL_DIGITAL_PEN" value="0x07" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_DIGITAL_PEN">
10818 <webidl> const octet PERIPHERAL_DIGITAL_PEN = 0x07;</webidl>
10819 <Type type="octet"/>
10821 <Const name="PERIPHERAL_HANDHELD_SCANNER" value="0x08" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_HANDHELD_SCANNER">
10822 <webidl> const octet PERIPHERAL_HANDHELD_SCANNER = 0x08;</webidl>
10823 <Type type="octet"/>
10825 <Const name="PERIPHERAL_HANDHELD_INPUT_DEVICE" value="0x09" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_HANDHELD_INPUT_DEVICE">
10826 <webidl> const octet PERIPHERAL_HANDHELD_INPUT_DEVICE = 0x09;</webidl>
10827 <Type type="octet"/>
10829 <Const name="IMAGING_UNCATEGORIZED" value="0x00" id="::Bluetooth::BluetoothClassDeviceMinor::IMAGING_UNCATEGORIZED">
10830 <webidl> const octet IMAGING_UNCATEGORIZED = 0x00;</webidl>
10831 <Type type="octet"/>
10833 <Const name="IMAGING_DISPLAY" value="0x04" id="::Bluetooth::BluetoothClassDeviceMinor::IMAGING_DISPLAY">
10834 <webidl> const octet IMAGING_DISPLAY = 0x04;</webidl>
10835 <Type type="octet"/>
10837 <Const name="IMAGING_CAMERA" value="0x08" id="::Bluetooth::BluetoothClassDeviceMinor::IMAGING_CAMERA">
10838 <webidl> const octet IMAGING_CAMERA = 0x08;</webidl>
10839 <Type type="octet"/>
10841 <Const name="IMAGING_SCANNER" value="0x10" id="::Bluetooth::BluetoothClassDeviceMinor::IMAGING_SCANNER">
10842 <webidl> const octet IMAGING_SCANNER = 0x10;</webidl>
10843 <Type type="octet"/>
10845 <Const name="IMAGING_PRINTER" value="0x20" id="::Bluetooth::BluetoothClassDeviceMinor::IMAGING_PRINTER">
10846 <webidl> const octet IMAGING_PRINTER = 0x20;</webidl>
10847 <Type type="octet"/>
10849 <Const name="WEARABLE_WRITST_WATCH" value="0x01" id="::Bluetooth::BluetoothClassDeviceMinor::WEARABLE_WRITST_WATCH">
10850 <webidl> const octet WEARABLE_WRITST_WATCH = 0x01;</webidl>
10851 <Type type="octet"/>
10853 <Const name="WEARABLE_PAGER" value="0x02" id="::Bluetooth::BluetoothClassDeviceMinor::WEARABLE_PAGER">
10854 <webidl> const octet WEARABLE_PAGER = 0x02;</webidl>
10855 <Type type="octet"/>
10857 <Const name="WEARABLE_JACKET" value="0x03" id="::Bluetooth::BluetoothClassDeviceMinor::WEARABLE_JACKET">
10858 <webidl> const octet WEARABLE_JACKET = 0x03;</webidl>
10859 <Type type="octet"/>
10861 <Const name="WEARABLE_HELMET" value="0x04" id="::Bluetooth::BluetoothClassDeviceMinor::WEARABLE_HELMET">
10862 <webidl> const octet WEARABLE_HELMET = 0x04;</webidl>
10863 <Type type="octet"/>
10865 <Const name="WEARABLE_GLASSES" value="0x05" id="::Bluetooth::BluetoothClassDeviceMinor::WEARABLE_GLASSES">
10866 <webidl> const octet WEARABLE_GLASSES = 0x05;</webidl>
10867 <Type type="octet"/>
10869 <Const name="TOY_ROBOT" value="0x01" id="::Bluetooth::BluetoothClassDeviceMinor::TOY_ROBOT">
10870 <webidl> const octet TOY_ROBOT = 0x01;</webidl>
10871 <Type type="octet"/>
10873 <Const name="TOY_VEHICLE" value="0x02" id="::Bluetooth::BluetoothClassDeviceMinor::TOY_VEHICLE">
10874 <webidl> const octet TOY_VEHICLE = 0x02;</webidl>
10875 <Type type="octet"/>
10877 <Const name="TOY_DOLL" value="0x03" id="::Bluetooth::BluetoothClassDeviceMinor::TOY_DOLL">
10878 <webidl> const octet TOY_DOLL = 0x03;</webidl>
10879 <Type type="octet"/>
10881 <Const name="TOY_CONTROLLER" value="0x04" id="::Bluetooth::BluetoothClassDeviceMinor::TOY_CONTROLLER">
10882 <webidl> const octet TOY_CONTROLLER = 0x04;</webidl>
10883 <Type type="octet"/>
10885 <Const name="TOY_GAME" value="0x05" id="::Bluetooth::BluetoothClassDeviceMinor::TOY_GAME">
10886 <webidl> const octet TOY_GAME = 0x05;</webidl>
10887 <Type type="octet"/>
10889 <Const name="HEALTH_UNDEFINED" value="0x00" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_UNDEFINED">
10890 <webidl> const octet HEALTH_UNDEFINED = 0x00;</webidl>
10891 <Type type="octet"/>
10893 <Const name="HEALTH_BLOOD_PRESSURE_MONITOR" value="0x01" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_BLOOD_PRESSURE_MONITOR">
10894 <webidl> const octet HEALTH_BLOOD_PRESSURE_MONITOR = 0x01;</webidl>
10895 <Type type="octet"/>
10897 <Const name="HEALTH_THERMOMETER" value="0x02" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_THERMOMETER">
10898 <webidl> const octet HEALTH_THERMOMETER = 0x02;</webidl>
10899 <Type type="octet"/>
10901 <Const name="HEALTH_WEIGHING_SCALE" value="0x03" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_WEIGHING_SCALE">
10902 <webidl> const octet HEALTH_WEIGHING_SCALE = 0x03;</webidl>
10903 <Type type="octet"/>
10905 <Const name="HEALTH_GLUCOSE_METER" value="0x04" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_GLUCOSE_METER">
10906 <webidl> const octet HEALTH_GLUCOSE_METER = 0x04;</webidl>
10907 <Type type="octet"/>
10909 <Const name="HEALTH_PULSE_OXIMETER" value="0x05" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_PULSE_OXIMETER">
10910 <webidl> const octet HEALTH_PULSE_OXIMETER = 0x05;</webidl>
10911 <Type type="octet"/>
10913 <Const name="HEALTH_PULSE_RATE_MONITOR" value="0x06" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_PULSE_RATE_MONITOR">
10914 <webidl> const octet HEALTH_PULSE_RATE_MONITOR = 0x06;</webidl>
10915 <Type type="octet"/>
10917 <Const name="HEALTH_DATA_DISPLAY" value="0x07" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_DATA_DISPLAY">
10918 <webidl> const octet HEALTH_DATA_DISPLAY = 0x07;</webidl>
10919 <Type type="octet"/>
10921 <Const name="HEALTH_STEP_COUNTER" value="0x08" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_STEP_COUNTER">
10922 <webidl> const octet HEALTH_STEP_COUNTER = 0x08;</webidl>
10923 <Type type="octet"/>
10925 <Const name="HEALTH_BODY_COMPOSITION_ANALYZER" value="0x09" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_BODY_COMPOSITION_ANALYZER">
10926 <webidl> const octet HEALTH_BODY_COMPOSITION_ANALYZER = 0x09;</webidl>
10927 <Type type="octet"/>
10929 <Const name="HEALTH_PEAK_FLOW_MONITOR" value="0x0a" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_PEAK_FLOW_MONITOR">
10930 <webidl> const octet HEALTH_PEAK_FLOW_MONITOR = 0x0a;</webidl>
10931 <Type type="octet"/>
10933 <Const name="HEALTH_MEDICATION_MONITOR" value="0x0b" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_MEDICATION_MONITOR">
10934 <webidl> const octet HEALTH_MEDICATION_MONITOR = 0x0b;</webidl>
10935 <Type type="octet"/>
10937 <Const name="HEALTH_KNEE_PROSTHESIS" value="0x0c" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_KNEE_PROSTHESIS">
10938 <webidl> const octet HEALTH_KNEE_PROSTHESIS = 0x0c;</webidl>
10939 <Type type="octet"/>
10941 <Const name="HEALTH_ANKLE_PROSTHESIS" value="0x0d" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_ANKLE_PROSTHESIS">
10942 <webidl> const octet HEALTH_ANKLE_PROSTHESIS = 0x0d;</webidl>
10943 <Type type="octet"/>
10946 <Interface name="BluetoothClassDeviceService" id="::Bluetooth::BluetoothClassDeviceService">
10947 <webidl> [NoInterfaceObject] interface BluetoothClassDeviceService {
10948 const unsigned short LIMITED_DISCOVERABILITY = 0x0001;
10949 const unsigned short POSITIONING = 0x0008;
10950 const unsigned short NETWORKING = 0x0010;
10951 const unsigned short RENDERING = 0x0020;
10952 const unsigned short CAPTURING = 0x0040;
10953 const unsigned short OBJECT_TRANSFER = 0x0080;
10954 const unsigned short AUDIO = 0x0100;
10955 const unsigned short TELEPHONY = 0x0200;
10956 const unsigned short INFORMATION = 0x0400;
10960 This interface holds identifiers for the major service classes of Bluetooth CoD.
10966 <ExtendedAttributeList>
10967 <ExtendedAttribute name="NoInterfaceObject">
10968 <webidl>NoInterfaceObject</webidl>
10969 </ExtendedAttribute>
10970 </ExtendedAttributeList>
10971 <Const name="LIMITED_DISCOVERABILITY" value="0x0001" id="::Bluetooth::BluetoothClassDeviceService::LIMITED_DISCOVERABILITY">
10972 <webidl> const unsigned short LIMITED_DISCOVERABILITY = 0x0001;</webidl>
10973 <Type type="unsigned short"/>
10975 <Const name="POSITIONING" value="0x0008" id="::Bluetooth::BluetoothClassDeviceService::POSITIONING">
10976 <webidl> const unsigned short POSITIONING = 0x0008;</webidl>
10977 <Type type="unsigned short"/>
10979 <Const name="NETWORKING" value="0x0010" id="::Bluetooth::BluetoothClassDeviceService::NETWORKING">
10980 <webidl> const unsigned short NETWORKING = 0x0010;</webidl>
10981 <Type type="unsigned short"/>
10983 <Const name="RENDERING" value="0x0020" id="::Bluetooth::BluetoothClassDeviceService::RENDERING">
10984 <webidl> const unsigned short RENDERING = 0x0020;</webidl>
10985 <Type type="unsigned short"/>
10987 <Const name="CAPTURING" value="0x0040" id="::Bluetooth::BluetoothClassDeviceService::CAPTURING">
10988 <webidl> const unsigned short CAPTURING = 0x0040;</webidl>
10989 <Type type="unsigned short"/>
10991 <Const name="OBJECT_TRANSFER" value="0x0080" id="::Bluetooth::BluetoothClassDeviceService::OBJECT_TRANSFER">
10992 <webidl> const unsigned short OBJECT_TRANSFER = 0x0080;</webidl>
10993 <Type type="unsigned short"/>
10995 <Const name="AUDIO" value="0x0100" id="::Bluetooth::BluetoothClassDeviceService::AUDIO">
10996 <webidl> const unsigned short AUDIO = 0x0100;</webidl>
10997 <Type type="unsigned short"/>
10999 <Const name="TELEPHONY" value="0x0200" id="::Bluetooth::BluetoothClassDeviceService::TELEPHONY">
11000 <webidl> const unsigned short TELEPHONY = 0x0200;</webidl>
11001 <Type type="unsigned short"/>
11003 <Const name="INFORMATION" value="0x0400" id="::Bluetooth::BluetoothClassDeviceService::INFORMATION">
11004 <webidl> const unsigned short INFORMATION = 0x0400;</webidl>
11005 <Type type="unsigned short"/>
11008 <Interface name="BluetoothServiceHandler" id="::Bluetooth::BluetoothServiceHandler">
11009 <webidl> [NoInterfaceObject] interface BluetoothServiceHandler {
11010 readonly attribute <ref>BluetoothUUID</ref> uuid;
11011 readonly attribute DOMString name;
11012 readonly attribute boolean isConnected;
11013 [TreatNonCallableAsNull] attribute <ref>BluetoothSocketSuccessCallback</ref>? onconnect raises(<ref>WebAPIException</ref>);
11015 void unregister(optional <ref>SuccessCallback</ref>? successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
11019 This interface provides methods to handle Bluetooth service.
11025 <ExtendedAttributeList>
11026 <ExtendedAttribute name="NoInterfaceObject">
11027 <webidl>NoInterfaceObject</webidl>
11028 </ExtendedAttribute>
11029 </ExtendedAttributeList>
11030 <Attribute readonly="readonly" name="uuid" id="::Bluetooth::BluetoothServiceHandler::uuid">
11031 <webidl> readonly attribute <ref>BluetoothUUID</ref> uuid;</webidl>
11034 The UUID of the service.
11040 <Type name="BluetoothUUID"/>
11042 <Attribute readonly="readonly" name="name" id="::Bluetooth::BluetoothServiceHandler::name">
11043 <webidl> readonly attribute DOMString name;</webidl>
11046 The name of the service.
11052 <Type type="DOMString"/>
11054 <Attribute readonly="readonly" name="isConnected" id="::Bluetooth::BluetoothServiceHandler::isConnected">
11055 <webidl> readonly attribute boolean isConnected;</webidl>
11058 An attribute to check whether any remote devices is using this service or not.
11064 <Type type="boolean"/>
11066 <Attribute name="onconnect" id="::Bluetooth::BluetoothServiceHandler::onconnect">
11067 <webidl> [TreatNonCallableAsNull] attribute <ref>BluetoothSocketSuccessCallback</ref>? onconnect raises(<ref>WebAPIException</ref>);</webidl>
11070 The success callback to be invoked when a remote device is connected to this service.
11071 By default, this attribute is set to null.
11077 <ExtendedAttributeList>
11078 <ExtendedAttribute name="TreatNonCallableAsNull">
11079 <webidl>TreatNonCallableAsNull</webidl>
11080 </ExtendedAttribute>
11081 </ExtendedAttributeList>
11082 <Type name="BluetoothSocketSuccessCallback" nullable="nullable"/>
11084 <RaiseException name="WebAPIException">
11087 with error type TypeMismatchError, if any input attribute is not compatible with the expected type for this attribute.
11093 <Operation name="unregister" id="::Bluetooth::BluetoothServiceHandler::unregister">
11094 <webidl> void unregister(optional <ref>SuccessCallback</ref>? successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
11097 Unregisters a service record from the Bluetooth services record database and stops listening for new connections to this service.
11101 The ErrorCallback is launched with these error types:
11105 UnknownError - If any other error occurs. </li>
11115 http://tizen.org/privilege/bluetooth.spp
11117 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
11118 var chatServiceHandler = null;
11120 function chatServiceSuccessCb(handler) {
11121 console.log("Chat service registration was successful!");
11123 chatServiceHandler = handler;
11124 handler.onconnect = function(socket) {
11125 console.log("Client is connected: " + socket.peer.name + "," + socket.peer.address);
11126 socket.onmessage = function() {
11127 var data = socket.readData();
11128 // Handle message code goes here
11133 socket.onclose = function() {
11134 console.log('The socket is closed.');
11139 function publishChatService()
11141 var CHAT_SERVICE_UUID = "5BCE9431-6C75-32AB-AFE0-2EC108A30860";
11142 adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCb,
11145 console.log( "Could not register service record, Error: " + e.message);
11149 function unRegisterChatService()
11151 if (chatServiceHandler != null) {
11152 chatServiceHandler.unregister(function() {
11153 chatServiceHandler = null;
11154 console.log("Chat service is unregistered.");
11157 console.log ("Error: " + e.message);
11163 <Type type="void"/>
11165 <Argument optional="optional" name="successCallback">
11168 The method to be invoked when the record is removed successfully from the service records database.
11171 <Type name="SuccessCallback" nullable="nullable"/>
11173 <Argument optional="optional" name="errorCallback">
11176 The method to be invoked in case of failure (to unregister).
11179 <Type name="ErrorCallback" nullable="nullable"/>
11183 <RaiseException name="WebAPIException">
11186 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
11189 with error type SecurityError, if the application does not have the privilege to call this method.
11192 with error type NotSupportedError, if this feature is not supported.
11199 <Interface name="BluetoothProfileHandler" id="::Bluetooth::BluetoothProfileHandler">
11200 <webidl> [NoInterfaceObject] interface BluetoothProfileHandler {
11202 readonly attribute <ref>BluetoothProfileType</ref> profileType;
11207 This interface represents the Bluetooth profile handler.
11213 <ExtendedAttributeList>
11214 <ExtendedAttribute name="NoInterfaceObject">
11215 <webidl>NoInterfaceObject</webidl>
11216 </ExtendedAttribute>
11217 </ExtendedAttributeList>
11218 <Attribute readonly="readonly" name="profileType" id="::Bluetooth::BluetoothProfileHandler::profileType">
11219 <webidl> readonly attribute <ref>BluetoothProfileType</ref> profileType;</webidl>
11222 The type of Bluetooth profile.
11228 <Type name="BluetoothProfileType"/>
11231 <Interface name="BluetoothHealthProfileHandler" id="::Bluetooth::BluetoothHealthProfileHandler">
11232 <webidl> [NoInterfaceObject] interface BluetoothHealthProfileHandler : <ref>BluetoothProfileHandler</ref> {
11234 void registerSinkApplication(unsigned short dataType, DOMString name, <ref>BluetoothHealthApplicationSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
11236 void connectToSource(<ref>BluetoothDevice</ref> peer, <ref>BluetoothHealthApplication</ref> application, <ref>BluetoothHealthChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
11241 This interface represents the handler of Bluetooth health device profile.
11242 The BluetoothHealthProfileHandler object is created by <em>BluetoothAdapter.getBluetoothProfileHandler()</em>.
11248 <ExtendedAttributeList>
11249 <ExtendedAttribute name="NoInterfaceObject">
11250 <webidl>NoInterfaceObject</webidl>
11251 </ExtendedAttribute>
11252 </ExtendedAttributeList>
11253 <InterfaceInheritance>
11254 <Name name="BluetoothProfileHandler"/>
11255 </InterfaceInheritance>
11256 <Operation name="registerSinkApplication" id="::Bluetooth::BluetoothHealthProfileHandler::registerSinkApplication">
11257 <webidl> void registerSinkApplication(unsigned short dataType, DOMString name, <ref>BluetoothHealthApplicationSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
11260 Registers an application for the Sink role.
11264 The ErrorCallback is launched with these error types:
11268 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
11270 UnknownError - If any other error occurs. </li>
11280 http://tizen.org/privilege/bluetooth.health
11282 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
11283 var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
11285 function healthRegisterSuccess(app) {
11286 console.log("Registered application: " + app.name);
11289 function healthRegisterError(e) {
11290 console.log("Failed to register application: " + e.message);
11293 healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
11296 <Type type="void"/>
11298 <Argument name="dataType">
11301 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.
11304 <Type type="unsigned short"/>
11306 <Argument name="name">
11309 The friendly name associated with sink application.
11312 <Type type="DOMString"/>
11314 <Argument name="successCallback">
11317 The method to invoke when a sink application is registered successfully.
11320 <Type name="BluetoothHealthApplicationSuccessCallback"/>
11322 <Argument optional="optional" name="errorCallback">
11325 The method to invoke when an error occurs.
11328 <Type name="ErrorCallback" nullable="nullable"/>
11332 <RaiseException name="WebAPIException">
11335 with error type SecurityError, if the application does not have the privilege to call this method.
11338 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
11341 with error type NotSupportedError, if this feature is not supported.
11347 <Operation name="connectToSource" id="::Bluetooth::BluetoothHealthProfileHandler::connectToSource">
11348 <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>
11351 Connect to the health device which acts as the Source role.
11355 The ErrorCallback is launched with these error types:
11359 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
11361 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
11363 UnknownError - If any other error occurs. </li>
11373 http://tizen.org/privilege/bluetooth.health
11375 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
11376 var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
11377 var registerHealthApp = null;
11379 function healthConnectSuccess(channel) {
11380 console.log("Health device is connected");
11383 function healthConnectError(e) {
11384 console.log("Failed to connect to source: " + e.message);
11387 function gotDeviceInfo(device) {
11388 healthProfileHandler.connectToSource(device, registerHealthApp, healthConnectSuccess, healthConnectError);
11391 function healthRegisterSuccess(app) {
11392 console.log("Registered application: " + app.name);
11393 registerHealthApp = app;
11394 var peer = adapter.getDevice("35:F4:59:D1:7A:03", gotDeviceInfo);
11397 function healthRegisterError(e) {
11398 console.log("Failed to register application: " + e.message);
11401 healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
11404 <Type type="void"/>
11406 <Argument name="peer">
11409 The remote device which acts as the Source role.
11412 <Type name="BluetoothDevice"/>
11414 <Argument name="application">
11417 The registered application for the Sink role.
11420 <Type name="BluetoothHealthApplication"/>
11422 <Argument name="successCallback">
11425 The method to invoke when a connection is established successfully.
11428 <Type name="BluetoothHealthChannelSuccessCallback"/>
11430 <Argument optional="optional" name="errorCallback">
11433 The method to invoke when an error occurs.
11436 <Type name="ErrorCallback" nullable="nullable"/>
11440 <RaiseException name="WebAPIException">
11443 with error type SecurityError, if the application does not have the privilege to call this method.
11446 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
11449 with error type NotSupportedError, if this feature is not supported.
11456 <Interface name="BluetoothHealthApplication" id="::Bluetooth::BluetoothHealthApplication">
11457 <webidl> [NoInterfaceObject] interface BluetoothHealthApplication {
11459 readonly attribute unsigned short dataType;
11461 readonly attribute DOMString name;
11463 [TreatNonCallableAsNull] attribute <ref>BluetoothHealthChannelSuccessCallback</ref>? onconnect raises(<ref>WebAPIException</ref>);
11465 void unregister(optional <ref>SuccessCallback</ref>? successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
11470 This interface represents the Bluetooth health application.
11476 <ExtendedAttributeList>
11477 <ExtendedAttribute name="NoInterfaceObject">
11478 <webidl>NoInterfaceObject</webidl>
11479 </ExtendedAttribute>
11480 </ExtendedAttributeList>
11481 <Attribute readonly="readonly" name="dataType" id="::Bluetooth::BluetoothHealthApplication::dataType">
11482 <webidl> readonly attribute unsigned short dataType;</webidl>
11485 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.
11491 <Type type="unsigned short"/>
11493 <Attribute readonly="readonly" name="name" id="::Bluetooth::BluetoothHealthApplication::name">
11494 <webidl> readonly attribute DOMString name;</webidl>
11497 The friendly name associated with sink application.
11503 <Type type="DOMString"/>
11505 <Attribute name="onconnect" id="::Bluetooth::BluetoothHealthApplication::onconnect">
11506 <webidl> [TreatNonCallableAsNull] attribute <ref>BluetoothHealthChannelSuccessCallback</ref>? onconnect raises(<ref>WebAPIException</ref>);</webidl>
11509 The callback invoked when a health device is connected through this application.
11510 By default, this attribute is set to null.
11516 <ExtendedAttributeList>
11517 <ExtendedAttribute name="TreatNonCallableAsNull">
11518 <webidl>TreatNonCallableAsNull</webidl>
11519 </ExtendedAttribute>
11520 </ExtendedAttributeList>
11521 <Type name="BluetoothHealthChannelSuccessCallback" nullable="nullable"/>
11523 <RaiseException name="WebAPIException">
11526 with error type TypeMismatchError, if an input attribute is not compatible with the expected type for this attribute.
11532 <Operation name="unregister" id="::Bluetooth::BluetoothHealthApplication::unregister">
11533 <webidl> void unregister(optional <ref>SuccessCallback</ref>? successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
11536 Unregisters this application.
11540 The ErrorCallback is launched with these error types:
11544 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
11546 UnknownError - If any other error occurs. </li>
11556 http://tizen.org/privilege/bluetooth.health
11558 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
11559 var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
11560 var healthApp = null;
11562 function healthRegisterSuccess(app) {
11563 console.log("Registered application: " + app.name);
11565 healthApp.onconnect = function(channel) {
11566 console.log("Connected!!");
11570 function healthRegisterError(e) {
11571 console.log("Failed to register application: " + e.message);
11574 function startSink() {
11576 healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
11578 console.log("Error: " + e.message);
11582 function stopSink() {
11584 if(healthApp != null) {
11585 healthApp.unregister(function() {
11587 console.log("Health application is unregistered.");
11590 console.log ("Error: " + e.message);
11594 console.log("Error: " + err.message);
11599 <Type type="void"/>
11601 <Argument optional="optional" name="successCallback">
11604 The method to invoke when a sink application is registered successfully.
11607 <Type name="SuccessCallback" nullable="nullable"/>
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.
11635 <Interface name="BluetoothHealthChannel" id="::Bluetooth::BluetoothHealthChannel">
11636 <webidl> [NoInterfaceObject] interface BluetoothHealthChannel {
11638 readonly attribute <ref>BluetoothDevice</ref> peer;
11640 readonly attribute <ref>BluetoothHealthChannelType</ref> channelType;
11642 readonly attribute <ref>BluetoothHealthApplication</ref> application;
11644 readonly attribute boolean isConnected;
11646 void close() raises(<ref>WebAPIException</ref>);
11648 unsigned long sendData(byte[] data) raises(<ref>WebAPIException</ref>);
11650 void setListener(<ref>BluetoothHealthChannelChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);
11652 void unsetListener() raises(<ref>WebAPIException</ref>);
11657 This interface represents the Bluetooth health channel.
11663 <ExtendedAttributeList>
11664 <ExtendedAttribute name="NoInterfaceObject">
11665 <webidl>NoInterfaceObject</webidl>
11666 </ExtendedAttribute>
11667 </ExtendedAttributeList>
11668 <Attribute readonly="readonly" name="peer" id="::Bluetooth::BluetoothHealthChannel::peer">
11669 <webidl> readonly attribute <ref>BluetoothDevice</ref> peer;</webidl>
11672 The remote device to which this channel is connected.
11678 <Type name="BluetoothDevice"/>
11680 <Attribute readonly="readonly" name="channelType" id="::Bluetooth::BluetoothHealthChannel::channelType">
11681 <webidl> readonly attribute <ref>BluetoothHealthChannelType</ref> channelType;</webidl>
11684 The type of of this channel.
11690 <Type name="BluetoothHealthChannelType"/>
11692 <Attribute readonly="readonly" name="application" id="::Bluetooth::BluetoothHealthChannel::application">
11693 <webidl> readonly attribute <ref>BluetoothHealthApplication</ref> application;</webidl>
11696 The health application which is used to communicate with the remote device.
11702 <Type name="BluetoothHealthApplication"/>
11704 <Attribute readonly="readonly" name="isConnected" id="::Bluetooth::BluetoothHealthChannel::isConnected">
11705 <webidl> readonly attribute boolean isConnected;</webidl>
11708 An attrbitue to check whether any remote device is connected or not.
11714 <Type type="boolean"/>
11716 <Operation name="close" id="::Bluetooth::BluetoothHealthChannel::close">
11717 <webidl> void close() raises(<ref>WebAPIException</ref>);</webidl>
11720 Close the connected channel.
11721 <em>BluetoothHealthChannel.isConnected</em> is changed to <var>false</var> and <em>BluetoothHealthChannelChangeCallback.onclose</em> is invoked when this channel is closed successfully.
11730 http://tizen.org/privilege/bluetooth.health
11732 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
11733 var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
11735 function healthRegisterSuccess(app) {
11736 console.log("Registered application: " + app.name);
11737 app.onconnect = function(channel) {;
11738 console.log("Health device is connected");
11743 function healthRegisterError(e) {
11744 console.log("Failed to register application: " + e.message);
11747 healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
11750 <Type type="void"/>
11753 <RaiseException name="WebAPIException">
11756 with error type SecurityError, if the application does not have the privilege to call this method.
11759 with error type ServiceNotAvailableError - If a Bluetooth device is turned off.
11762 with error type UnknownError, if any other error occurs.
11765 with error type NotSupportedError, if this feature is not supported.
11771 <Operation name="sendData" id="::Bluetooth::BluetoothHealthChannel::sendData">
11772 <webidl> unsigned long sendData(byte[] data) raises(<ref>WebAPIException</ref>);</webidl>
11775 Send data and returns the number of bytes actually written.
11784 http://tizen.org/privilege/bluetooth.health
11786 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
11787 var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
11789 function healthRegisterSuccess(app) {
11790 console.log("Registered application: " + app.name);
11791 app.onconnect = function(channel) {
11792 console.log("Health device is connected");
11793 channel.sendData(dataToSend);
11797 function healthRegisterError(e) {
11798 console.log("Failed to register application: " + e.message);
11801 healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
11804 <Type type="unsigned long">
11807 unsigned long The number of bytes actually sent.
11812 <Argument name="data">
11818 <Type type="array">
11819 <Type type="byte"/>
11824 <RaiseException name="WebAPIException">
11827 with error type SecurityError, if the application does not have the privilege to call this method.
11830 with error type ServiceNotAvailableError - If a Bluetooth device is turned off.
11833 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
11836 with error type UnknownError, if any other error occurs.
11839 with error type NotSupportedError, if this feature is not supported.
11845 <Operation name="setListener" id="::Bluetooth::BluetoothHealthChannel::setListener">
11846 <webidl> void setListener(<ref>BluetoothHealthChannelChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);</webidl>
11849 Sets the listener to receive notifications.
11858 http://tizen.org/privilege/bluetooth.health
11860 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
11861 var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
11863 var channelCallback = {
11864 onmessage: function(data) {
11865 console.log("data is received")
11867 onclose: function() {
11868 console.log("channel is closed");
11872 function healthRegisterSuccess(app) {
11873 console.log("Registered application: " + app.name);
11874 app.onconnect = function(channel) {;
11875 console.log("Health device is connected");
11876 channel.setListener(channelCallback);
11880 function healthRegisterError(e) {
11881 console.log("Failed to register application: " + e.message);
11884 healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
11887 <Type type="void"/>
11889 <Argument name="listener">
11892 The event listener of Bluetooth health channel.
11895 <Type name="BluetoothHealthChannelChangeCallback"/>
11899 <RaiseException name="WebAPIException">
11902 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
11905 with error type SecurityError, if the application does not have the privilege to call this method.
11908 with error type UnknownError, if any other error occurs.
11914 <Operation name="unsetListener" id="::Bluetooth::BluetoothHealthChannel::unsetListener">
11915 <webidl> void unsetListener() raises(<ref>WebAPIException</ref>);</webidl>
11918 Unsets the listener, so stop receiving notifications.
11927 http://tizen.org/privilege/bluetooth.health
11929 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
11930 var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
11931 var connectedChannel = null;
11933 var channelCallback = {
11934 onmessage: function(data) {
11935 console.log("data is received")
11937 onclose: function() {
11938 console.log("channel is closed");
11939 connectedChannel.unsetListener();
11943 function healthRegisterSuccess(app) {
11944 console.log("Registered application: " + app.name);
11945 app.onconnect = function(channel) {;
11946 console.log("Health device is connected");
11947 connectedChannel = channel;
11948 connectedChannel.setListener(channelCallback);
11952 function healthRegisterError(e) {
11953 console.log("Failed to register application: " + e.message);
11956 healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
11959 <Type type="void"/>
11962 <RaiseException name="WebAPIException">
11965 with error type SecurityError, if the application does not have the privilege to call this method.
11968 with error type UnknownError, if any other error occurs.
11975 <Interface name="BluetoothAdapterChangeCallback" id="::Bluetooth::BluetoothAdapterChangeCallback">
11976 <webidl> [Callback, NoInterfaceObject] interface BluetoothAdapterChangeCallback {
11977 void onstatechanged(boolean powered);
11978 void onnamechanged(DOMString name);
11979 void onvisibilitychanged(boolean visible);
11983 This interface specifies a set of methods to be invoked when the changes of Bluetooth adapter occur.
11989 <ExtendedAttributeList>
11990 <ExtendedAttribute name="Callback">
11991 <webidl>Callback</webidl>
11992 </ExtendedAttribute>
11993 <ExtendedAttribute name="NoInterfaceObject">
11994 <webidl> NoInterfaceObject</webidl>
11995 </ExtendedAttribute>
11996 </ExtendedAttributeList>
11997 <Operation name="onstatechanged" id="::Bluetooth::BluetoothAdapterChangeCallback::onstatechanged">
11998 <webidl> void onstatechanged(boolean powered);</webidl>
12001 The method to be invoked when the power state is changed.
12007 <Type type="void"/>
12009 <Argument name="powered">
12012 The power state of local Bluetooth: <var>true</var> means power-on, <var>false</var> means power-off.
12015 <Type type="boolean"/>
12019 <Operation name="onnamechanged" id="::Bluetooth::BluetoothAdapterChangeCallback::onnamechanged">
12020 <webidl> void onnamechanged(DOMString name);</webidl>
12023 The method to be invoked when the name is changed.
12029 <Type type="void"/>
12031 <Argument name="name">
12034 The name of local Bluetooth.
12037 <Type type="DOMString"/>
12041 <Operation name="onvisibilitychanged" id="::Bluetooth::BluetoothAdapterChangeCallback::onvisibilitychanged">
12042 <webidl> void onvisibilitychanged(boolean visible);</webidl>
12045 The method to be invoked when the visibility is changed.
12051 <Type type="void"/>
12053 <Argument name="visible">
12056 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.
12059 <Type type="boolean"/>
12064 <Interface name="BluetoothDeviceSuccessCallback" id="::Bluetooth::BluetoothDeviceSuccessCallback">
12065 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothDeviceSuccessCallback {
12066 void onsuccess(<ref>BluetoothDevice</ref> device);
12070 This interface implements the success callback <em>BluetoothAdapter.getDevice() </em>and <em>BluetoothAdapter.createBonding()</em>.
12076 <ExtendedAttributeList>
12077 <ExtendedAttribute name="Callback" value="FunctionOnly">
12078 <webidl>Callback</webidl>
12079 </ExtendedAttribute>
12080 <ExtendedAttribute name="NoInterfaceObject">
12081 <webidl> NoInterfaceObject</webidl>
12082 </ExtendedAttribute>
12083 </ExtendedAttributeList>
12084 <Operation name="onsuccess" id="::Bluetooth::BluetoothDeviceSuccessCallback::onsuccess">
12085 <webidl> void onsuccess(<ref>BluetoothDevice</ref> device);</webidl>
12088 The method to be invoked on success.
12094 <Type type="void"/>
12096 <Argument name="device">
12099 The BluetoothDevice object.
12102 <Type name="BluetoothDevice"/>
12107 <Interface name="BluetoothDeviceArraySuccessCallback" id="::Bluetooth::BluetoothDeviceArraySuccessCallback">
12108 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothDeviceArraySuccessCallback {
12109 void onsuccess(<ref>BluetoothDevice</ref>[] devices);
12113 The success callback for <em>BluetoothAdapter.getKnownDevices()</em>.
12119 <ExtendedAttributeList>
12120 <ExtendedAttribute name="Callback" value="FunctionOnly">
12121 <webidl>Callback</webidl>
12122 </ExtendedAttribute>
12123 <ExtendedAttribute name="NoInterfaceObject">
12124 <webidl> NoInterfaceObject</webidl>
12125 </ExtendedAttribute>
12126 </ExtendedAttributeList>
12127 <Operation name="onsuccess" id="::Bluetooth::BluetoothDeviceArraySuccessCallback::onsuccess">
12128 <webidl> void onsuccess(<ref>BluetoothDevice</ref>[] devices);</webidl>
12131 The method to be invoked when device information is ready.
12137 <Type type="void"/>
12139 <Argument name="devices">
12142 List of devices known to local Bluetooth adapter. Each element is a BluetoothDevice.
12145 <Type type="array">
12146 <Type name="BluetoothDevice"/>
12152 <Interface name="BluetoothDiscoverDevicesSuccessCallback" id="::Bluetooth::BluetoothDiscoverDevicesSuccessCallback">
12153 <webidl> [Callback, NoInterfaceObject] interface BluetoothDiscoverDevicesSuccessCallback {
12155 void ondevicefound(<ref>BluetoothDevice</ref> device);
12156 void ondevicedisappeared(<ref>BluetoothAddress</ref> address);
12157 void onfinished(<ref>BluetoothDevice</ref>[] foundDevices);
12161 The success callback for <em>BluetoothAdapter.discoverDevices()</em>.
12167 <ExtendedAttributeList>
12168 <ExtendedAttribute name="Callback">
12169 <webidl>Callback</webidl>
12170 </ExtendedAttribute>
12171 <ExtendedAttribute name="NoInterfaceObject">
12172 <webidl> NoInterfaceObject</webidl>
12173 </ExtendedAttribute>
12174 </ExtendedAttributeList>
12175 <Operation name="onstarted" id="::Bluetooth::BluetoothDiscoverDevicesSuccessCallback::onstarted">
12176 <webidl> void onstarted();</webidl>
12179 The method to be invoked at the beginning of a device discovery process for finding the nearby Bluetooth device.
12185 <Type type="void"/>
12188 <Operation name="ondevicefound" id="::Bluetooth::BluetoothDiscoverDevicesSuccessCallback::ondevicefound">
12189 <webidl> void ondevicefound(<ref>BluetoothDevice</ref> device);</webidl>
12192 The method to be invoked when a new device is discovered in the process of inquiry/discovery.
12198 <Type type="void"/>
12200 <Argument name="device">
12206 <Type name="BluetoothDevice"/>
12210 <Operation name="ondevicedisappeared" id="::Bluetooth::BluetoothDiscoverDevicesSuccessCallback::ondevicedisappeared">
12211 <webidl> void ondevicedisappeared(<ref>BluetoothAddress</ref> address);</webidl>
12214 The method to be invoked when a device is lost from proximity.
12215 After that, this device is no longer visible.
12221 <Type type="void"/>
12223 <Argument name="address">
12226 The address of the device that is no longer in range or visible.
12229 <Type name="BluetoothAddress"/>
12233 <Operation name="onfinished" id="::Bluetooth::BluetoothDiscoverDevicesSuccessCallback::onfinished">
12234 <webidl> void onfinished(<ref>BluetoothDevice</ref>[] foundDevices);</webidl>
12237 The method to be invoked when the device discovery process has finished.
12243 <Type type="void"/>
12245 <Argument name="foundDevices">
12248 The array of devices found in this discovery session. </p></description>
12250 <Type type="array">
12251 <Type name="BluetoothDevice"/>
12257 <Interface name="BluetoothSocketSuccessCallback" id="::Bluetooth::BluetoothSocketSuccessCallback">
12258 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothSocketSuccessCallback {
12259 void onsuccess(<ref>BluetoothSocket</ref> socket);
12263 The success method for <em>BluetoothDevice.connectToServiceByUUID()</em>.
12269 <ExtendedAttributeList>
12270 <ExtendedAttribute name="Callback" value="FunctionOnly">
12271 <webidl>Callback</webidl>
12272 </ExtendedAttribute>
12273 <ExtendedAttribute name="NoInterfaceObject">
12274 <webidl> NoInterfaceObject</webidl>
12275 </ExtendedAttribute>
12276 </ExtendedAttributeList>
12277 <Operation name="onsuccess" id="::Bluetooth::BluetoothSocketSuccessCallback::onsuccess">
12278 <webidl> void onsuccess(<ref>BluetoothSocket</ref> socket);</webidl>
12281 The method to be invoked when the connection to a service is ready.
12287 <Type type="void"/>
12289 <Argument name="socket">
12292 The socket to connect to the specified service on a remote device.
12295 <Type name="BluetoothSocket"/>
12300 <Interface name="BluetoothServiceSuccessCallback" id="::Bluetooth::BluetoothServiceSuccessCallback">
12301 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothServiceSuccessCallback {
12302 void onsuccess(<ref>BluetoothServiceHandler</ref> handler);
12306 This interface implements the success callback for <em>BluetoothAdapter.registerRFCOMMServiceByUUID()</em>.
12312 <ExtendedAttributeList>
12313 <ExtendedAttribute name="Callback" value="FunctionOnly">
12314 <webidl>Callback</webidl>
12315 </ExtendedAttribute>
12316 <ExtendedAttribute name="NoInterfaceObject">
12317 <webidl> NoInterfaceObject</webidl>
12318 </ExtendedAttribute>
12319 </ExtendedAttributeList>
12320 <Operation name="onsuccess" id="::Bluetooth::BluetoothServiceSuccessCallback::onsuccess">
12321 <webidl> void onsuccess(<ref>BluetoothServiceHandler</ref> handler);</webidl>
12324 The method to be invoked when registering a service with the local device is successful.
12330 <Type type="void"/>
12332 <Argument name="handler">
12335 Bluetooth service handler.
12338 <Type name="BluetoothServiceHandler"/>
12343 <Interface name="BluetoothHealthApplicationSuccessCallback" id="::Bluetooth::BluetoothHealthApplicationSuccessCallback">
12344 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothHealthApplicationSuccessCallback {
12345 void onsuccess(<ref>BluetoothHealthApplication</ref> application);
12349 The success method for <em>BluetoothHealthProfileHandler.registerSinkApplication()</em>.
12355 <ExtendedAttributeList>
12356 <ExtendedAttribute name="Callback" value="FunctionOnly">
12357 <webidl>Callback</webidl>
12358 </ExtendedAttribute>
12359 <ExtendedAttribute name="NoInterfaceObject">
12360 <webidl> NoInterfaceObject</webidl>
12361 </ExtendedAttribute>
12362 </ExtendedAttributeList>
12363 <Operation name="onsuccess" id="::Bluetooth::BluetoothHealthApplicationSuccessCallback::onsuccess">
12364 <webidl> void onsuccess(<ref>BluetoothHealthApplication</ref> application);</webidl>
12367 The method to be invoked when the application is registered successfully.
12373 <Type type="void"/>
12375 <Argument name="application">
12378 The registered health application.
12381 <Type name="BluetoothHealthApplication"/>
12386 <Interface name="BluetoothHealthChannelSuccessCallback" id="::Bluetooth::BluetoothHealthChannelSuccessCallback">
12387 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothHealthChannelSuccessCallback {
12388 void onsuccess(<ref>BluetoothHealthChannel</ref> channel);
12392 The success method for <em>BluetoothHealthProfileHandler.connectToSource()</em> and the event callback for <em>BluetoothHealthApplication.onconnect</em>.
12398 <ExtendedAttributeList>
12399 <ExtendedAttribute name="Callback" value="FunctionOnly">
12400 <webidl>Callback</webidl>
12401 </ExtendedAttribute>
12402 <ExtendedAttribute name="NoInterfaceObject">
12403 <webidl> NoInterfaceObject</webidl>
12404 </ExtendedAttribute>
12405 </ExtendedAttributeList>
12406 <Operation name="onsuccess" id="::Bluetooth::BluetoothHealthChannelSuccessCallback::onsuccess">
12407 <webidl> void onsuccess(<ref>BluetoothHealthChannel</ref> channel);</webidl>
12410 The method to be invoked when a connection is established.
12416 <Type type="void"/>
12418 <Argument name="channel">
12421 The connected health channel.
12424 <Type name="BluetoothHealthChannel"/>
12429 <Interface name="BluetoothHealthChannelChangeCallback" id="::Bluetooth::BluetoothHealthChannelChangeCallback">
12430 <webidl> [Callback, NoInterfaceObject] interface BluetoothHealthChannelChangeCallback {
12431 void onmessage(byte[] data);
12437 This interface specifies a set of methods to be invoked when the changes of heath channel occur.
12443 <ExtendedAttributeList>
12444 <ExtendedAttribute name="Callback">
12445 <webidl>Callback</webidl>
12446 </ExtendedAttribute>
12447 <ExtendedAttribute name="NoInterfaceObject">
12448 <webidl> NoInterfaceObject</webidl>
12449 </ExtendedAttribute>
12450 </ExtendedAttributeList>
12451 <Operation name="onmessage" id="::Bluetooth::BluetoothHealthChannelChangeCallback::onmessage">
12452 <webidl> void onmessage(byte[] data);</webidl>
12455 The method to be invoked when the message is received.
12461 <Type type="void"/>
12463 <Argument name="data">
12469 <Type type="array">
12470 <Type type="byte"/>
12475 <Operation name="onclose" id="::Bluetooth::BluetoothHealthChannelChangeCallback::onclose">
12476 <webidl> void onclose();</webidl>
12479 The method to be invoked when the health channel is closed.
12485 <Type type="void"/>
12490 <Module name="Bookmark" id="::Bookmark">
12491 <webidl>module Bookmark {
12493 typedef (<ref>BookmarkItem</ref> or <ref>BookmarkFolder</ref>) Bookmark;
12496 [NoInterfaceObject] interface BookmarkManagerObject {
12497 readonly attribute <ref>BookmarkManager</ref> bookmark;
12499 <ref>Tizen</ref> implements <ref>BookmarkManagerObject</ref>;
12502 [NoInterfaceObject] interface BookmarkManager {
12504 <ref>Bookmark</ref>[] get(optional <ref>BookmarkFolder</ref>? parentFolder, optional boolean? recursive) raises(<ref>WebAPIException</ref>);
12506 void add(<ref>Bookmark</ref> bookmark, optional <ref>BookmarkFolder</ref>? parentFolder) raises(<ref>WebAPIException</ref>);
12508 void remove(optional <ref>Bookmark</ref>? bookmark) raises(<ref>WebAPIException</ref>);
12513 [Constructor(DOMString title, DOMString url)]
12515 interface BookmarkItem {
12517 readonly attribute <ref>BookmarkFolder</ref>? parent;
12519 readonly attribute DOMString title;
12521 readonly attribute DOMString url;
12525 [Constructor(DOMString title)]
12527 interface BookmarkFolder {
12529 readonly attribute <ref>BookmarkFolder</ref>? parent;
12531 readonly attribute DOMString title;
12537 This API provides interfaces and methods for accessing Bookmark.
12538 This API provides functionality to get, add, and remove bookmarks.
12542 For more information on the Bookmark features, see <a href="../../org.tizen.web.appprogramming/html/guide/social_guide/bookmark.htm">Bookmark Guide</a>.
12549 <Typedef name="Bookmark" id="::Bookmark::Bookmark">
12550 <webidl> typedef (<ref>BookmarkItem</ref> or <ref>BookmarkFolder</ref>) Bookmark;</webidl>
12553 A bookmark, which could be either a <em>BookmarkItem </em>or a <em>BookmarkFolder</em>.
12559 <Type type="union">
12560 <Type name="BookmarkItem"/>
12561 <Type name="BookmarkFolder"/>
12564 <Interface name="BookmarkManagerObject" id="::Bookmark::BookmarkManagerObject">
12565 <webidl> [NoInterfaceObject] interface BookmarkManagerObject {
12566 readonly attribute <ref>BookmarkManager</ref> bookmark;
12570 Defines what is instantiated by the Tizen object from the Tizen Platform.
12574 There will be a <em>tizen.bookmark </em>object that allows to access the functionality of the Bookmark API.
12581 <ExtendedAttributeList>
12582 <ExtendedAttribute name="NoInterfaceObject">
12583 <webidl>NoInterfaceObject</webidl>
12584 </ExtendedAttribute>
12585 </ExtendedAttributeList>
12586 <Attribute readonly="readonly" name="bookmark" id="::Bookmark::BookmarkManagerObject::bookmark">
12587 <webidl> readonly attribute <ref>BookmarkManager</ref> bookmark;</webidl>
12588 <Type name="BookmarkManager"/>
12591 <Implements name1="Tizen" name2="BookmarkManagerObject">
12592 <webidl> <ref>Tizen</ref> implements <ref>BookmarkManagerObject</ref>;</webidl>
12594 <Interface name="BookmarkManager" id="::Bookmark::BookmarkManager">
12595 <webidl> [NoInterfaceObject] interface BookmarkManager {
12597 <ref>Bookmark</ref>[] get(optional <ref>BookmarkFolder</ref>? parentFolder, optional boolean? recursive) raises(<ref>WebAPIException</ref>);
12599 void add(<ref>Bookmark</ref> bookmark, optional <ref>BookmarkFolder</ref>? parentFolder) raises(<ref>WebAPIException</ref>);
12601 void remove(optional <ref>Bookmark</ref>? bookmark) raises(<ref>WebAPIException</ref>);
12606 This interface provides access to the bookmark folder and bookmark item.
12610 It provides access to the API functionalities through the <em>tizen.bookmark </em>interface.
12617 <ExtendedAttributeList>
12618 <ExtendedAttribute name="NoInterfaceObject">
12619 <webidl>NoInterfaceObject</webidl>
12620 </ExtendedAttribute>
12621 </ExtendedAttributeList>
12622 <Operation name="get" id="::Bookmark::BookmarkManager::get">
12623 <webidl> <ref>Bookmark</ref>[] get(optional <ref>BookmarkFolder</ref>? parentFolder, optional boolean? recursive) raises(<ref>WebAPIException</ref>);</webidl>
12626 Gets all bookmark items and bookmark folders.
12630 If no parentFolder is passed, or the parentFolder contains <var>null</var>, it is considered as the default bookmark folder(The root bookmark folder).
12631 In this case, the return will contain bookmarks under the root bookmark folder.
12638 http://tizen.org/privilege/bookmark.read
12644 // retrieve bookmarks from the root bookmark folder recursively
12645 var allBookmarks = tizen.bookmark.get(null, true);
12647 console.log (err.name +": " + err.message);
12651 <Type type="array">
12654 Bookmark[] Array of Bookmarks.
12657 <Type name="Bookmark"/>
12660 <Argument optional="optional" name="parentFolder">
12663 The parent bookmark folder to retrieve the result bookmarks.
12666 <Type name="BookmarkFolder" nullable="nullable"/>
12668 <Argument optional="optional" name="recursive">
12671 The flag indicating whether sub-bookmarks are also retrieved recursively or not<br/> (The default value is <em>false</em>).
12674 <Type type="boolean" nullable="nullable"/>
12678 <RaiseException name="WebAPIException">
12681 with error type NotFoundError, if the parentFolder parameter isn't found in bookmark database.
12684 with error type TypeMismatchError, if an input parameter is not compatible with the expected type for that parameter.
12687 with error type SecurityError, if the application does not have the privilege to call this method.
12690 with error type UnknownError, if any other error occurs.
12696 <Operation name="add" id="::Bookmark::BookmarkManager::add">
12697 <webidl> void add(<ref>Bookmark</ref> bookmark, optional <ref>BookmarkFolder</ref>? parentFolder) raises(<ref>WebAPIException</ref>);</webidl>
12700 Adds a bookmark item or a bookmark folder.
12704 If no parentFolder is passed, or the parentFolder contains <var>null</var>, it is considered as the default bookmark folder(The root bookmark folder).
12705 In this case, the bookmark is added under the root bookmark folder.
12712 http://tizen.org/privilege/bookmark.write
12718 // add a bookmark item to root bookmark folder.
12719 tizen.bookmark.add(new tizen.BookmarkItem("tizen", "https://www.tizen.org"));
12721 console.log (err.name +": " + err.message);
12725 <Type type="void"/>
12727 <Argument name="bookmark">
12730 The bookmark to be added.
12733 <Type name="Bookmark"/>
12735 <Argument optional="optional" name="parentFolder">
12738 The parent folder of a bookmark to be added.
12741 <Type name="BookmarkFolder" nullable="nullable"/>
12745 <RaiseException name="WebAPIException">
12748 with error type NotFoundError, if a parentFolder parameter isn't found in bookmark database.
12751 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.
12754 with error type TypeMismatchError, if an input parameter is not compatible with the expected type for that parameter.
12757 with error type SecurityError, if the application does not have the privilege to call this method.
12760 with error type UnknownError, if any other error occurs.
12766 <Operation name="remove" id="::Bookmark::BookmarkManager::remove">
12767 <webidl> void remove(optional <ref>Bookmark</ref>? bookmark) raises(<ref>WebAPIException</ref>);</webidl>
12770 Removes a bookmark item or a bookmark folder.
12774 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).
12775 In this case, all the bookmarks will be removed.
12782 http://tizen.org/privilege/bookmark.write
12788 // remove all the bookmark folders and items
12789 tizen.bookmark.remove();
12791 console.log (err.name +": " + err.message);
12795 <Type type="void"/>
12797 <Argument optional="optional" name="bookmark">
12800 The bookmark to be removed.
12803 <Type name="Bookmark" nullable="nullable"/>
12807 <RaiseException name="WebAPIException">
12810 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
12813 with error type SecurityError, if the application does not have the privilege to call this method.
12816 with error type UnknownError, if any other error occurs.
12823 <Interface name="BookmarkItem" id="::Bookmark::BookmarkItem">
12824 <webidl> [Constructor(DOMString title, DOMString url)]
12826 interface BookmarkItem {
12828 readonly attribute <ref>BookmarkFolder</ref>? parent;
12830 readonly attribute DOMString title;
12832 readonly attribute DOMString url;
12837 This interface implements the <em>BookmarkItem </em>object.
12843 <ExtendedAttributeList>
12844 <ExtendedAttribute name="Constructor">
12845 <webidl>Constructor(DOMString title, DOMString url)</webidl>
12848 // create a bookmark item
12849 var tizen = new tizen.BookmarkItem("tizen", "https://www.tizen.org");
12851 console.log (err.name +": " + err.message);
12856 <Argument name="title">
12857 <Type type="DOMString"/>
12859 <Argument name="url">
12860 <Type type="DOMString"/>
12863 </ExtendedAttribute>
12864 </ExtendedAttributeList>
12865 <Attribute readonly="readonly" name="parent" id="::Bookmark::BookmarkItem::parent">
12866 <webidl> readonly attribute <ref>BookmarkFolder</ref>? parent;</webidl>
12869 The parent bookmark folder.
12873 This attribute is meaningful when this object is successfully added or retrieved.
12874 If this BookmarkItem is not added yet, its value is set to undefined.
12877 If the parent bookmark folder indicates the root bookmark folder, the value will be <var>null</var>.
12884 <Type name="BookmarkFolder" nullable="nullable"/>
12886 <Attribute readonly="readonly" name="title" id="::Bookmark::BookmarkItem::title">
12887 <webidl> readonly attribute DOMString title;</webidl>
12890 The title of the bookmark.
12896 <Type type="DOMString"/>
12898 <Attribute readonly="readonly" name="url" id="::Bookmark::BookmarkItem::url">
12899 <webidl> readonly attribute DOMString url;</webidl>
12902 The uri of the bookmark.
12908 <Type type="DOMString"/>
12911 <Interface name="BookmarkFolder" id="::Bookmark::BookmarkFolder">
12912 <webidl> [Constructor(DOMString title)]
12914 interface BookmarkFolder {
12916 readonly attribute <ref>BookmarkFolder</ref>? parent;
12918 readonly attribute DOMString title;
12923 This interface implements the <em>BookmarkFolder </em>object.
12929 <ExtendedAttributeList>
12930 <ExtendedAttribute name="Constructor">
12931 <webidl>Constructor(DOMString title)</webidl>
12934 // create a bookmark folder
12935 var folder = new tizen.BookmarkFolder("folder");
12937 console.log (err.name +": " + err.message);
12942 <Argument name="title">
12943 <Type type="DOMString"/>
12946 </ExtendedAttribute>
12947 </ExtendedAttributeList>
12948 <Attribute readonly="readonly" name="parent" id="::Bookmark::BookmarkFolder::parent">
12949 <webidl> readonly attribute <ref>BookmarkFolder</ref>? parent;</webidl>
12952 The parent bookmark folder.
12956 This attribute is meaningful when this object is successfully added or retrieved.
12957 If this BookmarkFolder is not added yet, its value is set to undefined.
12960 If the parent bookmark folder indicates the root bookmark folder, the value will be <var>null</var>.
12967 <Type name="BookmarkFolder" nullable="nullable"/>
12969 <Attribute readonly="readonly" name="title" id="::Bookmark::BookmarkFolder::title">
12970 <webidl> readonly attribute DOMString title;</webidl>
12973 The title of the bookmark folder.
12979 <Type type="DOMString"/>
12983 <Module name="Calendar" id="::Calendar">
12984 <webidl>module Calendar {
12985 typedef DOMString CalendarId;
12987 typedef DOMString CalendarTaskId;
12989 typedef (<ref>CalendarEventId</ref> or <ref>CalendarTaskId</ref>) CalendarItemId;
12991 enum CalendarType { "EVENT", "TASK" };
12993 enum CalendarTextFormat { "ICALENDAR_20", "VCALENDAR_10" };
12995 enum AlarmMethod { "SOUND", "DISPLAY" };
12998 enum RecurrenceRuleFrequency { "DAILY", "WEEKLY", "MONTHLY", "YEARLY" };
13000 enum ByDayValue { "MO", "TU", "WE", "TH", "FR", "SA", "SU" };
13002 enum EventAvailability { "BUSY", "FREE" };
13004 enum AttendeeType { "INDIVIDUAL", "GROUP", "RESOURCE", "ROOM", "UNKNOWN" };
13006 enum AttendeeStatus { "PENDING", "ACCEPTED", "DECLINED", "TENTATIVE", "DELEGATED", "COMPLETED", "IN_PROCESS" };
13008 enum AttendeeRole { "REQ_PARTICIPANT", "OPT_PARTICIPANT", "NON_PARTICIPANT", "CHAIR" };
13010 enum CalendarItemPriority { "HIGH", "MEDIUM", "LOW" };
13012 enum CalendarItemVisibility { "PUBLIC", "PRIVATE", "CONFIDENTIAL" };
13014 enum CalendarItemStatus { "TENTATIVE", "CONFIRMED", "CANCELLED", "NEEDS_ACTION", "IN_PROCESS", "COMPLETED" };
13016 [NoInterfaceObject] interface CalendarManagerObject{
13017 readonly attribute <ref>CalendarManager</ref> calendar;
13019 <ref>Tizen</ref> implements <ref>CalendarManagerObject</ref>;
13021 [NoInterfaceObject] interface CalendarManager {
13022 void getCalendars(<ref>CalendarType</ref> type,
13023 <ref>CalendarArraySuccessCallback</ref> successCallback,
13024 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
13026 <ref>Calendar</ref> getUnifiedCalendar(<ref>CalendarType</ref> type) raises(<ref>WebAPIException</ref>);
13028 <ref>Calendar</ref> getDefaultCalendar(<ref>CalendarType</ref> type) raises(<ref>WebAPIException</ref>);
13030 <ref>Calendar</ref> getCalendar(<ref>CalendarType</ref> type, <ref>CalendarId</ref> id) raises(<ref>WebAPIException</ref>);
13033 [NoInterfaceObject] interface Calendar {
13035 readonly attribute <ref>CalendarId</ref> id;
13037 readonly attribute DOMString name;
13039 <ref>CalendarItem</ref> get(<ref>CalendarItemId</ref> id) raises(<ref>WebAPIException</ref>);
13041 void add(<ref>CalendarItem</ref> item) raises(<ref>WebAPIException</ref>);
13043 void addBatch(<ref>CalendarItem</ref>[] items,
13044 optional <ref>CalendarItemArraySuccessCallback</ref>? successCallback,
13045 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
13047 void update(<ref>CalendarItem</ref> item,
13048 optional boolean? updateAllInstances) raises(<ref>WebAPIException</ref>);
13050 void updateBatch(<ref>CalendarItem</ref>[] items,
13051 optional <ref>SuccessCallback</ref>? successCallback,
13052 optional <ref>ErrorCallback</ref>? errorCallback,
13053 optional boolean? updateAllInstances) raises(<ref>WebAPIException</ref>);
13055 void remove(<ref>CalendarItemId</ref> id) raises(<ref>WebAPIException</ref>);
13057 void removeBatch(<ref>CalendarItemId</ref>[] ids,
13058 optional <ref>SuccessCallback</ref>? successCallback,
13059 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
13061 void find(<ref>CalendarItemArraySuccessCallback</ref> successCallback,
13062 optional <ref>ErrorCallback</ref>? errorCallback,
13063 optional <ref>AbstractFilter</ref>? filter,
13064 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);
13066 long addChangeListener(<ref>CalendarChangeCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);
13068 void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
13071 dictionary CalendarItemInit {
13072 DOMString description;
13075 <ref>TZDate</ref> startDate;
13076 <ref>TimeDuration</ref> duration;
13077 DOMString location;
13078 <ref>SimpleCoordinates</ref> geolocation;
13079 DOMString organizer;
13080 <ref>CalendarItemVisibility</ref> visibility;
13081 <ref>CalendarItemStatus</ref> status;
13082 <ref>CalendarItemPriority</ref> priority;
13083 <ref>CalendarAlarm</ref>[] alarms;
13084 DOMString[] categories;
13085 <ref>CalendarAttendee</ref>[] attendees;
13088 dictionary CalendarTaskInit: <ref>CalendarItemInit</ref> {
13089 <ref>TZDate</ref> dueDate;
13090 <ref>TZDate</ref> completedDate;
13094 dictionary CalendarEventInit: <ref>CalendarItemInit</ref> {
13095 <ref>TZDate</ref> endDate;
13096 <ref>EventAvailability</ref> availability;
13097 <ref>CalendarRecurrenceRule</ref> recurrenceRule;
13100 [NoInterfaceObject] interface CalendarItem {
13101 readonly attribute <ref>CalendarItemId</ref>? id;
13103 readonly attribute <ref>CalendarId</ref>? calendarId;
13105 readonly attribute <ref>TZDate</ref>? lastModificationDate;
13107 attribute DOMString? description setraises(<ref>WebAPIException</ref>);
13109 attribute DOMString? summary setraises(<ref>WebAPIException</ref>);
13111 attribute boolean isAllDay setraises(<ref>WebAPIException</ref>);
13113 attribute <ref>TZDate</ref>? startDate setraises(<ref>WebAPIException</ref>);
13115 attribute <ref>TimeDuration</ref>? duration setraises(<ref>WebAPIException</ref>);
13117 attribute DOMString? location setraises(<ref>WebAPIException</ref>);
13119 attribute <ref>SimpleCoordinates</ref>? geolocation setraises(<ref>WebAPIException</ref>);
13121 attribute DOMString? organizer setraises(<ref>WebAPIException</ref>);
13123 attribute <ref>CalendarItemVisibility</ref> visibility setraises(<ref>WebAPIException</ref>);
13125 attribute <ref>CalendarItemStatus</ref> status setraises(<ref>WebAPIException</ref>);
13127 attribute <ref>CalendarItemPriority</ref> priority setraises(<ref>WebAPIException</ref>);
13129 attribute <ref>CalendarAlarm</ref>[] alarms setraises(<ref>WebAPIException</ref>);
13131 attribute DOMString[] categories setraises(<ref>WebAPIException</ref>);
13133 attribute <ref>CalendarAttendee</ref>[] attendees setraises(<ref>WebAPIException</ref>);
13135 DOMString convertToString(<ref>CalendarTextFormat</ref> format) raises(<ref>WebAPIException</ref>);
13137 <ref>CalendarItem</ref> clone() raises(<ref>WebAPIException</ref>);
13140 [Constructor(optional <ref>CalendarTaskInit</ref>? taskInitDict),
13141 Constructor(DOMString stringRepresentation, <ref>CalendarTextFormat</ref> format)]
13142 interface CalendarTask : <ref>CalendarItem</ref> {
13143 attribute <ref>TZDate</ref>? dueDate setraises(<ref>WebAPIException</ref>);
13145 attribute <ref>TZDate</ref>? completedDate setraises(<ref>WebAPIException</ref>);
13147 attribute unsigned short progress setraises(<ref>WebAPIException</ref>);
13150 [Constructor(optional <ref>CalendarEventInit</ref>? eventInitDict),
13151 Constructor(DOMString stringRepresentation, <ref>CalendarTextFormat</ref> format)]
13152 interface CalendarEvent : <ref>CalendarItem</ref> {
13153 readonly attribute boolean isDetached;
13155 attribute <ref>TZDate</ref>? endDate setraises(<ref>WebAPIException</ref>);
13157 attribute <ref>EventAvailability</ref> availability setraises(<ref>WebAPIException</ref>);
13159 attribute <ref>CalendarRecurrenceRule</ref>? recurrenceRule setraises(<ref>WebAPIException</ref>);
13161 void expandRecurrence(<ref>TZDate</ref> startDate,
13162 <ref>TZDate</ref> endDate,
13163 <ref>CalendarEventArraySuccessCallback</ref> successCallback,
13164 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
13167 dictionary CalendarAttendeeInit {
13169 <ref>AttendeeRole</ref> role;
13170 <ref>AttendeeStatus</ref> status;
13172 <ref>AttendeeType</ref> type;
13174 DOMString delegatorURI;
13175 DOMString delegateURI;
13176 <ref>ContactRef</ref> contactRef;
13179 [Constructor(DOMString uri, optional <ref>CalendarAttendeeInit</ref>? attendeeInitDict)]
13180 interface CalendarAttendee
13182 attribute DOMString uri;
13184 attribute DOMString? name;
13186 attribute <ref>AttendeeRole</ref> role;
13188 attribute <ref>AttendeeStatus</ref> status;
13190 attribute boolean RSVP;
13192 attribute <ref>AttendeeType</ref> type;
13194 attribute DOMString? group;
13196 attribute DOMString? delegatorURI;
13198 attribute DOMString? delegateURI;
13200 attribute <ref>ContactRef</ref>? contactRef;
13203 dictionary CalendarRecurrenceRuleInit {
13205 <ref>TZDate</ref> untilDate;
13206 long occurrenceCount;
13207 <ref>ByDayValue</ref>[] daysOfTheWeek;
13208 short[] setPositions;
13209 <ref>TZDate</ref>[] exceptions;
13212 [Constructor(<ref>RecurrenceRuleFrequency</ref> frequency, optional <ref>CalendarRecurrenceRuleInit</ref>? ruleInitDict)]
13213 interface CalendarRecurrenceRule
13215 attribute <ref>RecurrenceRuleFrequency</ref> frequency;
13217 attribute unsigned short interval;
13219 attribute <ref>TZDate</ref>? untilDate;
13221 attribute long occurrenceCount;
13223 attribute <ref>ByDayValue</ref>[] daysOfTheWeek;
13225 attribute short[] setPositions;
13227 attribute <ref>TZDate</ref>[] exceptions;
13230 [Constructor(DOMString uid, optional DOMString? rid)]
13231 interface CalendarEventId {
13232 attribute DOMString uid;
13234 attribute DOMString? rid;
13237 [Constructor(<ref>TZDate</ref> absoluteDate, <ref>AlarmMethod</ref> method, optional DOMString? description),
13238 Constructor(<ref>TimeDuration</ref> before, <ref>AlarmMethod</ref> method, optional DOMString? description)]
13239 interface CalendarAlarm {
13240 attribute <ref>TZDate</ref>? absoluteDate setraises(<ref>WebAPIException</ref>);
13242 attribute <ref>TimeDuration</ref>? before setraises(<ref>WebAPIException</ref>);
13244 attribute <ref>AlarmMethod</ref> method setraises(<ref>WebAPIException</ref>);
13246 attribute DOMString? description;
13249 [Callback=FunctionOnly, NoInterfaceObject]
13250 interface CalendarEventArraySuccessCallback {
13251 void onsuccess(<ref>CalendarEvent</ref>[] events);
13254 [Callback=FunctionOnly, NoInterfaceObject]
13255 interface CalendarItemArraySuccessCallback {
13256 void onsuccess(<ref>CalendarItem</ref>[] items);
13259 [Callback=FunctionOnly, NoInterfaceObject]
13260 interface CalendarArraySuccessCallback {
13261 void onsuccess(<ref>Calendar</ref>[] calendars);
13264 [Callback, NoInterfaceObject] interface CalendarChangeCallback {
13265 void onitemsadded(<ref>CalendarItem</ref>[] items);
13267 void onitemsupdated(<ref>CalendarItem</ref>[] items);
13269 void onitemsremoved(<ref>CalendarItemId</ref>[] ids);
13274 This API provides interfaces and methods for users to manage their schedule.
13275 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.
13279 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>.
13282 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.
13285 For more information on the Calendar features, see <a href="../../org.tizen.web.appprogramming/html/guide/social_guide/calendar.htm">Calendar Guide</a>.
13292 <Typedef name="CalendarId" id="::Calendar::CalendarId">
13293 <webidl> typedef DOMString CalendarId;</webidl>
13296 An attribute to identify the calendar.
13302 <Type type="DOMString"/>
13304 <Typedef name="CalendarTaskId" id="::Calendar::CalendarTaskId">
13305 <webidl> typedef DOMString CalendarTaskId;</webidl>
13308 An attribute to identify a calendar task.
13314 <Type type="DOMString"/>
13316 <Typedef name="CalendarItemId" id="::Calendar::CalendarItemId">
13317 <webidl> typedef (<ref>CalendarEventId</ref> or <ref>CalendarTaskId</ref>) CalendarItemId;</webidl>
13320 A calendar item identifier, which can either be a <em>CalendarEventId </em>or a <em>CalendarTaskId</em>.
13326 <Type type="union">
13327 <Type name="CalendarEventId"/>
13328 <Type name="CalendarTaskId"/>
13331 <Enum name="CalendarType" id="::Calendar::CalendarType">
13332 <webidl> enum CalendarType { "EVENT", "TASK" };</webidl>
13335 An enumerator that indicates the type of a calendar.
13339 The following types are supported:
13343 EVENT - if a calendar contains events (VEVENT objects) </li>
13345 TASK - if a calendar contains tasks (VTODO objects) </li>
13352 <EnumValue stringvalue="EVENT">
13353 <webidl> "EVENT</webidl>
13355 <EnumValue stringvalue="TASK">
13356 <webidl> "TASK</webidl>
13359 <Enum name="CalendarTextFormat" id="::Calendar::CalendarTextFormat">
13360 <webidl> enum CalendarTextFormat { "ICALENDAR_20", "VCALENDAR_10" };</webidl>
13363 An enumerator that indicates the type of textual format of a Calendar.
13367 The following values are supported:
13371 ICALENDAR_20 - if the textual format is iCalendar v2.0 </li>
13373 VCALENDAR_10 - if the textual format is vCalendar v1.0 </li>
13380 <EnumValue stringvalue="ICALENDAR_20">
13381 <webidl> "ICALENDAR_20</webidl>
13383 <EnumValue stringvalue="VCALENDAR_10">
13384 <webidl> "VCALENDAR_10</webidl>
13387 <Enum name="AlarmMethod" id="::Calendar::AlarmMethod">
13388 <webidl> enum AlarmMethod { "SOUND", "DISPLAY" };</webidl>
13391 An enumerator that indicates the type of an alarm.
13395 The following values are supported:
13399 SOUND - if sound is played to alert the user </li>
13401 DISPLAY - if display on screen without any sound is used to alert the user </li>
13408 <EnumValue stringvalue="SOUND">
13409 <webidl> "SOUND</webidl>
13411 <EnumValue stringvalue="DISPLAY">
13412 <webidl> "DISPLAY</webidl>
13415 <Enum name="RecurrenceRuleFrequency" id="::Calendar::RecurrenceRuleFrequency">
13416 <webidl> enum RecurrenceRuleFrequency { "DAILY", "WEEKLY", "MONTHLY", "YEARLY" };</webidl>
13419 An enumerator that indicates the type of frequency for the recurrence of an event.
13423 Only the following values are valid for this attribute:
13427 DAILY - if the event occurs daily </li>
13429 WEEKLY - if the event occurs weekly </li>
13431 MONTHLY - if the event occurs monthly </li>
13433 YEARLY - if the event occurs yearly </li>
13440 <EnumValue stringvalue="DAILY">
13441 <webidl> "DAILY</webidl>
13443 <EnumValue stringvalue="WEEKLY">
13444 <webidl> "WEEKLY</webidl>
13446 <EnumValue stringvalue="MONTHLY">
13447 <webidl> "MONTHLY</webidl>
13449 <EnumValue stringvalue="YEARLY">
13450 <webidl> "YEARLY</webidl>
13453 <Enum name="ByDayValue" id="::Calendar::ByDayValue">
13454 <webidl> enum ByDayValue { "MO", "TU", "WE", "TH", "FR", "SA", "SU" };</webidl>
13457 An enumerator that indicates the values for <em>CalendarRecurrenceRule.daysOfWeek</em>.
13461 "MO" to "SU" correspond to "Monday" to "Sunday".
13468 <EnumValue stringvalue="MO">
13469 <webidl> "MO</webidl>
13471 <EnumValue stringvalue="TU">
13472 <webidl> "TU</webidl>
13474 <EnumValue stringvalue="WE">
13475 <webidl> "WE</webidl>
13477 <EnumValue stringvalue="TH">
13478 <webidl> "TH</webidl>
13480 <EnumValue stringvalue="FR">
13481 <webidl> "FR</webidl>
13483 <EnumValue stringvalue="SA">
13484 <webidl> "SA</webidl>
13486 <EnumValue stringvalue="SU">
13487 <webidl> "SU</webidl>
13490 <Enum name="EventAvailability" id="::Calendar::EventAvailability">
13491 <webidl> enum EventAvailability { "BUSY", "FREE" };</webidl>
13494 An enumerator that indicates the availability of time for an event.
13498 The following values are supported:
13502 FREE - if the specified time slot is vacant </li>
13504 BUSY - if the specified time slot is not vacant </li>
13506 BUSY-UNAVAILABLE - if the specified time slot is not vacant and can not be scheduled </li>
13508 BUSY-TENTATIVE - if the specified time slot is not vacant because one or more events have been tentatively scheduled for that interval </li>
13515 <EnumValue stringvalue="BUSY">
13516 <webidl> "BUSY</webidl>
13518 <EnumValue stringvalue="FREE">
13519 <webidl> "FREE</webidl>
13522 <Enum name="AttendeeType" id="::Calendar::AttendeeType">
13523 <webidl> enum AttendeeType { "INDIVIDUAL", "GROUP", "RESOURCE", "ROOM", "UNKNOWN" };</webidl>
13526 An enumerator that indicates the type of attendee.
13530 At least the following values must be supported:
13534 INDIVIDUAL - Individual </li>
13536 GROUP - Group of individuals </li>
13538 RESOURCE - Physical resource </li>
13540 ROOM - Room resource </li>
13542 UNKNOWN - Unknown </li>
13549 <EnumValue stringvalue="INDIVIDUAL">
13550 <webidl> "INDIVIDUAL</webidl>
13552 <EnumValue stringvalue="GROUP">
13553 <webidl> "GROUP</webidl>
13555 <EnumValue stringvalue="RESOURCE">
13556 <webidl> "RESOURCE</webidl>
13558 <EnumValue stringvalue="ROOM">
13559 <webidl> "ROOM</webidl>
13561 <EnumValue stringvalue="UNKNOWN">
13562 <webidl> "UNKNOWN</webidl>
13565 <Enum name="AttendeeStatus" id="::Calendar::AttendeeStatus">
13566 <webidl> enum AttendeeStatus { "PENDING", "ACCEPTED", "DECLINED", "TENTATIVE", "DELEGATED", "COMPLETED", "IN_PROCESS" };</webidl>
13569 An enumerator that indicates the attendance status of a participant.
13573 At least the following values must be supported:
13577 PENDING - if the participant has not yet responded to the event </li>
13579 ACCEPTED - if the participant has accepted the event </li>
13581 DECLINED - if the participant has declined the event </li>
13583 TENTATIVE - if the participant has tentatively accepted the event </li>
13585 DELEGATED - if the participant has delegated attendance to another participant </li>
13587 COMPLETED - if the participant's event has been completed </li>
13589 IN_PROCESS - if the participant's event is currently in process </li>
13596 <EnumValue stringvalue="PENDING">
13597 <webidl> "PENDING</webidl>
13599 <EnumValue stringvalue="ACCEPTED">
13600 <webidl> "ACCEPTED</webidl>
13602 <EnumValue stringvalue="DECLINED">
13603 <webidl> "DECLINED</webidl>
13605 <EnumValue stringvalue="TENTATIVE">
13606 <webidl> "TENTATIVE</webidl>
13608 <EnumValue stringvalue="DELEGATED">
13609 <webidl> "DELEGATED</webidl>
13611 <EnumValue stringvalue="COMPLETED">
13612 <webidl> "COMPLETED</webidl>
13614 <EnumValue stringvalue="IN_PROCESS">
13615 <webidl> "IN_PROCESS</webidl>
13618 <Enum name="AttendeeRole" id="::Calendar::AttendeeRole">
13619 <webidl> enum AttendeeRole { "REQ_PARTICIPANT", "OPT_PARTICIPANT", "NON_PARTICIPANT", "CHAIR" };</webidl>
13622 An enumerator that indicates the role of an attendee.
13626 At least the following values must be supported:
13630 REQ_PARTICIPANT - if the participation of an attendee is mandatory </li>
13632 OPT_PARTICIPANT - if the participation of an attendee is optional </li>
13634 NON_PARTICIPANT - if the attendee is not a participant but is copied for information purposes </li>
13636 CHAIR - if the attendee is the chairperson of the event. </li>
13643 <EnumValue stringvalue="REQ_PARTICIPANT">
13644 <webidl> "REQ_PARTICIPANT</webidl>
13646 <EnumValue stringvalue="OPT_PARTICIPANT">
13647 <webidl> "OPT_PARTICIPANT</webidl>
13649 <EnumValue stringvalue="NON_PARTICIPANT">
13650 <webidl> "NON_PARTICIPANT</webidl>
13652 <EnumValue stringvalue="CHAIR">
13653 <webidl> "CHAIR</webidl>
13656 <Enum name="CalendarItemPriority" id="::Calendar::CalendarItemPriority">
13657 <webidl> enum CalendarItemPriority { "HIGH", "MEDIUM", "LOW" };</webidl>
13660 An enumerator that indicates the priority of a calendar item.
13664 The following values are supported:
13668 HIGH - if item priority is high </li>
13670 MEDIUM - if item priority is medium </li>
13672 LOW - if item priority is low </li>
13679 <EnumValue stringvalue="HIGH">
13680 <webidl> "HIGH</webidl>
13682 <EnumValue stringvalue="MEDIUM">
13683 <webidl> "MEDIUM</webidl>
13685 <EnumValue stringvalue="LOW">
13686 <webidl> "LOW</webidl>
13689 <Enum name="CalendarItemVisibility" id="::Calendar::CalendarItemVisibility">
13690 <webidl> enum CalendarItemVisibility { "PUBLIC", "PRIVATE", "CONFIDENTIAL" };</webidl>
13693 An enumerator that indicates the visibility type of a calendar item.
13697 The following values are supported:
13701 PUBLIC - if item visibility is public </li>
13703 PRIVATE - if item visibility is private </li>
13705 CONFIDENTIAL - if item visibility is confidential </li>
13712 <EnumValue stringvalue="PUBLIC">
13713 <webidl> "PUBLIC</webidl>
13715 <EnumValue stringvalue="PRIVATE">
13716 <webidl> "PRIVATE</webidl>
13718 <EnumValue stringvalue="CONFIDENTIAL">
13719 <webidl> "CONFIDENTIAL</webidl>
13722 <Enum name="CalendarItemStatus" id="::Calendar::CalendarItemStatus">
13723 <webidl> enum CalendarItemStatus { "TENTATIVE", "CONFIRMED", "CANCELLED", "NEEDS_ACTION", "IN_PROCESS", "COMPLETED" };</webidl>
13726 An enumerator that indicates the status of a calendar item.
13730 For an event, the possible values are:
13734 TENTATIVE - if the event is tentative </li>
13736 CONFIRMED - if the event is confirmed </li>
13738 CANCELLED - if the event is cancelled </li>
13741 For a task, the possible values are:
13745 NEEDS_ACTION - if the task needs action </li>
13747 IN_PROCESS - if the task is in process or being worked on </li>
13749 COMPLETED - if the task has been completed </li>
13751 CANCELLED - if the task has been cancelled </li>
13758 <EnumValue stringvalue="TENTATIVE">
13759 <webidl> "TENTATIVE</webidl>
13761 <EnumValue stringvalue="CONFIRMED">
13762 <webidl> "CONFIRMED</webidl>
13764 <EnumValue stringvalue="CANCELLED">
13765 <webidl> "CANCELLED</webidl>
13767 <EnumValue stringvalue="NEEDS_ACTION">
13768 <webidl> "NEEDS_ACTION</webidl>
13770 <EnumValue stringvalue="IN_PROCESS">
13771 <webidl> "IN_PROCESS</webidl>
13773 <EnumValue stringvalue="COMPLETED">
13774 <webidl> "COMPLETED</webidl>
13777 <Interface name="CalendarManagerObject" id="::Calendar::CalendarManagerObject">
13778 <webidl> [NoInterfaceObject] interface CalendarManagerObject{
13779 readonly attribute <ref>CalendarManager</ref> calendar;
13783 This interface gives access to the Calendar API from the <em>tizen.calendar </em>object.
13789 <ExtendedAttributeList>
13790 <ExtendedAttribute name="NoInterfaceObject">
13791 <webidl>NoInterfaceObject</webidl>
13792 </ExtendedAttribute>
13793 </ExtendedAttributeList>
13794 <Attribute readonly="readonly" name="calendar" id="::Calendar::CalendarManagerObject::calendar">
13795 <webidl> readonly attribute <ref>CalendarManager</ref> calendar;</webidl>
13796 <Type name="CalendarManager"/>
13799 <Implements name1="Tizen" name2="CalendarManagerObject">
13800 <webidl> <ref>Tizen</ref> implements <ref>CalendarManagerObject</ref>;</webidl>
13802 <Interface name="CalendarManager" id="::Calendar::CalendarManager">
13803 <webidl> [NoInterfaceObject] interface CalendarManager {
13804 void getCalendars(<ref>CalendarType</ref> type,
13805 <ref>CalendarArraySuccessCallback</ref> successCallback,
13806 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
13808 <ref>Calendar</ref> getUnifiedCalendar(<ref>CalendarType</ref> type) raises(<ref>WebAPIException</ref>);
13810 <ref>Calendar</ref> getDefaultCalendar(<ref>CalendarType</ref> type) raises(<ref>WebAPIException</ref>);
13812 <ref>Calendar</ref> getCalendar(<ref>CalendarType</ref> type, <ref>CalendarId</ref> id) raises(<ref>WebAPIException</ref>);
13816 This interface provides methods to access calendars and attributes for calendars.
13817 Once a calendar object is obtained, it is possible to add, remove, or update the information it contains through the Calendar interface methods.
13823 <ExtendedAttributeList>
13824 <ExtendedAttribute name="NoInterfaceObject">
13825 <webidl>NoInterfaceObject</webidl>
13826 </ExtendedAttribute>
13827 </ExtendedAttributeList>
13828 <Operation name="getCalendars" id="::Calendar::CalendarManager::getCalendars">
13829 <webidl> void getCalendars(<ref>CalendarType</ref> type,
13830 <ref>CalendarArraySuccessCallback</ref> successCallback,
13831 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
13834 Gets an array of Calendar objects.
13838 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.
13841 If no Calendar object is available, the <em>successCallback()</em> is invoked with an empty array.
13844 The errorCallback is launched with these error types:
13848 InvalidValuesError - if any of the input parameters contain an invalid value. </li>
13850 UnknownError - if any other error occurs. </li>
13860 http://tizen.org/privilege/calendar.read
13862 <Code> var calendar;
13864 function eventFoundCallback(events) {
13865 // The event has been successfully found
13866 // Changes the summary
13867 events[0].summary = 'HTML6 Webinar';
13868 calendar.update(events[0]);
13869 console.log('First event was updated!');
13872 // Defines the error callback for all the asynchronous calls
13873 function errorCallback(response) {
13874 console.log( 'The following error occurred: ' + response.name);
13877 // Defines the success callback for retrieving the list of calendars
13878 function calendarListCallback(calendars) {
13879 if(calendars.length > 0) {
13880 calendar = calendars[0];
13881 console.log('The calendar id is ' + calendar.id + ' and name ' + calendar.name);
13883 var ev = new tizen.CalendarEvent({description:'HTML5 Introduction',
13884 summary:'HTML5 Webinar',
13885 startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
13886 duration: new tizen.TimeDuration(1, "HOURS"),
13887 location:'Huesca'});
13890 // The event has been successfully added
13891 // Checks if the added event can be retrieved from the calendar
13892 // If the calendar was empty, only the item added through add() should be returned
13893 var filter = new tizen.AttributeFilter('summary', 'CONTAINS', 'HTML5');
13894 calendar.find(eventFoundCallback, errorCallback, filter);
13898 // Gets a list of available calendars
13899 tizen.calendar.getCalendars("EVENT", calendarListCallback, errorCallback);
13902 <Type type="void"/>
13904 <Argument name="type">
13907 The type of calendar.
13910 <Type name="CalendarType"/>
13912 <Argument name="successCallback">
13915 The method to invoke when the invocation ends successfully.
13918 <Type name="CalendarArraySuccessCallback"/>
13920 <Argument optional="optional" name="errorCallback">
13923 The method to invoke when an error occurs.
13926 <Type name="ErrorCallback" nullable="nullable"/>
13930 <RaiseException name="WebAPIException">
13933 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
13936 with error type SecurityError, if the application does not have the privilege to call this method.
13939 with error type NotSupportedError, if this feature is not supported.
13945 <Operation name="getUnifiedCalendar" id="::Calendar::CalendarManager::getUnifiedCalendar">
13946 <webidl> <ref>Calendar</ref> getUnifiedCalendar(<ref>CalendarType</ref> type) raises(<ref>WebAPIException</ref>);</webidl>
13949 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>.
13953 If an item is added to the unified calendar, it will be saved in the default calendar.
13963 http://tizen.org/privilege/calendar.read
13965 <Code> var unifiedCalendar;
13967 // Defines the error callback for all the asynchronous calls
13968 function errorCallback(response) {
13969 console.log( 'The following error occurred: ' + response.name);
13972 function eventFoundCallback(events) {
13973 // The event has been successfully found
13974 // Changes the summary
13975 events[0].summary = 'HTML6 Webinar';
13976 unifiedCalendar.update(events[0]);
13977 console.log('First event was updated!');
13980 // Gets the unified calendar
13981 unifiedCalendar = tizen.calendar.getUnifiedCalendar("EVENT");
13983 var ev = new tizen.CalendarEvent({description:'HTML5 Introduction',
13984 summary:'HTML5 Webinar ',
13985 startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
13986 duration: new tizen.TimeDuration(1, "HOURS"),
13987 location:'Huesca'});
13989 unifiedCalendar.add(ev);
13991 // The event has been added
13992 // Checks if the added event can be retrieved from the calendar
13993 // If the calendar was empty, only the item added through add() should be returned
13994 var filter = new tizen.AttributeFilter('summary', 'CONTAINS', 'HTML5');
13995 unifiedCalendar.find(eventFoundCallback, errorCallback, filter);
13999 <Type name="Calendar">
14002 Calendar The unified Calendar object.
14007 <Argument name="type">
14010 The type of a calendar.
14013 <Type name="CalendarType"/>
14017 <RaiseException name="WebAPIException">
14020 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14023 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
14026 with error type SecurityError, if the application does not have the privilege to call this method.
14029 with error type NotSupportedError, if this feature is not supported.
14032 with error type UnknownError, if any other error occurs.
14038 <Operation name="getDefaultCalendar" id="::Calendar::CalendarManager::getDefaultCalendar">
14039 <webidl> <ref>Calendar</ref> getDefaultCalendar(<ref>CalendarType</ref> type) raises(<ref>WebAPIException</ref>);</webidl>
14042 Gets the default calendar, which is used for new items.
14051 http://tizen.org/privilege/calendar.read
14053 <Code> var myCalendar;
14055 // Defines the error callback for all the asynchronous calls
14056 function errorCallback(response) {
14057 console.log( 'The following error occurred: ' + response.name);
14060 function eventFoundCallback(events) {
14061 // The event has been successfully found
14062 // Changes the summary
14063 events[0].summary = 'HTML6 Webinar';
14064 myCalendar.update(events[0]);
14065 console.log('First event was updated!');
14068 // Gets the default calendar
14069 myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
14071 var ev = new tizen.CalendarEvent({description:'HTML5 Introduction',
14072 summary:'HTML5 Webinar ',
14073 startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
14074 duration: new tizen.TimeDuration(1, "HOURS"),
14075 location:'Huesca'});
14077 myCalendar.add(ev);
14079 // The event has been added
14080 // Checks if the added event can be retrieved from the calendar
14081 // If the calendar was empty, only the item added through add() should be returned
14082 var filter = new tizen.AttributeFilter('summary', 'CONTAINS', 'HTML5');
14083 myCalendar.find(eventFoundCallback, errorCallback, filter);
14087 <Type name="Calendar">
14090 Calendar The default Calendar object.
14095 <Argument name="type">
14098 The type of a calendar.
14101 <Type name="CalendarType"/>
14105 <RaiseException name="WebAPIException">
14108 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14111 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
14114 with error type SecurityError, if the application does not have the privilege to call this method.
14117 with error type NotSupportedError, if this feature is not supported.
14120 with error type UnknownError, if any other error occurs.
14126 <Operation name="getCalendar" id="::Calendar::CalendarManager::getCalendar">
14127 <webidl> <ref>Calendar</ref> getCalendar(<ref>CalendarType</ref> type, <ref>CalendarId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
14130 Gets the calendar with the specified identifier and type.
14139 http://tizen.org/privilege/calendar.read
14141 <Code> var calendarId; // calendarId supposed to be initialized
14143 var calendar = tizen.calendar.getCalendar("EVENT", calendarId);
14144 console.log("Successfully retrieved event calendar with id: " + calendarId);
14146 console.log("Error: " + err.name);
14150 <Type name="Calendar">
14153 Calendar The matching Calendar object.
14158 <Argument name="type">
14161 The type of a calendar.
14164 <Type name="CalendarType"/>
14166 <Argument name="id">
14169 The calendar identifier.
14172 <Type name="CalendarId"/>
14176 <RaiseException name="WebAPIException">
14179 with error type NotFoundError, if there is no calendar with the given identifier.
14182 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14185 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
14188 with error type SecurityError, if the application does not have the privilege to call this method.
14191 with error type NotSupportedError, if this feature is not supported.
14194 with error type UnknownError, if any other error occurs.
14201 <Interface name="Calendar" id="::Calendar::Calendar">
14202 <webidl> [NoInterfaceObject] interface Calendar {
14204 readonly attribute <ref>CalendarId</ref> id;
14206 readonly attribute DOMString name;
14208 <ref>CalendarItem</ref> get(<ref>CalendarItemId</ref> id) raises(<ref>WebAPIException</ref>);
14210 void add(<ref>CalendarItem</ref> item) raises(<ref>WebAPIException</ref>);
14212 void addBatch(<ref>CalendarItem</ref>[] items,
14213 optional <ref>CalendarItemArraySuccessCallback</ref>? successCallback,
14214 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
14216 void update(<ref>CalendarItem</ref> item,
14217 optional boolean? updateAllInstances) raises(<ref>WebAPIException</ref>);
14219 void updateBatch(<ref>CalendarItem</ref>[] items,
14220 optional <ref>SuccessCallback</ref>? successCallback,
14221 optional <ref>ErrorCallback</ref>? errorCallback,
14222 optional boolean? updateAllInstances) raises(<ref>WebAPIException</ref>);
14224 void remove(<ref>CalendarItemId</ref> id) raises(<ref>WebAPIException</ref>);
14226 void removeBatch(<ref>CalendarItemId</ref>[] ids,
14227 optional <ref>SuccessCallback</ref>? successCallback,
14228 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
14230 void find(<ref>CalendarItemArraySuccessCallback</ref> successCallback,
14231 optional <ref>ErrorCallback</ref>? errorCallback,
14232 optional <ref>AbstractFilter</ref>? filter,
14233 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);
14235 long addChangeListener(<ref>CalendarChangeCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);
14237 void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
14241 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.
14245 This interface offers the following methods to manage events in a calendar:
14249 Finding items using a key-value filter. </li>
14251 Adding items to a specific calendar using <em>add() </em>/ <em>addBatch() </em>methods. </li>
14253 Updating existing items using <em>update() </em>/ <em>updateBatch()</em> methods. </li>
14255 Deleting existing items using <em>remove()</em> / <em>removeBatch() </em>methods. </li>
14257 Tracking calendar changes using <em>addChangeListener()</em> / <em>removeChangeListener() </em>methods. </li>
14264 <ExtendedAttributeList>
14265 <ExtendedAttribute name="NoInterfaceObject">
14266 <webidl>NoInterfaceObject</webidl>
14267 </ExtendedAttribute>
14268 </ExtendedAttributeList>
14269 <Attribute readonly="readonly" name="id" id="::Calendar::Calendar::id">
14270 <webidl> readonly attribute <ref>CalendarId</ref> id;</webidl>
14273 An attribute to uniquely identify a calendar.
14279 <Type name="CalendarId"/>
14281 <Attribute readonly="readonly" name="name" id="::Calendar::Calendar::name">
14282 <webidl> readonly attribute DOMString name;</webidl>
14285 An attribute to assign a readable (descriptive) name for a calendar, such as work, personal, etc.
14290 <Code> // Gets the default calendar and show its name
14291 var calendar = tizen.calendar.getDefaultCalendar("EVENT");
14292 console.log('The calendar name is ' + calendar.name);
14295 <Type type="DOMString"/>
14297 <Operation name="get" id="::Calendar::Calendar::get">
14298 <webidl> <ref>CalendarItem</ref> get(<ref>CalendarItemId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
14301 Gets the calendar item with the specified identifier.
14310 http://tizen.org/privilege/calendar.read
14312 <Code> var myCalendar; // Calendar supposed to be initialized
14313 var itemId; // Calendar item identifier
14315 var item = myCalendar.get(itemId);
14316 console.log("Successfully retrieved item with id: " + itemId);
14318 console.log("Error: " + err.name);
14322 <Type name="CalendarItem">
14325 CalendarItem The matching <em>CalendarItem </em>object.
14330 <Argument name="id">
14333 The Calendar item identifier.
14336 <Type name="CalendarItemId"/>
14340 <RaiseException name="WebAPIException">
14343 with error type NotFoundError, if there is no calendar item with the given identifier.
14346 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14349 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
14352 with error type SecurityError, if the application does not have the privilege to call this method.
14355 with error type NotSupportedError, if this feature is not supported.
14358 with error type UnknownError, if any other error occurs.
14364 <Operation name="add" id="::Calendar::Calendar::add">
14365 <webidl> void add(<ref>CalendarItem</ref> item) raises(<ref>WebAPIException</ref>);</webidl>
14368 Adds an item to the calendar synchronously.
14372 If the item is successfully inserted in the calendar, the <em>CalendarItem </em>will have its identifier (id attribute) set when the method returns.
14375 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.
14385 http://tizen.org/privilege/calendar.write
14387 <Code> // Gets the default calendar
14388 var calendar = tizen.calendar.getDefaultCalendar("EVENT");
14390 var ev = new tizen.CalendarEvent({description:'HTML5 Introduction',
14391 summary:'HTML5 Webinar ',
14392 startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
14393 duration: new tizen.TimeDuration(1, "HOURS"),
14394 location:'Huesca'});
14397 console.log('Event added with uid ' + ev.id.uid);
14400 <Type type="void"/>
14402 <Argument name="item">
14405 The calendar item to be added.
14408 <Type name="CalendarItem"/>
14412 <RaiseException name="WebAPIException">
14415 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14418 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
14421 with error type SecurityError, if the application does not have the privilege to call this method.
14424 with error type NotSupportedError, if the feature is not supported.
14427 with error type UnknownError, if any other error occurs.
14433 <Operation name="addBatch" id="::Calendar::Calendar::addBatch">
14434 <webidl> void addBatch(<ref>CalendarItem</ref>[] items,
14435 optional <ref>CalendarItemArraySuccessCallback</ref>? successCallback,
14436 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
14439 Adds an array of items to the calendar asynchronously.
14443 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).
14446 The <em>errorCallback()</em> is launched with these error types:
14450 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>
14452 UnknownError - if any other error occurs. </li>
14455 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.
14465 http://tizen.org/privilege/calendar.write
14467 <Code> // Defines the error callback.
14468 function errorCallback(response) {
14469 console.log( 'The following error occurred: ' + response.name);
14472 function addEventsSuccess(events) {
14473 console.log("Successfully added " + events.length + " events!");
14476 // Gets the default calendar
14477 var calendar = tizen.calendar.getDefaultCalendar("EVENT");
14479 var ev = new tizen.CalendarEvent({description:'HTML5 Introduction',
14480 summary:'HTML5 Webinar ',
14481 startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
14482 duration: new tizen.TimeDuration(1, "HOURS"),
14483 location:'Huesca'});
14485 calendar.addBatch([ev], addEventsSuccess, errorCallback);
14488 <Type type="void"/>
14490 <Argument name="items">
14493 The list of calendar items to add.
14496 <Type type="array">
14497 <Type name="CalendarItem"/>
14500 <Argument optional="optional" name="successCallback">
14503 The method to call when the invocation ends successfully.
14506 <Type name="CalendarItemArraySuccessCallback" nullable="nullable"/>
14508 <Argument optional="optional" name="errorCallback">
14511 The method to invoke when the request fails.
14514 <Type name="ErrorCallback" nullable="nullable"/>
14518 <RaiseException name="WebAPIException">
14521 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14524 with error type SecurityError, if the application does not have the privilege to call this method.
14527 with error type NotSupportedError, if the feature is not supported.
14533 <Operation name="update" id="::Calendar::Calendar::update">
14534 <webidl> void update(<ref>CalendarItem</ref> item,
14535 optional boolean? updateAllInstances) raises(<ref>WebAPIException</ref>);</webidl>
14538 Updates an existing item in the calendar synchronously with the one specified in the argument.
14542 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>.
14552 http://tizen.org/privilege/calendar.write
14554 <Code> var myCalendar;
14556 // Defines the error callback.
14557 function errorCallback(response) {
14558 console.log( 'The following error occurred: ' + response.name);
14561 // Defines the event success callback.
14562 function eventSearchSuccessCallback(events) {
14563 events[0].description = 'New Description';
14564 // Updates the first existing event.
14565 myCalendar.update(events[0]);
14566 console.log("The first item description was updated!");
14569 // Gets the default calendar
14570 myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
14572 // Finds all events in a Calendar
14573 myCalendar.find(eventSearchSuccessCallback, errorCallback);
14576 <Type type="void"/>
14578 <Argument name="item">
14581 The Item object to update.
14584 <Type name="CalendarItem"/>
14586 <Argument optional="optional" name="updateAllInstances">
14589 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.
14592 <Type type="boolean" nullable="nullable"/>
14596 <RaiseException name="WebAPIException">
14599 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14602 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
14605 with error type SecurityError, if the application does not have the privilege to call this method.
14608 with error type NotSupportedError, if the feature is not supported.
14611 with error type UnknownError, if any other error occurs.
14617 <Operation name="updateBatch" id="::Calendar::Calendar::updateBatch">
14618 <webidl> void updateBatch(<ref>CalendarItem</ref>[] items,
14619 optional <ref>SuccessCallback</ref>? successCallback,
14620 optional <ref>ErrorCallback</ref>? errorCallback,
14621 optional boolean? updateAllInstances) raises(<ref>WebAPIException</ref>);</webidl>
14624 Updates an array of existing items in the calendar asynchronously with the specified values in the argument.
14628 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.
14631 The <em>errorCallback() </em>is launched with these error types:
14635 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>
14637 UnknownError - if any other error occurs. </li>
14647 http://tizen.org/privilege/calendar.write
14649 <Code> var myCalendar;
14651 // Defines the error callback.
14652 function errorCallback(response) {
14653 console.log( 'The following error occurred: ' + response.name);
14656 // Defines the success callback
14657 function updateEventsSuccess() {
14658 console.log("Successfully updated !" );
14661 // Defines the event success callback.
14662 function eventSearchSuccessCallback(events) {
14663 events[0].description = 'New Description 1';
14664 events[1].description = 'New Description 2';
14665 // Update the first two existing events.
14666 myCalendar.updateBatch(events.slice(0,2), updateEventsSuccess, errorCallback);
14669 // Gets the default calendar
14670 myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
14672 // Finds all events in Calendar
14673 myCalendar.find(eventSearchSuccessCallback, errorCallback);
14676 <Type type="void"/>
14678 <Argument name="items">
14681 The list of calendar item objects to update.
14684 <Type type="array">
14685 <Type name="CalendarItem"/>
14688 <Argument optional="optional" name="successCallback">
14691 The method to invoke when the <em>updateEvents() </em>request succeeds.
14694 <Type name="SuccessCallback" nullable="nullable"/>
14696 <Argument optional="optional" name="errorCallback">
14699 The method to invoke when the <em>updateEvents() </em>request fails.
14702 <Type name="ErrorCallback" nullable="nullable"/>
14704 <Argument optional="optional" name="updateAllInstances">
14707 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.
14710 <Type type="boolean" nullable="nullable"/>
14714 <RaiseException name="WebAPIException">
14717 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14720 with error type SecurityError, if the application does not have the privilege to call this method.
14723 with error type NotSupportedError, if the feature is not supported.
14729 <Operation name="remove" id="::Calendar::Calendar::remove">
14730 <webidl> void remove(<ref>CalendarItemId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
14733 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.
14742 http://tizen.org/privilege/calendar.write
14745 <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.
14747 <Code> var myCalendar;
14749 // Defines the error callback.
14750 function errorCallback(response) {
14751 console.log( 'The following error occurred: ' + response.name);
14754 // Defines the event success callback.
14755 function eventSearchSuccessCallback(events) {
14756 // Deletes the first existing event.
14757 myCalendar.remove(events[0].id);
14758 console.log('The first event was removed');
14761 // Gets default calendar
14762 myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
14764 // Finds all events in Calendar
14765 myCalendar.find(eventSearchSuccessCallback, errorCallback);
14768 <Type type="void"/>
14770 <Argument name="id">
14773 The identifier (ID attribute) of the item object to delete.
14776 <Type name="CalendarItemId"/>
14780 <RaiseException name="WebAPIException">
14783 with error type NotFoundError, if the identifier does not match any item in the calendar.
14786 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14789 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
14792 with error type SecurityError, if the application does not have the privilege to call this method.
14795 with error type NotSupportedError, if the feature is not supported.
14798 with error type UnknownError, if the item could not be removed because of an unknown error.
14804 <Operation name="removeBatch" id="::Calendar::Calendar::removeBatch">
14805 <webidl> void removeBatch(<ref>CalendarItemId</ref>[] ids,
14806 optional <ref>SuccessCallback</ref>? successCallback,
14807 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
14810 Removes several items from the calendar asynchronously depending on the specified identifiers.
14814 The errorCallback is launched with these error types:
14818 NotFoundError - if an identifier in the <em>ids </em>parameter does not correspond to the ID attribute of an item in the calendar. </li>
14820 InvalidValuesError - if any of the input parameters contain an invalid value. </li>
14822 UnknownError - if any other error occurs. </li>
14832 http://tizen.org/privilege/calendar.write
14835 <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.
14837 <Code> var myCalendar;
14839 // Defines the error callback.
14840 function errorCallback(response) {
14841 console.log( 'The following error occurred: ' + response.name);
14844 // Defines the removeBatch callback
14845 function removeBatchCallback() {
14846 console.log("Requested events were successfully removed.");
14849 // Defines the event search success callback.
14850 function eventSearchSuccessCallback(events) {
14851 // Deletes the first two existing events.
14852 myCalendar.removeBatch([events[0].id, events[1].id],
14853 removeBatchCallback,
14857 // Gets default calendar
14858 myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
14860 // Retrieves all events in Calendar
14861 myCalendar.find(eventSearchSuccessCallback, errorCallback);
14864 <Type type="void"/>
14866 <Argument name="ids">
14869 The identifiers (<em>id </em>attribute) of the items to delete.
14872 <Type type="array">
14873 <Type name="CalendarItemId"/>
14876 <Argument optional="optional" name="successCallback">
14879 The method to invoke when the <em>removeBatch()</em> request succeeds.
14882 <Type name="SuccessCallback" nullable="nullable"/>
14884 <Argument optional="optional" name="errorCallback">
14887 The method to invoke when the <em>removeBatch()</em> request fails.
14890 <Type name="ErrorCallback" nullable="nullable"/>
14894 <RaiseException name="WebAPIException">
14897 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14900 with error type SecurityError, if the application does not have the privilege to call this method.
14903 with error type NotSupportedError, if the feature is not supported.
14909 <Operation name="find" id="::Calendar::Calendar::find">
14910 <webidl> void find(<ref>CalendarItemArraySuccessCallback</ref> successCallback,
14911 optional <ref>ErrorCallback</ref>? errorCallback,
14912 optional <ref>AbstractFilter</ref>? filter,
14913 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);</webidl>
14916 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.
14920 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>.
14921 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>.
14922 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.
14925 The errorCallback is launched with these error types:
14929 InvalidValuesError - if any of the input parameters contain an invalid value. </li>
14931 UnknownError - if any other error occurs. </li>
14934 <b>Filter specific remarks:</b> </p>
14937 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>
14939 For event filtering based on the identifier, the identifier type should be CalendarEventID (<em>uid</em> and <em>rid</em>).
14940 If no recurrence ID is given, the filter will match both the parent event and all its detached instances. </li>
14950 http://tizen.org/privilege/calendar.read
14952 <Code> // Defines the error callback.
14953 function errorCallback(response) {
14954 console.log( 'The following error occurred: ' + response.name);
14957 // Defines the event search success callback.
14958 function eventSearchSuccessCallback(events) {
14959 console.log(events.length + ' results found.');
14962 // Gets default calendar
14963 var calendar = tizen.calendar.getDefaultCalendar("EVENT");
14965 // Finds all events the calendar that contain in the summary the string Tizen.
14966 var filter = new tizen.AttributeFilter('summary', 'CONTAINS', 'Tizen');
14968 // The events returned by the find() query will be sorted by ascending summary
14969 var sortingMode = new tizen.SortMode('summary', 'ASC');
14971 calendar.find(eventSearchSuccessCallback, errorCallback, filter, sortingMode);
14974 <Type type="void"/>
14976 <Argument name="successCallback">
14979 The method to call when the invocation ends successfully.
14982 <Type name="CalendarItemArraySuccessCallback"/>
14984 <Argument optional="optional" name="errorCallback">
14987 The method to call when an error occurs.
14990 <Type name="ErrorCallback" nullable="nullable"/>
14992 <Argument optional="optional" name="filter">
14995 The supplied data used to filter the results of the <em>find() </em>method.
14998 <Type name="AbstractFilter" nullable="nullable"/>
15000 <Argument optional="optional" name="sortMode">
15003 The sort order in which the items return.
15006 <Type name="SortMode" nullable="nullable"/>
15010 <RaiseException name="WebAPIException">
15013 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
15016 with error type SecurityError, if the application does not have the privilege to call this method.
15019 with error type NotSupportedError, if the feature is not supported.
15025 <Operation name="addChangeListener" id="::Calendar::Calendar::addChangeListener">
15026 <webidl> long addChangeListener(<ref>CalendarChangeCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);</webidl>
15029 Adds a listener to receive notifications about calendar changes.
15033 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.
15043 http://tizen.org/privilege/calendar.read
15045 <Code> var watcherId = 0; // watcher identifier
15046 var calendar; // This example assumes calendar is initialized
15049 onitemsadded: function(items) {
15050 console.log(items.length + ' items were added');
15052 onitemsupdated: function(items) {
15053 console.log(items.length + ' items were updated');
15055 onitemsremoved: function(ids) {
15056 console.log(ids.length + ' items were removed');
15060 // Registers to be notified when the calendar changes
15061 watcherId = calendar.addChangeListener(watcher);
15067 long The identifier used to clear the watch subscription.
15072 <Argument name="successCallback">
15075 The methods to invoke on receiving calendar change notifications.
15078 <Type name="CalendarChangeCallback"/>
15082 <RaiseException name="WebAPIException">
15085 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
15088 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
15091 with error type SecurityError, if the application does not have the privilege to call this method.
15094 with error type NotSupportedError, if the feature is not supported.
15097 with error type UnknownError, if any other error occurs.
15103 <Operation name="removeChangeListener" id="::Calendar::Calendar::removeChangeListener">
15104 <webidl> void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);</webidl>
15107 Unsubscribes from receiving notification for a calendar item changes.
15111 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.
15121 http://tizen.org/privilege/calendar.read
15123 <Code> var watcherId = 0; // watcher identifier
15124 var calendar; // This example assumes calendar is initialized
15126 // Receives calendar changes
15128 onitemsadded: function(items) {
15129 console.log(items.length + ' items were added');
15131 onitemsupdated: function(items) {
15132 console.log(evitemsents.length + ' items were updated');
15134 onitemsremoved: function(ids) {
15135 console.log(ids.length + ' items were removed');
15139 // Registers to be notified when the calendar changes
15140 watcherId = calendar.addChangeListener(watcher);
15142 // Cancels the watch operation
15143 calendar.removeChangeListener(watcherId);
15146 <Type type="void"/>
15148 <Argument name="watchId">
15151 Subscription Identifier.
15154 <Type type="long"/>
15158 <RaiseException name="WebAPIException">
15161 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
15164 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
15167 with error type SecurityError, if the application does not have the privilege to call this method.
15170 with error type NotSupportedError, if the feature is not supported.
15173 with error type UnknownError if any other error occurs.
15180 <Dictionary name="CalendarItemInit" id="::Calendar::CalendarItemInit">
15181 <webidl> dictionary CalendarItemInit {
15182 DOMString description;
15185 <ref>TZDate</ref> startDate;
15186 <ref>TimeDuration</ref> duration;
15187 DOMString location;
15188 <ref>SimpleCoordinates</ref> geolocation;
15189 DOMString organizer;
15190 <ref>CalendarItemVisibility</ref> visibility;
15191 <ref>CalendarItemStatus</ref> status;
15192 <ref>CalendarItemPriority</ref> priority;
15193 <ref>CalendarAlarm</ref>[] alarms;
15194 DOMString[] categories;
15195 <ref>CalendarAttendee</ref>[] attendees;
15199 A dictionary that is used for creating calendar items.
15203 These attributes are shared by both calendar events and tasks.
15210 <DictionaryMember name="description" id="::Calendar::CalendarItemInit::description">
15211 <webidl> DOMString description;</webidl>
15212 <Type type="DOMString"/>
15213 </DictionaryMember>
15214 <DictionaryMember name="summary" id="::Calendar::CalendarItemInit::summary">
15215 <webidl> DOMString summary;</webidl>
15216 <Type type="DOMString"/>
15217 </DictionaryMember>
15218 <DictionaryMember name="isAllDay" id="::Calendar::CalendarItemInit::isAllDay">
15219 <webidl> boolean isAllDay;</webidl>
15220 <Type type="boolean"/>
15221 </DictionaryMember>
15222 <DictionaryMember name="startDate" id="::Calendar::CalendarItemInit::startDate">
15223 <webidl> <ref>TZDate</ref> startDate;</webidl>
15224 <Type name="TZDate"/>
15225 </DictionaryMember>
15226 <DictionaryMember name="duration" id="::Calendar::CalendarItemInit::duration">
15227 <webidl> <ref>TimeDuration</ref> duration;</webidl>
15228 <Type name="TimeDuration"/>
15229 </DictionaryMember>
15230 <DictionaryMember name="location" id="::Calendar::CalendarItemInit::location">
15231 <webidl> DOMString location;</webidl>
15232 <Type type="DOMString"/>
15233 </DictionaryMember>
15234 <DictionaryMember name="geolocation" id="::Calendar::CalendarItemInit::geolocation">
15235 <webidl> <ref>SimpleCoordinates</ref> geolocation;</webidl>
15236 <Type name="SimpleCoordinates"/>
15237 </DictionaryMember>
15238 <DictionaryMember name="organizer" id="::Calendar::CalendarItemInit::organizer">
15239 <webidl> DOMString organizer;</webidl>
15240 <Type type="DOMString"/>
15241 </DictionaryMember>
15242 <DictionaryMember name="visibility" id="::Calendar::CalendarItemInit::visibility">
15243 <webidl> <ref>CalendarItemVisibility</ref> visibility;</webidl>
15244 <Type name="CalendarItemVisibility"/>
15245 </DictionaryMember>
15246 <DictionaryMember name="status" id="::Calendar::CalendarItemInit::status">
15247 <webidl> <ref>CalendarItemStatus</ref> status;</webidl>
15248 <Type name="CalendarItemStatus"/>
15249 </DictionaryMember>
15250 <DictionaryMember name="priority" id="::Calendar::CalendarItemInit::priority">
15251 <webidl> <ref>CalendarItemPriority</ref> priority;</webidl>
15252 <Type name="CalendarItemPriority"/>
15253 </DictionaryMember>
15254 <DictionaryMember name="alarms" id="::Calendar::CalendarItemInit::alarms">
15255 <webidl> <ref>CalendarAlarm</ref>[] alarms;</webidl>
15256 <Type type="array">
15257 <Type name="CalendarAlarm"/>
15259 </DictionaryMember>
15260 <DictionaryMember name="categories" id="::Calendar::CalendarItemInit::categories">
15261 <webidl> DOMString[] categories;</webidl>
15262 <Type type="array">
15263 <Type type="DOMString"/>
15265 </DictionaryMember>
15266 <DictionaryMember name="attendees" id="::Calendar::CalendarItemInit::attendees">
15267 <webidl> <ref>CalendarAttendee</ref>[] attendees;</webidl>
15268 <Type type="array">
15269 <Type name="CalendarAttendee"/>
15271 </DictionaryMember>
15273 <Dictionary name="CalendarTaskInit" id="::Calendar::CalendarTaskInit">
15274 <webidl> dictionary CalendarTaskInit: <ref>CalendarItemInit</ref> {
15275 <ref>TZDate</ref> dueDate;
15276 <ref>TZDate</ref> completedDate;
15281 A dictionary that is used for creating calendar tasks.
15285 It also provides an interface for specifying task attributes upon task creation (in the <em>CalendarTask </em>constructor).
15288 All the attributes are optional and are undefined by default.
15295 <DictionaryInheritance>
15296 <Name name="CalendarItemInit"/>
15297 </DictionaryInheritance>
15298 <DictionaryMember name="dueDate" id="::Calendar::CalendarTaskInit::dueDate">
15299 <webidl> <ref>TZDate</ref> dueDate;</webidl>
15300 <Type name="TZDate"/>
15301 </DictionaryMember>
15302 <DictionaryMember name="completedDate" id="::Calendar::CalendarTaskInit::completedDate">
15303 <webidl> <ref>TZDate</ref> completedDate;</webidl>
15304 <Type name="TZDate"/>
15305 </DictionaryMember>
15306 <DictionaryMember name="progress" id="::Calendar::CalendarTaskInit::progress">
15307 <webidl> short progress;</webidl>
15308 <Type type="short"/>
15309 </DictionaryMember>
15311 <Dictionary name="CalendarEventInit" id="::Calendar::CalendarEventInit">
15312 <webidl> dictionary CalendarEventInit: <ref>CalendarItemInit</ref> {
15313 <ref>TZDate</ref> endDate;
15314 <ref>EventAvailability</ref> availability;
15315 <ref>CalendarRecurrenceRule</ref> recurrenceRule;
15319 A dictionary that is used for creating calendar events.
15323 Provides an interface for specifying event attributes upon event creation (in the <em>CalendarEvent </em>constructor).
15326 All the attributes are optional and are undefined by default.
15333 <DictionaryInheritance>
15334 <Name name="CalendarItemInit"/>
15335 </DictionaryInheritance>
15336 <DictionaryMember name="endDate" id="::Calendar::CalendarEventInit::endDate">
15337 <webidl> <ref>TZDate</ref> endDate;</webidl>
15338 <Type name="TZDate"/>
15339 </DictionaryMember>
15340 <DictionaryMember name="availability" id="::Calendar::CalendarEventInit::availability">
15341 <webidl> <ref>EventAvailability</ref> availability;</webidl>
15342 <Type name="EventAvailability"/>
15343 </DictionaryMember>
15344 <DictionaryMember name="recurrenceRule" id="::Calendar::CalendarEventInit::recurrenceRule">
15345 <webidl> <ref>CalendarRecurrenceRule</ref> recurrenceRule;</webidl>
15346 <Type name="CalendarRecurrenceRule"/>
15347 </DictionaryMember>
15349 <Interface name="CalendarItem" id="::Calendar::CalendarItem">
15350 <webidl> [NoInterfaceObject] interface CalendarItem {
15351 readonly attribute <ref>CalendarItemId</ref>? id;
15353 readonly attribute <ref>CalendarId</ref>? calendarId;
15355 readonly attribute <ref>TZDate</ref>? lastModificationDate;
15357 attribute DOMString? description setraises(<ref>WebAPIException</ref>);
15359 attribute DOMString? summary setraises(<ref>WebAPIException</ref>);
15361 attribute boolean isAllDay setraises(<ref>WebAPIException</ref>);
15363 attribute <ref>TZDate</ref>? startDate setraises(<ref>WebAPIException</ref>);
15365 attribute <ref>TimeDuration</ref>? duration setraises(<ref>WebAPIException</ref>);
15367 attribute DOMString? location setraises(<ref>WebAPIException</ref>);
15369 attribute <ref>SimpleCoordinates</ref>? geolocation setraises(<ref>WebAPIException</ref>);
15371 attribute DOMString? organizer setraises(<ref>WebAPIException</ref>);
15373 attribute <ref>CalendarItemVisibility</ref> visibility setraises(<ref>WebAPIException</ref>);
15375 attribute <ref>CalendarItemStatus</ref> status setraises(<ref>WebAPIException</ref>);
15377 attribute <ref>CalendarItemPriority</ref> priority setraises(<ref>WebAPIException</ref>);
15379 attribute <ref>CalendarAlarm</ref>[] alarms setraises(<ref>WebAPIException</ref>);
15381 attribute DOMString[] categories setraises(<ref>WebAPIException</ref>);
15383 attribute <ref>CalendarAttendee</ref>[] attendees setraises(<ref>WebAPIException</ref>);
15385 DOMString convertToString(<ref>CalendarTextFormat</ref> format) raises(<ref>WebAPIException</ref>);
15387 <ref>CalendarItem</ref> clone() raises(<ref>WebAPIException</ref>);
15391 This is a parent interface that is used to create Calendar events and tasks.
15392 These attributes are shared by both events and tasks.
15398 <ExtendedAttributeList>
15399 <ExtendedAttribute name="NoInterfaceObject">
15400 <webidl>NoInterfaceObject</webidl>
15401 </ExtendedAttribute>
15402 </ExtendedAttributeList>
15403 <Attribute readonly="readonly" name="id" id="::Calendar::CalendarItem::id">
15404 <webidl> readonly attribute <ref>CalendarItemId</ref>? id;</webidl>
15407 An attribute to persistently and uniquely identify an item in implementation.
15411 Includes a UID and a possible recurrence ID that is needed to identify a particular instance of a recurring event.
15414 By default, this attribute is set to null.
15421 <Type name="CalendarItemId" nullable="nullable"/>
15423 <Attribute readonly="readonly" name="calendarId" id="::Calendar::CalendarItem::calendarId">
15424 <webidl> readonly attribute <ref>CalendarId</ref>? calendarId;</webidl>
15427 An attribute to identify the calendar in which this item is saved.
15431 By default, this attribute is set to null.
15438 <Type name="CalendarId" nullable="nullable"/>
15440 <Attribute readonly="readonly" name="lastModificationDate" id="::Calendar::CalendarItem::lastModificationDate">
15441 <webidl> readonly attribute <ref>TZDate</ref>? lastModificationDate;</webidl>
15444 An attribute to identify the last modified date and time of an item.
15448 This attribute is automatically populated and cannot be edited by the client.
15449 (See RFC 5545 - Section 3.8.7.3).
15456 <Type name="TZDate" nullable="nullable"/>
15458 <Attribute name="description" id="::Calendar::CalendarItem::description">
15459 <webidl> attribute DOMString? description setraises(<ref>WebAPIException</ref>);</webidl>
15462 An attribute to store the textual descriptions of an item.
15466 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.
15467 (See RFC 5545 - Section 3.8.1.5).
15470 The default value is an empty string.
15476 <Code> event.description = 'Tizen Codefest';
15479 <Type type="DOMString" nullable="nullable"/>
15481 <RaiseException name="WebAPIException"/>
15484 <Attribute name="summary" id="::Calendar::CalendarItem::summary">
15485 <webidl> attribute DOMString? summary setraises(<ref>WebAPIException</ref>);</webidl>
15488 An attribute to store a short summary or subject for an item.
15489 (See RFC 5545 - Section 3.8.1.12)
15493 The default value is an empty string.
15499 <Code> event.summary = 'Launching the Tizen reference implementation';
15502 <Type type="DOMString" nullable="nullable"/>
15504 <RaiseException name="WebAPIException"/>
15507 <Attribute name="isAllDay" id="::Calendar::CalendarItem::isAllDay">
15508 <webidl> attribute boolean isAllDay setraises(<ref>WebAPIException</ref>);</webidl>
15511 An attribute that behaves like a flag to indicate whether an event is an all-day event or not.
15515 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.
15518 The default value for this attribute is <var>false</var>.
15524 <Code> event.isAllDay = true; // All-Day event
15527 <Type type="boolean"/>
15529 <RaiseException name="WebAPIException"/>
15532 <Attribute name="startDate" id="::Calendar::CalendarItem::startDate">
15533 <webidl> attribute <ref>TZDate</ref>? startDate setraises(<ref>WebAPIException</ref>);</webidl>
15536 An attribute to store the start date/time for an item.
15537 (see RFC 5545 - Section 3.8.2.4).
15541 The default value for this attribute is <var>null</var>.
15544 <em>startDate</em> must be specified in the same time zone as <em>endDate / dueDate</em> if provided.
15552 This attribute is precise to the second. Milliseconds are ignored.
15555 <Code> // 2010-04-30 09:00
15556 event.startDate = new tizen.TZDate(2010, 3, 30, 9, 0);
15559 <Type name="TZDate" nullable="nullable"/>
15561 <RaiseException name="WebAPIException"/>
15564 <Attribute name="duration" id="::Calendar::CalendarItem::duration">
15565 <webidl> attribute <ref>TimeDuration</ref>? duration setraises(<ref>WebAPIException</ref>);</webidl>
15568 An attribute to denote the duration of the calendar component.
15569 (See RFC 5545 - Section 3.8.2.5).
15573 By default, this attribute is set to <var>null</var>.
15576 <em>duration</em> and <em>endDate / dueDate</em> are mutually exclusive, hence, only one of them can be non-null.
15579 This attribute is precise to the second. Milliseconds are ignored.
15583 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.
15588 <Code> // 1 hour meeting
15589 event.duration = new tizen.TimeDuration(1, "HOURS");
15592 <Type name="TimeDuration" nullable="nullable"/>
15594 <RaiseException name="WebAPIException"/>
15597 <Attribute name="location" id="::Calendar::CalendarItem::location">
15598 <webidl> attribute DOMString? location setraises(<ref>WebAPIException</ref>);</webidl>
15601 An attribute to store the location or the intended venue for the activity defined by the calendar item.
15602 (See RFC 5545 - Section 3.8.1.7)
15606 The default value for this attribute is an empty string.
15612 <Code> event.location = 'Huesca';
15615 <Type type="DOMString" nullable="nullable"/>
15617 <RaiseException name="WebAPIException"/>
15620 <Attribute name="geolocation" id="::Calendar::CalendarItem::geolocation">
15621 <webidl> attribute <ref>SimpleCoordinates</ref>? geolocation setraises(<ref>WebAPIException</ref>);</webidl>
15624 An attribute to store the global position latitude and longitude of the location where the event is planned to take place.
15625 (See RFC 5545 - Section 3.8.1.6).
15630 <Code> event.geolocation = new tizen.SimpleCoordinates(60.175, 24.934);
15633 <Type name="SimpleCoordinates" nullable="nullable"/>
15635 <RaiseException name="WebAPIException"/>
15638 <Attribute name="organizer" id="::Calendar::CalendarItem::organizer">
15639 <webidl> attribute DOMString? organizer setraises(<ref>WebAPIException</ref>);</webidl>
15642 An attribute to store the name of the person who organized this event.
15643 (See RFC 5545 - Section 3.8.4.3).
15647 By default, this attribute is initialized to an empty string.
15653 <Code> event.organizer = 'Mr. Jones';
15656 <Type type="DOMString" nullable="nullable"/>
15658 <RaiseException name="WebAPIException"/>
15661 <Attribute name="visibility" id="::Calendar::CalendarItem::visibility">
15662 <webidl> attribute <ref>CalendarItemVisibility</ref> visibility setraises(<ref>WebAPIException</ref>);</webidl>
15665 An attribute to mark the visibility (secrecy) level of the item.
15666 (See RFC 5545 - Section 3.8.1.3).
15670 The default value is <var>PUBLIC</var>.
15677 <Type name="CalendarItemVisibility"/>
15679 <RaiseException name="WebAPIException"/>
15682 <Attribute name="status" id="::Calendar::CalendarItem::status">
15683 <webidl> attribute <ref>CalendarItemStatus</ref> status setraises(<ref>WebAPIException</ref>);</webidl>
15686 An attribute to store the overall confirmation status for a calendar component.
15687 (See RFC 5545 - Section 3.8.1.11).
15691 For an event, the default value is <var>CONFIRMED</var>. For a task, the default value is <var>NEEDS_ACTION</var>.
15697 <Code> event.status = "TENTATIVE";
15700 <Type name="CalendarItemStatus"/>
15702 <RaiseException name="WebAPIException"/>
15705 <Attribute name="priority" id="::Calendar::CalendarItem::priority">
15706 <webidl> attribute <ref>CalendarItemPriority</ref> priority setraises(<ref>WebAPIException</ref>);</webidl>
15709 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.
15710 (See RFC 5545 - Section 3.8.1.9).
15714 The default value for this attribute is <var>LOW </var>priority.
15717 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:
15731 <Code> task.priority = "HIGH";
15734 <Type name="CalendarItemPriority"/>
15736 <RaiseException name="WebAPIException"/>
15739 <Attribute name="alarms" id="::Calendar::CalendarItem::alarms">
15740 <webidl> attribute <ref>CalendarAlarm</ref>[] alarms setraises(<ref>WebAPIException</ref>);</webidl>
15743 An attribute array to lists the alarms (or reminders) associated to an item.
15748 <Code> ev.startDate = new tizen.TZDate(2011, 2, 11, 8, 0, 0);
15749 // Gives a sound notification 30 minutes before the item's start time
15750 var alarm = new tizen.CalendarAlarm(new tizen.TimeDuration(30, "MINS"),
15751 "SOUND");
15752 ev.alarms = [alarm];
15755 <Type type="array">
15756 <Type name="CalendarAlarm"/>
15759 <RaiseException name="WebAPIException"/>
15762 <Attribute name="categories" id="::Calendar::CalendarItem::categories">
15763 <webidl> attribute DOMString[] categories setraises(<ref>WebAPIException</ref>);</webidl>
15766 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.
15767 (See RFC 5545 - Section 3.8.1.2).
15771 Examples of categories are personal, work, vacation, travel, etc.
15774 By default, this attribute is set to an empty array.
15780 <Code> event.categories = ['Personal'];
15783 <Type type="array">
15784 <Type type="DOMString"/>
15787 <RaiseException name="WebAPIException"/>
15790 <Attribute name="attendees" id="::Calendar::CalendarItem::attendees">
15791 <webidl> attribute <ref>CalendarAttendee</ref>[] attendees setraises(<ref>WebAPIException</ref>);</webidl>
15794 An attribute array that lists the people attending an event.
15795 (See RFC 5545 - Section 3.8.4.3).
15799 By default, this attribute is set to an empty array.
15805 <Code> var attendee = new tizen.CalendarAttendee('mailto:bob@domain.com',
15806 {role: "CHAIR", RSVP: true});
15807 event.attendees = [attendee];
15810 <Type type="array">
15811 <Type name="CalendarAttendee"/>
15814 <RaiseException name="WebAPIException"/>
15817 <Operation name="convertToString" id="::Calendar::CalendarItem::convertToString">
15818 <webidl> DOMString convertToString(<ref>CalendarTextFormat</ref> format) raises(<ref>WebAPIException</ref>);</webidl>
15821 Converts the calendar item to a string format that will be generated and returned synchronously.
15822 The export format is set using the format parameter.
15831 http://tizen.org/privilege/calendar.read
15833 <Code> // Defines the event search success callback.
15834 function eventSearchSuccessCallback(events) {
15835 // Converts the first event to iCalendar 2.0 format (default)
15836 var vevent = events[0].convertToString("ICALENDAR_20");
15837 console.log('iCalendar 2.0 representation of the event is: ' + vevent);
15840 function errorCallback(response) {
15841 console.log( 'The following error occurred: ' + response.name);
15844 // Gets the default calendar
15845 var myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
15847 // Finds all events in the first calendar that contain in the summary the string Tizen.
15848 var filter = new tizen.AttributeFilter('summary', 'CONTAINS', 'Tizen');
15849 myCalendar.find(eventSearchSuccessCallback, errorCallback, filter);
15852 <Type type="DOMString">
15855 DOMString The representation of the Calendar item.
15860 <Argument name="format">
15863 The format to use for exporting.
15866 <Type name="CalendarTextFormat"/>
15870 <RaiseException name="WebAPIException">
15873 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
15876 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
15879 with error type SecurityError, if the application does not have the privilege to call this method.
15882 with error type NotSupportedError, if the feature is not supported.
15885 with error type UnknownError, if any other error occurs.
15891 <Operation name="clone" id="::Calendar::CalendarItem::clone">
15892 <webidl> <ref>CalendarItem</ref> clone() raises(<ref>WebAPIException</ref>);</webidl>
15895 Clones the <em>CalendarItem </em>object, detached from any calendar.
15899 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.
15909 http://tizen.org/privilege/calendar.read
15911 <Code> // Gets default calendar.
15912 var calendar = tizen.calendar.getDefaultCalendar();
15914 var html5seminar = new tizen.CalendarEvent({startDate: new tizen.TZDate(2012, 3, 4),
15915 duration: new tizen.TimeDuration(3, "DAYS"),
15916 summary: "HTML5 Seminar"});
15918 calendar.add(html5seminar);
15919 var tizenseminar = html5seminar.clone();
15920 tizenseminar.summary = "Tizen Seminar";
15921 calendar.add(tizenseminar);
15924 <Type name="CalendarItem">
15927 CalendarItem The new clone of the <em>CalendarItem </em>object.
15933 <RaiseException name="WebAPIException">
15936 with error type SecurityError, if the application does not have the privilege to call this method.
15939 with error type NotSupportedError, if the feature is not supported.
15942 with error type UnknownError if any other error occurs.
15949 <Interface name="CalendarTask" id="::Calendar::CalendarTask">
15950 <webidl> [Constructor(optional <ref>CalendarTaskInit</ref>? taskInitDict),
15951 Constructor(DOMString stringRepresentation, <ref>CalendarTextFormat</ref> format)]
15952 interface CalendarTask : <ref>CalendarItem</ref> {
15953 attribute <ref>TZDate</ref>? dueDate setraises(<ref>WebAPIException</ref>);
15955 attribute <ref>TZDate</ref>? completedDate setraises(<ref>WebAPIException</ref>);
15957 attribute unsigned short progress setraises(<ref>WebAPIException</ref>);
15961 An interface that implements the <em>CalendarTask </em>object.
15967 <ExtendedAttributeList>
15968 <ExtendedAttribute name="Constructor">
15969 <webidl>Constructor(optional <ref>CalendarTaskInit</ref>? taskInitDict)</webidl>
15971 <Argument optional="optional" name="taskInitDict">
15972 <Type name="CalendarTaskInit" nullable="nullable"/>
15975 </ExtendedAttribute>
15976 <ExtendedAttribute name="Constructor">
15977 <webidl> Constructor(DOMString stringRepresentation, <ref>CalendarTextFormat</ref> format)</webidl>
15979 <Argument name="stringRepresentation">
15980 <Type type="DOMString"/>
15982 <Argument name="format">
15983 <Type name="CalendarTextFormat"/>
15986 </ExtendedAttribute>
15987 </ExtendedAttributeList>
15988 <InterfaceInheritance>
15989 <Name name="CalendarItem"/>
15990 </InterfaceInheritance>
15991 <Attribute name="dueDate" id="::Calendar::CalendarTask::dueDate">
15992 <webidl> attribute <ref>TZDate</ref>? dueDate setraises(<ref>WebAPIException</ref>);</webidl>
15995 An attribute to store the due date and time for completing a task. (See RFC 5545 - Section 3.8.2.3).
15999 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.
16002 This attribute is precise to the second. Milliseconds are ignored.
16005 The default value is <var>null</var>. If no value is provided, the task doesn't have a due date.
16011 <Code> task.dueDate = new tizen.TZDate(2011, 2, 11);
16014 <Type name="TZDate" nullable="nullable"/>
16016 <RaiseException name="WebAPIException"/>
16019 <Attribute name="completedDate" id="::Calendar::CalendarTask::completedDate">
16020 <webidl> attribute <ref>TZDate</ref>? completedDate setraises(<ref>WebAPIException</ref>);</webidl>
16023 An attribute to record the date and time when an task is completed.
16024 (See RFC 5545 - Section 3.8.2.1).
16028 This attribute is precise to the second. Milliseconds are ignored.
16031 The default value is <var>null</var>. If no value is provided, the task is not completed yet.
16037 <Code> task.completedDate = new tizen.TZDate(2011, 2, 11);
16040 <Type name="TZDate" nullable="nullable"/>
16042 <RaiseException name="WebAPIException"/>
16045 <Attribute name="progress" id="::Calendar::CalendarTask::progress">
16046 <webidl> attribute unsigned short progress setraises(<ref>WebAPIException</ref>);</webidl>
16049 An attribute to denote the percent of completion of a task.
16053 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.
16056 Integer values in between indicate the percent partially complete.
16057 (See RFC 5545 - Section 3.8.1.8).
16060 The default value is <var>0</var>, implies that the task has not been started.
16066 <Code> task.progress = 50; // 50% done
16069 <Type type="unsigned short"/>
16071 <RaiseException name="WebAPIException"/>
16075 <Interface name="CalendarEvent" id="::Calendar::CalendarEvent">
16076 <webidl> [Constructor(optional <ref>CalendarEventInit</ref>? eventInitDict),
16077 Constructor(DOMString stringRepresentation, <ref>CalendarTextFormat</ref> format)]
16078 interface CalendarEvent : <ref>CalendarItem</ref> {
16079 readonly attribute boolean isDetached;
16081 attribute <ref>TZDate</ref>? endDate setraises(<ref>WebAPIException</ref>);
16083 attribute <ref>EventAvailability</ref> availability setraises(<ref>WebAPIException</ref>);
16085 attribute <ref>CalendarRecurrenceRule</ref>? recurrenceRule setraises(<ref>WebAPIException</ref>);
16087 void expandRecurrence(<ref>TZDate</ref> startDate,
16088 <ref>TZDate</ref> endDate,
16089 <ref>CalendarEventArraySuccessCallback</ref> successCallback,
16090 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
16094 An interface that implements the <em>calendarEvent </em>object.
16099 <Code> // Gets the default calendar
16100 var calendar = tizen.calendar.getDefaultCalendar("EVENT");
16103 var ev = new tizen.CalendarEvent("BEGIN:VCALENDAR\r\n" +
16104 "BEGIN:VEVENT\r\n" +
16105 "DTSTAMP:19970901T1300Z\r\n" +
16106 "DTSTART:19970903T163000Z\r\n" +
16107 "DTEND:19970903T190000Z\r\n" +
16108 "SUMMARY:Annual Employee Review\r\n" +
16109 "CATEGORIES:BUSINESS,HUMAN RESOURCES\r\n" +
16110 "END:VEVENT\r\n" +
16111 "END:VCALENDAR", "ICALENDAR_20");
16114 console.log('Event added with UID ' + ev.id.uid);
16116 console.log("Failed to add VEVENT to the calendar, error: " + err.name);
16120 <ExtendedAttributeList>
16121 <ExtendedAttribute name="Constructor">
16122 <webidl>Constructor(optional <ref>CalendarEventInit</ref>? eventInitDict)</webidl>
16124 <Argument optional="optional" name="eventInitDict">
16125 <Type name="CalendarEventInit" nullable="nullable"/>
16128 </ExtendedAttribute>
16129 <ExtendedAttribute name="Constructor">
16130 <webidl> Constructor(DOMString stringRepresentation, <ref>CalendarTextFormat</ref> format)</webidl>
16132 <Argument name="stringRepresentation">
16133 <Type type="DOMString"/>
16135 <Argument name="format">
16136 <Type name="CalendarTextFormat"/>
16139 </ExtendedAttribute>
16140 </ExtendedAttributeList>
16141 <InterfaceInheritance>
16142 <Name name="CalendarItem"/>
16143 </InterfaceInheritance>
16144 <Attribute readonly="readonly" name="isDetached" id="::Calendar::CalendarEvent::isDetached">
16145 <webidl> readonly attribute boolean isDetached;</webidl>
16148 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.
16154 <Type type="boolean"/>
16156 <Attribute name="endDate" id="::Calendar::CalendarEvent::endDate">
16157 <webidl> attribute <ref>TZDate</ref>? endDate setraises(<ref>WebAPIException</ref>);</webidl>
16160 An attribute to store the end date/time of an event.
16164 (see RFC 5545 - Section 3.8.2.2).
16167 This <em>endDate</em> must be in the same time zone as the <em>startDate</em>.
16168 Note that <em>duration</em> and <em>endDate</em> are mutually exclusive, only one of them can be non-null.
16171 This attribute is precise to the second. Milliseconds are ignored.
16174 The default value for this attribute is <var>null</var>.
16180 <Code> // 2010-04-30 09:00
16181 event.endDate = new tizen.TZDate(2010, 3, 30, 9, 0);
16184 <Type name="TZDate" nullable="nullable"/>
16186 <RaiseException name="WebAPIException"/>
16189 <Attribute name="availability" id="::Calendar::CalendarEvent::availability">
16190 <webidl> attribute <ref>EventAvailability</ref> availability setraises(<ref>WebAPIException</ref>);</webidl>
16193 An attribute to indicate the availability of a person for an event.
16194 (See RFC 5545 - Section 3.2.9).
16198 The default value is <var>BUSY</var>.
16205 <Type name="EventAvailability"/>
16207 <RaiseException name="WebAPIException"/>
16210 <Attribute name="recurrenceRule" id="::Calendar::CalendarEvent::recurrenceRule">
16211 <webidl> attribute <ref>CalendarRecurrenceRule</ref>? recurrenceRule setraises(<ref>WebAPIException</ref>);</webidl>
16214 An attribute to denote the recurrence rule for the event.
16218 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.
16221 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.
16222 (See RFC 5545, Section 3.3.10.)
16228 <Code> // Repeats daily for 7 days
16229 var rule = new tizen.CalendarRecurrenceRule("DAILY", {occurrenceCount: 7});
16230 event.recurrenceRule = rule;
16233 <Type name="CalendarRecurrenceRule" nullable="nullable"/>
16235 <RaiseException name="WebAPIException"/>
16238 <Operation name="expandRecurrence" id="::Calendar::CalendarEvent::expandRecurrence">
16239 <webidl> void expandRecurrence(<ref>TZDate</ref> startDate,
16240 <ref>TZDate</ref> endDate,
16241 <ref>CalendarEventArraySuccessCallback</ref> successCallback,
16242 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
16245 Expands a recurring event and returns asynchronously the list of instances occurring in a given time interval (inclusive).
16249 This method takes into consideration all the parameters of the event recurrence rule to generate the instances occurring in a given time interval.
16252 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.
16255 The errorCallback is launched with these error types:
16259 InvalidValuesError - if the event in operation is not recurring. </li>
16261 UnknownError - if any other error occurs. </li>
16271 http://tizen.org/privilege/calendar.read
16273 <Code> // eventId should be set to ID of event obtained with the find function.
16275 // Defines the error callback.
16276 function errorCallback(response) {
16277 console.log( 'The following error occurred: ' + response.name);
16280 // Defines the event expanding success callback.
16281 function eventExpandingSuccessCallback(events) {
16282 console.log(events.length + ' event instances were returned.');
16285 var calendar = tizen.calendar.getDefaultCalendar();
16286 var event = calendar.get(eventId);
16288 if (event.recurrenceRule != null) {
16289 // This is a recurring event. Expand all the instances during August 2011.
16290 event.expandRecurrence(new tizen.TZDate(2011, 7, 1),
16291 new tizen.TZDate(2011, 7, 31),
16292 eventExpandingSuccessCallback,
16297 <Type type="void"/>
16299 <Argument name="startDate">
16302 The start date/ time of an event(inclusive).
16305 <Type name="TZDate"/>
16307 <Argument name="endDate">
16310 The end date/ time of an event (inclusive).
16313 <Type name="TZDate"/>
16315 <Argument name="successCallback">
16318 The method to call when the invocation ends successfully.
16321 <Type name="CalendarEventArraySuccessCallback"/>
16323 <Argument optional="optional" name="errorCallback">
16326 The method to call when an error occurs.
16329 <Type name="ErrorCallback" nullable="nullable"/>
16333 <RaiseException name="WebAPIException">
16336 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
16339 with error type SecurityError, if the application does not have the privilege to call this method.
16342 with error type NotSupportedError, if the feature is not supported.
16349 <Dictionary name="CalendarAttendeeInit" id="::Calendar::CalendarAttendeeInit">
16350 <webidl> dictionary CalendarAttendeeInit {
16352 <ref>AttendeeRole</ref> role;
16353 <ref>AttendeeStatus</ref> status;
16355 <ref>AttendeeType</ref> type;
16357 DOMString delegatorURI;
16358 DOMString delegateURI;
16359 <ref>ContactRef</ref> contactRef;
16363 The properties of a <em>CalendarAttendee</em>, to pass to its constructor.
16367 See <em>CalendarAttendee </em>interface for more information about the members.
16374 <DictionaryMember name="name" id="::Calendar::CalendarAttendeeInit::name">
16375 <webidl> DOMString name;</webidl>
16376 <Type type="DOMString"/>
16377 </DictionaryMember>
16378 <DictionaryMember name="role" id="::Calendar::CalendarAttendeeInit::role">
16379 <webidl> <ref>AttendeeRole</ref> role;</webidl>
16380 <Type name="AttendeeRole"/>
16381 </DictionaryMember>
16382 <DictionaryMember name="status" id="::Calendar::CalendarAttendeeInit::status">
16383 <webidl> <ref>AttendeeStatus</ref> status;</webidl>
16384 <Type name="AttendeeStatus"/>
16385 </DictionaryMember>
16386 <DictionaryMember name="RSVP" id="::Calendar::CalendarAttendeeInit::RSVP">
16387 <webidl> boolean RSVP;</webidl>
16388 <Type type="boolean"/>
16389 </DictionaryMember>
16390 <DictionaryMember name="type" id="::Calendar::CalendarAttendeeInit::type">
16391 <webidl> <ref>AttendeeType</ref> type;</webidl>
16392 <Type name="AttendeeType"/>
16393 </DictionaryMember>
16394 <DictionaryMember name="group" id="::Calendar::CalendarAttendeeInit::group">
16395 <webidl> DOMString? group;</webidl>
16396 <Type type="DOMString" nullable="nullable"/>
16397 </DictionaryMember>
16398 <DictionaryMember name="delegatorURI" id="::Calendar::CalendarAttendeeInit::delegatorURI">
16399 <webidl> DOMString delegatorURI;</webidl>
16400 <Type type="DOMString"/>
16401 </DictionaryMember>
16402 <DictionaryMember name="delegateURI" id="::Calendar::CalendarAttendeeInit::delegateURI">
16403 <webidl> DOMString delegateURI;</webidl>
16404 <Type type="DOMString"/>
16405 </DictionaryMember>
16406 <DictionaryMember name="contactRef" id="::Calendar::CalendarAttendeeInit::contactRef">
16407 <webidl> <ref>ContactRef</ref> contactRef;</webidl>
16408 <Type name="ContactRef"/>
16409 </DictionaryMember>
16411 <Interface name="CalendarAttendee" id="::Calendar::CalendarAttendee">
16412 <webidl> [Constructor(DOMString uri, optional <ref>CalendarAttendeeInit</ref>? attendeeInitDict)]
16413 interface CalendarAttendee
16415 attribute DOMString uri;
16417 attribute DOMString? name;
16419 attribute <ref>AttendeeRole</ref> role;
16421 attribute <ref>AttendeeStatus</ref> status;
16423 attribute boolean RSVP;
16425 attribute <ref>AttendeeType</ref> type;
16427 attribute DOMString? group;
16429 attribute DOMString? delegatorURI;
16431 attribute DOMString? delegateURI;
16433 attribute <ref>ContactRef</ref>? contactRef;
16437 This interface implements the <em>CalendarAttendee </em>object that contains information about an event attendee.
16441 By default, each of the attributes of this interface are undefined.
16444 (For more details, see RFC 5545, Section 3.8.4.1.)
16450 <Code> var attendee = new tizen.CalendarAttendee('mailto:bob@domain.com',
16451 {role: "CHAIR", RSVP: true});
16452 event.attendees = [attendee];
16455 <ExtendedAttributeList>
16456 <ExtendedAttribute name="Constructor">
16457 <webidl>Constructor(DOMString uri, optional <ref>CalendarAttendeeInit</ref>? attendeeInitDict)</webidl>
16459 <Argument name="uri">
16460 <Type type="DOMString"/>
16462 <Argument optional="optional" name="attendeeInitDict">
16463 <Type name="CalendarAttendeeInit" nullable="nullable"/>
16466 </ExtendedAttribute>
16467 </ExtendedAttributeList>
16468 <Attribute name="uri" id="::Calendar::CalendarAttendee::uri">
16469 <webidl> attribute DOMString uri;</webidl>
16472 An attribute to store the URI for the attendee.
16476 This is often an email in the form 'mailto:name@domain.com'.
16483 <Type type="DOMString"/>
16485 <Attribute name="name" id="::Calendar::CalendarAttendee::name">
16486 <webidl> attribute DOMString? name;</webidl>
16489 An attribute to store the name of an attendee.
16495 <Type type="DOMString" nullable="nullable"/>
16497 <Attribute name="role" id="::Calendar::CalendarAttendee::role">
16498 <webidl> attribute <ref>AttendeeRole</ref> role;</webidl>
16501 An attribute to denote the role of the attendee.
16505 (See RFC 5545, Section 3.2.16.)
16508 The default value is <var>REQ_PARTICIPANT</var>.
16515 <Type name="AttendeeRole"/>
16517 <Attribute name="status" id="::Calendar::CalendarAttendee::status">
16518 <webidl> attribute <ref>AttendeeStatus</ref> status;</webidl>
16521 An attribute to store the participant's attendance status.
16522 (See RFC 5545, Section 3.2.12.)
16526 The default value is <var>PENDING</var>.
16533 <Type name="AttendeeStatus"/>
16535 <Attribute name="RSVP" id="::Calendar::CalendarAttendee::RSVP">
16536 <webidl> attribute boolean RSVP;</webidl>
16539 An attribute to store the attendee's participation status reply (RSVP).
16540 (See RFC 5545, Section 3.2.17.)
16544 By default, this attribute is set to <var>FALSE</var>.
16551 <Type type="boolean"/>
16553 <Attribute name="type" id="::Calendar::CalendarAttendee::type">
16554 <webidl> attribute <ref>AttendeeType</ref> type;</webidl>
16557 An attribute to indicate the type of a participant.
16558 (See RFC 5545, Section 3.2.3.)
16562 The default value is <var>INDIVIDUAL</var>.
16569 <Type name="AttendeeType"/>
16571 <Attribute name="group" id="::Calendar::CalendarAttendee::group">
16572 <webidl> attribute DOMString? group;</webidl>
16575 An attribute to store the participant's group or list membership.
16576 (See RFC 5545, Section 3.2.11.)
16582 <Type type="DOMString" nullable="nullable"/>
16584 <Attribute name="delegatorURI" id="::Calendar::CalendarAttendee::delegatorURI">
16585 <webidl> attribute DOMString? delegatorURI;</webidl>
16588 An attribute to store the URI of the person who has delegated their participation to this attendee.
16589 (See RFC 5545, Section 3.2.4.)
16595 <Type type="DOMString" nullable="nullable"/>
16597 <Attribute name="delegateURI" id="::Calendar::CalendarAttendee::delegateURI">
16598 <webidl> attribute DOMString? delegateURI;</webidl>
16601 An attribute to stores the URI of the attendee to whom the person has delegated his participation.
16602 (See RFC 5545, Section 3.2.5.)
16608 <Type type="DOMString" nullable="nullable"/>
16610 <Attribute name="contactRef" id="::Calendar::CalendarAttendee::contactRef">
16611 <webidl> attribute <ref>ContactRef</ref>? contactRef;</webidl>
16614 An attribute to store the participant's reference in the Contact API.
16618 If the contact is not resolved, this attribute will be set to<var> null</var>.
16619 For more information, see the <a href="../../org.tizen.web.device.apireference/tizen/contact.html">Contact API</a>.
16626 <Type name="ContactRef" nullable="nullable"/>
16629 <Dictionary name="CalendarRecurrenceRuleInit" id="::Calendar::CalendarRecurrenceRuleInit">
16630 <webidl> dictionary CalendarRecurrenceRuleInit {
16632 <ref>TZDate</ref> untilDate;
16633 long occurrenceCount;
16634 <ref>ByDayValue</ref>[] daysOfTheWeek;
16635 short[] setPositions;
16636 <ref>TZDate</ref>[] exceptions;
16640 The properties of a <em>CalendarRecurrenceRule</em> to pass to its constructor.
16644 For more information about the members, see <em>CalendarRecurrenceRule </em>interface.
16651 <DictionaryMember name="interval" id="::Calendar::CalendarRecurrenceRuleInit::interval">
16652 <webidl> short interval;</webidl>
16653 <Type type="short"/>
16654 </DictionaryMember>
16655 <DictionaryMember name="untilDate" id="::Calendar::CalendarRecurrenceRuleInit::untilDate">
16656 <webidl> <ref>TZDate</ref> untilDate;</webidl>
16657 <Type name="TZDate"/>
16658 </DictionaryMember>
16659 <DictionaryMember name="occurrenceCount" id="::Calendar::CalendarRecurrenceRuleInit::occurrenceCount">
16660 <webidl> long occurrenceCount;</webidl>
16661 <Type type="long"/>
16662 </DictionaryMember>
16663 <DictionaryMember name="daysOfTheWeek" id="::Calendar::CalendarRecurrenceRuleInit::daysOfTheWeek">
16664 <webidl> <ref>ByDayValue</ref>[] daysOfTheWeek;</webidl>
16665 <Type type="array">
16666 <Type name="ByDayValue"/>
16668 </DictionaryMember>
16669 <DictionaryMember name="setPositions" id="::Calendar::CalendarRecurrenceRuleInit::setPositions">
16670 <webidl> short[] setPositions;</webidl>
16671 <Type type="array">
16672 <Type type="short"/>
16674 </DictionaryMember>
16675 <DictionaryMember name="exceptions" id="::Calendar::CalendarRecurrenceRuleInit::exceptions">
16676 <webidl> <ref>TZDate</ref>[] exceptions;</webidl>
16677 <Type type="array">
16678 <Type name="TZDate"/>
16680 </DictionaryMember>
16682 <Interface name="CalendarRecurrenceRule" id="::Calendar::CalendarRecurrenceRule">
16683 <webidl> [Constructor(<ref>RecurrenceRuleFrequency</ref> frequency, optional <ref>CalendarRecurrenceRuleInit</ref>? ruleInitDict)]
16684 interface CalendarRecurrenceRule
16686 attribute <ref>RecurrenceRuleFrequency</ref> frequency;
16688 attribute unsigned short interval;
16690 attribute <ref>TZDate</ref>? untilDate;
16692 attribute long occurrenceCount;
16694 attribute <ref>ByDayValue</ref>[] daysOfTheWeek;
16696 attribute short[] setPositions;
16698 attribute <ref>TZDate</ref>[] exceptions;
16702 This interface implements the<em> CalendarRecurrenceRule </em>object, which contains information about the recurrence of an event.
16703 (See RFC 5545, Section 3.3.10.)
16708 <Code> // Repeats daily for 7 days
16709 var rule = new tizen.CalendarRecurrenceRule("DAILY", {occurrenceCount:7});
16710 event.recurrenceRule = rule;
16713 <ExtendedAttributeList>
16714 <ExtendedAttribute name="Constructor">
16715 <webidl>Constructor(<ref>RecurrenceRuleFrequency</ref> frequency, optional <ref>CalendarRecurrenceRuleInit</ref>? ruleInitDict)</webidl>
16717 <Argument name="frequency">
16718 <Type name="RecurrenceRuleFrequency"/>
16720 <Argument optional="optional" name="ruleInitDict">
16721 <Type name="CalendarRecurrenceRuleInit" nullable="nullable"/>
16724 </ExtendedAttribute>
16725 </ExtendedAttributeList>
16726 <Attribute name="frequency" id="::Calendar::CalendarRecurrenceRule::frequency">
16727 <webidl> attribute <ref>RecurrenceRuleFrequency</ref> frequency;</webidl>
16730 An attribute to store the frequency of a recurrence rule.
16734 This property corresponds to <em>FREQ</em> in RFC 5545.
16741 <Type name="RecurrenceRuleFrequency"/>
16743 <Attribute name="interval" id="::Calendar::CalendarRecurrenceRule::interval">
16744 <webidl> attribute unsigned short interval;</webidl>
16747 An attribute to specify how often the recurrence rule repeats over the unit of time indicated by its frequency.
16751 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.
16754 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.
16757 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>.
16760 This property corresponds to <em>INTERVAL</em> in RFC 5545.
16767 <Type type="unsigned short"/>
16769 <Attribute name="untilDate" id="::Calendar::CalendarRecurrenceRule::untilDate">
16770 <webidl> attribute <ref>TZDate</ref>? untilDate;</webidl>
16773 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).
16777 By default, this attribute is set to <var>null</var>, meaning that the event recurs infinitely, unless <em>occurrenceCount </em>is set.
16780 This attribute is precise to the second. Milliseconds are ignored.
16783 This property corresponds to <em>UNTIL</em> in RFC 5545.
16790 <Type name="TZDate" nullable="nullable"/>
16792 <Attribute name="occurrenceCount" id="::Calendar::CalendarRecurrenceRule::occurrenceCount">
16793 <webidl> attribute long occurrenceCount;</webidl>
16796 An attribute to indicate the number of occurrences of a recurring event.
16800 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).
16803 By default, this attribute is set to <var>-1</var>, meaning that the event recurs infinitely, unless <em>untilDate </em>is set.
16806 This property corresponds to <em>COUNT</em> in RFC 5545.
16813 <Type type="long"/>
16815 <Attribute name="daysOfTheWeek" id="::Calendar::CalendarRecurrenceRule::daysOfTheWeek">
16816 <webidl> attribute <ref>ByDayValue</ref>[] daysOfTheWeek;</webidl>
16819 An attribute to store the days of the week associated with the recurrence rule.
16823 This property value is valid only for recurrence rules with a frequency type of <em>WEEKLY</em>, <em>MONTHLY</em>, and <em>YEARLY</em>.
16826 This property corresponds to <em>BYDAY</em> in RFC 5545.
16829 By default, this attribute is set to an empty array.
16836 <Type type="array">
16837 <Type name="ByDayValue"/>
16840 <Attribute name="setPositions" id="::Calendar::CalendarRecurrenceRule::setPositions">
16841 <webidl> attribute short[] setPositions;</webidl>
16844 An attribute to store a list of ordinal numbers that filters which recurrences to include in the recurrence rule's frequency.
16848 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.
16851 Values can be from 1 to 366 or -366 to -1.
16852 Negative values indicate counting backwards from the end of the recurrence rule's frequency (week, month, or year).
16855 This attribute must only be used in conjunction with another BYxxx rule part (such as <em>daysOfTheWeek</em>).
16858 This property corresponds to <em>BYSETPOS</em> in RFC 5545.
16861 By default, this attribute is set to an empty array.
16868 <Type type="array">
16869 <Type type="short"/>
16872 <Attribute name="exceptions" id="::Calendar::CalendarRecurrenceRule::exceptions">
16873 <webidl> attribute <ref>TZDate</ref>[] exceptions;</webidl>
16876 An attribute to list date/time exceptions for the recurring event.
16877 (See RFC 5545, Section 3.8.5.1.)
16881 This attribute is precise to the second. Milliseconds are ignored.
16884 This property corresponds to <em>EXDATE</em> in RFC 5545.
16887 By default, this attribute is set to an empty array.
16894 <Type type="array">
16895 <Type name="TZDate"/>
16899 <Interface name="CalendarEventId" id="::Calendar::CalendarEventId">
16900 <webidl> [Constructor(DOMString uid, optional DOMString? rid)]
16901 interface CalendarEventId {
16902 attribute DOMString uid;
16904 attribute DOMString? rid;
16908 This interface contains a UID and an optional recurrence ID attribute to identify calendar events.
16912 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.
16919 <ExtendedAttributeList>
16920 <ExtendedAttribute name="Constructor">
16921 <webidl>Constructor(DOMString uid, optional DOMString? rid)</webidl>
16923 <Argument name="uid">
16924 <Type type="DOMString"/>
16926 <Argument optional="optional" name="rid">
16927 <Type type="DOMString" nullable="nullable"/>
16930 </ExtendedAttribute>
16931 </ExtendedAttributeList>
16932 <Attribute name="uid" id="::Calendar::CalendarEventId::uid">
16933 <webidl> attribute DOMString uid;</webidl>
16936 An attribute to persistently, and uniquely identify a calendar event.
16940 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.
16943 See RFC 5545 (section 3.8.4.7) for more details about this parameter and algorithms to guarantee assignment of unique values.
16944 This value is assigned by the platform when the <em>add()</em> method is successfully invoked.
16951 <Type type="DOMString"/>
16953 <Attribute name="rid" id="::Calendar::CalendarEventId::rid">
16954 <webidl> attribute DOMString? rid;</webidl>
16957 An attribute to store the recurrence ID of a <em>CalendarEvent </em>instance.
16961 This attribute is used in conjunction with the <em>uid</em> property to identify a specific instance of a recurring event.
16964 The parent of a recurrence instance has its <em>rid</em> set to <var>null</var>.
16967 By default, this attribute is set to <var>null</var>.
16968 (See RFC 5545 (section 3.8.4.4) for more details about this parameter.)
16975 <Type type="DOMString" nullable="nullable"/>
16978 <Interface name="CalendarAlarm" id="::Calendar::CalendarAlarm">
16979 <webidl> [Constructor(<ref>TZDate</ref> absoluteDate, <ref>AlarmMethod</ref> method, optional DOMString? description),
16980 Constructor(<ref>TimeDuration</ref> before, <ref>AlarmMethod</ref> method, optional DOMString? description)]
16981 interface CalendarAlarm {
16982 attribute <ref>TZDate</ref>? absoluteDate setraises(<ref>WebAPIException</ref>);
16984 attribute <ref>TimeDuration</ref>? before setraises(<ref>WebAPIException</ref>);
16986 attribute <ref>AlarmMethod</ref> method setraises(<ref>WebAPIException</ref>);
16988 attribute DOMString? description;
16992 An interface that contains information related to an event alarm or reminder.
16997 <Code> // Creates a sound alarm 30 minutes before the event's start time
16998 var alarm = new tizen.CalendarAlarm(new tizen.TimeDuration(30, "MINS"), "SOUND");
17001 <ExtendedAttributeList>
17002 <ExtendedAttribute name="Constructor">
17003 <webidl>Constructor(<ref>TZDate</ref> absoluteDate, <ref>AlarmMethod</ref> method, optional DOMString? description)</webidl>
17005 <Argument name="absoluteDate">
17006 <Type name="TZDate"/>
17008 <Argument name="method">
17009 <Type name="AlarmMethod"/>
17011 <Argument optional="optional" name="description">
17012 <Type type="DOMString" nullable="nullable"/>
17015 </ExtendedAttribute>
17016 <ExtendedAttribute name="Constructor">
17017 <webidl> Constructor(<ref>TimeDuration</ref> before, <ref>AlarmMethod</ref> method, optional DOMString? description)</webidl>
17019 <Argument name="before">
17020 <Type name="TimeDuration"/>
17022 <Argument name="method">
17023 <Type name="AlarmMethod"/>
17025 <Argument optional="optional" name="description">
17026 <Type type="DOMString" nullable="nullable"/>
17029 </ExtendedAttribute>
17030 </ExtendedAttributeList>
17031 <Attribute name="absoluteDate" id="::Calendar::CalendarAlarm::absoluteDate">
17032 <webidl> attribute <ref>TZDate</ref>? absoluteDate setraises(<ref>WebAPIException</ref>);</webidl>
17035 An attribute to record the absolute date and time when an alarm should be triggered.
17039 <em>absoluteDate </em>and <em>before </em>are mutually exclusive.
17042 This attribute is precise to the second. Milliseconds are ignored.
17049 <Type name="TZDate" nullable="nullable"/>
17051 <RaiseException name="WebAPIException"/>
17054 <Attribute name="before" id="::Calendar::CalendarAlarm::before">
17055 <webidl> attribute <ref>TimeDuration</ref>? before setraises(<ref>WebAPIException</ref>);</webidl>
17058 An attribute to store the duration before an event starts on which the alarm should be triggered.
17062 The duration should be positive.
17065 <em>absoluteDate </em>and <em>before </em>are mutually exclusive.
17068 This attribute is precise to the second. Milliseconds are ignored.
17075 <Type name="TimeDuration" nullable="nullable"/>
17077 <RaiseException name="WebAPIException"/>
17080 <Attribute name="method" id="::Calendar::CalendarAlarm::method">
17081 <webidl> attribute <ref>AlarmMethod</ref> method setraises(<ref>WebAPIException</ref>);</webidl>
17084 An attribute to denote the notification method used by an alarm.
17090 <Type name="AlarmMethod"/>
17092 <RaiseException name="WebAPIException"/>
17095 <Attribute name="description" id="::Calendar::CalendarAlarm::description">
17096 <webidl> attribute DOMString? description;</webidl>
17099 An attribute to store the description of an alarm.
17103 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.
17106 The default value is an empty string.
17113 <Type type="DOMString" nullable="nullable"/>
17116 <Interface name="CalendarEventArraySuccessCallback" id="::Calendar::CalendarEventArraySuccessCallback">
17117 <webidl> [Callback=FunctionOnly, NoInterfaceObject]
17118 interface CalendarEventArraySuccessCallback {
17119 void onsuccess(<ref>CalendarEvent</ref>[] events);
17123 An interface that implements the success callback used in the asynchronous operation for retrieving a list of calendar events.
17129 <ExtendedAttributeList>
17130 <ExtendedAttribute name="Callback" value="FunctionOnly">
17131 <webidl>Callback</webidl>
17132 </ExtendedAttribute>
17133 <ExtendedAttribute name="NoInterfaceObject">
17134 <webidl> NoInterfaceObject</webidl>
17135 </ExtendedAttribute>
17136 </ExtendedAttributeList>
17137 <Operation name="onsuccess" id="::Calendar::CalendarEventArraySuccessCallback::onsuccess">
17138 <webidl> void onsuccess(<ref>CalendarEvent</ref>[] events);</webidl>
17141 Called when the list of calendar events is retrieved successfully.
17147 <Type type="void"/>
17149 <Argument name="events">
17152 The array of <em>CalendarEvent </em>objects.
17155 <Type type="array">
17156 <Type name="CalendarEvent"/>
17162 <Interface name="CalendarItemArraySuccessCallback" id="::Calendar::CalendarItemArraySuccessCallback">
17163 <webidl> [Callback=FunctionOnly, NoInterfaceObject]
17164 interface CalendarItemArraySuccessCallback {
17165 void onsuccess(<ref>CalendarItem</ref>[] items);
17169 This interface implements the success callback used in the asynchronous operation for retrieving a list of calendar items.
17175 <ExtendedAttributeList>
17176 <ExtendedAttribute name="Callback" value="FunctionOnly">
17177 <webidl>Callback</webidl>
17178 </ExtendedAttribute>
17179 <ExtendedAttribute name="NoInterfaceObject">
17180 <webidl> NoInterfaceObject</webidl>
17181 </ExtendedAttribute>
17182 </ExtendedAttributeList>
17183 <Operation name="onsuccess" id="::Calendar::CalendarItemArraySuccessCallback::onsuccess">
17184 <webidl> void onsuccess(<ref>CalendarItem</ref>[] items);</webidl>
17187 Called when the list of calendar items is retrieved successfully.
17193 <Type type="void"/>
17195 <Argument name="items">
17198 The array of <em>CalendarItem </em>objects.
17201 <Type type="array">
17202 <Type name="CalendarItem"/>
17208 <Interface name="CalendarArraySuccessCallback" id="::Calendar::CalendarArraySuccessCallback">
17209 <webidl> [Callback=FunctionOnly, NoInterfaceObject]
17210 interface CalendarArraySuccessCallback {
17211 void onsuccess(<ref>Calendar</ref>[] calendars);
17215 This interface implements the success callback used in the asynchronous operation to get a list of calendars using the <em>getCalendars()</em> method.
17221 <ExtendedAttributeList>
17222 <ExtendedAttribute name="Callback" value="FunctionOnly">
17223 <webidl>Callback</webidl>
17224 </ExtendedAttribute>
17225 <ExtendedAttribute name="NoInterfaceObject">
17226 <webidl> NoInterfaceObject</webidl>
17227 </ExtendedAttribute>
17228 </ExtendedAttributeList>
17229 <Operation name="onsuccess" id="::Calendar::CalendarArraySuccessCallback::onsuccess">
17230 <webidl> void onsuccess(<ref>Calendar</ref>[] calendars);</webidl>
17233 Called when the array of <em>Calendar </em>objects is retrieved successfully.
17239 <Type type="void"/>
17241 <Argument name="calendars">
17244 The array of <em>Calendar </em>objects.
17247 <Type type="array">
17248 <Type name="Calendar"/>
17254 <Interface name="CalendarChangeCallback" id="::Calendar::CalendarChangeCallback">
17255 <webidl> [Callback, NoInterfaceObject] interface CalendarChangeCallback {
17256 void onitemsadded(<ref>CalendarItem</ref>[] items);
17258 void onitemsupdated(<ref>CalendarItem</ref>[] items);
17260 void onitemsremoved(<ref>CalendarItemId</ref>[] ids);
17264 This interface specifies a set of methods that will be invoked every time a calendar change occurs (calendar item addition/update/removal).
17270 <ExtendedAttributeList>
17271 <ExtendedAttribute name="Callback">
17272 <webidl>Callback</webidl>
17273 </ExtendedAttribute>
17274 <ExtendedAttribute name="NoInterfaceObject">
17275 <webidl> NoInterfaceObject</webidl>
17276 </ExtendedAttribute>
17277 </ExtendedAttributeList>
17278 <Operation name="onitemsadded" id="::Calendar::CalendarChangeCallback::onitemsadded">
17279 <webidl> void onitemsadded(<ref>CalendarItem</ref>[] items);</webidl>
17282 Called when items are added to the calendar.
17288 <Type type="void"/>
17290 <Argument name="items">
17293 The list of items that were added.
17296 <Type type="array">
17297 <Type name="CalendarItem"/>
17302 <Operation name="onitemsupdated" id="::Calendar::CalendarChangeCallback::onitemsupdated">
17303 <webidl> void onitemsupdated(<ref>CalendarItem</ref>[] items);</webidl>
17306 Called when items are updated in the calendar.
17312 <Type type="void"/>
17314 <Argument name="items">
17317 The list of items that were updated.
17320 <Type type="array">
17321 <Type name="CalendarItem"/>
17326 <Operation name="onitemsremoved" id="::Calendar::CalendarChangeCallback::onitemsremoved">
17327 <webidl> void onitemsremoved(<ref>CalendarItemId</ref>[] ids);</webidl>
17330 Called when item are removed from the calendar.
17336 <Type type="void"/>
17338 <Argument name="ids">
17341 The list of identifiers for the items that were removed.
17344 <Type type="array">
17345 <Type name="CalendarItemId"/>
17352 <Module name="Callhistory" id="::Callhistory">
17353 <webidl>module Callhistory {
17354 [NoInterfaceObject] interface CallHistoryObject {
17355 readonly attribute <ref>CallHistory</ref> callhistory;
17358 <ref>Tizen</ref> implements <ref>CallHistoryObject</ref>;
17360 [NoInterfaceObject] interface RemoteParty {
17361 readonly attribute DOMString? remoteParty;
17363 readonly attribute <ref>PersonId</ref>? personId;
17367 [NoInterfaceObject] interface CallHistoryEntry {
17369 readonly attribute DOMString uid;
17371 readonly attribute DOMString type;
17373 readonly attribute DOMString[]? features;
17375 readonly attribute <ref>RemoteParty</ref>[] remoteParties;
17377 readonly attribute Date startTime;
17379 readonly attribute unsigned long duration;
17381 attribute DOMString direction;
17384 [NoInterfaceObject] interface CallHistory {
17386 void find(<ref>CallHistoryEntryArraySuccessCallback</ref> successCallback,
17387 optional <ref>ErrorCallback</ref>? errorCallback,
17388 optional <ref>AbstractFilter</ref>? filter,
17389 optional <ref>SortMode</ref>? sortMode,
17390 optional unsigned long? limit,
17391 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);
17393 void remove(<ref>CallHistoryEntry</ref> entry) raises(<ref>WebAPIException</ref>);
17395 void removeBatch(<ref>CallHistoryEntry</ref>[] entries,
17396 optional <ref>SuccessCallback</ref>? successCallback,
17397 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
17399 void removeAll(optional <ref>SuccessCallback</ref>? successCallback,
17400 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
17402 long addChangeListener(<ref>CallHistoryChangeCallback</ref> observer) raises(<ref>WebAPIException</ref>);
17404 void removeChangeListener(long handle) raises(<ref>WebAPIException</ref>);
17407 [Callback=FunctionOnly, NoInterfaceObject] interface CallHistoryEntryArraySuccessCallback {
17408 void onsuccess(<ref>CallHistoryEntry</ref>[] entries);
17411 [Callback, NoInterfaceObject]
17412 interface CallHistoryChangeCallback {
17413 void onadded(<ref>CallHistoryEntry</ref>[] newItems);
17415 void onchanged(<ref>CallHistoryEntry</ref>[] changedItems);
17417 void onremoved(DOMString[] removedItems);
17422 This API provides interfaces and methods for retrieving information from the call history.
17426 For more information on the Callhistory features, see <a href="../../org.tizen.web.appprogramming/html/guide/social_guide/call.htm">Call History Guide</a>.
17432 <def-api-feature identifier="http://tizen.org/feature/network.telephony">
17436 To guarantee this application running on a device with Telephony feature, define below in the config file:
17442 <Interface name="CallHistoryObject" id="::Callhistory::CallHistoryObject">
17443 <webidl> [NoInterfaceObject] interface CallHistoryObject {
17444 readonly attribute <ref>CallHistory</ref> callhistory;
17448 This interface defines what is instantiated by the <em>Tizen </em>object from the Tizen Platform.
17449 The <em>tizen.callhistory<em> object allows access to the CallHistory API.
17450 </em></em> </brief>
17455 <ExtendedAttributeList>
17456 <ExtendedAttribute name="NoInterfaceObject">
17457 <webidl>NoInterfaceObject</webidl>
17458 </ExtendedAttribute>
17459 </ExtendedAttributeList>
17460 <Attribute readonly="readonly" name="callhistory" id="::Callhistory::CallHistoryObject::callhistory">
17461 <webidl> readonly attribute <ref>CallHistory</ref> callhistory;</webidl>
17462 <Type name="CallHistory"/>
17465 <Implements name1="Tizen" name2="CallHistoryObject">
17466 <webidl> <ref>Tizen</ref> implements <ref>CallHistoryObject</ref>;</webidl>
17469 The CallHistory interface is available from the <em>Tizen </em>object through the <em>Window </em>object.
17476 <Interface name="RemoteParty" id="::Callhistory::RemoteParty">
17477 <webidl> [NoInterfaceObject] interface RemoteParty {
17478 readonly attribute DOMString? remoteParty;
17480 readonly attribute <ref>PersonId</ref>? personId;
17485 This interface represents remote parties.
17491 <ExtendedAttributeList>
17492 <ExtendedAttribute name="NoInterfaceObject">
17493 <webidl>NoInterfaceObject</webidl>
17494 </ExtendedAttribute>
17495 </ExtendedAttributeList>
17496 <Attribute readonly="readonly" name="remoteParty" id="::Callhistory::RemoteParty::remoteParty">
17497 <webidl> readonly attribute DOMString? remoteParty;</webidl>
17500 An attribute to store the remote party identifier (RPID).
17501 The RPID is a unique identifier used by a service with call capability. It also includes phone numbers.
17502 Contacts are also defined per service, so an RPID can be resolved to a Contact.
17503 A <var>null </var>value means that the remote is hidden (private number).
17509 <Type type="DOMString" nullable="nullable"/>
17511 <Attribute readonly="readonly" name="personId" id="::Callhistory::RemoteParty::personId">
17512 <webidl> readonly attribute <ref>PersonId</ref>? personId;</webidl>
17515 An attribute to store the identifier of the person that the raw contact belongs to.
17519 If the contact cannot be resolved, the value is <var>null</var>.
17520 See <a href="../../org.tizen.web.device.apireference/tizen/contact.html">Contact API</a> for more information.
17527 <Type name="PersonId" nullable="nullable"/>
17530 <Interface name="CallHistoryEntry" id="::Callhistory::CallHistoryEntry">
17531 <webidl> [NoInterfaceObject] interface CallHistoryEntry {
17533 readonly attribute DOMString uid;
17535 readonly attribute DOMString type;
17537 readonly attribute DOMString[]? features;
17539 readonly attribute <ref>RemoteParty</ref>[] remoteParties;
17541 readonly attribute Date startTime;
17543 readonly attribute unsigned long duration;
17545 attribute DOMString direction;
17549 This interface represents the subset of properties of calls, which become a call record in the call history after the call ends.
17555 <ExtendedAttributeList>
17556 <ExtendedAttribute name="NoInterfaceObject">
17557 <webidl>NoInterfaceObject</webidl>
17558 </ExtendedAttribute>
17559 </ExtendedAttributeList>
17560 <Attribute readonly="readonly" name="uid" id="::Callhistory::CallHistoryEntry::uid">
17561 <webidl> readonly attribute DOMString uid;</webidl>
17564 An attribute to store the unique identifier of a call record.
17570 <Type type="DOMString"/>
17572 <Attribute readonly="readonly" name="type" id="::Callhistory::CallHistoryEntry::type">
17573 <webidl> readonly attribute DOMString type;</webidl>
17576 An attribute to store the service type of the call saved to call history.
17580 The following values are the supported:
17584 TEL - for all protocols with phone number addressing (PSTN, GSM, CDMA, LTE, etc.) </li>
17586 XMPP - for generic XMPP calls </li>
17588 SIP - for generic SIP calls </li>
17595 <Type type="DOMString"/>
17597 <Attribute readonly="readonly" name="features" id="::Callhistory::CallHistoryEntry::features">
17598 <webidl> readonly attribute DOMString[]? features;</webidl>
17601 An attributes to store the features associated with the call service saved to call history.
17602 The following values are the supported:
17607 CALL - for all call types </li>
17609 VOICECALL - for voice-only calls </li>
17611 VIDEOCALL - for audio and video channel support in the call </li>
17613 EMERGENCYCALL - to denote an emergency call </li>
17620 <Type type="array" nullable="nullable">
17621 <Type type="DOMString"/>
17624 <Attribute readonly="readonly" name="remoteParties" id="::Callhistory::CallHistoryEntry::remoteParties">
17625 <webidl> readonly attribute <ref>RemoteParty</ref>[] remoteParties;</webidl>
17628 An attributes to store the remote parties participating in the call.
17634 <Type type="array">
17635 <Type name="RemoteParty"/>
17638 <Attribute readonly="readonly" name="startTime" id="::Callhistory::CallHistoryEntry::startTime">
17639 <webidl> readonly attribute Date startTime;</webidl>
17642 An attribute to store the start time of the call.
17643 This attribute is the moment when media channels come up. The exact meaning is defined by the back-end.
17649 <Type type="Date"/>
17651 <Attribute readonly="readonly" name="duration" id="::Callhistory::CallHistoryEntry::duration">
17652 <webidl> readonly attribute unsigned long duration;</webidl>
17655 An attribute to store the duration of the call in seconds.
17656 This attribute is the duration from media channels coming up to the moment when media channels tear down on the same call service.
17657 If the call is migrated to another service, another call history entry is used.
17658 The exact meaning is defined by the back-end.
17664 <Type type="unsigned long"/>
17666 <Attribute name="direction" id="::Callhistory::CallHistoryEntry::direction">
17667 <webidl> attribute DOMString direction;</webidl>
17670 An attribute to indicate whether the call was dialed, received, missed, blocked or rejected.
17671 The following values are the supported:
17676 DIALED - for dialed calls </li>
17678 RECEIVED - for received calls </li>
17680 MISSEDNEW - for missed calls not seen yet </li>
17682 MISSED - for missed calls </li>
17684 BLOCKED - for blocked calls </li>
17686 REJECTED - for rejected calls </li>
17693 <Type type="DOMString"/>
17696 <Interface name="CallHistory" id="::Callhistory::CallHistory">
17697 <webidl> [NoInterfaceObject] interface CallHistory {
17699 void find(<ref>CallHistoryEntryArraySuccessCallback</ref> successCallback,
17700 optional <ref>ErrorCallback</ref>? errorCallback,
17701 optional <ref>AbstractFilter</ref>? filter,
17702 optional <ref>SortMode</ref>? sortMode,
17703 optional unsigned long? limit,
17704 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);
17706 void remove(<ref>CallHistoryEntry</ref> entry) raises(<ref>WebAPIException</ref>);
17708 void removeBatch(<ref>CallHistoryEntry</ref>[] entries,
17709 optional <ref>SuccessCallback</ref>? successCallback,
17710 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
17712 void removeAll(optional <ref>SuccessCallback</ref>? successCallback,
17713 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
17715 long addChangeListener(<ref>CallHistoryChangeCallback</ref> observer) raises(<ref>WebAPIException</ref>);
17717 void removeChangeListener(long handle) raises(<ref>WebAPIException</ref>);
17721 This interface manages call history.
17722 Apps can read or delete call history (depending on permission).
17723 Modifying call history is allowed for certain attributes, like direction.
17724 Adding call history is owned by the back-end. Filtering is supported for all fields of <em>CallHistoryEntry</em>.
17730 <ExtendedAttributeList>
17731 <ExtendedAttribute name="NoInterfaceObject">
17732 <webidl>NoInterfaceObject</webidl>
17733 </ExtendedAttribute>
17734 </ExtendedAttributeList>
17735 <Operation name="find" id="::Callhistory::CallHistory::find">
17736 <webidl> void find(<ref>CallHistoryEntryArraySuccessCallback</ref> successCallback,
17737 optional <ref>ErrorCallback</ref>? errorCallback,
17738 optional <ref>AbstractFilter</ref>? filter,
17739 optional <ref>SortMode</ref>? sortMode,
17740 optional unsigned long? limit,
17741 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);</webidl>
17744 Finds and returns call history.
17748 The <em>errorCallback()</em> is launched with these error types:
17752 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
17754 UnknownError - If any other error occurs. </li>
17764 http://tizen.org/privilege/callhistory.read
17766 <Code> // Defines success callback
17767 function onSuccess(results) {
17768 console.log(results.length + " call history item(s) found!");
17769 for (var i=0; i<results.length; i++) {
17770 console.log(i + ". " + results[i].toString()); // process the CallHistoryEntry
17774 // Defines error callback
17775 function onError(error) {
17776 console.log("Query failed" + error.name);
17779 // Defines filter: list CS calls, most recent first
17780 var filter = new tizen.AttributeFilter("type", "EXACTLY", "TEL");
17782 // Defines sort mode: descending on call start time.
17783 var sortMode = new tizen.SortMode("startTime", "DESC");
17785 // Makes the query and wire up the callbacks
17786 tizen.callhistory.find(onSuccess,
17791 var numberfilter = new tizen.AttributeFilter(
17792 "remoteParties.remoteParty",
17793 "EXACTLY",
17794 "123456789");
17796 // Creates a composite filter for time constraints
17797 var y2009Filter = new tizen.AttributeRangeFilter(
17798 "startTime",
17799 new Date(2009, 0, 1),
17800 new Date(2010, 0, 1));
17802 var y2011Filter = new tizen.AttributeRangeFilter(
17803 "startTime",
17804 new Date(2011, 0, 1),
17805 new Date(2012, 0, 1));
17807 var datefilter = new tizen.CompositeFilter("UNION", [y2009Filter, y2011Filter]);
17809 // Creates a filter to find all video calls (including cellular, skype, etc)
17810 // The filter matches exactly any features from the "features" array
17811 var tfilter = new tizen.AttributeFilter("features", "EXACTLY", "VIDEOCALL");
17813 // Creates composite filter
17814 var ifilter = new tizen.CompositeFilter("INTERSECTION",
17815 [numberFilter, dateFilter, tfilter]);
17817 // Makes the query and wire up the callbacks; reuse sortMode
17818 tizen.callhistory.find(onSuccess,
17825 <Type type="void"/>
17827 <Argument name="successCallback">
17830 A handler for query result set.
17833 <Type name="CallHistoryEntryArraySuccessCallback"/>
17835 <Argument optional="optional" name="errorCallback">
17838 The method to call when an error occurs.
17841 <Type name="ErrorCallback" nullable="nullable"/>
17843 <Argument optional="optional" name="filter">
17846 A filter defined on <em>CallHistoryEntry </em>attributes. It can be a composite filter.
17849 <Type name="AbstractFilter" nullable="nullable"/>
17851 <Argument optional="optional" name="sortMode">
17854 The sort order in which call history are return.
17857 <Type name="SortMode" nullable="nullable"/>
17859 <Argument optional="optional" name="limit">
17862 The maximum limit of query result (It is the same meaning as SQL LIMIT).
17863 If limit is 0, query result is no limit.
17866 <Type type="unsigned long" nullable="nullable"/>
17868 <Argument optional="optional" name="offset">
17871 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.
17874 <Type type="unsigned long" nullable="nullable"/>
17878 <RaiseException name="WebAPIException">
17881 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
17884 with error type SecurityError, if this functionality is not allowed.
17887 with error type NotSupportedError, if the feature is not supported.
17893 <Operation name="remove" id="::Callhistory::CallHistory::remove">
17894 <webidl> void remove(<ref>CallHistoryEntry</ref> entry) raises(<ref>WebAPIException</ref>);</webidl>
17897 Removes a call history synchronously.
17906 http://tizen.org/privilege/callhistory.write
17908 <Code> // Defines success callback
17909 function onSuccess(results) {
17910 if (results.length > 0)
17911 tizen.callhistory.remove(results[0]);
17914 // Defines error callback
17915 function onError(error) {
17916 console.log("Query failed" + error.name);
17919 // Makes the query and wires up the callbacks
17920 tizen.callhistory.find(onSuccess, onError);
17924 <Type type="void"/>
17926 <Argument name="entry">
17929 Call history entry to be deleted.
17932 <Type name="CallHistoryEntry"/>
17936 <RaiseException name="WebAPIException">
17939 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
17942 with error type InvalidValuesError, if any input parameter contains invalid values.
17945 with error type SecurityError, if the application does not have the privilege to call this method.
17948 with error type NotSupportedError, if the feature is not supported.
17951 with error type UnknownError, if any other error occurs.
17957 <Operation name="removeBatch" id="::Callhistory::CallHistory::removeBatch">
17958 <webidl> void removeBatch(<ref>CallHistoryEntry</ref>[] entries,
17959 optional <ref>SuccessCallback</ref>? successCallback,
17960 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
17963 Removes a list of call history asynchronously.
17967 The <em>errorCallback()</em> is launched with these error types:
17971 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
17973 UnknownError - If any other error occurs. </li>
17983 http://tizen.org/privilege/callhistory.write
17985 <Code> // Defines success callback
17986 function onSuccess(results) {
17987 tizen.callhistory.removeBatch(results);
17990 // Defines error callback
17991 function onError(error) {
17992 console.log("Query failed" + error.name);
17995 // Makes the query and wires up the callbacks
17996 tizen.callhistory.find(onSuccess, onError);
18000 <Type type="void"/>
18002 <Argument name="entries">
18005 A list of call history entries to delete.
18008 <Type type="array">
18009 <Type name="CallHistoryEntry"/>
18012 <Argument optional="optional" name="successCallback">
18015 A generic success handler.
18018 <Type name="SuccessCallback" nullable="nullable"/>
18020 <Argument optional="optional" name="errorCallback">
18026 <Type name="ErrorCallback" nullable="nullable"/>
18030 <RaiseException name="WebAPIException">
18033 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
18036 with error type SecurityError, if the application does not have the privilege to call this method.
18039 with error type NotSupportedError, if this feature is not supported.
18045 <Operation name="removeAll" id="::Callhistory::CallHistory::removeAll">
18046 <webidl> void removeAll(optional <ref>SuccessCallback</ref>? successCallback,
18047 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
18050 Removes all call history asynchronously.
18054 The <em>errorCallback()</em> is launched with these error types:
18058 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
18060 UnknownError - If any other error occurs. </li>
18070 http://tizen.org/privilege/callhistory.write
18073 <Type type="void"/>
18075 <Argument optional="optional" name="successCallback">
18078 A generic success handler.
18081 <Type name="SuccessCallback" nullable="nullable"/>
18083 <Argument optional="optional" name="errorCallback">
18089 <Type name="ErrorCallback" nullable="nullable"/>
18093 <RaiseException name="WebAPIException">
18096 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
18099 with error type SecurityError, if this functionality is not allowed.
18102 with error type NotSupportedError, if this feature is not supported.
18108 <Operation name="addChangeListener" id="::Callhistory::CallHistory::addChangeListener">
18109 <webidl> long addChangeListener(<ref>CallHistoryChangeCallback</ref> observer) raises(<ref>WebAPIException</ref>);</webidl>
18112 Adds a listener to register for callback to observe call history changes.
18121 http://tizen.org/privilege/callhistory.read
18123 <Code> var onListenerCB = {
18124 onadded: function(newItems) {
18125 console.log("New Item added");
18126 for (var i in newItems) {
18127 console.log("Item " + i + " startTime: " + newItems[i].startTime);
18130 onchanged: function(changedItems) {
18131 console.log("Items changed");
18132 for (var i in changedItems) {
18133 console.log("Item " + i + " direction: " + changedItems[i].direction);
18136 onremoved: function(removedItems) {
18137 console.log("Items removed");
18138 for(var i in removedItems) {
18139 console.log("Item " + i + " : " + removedItems[i]);
18144 // Registers a call history callback
18145 var handle = tizen.callhistory.addChangeListener(onListenerCB);
18147 // Unregisters a previously registered listener
18148 tizen.callhistory.removeChangeListener(handle);
18150 console.log("Exception - code: " + error.name + " message: " + error.message);
18158 long A handle which can be used for unregistering.
18163 <Argument name="observer">
18166 A callback for handling the list of new or changed or <em>CallHistoryEntry </em>objects in the call history.
18169 <Type name="CallHistoryChangeCallback"/>
18173 <RaiseException name="WebAPIException">
18176 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
18179 with error type InvalidValuesError, if any input parameter contains invalid values.
18182 with error type SecurityError, if the application does not have the privilege to call this method.
18185 with error type NotSupportedError, if the feature is not supported.
18188 with error type UnknownError, if any other error occurs.
18194 <Operation name="removeChangeListener" id="::Callhistory::CallHistory::removeChangeListener">
18195 <webidl> void removeChangeListener(long handle) raises(<ref>WebAPIException</ref>);</webidl>
18198 Removes a listener to unregister a previously registered listener.
18207 http://tizen.org/privilege/callhistory.read
18210 <Type type="void"/>
18212 <Argument name="handle">
18215 The previously obtained listener handle.
18218 <Type type="long"/>
18222 <RaiseException name="WebAPIException">
18225 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
18228 with error type InvalidValuesError, if any input parameter contains invalid values.
18231 with error type SecurityError, if the application does not have the privilege to call this method.
18234 with error type NotSupportedError, if the feature is not supported.
18237 with error type UnknownError, if any other error occurs.
18244 <Interface name="CallHistoryEntryArraySuccessCallback" id="::Callhistory::CallHistoryEntryArraySuccessCallback">
18245 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface CallHistoryEntryArraySuccessCallback {
18246 void onsuccess(<ref>CallHistoryEntry</ref>[] entries);
18250 This is a callback interface of <em>CallHistory </em>operations.
18251 For example code, see <em>CallHistory </em>interface.
18257 <ExtendedAttributeList>
18258 <ExtendedAttribute name="Callback" value="FunctionOnly">
18259 <webidl>Callback</webidl>
18260 </ExtendedAttribute>
18261 <ExtendedAttribute name="NoInterfaceObject">
18262 <webidl> NoInterfaceObject</webidl>
18263 </ExtendedAttribute>
18264 </ExtendedAttributeList>
18265 <Operation name="onsuccess" id="::Callhistory::CallHistoryEntryArraySuccessCallback::onsuccess">
18266 <webidl> void onsuccess(<ref>CallHistoryEntry</ref>[] entries);</webidl>
18269 Called when the queries on call history have been successfully completed.
18275 <Type type="void"/>
18277 <Argument name="entries">
18280 An array of <em>CallHistoryEntry </em>objects, representing the result set of the query over the call history.
18283 <Type type="array">
18284 <Type name="CallHistoryEntry"/>
18290 <Interface name="CallHistoryChangeCallback" id="::Callhistory::CallHistoryChangeCallback">
18291 <webidl> [Callback, NoInterfaceObject]
18292 interface CallHistoryChangeCallback {
18293 void onadded(<ref>CallHistoryEntry</ref>[] newItems);
18295 void onchanged(<ref>CallHistoryEntry</ref>[] changedItems);
18297 void onremoved(DOMString[] removedItems);
18301 This is a callback interface of a<em> CallHistory </em>operations.
18302 For example code, see <em>CallHistory </em>interface.
18308 <ExtendedAttributeList>
18309 <ExtendedAttribute name="Callback">
18310 <webidl>Callback</webidl>
18311 </ExtendedAttribute>
18312 <ExtendedAttribute name="NoInterfaceObject">
18313 <webidl> NoInterfaceObject</webidl>
18314 </ExtendedAttribute>
18315 </ExtendedAttributeList>
18316 <Operation name="onadded" id="::Callhistory::CallHistoryChangeCallback::onadded">
18317 <webidl> void onadded(<ref>CallHistoryEntry</ref>[] newItems);</webidl>
18320 Called when a new call history item is added.
18326 <Type type="void"/>
18328 <Argument name="newItems">
18331 An array of <em>CallHistoryEntry </em>objects, representing the new items added to call history.
18334 <Type type="array">
18335 <Type name="CallHistoryEntry"/>
18340 <Operation name="onchanged" id="::Callhistory::CallHistoryChangeCallback::onchanged">
18341 <webidl> void onchanged(<ref>CallHistoryEntry</ref>[] changedItems);</webidl>
18344 Called when the call history have been changed.
18350 <Type type="void"/>
18352 <Argument name="changedItems">
18355 An array of <em>CallHistoryEntry </em>objects, representing the changed items in call history.
18358 <Type type="array">
18359 <Type name="CallHistoryEntry"/>
18364 <Operation name="onremoved" id="::Callhistory::CallHistoryChangeCallback::onremoved">
18365 <webidl> void onremoved(DOMString[] removedItems);</webidl>
18368 Called when the call history have been removed.
18374 <Type type="void"/>
18376 <Argument name="removedItems">
18379 An array of an uid of <em>CallHistoryEntry </em>objects, representing the removed items in call history.
18382 <Type type="array">
18383 <Type type="DOMString"/>
18390 <Module name="Contact" id="::Contact">
18391 <webidl>module Contact {
18393 typedef DOMString AddressBookId;
18395 typedef DOMString ContactId;
18397 typedef DOMString PersonId;
18399 typedef DOMString ContactGroupId;
18401 enum ContactTextFormat {"VCARD_30"};
18403 [NoInterfaceObject] interface ContactManagerObject {
18404 readonly attribute <ref>ContactManager</ref> contact;
18406 <ref>Tizen</ref> implements <ref>ContactManagerObject</ref>;
18408 [NoInterfaceObject] interface ContactManager {
18410 void getAddressBooks(<ref>AddressBookArraySuccessCallback</ref> successCallback,
18411 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18413 <ref>AddressBook</ref> getUnifiedAddressBook() raises(<ref>WebAPIException</ref>);
18415 <ref>AddressBook</ref> getDefaultAddressBook() raises(<ref>WebAPIException</ref>);
18417 <ref>AddressBook</ref> getAddressBook(<ref>AddressBookId</ref> addressBookId) raises(<ref>WebAPIException</ref>);
18419 <ref>Person</ref> get(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);
18421 void update(<ref>Person</ref> person) raises(<ref>WebAPIException</ref>);
18423 void updateBatch(<ref>Person</ref>[] persons,
18424 optional <ref>SuccessCallback</ref>? successCallback,
18425 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18427 void remove(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);
18429 void removeBatch(<ref>PersonId</ref>[] personIds,
18430 optional <ref>SuccessCallback</ref>? successCallback,
18431 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18433 void find(<ref>PersonArraySuccessCallback</ref> successCallback,
18434 optional <ref>ErrorCallback</ref>? errorCallback,
18435 optional <ref>AbstractFilter</ref>? filter,
18436 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);
18438 long addChangeListener(<ref>PersonsChangeCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);
18440 void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
18443 [NoInterfaceObject] interface AddressBook {
18445 readonly attribute <ref>AddressBookId</ref>? id;
18447 readonly attribute DOMString name;
18449 readonly attribute boolean readOnly;
18451 <ref>Contact</ref> get(<ref>ContactId</ref> id) raises(<ref>WebAPIException</ref>);
18453 void add(<ref>Contact</ref> contact) raises(<ref>WebAPIException</ref>);
18455 void addBatch(<ref>Contact</ref>[] contacts,
18456 optional <ref>ContactArraySuccessCallback</ref>? successCallback,
18457 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18459 void update(<ref>Contact</ref> contact) raises(<ref>WebAPIException</ref>);
18461 void updateBatch(<ref>Contact</ref>[] contacts,
18462 optional <ref>SuccessCallback</ref>? successCallback,
18463 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18465 void remove(<ref>ContactId</ref> id) raises(<ref>WebAPIException</ref>);
18467 void removeBatch(<ref>ContactId</ref>[] ids,
18468 optional <ref>SuccessCallback</ref>? successCallback,
18469 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18471 void find(<ref>ContactArraySuccessCallback</ref> successCallback,
18472 optional <ref>ErrorCallback</ref>? errorCallback,
18473 optional <ref>AbstractFilter</ref>? filter,
18474 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);
18476 long addChangeListener(<ref>AddressBookChangeCallback</ref> successCallback,
18477 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18479 void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
18481 <ref>ContactGroup</ref> getGroup(<ref>ContactGroupId</ref> groupId) raises(<ref>WebAPIException</ref>);
18483 void addGroup(<ref>ContactGroup</ref> group) raises(<ref>WebAPIException</ref>);
18485 void updateGroup(<ref>ContactGroup</ref> group) raises(<ref>WebAPIException</ref>);
18487 void removeGroup(<ref>ContactGroupId</ref> groupId) raises(<ref>WebAPIException</ref>);
18489 <ref>ContactGroup</ref>[] getGroups() raises(<ref>WebAPIException</ref>);
18492 [NoInterfaceObject] interface Person {
18493 readonly attribute <ref>PersonId</ref> id;
18495 readonly attribute DOMString displayName;
18497 readonly attribute long contactCount;
18499 readonly attribute boolean hasPhoneNumber;
18501 readonly attribute boolean hasEmail;
18503 attribute boolean isFavorite;
18505 attribute DOMString? photoURI;
18507 attribute DOMString? ringtoneURI;
18509 attribute <ref>ContactId</ref> displayContactId;
18511 void link(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);
18513 <ref>Person</ref> unlink(<ref>ContactId</ref> contactId) raises(<ref>WebAPIException</ref>);
18516 dictionary ContactInit {
18517 <ref>ContactName</ref> name;
18518 <ref>ContactAddress</ref>[] addresses;
18519 DOMString photoURI;
18520 <ref>ContactPhoneNumber</ref>[] phoneNumbers;
18521 <ref>ContactEmailAddress</ref>[] emails;
18523 <ref>ContactAnniversary</ref>[] anniversaries;
18524 <ref>ContactOrganization</ref>[] organizations;
18526 <ref>ContactWebSite</ref>[] urls;
18527 DOMString ringtoneURI;
18528 <ref>ContactGroupId</ref>[] groupIds;
18531 [Constructor(optional <ref>ContactInit</ref>? ContactInitDict),
18532 Constructor(DOMString stringRepresentation)]
18533 interface Contact {
18534 readonly attribute <ref>ContactId</ref>? id;
18536 readonly attribute <ref>PersonId</ref>? personId;
18538 readonly attribute <ref>AddressBookId</ref>? addressBookId;
18540 readonly attribute Date? lastUpdated;
18542 readonly attribute boolean isFavorite;
18544 attribute <ref>ContactName</ref>? name setraises(<ref>WebAPIException</ref>);
18546 attribute <ref>ContactAddress</ref>[] addresses setraises(<ref>WebAPIException</ref>);
18548 attribute DOMString? photoURI setraises(<ref>WebAPIException</ref>);
18550 attribute <ref>ContactPhoneNumber</ref>[] phoneNumbers setraises(<ref>WebAPIException</ref>);
18552 attribute <ref>ContactEmailAddress</ref>[] emails setraises(<ref>WebAPIException</ref>);
18554 attribute Date? birthday setraises(<ref>WebAPIException</ref>);
18556 attribute <ref>ContactAnniversary</ref>[] anniversaries setraises(<ref>WebAPIException</ref>);
18558 attribute <ref>ContactOrganization</ref>[] organizations setraises(<ref>WebAPIException</ref>);
18560 attribute DOMString[] notes setraises(<ref>WebAPIException</ref>);
18562 attribute <ref>ContactWebSite</ref>[] urls setraises(<ref>WebAPIException</ref>);
18564 attribute DOMString? ringtoneURI setraises(<ref>WebAPIException</ref>);
18566 attribute <ref>ContactGroupId</ref>[] groupIds setraises(<ref>WebAPIException</ref>);
18568 DOMString convertToString(optional <ref>ContactTextFormat</ref>? format) raises(<ref>WebAPIException</ref>);
18570 <ref>Contact</ref> clone() raises(<ref>WebAPIException</ref>);
18573 [Constructor(<ref>AddressBookId</ref> addressBookId, <ref>ContactId</ref> contactId)]
18574 interface ContactRef {
18575 attribute <ref>AddressBookId</ref> addressBookId;
18577 attribute <ref>ContactId</ref> contactId;
18580 dictionary ContactNameInit {
18583 DOMString firstName;
18584 DOMString middleName;
18585 DOMString lastName;
18586 DOMString[] nicknames;
18587 DOMString phoneticFirstName;
18588 DOMString phoneticLastName;
18591 [Constructor(optional <ref>ContactNameInit</ref>? nameInitDict)]
18592 interface ContactName {
18593 attribute DOMString? prefix;
18595 attribute DOMString? suffix;
18597 attribute DOMString? firstName;
18599 attribute DOMString? middleName;
18601 attribute DOMString? lastName;
18603 attribute DOMString[] nicknames;
18605 attribute DOMString? phoneticFirstName;
18607 attribute DOMString? phoneticLastName;
18609 readonly attribute DOMString? displayName;
18612 dictionary ContactOrganizationInit {
18614 DOMString department;
18620 [Constructor(optional <ref>ContactOrganizationInit</ref>? orgInitDict)]
18621 interface ContactOrganization {
18622 attribute DOMString? name;
18624 attribute DOMString? department;
18626 attribute DOMString? title;
18628 attribute DOMString? role;
18630 attribute DOMString? logoURI;
18633 [Constructor(DOMString url, optional DOMString type)]
18634 interface ContactWebSite
18636 attribute DOMString url;
18638 attribute DOMString type;
18641 [Constructor(Date date, optional DOMString? label)]
18642 interface ContactAnniversary
18644 attribute Date date;
18646 attribute DOMString? label;
18649 dictionary ContactAddressInit
18654 DOMString streetAddress;
18655 DOMString additionalInformation;
18656 DOMString postalCode;
18661 [Constructor(optional <ref>ContactAddressInit</ref>? addressInitDict)]
18662 interface ContactAddress
18664 attribute DOMString? country;
18666 attribute DOMString? region;
18668 attribute DOMString? city;
18670 attribute DOMString? streetAddress;
18672 attribute DOMString? additionalInformation;
18674 attribute DOMString? postalCode;
18676 attribute boolean isDefault;
18678 attribute DOMString[] types;
18681 [Constructor(DOMString number, optional DOMString[] types, optional boolean isDefault)]
18682 interface ContactPhoneNumber
18684 attribute DOMString number;
18686 attribute boolean isDefault;
18688 attribute DOMString[] types;
18691 [Constructor(DOMString email, optional DOMString[] types, optional boolean isDefault)]
18692 interface ContactEmailAddress
18694 attribute DOMString email;
18696 attribute boolean isDefault;
18698 attribute DOMString[] types;
18701 [Constructor(DOMString name, optional DOMString? ringtoneURI, optional DOMString? photoURI)]
18702 interface ContactGroup
18704 readonly attribute <ref>ContactGroupId</ref>? id;
18706 readonly attribute <ref>AddressBookId</ref>? addressBookId;
18708 attribute DOMString name;
18710 attribute DOMString? ringtoneURI;
18712 attribute DOMString? photoURI;
18714 readonly attribute DOMString readOnly;
18717 [Callback=FunctionOnly, NoInterfaceObject] interface PersonArraySuccessCallback {
18718 void onsuccess(<ref>Person</ref>[] persons);
18721 [Callback=FunctionOnly, NoInterfaceObject] interface ContactArraySuccessCallback {
18722 void onsuccess(<ref>Contact</ref>[] contacts);
18725 [Callback=FunctionOnly, NoInterfaceObject] interface AddressBookArraySuccessCallback {
18726 void onsuccess(<ref>AddressBook</ref>[] addressbooks);
18729 [Callback, NoInterfaceObject] interface AddressBookChangeCallback {
18730 void oncontactsadded(<ref>Contact</ref>[] contacts);
18732 void oncontactsupdated(<ref>Contact</ref>[] contacts);
18734 void oncontactsremoved(<ref>ContactId</ref>[] contactIds);
18737 [Callback, NoInterfaceObject] interface PersonsChangeCallback {
18738 void onpersonsadded(<ref>Person</ref>[] persons);
18740 void onpersonsupdated(<ref>Person</ref>[] persons);
18742 void onpersonsremoved(<ref>PersonId</ref>[] personIds);
18747 This API is for managing Address Books.
18751 A contact is a set of information that describes a contact. The contact contains information, such as phone numbers,
18752 e-mail addresses, etc.
18755 <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.
18758 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.
18761 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.
18764 For more information on the Contact features, see <a href="../../org.tizen.web.appprogramming/html/guide/social_guide/contact.htm">Contact Guide</a>.
18771 <Typedef name="AddressBookId" id="::Contact::AddressBookId">
18772 <webidl> typedef DOMString AddressBookId;</webidl>
18775 The address book identifier.
18781 <Type type="DOMString"/>
18783 <Typedef name="ContactId" id="::Contact::ContactId">
18784 <webidl> typedef DOMString ContactId;</webidl>
18787 The contact identifier.
18793 <Type type="DOMString"/>
18795 <Typedef name="PersonId" id="::Contact::PersonId">
18796 <webidl> typedef DOMString PersonId;</webidl>
18799 The person identifier.
18805 <Type type="DOMString"/>
18807 <Typedef name="ContactGroupId" id="::Contact::ContactGroupId">
18808 <webidl> typedef DOMString ContactGroupId;</webidl>
18811 The group identifier.
18817 <Type type="DOMString"/>
18819 <Enum name="ContactTextFormat" id="::Contact::ContactTextFormat">
18820 <webidl> enum ContactTextFormat {"VCARD_30"};</webidl>
18823 An enumerator that indicates the contact format that is used for export. * The possible values are:
18828 VCARD_30 - vCard v3.0 format </li>
18831 Currently, vCard v3.0 is the only format supported by the Tizen platform.
18838 <EnumValue stringvalue="VCARD_30">
18839 <webidl>"VCARD_30</webidl>
18842 <Interface name="ContactManagerObject" id="::Contact::ContactManagerObject">
18843 <webidl> [NoInterfaceObject] interface ContactManagerObject {
18844 readonly attribute <ref>ContactManager</ref> contact;
18848 Defines what is instantiated by the <em>Tizen </em>object from the Tizen Platform.
18852 There is a <em>tizen.contact </em>object that allows access to the Contact API functionality.
18859 <ExtendedAttributeList>
18860 <ExtendedAttribute name="NoInterfaceObject">
18861 <webidl>NoInterfaceObject</webidl>
18862 </ExtendedAttribute>
18863 </ExtendedAttributeList>
18864 <Attribute readonly="readonly" name="contact" id="::Contact::ContactManagerObject::contact">
18865 <webidl> readonly attribute <ref>ContactManager</ref> contact;</webidl>
18866 <Type name="ContactManager"/>
18869 <Implements name1="Tizen" name2="ContactManagerObject">
18870 <webidl> <ref>Tizen</ref> implements <ref>ContactManagerObject</ref>;</webidl>
18872 <Interface name="ContactManager" id="::Contact::ContactManager">
18873 <webidl> [NoInterfaceObject] interface ContactManager {
18875 void getAddressBooks(<ref>AddressBookArraySuccessCallback</ref> successCallback,
18876 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18878 <ref>AddressBook</ref> getUnifiedAddressBook() raises(<ref>WebAPIException</ref>);
18880 <ref>AddressBook</ref> getDefaultAddressBook() raises(<ref>WebAPIException</ref>);
18882 <ref>AddressBook</ref> getAddressBook(<ref>AddressBookId</ref> addressBookId) raises(<ref>WebAPIException</ref>);
18884 <ref>Person</ref> get(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);
18886 void update(<ref>Person</ref> person) raises(<ref>WebAPIException</ref>);
18888 void updateBatch(<ref>Person</ref>[] persons,
18889 optional <ref>SuccessCallback</ref>? successCallback,
18890 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18892 void remove(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);
18894 void removeBatch(<ref>PersonId</ref>[] personIds,
18895 optional <ref>SuccessCallback</ref>? successCallback,
18896 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18898 void find(<ref>PersonArraySuccessCallback</ref> successCallback,
18899 optional <ref>ErrorCallback</ref>? errorCallback,
18900 optional <ref>AbstractFilter</ref>? filter,
18901 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);
18903 long addChangeListener(<ref>PersonsChangeCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);
18905 void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
18909 This interface provides access to the API functionality.
18913 This interface offers a method to retrieve the address books objects.
18914 The address book objects can be manipulated with the provided functionalities to add, remove, and update the contained information.
18921 <ExtendedAttributeList>
18922 <ExtendedAttribute name="NoInterfaceObject">
18923 <webidl>NoInterfaceObject</webidl>
18924 </ExtendedAttribute>
18925 </ExtendedAttributeList>
18926 <Operation name="getAddressBooks" id="::Contact::ContactManager::getAddressBooks">
18927 <webidl> void getAddressBooks(<ref>AddressBookArraySuccessCallback</ref> successCallback,
18928 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
18931 Gets the available address books.
18935 If the operation completes successfully, the successCallback must
18936 be invoked with the phone address book and the SIM address book (if any).
18937 Other address books present in the device should also be returned.
18940 If no address book is present, the <em>successCallback</em> will be invoked with an empty array.
18943 The errorCallback is launched with these error types:
18947 InvalidValuesError - If the event given in argument is not a recurring event. </li>
18949 UnknownError - If any other error occurs while trying to get the address books. </li>
18959 http://tizen.org/privilege/contact.read
18961 <Code> var addressbook;
18963 // Define the error callback for all the asynchronous calls
18964 function errorCB(err) {
18965 console.log( 'The following error occurred: ' + err.name);
18968 function contactsFoundCB(contacts) {
18969 // The contact has been successfully found
18970 // Let's try to change the first name
18971 contacts[0].name.firstName = 'Jeffrey Ross';
18973 addressbook.update(contacts[0]);
18975 console.log( 'The following error occurred while updating: ' + err.name);
18977 console.log('First contact was updated');
18980 // Define the success callback for retrieving all the
18982 function addressBooksCB(addressbooks) {
18983 if(addressbooks.length > 0) {
18984 addressbook = addressbooks[0];
18985 console.log('The addressbook type is ' + addressbook.type +
18986 ' and name ' + addressbook.name);
18988 var contact = new tizen.Contact(
18989 {name: new tizen.ContactName({firstName:'Jeffrey',
18991 nicknames:['joey ramone']}),
18992 emails:[new tizen.ContactEmailAddress('user@domain.com')],
18993 phoneNumbers:[new tizen.ContactPhoneNumber('123456789')]});
18995 addressbook.add(contact);
18997 // The contact has been successfully added
18998 // Checks whether the added contact can be retrieved from the address book or not.
18999 // If the address book is empty, only the item added through saveContact
19000 // should be returned
19001 var filter = new tizen.AttributeFilter('name.firstName', 'CONTAINS', 'Jeffrey');
19003 addressbook.find(contactsFoundCB, errorCB, filter);
19005 console.log( 'The following error occurred while finding: ' + err.name);
19010 // Get a list of available address books.
19011 tizen.contact.getAddressBooks(addressBooksCB, errorCB);
19014 <Type type="void"/>
19016 <Argument name="successCallback">
19019 The method to call when the invocation ends successfully.
19022 <Type name="AddressBookArraySuccessCallback"/>
19024 <Argument optional="optional" name="errorCallback">
19027 The method to call when an error occurs.
19030 <Type name="ErrorCallback" nullable="nullable"/>
19034 <RaiseException name="WebAPIException">
19037 with error type TypeMismatchError, if any input parameter
19038 is not compatible with the expected type for that parameter.
19041 with error type SecurityError, if the application does not have the privilege to call this method.
19044 with error type NotSupportedError, if the feature
19051 <Operation name="getUnifiedAddressBook" id="::Contact::ContactManager::getUnifiedAddressBook">
19052 <webidl> <ref>AddressBook</ref> getUnifiedAddressBook() raises(<ref>WebAPIException</ref>);</webidl>
19055 Gets the aggregation of all address books.
19059 The unified address book is a logical address book that represents an aggregation of all address books
19060 that are obtained by getAddressBooks() and contains all contacts in the address books.
19061 Note that the unified address book does not have an address book ID
19062 and it is set to <var>null</var>.
19072 http://tizen.org/privilege/contact.read
19074 <Code> var addressbook;
19076 // Define the error callback
19077 function errorCB(err) {
19078 console.log( 'The following error occurred: ' + err.name);
19081 function contactsFoundCB(contacts) {
19082 // The contact has been successfully found
19083 // Let's try to change the first name
19084 contacts[0].name.firstName = 'Jeffrey Ross';
19086 addressbook.update(contacts[0]);
19087 console.log('First contact was updated');
19089 console.log( 'The following error occurred while updating: ' + err.name);
19093 // Get unified address book.
19094 addressbook = tizen.contact.getUnifiedAddressBook();
19096 // Add a new contact
19097 var contact = new tizen.Contact(
19098 {name: new tizen.ContactName({firstName:'Jeffrey',
19100 nicknames:['joey ramone']}),
19101 emails:[new tizen.ContactEmailAddress('user@domain.com')],
19102 phoneNumbers:[new tizen.ContactPhoneNumber('123456789')]});
19105 addressbook.add(contact);
19107 console.log( 'The following error occurred while adding: ' + err.name);
19110 // The contact has been successfully added
19111 // Let's try to check if we can retrieve the added
19112 // contact from the address book. If the address book
19113 // was empty only the item added through saveContact should
19115 var filter = new tizen.AttributeFiilter('name.firstName', 'CONTAINS', 'Jeffrey');
19117 addressbook.find(contactsFoundCB, errorCB, filter);
19119 console.log( 'The following error occurred while finding: ' + err.name);
19123 <Type name="AddressBook">
19126 AddressBook The unified AddressBook object.
19132 <RaiseException name="WebAPIException">
19135 with error type SecurityError, if the application does not have the privilege to call this method.
19138 with error type NotSupportedError, if the feature
19142 with error type UnknownError in any other error case.
19148 <Operation name="getDefaultAddressBook" id="::Contact::ContactManager::getDefaultAddressBook">
19149 <webidl> <ref>AddressBook</ref> getDefaultAddressBook() raises(<ref>WebAPIException</ref>);</webidl>
19152 Gets the default address book.
19156 The default address book is the appointed addressbook from platform or operator.
19157 This is one of addressBooks and it has the address book ID.
19160 If the operation completes successfully, it must return the
19161 default address book.
19171 http://tizen.org/privilege/contact.read
19173 <Code> var addressbook;
19175 // Define the error callback
19176 function errorCB(err) {
19177 console.log( 'The following error occurred: ' + err.name);
19180 function contactsFoundCB(contacts) {
19181 // The contact has been successfully found
19182 // Let's try to change the first name
19183 contacts[0].name.firstName = 'Jeffrey Ross';
19185 addressbook.update(contacts[0]);
19186 console.log('First contact was updated');
19188 console.log( 'The following error occurred while updating: ' + err.name);
19192 // Get default address book.
19193 addressbook = tizen.contact.getDefaultAddressBook();
19195 // Add a new contact
19196 var contact = new tizen.Contact(
19197 {name: new tizen.ContactName({firstName:'Jeffrey',
19199 nicknames:['joey ramone']}),
19200 emails:[new tizen.ContactEmailAddress('user@domain.com')],
19201 phoneNumbers:[new tizen.ContactPhoneNumber('123456789')]});
19204 addressbook.add(contact);
19206 console.log( 'The following error occurred while adding: ' + err.name);
19209 // The contact has been successfully added
19210 // Checks whether the added contact can be retrieved from the address book or not.
19211 // If the address book is empty, only the item added
19212 // through em>saveContact /em>should be returned
19213 var filter = new tizen.AttributeFiilter('name.firstName', 'CONTAINS', 'Jeffrey');
19215 addressbook.find(contactsFoundCB, errorCB, filter);
19217 console.log( 'The following error occurred while finding: ' + err.name);
19221 <Type name="AddressBook">
19224 AddressBook The default AddressBook object.
19230 <RaiseException name="WebAPIException">
19233 with error type SecurityError, if the application does not have the privilege to call this method.
19236 with error type NotSupportedError, if the feature
19240 with error type UnknownError in any other error case.
19246 <Operation name="getAddressBook" id="::Contact::ContactManager::getAddressBook">
19247 <webidl> <ref>AddressBook</ref> getAddressBook(<ref>AddressBookId</ref> addressBookId) raises(<ref>WebAPIException</ref>);</webidl>
19250 Gets the address book with the specified identifier.
19254 If the operation completes successfully, it must return the
19255 address book with the specified identifier.
19265 http://tizen.org/privilege/contact.read
19267 <Code> var contactRef; // ContactRef supposed to be initialized
19269 // Retrieves the Contact corresponding to a given ContactRef.
19270 var addressBook = tizen.contact.getAddressBook(contactRef.addressBookId);
19271 var contact = addressBook.get(contactRef.contactId);
19272 console.log("Successfully resolved contact with id: " + contactRef.contactId);
19274 console.log("Error: " + err.name);
19278 <Type name="AddressBook">
19281 AddressBook The matching AddressBook object.
19286 <Argument name="addressBookId">
19289 The address book identifier.
19292 <Type name="AddressBookId"/>
19296 <RaiseException name="WebAPIException">
19299 with error type NotFoundError, if there is no address book
19300 with the given identifier.
19303 with error type TypeMismatchError, if any input parameter
19304 is not compatible with the expected type for that parameter.
19307 with error type InvalidValuesError, if any of the input
19308 parameters contain an invalid value.
19311 with error type SecurityError, if the application does not have the privilege to call this method.
19314 with error type NotSupportedError, if the feature
19318 with error type UnknownError in any other error case.
19324 <Operation name="get" id="::Contact::ContactManager::get">
19325 <webidl> <ref>Person</ref> get(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);</webidl>
19328 Gets the person with the specified identifier.
19332 If the operation completes successfully, it must return the
19333 person with the specified identifier.
19343 http://tizen.org/privilege/contact.read
19345 <Code> var contactRef; // ContactRef supposed to be initialized
19347 // Retrieves the Person corresponding to a Contact.
19348 var addressBook = tizen.contact.getAddressBook(contactRef.addressBookId);
19349 var contact = addressBook.get(contactRef.contactId);
19350 var person = tizen.contact.get(contact.personId);
19351 console.log("Successfully resolved person with id: " + contact.personId);
19353 console.log("Error: " + err.name);
19357 <Type name="Person">
19360 Person The matching Person object.
19365 <Argument name="personId">
19368 The Person identifier.
19371 <Type name="PersonId"/>
19375 <RaiseException name="WebAPIException">
19378 with error type NotFoundError, if there is no person
19379 with the given identifier.
19382 with error type TypeMismatchError, if any input parameter
19383 is not compatible with the expected type for that parameter.
19386 with error type InvalidValuesError, if any of the input
19387 parameters contain an invalid value.
19390 with error type SecurityError, if the application does not have the privilege to call this method.
19393 with error type NotSupportedError, if the feature
19397 with error type UnknownError in any other error case.
19403 <Operation name="update" id="::Contact::ContactManager::update">
19404 <webidl> void update(<ref>Person</ref> person) raises(<ref>WebAPIException</ref>);</webidl>
19407 Updates a person in the address book synchronously.
19416 http://tizen.org/privilege/contact.write
19418 <Code> // Define the error callback
19419 function errorCB(err) {
19420 console.log( 'The following error occurred: ' + err.name);
19423 function personsFoundCB(persons) {
19424 // The person has been successfully found
19425 // Let's try to change the isFavorite attribute
19426 persons[0].isFavorite = true;
19428 tizen.contact.update(persons[0]);
19429 console.log('First person was updated');
19431 console.log( 'The following error occurred while updating: ' + err.name);
19436 tizen.contact.find(personsFoundCB, errorCB);
19438 console.log( 'The following error occurred while finding: ' + err.name);
19442 <Type type="void"/>
19444 <Argument name="person">
19447 The person object to be updated.
19450 <Type name="Person"/>
19454 <RaiseException name="WebAPIException">
19457 with error type NotFoundError, if the identifier does not match.
19460 with error type TypeMismatchError, if any input parameter
19461 is not compatible with the expected type for that parameter.
19464 with error type InvalidValuesError, if any input parameter
19465 contains invalid values.
19468 with error type SecurityError, if the application does not have the privilege to call this method.
19471 with error type NotSupportedError, if the feature
19475 with error type UnknownError, if the person could not be updated
19476 to an unknown error.
19482 <Operation name="updateBatch" id="::Contact::ContactManager::updateBatch">
19483 <webidl> void updateBatch(<ref>Person</ref>[] persons,
19484 optional <ref>SuccessCallback</ref>? successCallback,
19485 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
19488 Updates several existing persons in the contact DB asynchronously.
19492 The <em>errorCallback()</em> is launched with these error types:
19496 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>
19498 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
19500 UnknownError - If any other error occurs, while trying to add the persons. </li>
19503 If the details of any persons cannot be updated, the error callback function that was passed in the invocation will be called.
19513 http://tizen.org/privilege/contact.write
19515 <Code> // Define the error callback for all the asynchronous calls
19516 function errorCB(err) {
19517 console.log('The following error occurred: ' + err.name);
19520 function personsUpdatedCB() {
19521 console.log('Contacts were updated');
19524 function personsFoundCB(persons) {
19525 // The person has been successfully found
19526 for(var i = 0; i < persons.length; i++) {
19527 persons[i].isFavorite = true;
19530 tizen.contact.updateBatch(persons, personsUpdatedCB, errorCB);
19532 console.log('The following error occurred while updating: ' + err.name);
19537 tizen.contact.find(personsFoundCB, errorCB);
19539 console.log('The following error occurred while finding: ' + err.name);
19543 <Type type="void"/>
19545 <Argument name="persons">
19548 A list of Person objects to be saved in the terminal storage.
19551 <Type type="array">
19552 <Type name="Person"/>
19555 <Argument optional="optional" name="successCallback">
19558 The method to call when the invocation ends successfully.
19561 <Type name="SuccessCallback" nullable="nullable"/>
19563 <Argument optional="optional" name="errorCallback">
19566 The method to call when the request to update the details of a person fail.
19569 <Type name="ErrorCallback" nullable="nullable"/>
19573 <RaiseException name="WebAPIException">
19576 with error type TypeMismatchError, if the input parameter
19577 is not compatible with the expected type for that parameter.
19580 with error type SecurityError, if the application does not have the privilege to call this method.
19583 with error type NotSupportedError, if this feature is not supported.
19589 <Operation name="remove" id="::Contact::ContactManager::remove">
19590 <webidl> void remove(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);</webidl>
19593 Removes a person from the contact DB synchronously.
19597 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.
19607 http://tizen.org/privilege/contact.write
19609 <Code> // Define the error callback
19610 function errorCB(err) {
19611 console.log('The following error occurred: ' + err.name);
19614 function personsFoundCB(persons) {
19615 // The person has been successfully found
19616 if(persons.length > 0) {
19618 tizen.contact.remove(persons[0].id);
19619 console.log('First person was removed');
19621 console.log('The following error occurred while removing: ' + err.name);
19624 console.log( 'No persons.');
19629 tizen.contact.find(personsFoundCB, errorCB);
19631 console.log( 'The following error occurred while finding: ' + err.name);
19635 <Type type="void"/>
19637 <Argument name="personId">
19640 An identifier (ID attribute) of the Person object to delete.
19643 <Type name="PersonId"/>
19647 <RaiseException name="WebAPIException">
19650 with error type NotFoundError, if the identifier does not match
19654 with error type TypeMismatchError, if any input parameter
19655 is not compatible with the expected type for that parameter.
19658 with error type InvalidValuesError, if any input parameter
19659 contains invalid values.
19662 with error type SecurityError, if the application does not have the privilege to call this method.
19665 with error type NotSupportedError, if the feature
19669 with error type UnknownError, if the person could not be removed
19670 to an unknown error.
19676 <Operation name="removeBatch" id="::Contact::ContactManager::removeBatch">
19677 <webidl> void removeBatch(<ref>PersonId</ref>[] personIds,
19678 optional <ref>SuccessCallback</ref>? successCallback,
19679 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
19682 Removes persons from contact DB asynchronously.
19686 Removes the persons that correspond to the specified identifiers as well as the contacts related to them.
19689 The <em>errorCallback() </em>is launched with these error types:
19693 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>
19695 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
19697 UnknownError - If any other error occurs while trying to remove the persons. </li>
19707 http://tizen.org/privilege/contact.write
19709 <Code> // Define the error callback
19710 function errorCB(err) {
19711 console.log( 'The following error occurred: ' + err.name);
19714 function personsRemovedCB() {
19715 console.log('Contacts were removed');
19718 function personsFoundCB(persons) {
19719 // The person has been successfully found
19720 if(persons.length > 2) {
19722 tizen.contact.removeBatch([persons[0].id, persons[1].id], personsRemovedCB, errorCB);
19724 console.log( 'The following error occurred while removing: ' + err.name);
19727 console.log( 'Not enough persons.');
19732 tizen.contact.find(personsFoundCB, errorCB);
19734 console.log( 'The following error occurred while finding: ' + err.name);
19738 <Type type="void"/>
19740 <Argument name="personIds">
19743 A list of identifiers (id attribute) for the Person objects to delete.
19746 <Type type="array">
19747 <Type name="PersonId"/>
19750 <Argument optional="optional" name="successCallback">
19753 The method to call when the invocation ends successfully.
19756 <Type name="SuccessCallback" nullable="nullable"/>
19758 <Argument optional="optional" name="errorCallback">
19761 The method to call when the request to delete persons fails.
19764 <Type name="ErrorCallback" nullable="nullable"/>
19768 <RaiseException name="WebAPIException">
19771 with error type TypeMismatchError, if any input parameter
19772 is not compatible with the expected type for that parameter.
19775 with error type SecurityError, if the application does not have the privilege to call this method.
19778 with error type NotSupportedError, if the feature
19785 <Operation name="find" id="::Contact::ContactManager::find">
19786 <webidl> void find(<ref>PersonArraySuccessCallback</ref> successCallback,
19787 optional <ref>ErrorCallback</ref>? errorCallback,
19788 optional <ref>AbstractFilter</ref>? filter,
19789 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);</webidl>
19792 Gets an array of all <em>Person </em>objects from the contact DB or the ones that match the optionally supplied filter.
19796 If the filter is passed and contains valid values, only those values in the
19797 address book that match the filter criteria as specified in the AbstractFilter
19798 interface will be returned in the successCallback. If no filter is passed, the filter
19799 contains any invalid values, the filter is <var>null </var> or undefined, then
19800 the implementation must return the full list of contact items
19801 in the successCallback. If no persons are available in the contact DB or no
19802 person matches the filter criteria, the successCallback will be invoked
19803 with an empty array.
19806 The <em>errorCallback() </em>is launched with these error types:
19810 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
19812 UnknownError - If any other error occurs while trying to retrieve the persons. </li>
19822 http://tizen.org/privilege/contact.read
19824 <Code> // Define the error callback.
19825 function errorCB(err) {
19826 console.log( 'The following error occurred: ' + err.name);
19829 // Define the person search success callback.
19830 function personsFoundCB(persons) {
19831 console.log(persons.length + ' results found.');
19834 // Finds all the persons in the contact DB that have the word Ramone in their display name
19835 var filter = new tizen.AttributeFilter('displayName', 'CONTAINS', 'Ramone');
19837 // The persons returned by the find() query will be sorted in the ascending order of their display name.
19838 var sortingMode = new tizen.SortMode('displayName', 'ASC');
19840 tizen.contact.find(personsFoundCB, errorCB,
19841 filter, sortingMode);
19843 console.log( 'The following error occurred while finding: ' + err.name);
19847 <Type type="void"/>
19849 <Argument name="successCallback">
19852 The method to call when the invocation ends successfully.
19855 <Type name="PersonArraySuccessCallback"/>
19857 <Argument optional="optional" name="errorCallback">
19860 The method to call when an error occurs.
19863 <Type name="ErrorCallback" nullable="nullable"/>
19865 <Argument optional="optional" name="filter">
19868 A filter to select which persons are returned.
19871 <Type name="AbstractFilter" nullable="nullable"/>
19873 <Argument optional="optional" name="sortMode">
19876 A variable to determine the sort order in which the persons are returned.
19879 <Type name="SortMode" nullable="nullable"/>
19883 <RaiseException name="WebAPIException">
19886 with error type TypeMismatchError, if any input parameter
19887 is not compatible with the expected type for that parameter.
19890 with error type SecurityError, if the application does not have the privilege to call this method.
19893 with error type NotSupportedError, if the feature
19900 <Operation name="addChangeListener" id="::Contact::ContactManager::addChangeListener">
19901 <webidl> long addChangeListener(<ref>PersonsChangeCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);</webidl>
19904 Subscribes to receive notifications about persons' changes.
19908 When executed, the implementation must immediately return a subscription identifier that identifies
19909 the watch operation. After returning the identifier, the watch operation is started
19920 http://tizen.org/privilege/contact.read
19922 <Code> var watcherId = 0; // watcher identifier
19925 onpersonsadded: function(persons) {
19926 console.log(persons.length + ' persons were added');
19928 onpersonsupdated: function(persons) {
19929 console.log(persons.length + ' persons were updated');
19931 onpersonsremoved: function(ids) {
19932 console.log(ids.length + ' persons were deleted');
19936 // registers to be notified when the persons' changes
19937 watcherId = tizen.contact.addChangeListener(watcher);
19943 long Identifier used to clear the watch subscription.
19948 <Argument name="successCallback">
19951 Contains the methods for different types of change notifications.
19954 <Type name="PersonsChangeCallback"/>
19958 <RaiseException name="WebAPIException">
19961 with error type TypeMismatchError, if any input parameter
19962 is not compatible with the expected type for that parameter.
19965 with error type InvalidValuesError, if any of the input parameters
19966 contain an invalid value.
19969 with error type SecurityError, if the application does not have the privilege to call this method.
19972 with error type NotSupportedError, if the feature
19976 with error type UnknownError in any other case.
19982 <Operation name="removeChangeListener" id="::Contact::ContactManager::removeChangeListener">
19983 <webidl> void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);</webidl>
19986 Unsubscribes a persons' changes watch operation.
19990 If the watchId argument is valid and corresponds to a subscription already in
19991 place, the watch process must immediately stop and no further callbacks MUST be
19992 invoked. If the watchId argument is not valid or does not correspond to a
19993 valid subscription, the method should return without any further action.
20003 http://tizen.org/privilege/contact.read
20005 <Code> var watcherId = 0; // watcher identifier
20007 // Receives persons' changes
20009 onpersonsadded: function(persons) {
20010 console.log(persons.length + ' persons were added');
20012 onpersonsupdated: function(persons) {
20013 console.log(persons.length + ' persons were updated');
20015 onpersonsremoved: function(ids) {
20016 console.log(ids.length + ' persons were removed');
20020 // Cancel the watch operation
20021 function cancelWatch() {
20022 tizen.contact.removeChangeListener(watcherId);
20025 // registers to be notified when the persons' changes
20026 watcherId = tizen.contact.addChangeListener(watcher);
20029 <Type type="void"/>
20031 <Argument name="watchId">
20034 A subscription Identifier.
20037 <Type type="long"/>
20041 <RaiseException name="WebAPIException">
20044 with error type TypeMismatchError, if any input parameter
20045 is not compatible with the expected type for that parameter.
20048 with error type InvalidValuesError, if any of the input
20049 parameters contain an invalid value.
20052 with error type NotFoundError, if there is no listener
20053 with the given identifier.
20056 with error type SecurityError, if the application does not have the privilege to call this method.
20059 with error type NotSupportedError, if the feature
20063 with error type UnknownError in any other error case.
20070 <Interface name="AddressBook" id="::Contact::AddressBook">
20071 <webidl> [NoInterfaceObject] interface AddressBook {
20073 readonly attribute <ref>AddressBookId</ref>? id;
20075 readonly attribute DOMString name;
20077 readonly attribute boolean readOnly;
20079 <ref>Contact</ref> get(<ref>ContactId</ref> id) raises(<ref>WebAPIException</ref>);
20081 void add(<ref>Contact</ref> contact) raises(<ref>WebAPIException</ref>);
20083 void addBatch(<ref>Contact</ref>[] contacts,
20084 optional <ref>ContactArraySuccessCallback</ref>? successCallback,
20085 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
20087 void update(<ref>Contact</ref> contact) raises(<ref>WebAPIException</ref>);
20089 void updateBatch(<ref>Contact</ref>[] contacts,
20090 optional <ref>SuccessCallback</ref>? successCallback,
20091 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
20093 void remove(<ref>ContactId</ref> id) raises(<ref>WebAPIException</ref>);
20095 void removeBatch(<ref>ContactId</ref>[] ids,
20096 optional <ref>SuccessCallback</ref>? successCallback,
20097 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
20099 void find(<ref>ContactArraySuccessCallback</ref> successCallback,
20100 optional <ref>ErrorCallback</ref>? errorCallback,
20101 optional <ref>AbstractFilter</ref>? filter,
20102 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);
20104 long addChangeListener(<ref>AddressBookChangeCallback</ref> successCallback,
20105 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
20107 void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
20109 <ref>ContactGroup</ref> getGroup(<ref>ContactGroupId</ref> groupId) raises(<ref>WebAPIException</ref>);
20111 void addGroup(<ref>ContactGroup</ref> group) raises(<ref>WebAPIException</ref>);
20113 void updateGroup(<ref>ContactGroup</ref> group) raises(<ref>WebAPIException</ref>);
20115 void removeGroup(<ref>ContactGroupId</ref> groupId) raises(<ref>WebAPIException</ref>);
20117 <ref>ContactGroup</ref>[] getGroups() raises(<ref>WebAPIException</ref>);
20121 This interface provides methods to manage an address book.
20125 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:
20129 <em>get()</em> - To get contacts that have a specific ID </li>
20131 <em>find()</em> - To find contacts using filters </li>
20133 <em>add() </em>or <em>addBatch()</em> - To add contacts to a specific address book </li>
20135 <em>update() </em>or <em>updateBatch()</em> - To update contacts in a specific address book </li>
20137 <em>remove() </em>or <em>removeBatch() </em> - To remove existing contacts </li>
20139 <em>addChangeListener() </em>or <em>removeChangeListener() </em> - To watch for address book changes </li>
20142 This interface also offers methods to manipulate groups within the address book, such as:
20146 <em>getGroup()</em> - To get a group having specific ID </li>
20148 <em>getGroups()</em> - To get groups in a specific address book </li>
20150 <em>addGroup() </em> - To add groups to a specific address book </li>
20152 <em>updateGroup() </em> - To update groups in a specific address book </li>
20154 <em>removeGroup() </em> - To remove existing groups </li>
20161 <ExtendedAttributeList>
20162 <ExtendedAttribute name="NoInterfaceObject">
20163 <webidl>NoInterfaceObject</webidl>
20164 </ExtendedAttribute>
20165 </ExtendedAttributeList>
20166 <Attribute readonly="readonly" name="id" id="::Contact::AddressBook::id">
20167 <webidl> readonly attribute <ref>AddressBookId</ref>? id;</webidl>
20170 An attribute to uniquely identify the address book.
20174 The value of this attribute shall be <var>null </var> if the address book
20175 is the unified address book.
20182 <Type name="AddressBookId" nullable="nullable"/>
20184 <Attribute readonly="readonly" name="name" id="::Contact::AddressBook::name">
20185 <webidl> readonly attribute DOMString name;</webidl>
20188 The address book descriptive name.
20194 <Type type="DOMString"/>
20196 <Attribute readonly="readonly" name="readOnly" id="::Contact::AddressBook::readOnly">
20197 <webidl> readonly attribute boolean readOnly;</webidl>
20200 An attribute to indicate if the address book is read-only.
20204 Some on line address books cannot be edited and will have this
20205 flag set to <var>true</var>.
20212 <Type type="boolean"/>
20214 <Operation name="get" id="::Contact::AddressBook::get">
20215 <webidl> <ref>Contact</ref> get(<ref>ContactId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
20218 Gets the contact with the specified identifier.
20222 If the operation completes successfully, it must return the
20223 contact with the specified identifier.
20233 http://tizen.org/privilege/contact.read
20235 <Code> var contactRef; // ContactRef supposed to be initialized
20237 // Retrieves the Contact corresponding to a given ContactRef.
20238 var addressBook = tizen.contact.getAddressBook(contactRef.addressBookId);
20239 var contact = addressBook.get(contactRef.contactId);
20240 console.log("Successfully resolved contact with id: " + contactRef.contactId);
20242 console.log("Error: " + err.name);
20246 <Type name="Contact">
20249 Contact The matching Contact object.
20254 <Argument name="id">
20257 A contact identifier.
20260 <Type name="ContactId"/>
20264 <RaiseException name="WebAPIException">
20267 with error type NotFoundError, if there is no contact
20268 with the given identifier.
20271 with error type TypeMismatchError, if any input parameter
20272 is not compatible with the expected type for that parameter.
20275 with error type InvalidValuesError, if any of the input
20276 parameters contain an invalid value.
20279 with error type SecurityError, if the application does not have the privilege to call this method.
20282 with error type NotSupportedError, if the feature
20286 with error type UnknownError in any other error case.
20292 <Operation name="add" id="::Contact::AddressBook::add">
20293 <webidl> void add(<ref>Contact</ref> contact) raises(<ref>WebAPIException</ref>);</webidl>
20296 Adds a contact to the address book synchronously.
20300 If the contact is successfully inserted in the addressbook, the Contact object
20301 will have its identifier (id attribute) set when the function returns.
20302 This operation is done successfully, new person object is also generated automatically.
20305 If you wish to update an
20306 existing contact, call the update() method instead. If you wish to add a copy
20307 of an existing Contact object, call Contact.clone() method first and pass the
20308 clone to the add() method.
20311 The contact shall be added to default address book if the address book
20312 is the unified address book.
20322 http://tizen.org/privilege/contact.write
20324 <Code> var addressbook;
20326 // Get default address book
20327 addressbook = tizen.contact.getDefaultAddressBook();
20330 var contact = new tizen.Contact({name: new tizen.ContactName({firstName:'Jeffrey',
20332 nicknames:['joey ramone']}),
20333 emails:[new tizen.ContactEmailAddress('user@domain.com')],
20334 phoneNumbers:[new tizen.ContactPhoneNumber('123456789')]});
20335 addressbook.add(contact);
20336 console.log('Contact added with id ' + contact.id);
20338 console.log( 'The following error occurred while adding: ' + err.name);
20342 <Type type="void"/>
20344 <Argument name="contact">
20347 A contact to be added.
20350 <Type name="Contact"/>
20354 <RaiseException name="WebAPIException">
20357 with error type TypeMismatchError, if any input parameter
20358 is not compatible with the expected type for that parameter.
20361 with error type InvalidValuesError, if any input parameter
20362 contains invalid values.
20365 with error type SecurityError, if the application does not have the privilege to call this method.
20368 with error type NotSupportedError, if the feature
20372 with error type UnknownError, if any other error occurs while trying to insert the contact.
20378 <Operation name="addBatch" id="::Contact::AddressBook::addBatch">
20379 <webidl> void addBatch(<ref>Contact</ref>[] contacts,
20380 optional <ref>ContactArraySuccessCallback</ref>? successCallback,
20381 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
20384 Adds several contacts to the address book asynchronously.
20388 If all the contacts are successfully added to the address book,
20389 the success callback will be invoked, passing the list of Contact objects
20390 that were added, with their identifier set (id attribute).
20393 The <em>errorCallback()</em> is launched with these error types:
20397 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>
20399 UnknownError - If any other error occurs, while trying to add the contacts. </li>
20402 If you wish to update an
20403 existing contact, call the update() method instead. If you wish to add a copy
20404 of an existing Contact object, call Contact.clone() method first and pass the
20405 clone to the add() method.
20408 If any of the contacts cannot be added, the error callback
20409 function that was passed in the invocation will be called.
20412 The contacts shall be added to local phone address book if the address book
20413 is the default address book.
20423 http://tizen.org/privilege/contact.write
20425 <Code> var addressbook;
20427 // Define the error callback
20428 function errorCB(err) {
20429 console.log( 'The following error occurred: ' + err.name);
20432 // Define the add contact success callback
20433 function contactsAddedCB(contacts) {
20434 console.log( contacts.length + ' contact(s) were successfully added to an Address Book' );
20437 // Get default address book
20438 addressbook = tizen.contact.getDefaultAddressBook();
20440 var c1 = new tizen.Contact({name: new tizen.ContactName({firstName:'Jeffrey',
20442 nicknames:['joey ramone']}),
20443 emails:[new tizen.ContactEmailAddress('user1@domain.com')],
20444 phoneNumbers:[new tizen.ContactPhoneNumber('123456789')]});
20446 var c2 = new tizen.Contact({name: new tizen.ContactName({firstName:'Elton',
20448 nicknames:['El']}),
20449 emails:[new tizen.ContactEmailAddress('user2@domain.com')],
20450 phoneNumbers:[new tizen.ContactPhoneNumber('987654321')]});
20453 addressbook.addBatch([c1, c2], contactsAddedCB, errorCB);
20455 console.log( 'The following error occurred while adding: ' + err.name);
20459 <Type type="void"/>
20461 <Argument name="contacts">
20464 A list of contacts to add.
20467 <Type type="array">
20468 <Type name="Contact"/>
20471 <Argument optional="optional" name="successCallback">
20474 The method to call when the invocation ends successfully.
20477 <Type name="ContactArraySuccessCallback" nullable="nullable"/>
20479 <Argument optional="optional" name="errorCallback">
20482 The method to call when the request fails.
20485 <Type name="ErrorCallback" nullable="nullable"/>
20489 <RaiseException name="WebAPIException">
20492 with error type TypeMismatchError, if the input parameter
20493 is not compatible with the expected type for that parameter.
20496 with error type SecurityError, if the application does not have the privilege to call this method.
20499 with error type NotSupportedError, if this feature is not supported.
20505 <Operation name="update" id="::Contact::AddressBook::update">
20506 <webidl> void update(<ref>Contact</ref> contact) raises(<ref>WebAPIException</ref>);</webidl>
20509 Updates a contact in the address book synchronously.
20518 http://tizen.org/privilege/contact.write
20520 <Code> var addressbook;
20522 // Define the error callback
20523 function errorCB(err) {
20524 console.log( 'The following error occurred: ' + err.name);
20527 function contactsFoundCB(contacts) {
20528 // The contact has been successfully found
20529 // Let's try to change the first name
20530 contacts[0].name.firstName = 'Christopher';
20532 addressbook.update(contacts[0]);
20533 console.log('First contact was updated');
20535 console.log( 'The following error occurred while updating: ' + err.name);
20539 // Get default address book.
20540 addressbook = tizen.contact.getDefaultAddressBook();
20542 var filter = new tizen.AttributeFilter('name.firstName', 'CONTAINS', 'Chris');
20544 addressbook.find(contactsFoundCB, errorCB, filter);
20546 console.log( 'The following error occurred while finding: ' + err.name);
20550 <Type type="void"/>
20552 <Argument name="contact">
20555 A contact object to update.
20558 <Type name="Contact"/>
20562 <RaiseException name="WebAPIException">
20565 with error type NotFoundError, if the identifier does not match.
20568 with error type TypeMismatchError, if any input parameter
20569 is not compatible with the expected type for that parameter.
20572 with error type InvalidValuesError, if any input parameter
20573 contains invalid values.
20576 with error type SecurityError, if the application does not have the privilege to call this method.
20579 with error type NotSupportedError, if the feature
20583 with error type UnknownError, if the contact could not be updated
20584 to an unknown error.
20590 <Operation name="updateBatch" id="::Contact::AddressBook::updateBatch">
20591 <webidl> void updateBatch(<ref>Contact</ref>[] contacts,
20592 optional <ref>SuccessCallback</ref>? successCallback,
20593 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
20596 Updates several existing contacts in the address book asynchronously.
20600 The <em>errorCallback()</em> is launched with these error types:
20604 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>
20606 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
20608 UnknownError - If any other error occurs, while trying to add the contacts. </li>
20611 If any of the contacts could not be updated, the error callback
20612 function that was passed in the invocation will be called.
20622 http://tizen.org/privilege/contact.write
20624 <Code> var addressbook;
20626 // Define the error callback for all the asynchronous calls
20627 function errorCB(err) {
20628 console.log('The following error occurred: ' + err.name);
20631 function contactsUpdatedCB() {
20632 console.log('Contacts were updated');
20635 function contactsFoundCB(contacts) {
20636 // The contact has been successfully found
20637 for(var i = 0; i < contacts.length; i++) {
20638 contacts[i].name.firstName = 'Christopher';
20641 addressbook.updateBatch(contacts, contactsUpdatedCB, errorCB);
20643 console.log('The following error occurred while updating: ' + err.name);
20647 // Get default address book.
20648 addressbook = tizen.contact.getDefaultAddressBook();
20650 var filter = new tizen.AttributeFilter('name.firstName', 'CONTAINS', 'Chris');
20652 addressbook.find(contactsFoundCB, errorCB, filter);
20654 console.log('The following error occurred while finding: ' + err.name);
20658 <Type type="void"/>
20660 <Argument name="contacts">
20663 A list of contact objects to be saved in the terminal storage.
20666 <Type type="array">
20667 <Type name="Contact"/>
20670 <Argument optional="optional" name="successCallback">
20673 The method to call when the invocation ends successfully.
20676 <Type name="SuccessCallback" nullable="nullable"/>
20678 <Argument optional="optional" name="errorCallback">
20681 The method to call when the request to update contacts fails.
20684 <Type name="ErrorCallback" nullable="nullable"/>
20688 <RaiseException name="WebAPIException">
20691 with error type TypeMismatchError, if the input parameter
20692 is not compatible with the expected type for that parameter.
20695 with error type SecurityError, if the application does not have the privilege to call this method.
20698 with error type NotSupportedError, if this feature is not supported.
20704 <Operation name="remove" id="::Contact::AddressBook::remove">
20705 <webidl> void remove(<ref>ContactId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
20708 Removes a contact from the address book synchronously.
20712 Removes the contact in the address book that corresponds to the specified
20713 identifier. This function will throw an exception if it failed to
20714 remove the specified contact.
20724 http://tizen.org/privilege/contact.write
20726 <Code> var addressbook;
20728 // Define the error callback
20729 function errorCB(err) {
20730 console.log('The following error occurred: ' + err.name);
20733 function contactsFoundCB(contacts) {
20734 // The contact has been successfully found
20735 if(contacts.length > 0) {
20737 addressbook.remove(contacts[0].id);
20738 console.log('First contact was removed');
20740 console.log('The following error occurred while removing: ' + err.name);
20743 console.log( 'No contacts.');
20747 // Get default address book.
20748 addressbook = tizen.contact.getDefaultAddressBook();
20750 var filter = new tizen.AttributeFilter('name.firstName', 'CONTAINS', 'Chris');
20752 addressbook.find(contactsFoundCB, errorCB, filter);
20754 console.log( 'The following error occurred while finding: ' + err.name);
20758 <Type type="void"/>
20760 <Argument name="id">
20763 An identifier (id attribute) of the contact object to delete.
20766 <Type name="ContactId"/>
20770 <RaiseException name="WebAPIException">
20773 with error type NotFoundError, if the identifier does not match
20774 any contact in the address book.
20777 with error type TypeMismatchError, if any input parameter
20778 is not compatible with the expected type for that parameter.
20781 with error type InvalidValuesError, if any input parameter
20782 contains invalid values.
20785 with error type SecurityError, if the application does not have the privilege to call this method.
20788 with error type NotSupportedError, if the feature
20792 with error type UnknownError, if the contact could not be removed
20793 to an unknown error.
20799 <Operation name="removeBatch" id="::Contact::AddressBook::removeBatch">
20800 <webidl> void removeBatch(<ref>ContactId</ref>[] ids,
20801 optional <ref>SuccessCallback</ref>? successCallback,
20802 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
20805 Removes several contacts from the address book asynchronously.
20809 The <em>errorCallback()</em> is launched with these error types:
20813 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>
20815 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
20817 UnknownError - If any other error occurs while trying to remove the contacts. </li>
20827 http://tizen.org/privilege/contact.write
20829 <Code> var addressbook;
20831 // Define the error callback
20832 function errorCB(err) {
20833 console.log( 'The following error occurred: ' + err.name);
20836 function contactsRemovedCB() {
20837 console.log('Contacts were removed');
20840 function contactsFoundCB(contacts) {
20841 // The contact has been successfully found
20842 if(contacts.length > 2) {
20844 addressbook.removeBatch([contacts[0].id, contacts[1].id], contactsRemovedCB, errorCB);
20846 console.log( 'The following error occurred while removing: ' + err.name);
20849 console.log( 'Not enough contacts.');
20853 // Get default address book.
20854 addressbook = tizen.contact.getDefaultAddressBook();
20856 var filter = new tizen.AttributeFilter('name.firstName', 'CONTAINS', 'Chris');
20858 addressbook.find(contactsFoundCB, errorCB, filter);
20860 console.log( 'The following error occurred while finding: ' + err.name);
20864 <Type type="void"/>
20866 <Argument name="ids">
20869 A list of identifiers (id attribute) for the contact objects to be deleted.
20872 <Type type="array">
20873 <Type name="ContactId"/>
20876 <Argument optional="optional" name="successCallback">
20879 The method to call when the invocation ends successfully.
20882 <Type name="SuccessCallback" nullable="nullable"/>
20884 <Argument optional="optional" name="errorCallback">
20887 The method to call when the request to delete contacts fails.
20890 <Type name="ErrorCallback" nullable="nullable"/>
20894 <RaiseException name="WebAPIException">
20897 with error type TypeMismatchError, if any input parameter
20898 is not compatible with the expected type for that parameter.
20901 with error type SecurityError, if the application does not have the privilege to call this method.
20904 with error type NotSupportedError, if the feature
20911 <Operation name="find" id="::Contact::AddressBook::find">
20912 <webidl> void find(<ref>ContactArraySuccessCallback</ref> successCallback,
20913 optional <ref>ErrorCallback</ref>? errorCallback,
20914 optional <ref>AbstractFilter</ref>? filter,
20915 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);</webidl>
20918 Finds an array of all Contact objects from the specified address book or an array of
20919 Contact objects that match the optionally supplied filter.
20923 If the filter is passed and contains valid values, only those values in the
20924 address book that match the filter criteria as specified in the AbstractFilter
20925 interface will be returned in the successCallback. If no filter is passed, the filter
20926 contains any invalid values, the filter is <var>null</var> or undefined, then
20927 the implementation MUST return the full list of contact items
20928 in the successCallback. If no contacts are available in the address book or no
20929 contact matches the filter criteria, the successCallback will be invoked
20930 with an empty array.
20933 The <em>errorCallback() </em>is launched with these error types:
20937 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
20939 UnknownError - If any other error occurs while trying to retrieve the contacts. </li>
20949 http://tizen.org/privilege/contact.read
20951 <Code> var addressbook;
20953 // Define the error callback.
20954 function errorCB(err) {
20955 console.log( 'The following error occurred: ' + err.name);
20958 // Define the contact search success callback.
20959 function contactsFoundCB(contacts) {
20960 console.log(contacts.length + ' results found.');
20963 // Get default address book
20964 addressbook = tizen.contact.getDefaultAddressBook();
20966 // Find all contacts in the address book that have "Ramone" in the nick name.
20967 var filter = new tizen.AttributeFilter('name.nicknames', 'CONTAINS', 'Ramone');
20969 // The contacts returned by the find() query will be sorted by
20970 // ascending last name.
20971 var sortingMode = new tizen.SortMode('name.lastName', 'ASC');
20973 addressbook.find(contactsFoundCB, errorCB,
20974 filter, sortingModes);
20976 console.log( 'The following error occurred while finding: ' + err.name);
20980 <Type type="void"/>
20982 <Argument name="successCallback">
20985 The method to call when the invocation ends successfully.
20988 <Type name="ContactArraySuccessCallback"/>
20990 <Argument optional="optional" name="errorCallback">
20993 The method to call when an error occurs.
20996 <Type name="ErrorCallback" nullable="nullable"/>
20998 <Argument optional="optional" name="filter">
21001 A filter used to select which contacts are returned.
21004 <Type name="AbstractFilter" nullable="nullable"/>
21006 <Argument optional="optional" name="sortMode">
21009 A variable to determine the sort order in which the contacts are returned.
21012 <Type name="SortMode" nullable="nullable"/>
21016 <RaiseException name="WebAPIException">
21019 with error type TypeMismatchError, if any input parameter
21020 is not compatible with the expected type for that parameter.
21023 with error type SecurityError, if the application does not have the privilege to call this method.
21026 with error type NotSupportedError, if the feature
21033 <Operation name="addChangeListener" id="::Contact::AddressBook::addChangeListener">
21034 <webidl> long addChangeListener(<ref>AddressBookChangeCallback</ref> successCallback,
21035 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
21038 Subscribes to receive notifications about address book changes.
21042 When executed, the implementation must immediately return a subscription identifier that identifies
21043 the watch operation. After returning the identifier, the watch operation is started
21054 http://tizen.org/privilege/contact.read
21056 <Code> var watcherId = 0; // watcher identifier
21057 var addressbook; // This example assumes addressbook is initialized
21060 oncontactsadded: function(contacts) {
21061 console.log(contacts.length + ' contacts were added');
21063 oncontactsupdated: function(contacts) {
21064 console.log(contacts.length + ' contacts were updated');
21066 oncontactsremoved: function(ids) {
21067 console.log(ids.length + ' contacts were deleted');
21071 // Registers to be notified when the address book changes
21072 watcherId = addressbook.addChangeListener(watcher);
21078 long An identifier used to clear the watch subscription.
21083 <Argument name="successCallback">
21086 The method to call when different types of address book change notifications are received.
21089 <Type name="AddressBookChangeCallback"/>
21091 <Argument optional="optional" name="errorCallback">
21094 The method to call if address book changes cannot be watched.
21097 <Type name="ErrorCallback" nullable="nullable"/>
21101 <RaiseException name="WebAPIException">
21104 with error type TypeMismatchError, if any input parameter
21105 is not compatible with the expected type for that parameter.
21108 with error type InvalidValuesError, if any of the input parameters
21109 contain an invalid value.
21112 with error type SecurityError, if the application does not have the privilege to call this method.
21115 with error type NotSupportedError, if the feature
21119 with error type UnknownError in any other case.
21125 <Operation name="removeChangeListener" id="::Contact::AddressBook::removeChangeListener">
21126 <webidl> void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);</webidl>
21129 Unsubscribes an address book changes watch operation.
21133 If the watchId argument is valid and corresponds to a subscription already in
21134 place, the watch process MUST immediately stop and no further callbacks MUST be
21135 invoked. If the watchId argument is not valid or does not correspond to a
21136 valid subscription, the method should return without any further action.
21146 http://tizen.org/privilege/contact.read
21148 <Code> var watcherId = 0; // watcher identifier
21149 var addressbook; // This example assumes addressbook is initialized
21151 // Receives address book changes
21153 oncontactsadded: function(contacts) {
21154 console.log(contacts.length + ' contacts were added');
21156 oncontactsupdated: function(contacts) {
21157 console.log(contacts.length + ' contacts were updated');
21159 oncontactsremoved: function(ids) {
21160 console.log(ids.length + ' contacts were removed');
21164 // Cancel the watch operation
21165 function cancelWatch() {
21166 addressbook.removeChangeListener(watcherId);
21169 // registers to be notified when the address book changes
21170 watcherId = addressbook.addChangeListener(watcher);
21173 <Type type="void"/>
21175 <Argument name="watchId">
21178 A subscription identifier.
21181 <Type type="long"/>
21185 <RaiseException name="WebAPIException">
21188 with error type TypeMismatchError, if any input parameter
21189 is not compatible with the expected type for that parameter.
21192 with error type InvalidValuesError, if any of the input
21193 parameters contain an invalid value.
21196 with error type NotFoundError, if there is no listener
21197 with the given identifier.
21200 with error type SecurityError, if the application does not have the privilege to call this method.
21203 with error type NotSupportedError, if the feature
21207 with error type UnknownError in any other error case.
21213 <Operation name="getGroup" id="::Contact::AddressBook::getGroup">
21214 <webidl> <ref>ContactGroup</ref> getGroup(<ref>ContactGroupId</ref> groupId) raises(<ref>WebAPIException</ref>);</webidl>
21217 Gets the group with the specified identifier.
21221 If the operation completes successfully, it must return the
21222 group with the given identifier.
21232 http://tizen.org/privilege/contact.read
21235 // Retrieves the Person corresponding to a Contact.
21236 var addressBook = tizen.contact.getAddressBook(contactRef.addressBookId);
21237 var contact = addressBook.get(contactRef.contactId);
21238 var group = addressBook.getGroup(contact.groupIds[0].id);
21239 console.log("Successfully resolved group with id: " + contact.groupIds[0].id);
21241 console.log("Error: " + err.name);
21245 <Type name="ContactGroup">
21248 ContactGroup The matching ContactGroup object.
21253 <Argument name="groupId">
21256 A group identifier.
21259 <Type name="ContactGroupId"/>
21263 <RaiseException name="WebAPIException">
21266 with error type NotFoundError, if there is no contact
21267 with the given identifier.
21270 with error type TypeMismatchError, if any input parameter
21271 is not compatible with the expected type for that parameter.
21274 with error type InvalidValuesError, if any of the input
21275 parameters contain an invalid value.
21278 with error type SecurityError, if the application does not have the privilege to call this method.
21281 with error type NotSupportedError, if the feature
21285 with error type UnknownError in any other error case.
21291 <Operation name="addGroup" id="::Contact::AddressBook::addGroup">
21292 <webidl> void addGroup(<ref>ContactGroup</ref> group) raises(<ref>WebAPIException</ref>);</webidl>
21295 Adds a group to the address book.
21299 If the group is successfully inserted in the addressbook, the Group object
21300 will have its identifier (id attribute) set when the function returns.
21303 The group shall be added to local phone address book if the address book
21304 is the default address book.
21314 http://tizen.org/privilege/contact.write
21316 <Code> var addressbook;
21318 // Get address book
21319 var addressbooks = tizen.contact.getAddressBooks();
21320 addressbook = addressbooks[0];
21323 var group = new tizen.ContactGroup('Company');
21324 addressbook.addGroup(group);
21325 console.log('Group added with id ' + group.id);
21327 console.log( 'The following error occurred while adding: ' + err.name);
21331 <Type type="void"/>
21333 <Argument name="group">
21336 A ContactGroup object to be added.
21339 <Type name="ContactGroup"/>
21343 <RaiseException name="WebAPIException">
21346 with error type TypeMismatchError, if any input parameter
21347 is not compatible with the expected type for that parameter.
21350 with error type InvalidValuesError, if any input parameter
21351 contains invalid values.
21354 with error type SecurityError, if the application does not have the privilege to call this method.
21357 with error type NotSupportedError, if the feature
21361 with error type UnknownError, if any other error occurs while trying to insert the contact.
21367 <Operation name="updateGroup" id="::Contact::AddressBook::updateGroup">
21368 <webidl> void updateGroup(<ref>ContactGroup</ref> group) raises(<ref>WebAPIException</ref>);</webidl>
21371 Updates a group in the address book.
21380 http://tizen.org/privilege/contact.write
21382 <Code> var addressbook;
21384 // Get address book.
21385 var addressbooks = tizen.contact.getAddressBooks();
21386 addressbook = addressbooks[0];
21389 groups = addressbook.getGroups();
21390 groups[0].name = 'Friends';
21391 addressbook.updateGroup(groups[0]);
21392 console.log('First group was updated');
21394 console.log( 'The following error occurred while adding: ' + err.name);
21398 <Type type="void"/>
21400 <Argument name="group">
21403 A ContactGroup object to be updated.
21406 <Type name="ContactGroup"/>
21410 <RaiseException name="WebAPIException">
21413 with error type TypeMismatchError, if any input parameter
21414 is not compatible with the expected type for that parameter.
21417 with error type InvalidValuesError, if any input parameter
21418 contains invalid values.
21421 with error type SecurityError, if the application does not have the privilege to call this method.
21424 with error type NotSupportedError, if the feature
21428 with error type UnknownError, if the group could not be updated
21429 to an unknown error.
21435 <Operation name="removeGroup" id="::Contact::AddressBook::removeGroup">
21436 <webidl> void removeGroup(<ref>ContactGroupId</ref> groupId) raises(<ref>WebAPIException</ref>);</webidl>
21439 Removes a group from the address book.
21443 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.
21453 http://tizen.org/privilege/contact.write
21455 <Code> var addressbook;
21457 // Get default address book.
21458 var addressbooks = tizen.contact.getAddressBooks();
21459 addressbook = addressbooks[0];
21462 groups = addressbook.getGroups();
21463 addressbook.removeGroup(groups[0].id);
21464 console.log('First group was removed');
21466 console.log( 'The following error occurred while finding: ' + err.name);
21470 <Type type="void"/>
21472 <Argument name="groupId">
21475 An identifier (id attribute) of the ContactGroup object to be deleted.
21478 <Type name="ContactGroupId"/>
21482 <RaiseException name="WebAPIException">
21485 with error type NotFoundError, if the identifier does not match
21486 any contact in the address book.
21489 with error type TypeMismatchError, if any input parameter
21490 is not compatible with the expected type for that parameter.
21493 with error type InvalidValuesError, if any input parameter
21494 contains invalid values.
21497 with error type SecurityError, if the application does not have the privilege to call this method.
21500 with error type NotSupportedError, if the feature
21504 with error type UnknownError, if the group could not be removed
21505 to an unknown error.
21511 <Operation name="getGroups" id="::Contact::AddressBook::getGroups">
21512 <webidl> <ref>ContactGroup</ref>[] getGroups() raises(<ref>WebAPIException</ref>);</webidl>
21515 Gets an array of all ContactGroup objects from the specified address book.
21524 http://tizen.org/privilege/contact.read
21526 <Code> var addressbook;
21528 // Get default address book.
21529 var addressbooks = tizen.contact.getAddressBooks();
21530 addressbook = addressbooks[0];
21533 groups = addressbook.getGroups();
21534 console.log('Number of groups is ' + groups.length);
21536 console.log( 'The following error occurred while finding: ' + err.name);
21540 <Type type="array">
21543 ContactGroup[] The array of ContactGroup object from this address book.
21546 <Type name="ContactGroup"/>
21550 <RaiseException name="WebAPIException">
21553 with error type NotFoundError, if the identifier does not match
21554 any contact in the address book.
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 input parameter
21562 contains invalid values.
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, if the group could not be retrieved due
21573 to an unknown error.
21580 <Interface name="Person" id="::Contact::Person">
21581 <webidl> [NoInterfaceObject] interface Person {
21582 readonly attribute <ref>PersonId</ref> id;
21584 readonly attribute DOMString displayName;
21586 readonly attribute long contactCount;
21588 readonly attribute boolean hasPhoneNumber;
21590 readonly attribute boolean hasEmail;
21592 attribute boolean isFavorite;
21594 attribute DOMString? photoURI;
21596 attribute DOMString? ringtoneURI;
21598 attribute <ref>ContactId</ref> displayContactId;
21600 void link(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);
21602 <ref>Person</ref> unlink(<ref>ContactId</ref> contactId) raises(<ref>WebAPIException</ref>);
21612 <ExtendedAttributeList>
21613 <ExtendedAttribute name="NoInterfaceObject">
21614 <webidl>NoInterfaceObject</webidl>
21615 </ExtendedAttribute>
21616 </ExtendedAttributeList>
21617 <Attribute readonly="readonly" name="id" id="::Contact::Person::id">
21618 <webidl> readonly attribute <ref>PersonId</ref> id;</webidl>
21621 The identifier of the person.
21627 <Type name="PersonId"/>
21629 <Attribute readonly="readonly" name="displayName" id="::Contact::Person::displayName">
21630 <webidl> readonly attribute DOMString displayName;</webidl>
21633 An attribute to identify a person by storing the display name in a string.
21634 It is selected from the contacts' display names.
21640 <Type type="DOMString"/>
21642 <Attribute readonly="readonly" name="contactCount" id="::Contact::Person::contactCount">
21643 <webidl> readonly attribute long contactCount;</webidl>
21646 An attribute to count the number of the contacts that belong to a person.
21652 <Type type="long"/>
21654 <Attribute readonly="readonly" name="hasPhoneNumber" id="::Contact::Person::hasPhoneNumber">
21655 <webidl> readonly attribute boolean hasPhoneNumber;</webidl>
21658 An attribute to indicate if a person has a phone number.
21664 <Type type="boolean"/>
21666 <Attribute readonly="readonly" name="hasEmail" id="::Contact::Person::hasEmail">
21667 <webidl> readonly attribute boolean hasEmail;</webidl>
21670 An attribute to indicate if the person has an email addresses.
21676 <Type type="boolean"/>
21678 <Attribute name="isFavorite" id="::Contact::Person::isFavorite">
21679 <webidl> attribute boolean isFavorite;</webidl>
21682 An attribute to indicate whether the contact is a favorite or not.
21686 Indicates if the person was marked as <em>Favorite</em> or not.
21689 By default, this attribute is set to <var>false</var>.
21696 <Type type="boolean"/>
21698 <Attribute name="photoURI" id="::Contact::Person::photoURI">
21699 <webidl> attribute DOMString? photoURI;</webidl>
21702 The URI of a picture of a person.
21706 This attribute is used to store a URI that points to an image that can represent the
21707 person object. This attribute only contains a local file URI.
21708 Person's photoURI is bounded to linked contacts' valid photoURI.
21709 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
21712 By default, this attribute is set to <var>null</var>.
21719 <Type type="DOMString" nullable="nullable"/>
21721 <Attribute name="ringtoneURI" id="::Contact::Person::ringtoneURI">
21722 <webidl> attribute DOMString? ringtoneURI;</webidl>
21725 An attribute to specify and store the URI of a custom ringtone for a contact.
21729 By default, this attribute is initialized to <var>null</var>.
21730 This attribute only contains a local file URI.
21737 <Type type="DOMString" nullable="nullable"/>
21739 <Attribute name="displayContactId" id="::Contact::Person::displayContactId">
21740 <webidl> attribute <ref>ContactId</ref> displayContactId;</webidl>
21743 The ID of a contact that represents information of the person.
21747 The contact, this value is indicating, is used to show detailed information of the person.
21754 <Type name="ContactId"/>
21756 <Operation name="link" id="::Contact::Person::link">
21757 <webidl> void link(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);</webidl>
21760 Aggregates another person to this person.
21764 Person is a meta object which aggregates contacts and to make a person, user should combine related contacts.
21765 For this operation, link method is provided.
21766 If "Person A" is linked to "Person B", contacts related to "Person A" are aggregated to "Person B".
21767 After this function returns, the target "Person A" is removed from DB.
21777 http://tizen.org/privilege/contact.write
21779 <Code> // Define the error callback for all the asynchronous calls
21780 function errorCB(err) {
21781 console.log( 'The following error occurred: ' + err.name);
21784 function personsFoundCB(persons) {
21785 // The persons has been successfully found
21787 persons[0].link(persons[1].id);
21788 console.log('Second person was merged to the first person.');
21790 console.log( 'The following error occurred while updating: ' + err.name);
21795 tizen.contact.find(personsFoundCB, errorCB);
21797 console.log( 'The following error occurred while adding: ' + err.name);
21801 <Type type="void"/>
21803 <Argument name="personId">
21806 The ID of person to be merged.
21809 <Type name="PersonId"/>
21813 <RaiseException name="WebAPIException">
21816 with error type TypeMismatchError, if any input parameter
21817 is not compatible with the expected type for that parameter.
21820 with error type InvalidValuesError, if any input parameter
21821 contains invalid values.
21824 with error type SecurityError, if the application does not have the privilege to call this method.
21827 with error type NotSupportedError, if the feature
21831 with error type UnknownError, if any other error occurs while trying to insert the contact.
21837 <Operation name="unlink" id="::Contact::Person::unlink">
21838 <webidl> <ref>Person</ref> unlink(<ref>ContactId</ref> contactId) raises(<ref>WebAPIException</ref>);</webidl>
21841 Separates a contact from this person.
21845 Person is aggregated contacts and if a user wants to detach one contact from person, unlink method is provided.
21846 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.
21847 This function returns a newly created Person object that indicates the separated contact.
21857 http://tizen.org/privilege/contact.write
21859 <Code> var myPersonId = '1'; //ID of modified
21861 var addressbook; // Default addressbook
21862 var person; // Existing person obtained from addressbook
21863 var newPerson; // New person, which will be created during unlink
21865 // Define the error callback.
21866 function errorCB(err) {
21867 console.log( 'The following error occurred: ' + err.name);
21870 // Define the contact search success callback.
21871 function contactsFoundCB(contacts) {
21872 if (contacts.length > 1) {
21874 // unlink first contact
21875 newPerson = person.unlink(contacts[0].id);
21877 console.log( 'The following error occurred while unlink: ' + err.name);
21880 console.log( 'Not enough contacts ');
21886 person = tizen.contact.get(myPersonId);
21888 // Get default address book
21889 addressbook = tizen.contact.getDefaultAddressBook();
21891 // Find all contacts in the default address book that personId
21892 // is exactly myPersonId
21893 var filter = new tizen.AttributeFilter('personId', 'EXACTLY', myPersonId);
21895 addressbook.find(contactsFoundCB, errorCB, filter);
21897 console.log( 'The following error occurred while processing: ' + err.name);
21901 <Type name="Person"/>
21903 <Argument name="contactId">
21906 The ID of contact to unlink.
21909 <Type name="ContactId"/>
21913 <RaiseException name="WebAPIException">
21916 with error type TypeMismatchError, if any input parameter
21917 is not compatible with the expected type for that parameter.
21920 with error type InvalidValuesError, if any input parameter
21921 contains invalid values.
21924 with error type SecurityError, if the application does not have the privilege to call this method.
21927 with error type NotSupportedError, if the feature
21931 with error type UnknownError, if any other error occurs while trying to insert the contact.
21938 <Dictionary name="ContactInit" id="::Contact::ContactInit">
21939 <webidl> dictionary ContactInit {
21940 <ref>ContactName</ref> name;
21941 <ref>ContactAddress</ref>[] addresses;
21942 DOMString photoURI;
21943 <ref>ContactPhoneNumber</ref>[] phoneNumbers;
21944 <ref>ContactEmailAddress</ref>[] emails;
21946 <ref>ContactAnniversary</ref>[] anniversaries;
21947 <ref>ContactOrganization</ref>[] organizations;
21949 <ref>ContactWebSite</ref>[] urls;
21950 DOMString ringtoneURI;
21951 <ref>ContactGroupId</ref>[] groupIds;
21955 Provides a dictionary for specifying contact attributes upon contact creation.
21959 This dictionary is used to input parameters when contacts are created.
21966 <DictionaryMember name="name" id="::Contact::ContactInit::name">
21967 <webidl> <ref>ContactName</ref> name;</webidl>
21968 <Type name="ContactName"/>
21969 </DictionaryMember>
21970 <DictionaryMember name="addresses" id="::Contact::ContactInit::addresses">
21971 <webidl> <ref>ContactAddress</ref>[] addresses;</webidl>
21972 <Type type="array">
21973 <Type name="ContactAddress"/>
21975 </DictionaryMember>
21976 <DictionaryMember name="photoURI" id="::Contact::ContactInit::photoURI">
21977 <webidl> DOMString photoURI;</webidl>
21978 <Type type="DOMString"/>
21979 </DictionaryMember>
21980 <DictionaryMember name="phoneNumbers" id="::Contact::ContactInit::phoneNumbers">
21981 <webidl> <ref>ContactPhoneNumber</ref>[] phoneNumbers;</webidl>
21982 <Type type="array">
21983 <Type name="ContactPhoneNumber"/>
21985 </DictionaryMember>
21986 <DictionaryMember name="emails" id="::Contact::ContactInit::emails">
21987 <webidl> <ref>ContactEmailAddress</ref>[] emails;</webidl>
21988 <Type type="array">
21989 <Type name="ContactEmailAddress"/>
21991 </DictionaryMember>
21992 <DictionaryMember name="birthday" id="::Contact::ContactInit::birthday">
21993 <webidl> Date birthday;</webidl>
21994 <Type type="Date"/>
21995 </DictionaryMember>
21996 <DictionaryMember name="anniversaries" id="::Contact::ContactInit::anniversaries">
21997 <webidl> <ref>ContactAnniversary</ref>[] anniversaries;</webidl>
21998 <Type type="array">
21999 <Type name="ContactAnniversary"/>
22001 </DictionaryMember>
22002 <DictionaryMember name="organizations" id="::Contact::ContactInit::organizations">
22003 <webidl> <ref>ContactOrganization</ref>[] organizations;</webidl>
22004 <Type type="array">
22005 <Type name="ContactOrganization"/>
22007 </DictionaryMember>
22008 <DictionaryMember name="notes" id="::Contact::ContactInit::notes">
22009 <webidl> DOMString[] notes;</webidl>
22010 <Type type="array">
22011 <Type type="DOMString"/>
22013 </DictionaryMember>
22014 <DictionaryMember name="urls" id="::Contact::ContactInit::urls">
22015 <webidl> <ref>ContactWebSite</ref>[] urls;</webidl>
22016 <Type type="array">
22017 <Type name="ContactWebSite"/>
22019 </DictionaryMember>
22020 <DictionaryMember name="ringtoneURI" id="::Contact::ContactInit::ringtoneURI">
22021 <webidl> DOMString ringtoneURI;</webidl>
22022 <Type type="DOMString"/>
22023 </DictionaryMember>
22024 <DictionaryMember name="groupIds" id="::Contact::ContactInit::groupIds">
22025 <webidl> <ref>ContactGroupId</ref>[] groupIds;</webidl>
22026 <Type type="array">
22027 <Type name="ContactGroupId"/>
22029 </DictionaryMember>
22031 <Interface name="Contact" id="::Contact::Contact">
22032 <webidl> [Constructor(optional <ref>ContactInit</ref>? ContactInitDict),
22033 Constructor(DOMString stringRepresentation)]
22034 interface Contact {
22035 readonly attribute <ref>ContactId</ref>? id;
22037 readonly attribute <ref>PersonId</ref>? personId;
22039 readonly attribute <ref>AddressBookId</ref>? addressBookId;
22041 readonly attribute Date? lastUpdated;
22043 readonly attribute boolean isFavorite;
22045 attribute <ref>ContactName</ref>? name setraises(<ref>WebAPIException</ref>);
22047 attribute <ref>ContactAddress</ref>[] addresses setraises(<ref>WebAPIException</ref>);
22049 attribute DOMString? photoURI setraises(<ref>WebAPIException</ref>);
22051 attribute <ref>ContactPhoneNumber</ref>[] phoneNumbers setraises(<ref>WebAPIException</ref>);
22053 attribute <ref>ContactEmailAddress</ref>[] emails setraises(<ref>WebAPIException</ref>);
22055 attribute Date? birthday setraises(<ref>WebAPIException</ref>);
22057 attribute <ref>ContactAnniversary</ref>[] anniversaries setraises(<ref>WebAPIException</ref>);
22059 attribute <ref>ContactOrganization</ref>[] organizations setraises(<ref>WebAPIException</ref>);
22061 attribute DOMString[] notes setraises(<ref>WebAPIException</ref>);
22063 attribute <ref>ContactWebSite</ref>[] urls setraises(<ref>WebAPIException</ref>);
22065 attribute DOMString? ringtoneURI setraises(<ref>WebAPIException</ref>);
22067 attribute <ref>ContactGroupId</ref>[] groupIds setraises(<ref>WebAPIException</ref>);
22069 DOMString convertToString(optional <ref>ContactTextFormat</ref>? format) raises(<ref>WebAPIException</ref>);
22071 <ref>Contact</ref> clone() raises(<ref>WebAPIException</ref>);
22075 This interface is used to create a <em>Contact </em>object.
22080 <Code> // Get the default address book
22081 var addressbook = tizen.contact.getDefaultAddressBook();
22083 var contact = null;
22086 contact = new tizen.Contact(
22087 "BEGIN:VCARD\n"+
22088 "VERSION:3.0\n"+
22089 "N:Gump;Forrest\n"+
22090 "FN:Forrest Gump\n"+
22091 "ORG:Bubba Gump Shrimp Co.\n"+
22092 "TITLE:Shrimp Man\n"+
22093 "TEL;WORK:(111) 555-1212\n"+
22094 "TEL;HOME:(404) 555-1212\n"+
22095 "EMAIL;WORK;PREF:forrestgump@example.com\n"+
22096 "END:VCARD");
22098 console.log( 'The following error occurred while converting: ' + err.name);
22103 addressbook.add(contact);
22104 console.log('Contact was added with ID ' + contact.id);
22107 console.log( 'The following error occurred while adding: ' + err.name);
22111 <ExtendedAttributeList>
22112 <ExtendedAttribute name="Constructor">
22113 <webidl>Constructor(optional <ref>ContactInit</ref>? ContactInitDict)</webidl>
22115 <Argument optional="optional" name="ContactInitDict">
22116 <Type name="ContactInit" nullable="nullable"/>
22119 </ExtendedAttribute>
22120 <ExtendedAttribute name="Constructor">
22121 <webidl> Constructor(DOMString stringRepresentation)</webidl>
22123 <Argument name="stringRepresentation">
22124 <Type type="DOMString"/>
22127 </ExtendedAttribute>
22128 </ExtendedAttributeList>
22129 <Attribute readonly="readonly" name="id" id="::Contact::Contact::id">
22130 <webidl> readonly attribute <ref>ContactId</ref>? id;</webidl>
22133 An attribute to identify a raw contact.
22137 By default, this attribute is set to <var>null</var>.
22144 <Type name="ContactId" nullable="nullable"/>
22146 <Attribute readonly="readonly" name="personId" id="::Contact::Contact::personId">
22147 <webidl> readonly attribute <ref>PersonId</ref>? personId;</webidl>
22150 The identifier of the person corresponding to the raw contact.
22154 By default, this attribute is set to <var>null</var>.
22161 <Type name="PersonId" nullable="nullable"/>
22163 <Attribute readonly="readonly" name="addressBookId" id="::Contact::Contact::addressBookId">
22164 <webidl> readonly attribute <ref>AddressBookId</ref>? addressBookId;</webidl>
22167 The identifier of the address book that corresponds to the raw contact.
22168 By default, this attribute is set to <var>null</var>.
22174 <Type name="AddressBookId" nullable="nullable"/>
22176 <Attribute readonly="readonly" name="lastUpdated" id="::Contact::Contact::lastUpdated">
22177 <webidl> readonly attribute Date? lastUpdated;</webidl>
22180 The timestamp for the last update of a contact.
22184 Specifies revision information about the contact.
22187 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.
22188 For more details, see RFC 2426, Section 3.6.4.
22195 <Type type="Date" nullable="nullable"/>
22197 <Attribute readonly="readonly" name="isFavorite" id="::Contact::Contact::isFavorite">
22198 <webidl> readonly attribute boolean isFavorite;</webidl>
22201 An attribute to indicate whether a contact is favorite or not.
22205 This value is associated with the <em>isFavorite</em> attribute of Person that this contact indicates.
22208 By default, this attribute is set to <var>false</var>.
22214 <Code> if (contact.isFavorite) {
22219 <Type type="boolean"/>
22221 <Attribute name="name" id="::Contact::Contact::name">
22222 <webidl> attribute <ref>ContactName</ref>? name setraises(<ref>WebAPIException</ref>);</webidl>
22225 An attribute to store the name of a contact.
22231 <Type name="ContactName" nullable="nullable"/>
22233 <RaiseException name="WebAPIException"/>
22236 <Attribute name="addresses" id="::Contact::Contact::addresses">
22237 <webidl> attribute <ref>ContactAddress</ref>[] addresses setraises(<ref>WebAPIException</ref>);</webidl>
22240 The contact addresses.
22244 By default, this attribute is set to an empty array.
22250 <Code> var contactInit = {};
22251 var contactAddr = new tizen.ContactAddres({streetAddress:'Gran Via, 32',
22252 postalCode:'50013',
22255 contactInit.addresses = [contactAddr];
22258 <Type type="array">
22259 <Type name="ContactAddress"/>
22262 <RaiseException name="WebAPIException"/>
22265 <Attribute name="photoURI" id="::Contact::Contact::photoURI">
22266 <webidl> attribute DOMString? photoURI setraises(<ref>WebAPIException</ref>);</webidl>
22269 The URI to the picture of the contact.
22273 This attribute is used to store a URI that points to an image that can represent the
22274 contact object. This attribute only contains a local file URI.
22275 See RFC 2426, Section 3.1.4.
22278 By default, this attribute is set to <var>null</var>.
22284 <Code> var contactInit = {};
22285 contactInit.photoURI = 'file:///opt/media/Downloads/mypicture.jpg';
22288 <Type type="DOMString" nullable="nullable"/>
22290 <RaiseException name="WebAPIException"/>
22293 <Attribute name="phoneNumbers" id="::Contact::Contact::phoneNumbers">
22294 <webidl> attribute <ref>ContactPhoneNumber</ref>[] phoneNumbers setraises(<ref>WebAPIException</ref>);</webidl>
22297 The telephone numbers of the contact.
22301 By default, this attribute is set to empty array.
22307 <Code> var contactInit = {};
22308 var phoneNumber = new tizen.ContactPhoneNumber('123456789');
22309 contactInit.phoneNumbers = [phoneNumber];
22312 <Type type="array">
22313 <Type name="ContactPhoneNumber"/>
22316 <RaiseException name="WebAPIException"/>
22319 <Attribute name="emails" id="::Contact::Contact::emails">
22320 <webidl> attribute <ref>ContactEmailAddress</ref>[] emails setraises(<ref>WebAPIException</ref>);</webidl>
22323 The email addresses of the contact.
22327 By default, this attribute is set to empty array.
22333 <Code> var contactInit = {};
22334 var email = new tizen.ContactEmailAddress('deedee@ramones.com');
22335 contactInit.emails = [email];
22338 <Type type="array">
22339 <Type name="ContactEmailAddress"/>
22342 <RaiseException name="WebAPIException"/>
22345 <Attribute name="birthday" id="::Contact::Contact::birthday">
22346 <webidl> attribute Date? birthday setraises(<ref>WebAPIException</ref>);</webidl>
22349 The birthday of the contact.
22353 Defines specify the birthday of the contact (see RFC 2426 -
22357 By default, this attribute is set to <var>null</var>.
22363 <Code> var contactInit = {};
22364 contactInit.birthday = new Date(1996, 4, 15);
22367 <Type type="Date" nullable="nullable"/>
22369 <RaiseException name="WebAPIException"/>
22372 <Attribute name="anniversaries" id="::Contact::Contact::anniversaries">
22373 <webidl> attribute <ref>ContactAnniversary</ref>[] anniversaries setraises(<ref>WebAPIException</ref>);</webidl>
22376 The list of anniversaries for the contact.
22380 Defines specify arbitrary anniversaries for the contact (in addition to the birthday).
22383 By default, this attribute is set to empty array.
22389 <Code> var contactInit = {};
22390 var marriage_anniv = new tizen.ContactAnniversary(new Date(1976, 11, 2), 'Marriage');
22391 contactInit.anniversaries = [marriage_anniv];
22394 <Type type="array">
22395 <Type name="ContactAnniversary"/>
22398 <RaiseException name="WebAPIException"/>
22401 <Attribute name="organizations" id="::Contact::Contact::organizations">
22402 <webidl> attribute <ref>ContactOrganization</ref>[] organizations setraises(<ref>WebAPIException</ref>);</webidl>
22405 The organizations the contact belongs to.
22409 Contains information related to the contact's company or organization.
22412 For more details, see RFC 2426, Section 3.5.
22419 <Type type="array">
22420 <Type name="ContactOrganization"/>
22423 <RaiseException name="WebAPIException"/>
22426 <Attribute name="notes" id="::Contact::Contact::notes">
22427 <webidl> attribute DOMString[] notes setraises(<ref>WebAPIException</ref>);</webidl>
22430 The notes associated to the contact.
22434 To specify supplemental information or a comment related to the contact.
22437 For more details, see RFC 2426, Section 3.6.2.
22444 <Type type="array">
22445 <Type type="DOMString"/>
22448 <RaiseException name="WebAPIException"/>
22451 <Attribute name="urls" id="::Contact::Contact::urls">
22452 <webidl> attribute <ref>ContactWebSite</ref>[] urls setraises(<ref>WebAPIException</ref>);</webidl>
22455 The URLs associated to the contact.
22459 By default, this attribute is initialized to an empty array.
22462 In case multiple URLs are available, the first one is the default one.
22463 For more details, see RFC 2426, Section 3.6.8.
22470 <Type type="array">
22471 <Type name="ContactWebSite"/>
22474 <RaiseException name="WebAPIException"/>
22477 <Attribute name="ringtoneURI" id="::Contact::Contact::ringtoneURI">
22478 <webidl> attribute DOMString? ringtoneURI setraises(<ref>WebAPIException</ref>);</webidl>
22481 The URI to the custom ringtone for the contact.
22485 To specify a custom ringtone for the contact.
22488 By default, this attribute is initialized to <var>null</var>.
22489 This attribute only contains a local file URI scheme;
22490 For more details, see RFC 2426, Section 3.6.6.
22497 <Type type="DOMString" nullable="nullable"/>
22499 <RaiseException name="WebAPIException"/>
22502 <Attribute name="groupIds" id="::Contact::Contact::groupIds">
22503 <webidl> attribute <ref>ContactGroupId</ref>[] groupIds setraises(<ref>WebAPIException</ref>);</webidl>
22506 The groups the contact belongs to.
22510 To associate groups to the contact.
22513 By default, this attribute is initialized to an empty array.
22516 In a case where multiple categories are available, the first one is the default one.
22517 See RFC 2426, Section 3.6.1.
22524 <Type type="array">
22525 <Type name="ContactGroupId"/>
22528 <RaiseException name="WebAPIException"/>
22531 <Operation name="convertToString" id="::Contact::Contact::convertToString">
22532 <webidl> DOMString convertToString(optional <ref>ContactTextFormat</ref>? format) raises(<ref>WebAPIException</ref>);</webidl>
22535 Converts the Contact item to a string format.
22539 A textual representation for the contact will be generated and returned synchronously.
22540 The export format is set via the format parameter.
22546 <Code> var addressbook;
22548 // Define the error callback.
22549 function errorCB(err) {
22550 console.log( 'The following error occurred: ' + err.name);
22553 // Define the contact find success callback.
22554 function contactsFoundCB(contacts) {
22556 // Convert the first contact to vCard 3.0 format
22557 var vcard = contacts[0].convertToString("VCARD_30");
22558 console.log('textual representation of the contact is: ' + vcard);
22560 console.log( 'The following error occurred while converting: ' + err.name);
22564 // Get the default address book
22565 addressbook = tizen.contact.getDefaultAddressBook();
22567 // Find all contact in the address book whose first name contains the string 'Chris'.
22568 var filter = new tizen.AttributeFilter('firstName', 'CONTAINS', 'Chris');
22570 addressbook.find(contactsFoundCB, errorCB, filter);
22572 console.log( 'The following error occurred while finding: ' + err.name);
22576 <Type type="DOMString">
22579 DOMString The string representation of the Contact item.
22584 <Argument optional="optional" name="format">
22587 Format to use for export. If this value is <var>null</var> or empty, it converts to platform default format.
22590 <Type name="ContactTextFormat" nullable="nullable"/>
22594 <RaiseException name="WebAPIException">
22597 with error type TypeMismatchError, if any input parameter
22598 is not compatible with the expected type for that parameter.
22601 with error type SecurityError, if the functionality
22605 with error type NotSupportedError, if the feature
22609 with error type UnknownError in any other error case.
22615 <Operation name="clone" id="::Contact::Contact::clone">
22616 <webidl> <ref>Contact</ref> clone() raises(<ref>WebAPIException</ref>);</webidl>
22620 Creates a clone of the Contact object, detached from any address book.
22623 The Contact object returned by the <var>clone()</var> method will have its identifier
22624 set to <var>null</var> and will be detached from any address book.
22630 <Code> // Get default address book.
22631 var addressbook = tizen.contact.getDefaultAddressBook();
22633 var bob = new tizen.Contact();
22634 bob.name = new tizen.ContactName({firstName:'Bob',
22635 lastName:'Smith'});
22636 addressbook.add(bob);
22637 var alice = bob.clone();
22638 contact.name.firstName = "Alice"; // Bob's wife
22639 addressbook.add(alice);
22642 <Type name="Contact">
22645 Contact A new clone of the Contact object.
22651 <RaiseException name="WebAPIException">
22654 with error type SecurityError, if the functionality
22658 with error type NotSupportedError, if the feature
22662 with error type UnknownError in any other error case.
22669 <Interface name="ContactRef" id="::Contact::ContactRef">
22670 <webidl> [Constructor(<ref>AddressBookId</ref> addressBookId, <ref>ContactId</ref> contactId)]
22671 interface ContactRef {
22672 attribute <ref>AddressBookId</ref> addressBookId;
22674 attribute <ref>ContactId</ref> contactId;
22678 The fully-defined contact reference.
22682 It contains both the identifier of the address book which the contact is in, and
22683 the contact identifier within this address book.
22686 This interface is used by other APIs to uniquely and globally identify contacts.
22693 <ExtendedAttributeList>
22694 <ExtendedAttribute name="Constructor">
22695 <webidl>Constructor(<ref>AddressBookId</ref> addressBookId, <ref>ContactId</ref> contactId)</webidl>
22697 <Argument name="addressBookId">
22698 <Type name="AddressBookId"/>
22700 <Argument name="contactId">
22701 <Type name="ContactId"/>
22704 </ExtendedAttribute>
22705 </ExtendedAttributeList>
22706 <Attribute name="addressBookId" id="::Contact::ContactRef::addressBookId">
22707 <webidl> attribute <ref>AddressBookId</ref> addressBookId;</webidl>
22710 The address book identifier.
22716 <Type name="AddressBookId"/>
22718 <Attribute name="contactId" id="::Contact::ContactRef::contactId">
22719 <webidl> attribute <ref>ContactId</ref> contactId;</webidl>
22722 The contact identifier inside the address book.
22728 <Type name="ContactId"/>
22731 <Dictionary name="ContactNameInit" id="::Contact::ContactNameInit">
22732 <webidl> dictionary ContactNameInit {
22735 DOMString firstName;
22736 DOMString middleName;
22737 DOMString lastName;
22738 DOMString[] nicknames;
22739 DOMString phoneticFirstName;
22740 DOMString phoneticLastName;
22744 The properties of a ContactName, to pass to the ContactName constructor.
22748 See ContactName interface for more information about the members.
22755 <DictionaryMember name="prefix" id="::Contact::ContactNameInit::prefix">
22756 <webidl> DOMString prefix;</webidl>
22757 <Type type="DOMString"/>
22758 </DictionaryMember>
22759 <DictionaryMember name="suffix" id="::Contact::ContactNameInit::suffix">
22760 <webidl> DOMString suffix;</webidl>
22761 <Type type="DOMString"/>
22762 </DictionaryMember>
22763 <DictionaryMember name="firstName" id="::Contact::ContactNameInit::firstName">
22764 <webidl> DOMString firstName;</webidl>
22765 <Type type="DOMString"/>
22766 </DictionaryMember>
22767 <DictionaryMember name="middleName" id="::Contact::ContactNameInit::middleName">
22768 <webidl> DOMString middleName;</webidl>
22769 <Type type="DOMString"/>
22770 </DictionaryMember>
22771 <DictionaryMember name="lastName" id="::Contact::ContactNameInit::lastName">
22772 <webidl> DOMString lastName;</webidl>
22773 <Type type="DOMString"/>
22774 </DictionaryMember>
22775 <DictionaryMember name="nicknames" id="::Contact::ContactNameInit::nicknames">
22776 <webidl> DOMString[] nicknames;</webidl>
22777 <Type type="array">
22778 <Type type="DOMString"/>
22780 </DictionaryMember>
22781 <DictionaryMember name="phoneticFirstName" id="::Contact::ContactNameInit::phoneticFirstName">
22782 <webidl> DOMString phoneticFirstName;</webidl>
22783 <Type type="DOMString"/>
22784 </DictionaryMember>
22785 <DictionaryMember name="phoneticLastName" id="::Contact::ContactNameInit::phoneticLastName">
22786 <webidl> DOMString phoneticLastName;</webidl>
22787 <Type type="DOMString"/>
22788 </DictionaryMember>
22790 <Interface name="ContactName" id="::Contact::ContactName">
22791 <webidl> [Constructor(optional <ref>ContactNameInit</ref>? nameInitDict)]
22792 interface ContactName {
22793 attribute DOMString? prefix;
22795 attribute DOMString? suffix;
22797 attribute DOMString? firstName;
22799 attribute DOMString? middleName;
22801 attribute DOMString? lastName;
22803 attribute DOMString[] nicknames;
22805 attribute DOMString? phoneticFirstName;
22807 attribute DOMString? phoneticLastName;
22809 readonly attribute DOMString? displayName;
22813 This interface contains all information related to a contact name.
22819 <ExtendedAttributeList>
22820 <ExtendedAttribute name="Constructor">
22821 <webidl>Constructor(optional <ref>ContactNameInit</ref>? nameInitDict)</webidl>
22823 <Argument optional="optional" name="nameInitDict">
22824 <Type name="ContactNameInit" nullable="nullable"/>
22827 </ExtendedAttribute>
22828 </ExtendedAttributeList>
22829 <Attribute name="prefix" id="::Contact::ContactName::prefix">
22830 <webidl> attribute DOMString? prefix;</webidl>
22833 The name prefix of a contact.
22837 By default, this attribute is initialized to
22838 <var>null</var>. See also RFC 2426, Section 3.1.1.
22844 <Code> contact.name.prefix = "Dr.";
22847 <Type type="DOMString" nullable="nullable"/>
22849 <Attribute name="suffix" id="::Contact::ContactName::suffix">
22850 <webidl> attribute DOMString? suffix;</webidl>
22853 The name suffix of a contact.
22857 By default, this attribute is initialized to
22858 <var>null</var>. See also RFC 2426, Section 3.1.1.
22864 <Code> contact.name.suffix = "Jr.";
22867 <Type type="DOMString" nullable="nullable"/>
22869 <Attribute name="firstName" id="::Contact::ContactName::firstName">
22870 <webidl> attribute DOMString? firstName;</webidl>
22873 The first (given) name of a contact.
22877 By default, this attribute is initialized to
22878 <var>null</var>. See also RFC 2426, Section 3.1.1.
22884 <Code> contact.name.firstName = 'Douglas';
22887 <Type type="DOMString" nullable="nullable"/>
22889 <Attribute name="middleName" id="::Contact::ContactName::middleName">
22890 <webidl> attribute DOMString? middleName;</webidl>
22893 The middle name of a contact.
22897 By default, this attribute is initialized to
22898 <var>null</var>. See also RFC 2426, Section 3.1.1.
22904 <Code> contact.name.middleName = 'Glenn';
22907 <Type type="DOMString" nullable="nullable"/>
22909 <Attribute name="lastName" id="::Contact::ContactName::lastName">
22910 <webidl> attribute DOMString? lastName;</webidl>
22913 The last (family) name of a contact.
22917 By default, this attribute is initialized to
22918 <var>null</var>. See also RFC 2426, Section 3.1.1.
22924 <Code> contact.name.lastName = 'Colvin';
22927 <Type type="DOMString" nullable="nullable"/>
22929 <Attribute name="nicknames" id="::Contact::ContactName::nicknames">
22930 <webidl> attribute DOMString[] nicknames;</webidl>
22933 The nicknames of a contact.
22937 The nickname is a name used instead of, or in addition to, the given name of a contact,
22938 place, or thing. It can also be used to specify a familiar form of a proper name.
22941 By default, this attribute is initialized to an empty array.
22944 In case multiple nicknames are available the first one is the default.
22945 See RFC 2426, Section 3.1.3.
22951 <Code> contact.name.nickNames = ['Dee Dee'];
22954 <Type type="array">
22955 <Type type="DOMString"/>
22958 <Attribute name="phoneticFirstName" id="::Contact::ContactName::phoneticFirstName">
22959 <webidl> attribute DOMString? phoneticFirstName;</webidl>
22962 The phonetic first name of a contact.
22966 Describes how the first name should be
22967 pronounced. This is very important in
22968 some languages, such as Japanese, because the
22969 same 'Kanji' may have several pronunciations.
22972 By default, this attribute is set to <var>null</var>.
22979 <Type type="DOMString" nullable="nullable"/>
22981 <Attribute name="phoneticLastName" id="::Contact::ContactName::phoneticLastName">
22982 <webidl> attribute DOMString? phoneticLastName;</webidl>
22985 The phonetic last name of a contact.
22989 Describes how the last name should be
22990 pronounced. This is very important in
22991 some languages, such as Japanese, because the
22992 same 'Kanji' may have several pronunciations.
22995 By default, this attribute is set to <var>null</var>.
23002 <Type type="DOMString" nullable="nullable"/>
23004 <Attribute readonly="readonly" name="displayName" id="::Contact::ContactName::displayName">
23005 <webidl> readonly attribute DOMString? displayName;</webidl>
23008 The display name of a contact.
23012 The string which can be displayed to identify the contact. It is composed of the first
23013 and last names if available, otherwise, it will fall back to the most adequate
23014 field available to identify the contact (such as nickname).
23017 By default, this attribute is set to <var>null</var>. Initially, once a contact is added to an address book, this value is composed.
23024 <Type type="DOMString" nullable="nullable"/>
23027 <Dictionary name="ContactOrganizationInit" id="::Contact::ContactOrganizationInit">
23028 <webidl> dictionary ContactOrganizationInit {
23030 DOMString department;
23037 The properties of a ContactOrganization, to pass to the ContactOrganization constructor.
23041 See ContactOrganization interface for information about members.
23048 <DictionaryMember name="name" id="::Contact::ContactOrganizationInit::name">
23049 <webidl> DOMString name;</webidl>
23050 <Type type="DOMString"/>
23051 </DictionaryMember>
23052 <DictionaryMember name="department" id="::Contact::ContactOrganizationInit::department">
23053 <webidl> DOMString department;</webidl>
23054 <Type type="DOMString"/>
23055 </DictionaryMember>
23056 <DictionaryMember name="title" id="::Contact::ContactOrganizationInit::title">
23057 <webidl> DOMString title;</webidl>
23058 <Type type="DOMString"/>
23059 </DictionaryMember>
23060 <DictionaryMember name="role" id="::Contact::ContactOrganizationInit::role">
23061 <webidl> DOMString role;</webidl>
23062 <Type type="DOMString"/>
23063 </DictionaryMember>
23064 <DictionaryMember name="logoURI" id="::Contact::ContactOrganizationInit::logoURI">
23065 <webidl> DOMString logoURI;</webidl>
23066 <Type type="DOMString"/>
23067 </DictionaryMember>
23069 <Interface name="ContactOrganization" id="::Contact::ContactOrganization">
23070 <webidl> [Constructor(optional <ref>ContactOrganizationInit</ref>? orgInitDict)]
23071 interface ContactOrganization {
23072 attribute DOMString? name;
23074 attribute DOMString? department;
23076 attribute DOMString? title;
23078 attribute DOMString? role;
23080 attribute DOMString? logoURI;
23084 This interface contains the information about the organization or
23085 company that a contact belongs to.
23089 By default, each of the attributes of this interface are <var>null</var>.
23092 For more details, see RFC 2426, Section 3.5.
23098 <Code> var organization = new tizen.ContactOrganization({name: "Intel", role: "SW Engineer"});
23101 <ExtendedAttributeList>
23102 <ExtendedAttribute name="Constructor">
23103 <webidl>Constructor(optional <ref>ContactOrganizationInit</ref>? orgInitDict)</webidl>
23105 <Argument optional="optional" name="orgInitDict">
23106 <Type name="ContactOrganizationInit" nullable="nullable"/>
23109 </ExtendedAttribute>
23110 </ExtendedAttributeList>
23111 <Attribute name="name" id="::Contact::ContactOrganization::name">
23112 <webidl> attribute DOMString? name;</webidl>
23115 The name of an organization.
23119 For more details, see RFC 2426, Section 3.5.5.
23126 <Type type="DOMString" nullable="nullable"/>
23128 <Attribute name="department" id="::Contact::ContactOrganization::department">
23129 <webidl> attribute DOMString? department;</webidl>
23132 The organizational unit name.
23136 For more details, see RFC 2426, Section 3.5.5.
23143 <Type type="DOMString" nullable="nullable"/>
23145 <Attribute name="title" id="::Contact::ContactOrganization::title">
23146 <webidl> attribute DOMString? title;</webidl>
23153 To specify the job title, functional position or function (such as 'Director,
23154 Research and Development').
23157 For more details, see RFC 2426, Section 3.5.1.
23164 <Type type="DOMString" nullable="nullable"/>
23166 <Attribute name="role" id="::Contact::ContactOrganization::role">
23167 <webidl> attribute DOMString? role;</webidl>
23170 An attribute to store the role, occupation, or business category
23171 (such as 'Programmer').
23175 For more details, see RFC 2426, Section 3.5.2.
23182 <Type type="DOMString" nullable="nullable"/>
23184 <Attribute name="logoURI" id="::Contact::ContactOrganization::logoURI">
23185 <webidl> attribute DOMString? logoURI;</webidl>
23188 The URI to the logo of a company.
23192 To specify a graphic image of a logo associated with an organization.
23193 This attribute only contains file URI Scheme;
23194 remote pictures could be loaded to local with Download API.
23195 For more details, see RFC 2426, Section 3.5.3.
23202 <Type type="DOMString" nullable="nullable"/>
23205 <Interface name="ContactWebSite" id="::Contact::ContactWebSite">
23206 <webidl> [Constructor(DOMString url, optional DOMString type)]
23207 interface ContactWebSite
23209 attribute DOMString url;
23211 attribute DOMString type;
23215 The ContactWebSite object that contains the URL and the type of web site.
23219 For more details, see RFC 2426, Section 3.6.8.
23225 <Code> var contactInit = {}
23226 var blog = new tizen.ContactWebSite('http://www.domain.com', 'BLOG');
23227 contactInit.urls = [blog];
23230 <ExtendedAttributeList>
23231 <ExtendedAttribute name="Constructor">
23232 <webidl>Constructor(DOMString url, optional DOMString type)</webidl>
23234 <Argument name="url">
23235 <Type type="DOMString"/>
23237 <Argument optional="optional" name="type">
23238 <Type type="DOMString"/>
23241 </ExtendedAttribute>
23242 </ExtendedAttributeList>
23243 <Attribute name="url" id="::Contact::ContactWebSite::url">
23244 <webidl> attribute DOMString url;</webidl>
23247 The URL for the contact's web site.
23253 <Type type="DOMString"/>
23255 <Attribute name="type" id="::Contact::ContactWebSite::type">
23256 <webidl> attribute DOMString type;</webidl>
23259 The type of web site.
23263 At least the following values must be supported:
23267 HOMEPAGE - Indicates a home page. </li>
23269 BLOG - Indicates a blog. </li>
23272 By default, this attribute is set to HOMEPAGE.
23279 <Type type="DOMString"/>
23282 <Interface name="ContactAnniversary" id="::Contact::ContactAnniversary">
23283 <webidl> [Constructor(Date date, optional DOMString? label)]
23284 interface ContactAnniversary
23286 attribute Date date;
23288 attribute DOMString? label;
23292 This interface implements the <em>ContactAnniversary </em>object that contains the date and description of an anniversary.
23297 <Code> var contactInit = {}
23298 var marriage_anniv = new tizen.ContactAnniversary(new Date(1976, 11, 2), 'Marriage');
23299 contactInit.anniversaries = [marriage_anniv];
23302 <ExtendedAttributeList>
23303 <ExtendedAttribute name="Constructor">
23304 <webidl>Constructor(Date date, optional DOMString? label)</webidl>
23306 <Argument name="date">
23307 <Type type="Date"/>
23309 <Argument optional="optional" name="label">
23310 <Type type="DOMString" nullable="nullable"/>
23313 </ExtendedAttribute>
23314 </ExtendedAttributeList>
23315 <Attribute name="date" id="::Contact::ContactAnniversary::date">
23316 <webidl> attribute Date date;</webidl>
23319 The date of an anniversary.
23325 <Type type="Date"/>
23327 <Attribute name="label" id="::Contact::ContactAnniversary::label">
23328 <webidl> attribute DOMString? label;</webidl>
23331 The text describing an anniversary.
23335 By default, this attribute is set to <var>null</var>.
23342 <Type type="DOMString" nullable="nullable"/>
23345 <Dictionary name="ContactAddressInit" id="::Contact::ContactAddressInit">
23346 <webidl> dictionary ContactAddressInit
23351 DOMString streetAddress;
23352 DOMString additionalInformation;
23353 DOMString postalCode;
23359 The properties of a ContactAddress to pass to the ContactAddress constructor.
23363 See ContactAddress interface for more information about the members.
23370 <DictionaryMember name="country" id="::Contact::ContactAddressInit::country">
23371 <webidl> DOMString country;</webidl>
23372 <Type type="DOMString"/>
23373 </DictionaryMember>
23374 <DictionaryMember name="region" id="::Contact::ContactAddressInit::region">
23375 <webidl> DOMString region;</webidl>
23376 <Type type="DOMString"/>
23377 </DictionaryMember>
23378 <DictionaryMember name="city" id="::Contact::ContactAddressInit::city">
23379 <webidl> DOMString city;</webidl>
23380 <Type type="DOMString"/>
23381 </DictionaryMember>
23382 <DictionaryMember name="streetAddress" id="::Contact::ContactAddressInit::streetAddress">
23383 <webidl> DOMString streetAddress;</webidl>
23384 <Type type="DOMString"/>
23385 </DictionaryMember>
23386 <DictionaryMember name="additionalInformation" id="::Contact::ContactAddressInit::additionalInformation">
23387 <webidl> DOMString additionalInformation;</webidl>
23388 <Type type="DOMString"/>
23389 </DictionaryMember>
23390 <DictionaryMember name="postalCode" id="::Contact::ContactAddressInit::postalCode">
23391 <webidl> DOMString postalCode;</webidl>
23392 <Type type="DOMString"/>
23393 </DictionaryMember>
23394 <DictionaryMember name="isDefault" id="::Contact::ContactAddressInit::isDefault">
23395 <webidl> boolean isDefault;</webidl>
23396 <Type type="boolean"/>
23397 </DictionaryMember>
23398 <DictionaryMember name="types" id="::Contact::ContactAddressInit::types">
23399 <webidl> DOMString[] types;</webidl>
23400 <Type type="array">
23401 <Type type="DOMString"/>
23403 </DictionaryMember>
23405 <Interface name="ContactAddress" id="::Contact::ContactAddress">
23406 <webidl> [Constructor(optional <ref>ContactAddressInit</ref>? addressInitDict)]
23407 interface ContactAddress
23409 attribute DOMString? country;
23411 attribute DOMString? region;
23413 attribute DOMString? city;
23415 attribute DOMString? streetAddress;
23417 attribute DOMString? additionalInformation;
23419 attribute DOMString? postalCode;
23421 attribute boolean isDefault;
23423 attribute DOMString[] types;
23427 This interface contains a set of attributes that represent a particular point
23428 on the Earth's surface.
23432 Except isDefault and types attributes, each of the attributes of this interface are set to <var>null</var> by default.
23435 For more details, see RFC 2426, Section 3.2.1.
23441 <Code> var contactInit = {};
23442 var contactAddress = new tizen.ContactAddress({streetAddress:'Gran Via, 32',
23443 postalCode:'50013', city:'Zaragoza',
23444 country:'ES', types:['WORK']});
23445 contactInit.contactAddress = [contactAddress];
23448 <ExtendedAttributeList>
23449 <ExtendedAttribute name="Constructor">
23450 <webidl>Constructor(optional <ref>ContactAddressInit</ref>? addressInitDict)</webidl>
23452 <Argument optional="optional" name="addressInitDict">
23453 <Type name="ContactAddressInit" nullable="nullable"/>
23456 </ExtendedAttribute>
23457 </ExtendedAttributeList>
23458 <Attribute name="country" id="::Contact::ContactAddress::country">
23459 <webidl> attribute DOMString? country;</webidl>
23462 The country of the address.
23466 It is recommended that the country is specified
23467 using the two-letter [ISO 3166-1] code.
23474 <Type type="DOMString" nullable="nullable"/>
23476 <Attribute name="region" id="::Contact::ContactAddress::region">
23477 <webidl> attribute DOMString? region;</webidl>
23480 The name of a country subdivision.
23484 For example, State (United States) or Province (Spain).
23491 <Type type="DOMString" nullable="nullable"/>
23493 <Attribute name="city" id="::Contact::ContactAddress::city">
23494 <webidl> attribute DOMString? city;</webidl>
23497 The name of the locality. For example, the city, county, town, or village.
23503 <Type type="DOMString" nullable="nullable"/>
23505 <Attribute name="streetAddress" id="::Contact::ContactAddress::streetAddress">
23506 <webidl> attribute DOMString? streetAddress;</webidl>
23509 The street address, for example, building number and street name/number.
23515 <Type type="DOMString" nullable="nullable"/>
23517 <Attribute name="additionalInformation" id="::Contact::ContactAddress::additionalInformation">
23518 <webidl> attribute DOMString? additionalInformation;</webidl>
23521 An attribute to capture any other address details that are required for an accurate address.
23522 For example, floor number, apartment number, suite name, the name of an office occupant, etc.
23528 <Type type="DOMString" nullable="nullable"/>
23530 <Attribute name="postalCode" id="::Contact::ContactAddress::postalCode">
23531 <webidl> attribute DOMString? postalCode;</webidl>
23534 The postal code of the location (also known as the zip code in the US).
23540 <Type type="DOMString" nullable="nullable"/>
23542 <Attribute name="isDefault" id="::Contact::ContactAddress::isDefault">
23543 <webidl> attribute boolean isDefault;</webidl>
23546 The default state of an address.
23550 Indicates if the address was marked as <em>default</em> or not for the contact.
23551 The only one among addresses for a person can have default property,
23552 so that this attribute might be changed without explicit modification
23553 according to the policy of platform.
23556 It deals with the 'pref' TYPE on RFC 2426, Section 3.2.1
23559 By default, this attribute is set to <var>false</var>.
23566 <Type type="boolean"/>
23568 <Attribute name="types" id="::Contact::ContactAddress::types">
23569 <webidl> attribute DOMString[] types;</webidl>
23572 The case insensitive list of address types.
23576 For more details, see RFC 2426, Section 3.2.1.
23579 At least the following values must be supported:
23583 WORK - Indicates a work address </li>
23585 HOME - Indicates a home address </li>
23588 By default, this attribute is set to HOME.
23595 <Type type="array">
23596 <Type type="DOMString"/>
23600 <Interface name="ContactPhoneNumber" id="::Contact::ContactPhoneNumber">
23601 <webidl> [Constructor(DOMString number, optional DOMString[] types, optional boolean isDefault)]
23602 interface ContactPhoneNumber
23604 attribute DOMString number;
23606 attribute boolean isDefault;
23608 attribute DOMString[] types;
23612 The ContactPhoneNumber object that contains the number and the type of phone number.
23616 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.
23617 At searching by phoneNumber, matchflag "CONTAINS" provides a result set which is retrieved from normalized phoneNumber as searching value.
23620 For more details, see RFC 2426, Section 3.3.1
23626 <Code> var contactInit = {};
23627 var phoneNumber = new tizen.ContactPhoneNumber('123456789', ['WORK','VOICE'], true);
23628 contactInit.phoneNumbers = [phoneNumber];
23631 <ExtendedAttributeList>
23632 <ExtendedAttribute name="Constructor">
23633 <webidl>Constructor(DOMString number, optional DOMString[] types, optional boolean isDefault)</webidl>
23635 <Argument name="number">
23636 <Type type="DOMString"/>
23638 <Argument optional="optional" name="types">
23639 <Type type="array">
23640 <Type type="DOMString"/>
23643 <Argument optional="optional" name="isDefault">
23644 <Type type="boolean"/>
23647 </ExtendedAttribute>
23648 </ExtendedAttributeList>
23649 <Attribute name="number" id="::Contact::ContactPhoneNumber::number">
23650 <webidl> attribute DOMString number;</webidl>
23653 The full phone number.
23659 <Type type="DOMString"/>
23661 <Attribute name="isDefault" id="::Contact::ContactPhoneNumber::isDefault">
23662 <webidl> attribute boolean isDefault;</webidl>
23665 The default state of the phone number.
23669 Indicates if the phone number was marked as <em>default</em> or not for the contact.
23670 The only one among phone numbers for a person can have default property,
23671 so that this attribute might be changed without explicit modification
23672 according to the policy of platform.
23675 It deals with the 'pref' TYPE on RFC 2426, Section 3.3.1
23678 By default, this attribute is set to false.
23685 <Type type="boolean"/>
23687 <Attribute name="types" id="::Contact::ContactPhoneNumber::types">
23688 <webidl> attribute DOMString[] types;</webidl>
23691 The case insensitive list of phone types, as defined in RFC 2426.
23695 Specifies the intended use of the phone number.
23698 At least the following values must be supported:
23702 <var>WORK</var> - Indicates a work number </li>
23704 <var>HOME</var> - Indicates a home number </li>
23706 <var>VOICE</var> - Indicates a voice number (Default) </li>
23708 <var>FAX</var> - Indicates a facsimile number </li>
23710 <var>MSG</var> - Indicates a messaging service on the number </li>
23712 <var>CELL</var> - Indicates a cellular number </li>
23714 <var>PAGER</var> - Indicates a pager number </li>
23716 <var>BBS</var> - Indicates a bulletin board service number </li>
23718 <var>MODEM</var> - Indicates a MODEM number </li>
23720 <var>CAR</var> - Indicates a car-phone number </li>
23722 <var>ISDN</var> - Indicates an ISDN number </li>
23724 <var>VIDEO</var> - Indicates a video-phone number </li>
23726 <var>PCS</var> - Personal Communication Standard </li>
23733 <Type type="array">
23734 <Type type="DOMString"/>
23738 <Interface name="ContactEmailAddress" id="::Contact::ContactEmailAddress">
23739 <webidl> [Constructor(DOMString email, optional DOMString[] types, optional boolean isDefault)]
23740 interface ContactEmailAddress
23742 attribute DOMString email;
23744 attribute boolean isDefault;
23746 attribute DOMString[] types;
23750 The ContactEmailAddress object that contains the email address and the type of email address.
23754 For more details, see RFC 2426, Section 3.3.2.
23760 <Code> var contactInit = {};
23761 var email = new tizen.ContactEmailAddress('user@domain.com', ['WORK']);
23762 contactInit.emails = [email];
23765 <ExtendedAttributeList>
23766 <ExtendedAttribute name="Constructor">
23767 <webidl>Constructor(DOMString email, optional DOMString[] types, optional boolean isDefault)</webidl>
23769 <Argument name="email">
23770 <Type type="DOMString"/>
23772 <Argument optional="optional" name="types">
23773 <Type type="array">
23774 <Type type="DOMString"/>
23777 <Argument optional="optional" name="isDefault">
23778 <Type type="boolean"/>
23781 </ExtendedAttribute>
23782 </ExtendedAttributeList>
23783 <Attribute name="email" id="::Contact::ContactEmailAddress::email">
23784 <webidl> attribute DOMString email;</webidl>
23787 The full email address.
23793 <Type type="DOMString"/>
23795 <Attribute name="isDefault" id="::Contact::ContactEmailAddress::isDefault">
23796 <webidl> attribute boolean isDefault;</webidl>
23799 The default state of an email address.
23803 Indicates if the email address was marked as <em>default</em> or not for the contact.
23804 The only one among email addresses for a person can have default property,
23805 so that this attribute might be changed without explicit modification
23806 according to the policy of platform.
23809 It deals with the 'pref' TYPE on RFC 2426, Section 3.3.2
23812 By default, this attribute is set to false.
23819 <Type type="boolean"/>
23821 <Attribute name="types" id="::Contact::ContactEmailAddress::types">
23822 <webidl> attribute DOMString[] types;</webidl>
23825 The case insensitive list of email types.
23829 Specifies the intended use of the email address.
23832 At least the following values must be supported:
23836 WORK - Indicates a work email </li>
23838 HOME - Indicates a home email </li>
23840 MOBILE - Indicates a mobile email </li>
23843 By default, this attribute is set to WORK.
23850 <Type type="array">
23851 <Type type="DOMString"/>
23855 <Interface name="ContactGroup" id="::Contact::ContactGroup">
23856 <webidl> [Constructor(DOMString name, optional DOMString? ringtoneURI, optional DOMString? photoURI)]
23857 interface ContactGroup
23859 readonly attribute <ref>ContactGroupId</ref>? id;
23861 readonly attribute <ref>AddressBookId</ref>? addressBookId;
23863 attribute DOMString name;
23865 attribute DOMString? ringtoneURI;
23867 attribute DOMString? photoURI;
23869 readonly attribute DOMString readOnly;
23878 <Code> var addressbook = null;
23881 // Define the error callback for all the asynchronous calls
23882 function errorCB(err) {
23883 console.log( 'The following error occurred: ' + err.name);
23886 // Define the success callback for retrieving all the
23888 function addressBooksCB(addressbooks) {
23889 addressbook = addressbooks[0];
23891 group = new tizen.ContactGroup('Family', 'file://opt/media/Downloads/ring.mp3');
23893 console.log( 'The following error occurred while converting: ' + err.name);
23898 addressbook.addGroup(group);
23899 console.log('Group was added with ID ' + group.id);
23902 console.log( 'The following error occurred while adding: ' + err.name);
23906 tizen.contact.getAddressBooks(addressBooksCB, errorCB);
23910 <ExtendedAttributeList>
23911 <ExtendedAttribute name="Constructor">
23912 <webidl>Constructor(DOMString name, optional DOMString? ringtoneURI, optional DOMString? photoURI)</webidl>
23914 <Argument name="name">
23915 <Type type="DOMString"/>
23917 <Argument optional="optional" name="ringtoneURI">
23918 <Type type="DOMString" nullable="nullable"/>
23920 <Argument optional="optional" name="photoURI">
23921 <Type type="DOMString" nullable="nullable"/>
23924 </ExtendedAttribute>
23925 </ExtendedAttributeList>
23926 <Attribute readonly="readonly" name="id" id="::Contact::ContactGroup::id">
23927 <webidl> readonly attribute <ref>ContactGroupId</ref>? id;</webidl>
23930 The identifier of a group.
23934 By default, this attribute is set to <var>null</var>.
23941 <Type name="ContactGroupId" nullable="nullable"/>
23943 <Attribute readonly="readonly" name="addressBookId" id="::Contact::ContactGroup::addressBookId">
23944 <webidl> readonly attribute <ref>AddressBookId</ref>? addressBookId;</webidl>
23947 The identifier of the address book that the group belongs to.
23951 By default, this attribute is set to <var>null</var>.
23958 <Type name="AddressBookId" nullable="nullable"/>
23960 <Attribute name="name" id="::Contact::ContactGroup::name">
23961 <webidl> attribute DOMString name;</webidl>
23964 The name of a group.
23970 <Type type="DOMString"/>
23972 <Attribute name="ringtoneURI" id="::Contact::ContactGroup::ringtoneURI">
23973 <webidl> attribute DOMString? ringtoneURI;</webidl>
23976 The URI to the custom ringtone for a group.
23980 To specify a custom ringtone for a group.
23983 By default, this attribute is initialized to <var>null</var>.
23984 This attribute only contains a local file URI.
23991 <Type type="DOMString" nullable="nullable"/>
23993 <Attribute name="photoURI" id="::Contact::ContactGroup::photoURI">
23994 <webidl> attribute DOMString? photoURI;</webidl>
23997 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.
24001 By default, this attribute is set to <var>null</var>.
24008 <Type type="DOMString" nullable="nullable"/>
24010 <Attribute readonly="readonly" name="readOnly" id="::Contact::ContactGroup::readOnly">
24011 <webidl> readonly attribute DOMString readOnly;</webidl>
24014 The flag indicating if the group can be modified / removed or not.
24015 Some groups cannot be edited if this flag sets to <var>true</var>.
24019 By default, this attribute is set to false.
24026 <Type type="DOMString"/>
24029 <Interface name="PersonArraySuccessCallback" id="::Contact::PersonArraySuccessCallback">
24030 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface PersonArraySuccessCallback {
24031 void onsuccess(<ref>Person</ref>[] persons);
24035 The success callback that is used for retrieving
24040 The success callback that takes an array of persons as an input
24041 argument. It is used in the asynchronous operation to
24042 get or save a list of persons.
24049 <ExtendedAttributeList>
24050 <ExtendedAttribute name="Callback" value="FunctionOnly">
24051 <webidl>Callback</webidl>
24052 </ExtendedAttribute>
24053 <ExtendedAttribute name="NoInterfaceObject">
24054 <webidl> NoInterfaceObject</webidl>
24055 </ExtendedAttribute>
24056 </ExtendedAttributeList>
24057 <Operation name="onsuccess" id="::Contact::PersonArraySuccessCallback::onsuccess">
24058 <webidl> void onsuccess(<ref>Person</ref>[] persons);</webidl>
24061 The method invoked when a list of persons is retrieved successfully.
24067 <Type type="void"/>
24069 <Argument name="persons">
24075 <Type type="array">
24076 <Type name="Person"/>
24082 <Interface name="ContactArraySuccessCallback" id="::Contact::ContactArraySuccessCallback">
24083 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ContactArraySuccessCallback {
24084 void onsuccess(<ref>Contact</ref>[] contacts);
24088 The success callback that is used for saving and retrieving
24089 a list of contacts.
24093 The success callback that takes an array of contacts as an input
24094 argument. It is used in the asynchronous operation to
24095 get or save a list of contacts.
24102 <ExtendedAttributeList>
24103 <ExtendedAttribute name="Callback" value="FunctionOnly">
24104 <webidl>Callback</webidl>
24105 </ExtendedAttribute>
24106 <ExtendedAttribute name="NoInterfaceObject">
24107 <webidl> NoInterfaceObject</webidl>
24108 </ExtendedAttribute>
24109 </ExtendedAttributeList>
24110 <Operation name="onsuccess" id="::Contact::ContactArraySuccessCallback::onsuccess">
24111 <webidl> void onsuccess(<ref>Contact</ref>[] contacts);</webidl>
24114 The method invoked when a list of contacts is retrieved successfully.
24120 <Type type="void"/>
24122 <Argument name="contacts">
24126 The Contacts that were successfully saved must have their identifiers set.
24129 <Type type="array">
24130 <Type name="Contact"/>
24136 <Interface name="AddressBookArraySuccessCallback" id="::Contact::AddressBookArraySuccessCallback">
24137 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface AddressBookArraySuccessCallback {
24138 void onsuccess(<ref>AddressBook</ref>[] addressbooks);
24142 The success callback when retrieving a list of AddressBooks.
24146 The success callback that takes an array of AddressBooks as an input
24147 argument. It is used in the asynchronous operation to
24155 <ExtendedAttributeList>
24156 <ExtendedAttribute name="Callback" value="FunctionOnly">
24157 <webidl>Callback</webidl>
24158 </ExtendedAttribute>
24159 <ExtendedAttribute name="NoInterfaceObject">
24160 <webidl> NoInterfaceObject</webidl>
24161 </ExtendedAttribute>
24162 </ExtendedAttributeList>
24163 <Operation name="onsuccess" id="::Contact::AddressBookArraySuccessCallback::onsuccess">
24164 <webidl> void onsuccess(<ref>AddressBook</ref>[] addressbooks);</webidl>
24167 The method invoked when a list of address books is retrieved successfully.
24173 <Type type="void"/>
24175 <Argument name="addressbooks">
24178 The address books to retrieve.
24181 <Type type="array">
24182 <Type name="AddressBook"/>
24188 <Interface name="AddressBookChangeCallback" id="::Contact::AddressBookChangeCallback">
24189 <webidl> [Callback, NoInterfaceObject] interface AddressBookChangeCallback {
24190 void oncontactsadded(<ref>Contact</ref>[] contacts);
24192 void oncontactsupdated(<ref>Contact</ref>[] contacts);
24194 void oncontactsremoved(<ref>ContactId</ref>[] contactIds);
24198 The interface for specifying the methods to be called for address book
24199 change notifications.
24203 This interface specifies a set of functions that will be invoked every time an address
24204 book change occurs (contact addition/update/deletion).
24211 <ExtendedAttributeList>
24212 <ExtendedAttribute name="Callback">
24213 <webidl>Callback</webidl>
24214 </ExtendedAttribute>
24215 <ExtendedAttribute name="NoInterfaceObject">
24216 <webidl> NoInterfaceObject</webidl>
24217 </ExtendedAttribute>
24218 </ExtendedAttributeList>
24219 <Operation name="oncontactsadded" id="::Contact::AddressBookChangeCallback::oncontactsadded">
24220 <webidl> void oncontactsadded(<ref>Contact</ref>[] contacts);</webidl>
24223 The method invoked when contacts are added to the address book.
24229 <Type type="void"/>
24231 <Argument name="contacts">
24234 A list of contacts to add.
24237 <Type type="array">
24238 <Type name="Contact"/>
24243 <Operation name="oncontactsupdated" id="::Contact::AddressBookChangeCallback::oncontactsupdated">
24244 <webidl> void oncontactsupdated(<ref>Contact</ref>[] contacts);</webidl>
24247 The method invoked when contacts are updated in the address book.
24253 <Type type="void"/>
24255 <Argument name="contacts">
24258 A list of contacts to update.
24261 <Type type="array">
24262 <Type name="Contact"/>
24267 <Operation name="oncontactsremoved" id="::Contact::AddressBookChangeCallback::oncontactsremoved">
24268 <webidl> void oncontactsremoved(<ref>ContactId</ref>[] contactIds);</webidl>
24271 The method invoked when contacts are deleted from the address book.
24277 <Type type="void"/>
24279 <Argument name="contactIds">
24282 A list of identifiers for the contacts to delete.
24285 <Type type="array">
24286 <Type name="ContactId"/>
24292 <Interface name="PersonsChangeCallback" id="::Contact::PersonsChangeCallback">
24293 <webidl> [Callback, NoInterfaceObject] interface PersonsChangeCallback {
24294 void onpersonsadded(<ref>Person</ref>[] persons);
24296 void onpersonsupdated(<ref>Person</ref>[] persons);
24298 void onpersonsremoved(<ref>PersonId</ref>[] personIds);
24302 The interface for specifying the methods to be called for change notifications.
24306 This interface specifies a set of functions that will be invoked every time person's
24307 list change occurs (person addition/update/deletion).
24314 <ExtendedAttributeList>
24315 <ExtendedAttribute name="Callback">
24316 <webidl>Callback</webidl>
24317 </ExtendedAttribute>
24318 <ExtendedAttribute name="NoInterfaceObject">
24319 <webidl> NoInterfaceObject</webidl>
24320 </ExtendedAttribute>
24321 </ExtendedAttributeList>
24322 <Operation name="onpersonsadded" id="::Contact::PersonsChangeCallback::onpersonsadded">
24323 <webidl> void onpersonsadded(<ref>Person</ref>[] persons);</webidl>
24326 The method invoked when persons are added to the person list.
24332 <Type type="void"/>
24334 <Argument name="persons">
24337 A list of persons to add.
24340 <Type type="array">
24341 <Type name="Person"/>
24346 <Operation name="onpersonsupdated" id="::Contact::PersonsChangeCallback::onpersonsupdated">
24347 <webidl> void onpersonsupdated(<ref>Person</ref>[] persons);</webidl>
24350 The method invoked when persons are updated in the person list.
24356 <Type type="void"/>
24358 <Argument name="persons">
24361 A list of persons to update.
24364 <Type type="array">
24365 <Type name="Person"/>
24370 <Operation name="onpersonsremoved" id="::Contact::PersonsChangeCallback::onpersonsremoved">
24371 <webidl> void onpersonsremoved(<ref>PersonId</ref>[] personIds);</webidl>
24374 The method invoked when persons are deleted from the person list.
24380 <Type type="void"/>
24382 <Argument name="personIds">
24385 A list of identifiers for the persons to delete.
24388 <Type type="array">
24389 <Type name="PersonId"/>
24396 <Module name="Content" id="::Content">
24397 <webidl>module Content {
24399 enum ContentDirectoryStorageType { "INTERNAL", "EXTERNAL" };
24401 enum ContentType { "IMAGE", "VIDEO", "AUDIO", "OTHER" };
24403 enum AudioContentLyricsType { "SYNCHRONIZED", "UNSYNCHRONIZED" };
24405 enum ImageContentOrientation { "NORMAL", "FLIP_HORIZONTAL", "ROTATE_180", "FLIP_VERTICAL", "TRANSPOSE", "ROTATE_90", "TRANSVERSE", "ROTATE_270" };
24407 typedef DOMString ContentId;
24409 typedef DOMString ContentDirectoryId;
24411 [NoInterfaceObject] interface ContentManagerObject {
24412 readonly attribute <ref>ContentManager</ref> content;
24414 <ref>Tizen</ref> implements <ref>ContentManagerObject</ref>;
24416 [NoInterfaceObject] interface ContentManager {
24418 void update(<ref>Content</ref> content) raises(<ref>WebAPIException</ref>);
24420 void updateBatch(<ref>Content</ref>[] contents,
24421 optional <ref>SuccessCallback</ref>? successCallback,
24422 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
24424 void getDirectories(<ref>ContentDirectoryArraySuccessCallback</ref> successCallback,
24425 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
24427 void find(<ref>ContentArraySuccessCallback</ref> successCallback,
24428 optional <ref>ErrorCallback</ref>? errorCallback,
24429 optional <ref>ContentDirectoryId</ref>? directoryId,
24430 optional <ref>AbstractFilter</ref>? filter,
24431 optional <ref>SortMode</ref>? sortMode,
24432 optional unsigned long? count,
24433 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);
24436 void scanFile(DOMString contentURI,
24437 optional <ref>ContentScanSuccessCallback</ref>? successCallback,
24438 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
24440 void setChangeListener(<ref>ContentChangeCallback</ref> changeCallback) raises(<ref>WebAPIException</ref>);
24442 void unsetChangeListener() raises(<ref>WebAPIException</ref>);
24446 [Callback=FunctionOnly, NoInterfaceObject] interface ContentArraySuccessCallback {
24447 void onsuccess(<ref>Content</ref>[] contents);
24450 [Callback=FunctionOnly, NoInterfaceObject] interface ContentDirectoryArraySuccessCallback {
24451 void onsuccess(<ref>ContentDirectory</ref>[] directories);
24454 [Callback=FunctionOnly, NoInterfaceObject] interface ContentScanSuccessCallback {
24455 void onsuccess(DOMString contentURI);
24458 [Callback, NoInterfaceObject] interface ContentChangeCallback {
24459 void oncontentadded(<ref>Content</ref> content);
24461 void oncontentupdated(<ref>Content</ref> content);
24463 void oncontentremoved(<ref>ContentId</ref> id);
24467 [NoInterfaceObject] interface ContentDirectory {
24469 readonly attribute <ref>ContentDirectoryId</ref> id;
24471 readonly attribute DOMString directoryURI;
24473 readonly attribute DOMString title;
24475 readonly attribute <ref>ContentDirectoryStorageType</ref> storageType;
24477 readonly attribute Date? modifiedDate;
24481 [NoInterfaceObject] interface Content {
24483 readonly attribute DOMString[] editableAttributes;
24485 readonly attribute <ref>ContentId</ref> id;
24487 attribute DOMString name;
24489 readonly attribute <ref>ContentType</ref> type;
24491 readonly attribute DOMString mimeType;
24493 readonly attribute DOMString title;
24495 readonly attribute DOMString contentURI;
24497 readonly attribute DOMString[]? thumbnailURIs;
24499 readonly attribute Date? releaseDate;
24501 readonly attribute Date? modifiedDate;
24503 readonly attribute unsigned long size;
24505 attribute DOMString? description;
24507 attribute unsigned long rating;
24510 [NoInterfaceObject] interface VideoContent : <ref>Content</ref> {
24512 attribute <ref>SimpleCoordinates</ref>? geolocation;
24514 readonly attribute DOMString? album;
24516 readonly attribute DOMString[]? artists;
24518 readonly attribute unsigned long duration;
24520 readonly attribute unsigned long width;
24522 readonly attribute unsigned long height;
24527 [NoInterfaceObject] interface AudioContentLyrics {
24529 readonly attribute <ref>AudioContentLyricsType</ref> type;
24531 readonly attribute unsigned long[] timestamps;
24533 readonly attribute DOMString[] texts;
24536 [NoInterfaceObject] interface AudioContent : <ref>Content</ref> {
24538 readonly attribute DOMString? album;
24540 readonly attribute DOMString[]? genres;
24542 readonly attribute DOMString[]? artists;
24544 readonly attribute DOMString[]? composers;
24546 readonly attribute <ref>AudioContentLyrics</ref>? lyrics;
24548 readonly attribute DOMString? copyright;
24550 readonly attribute unsigned long bitrate;
24552 readonly attribute unsigned short? trackNumber;
24554 readonly attribute unsigned long duration;
24558 [NoInterfaceObject] interface ImageContent : <ref>Content</ref> {
24560 attribute <ref>SimpleCoordinates</ref>? geolocation;
24562 readonly attribute unsigned long width;
24564 readonly attribute unsigned long height;
24566 attribute <ref>ImageContentOrientation</ref> orientation;
24572 This API provides functionality to discover contents such as images, videos, music, or other.
24576 It is possible to search for specific contents using filters.
24577 The API also supports setting attributes of specific contents.
24580 For more information on the Content features, see <a href="../../org.tizen.web.appprogramming/html/guide/content_guide/mediacontent.htm">Content Guide</a>.
24587 <Enum name="ContentDirectoryStorageType" id="::Content::ContentDirectoryStorageType">
24588 <webidl> enum ContentDirectoryStorageType { "INTERNAL", "EXTERNAL" };</webidl>
24592 Defines whether a content directory is stored on internal or external storage (such as a removable memory card).
24599 <EnumValue stringvalue="INTERNAL">
24600 <webidl> "INTERNAL</webidl>
24602 <EnumValue stringvalue="EXTERNAL">
24603 <webidl> "EXTERNAL</webidl>
24606 <Enum name="ContentType" id="::Content::ContentType">
24607 <webidl> enum ContentType { "IMAGE", "VIDEO", "AUDIO", "OTHER" };</webidl>
24611 Defines the type of content such as image, video, audio and other.
24618 "OTHER" type is added since 2.1.
24621 <EnumValue stringvalue="IMAGE">
24622 <webidl> "IMAGE</webidl>
24624 <EnumValue stringvalue="VIDEO">
24625 <webidl> "VIDEO</webidl>
24627 <EnumValue stringvalue="AUDIO">
24628 <webidl> "AUDIO</webidl>
24630 <EnumValue stringvalue="OTHER">
24631 <webidl> "OTHER</webidl>
24634 <Enum name="AudioContentLyricsType" id="::Content::AudioContentLyricsType">
24635 <webidl> enum AudioContentLyricsType { "SYNCHRONIZED", "UNSYNCHRONIZED" };</webidl>
24639 Defines whether the lyric supplied with an audio file is time-synchronized or not.
24646 <EnumValue stringvalue="SYNCHRONIZED">
24647 <webidl> "SYNCHRONIZED</webidl>
24649 <EnumValue stringvalue="UNSYNCHRONIZED">
24650 <webidl> "UNSYNCHRONIZED</webidl>
24653 <Enum name="ImageContentOrientation" id="::Content::ImageContentOrientation">
24654 <webidl> enum ImageContentOrientation { "NORMAL", "FLIP_HORIZONTAL", "ROTATE_180", "FLIP_VERTICAL", "TRANSPOSE", "ROTATE_90", "TRANSVERSE", "ROTATE_270" };</webidl>
24658 Defines an orientation of an image.
24665 <EnumValue stringvalue="NORMAL">
24666 <webidl> "NORMAL</webidl>
24668 <EnumValue stringvalue="FLIP_HORIZONTAL">
24669 <webidl> "FLIP_HORIZONTAL</webidl>
24671 <EnumValue stringvalue="ROTATE_180">
24672 <webidl> "ROTATE_180</webidl>
24674 <EnumValue stringvalue="FLIP_VERTICAL">
24675 <webidl> "FLIP_VERTICAL</webidl>
24677 <EnumValue stringvalue="TRANSPOSE">
24678 <webidl> "TRANSPOSE</webidl>
24680 <EnumValue stringvalue="ROTATE_90">
24681 <webidl> "ROTATE_90</webidl>
24683 <EnumValue stringvalue="TRANSVERSE">
24684 <webidl> "TRANSVERSE</webidl>
24686 <EnumValue stringvalue="ROTATE_270">
24687 <webidl> "ROTATE_270</webidl>
24690 <Typedef name="ContentId" id="::Content::ContentId">
24691 <webidl> typedef DOMString ContentId;</webidl>
24694 Content identifier.
24700 <Type type="DOMString"/>
24702 <Typedef name="ContentDirectoryId" id="::Content::ContentDirectoryId">
24703 <webidl> typedef DOMString ContentDirectoryId;</webidl>
24706 Content directory identifier.
24712 <Type type="DOMString"/>
24714 <Interface name="ContentManagerObject" id="::Content::ContentManagerObject">
24715 <webidl> [NoInterfaceObject] interface ContentManagerObject {
24716 readonly attribute <ref>ContentManager</ref> content;
24720 Defines what is instantiated by the Tizen object.
24724 There is a <em>tizen.content </em>object that allows accessing the functionality of the Content module.
24731 <ExtendedAttributeList>
24732 <ExtendedAttribute name="NoInterfaceObject">
24733 <webidl>NoInterfaceObject</webidl>
24734 </ExtendedAttribute>
24735 </ExtendedAttributeList>
24736 <Attribute readonly="readonly" name="content" id="::Content::ContentManagerObject::content">
24737 <webidl> readonly attribute <ref>ContentManager</ref> content;</webidl>
24738 <Type name="ContentManager"/>
24741 <Implements name1="Tizen" name2="ContentManagerObject">
24742 <webidl> <ref>Tizen</ref> implements <ref>ContentManagerObject</ref>;</webidl>
24744 <Interface name="ContentManager" id="::Content::ContentManager">
24745 <webidl> [NoInterfaceObject] interface ContentManager {
24747 void update(<ref>Content</ref> content) raises(<ref>WebAPIException</ref>);
24749 void updateBatch(<ref>Content</ref>[] contents,
24750 optional <ref>SuccessCallback</ref>? successCallback,
24751 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
24753 void getDirectories(<ref>ContentDirectoryArraySuccessCallback</ref> successCallback,
24754 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
24756 void find(<ref>ContentArraySuccessCallback</ref> successCallback,
24757 optional <ref>ErrorCallback</ref>? errorCallback,
24758 optional <ref>ContentDirectoryId</ref>? directoryId,
24759 optional <ref>AbstractFilter</ref>? filter,
24760 optional <ref>SortMode</ref>? sortMode,
24761 optional unsigned long? count,
24762 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);
24765 void scanFile(DOMString contentURI,
24766 optional <ref>ContentScanSuccessCallback</ref>? successCallback,
24767 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
24769 void setChangeListener(<ref>ContentChangeCallback</ref> changeCallback) raises(<ref>WebAPIException</ref>);
24771 void unsetChangeListener() raises(<ref>WebAPIException</ref>);
24776 This interface provides operations to retrieve and manipulate contents.
24782 <ExtendedAttributeList>
24783 <ExtendedAttribute name="NoInterfaceObject">
24784 <webidl>NoInterfaceObject</webidl>
24785 </ExtendedAttribute>
24786 </ExtendedAttributeList>
24787 <Operation name="update" id="::Content::ContentManager::update">
24788 <webidl> void update(<ref>Content</ref> content) raises(<ref>WebAPIException</ref>);</webidl>
24791 Updates attributes of the content in content database synchronously.
24795 When an application has changed some attributes of a content, this method allows
24796 writing it back to the content database.
24806 http://tizen.org/privilege/content.write
24809 The <em>editableAttributes </em>in <em>Content </em>interface indicates
24810 the attributes that can be changed.
24811 This API does not support updating the metadata of a file.
24813 <Code> // Assume the content is a Content object as a result of find method.
24814 // Check the description is editable, and then set a description.
24815 if (content.editableAttributes.indexOf("description") >= 0) {
24816 content.description = "Sample content";
24818 tizen.content.update(content);
24821 <Type type="void"/>
24823 <Argument name="content">
24826 The content to update.
24829 <Type name="Content"/>
24833 <RaiseException name="WebAPIException">
24836 with error type TypeMismatchError, if any input parameter
24837 is not compatible with the expected type for that parameter.
24840 with error type InvalidValuesError, if any of the input parameters
24841 contain an invalid value.
24844 with error type SecurityError, if the application does not have the privilege to call this method.
24847 with error type UnknownError in any other error case.
24853 <Operation name="updateBatch" id="::Content::ContentManager::updateBatch">
24854 <webidl> void updateBatch(<ref>Content</ref>[] contents,
24855 optional <ref>SuccessCallback</ref>? successCallback,
24856 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
24859 Updates a batch of content attributes in the content database synchronously.
24863 When an application has changed any attributes in array of content, this method allows writing them
24864 back to the content database.
24867 The errorCallback can be launched with any of these error types:
24871 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
24873 UnknownError: In any other error case. </li>
24883 http://tizen.org/privilege/content.write
24886 The <em>editableAttributes </em>in <em>Content </em>interface indicates
24887 the attributes that can be changed.
24888 This API does not support updating the metadata of a file.
24890 <Code> // The following example increases rating of an content by 1
24892 function errorCB(err) {
24893 console.log( 'The following error occurred: ' + err.name);
24896 function successCB() {
24897 console.log('Attributes set successfully');
24900 // Assume the content is a Content object as a result of find method.
24901 // Check the rating is editable, and then increase by 1.
24902 if (content.editableAttributes.indexOf("rating") >= 0) {
24905 tizen.content.updateBatch([content], successCB, errorCB);
24908 <Type type="void"/>
24910 <Argument name="contents">
24913 Array of content to change.
24916 <Type type="array">
24917 <Type name="Content"/>
24920 <Argument optional="optional" name="successCallback">
24923 Function called when attributes have been changed.
24926 <Type name="SuccessCallback" nullable="nullable"/>
24928 <Argument optional="optional" name="errorCallback">
24931 Function called when an error has occurred.
24934 <Type name="ErrorCallback" nullable="nullable"/>
24938 <RaiseException name="WebAPIException">
24941 with error type TypeMismatchError, if the input parameter
24942 is not compatible with the expected type for that parameter.
24945 with error type SecurityError, if the application does not have the privilege to call this method.
24951 <Operation name="getDirectories" id="::Content::ContentManager::getDirectories">
24952 <webidl> void getDirectories(<ref>ContentDirectoryArraySuccessCallback</ref> successCallback,
24953 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
24956 Gets a list of content directory.
24960 This method returns (via callback) a list of content directory objects. To obtain a list of contents
24961 in a specific directory, use find() method with the directory ID.
24964 The errorCallback is launched with this error type:
24968 UnknownError: In any other error case. </li>
24974 <Code> // The following example retrieves content directories in the storage.
24976 function errorCB(err) {
24977 console.log( 'The following error occurred: ' + err.name);
24980 function printDirectory(directory, index, directories) {
24981 console.log('directoryURI: ' + directory.directoryURI + ' Title: ' + directory.title);
24983 function getDirectoriesCB(directories) {
24984 directories.forEach(printDirectory);
24987 tizen.content.getDirectories(getDirectoriesCB, errorCB);
24990 <Type type="void"/>
24992 <Argument name="successCallback">
24995 Function called when content directories have been retrieved successfully.
24998 <Type name="ContentDirectoryArraySuccessCallback"/>
25000 <Argument optional="optional" name="errorCallback">
25003 Function called when an error has occurred.
25006 <Type name="ErrorCallback" nullable="nullable"/>
25010 <RaiseException name="WebAPIException">
25013 with error type TypeMismatchError, if the input parameter
25014 is not compatible with the expected type for that parameter.
25020 <Operation name="find" id="::Content::ContentManager::find">
25021 <webidl> void find(<ref>ContentArraySuccessCallback</ref> successCallback,
25022 optional <ref>ErrorCallback</ref>? errorCallback,
25023 optional <ref>ContentDirectoryId</ref>? directoryId,
25024 optional <ref>AbstractFilter</ref>? filter,
25025 optional <ref>SortMode</ref>? sortMode,
25026 optional unsigned long? count,
25027 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);</webidl>
25030 Finds contents that satisfy the conditions set by a filter.
25034 This method allows searching based on a supplied filter. For more detail on AbstractFilter, see
25035 <a href="../../org.tizen.web.device.apireference/tizen/tizen.html#::Tizen::AbstractFilter">Tizen</a> module. The filter allows precise searching such
25036 as "return all songs by artist U2, ordered by name".
25039 The errorCallback can be launched with these error types:
25043 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
25045 UnknownError: In any other error case. </li>
25055 http://tizen.org/privilege/content.read
25057 <Code> // The following example retrieves all songs from the album "The Joshua Tree", by artist "U2", ordered by the track number.
25060 var sortMode = new tizen.SortMode("trackNumber", "ASC");
25061 var artistFilter = new tizen.AttributeFilter("artists", "EXACTLY", "U2");
25062 var albumFilter = new tizen.AttributeFilter("album", "EXACTLY", "The Joshua Tree");
25063 var filter = new tizen.CompositeFilter("INTERSECTION", [albumFilter, artistFilter]);
25065 function errorCB(err) {
25066 console.log( 'The following error occurred: ' + err.name);
25069 function printContent(content, index, contents) {
25070 console.log('Track: ' + content.trackNumber + ' Title: ' + content.title + 'Duration: ' + content.duration + 'URL: ' + content.contentURI + 'MIME: ' + content.mimeType);
25073 function findCB(contents) {
25074 console.log('The Joshua Tree by U2:');
25075 contents.forEach(printContent);
25076 // Increase the offset as much as the count and then find content again.
25077 if (contents.length == count) {
25079 tizen.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
25083 tizen.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
25087 <Type type="void"/>
25089 <Argument name="successCallback">
25092 Function called when a content have been retrieved.
25095 <Type name="ContentArraySuccessCallback"/>
25097 <Argument optional="optional" name="errorCallback">
25100 Function called when an error has occurred.
25103 <Type name="ErrorCallback" nullable="nullable"/>
25105 <Argument optional="optional" name="directoryId">
25108 Directory ID that is use to select content to retrieve in a specified directory.
25111 <Type name="ContentDirectoryId" nullable="nullable"/>
25113 <Argument optional="optional" name="filter">
25116 Filter that is used to select content to retrieve.
25119 <Type name="AbstractFilter" nullable="nullable"/>
25121 <Argument optional="optional" name="sortMode">
25124 Used to determine the sort order in which the content are returned.
25127 <Type name="SortMode" nullable="nullable"/>
25129 <Argument optional="optional" name="count">
25132 Maximum amount of content to return.
25135 <Type type="unsigned long" nullable="nullable"/>
25137 <Argument optional="optional" name="offset">
25140 Offset of the result set.
25143 <Type type="unsigned long" nullable="nullable"/>
25147 <RaiseException name="WebAPIException">
25150 with error type TypeMismatchError, if the input parameter
25151 is not compatible with the expected type for that parameter.
25154 with error type SecurityError, if the application does not have the privilege to call this method.
25157 with error type NotSupportedError, if this feature is not supported.
25163 <Operation name="scanFile" id="::Content::ContentManager::scanFile">
25164 <webidl> void scanFile(DOMString contentURI,
25165 optional <ref>ContentScanSuccessCallback</ref>? successCallback,
25166 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
25169 Scan a file to create or update a content in the content database.
25173 When an application creates or updates a content, this method allows scan it
25174 to insert or update the content in the content database.
25184 http://tizen.org/privilege/content.write
25186 <Code> // The following example scan 'tizen.jpg' in media directory
25188 function errorCB(err) {
25189 console.log( 'The following error occurred: ' + err.name);
25192 function successCB(path) {
25193 console.log('scanning is completed');
25196 var path = "file:///opt/usr/media/tizen.jpg";
25197 tizen.content.scanFile(path, successCB, errorCB);
25201 <Type type="void"/>
25203 <Argument name="contentURI">
25206 The URI of content to scan.
25209 <Type type="DOMString"/>
25211 <Argument optional="optional" name="successCallback">
25214 Function called when scanning has been completed.
25217 <Type name="ContentScanSuccessCallback" nullable="nullable"/>
25219 <Argument optional="optional" name="errorCallback">
25222 Function called when an error has occurred.
25225 <Type name="ErrorCallback" nullable="nullable"/>
25229 <RaiseException name="WebAPIException">
25232 with error type TypeMismatchError, if any input parameter
25233 is not compatible with the expected type for that parameter.
25236 with error type InvalidValuesError, if any of the input parameters
25237 contain an invalid value.
25240 with error type SecurityError, if the application does not have the privilege to call this method.
25243 with error type UnknownError in any other error case.
25249 <Operation name="setChangeListener" id="::Content::ContentManager::setChangeListener">
25250 <webidl> void setChangeListener(<ref>ContentChangeCallback</ref> changeCallback) raises(<ref>WebAPIException</ref>);</webidl>
25253 Sets a listener to receive notifications about content changes.
25262 http://tizen.org/privilege/content.read
25264 <Code> var listener= {
25265 oncontentadded: function(content) {
25266 console.log(content.contentURI + ' content is added');
25268 oncontentupdated: function(content) {
25269 console.log(content.contentURI + ' content is updated');
25271 oncontentremoved: function(id) {
25272 console.log(id + ' is removed');
25276 // Registers to be notified when the content changes
25277 tizen.content.setChangeListener(listener);
25281 <Type type="void"/>
25283 <Argument name="changeCallback">
25286 A callback to be invoked for receiving content change notification.
25289 <Type name="ContentChangeCallback"/>
25293 <RaiseException name="WebAPIException">
25296 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
25299 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
25302 with error type SecurityError, if the application does not have the privilege to call this method.
25305 with error type UnknownError, if any other error occurs.
25311 <Operation name="unsetChangeListener" id="::Content::ContentManager::unsetChangeListener">
25312 <webidl> void unsetChangeListener() raises(<ref>WebAPIException</ref>);</webidl>
25315 Unsets the listener to unsubscribes from receiving notification for any content changes.
25324 http://tizen.org/privilege/content.read
25326 <Code> tizen.content.unsetChangeListener();
25330 <Type type="void"/>
25333 <RaiseException name="WebAPIException">
25336 with error type SecurityError, if the application does not have the privilege to call this method.
25339 with error type UnknownError if any other error occurs.
25346 <Interface name="ContentArraySuccessCallback" id="::Content::ContentArraySuccessCallback">
25347 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ContentArraySuccessCallback {
25348 void onsuccess(<ref>Content</ref>[] contents);
25352 The callback function used to return a list of content objects.
25358 <ExtendedAttributeList>
25359 <ExtendedAttribute name="Callback" value="FunctionOnly">
25360 <webidl>Callback</webidl>
25361 </ExtendedAttribute>
25362 <ExtendedAttribute name="NoInterfaceObject">
25363 <webidl> NoInterfaceObject</webidl>
25364 </ExtendedAttribute>
25365 </ExtendedAttributeList>
25366 <Operation name="onsuccess" id="::Content::ContentArraySuccessCallback::onsuccess">
25367 <webidl> void onsuccess(<ref>Content</ref>[] contents);</webidl>
25370 Called when the list of content is retrieved successfully.
25376 <Type type="void"/>
25378 <Argument name="contents">
25381 The array of <em>Content </em>objects.
25384 <Type type="array">
25385 <Type name="Content"/>
25391 <Interface name="ContentDirectoryArraySuccessCallback" id="::Content::ContentDirectoryArraySuccessCallback">
25392 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ContentDirectoryArraySuccessCallback {
25393 void onsuccess(<ref>ContentDirectory</ref>[] directories);
25397 The callback function used to return a list of ContentDirectory objects.
25403 <ExtendedAttributeList>
25404 <ExtendedAttribute name="Callback" value="FunctionOnly">
25405 <webidl>Callback</webidl>
25406 </ExtendedAttribute>
25407 <ExtendedAttribute name="NoInterfaceObject">
25408 <webidl> NoInterfaceObject</webidl>
25409 </ExtendedAttribute>
25410 </ExtendedAttributeList>
25411 <Operation name="onsuccess" id="::Content::ContentDirectoryArraySuccessCallback::onsuccess">
25412 <webidl> void onsuccess(<ref>ContentDirectory</ref>[] directories);</webidl>
25415 Called when the list of directory is retrieved successfully.
25421 <Type type="void"/>
25423 <Argument name="directories">
25426 The array of <em>ContentDirectory </em>objects.
25429 <Type type="array">
25430 <Type name="ContentDirectory"/>
25436 <Interface name="ContentScanSuccessCallback" id="::Content::ContentScanSuccessCallback">
25437 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ContentScanSuccessCallback {
25438 void onsuccess(DOMString contentURI);
25442 The callback function used to return a content to scan has been completed.
25448 <ExtendedAttributeList>
25449 <ExtendedAttribute name="Callback" value="FunctionOnly">
25450 <webidl>Callback</webidl>
25451 </ExtendedAttribute>
25452 <ExtendedAttribute name="NoInterfaceObject">
25453 <webidl> NoInterfaceObject</webidl>
25454 </ExtendedAttribute>
25455 </ExtendedAttributeList>
25456 <Operation name="onsuccess" id="::Content::ContentScanSuccessCallback::onsuccess">
25457 <webidl> void onsuccess(DOMString contentURI);</webidl>
25460 Called when the scanning has been completed.
25466 <Type type="void"/>
25468 <Argument name="contentURI">
25471 The URI of <em>Content </em>objects.
25474 <Type type="DOMString"/>
25479 <Interface name="ContentChangeCallback" id="::Content::ContentChangeCallback">
25480 <webidl> [Callback, NoInterfaceObject] interface ContentChangeCallback {
25481 void oncontentadded(<ref>Content</ref> content);
25483 void oncontentupdated(<ref>Content</ref> content);
25485 void oncontentremoved(<ref>ContentId</ref> id);
25489 This interface specifies a set of methods that are invoked every time a content change occurs.
25495 <ExtendedAttributeList>
25496 <ExtendedAttribute name="Callback">
25497 <webidl>Callback</webidl>
25498 </ExtendedAttribute>
25499 <ExtendedAttribute name="NoInterfaceObject">
25500 <webidl> NoInterfaceObject</webidl>
25501 </ExtendedAttribute>
25502 </ExtendedAttributeList>
25503 <Operation name="oncontentadded" id="::Content::ContentChangeCallback::oncontentadded">
25504 <webidl> void oncontentadded(<ref>Content</ref> content);</webidl>
25507 Called when content is added.
25513 <Type type="void"/>
25515 <Argument name="content">
25518 The content to add.
25521 <Type name="Content"/>
25525 <Operation name="oncontentupdated" id="::Content::ContentChangeCallback::oncontentupdated">
25526 <webidl> void oncontentupdated(<ref>Content</ref> content);</webidl>
25529 Called when content is updated.
25535 <Type type="void"/>
25537 <Argument name="content">
25540 The content to update.
25543 <Type name="Content"/>
25547 <Operation name="oncontentremoved" id="::Content::ContentChangeCallback::oncontentremoved">
25548 <webidl> void oncontentremoved(<ref>ContentId</ref> id);</webidl>
25551 Called when content is removed.
25557 <Type type="void"/>
25559 <Argument name="id">
25562 The id of content to remove.
25565 <Type name="ContentId"/>
25570 <Interface name="ContentDirectory" id="::Content::ContentDirectory">
25571 <webidl> [NoInterfaceObject] interface ContentDirectory {
25573 readonly attribute <ref>ContentDirectoryId</ref> id;
25575 readonly attribute DOMString directoryURI;
25577 readonly attribute DOMString title;
25579 readonly attribute <ref>ContentDirectoryStorageType</ref> storageType;
25581 readonly attribute Date? modifiedDate;
25586 This interface that provides access to properties of a content directory.
25592 <ExtendedAttributeList>
25593 <ExtendedAttribute name="NoInterfaceObject">
25594 <webidl>NoInterfaceObject</webidl>
25595 </ExtendedAttribute>
25596 </ExtendedAttributeList>
25597 <Attribute readonly="readonly" name="id" id="::Content::ContentDirectory::id">
25598 <webidl> readonly attribute <ref>ContentDirectoryId</ref> id;</webidl>
25601 The opaque content directory identifier.
25607 <Type name="ContentDirectoryId"/>
25609 <Attribute readonly="readonly" name="directoryURI" id="::Content::ContentDirectory::directoryURI">
25610 <webidl> readonly attribute DOMString directoryURI;</webidl>
25613 The directory path on the device.
25619 <Type type="DOMString"/>
25621 <Attribute readonly="readonly" name="title" id="::Content::ContentDirectory::title">
25622 <webidl> readonly attribute DOMString title;</webidl>
25625 The directory name.
25631 <Type type="DOMString"/>
25633 <Attribute readonly="readonly" name="storageType" id="::Content::ContentDirectory::storageType">
25634 <webidl> readonly attribute <ref>ContentDirectoryStorageType</ref> storageType;</webidl>
25637 The type of a device storage.
25643 <Type name="ContentDirectoryStorageType"/>
25645 <Attribute readonly="readonly" name="modifiedDate" id="::Content::ContentDirectory::modifiedDate">
25646 <webidl> readonly attribute Date? modifiedDate;</webidl>
25649 The last modified date for a directory.
25655 <Type type="Date" nullable="nullable"/>
25658 <Interface name="Content" id="::Content::Content">
25659 <webidl> [NoInterfaceObject] interface Content {
25661 readonly attribute DOMString[] editableAttributes;
25663 readonly attribute <ref>ContentId</ref> id;
25665 attribute DOMString name;
25667 readonly attribute <ref>ContentType</ref> type;
25669 readonly attribute DOMString mimeType;
25671 readonly attribute DOMString title;
25673 readonly attribute DOMString contentURI;
25675 readonly attribute DOMString[]? thumbnailURIs;
25677 readonly attribute Date? releaseDate;
25679 readonly attribute Date? modifiedDate;
25681 readonly attribute unsigned long size;
25683 attribute DOMString? description;
25685 attribute unsigned long rating;
25689 This interface provides access to properties of a content.
25695 <ExtendedAttributeList>
25696 <ExtendedAttribute name="NoInterfaceObject">
25697 <webidl>NoInterfaceObject</webidl>
25698 </ExtendedAttribute>
25699 </ExtendedAttributeList>
25700 <Attribute readonly="readonly" name="editableAttributes" id="::Content::Content::editableAttributes">
25701 <webidl> readonly attribute DOMString[] editableAttributes;</webidl>
25704 The list of attributes that can be editable to the local backend using update or updateBatch method.
25710 <Type type="array">
25711 <Type type="DOMString"/>
25714 <Attribute readonly="readonly" name="id" id="::Content::Content::id">
25715 <webidl> readonly attribute <ref>ContentId</ref> id;</webidl>
25718 The opaque content identifier.
25724 <Type name="ContentId"/>
25726 <Attribute name="name" id="::Content::Content::name">
25727 <webidl> attribute DOMString name;</webidl>
25730 The content name. The initial value is the file name of the content.
25736 <Type type="DOMString"/>
25738 <Attribute readonly="readonly" name="type" id="::Content::Content::type">
25739 <webidl> readonly attribute <ref>ContentType</ref> type;</webidl>
25748 <Type name="ContentType"/>
25750 <Attribute readonly="readonly" name="mimeType" id="::Content::Content::mimeType">
25751 <webidl> readonly attribute DOMString mimeType;</webidl>
25754 The content MIME type.
25760 <Type type="DOMString"/>
25762 <Attribute readonly="readonly" name="title" id="::Content::Content::title">
25763 <webidl> readonly attribute DOMString title;</webidl>
25772 <Type type="DOMString"/>
25774 <Attribute readonly="readonly" name="contentURI" id="::Content::Content::contentURI">
25775 <webidl> readonly attribute DOMString contentURI;</webidl>
25778 The URI to access the content.
25784 <Type type="DOMString"/>
25786 <Attribute readonly="readonly" name="thumbnailURIs" id="::Content::Content::thumbnailURIs">
25787 <webidl> readonly attribute DOMString[]? thumbnailURIs;</webidl>
25790 The array of content thumbnails URIs.
25796 <Type type="array" nullable="nullable">
25797 <Type type="DOMString"/>
25800 <Attribute readonly="readonly" name="releaseDate" id="::Content::Content::releaseDate">
25801 <webidl> readonly attribute Date? releaseDate;</webidl>
25804 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.
25810 <Type type="Date" nullable="nullable"/>
25812 <Attribute readonly="readonly" name="modifiedDate" id="::Content::Content::modifiedDate">
25813 <webidl> readonly attribute Date? modifiedDate;</webidl>
25816 The last modified date for a content.
25822 <Type type="Date" nullable="nullable"/>
25824 <Attribute readonly="readonly" name="size" id="::Content::Content::size">
25825 <webidl> readonly attribute unsigned long size;</webidl>
25828 The file size of the content in bytes.
25834 <Type type="unsigned long"/>
25836 <Attribute name="description" id="::Content::Content::description">
25837 <webidl> attribute DOMString? description;</webidl>
25840 The content description.
25846 <Type type="DOMString" nullable="nullable"/>
25848 <Attribute name="rating" id="::Content::Content::rating">
25849 <webidl> attribute unsigned long rating;</webidl>
25852 The content rating and this value can vary from <var>0 </var>to <var>10</var>.
25858 <Type type="unsigned long"/>
25861 <Interface name="VideoContent" id="::Content::VideoContent">
25862 <webidl> [NoInterfaceObject] interface VideoContent : <ref>Content</ref> {
25864 attribute <ref>SimpleCoordinates</ref>? geolocation;
25866 readonly attribute DOMString? album;
25868 readonly attribute DOMString[]? artists;
25870 readonly attribute unsigned long duration;
25872 readonly attribute unsigned long width;
25874 readonly attribute unsigned long height;
25879 This interface extends a basic <em>Content </em>object with video-specific attributes.
25885 <ExtendedAttributeList>
25886 <ExtendedAttribute name="NoInterfaceObject">
25887 <webidl>NoInterfaceObject</webidl>
25888 </ExtendedAttribute>
25889 </ExtendedAttributeList>
25890 <InterfaceInheritance>
25891 <Name name="Content"/>
25892 </InterfaceInheritance>
25893 <Attribute name="geolocation" id="::Content::VideoContent::geolocation">
25894 <webidl> attribute <ref>SimpleCoordinates</ref>? geolocation;</webidl>
25897 The geographical location where the video was made.
25903 <Type name="SimpleCoordinates" nullable="nullable"/>
25905 <Attribute readonly="readonly" name="album" id="::Content::VideoContent::album">
25906 <webidl> readonly attribute DOMString? album;</webidl>
25909 The album name to which the video belongs.
25915 <Type type="DOMString" nullable="nullable"/>
25917 <Attribute readonly="readonly" name="artists" id="::Content::VideoContent::artists">
25918 <webidl> readonly attribute DOMString[]? artists;</webidl>
25921 The list of artists who created the video.
25927 <Type type="array" nullable="nullable">
25928 <Type type="DOMString"/>
25931 <Attribute readonly="readonly" name="duration" id="::Content::VideoContent::duration">
25932 <webidl> readonly attribute unsigned long duration;</webidl>
25935 The video duration in milliseconds.
25941 <Type type="unsigned long"/>
25943 <Attribute readonly="readonly" name="width" id="::Content::VideoContent::width">
25944 <webidl> readonly attribute unsigned long width;</webidl>
25947 The width of a video in pixels.
25953 <Type type="unsigned long"/>
25955 <Attribute readonly="readonly" name="height" id="::Content::VideoContent::height">
25956 <webidl> readonly attribute unsigned long height;</webidl>
25959 The height of the video in pixels.
25965 <Type type="unsigned long"/>
25968 <Interface name="AudioContentLyrics" id="::Content::AudioContentLyrics">
25969 <webidl> [NoInterfaceObject] interface AudioContentLyrics {
25971 readonly attribute <ref>AudioContentLyricsType</ref> type;
25973 readonly attribute unsigned long[] timestamps;
25975 readonly attribute DOMString[] texts;
25979 This interface provides lyrics for music.
25985 <ExtendedAttributeList>
25986 <ExtendedAttribute name="NoInterfaceObject">
25987 <webidl>NoInterfaceObject</webidl>
25988 </ExtendedAttribute>
25989 </ExtendedAttributeList>
25990 <Attribute readonly="readonly" name="type" id="::Content::AudioContentLyrics::type">
25991 <webidl> readonly attribute <ref>AudioContentLyricsType</ref> type;</webidl>
25994 The type of lyrics, that is, whether they are synchronized with the music or not.
26000 <Type name="AudioContentLyricsType"/>
26002 <Attribute readonly="readonly" name="timestamps" id="::Content::AudioContentLyrics::timestamps">
26003 <webidl> readonly attribute unsigned long[] timestamps;</webidl>
26006 The array of timestamps in milliseconds for lyrics.
26010 If the lyrics are not synchronized (if there is no time information for the lyrics) the array is undefined.
26017 <Type type="array">
26018 <Type type="unsigned long"/>
26021 <Attribute readonly="readonly" name="texts" id="::Content::AudioContentLyrics::texts">
26022 <webidl> readonly attribute DOMString[] texts;</webidl>
26025 The array of lyric snippets.
26029 If the lyrics are not synchronized, the array has only one member with full lyrics.
26036 <Type type="array">
26037 <Type type="DOMString"/>
26041 <Interface name="AudioContent" id="::Content::AudioContent">
26042 <webidl> [NoInterfaceObject] interface AudioContent : <ref>Content</ref> {
26044 readonly attribute DOMString? album;
26046 readonly attribute DOMString[]? genres;
26048 readonly attribute DOMString[]? artists;
26050 readonly attribute DOMString[]? composers;
26052 readonly attribute <ref>AudioContentLyrics</ref>? lyrics;
26054 readonly attribute DOMString? copyright;
26056 readonly attribute unsigned long bitrate;
26058 readonly attribute unsigned short? trackNumber;
26060 readonly attribute unsigned long duration;
26065 This interface extends a basic <em>Content </em>object with audio-specific attributes.
26071 <ExtendedAttributeList>
26072 <ExtendedAttribute name="NoInterfaceObject">
26073 <webidl>NoInterfaceObject</webidl>
26074 </ExtendedAttribute>
26075 </ExtendedAttributeList>
26076 <InterfaceInheritance>
26077 <Name name="Content"/>
26078 </InterfaceInheritance>
26079 <Attribute readonly="readonly" name="album" id="::Content::AudioContent::album">
26080 <webidl> readonly attribute DOMString? album;</webidl>
26083 The album name to which the audio belongs.
26089 <Type type="DOMString" nullable="nullable"/>
26091 <Attribute readonly="readonly" name="genres" id="::Content::AudioContent::genres">
26092 <webidl> readonly attribute DOMString[]? genres;</webidl>
26095 The list of genres to which the audio belongs.
26101 <Type type="array" nullable="nullable">
26102 <Type type="DOMString"/>
26105 <Attribute readonly="readonly" name="artists" id="::Content::AudioContent::artists">
26106 <webidl> readonly attribute DOMString[]? artists;</webidl>
26109 The list of artists who created the audio.
26115 <Type type="array" nullable="nullable">
26116 <Type type="DOMString"/>
26119 <Attribute readonly="readonly" name="composers" id="::Content::AudioContent::composers">
26120 <webidl> readonly attribute DOMString[]? composers;</webidl>
26123 The list of composers for the music.
26129 <Type type="array" nullable="nullable">
26130 <Type type="DOMString"/>
26133 <Attribute readonly="readonly" name="lyrics" id="::Content::AudioContent::lyrics">
26134 <webidl> readonly attribute <ref>AudioContentLyrics</ref>? lyrics;</webidl>
26137 The lyrics of a song in an audio file.
26143 <Type name="AudioContentLyrics" nullable="nullable"/>
26145 <Attribute readonly="readonly" name="copyright" id="::Content::AudioContent::copyright">
26146 <webidl> readonly attribute DOMString? copyright;</webidl>
26149 The copyright information.
26155 <Type type="DOMString" nullable="nullable"/>
26157 <Attribute readonly="readonly" name="bitrate" id="::Content::AudioContent::bitrate">
26158 <webidl> readonly attribute unsigned long bitrate;</webidl>
26161 The audio bitrate in bits per second. By default, this value is 0.
26167 <Type type="unsigned long"/>
26169 <Attribute readonly="readonly" name="trackNumber" id="::Content::AudioContent::trackNumber">
26170 <webidl> readonly attribute unsigned short? trackNumber;</webidl>
26173 The track number if the audio belongs to an album.
26179 <Type type="unsigned short" nullable="nullable"/>
26181 <Attribute readonly="readonly" name="duration" id="::Content::AudioContent::duration">
26182 <webidl> readonly attribute unsigned long duration;</webidl>
26185 The audio duration in milliseconds.
26191 <Type type="unsigned long"/>
26194 <Interface name="ImageContent" id="::Content::ImageContent">
26195 <webidl> [NoInterfaceObject] interface ImageContent : <ref>Content</ref> {
26197 attribute <ref>SimpleCoordinates</ref>? geolocation;
26199 readonly attribute unsigned long width;
26201 readonly attribute unsigned long height;
26203 attribute <ref>ImageContentOrientation</ref> orientation;
26208 This interface extends a basic <em>Content </em>object with image-specific attributes.
26214 <ExtendedAttributeList>
26215 <ExtendedAttribute name="NoInterfaceObject">
26216 <webidl>NoInterfaceObject</webidl>
26217 </ExtendedAttribute>
26218 </ExtendedAttributeList>
26219 <InterfaceInheritance>
26220 <Name name="Content"/>
26221 </InterfaceInheritance>
26222 <Attribute name="geolocation" id="::Content::ImageContent::geolocation">
26223 <webidl> attribute <ref>SimpleCoordinates</ref>? geolocation;</webidl>
26226 The geographical location where the image has been made.
26232 <Type name="SimpleCoordinates" nullable="nullable"/>
26234 <Attribute readonly="readonly" name="width" id="::Content::ImageContent::width">
26235 <webidl> readonly attribute unsigned long width;</webidl>
26238 The width of an image in pixels.
26244 <Type type="unsigned long"/>
26246 <Attribute readonly="readonly" name="height" id="::Content::ImageContent::height">
26247 <webidl> readonly attribute unsigned long height;</webidl>
26250 The height of an image in pixels.
26256 <Type type="unsigned long"/>
26258 <Attribute name="orientation" id="::Content::ImageContent::orientation">
26259 <webidl> attribute <ref>ImageContentOrientation</ref> orientation;</webidl>
26262 The image orientation.
26268 <Type name="ImageContentOrientation"/>
26272 <Module name="DataControl" id="::DataControl">
26273 <webidl>module DataControl {
26274 enum DataType { "MAP", "SQL"};
26276 [NoInterfaceObject] interface DataControlManagerObject {
26277 readonly attribute <ref>DataControlManager</ref> datacontrol;
26279 <ref>Tizen</ref> implements <ref>DataControlManagerObject</ref>;
26282 [NoInterfaceObject] interface DataControlManager {
26283 <ref>DataControlConsumerObject</ref> getDataControlConsumer(DOMString providerId, DOMString dataId, <ref>DataType</ref> type) raises(<ref>WebAPIException</ref>);
26287 [NoInterfaceObject] interface DataControlConsumerObject {
26288 readonly attribute <ref>DataType</ref> type;
26289 readonly attribute DOMString providerId;
26290 readonly attribute DOMString dataId;
26294 [NoInterfaceObject] interface SQLDataControlConsumer : <ref>DataControlConsumerObject</ref> {
26295 void insert(unsigned long reqId, <ref>RowData</ref> insertionData,
26296 optional <ref>DataControlInsertSuccessCallback</ref>? successCallback,
26297 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26299 void update(unsigned long reqId, <ref>RowData</ref> updateData, DOMString where,
26300 optional <ref>DataControlSuccessCallback</ref>? successCallback,
26301 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26303 void remove(unsigned long reqId, DOMString where,
26304 optional <ref>DataControlSuccessCallback</ref>? successCallback,
26305 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26308 void select(unsigned long reqId, DOMString[] columns, DOMString where,
26309 <ref>DataControlSelectSuccessCallback</ref> successCallback, optional <ref>DataControlErrorCallback</ref>? errorCallback,
26310 optional unsigned long? page, optional unsigned long? maxNumberPerPage) raises(<ref>WebAPIException</ref>);
26313 [NoInterfaceObject] interface MappedDataControlConsumer : <ref>DataControlConsumerObject</ref> {
26314 void addValue(unsigned long reqId, DOMString key, DOMString value,
26315 optional <ref>DataControlSuccessCallback</ref>? successCallback,
26316 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26318 void removeValue(unsigned long reqId, DOMString key, DOMString value,
26319 <ref>DataControlSuccessCallback</ref> successCallback,
26320 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26322 void getValue(unsigned long reqId, DOMString key,
26323 <ref>DataControlGetValueSuccessCallback</ref> successCallback,
26324 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26326 void updateValue(unsigned long reqId, DOMString key, DOMString oldValue, DOMString newValue,
26327 <ref>DataControlSuccessCallback</ref> successCallback,
26328 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26332 [Callback=FunctionOnly, NoInterfaceObject] interface DataControlSuccessCallback {
26333 void onsuccess(unsigned long reqId);
26337 [Callback=FunctionOnly, NoInterfaceObject] interface DataControlErrorCallback {
26338 void onerror(unsigned long reqId, <ref>WebAPIError</ref> error);
26342 [Callback=FunctionOnly, NoInterfaceObject] interface DataControlInsertSuccessCallback {
26343 void onsuccess(unsigned long reqId, long insertRowId);
26348 [Callback=FunctionOnly, NoInterfaceObject] interface DataControlSelectSuccessCallback {
26349 void onsuccess(<ref>RowData</ref>[] rows, unsigned long reqId);
26353 [Callback=FunctionOnly, NoInterfaceObject] interface DataControlGetValueSuccessCallback {
26354 void onsuccess(DOMString[] values, unsigned long reqid);
26358 dictionary RowData {
26359 DOMString[] columns;
26360 DOMString[] values;
26365 This specification defines a DataControl API for applications.
26369 The DataControl functionality provides a way to access specific data that is exported by other applications.
26372 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.
26379 <Enum name="DataType" id="::DataControl::DataType">
26380 <webidl> enum DataType { "MAP", "SQL"};</webidl>
26389 <EnumValue stringvalue="MAP">
26390 <webidl> "MAP</webidl>
26392 <EnumValue stringvalue="SQL">
26393 <webidl> "SQL</webidl>
26396 <Interface name="DataControlManagerObject" id="::DataControl::DataControlManagerObject">
26397 <webidl> [NoInterfaceObject] interface DataControlManagerObject {
26398 readonly attribute <ref>DataControlManager</ref> datacontrol;
26402 Defines what is instantiated in the <em>Tizen</em> object.
26406 There is a <em>tizen.datacontrol</em> object that allows access to the
26414 <ExtendedAttributeList>
26415 <ExtendedAttribute name="NoInterfaceObject">
26416 <webidl>NoInterfaceObject</webidl>
26417 </ExtendedAttribute>
26418 </ExtendedAttributeList>
26419 <Attribute readonly="readonly" name="datacontrol" id="::DataControl::DataControlManagerObject::datacontrol">
26420 <webidl> readonly attribute <ref>DataControlManager</ref> datacontrol;</webidl>
26421 <Type name="DataControlManager"/>
26424 <Implements name1="Tizen" name2="DataControlManagerObject">
26425 <webidl> <ref>Tizen</ref> implements <ref>DataControlManagerObject</ref>;</webidl>
26427 <Interface name="DataControlManager" id="::DataControl::DataControlManager">
26428 <webidl> [NoInterfaceObject] interface DataControlManager {
26429 <ref>DataControlConsumerObject</ref> getDataControlConsumer(DOMString providerId, DOMString dataId, <ref>DataType</ref> type) raises(<ref>WebAPIException</ref>);
26433 This interface provides access to the <em>DataControlManager </em>object.
26439 <ExtendedAttributeList>
26440 <ExtendedAttribute name="NoInterfaceObject">
26441 <webidl>NoInterfaceObject</webidl>
26442 </ExtendedAttribute>
26443 </ExtendedAttributeList>
26444 <Operation name="getDataControlConsumer" id="::DataControl::DataControlManager::getDataControlConsumer">
26445 <webidl> <ref>DataControlConsumerObject</ref> getDataControlConsumer(DOMString providerId, DOMString dataId, <ref>DataType</ref> type) raises(<ref>WebAPIException</ref>);</webidl>
26448 Gets <em>DataControlConsumerObject</em> with a given DataType.
26457 http://tizen.org/privilege/datacontrol.consumer
26459 <Code> //The data provider, a native application, should be pre-installed and launched.
26460 //The same provider id should be defined for the use of this API between a native application(provider) and a web application(consumer).
26461 //In this example, DictionaryDataControlProvider native sample application is used as a data control provider.
26463 //Gets SQL type DataControlConsumerObject
26465 var globalSQLConsumer = tizen.datacontrol.getDataControlConsumer(
26466 "http://tizen.org/datacontrol/provider/DictionaryDataControlProvider", "Dictionary", "SQL");
26468 console.log (err.name +": " + err.message);
26470 // Gets MAP type DataControlConsumerObject
26472 globalMappedConsumer = tizen.datacontrol.getDataControlConsumer(
26473 "http://tizen.org/datacontrol/provider/DictionaryDataControlProvider", "Dictionary", "MAP");
26475 console.log (err.name +": " + err.message);
26479 <Type name="DataControlConsumerObject">
26482 DataControlConsumerObject The local <em>DataControlConsumerObject</em>.
26487 <Argument name="providerId">
26490 A provider ID to use and it should be shared between DataControl provider and DataControl consumer.
26493 <Type type="DOMString"/>
26495 <Argument name="dataId">
26498 A string for identifying a specific data.
26501 <Type type="DOMString"/>
26503 <Argument name="type">
26506 The DataType to use.
26509 <Type name="DataType"/>
26513 <RaiseException name="WebAPIException">
26516 with error type TypeMismatchError, if parameter type is mismatched.
26519 with error type SecurityError, if the application does not have the privilege to call this method.
26522 with error type UnknownError, if any other error occurs.
26529 <Interface name="DataControlConsumerObject" id="::DataControl::DataControlConsumerObject">
26530 <webidl> [NoInterfaceObject] interface DataControlConsumerObject {
26531 readonly attribute <ref>DataType</ref> type;
26532 readonly attribute DOMString providerId;
26533 readonly attribute DOMString dataId;
26537 This interface provides common attributes for other derived DataControlCunsumerObject.
26543 <ExtendedAttributeList>
26544 <ExtendedAttribute name="NoInterfaceObject">
26545 <webidl>NoInterfaceObject</webidl>
26546 </ExtendedAttribute>
26547 </ExtendedAttributeList>
26548 <Attribute readonly="readonly" name="type" id="::DataControl::DataControlConsumerObject::type">
26549 <webidl> readonly attribute <ref>DataType</ref> type;</webidl>
26552 An attribute to store the DataType.
26558 <Type name="DataType"/>
26560 <Attribute readonly="readonly" name="providerId" id="::DataControl::DataControlConsumerObject::providerId">
26561 <webidl> readonly attribute DOMString providerId;</webidl>
26564 An attribute to hold a provider identifier of the application whom it shares the DataControl with.
26565 This attribute should be known to users who want to interact with application to provide.
26571 <Type type="DOMString"/>
26573 <Attribute readonly="readonly" name="dataId" id="::DataControl::DataControlConsumerObject::dataId">
26574 <webidl> readonly attribute DOMString dataId;</webidl>
26577 The dataId identifies specific data, usually a database table to process(insert, delete, update).
26578 The string consists of one or more components, separated by a slash('/').
26584 <Type type="DOMString"/>
26587 <Interface name="SQLDataControlConsumer" id="::DataControl::SQLDataControlConsumer">
26588 <webidl> [NoInterfaceObject] interface SQLDataControlConsumer : <ref>DataControlConsumerObject</ref> {
26589 void insert(unsigned long reqId, <ref>RowData</ref> insertionData,
26590 optional <ref>DataControlInsertSuccessCallback</ref>? successCallback,
26591 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26593 void update(unsigned long reqId, <ref>RowData</ref> updateData, DOMString where,
26594 optional <ref>DataControlSuccessCallback</ref>? successCallback,
26595 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26597 void remove(unsigned long reqId, DOMString where,
26598 optional <ref>DataControlSuccessCallback</ref>? successCallback,
26599 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26602 void select(unsigned long reqId, DOMString[] columns, DOMString where,
26603 <ref>DataControlSelectSuccessCallback</ref> successCallback, optional <ref>DataControlErrorCallback</ref>? errorCallback,
26604 optional unsigned long? page, optional unsigned long? maxNumberPerPage) raises(<ref>WebAPIException</ref>);
26608 This interface defines SQL data type operatiors.
26614 <ExtendedAttributeList>
26615 <ExtendedAttribute name="NoInterfaceObject">
26616 <webidl>NoInterfaceObject</webidl>
26617 </ExtendedAttribute>
26618 </ExtendedAttributeList>
26619 <InterfaceInheritance>
26620 <Name name="DataControlConsumerObject"/>
26621 </InterfaceInheritance>
26622 <Operation name="insert" id="::DataControl::SQLDataControlConsumer::insert">
26623 <webidl> void insert(unsigned long reqId, <ref>RowData</ref> insertionData,
26624 optional <ref>DataControlInsertSuccessCallback</ref>? successCallback,
26625 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
26628 Inserts new rows into a table owned by an SQL-type data control provider.
26637 http://tizen.org/privilege/datacontrol.consumer
26639 <Code> function successcb(id)
26641 console.log("ok : reqid "+ id);
26644 function errorcb(id, error)
26646 console.log("error id : " + id + ", error msg : " + error.message);
26651 columns : ["WORD", "WORD_DESC"] ,
26652 values : ["'tizen1'", "'tizen2'"]
26654 // Defines globalReqId before
26655 // Increases globalReqId for uniqueness
26657 globalSQLConsumer.insert(globalReqId, rowData, successcb, errorcb);
26659 console.log (err.name +": " + err.message);
26663 <Type type="void"/>
26665 <Argument name="reqId">
26668 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.
26671 <Type type="unsigned long"/>
26673 <Argument name="insertionData">
26676 The data on columns and values to insert.
26679 <Type name="RowData"/>
26681 <Argument optional="optional" name="successCallback">
26684 The method to invoke when the asynchronous call completes successfully.
26687 <Type name="DataControlInsertSuccessCallback" nullable="nullable"/>
26689 <Argument optional="optional" name="errorCallback">
26692 The method to invoke when an error occurs.
26695 <Type name="DataControlErrorCallback" nullable="nullable"/>
26699 <RaiseException name="WebAPIException">
26702 with error type TypeMismatchError, if parameter type is not compatible with the expected type for that parameter.
26705 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.
26708 with error type IOError, if a DB operation has failed.
26711 with error type SecurityError, if the application does not have the privilege to call this method.
26714 with error type UnknownError, if any other error occurs.
26720 <Operation name="update" id="::DataControl::SQLDataControlConsumer::update">
26721 <webidl> void update(unsigned long reqId, <ref>RowData</ref> updateData, DOMString where,
26722 optional <ref>DataControlSuccessCallback</ref>? successCallback,
26723 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
26726 Updates values of a table owned by an SQL-type data control provider.
26735 http://tizen.org/privilege/datacontrol.consumer
26737 <Code> function successcb(id)
26739 console.log("ok : reqid " + id);
26742 function errorcb(id, error)
26744 console.log("error id : " + id + ", error msg : " + error.message);
26749 columns : ["WORD", "WORD_DESC"] ,
26750 values : ["'tizen1'", "'samsung platform!'"]
26752 // Defines globalReqId before
26753 // Increases globalReqId for uniqueness
26755 globalSQLConsumer.update(globalReqId, rowData, "WORD='tizen1'", successcb, errorcb);
26757 console.log (err.name +": " + err.message);
26761 <Type type="void"/>
26763 <Argument name="reqId">
26766 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.
26769 <Type type="unsigned long"/>
26771 <Argument name="updateData">
26774 The data on columns and values to update.
26777 <Type name="RowData"/>
26779 <Argument name="where">
26782 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>.
26785 <Type type="DOMString"/>
26787 <Argument optional="optional" name="successCallback">
26790 The method to invoke when the asynchronous call completes successfully.
26793 <Type name="DataControlSuccessCallback" nullable="nullable"/>
26795 <Argument optional="optional" name="errorCallback">
26798 The method to invoke when an error occurs.
26801 <Type name="DataControlErrorCallback" nullable="nullable"/>
26805 <RaiseException name="WebAPIException">
26808 with error type TypeMismatchError, if parameter type is not compatible with the expected type for that parameter.
26811 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.
26814 with error type IOError, if a DB operation has failed.
26817 with error type SecurityError, if the application does not have the privilege to call this method.
26820 with error type UnknownError, if any other error occurs.
26826 <Operation name="remove" id="::DataControl::SQLDataControlConsumer::remove">
26827 <webidl> void remove(unsigned long reqId, DOMString where,
26828 optional <ref>DataControlSuccessCallback</ref>? successCallback,
26829 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
26832 Delete rows from a table that is owned by an SQL-type data control provider.
26841 http://tizen.org/privilege/datacontrol.consumer
26843 <Code> function successcb(id)
26845 console.log("ok : reqid " + id);
26848 function errorcb(id, error)
26850 console.log("error id : " + id + ", error msg : " + error.message);
26854 // Defines globalReqId before
26855 // Increases globalReqId for uniqueness
26857 globalSQLConsumer.remove(globalReqId, "WORD='tizen1'", successcb, errorcb);
26859 console.log (err.name +": " + err.message);
26863 <Type type="void"/>
26865 <Argument name="reqId">
26868 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.
26871 <Type type="unsigned long"/>
26873 <Argument name="where">
26876 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>.
26879 <Type type="DOMString"/>
26881 <Argument optional="optional" name="successCallback">
26884 The method to invoke when the asynchronous call completes successfully.
26887 <Type name="DataControlSuccessCallback" nullable="nullable"/>
26889 <Argument optional="optional" name="errorCallback">
26892 The method to invoke when an error occurs.
26895 <Type name="DataControlErrorCallback" nullable="nullable"/>
26899 <RaiseException name="WebAPIException">
26902 with error type TypeMismatchError, if parameter type is not compatible with the expected type for that parameter.
26905 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.
26908 with error type IOError, if a DB operation has failed.
26911 with error type SecurityError, if the application does not have the privilege to call this method.
26914 with error type UnknownError, if any other error occurs.
26920 <Operation name="select" id="::DataControl::SQLDataControlConsumer::select">
26921 <webidl> void select(unsigned long reqId, DOMString[] columns, DOMString where,
26922 <ref>DataControlSelectSuccessCallback</ref> successCallback, optional <ref>DataControlErrorCallback</ref>? errorCallback,
26923 optional unsigned long? page, optional unsigned long? maxNumberPerPage) raises(<ref>WebAPIException</ref>);</webidl>
26926 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.
26935 http://tizen.org/privilege/datacontrol.consumer
26937 <Code> function getValueSuccessCB(result, id)
26939 var length = result.length;
26940 for (var i = 0; i < length; i++)
26943 for (j = 0; j < result[i].columns.length; j++)
26945 console.log("column: " + result[i].columns[j] + ", value: " + result[i].values[j]);
26950 function errorcb(id, error)
26952 console.log("error id : " + id + ", error msg : " + error.message);
26956 // Defines globalReqId before
26957 // Increases globalReqId for uniqueness
26958 var array = ["WORD", "WORD_DESC" ];
26960 globalSQLConsumer.select(globalReqId, array, "WORD='tizen1'", getValueSuccessCB, errorcb);
26963 console.log (err.name +": " + err.message);
26969 <Type type="void"/>
26971 <Argument name="reqId">
26974 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.
26977 <Type type="unsigned long"/>
26979 <Argument name="columns">
26982 The columns to select.
26985 <Type type="array">
26986 <Type type="DOMString"/>
26989 <Argument name="where">
26992 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>.
26995 <Type type="DOMString"/>
26997 <Argument name="successCallback">
27000 The method to invoke when the asynchronous call completes successfully.
27003 <Type name="DataControlSelectSuccessCallback"/>
27005 <Argument optional="optional" name="errorCallback">
27008 The method to invoke when an error occurs.
27011 <Type name="DataControlErrorCallback" nullable="nullable"/>
27013 <Argument optional="optional" name="page">
27016 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.
27019 <Type type="unsigned long" nullable="nullable"/>
27021 <Argument optional="optional" name="maxNumberPerPage">
27024 The maximum number of rows on a page.
27027 <Type type="unsigned long" nullable="nullable"/>
27031 <RaiseException name="WebAPIException">
27034 with error type TypeMismatchError, if parameter type is not compatible with the expected type for that parameter.
27037 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.
27040 with error type IOError, if a DB operation has failed.
27043 with error type SecurityError, if the application does not have the privilege to call this method.
27046 with error type UnknownError, if any other error occurs.
27053 <Interface name="MappedDataControlConsumer" id="::DataControl::MappedDataControlConsumer">
27054 <webidl> [NoInterfaceObject] interface MappedDataControlConsumer : <ref>DataControlConsumerObject</ref> {
27055 void addValue(unsigned long reqId, DOMString key, DOMString value,
27056 optional <ref>DataControlSuccessCallback</ref>? successCallback,
27057 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
27059 void removeValue(unsigned long reqId, DOMString key, DOMString value,
27060 <ref>DataControlSuccessCallback</ref> successCallback,
27061 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
27063 void getValue(unsigned long reqId, DOMString key,
27064 <ref>DataControlGetValueSuccessCallback</ref> successCallback,
27065 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
27067 void updateValue(unsigned long reqId, DOMString key, DOMString oldValue, DOMString newValue,
27068 <ref>DataControlSuccessCallback</ref> successCallback,
27069 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
27073 This interface defines MAP data type operators.
27079 <ExtendedAttributeList>
27080 <ExtendedAttribute name="NoInterfaceObject">
27081 <webidl>NoInterfaceObject</webidl>
27082 </ExtendedAttribute>
27083 </ExtendedAttributeList>
27084 <InterfaceInheritance>
27085 <Name name="DataControlConsumerObject"/>
27086 </InterfaceInheritance>
27087 <Operation name="addValue" id="::DataControl::MappedDataControlConsumer::addValue">
27088 <webidl> void addValue(unsigned long reqId, DOMString key, DOMString value,
27089 optional <ref>DataControlSuccessCallback</ref>? successCallback,
27090 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
27093 Adds the value associated with the specified key to a key-values map owned by MAP-type data control provider.
27102 http://tizen.org/privilege/datacontrol.consumer
27105 function successcb(id)
27107 console.log("ok : reqid " + id);
27110 function errorcb(id, error)
27112 console.log("error id : " + id + ", error msg : " + error.message);
27116 // Defines globalReqId before
27117 // Increases globalReqId for uniqueness
27119 globalMappedConsumer.addValue(globalReqId, "tizen", "samsung", successcb, errorcb);
27121 console.log (err.name +": " + err.message);
27125 <Type type="void"/>
27127 <Argument name="reqId">
27130 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.
27133 <Type type="unsigned long"/>
27135 <Argument name="key">
27138 The key to search a mapped data.
27141 <Type type="DOMString"/>
27143 <Argument name="value">
27146 The value to add into values array mapped by the key.
27149 <Type type="DOMString"/>
27151 <Argument optional="optional" name="successCallback">
27154 The method to invoke when the asynchronous call completes successfully.
27157 <Type name="DataControlSuccessCallback" nullable="nullable"/>
27159 <Argument optional="optional" name="errorCallback">
27162 The method to invoke when an error occurs.
27165 <Type name="DataControlErrorCallback" nullable="nullable"/>
27169 <RaiseException name="WebAPIException">
27172 with error type TypeMismatchError, if parameter type is not compatible with the expected type for that parameter.
27175 with error type InvalidValuesError, if the passed parameter is not available on data provider side or platform.
27178 with error type IOError, if a DB operation has failed.
27181 with error type SecurityError, if the application does not have the privilege to call this method.
27184 with error type UnknownError, if any other error occurs.
27190 <Operation name="removeValue" id="::DataControl::MappedDataControlConsumer::removeValue">
27191 <webidl> void removeValue(unsigned long reqId, DOMString key, DOMString value,
27192 <ref>DataControlSuccessCallback</ref> successCallback,
27193 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
27196 Removes the value associated with the specified key from a key-values map owned by MAP-type data control provider.
27205 http://tizen.org/privilege/datacontrol.consumer
27207 <Code> function successcb(id)
27209 console.log("ok : reqid " + id);
27212 function errorcb(id, error)
27214 console.log("error id : " + id + ", error msg : " + error.message);
27219 // Defines globalReqId before
27220 // Increases globalReqId for uniqueness
27222 globalMappedConsumer.removeValue(globalReqId, "tizen", "intel", successcb, errorcb);
27224 console.log (err.name +": " + err.message);
27228 <Type type="void"/>
27230 <Argument name="reqId">
27233 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.
27236 <Type type="unsigned long"/>
27238 <Argument name="key">
27241 The key to search a mapped data.
27244 <Type type="DOMString"/>
27246 <Argument name="value">
27249 The value to remove from a values array mapped by the key.
27252 <Type type="DOMString"/>
27254 <Argument name="successCallback">
27257 The method to invoke when the asynchronous call completes successfully.
27260 <Type name="DataControlSuccessCallback"/>
27262 <Argument optional="optional" name="errorCallback">
27265 The method to invoke when an error occurs.
27268 <Type name="DataControlErrorCallback" nullable="nullable"/>
27272 <RaiseException name="WebAPIException">
27275 with error type TypeMismatchError, if parameter type is not compatible with the expected type for that parameter.
27278 with error type InvalidValuesError, if the passed parameter is not available in data provider side or platform.
27281 with error type IOError, if a DB operation has failed.
27284 with error type NotFoundError, if the key cannot be found.
27287 with error type SecurityError, if the application does not have the privilege to call this method.
27290 with error type UnknownError, if any other error occurs.
27296 <Operation name="getValue" id="::DataControl::MappedDataControlConsumer::getValue">
27297 <webidl> void getValue(unsigned long reqId, DOMString key,
27298 <ref>DataControlGetValueSuccessCallback</ref> successCallback,
27299 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
27302 Gets value associated with the specified key, from a key-values map owned by MAP-type data control provider.
27311 http://tizen.org/privilege/datacontrol.consumer
27313 <Code> function getValueSuccessCB(result, id)
27315 console.log(result.length + ":" + result[0]);
27318 function errorcb(id, error)
27320 console.log("error id : " + id + ", error msg : " + error.message);
27324 // Defines globalReqId before
27325 // Increases globalReqId for uniqueness
27327 globalMappedConsumer.getValue(globalReqId, "tizen", getValueSuccessCB, errorcb);
27329 console.log (err.name +": " + err.message);
27333 <Type type="void"/>
27335 <Argument name="reqId">
27338 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.
27341 <Type type="unsigned long"/>
27343 <Argument name="key">
27346 The key to search a mapped data.
27349 <Type type="DOMString"/>
27351 <Argument name="successCallback">
27354 The method to invoke when the asynchronous call completes successfully.
27357 <Type name="DataControlGetValueSuccessCallback"/>
27359 <Argument optional="optional" name="errorCallback">
27362 The method to invoke when an error occurs.
27365 <Type name="DataControlErrorCallback" nullable="nullable"/>
27369 <RaiseException name="WebAPIException">
27372 with error type TypeMismatchError, if parameter type is not compatible with the expected type for that parameter.
27375 with error type InvalidValuesError, if the passed parameter is not available on data provider side or platform.
27378 with error type IOError, if a DB operation has failed.
27381 with error type NotFoundError, if the key cannot be found.
27384 with error type SecurityError, if the application does not have the privilege to call this method.
27387 with error type UnknownError, if any other error occurs.
27393 <Operation name="updateValue" id="::DataControl::MappedDataControlConsumer::updateValue">
27394 <webidl> void updateValue(unsigned long reqId, DOMString key, DOMString oldValue, DOMString newValue,
27395 <ref>DataControlSuccessCallback</ref> successCallback,
27396 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
27399 Sets the value associated with the specified key with a new value.
27408 http://tizen.org/privilege/datacontrol.consumer
27411 function successcb(id)
27413 console.log("ok : reqid " + id);
27416 function errorcb(id, error)
27418 console.log("error id : " + id + ", error msg : " + error.message);
27422 // Defines globalReqId before
27423 // Increases globalReqId for uniqueness
27425 globalMappedConsumer.updateValue(globalReqId, "tizen", "samsung", "intel", successcb, errorcb);
27427 console.log (err.name +": " + err.message);
27431 <Type type="void"/>
27433 <Argument name="reqId">
27436 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.
27439 <Type type="unsigned long"/>
27441 <Argument name="key">
27444 The key to search a mapped data.
27447 <Type type="DOMString"/>
27449 <Argument name="oldValue">
27452 The value to update in values array mapped by the key.
27455 <Type type="DOMString"/>
27457 <Argument name="newValue">
27460 The new value to replace in values array mapped by the key.
27463 <Type type="DOMString"/>
27465 <Argument name="successCallback">
27468 The method to invoke when the asynchronous call completes successfully.
27471 <Type name="DataControlSuccessCallback"/>
27473 <Argument optional="optional" name="errorCallback">
27476 The method to invoke when an error occurs.
27479 <Type name="DataControlErrorCallback" nullable="nullable"/>
27483 <RaiseException name="WebAPIException">
27486 with error type TypeMismatchError, if parameter type is not compatible with the expected type for that parameter.
27489 with error type InvalidValuesError, if the passed parameter is not available on data provider side or platform.
27492 with error type IOError, if a DB operation has failed.
27495 with error type NotFoundError, if the key cannot be found.
27498 with error type SecurityError, if the application does not have the privilege to call this method.
27501 with error type UnknownError, if any other error occurs.
27508 <Interface name="DataControlSuccessCallback" id="::DataControl::DataControlSuccessCallback">
27509 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface DataControlSuccessCallback {
27510 void onsuccess(unsigned long reqId);
27514 This interface provides a SuccessCallback for DataControlConsumerObject.
27520 <ExtendedAttributeList>
27521 <ExtendedAttribute name="Callback" value="FunctionOnly">
27522 <webidl>Callback</webidl>
27523 </ExtendedAttribute>
27524 <ExtendedAttribute name="NoInterfaceObject">
27525 <webidl> NoInterfaceObject</webidl>
27526 </ExtendedAttribute>
27527 </ExtendedAttributeList>
27528 <Operation name="onsuccess" id="::DataControl::DataControlSuccessCallback::onsuccess">
27529 <webidl> void onsuccess(unsigned long reqId);</webidl>
27530 <Type type="void"/>
27532 <Argument name="reqId">
27533 <Type type="unsigned long"/>
27538 <Interface name="DataControlErrorCallback" id="::DataControl::DataControlErrorCallback">
27539 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface DataControlErrorCallback {
27540 void onerror(unsigned long reqId, <ref>WebAPIError</ref> error);
27544 This interface provides a ErrorCallback for DataControlConsumerObject.
27550 <ExtendedAttributeList>
27551 <ExtendedAttribute name="Callback" value="FunctionOnly">
27552 <webidl>Callback</webidl>
27553 </ExtendedAttribute>
27554 <ExtendedAttribute name="NoInterfaceObject">
27555 <webidl> NoInterfaceObject</webidl>
27556 </ExtendedAttribute>
27557 </ExtendedAttributeList>
27558 <Operation name="onerror" id="::DataControl::DataControlErrorCallback::onerror">
27559 <webidl> void onerror(unsigned long reqId, <ref>WebAPIError</ref> error);</webidl>
27560 <Type type="void"/>
27562 <Argument name="reqId">
27563 <Type type="unsigned long"/>
27565 <Argument name="error">
27566 <Type name="WebAPIError"/>
27571 <Interface name="DataControlInsertSuccessCallback" id="::DataControl::DataControlInsertSuccessCallback">
27572 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface DataControlInsertSuccessCallback {
27573 void onsuccess(unsigned long reqId, long insertRowId);
27577 This interface provides a SuccessCallback for SQLDataControlConsumer.insert().
27583 <ExtendedAttributeList>
27584 <ExtendedAttribute name="Callback" value="FunctionOnly">
27585 <webidl>Callback</webidl>
27586 </ExtendedAttribute>
27587 <ExtendedAttribute name="NoInterfaceObject">
27588 <webidl> NoInterfaceObject</webidl>
27589 </ExtendedAttribute>
27590 </ExtendedAttributeList>
27591 <Operation name="onsuccess" id="::DataControl::DataControlInsertSuccessCallback::onsuccess">
27592 <webidl> void onsuccess(unsigned long reqId, long insertRowId);</webidl>
27601 <Type type="void"/>
27603 <Argument name="reqId">
27606 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.
27609 <Type type="unsigned long"/>
27611 <Argument name="insertRowId">
27614 The inserted row ID set by the data control provider if the specified providerResult is <var>true</var>, else <var>-1</var>.
27617 <Type type="long"/>
27622 <Interface name="DataControlSelectSuccessCallback" id="::DataControl::DataControlSelectSuccessCallback">
27623 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface DataControlSelectSuccessCallback {
27624 void onsuccess(<ref>RowData</ref>[] rows, unsigned long reqId);
27628 This interface provides a SuccessCallback for SQLDataControlConsumer.select().
27634 <ExtendedAttributeList>
27635 <ExtendedAttribute name="Callback" value="FunctionOnly">
27636 <webidl>Callback</webidl>
27637 </ExtendedAttribute>
27638 <ExtendedAttribute name="NoInterfaceObject">
27639 <webidl> NoInterfaceObject</webidl>
27640 </ExtendedAttribute>
27641 </ExtendedAttributeList>
27642 <Operation name="onsuccess" id="::DataControl::DataControlSelectSuccessCallback::onsuccess">
27643 <webidl> void onsuccess(<ref>RowData</ref>[] rows, unsigned long reqId);</webidl>
27652 <Type type="void"/>
27654 <Argument name="rows">
27657 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>.
27660 <Type type="array">
27661 <Type name="RowData"/>
27664 <Argument name="reqId">
27667 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.
27670 <Type type="unsigned long"/>
27675 <Interface name="DataControlGetValueSuccessCallback" id="::DataControl::DataControlGetValueSuccessCallback">
27676 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface DataControlGetValueSuccessCallback {
27677 void onsuccess(DOMString[] values, unsigned long reqid);
27681 This interface provides a SuccessCallback for MapDataControlConsumer.getValue().
27687 <ExtendedAttributeList>
27688 <ExtendedAttribute name="Callback" value="FunctionOnly">
27689 <webidl>Callback</webidl>
27690 </ExtendedAttribute>
27691 <ExtendedAttribute name="NoInterfaceObject">
27692 <webidl> NoInterfaceObject</webidl>
27693 </ExtendedAttribute>
27694 </ExtendedAttributeList>
27695 <Operation name="onsuccess" id="::DataControl::DataControlGetValueSuccessCallback::onsuccess">
27696 <webidl> void onsuccess(DOMString[] values, unsigned long reqid);</webidl>
27697 <Type type="void"/>
27699 <Argument name="values">
27700 <Type type="array">
27701 <Type type="DOMString"/>
27704 <Argument name="reqid">
27705 <Type type="unsigned long"/>
27710 <Dictionary name="RowData" id="::DataControl::RowData">
27711 <webidl> dictionary RowData {
27712 DOMString[] columns;
27713 DOMString[] values;
27717 The dictionary represents RowData holding 1 row of SQL selection results from another application.
27723 <DictionaryMember name="columns" id="::DataControl::RowData::columns">
27724 <webidl> DOMString[] columns;</webidl>
27727 An attribute to hold column names to select, update, and insert.
27733 <Type type="array">
27734 <Type type="DOMString"/>
27736 </DictionaryMember>
27737 <DictionaryMember name="values" id="::DataControl::RowData::values">
27738 <webidl> DOMString[] values;</webidl>
27741 An attribute to hold values of columns to select, update, and insert.
27747 <Type type="array">
27748 <Type type="DOMString"/>
27750 </DictionaryMember>
27753 <Module name="DataSynchronization" id="::DataSynchronization">
27754 <webidl>module DataSynchronization {
27756 typedef DOMString SyncProfileId;
27758 enum SyncMode { "MANUAL", "PERIODIC", "PUSH" };
27760 enum SyncType { "TWO_WAY", "SLOW", "ONE_WAY_FROM_CLIENT", "REFRESH_FROM_CLIENT", "ONE_WAY_FROM_SERVER", "REFRESH_FROM_SERVER" };
27762 enum SyncInterval { "5_MINUTES", "15_MINUTES", "1_HOUR", "4_HOURS", "12_HOURS", "1_DAY", "1_WEEK", "1_MONTH" };
27764 enum SyncServiceType { "CONTACT", "EVENT" };
27766 enum SyncStatus { "SUCCESS", "FAIL", "STOP", "NONE" };
27768 [NoInterfaceObject] interface DataSynchronizationManagerObject {
27769 readonly attribute <ref>DataSynchronizationManager</ref> datasync;
27772 <ref>Tizen</ref> implements <ref>DataSynchronizationManagerObject</ref>;
27774 [Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode),
27775 Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode, <ref>SyncType</ref> type),
27776 Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode, <ref>SyncInterval</ref> interval)]
27777 interface SyncInfo {
27778 attribute DOMString url;
27780 attribute DOMString id;
27782 attribute DOMString password;
27784 attribute <ref>SyncMode</ref> mode;
27786 attribute <ref>SyncType</ref>? type;
27788 attribute <ref>SyncInterval</ref>? interval;
27791 [Constructor(boolean enable, <ref>SyncServiceType</ref> serviceType, DOMString serverDatabaseUri, optional DOMString? id, optional DOMString? password)]
27792 interface SyncServiceInfo {
27793 attribute boolean enable;
27795 attribute <ref>SyncServiceType</ref> serviceType;
27797 attribute DOMString serverDatabaseUri;
27799 attribute DOMString? id;
27801 attribute DOMString? password;
27804 [Constructor(DOMString profileName, <ref>SyncInfo</ref> syncInfo, optional <ref>SyncServiceInfo</ref>[]? serviceInfo)]
27805 interface SyncProfileInfo {
27806 readonly attribute <ref>SyncProfileId</ref> profileId;
27808 attribute DOMString profileName;
27810 attribute <ref>SyncInfo</ref> syncInfo;
27812 attribute <ref>SyncServiceInfo</ref>[]? serviceInfo;
27815 [NoInterfaceObject] interface SyncStatistics {
27816 readonly attribute <ref>SyncStatus</ref> syncStatus;
27818 readonly attribute <ref>SyncServiceType</ref> serviceType;
27820 readonly attribute Date lastSyncTime;
27822 readonly attribute unsigned long serverToClientTotal;
27824 readonly attribute unsigned long serverToClientAdded;
27826 readonly attribute unsigned long serverToClientUpdated;
27828 readonly attribute unsigned long serverToClientRemoved;
27830 readonly attribute unsigned long clientToServerTotal;
27832 readonly attribute unsigned long clientToServerAdded;
27834 readonly attribute unsigned long clientToServerUpdated;
27836 readonly attribute unsigned long clientToServerRemoved;
27839 [NoInterfaceObject] interface DataSynchronizationManager {
27840 void add(<ref>SyncProfileInfo</ref> profile) raises(<ref>WebAPIException</ref>);
27842 void update(<ref>SyncProfileInfo</ref> profile) raises(<ref>WebAPIException</ref>);
27844 void remove(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);
27846 long getMaxProfilesNum() raises(<ref>WebAPIException</ref>);
27848 unsigned long getProfilesNum() raises(<ref>WebAPIException</ref>);
27850 <ref>SyncProfileInfo</ref> get(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);
27852 <ref>SyncProfileInfo</ref>[] getAll() raises(<ref>WebAPIException</ref>);
27854 void startSync(<ref>SyncProfileId</ref> profileId, optional <ref>SyncProgressCallback</ref>? progressCallback) raises(<ref>WebAPIException</ref>);
27856 void stopSync(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);
27858 <ref>SyncStatistics</ref>[] getLastSyncStatistics(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);
27861 [Callback, NoInterfaceObject] interface SyncProgressCallback {
27862 void onprogress(<ref>SyncProfileId</ref> profileId, <ref>SyncServiceType</ref> serviceType, boolean isFromServer, unsigned long totalPerService, unsigned long syncedPerService);
27864 void oncompleted(<ref>SyncProfileId</ref> profileId);
27866 void onstopped(<ref>SyncProfileId</ref> profileId);
27868 void onfailed(<ref>SyncProfileId</ref> profileId, <ref>WebAPIError</ref> error);
27873 This API provides methods to synchronize contact and event data to the server using the OMA DS 1.2 protocol.
27874 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>.
27880 <Typedef name="SyncProfileId" id="::DataSynchronization::SyncProfileId">
27881 <webidl> typedef DOMString SyncProfileId;</webidl>
27884 An attribute to uniquely identify a sync profile.
27890 <Type type="DOMString"/>
27892 <Enum name="SyncMode" id="::DataSynchronization::SyncMode">
27893 <webidl> enum SyncMode { "MANUAL", "PERIODIC", "PUSH" };</webidl>
27896 An enumerator that indicates the supported synchronization modes.
27900 The following values are supported:
27904 MANUAL - Indicates that the synchronization starts by manual trigger. The sync type should be specified. The default value is <em>TWO_WAY</em>. </li>
27906 PERIODIC - Indicates that the synchronization starts automatically by a preset period. The sync interval should be provided. </li>
27908 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>
27915 <EnumValue stringvalue="MANUAL">
27916 <webidl> "MANUAL</webidl>
27918 <EnumValue stringvalue="PERIODIC">
27919 <webidl> "PERIODIC</webidl>
27921 <EnumValue stringvalue="PUSH">
27922 <webidl> "PUSH</webidl>
27925 <Enum name="SyncType" id="::DataSynchronization::SyncType">
27926 <webidl> enum SyncType { "TWO_WAY", "SLOW", "ONE_WAY_FROM_CLIENT", "REFRESH_FROM_CLIENT", "ONE_WAY_FROM_SERVER", "REFRESH_FROM_SERVER" };</webidl>
27929 An enumerator that indicates the supported synchronization types.
27933 The following values are supported:
27937 TWO_WAY - Indicates a normal sync type in which the client and the server exchange information about modified data in these devices. </li>
27939 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>
27941 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>
27943 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>
27945 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>
27947 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>
27954 <EnumValue stringvalue="TWO_WAY">
27955 <webidl> "TWO_WAY</webidl>
27957 <EnumValue stringvalue="SLOW">
27958 <webidl> "SLOW</webidl>
27960 <EnumValue stringvalue="ONE_WAY_FROM_CLIENT">
27961 <webidl> "ONE_WAY_FROM_CLIENT</webidl>
27963 <EnumValue stringvalue="REFRESH_FROM_CLIENT">
27964 <webidl> "REFRESH_FROM_CLIENT</webidl>
27966 <EnumValue stringvalue="ONE_WAY_FROM_SERVER">
27967 <webidl> "ONE_WAY_FROM_SERVER</webidl>
27969 <EnumValue stringvalue="REFRESH_FROM_SERVER">
27970 <webidl> "REFRESH_FROM_SERVER</webidl>
27973 <Enum name="SyncInterval" id="::DataSynchronization::SyncInterval">
27974 <webidl> enum SyncInterval { "5_MINUTES", "15_MINUTES", "1_HOUR", "4_HOURS", "12_HOURS", "1_DAY", "1_WEEK", "1_MONTH" };</webidl>
27977 An enumerator that indicates the supported synchronization intervals.
27981 The following values are supported:
27985 5_MINUTES - Indicates a time period of 5 minutes. </li>
27987 15_MINUTES - Indicates a time period of 15 minutes. </li>
27989 1_HOUR - Indicates a time period of 1 hour. </li>
27991 4_HOURS - Indicates a time period of 4 hours. </li>
27993 12_HOURS - Indicates a time period of 12 hours. </li>
27995 1_DAY - Indicates a time period of 1 day. </li>
27997 1_WEEK - Indicates a time period of 1 week. </li>
27999 1_MONTH - Indicates a time period of 1 month. </li>
28006 <EnumValue stringvalue="5_MINUTES">
28007 <webidl> "5_MINUTES</webidl>
28009 <EnumValue stringvalue="15_MINUTES">
28010 <webidl> "15_MINUTES</webidl>
28012 <EnumValue stringvalue="1_HOUR">
28013 <webidl> "1_HOUR</webidl>
28015 <EnumValue stringvalue="4_HOURS">
28016 <webidl> "4_HOURS</webidl>
28018 <EnumValue stringvalue="12_HOURS">
28019 <webidl> "12_HOURS</webidl>
28021 <EnumValue stringvalue="1_DAY">
28022 <webidl> "1_DAY</webidl>
28024 <EnumValue stringvalue="1_WEEK">
28025 <webidl> "1_WEEK</webidl>
28027 <EnumValue stringvalue="1_MONTH">
28028 <webidl> "1_MONTH</webidl>
28031 <Enum name="SyncServiceType" id="::DataSynchronization::SyncServiceType">
28032 <webidl> enum SyncServiceType { "CONTACT", "EVENT" };</webidl>
28035 An enumerator that indicates the supported synchronization service type of the device.
28039 The following values are supported:
28043 CONTACT - Indicates the device contact records. </li>
28045 EVENT - Indicates the device calendar event records. </li>
28052 <EnumValue stringvalue="CONTACT">
28053 <webidl> "CONTACT</webidl>
28055 <EnumValue stringvalue="EVENT">
28056 <webidl> "EVENT</webidl>
28059 <Enum name="SyncStatus" id="::DataSynchronization::SyncStatus">
28060 <webidl> enum SyncStatus { "SUCCESS", "FAIL", "STOP", "NONE" };</webidl>
28063 An enumerator that indicates the last sync statuses.
28067 The following values are supported:
28071 SUCCESS - Indicates the sync is successful. </li>
28073 FAIL - Indicates the sync has failed. </li>
28075 STOP - Indicates the sync has been stopped by user's action. </li>
28077 NONE - Indicates the sync was never performed. </li>
28084 <EnumValue stringvalue="SUCCESS">
28085 <webidl> "SUCCESS</webidl>
28087 <EnumValue stringvalue="FAIL">
28088 <webidl> "FAIL</webidl>
28090 <EnumValue stringvalue="STOP">
28091 <webidl> "STOP</webidl>
28093 <EnumValue stringvalue="NONE">
28094 <webidl> "NONE</webidl>
28097 <Interface name="DataSynchronizationManagerObject" id="::DataSynchronization::DataSynchronizationManagerObject">
28098 <webidl> [NoInterfaceObject] interface DataSynchronizationManagerObject {
28099 readonly attribute <ref>DataSynchronizationManager</ref> datasync;
28103 This interface defines the default data synchronization manager that is instantiated by the <em>Tizen </em>object.
28104 There will be a <em>tizen.datasync</em> object that allows access to the functionality of the DataSynchronization API.
28110 <ExtendedAttributeList>
28111 <ExtendedAttribute name="NoInterfaceObject">
28112 <webidl>NoInterfaceObject</webidl>
28113 </ExtendedAttribute>
28114 </ExtendedAttributeList>
28115 <Attribute readonly="readonly" name="datasync" id="::DataSynchronization::DataSynchronizationManagerObject::datasync">
28116 <webidl> readonly attribute <ref>DataSynchronizationManager</ref> datasync;</webidl>
28117 <Type name="DataSynchronizationManager"/>
28120 <Implements name1="Tizen" name2="DataSynchronizationManagerObject">
28121 <webidl> <ref>Tizen</ref> implements <ref>DataSynchronizationManagerObject</ref>;</webidl>
28123 <Interface name="SyncInfo" id="::DataSynchronization::SyncInfo">
28124 <webidl> [Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode),
28125 Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode, <ref>SyncType</ref> type),
28126 Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode, <ref>SyncInterval</ref> interval)]
28127 interface SyncInfo {
28128 attribute DOMString url;
28130 attribute DOMString id;
28132 attribute DOMString password;
28134 attribute <ref>SyncMode</ref> mode;
28136 attribute <ref>SyncType</ref>? type;
28138 attribute <ref>SyncInterval</ref>? interval;
28142 This interface defines the sync information.
28148 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.
28151 <ExtendedAttributeList>
28152 <ExtendedAttribute name="Constructor">
28153 <webidl>Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode)</webidl>
28155 <Argument name="url">
28156 <Type type="DOMString"/>
28158 <Argument name="id">
28159 <Type type="DOMString"/>
28161 <Argument name="password">
28162 <Type type="DOMString"/>
28164 <Argument name="mode">
28165 <Type name="SyncMode"/>
28168 </ExtendedAttribute>
28169 <ExtendedAttribute name="Constructor">
28170 <webidl> Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode, <ref>SyncType</ref> type)</webidl>
28172 <Argument name="url">
28173 <Type type="DOMString"/>
28175 <Argument name="id">
28176 <Type type="DOMString"/>
28178 <Argument name="password">
28179 <Type type="DOMString"/>
28181 <Argument name="mode">
28182 <Type name="SyncMode"/>
28184 <Argument name="type">
28185 <Type name="SyncType"/>
28188 </ExtendedAttribute>
28189 <ExtendedAttribute name="Constructor">
28190 <webidl> Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode, <ref>SyncInterval</ref> interval)</webidl>
28192 <Argument name="url">
28193 <Type type="DOMString"/>
28195 <Argument name="id">
28196 <Type type="DOMString"/>
28198 <Argument name="password">
28199 <Type type="DOMString"/>
28201 <Argument name="mode">
28202 <Type name="SyncMode"/>
28204 <Argument name="interval">
28205 <Type name="SyncInterval"/>
28208 </ExtendedAttribute>
28209 </ExtendedAttributeList>
28210 <Attribute name="url" id="::DataSynchronization::SyncInfo::url">
28211 <webidl> attribute DOMString url;</webidl>
28214 An attribute to store the URL of the sync server.
28220 <Type type="DOMString"/>
28222 <Attribute name="id" id="::DataSynchronization::SyncInfo::id">
28223 <webidl> attribute DOMString id;</webidl>
28226 An attribute to store the login ID for the sync server.
28230 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.
28237 <Type type="DOMString"/>
28239 <Attribute name="password" id="::DataSynchronization::SyncInfo::password">
28240 <webidl> attribute DOMString password;</webidl>
28243 An attribute to store the login password to the sync server.
28247 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.
28254 <Type type="DOMString"/>
28256 <Attribute name="mode" id="::DataSynchronization::SyncInfo::mode">
28257 <webidl> attribute <ref>SyncMode</ref> mode;</webidl>
28260 An attribute to store the sync mode.
28266 <Type name="SyncMode"/>
28268 <Attribute name="type" id="::DataSynchronization::SyncInfo::type">
28269 <webidl> attribute <ref>SyncType</ref>? type;</webidl>
28272 An attribute to store the sync type.
28276 This attribute is used when the sync mode is set to <em>MANUAL</em> option.
28283 <Type name="SyncType" nullable="nullable"/>
28285 <Attribute name="interval" id="::DataSynchronization::SyncInfo::interval">
28286 <webidl> attribute <ref>SyncInterval</ref>? interval;</webidl>
28289 An attribute to store the sync interval.
28293 This attribute is used when the sync mode is set to <em>PERIODIC</em> option.
28300 <Type name="SyncInterval" nullable="nullable"/>
28303 <Interface name="SyncServiceInfo" id="::DataSynchronization::SyncServiceInfo">
28304 <webidl> [Constructor(boolean enable, <ref>SyncServiceType</ref> serviceType, DOMString serverDatabaseUri, optional DOMString? id, optional DOMString? password)]
28305 interface SyncServiceInfo {
28306 attribute boolean enable;
28308 attribute <ref>SyncServiceType</ref> serviceType;
28310 attribute DOMString serverDatabaseUri;
28312 attribute DOMString? id;
28314 attribute DOMString? password;
28318 This interface defines the sync service information.
28324 <ExtendedAttributeList>
28325 <ExtendedAttribute name="Constructor">
28326 <webidl>Constructor(boolean enable, <ref>SyncServiceType</ref> serviceType, DOMString serverDatabaseUri, optional DOMString? id, optional DOMString? password)</webidl>
28328 <Argument name="enable">
28329 <Type type="boolean"/>
28331 <Argument name="serviceType">
28332 <Type name="SyncServiceType"/>
28334 <Argument name="serverDatabaseUri">
28335 <Type type="DOMString"/>
28337 <Argument optional="optional" name="id">
28338 <Type type="DOMString" nullable="nullable"/>
28340 <Argument optional="optional" name="password">
28341 <Type type="DOMString" nullable="nullable"/>
28344 </ExtendedAttribute>
28345 </ExtendedAttributeList>
28346 <Attribute name="enable" id="::DataSynchronization::SyncServiceInfo::enable">
28347 <webidl> attribute boolean enable;</webidl>
28350 An attribute to enable or disable a service category for sync.
28356 <Type type="boolean"/>
28358 <Attribute name="serviceType" id="::DataSynchronization::SyncServiceInfo::serviceType">
28359 <webidl> attribute <ref>SyncServiceType</ref> serviceType;</webidl>
28362 An attribute to indicate the sync service type.
28368 <Type name="SyncServiceType"/>
28370 <Attribute name="serverDatabaseUri" id="::DataSynchronization::SyncServiceInfo::serverDatabaseUri">
28371 <webidl> attribute DOMString serverDatabaseUri;</webidl>
28374 An attribute to store the sync service DB URI of the server.
28380 <Type type="DOMString"/>
28382 <Attribute name="id" id="::DataSynchronization::SyncServiceInfo::id">
28383 <webidl> attribute DOMString? id;</webidl>
28386 An attribute to store the sync service DB access ID to the server.
28390 This is used only when the server requires a separate access right to each DB.
28391 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.
28398 <Type type="DOMString" nullable="nullable"/>
28400 <Attribute name="password" id="::DataSynchronization::SyncServiceInfo::password">
28401 <webidl> attribute DOMString? password;</webidl>
28404 An attribute to store the sync service DB access password to the server.
28408 This is used only when the server requires a separate access right to each DB.
28409 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.
28416 <Type type="DOMString" nullable="nullable"/>
28419 <Interface name="SyncProfileInfo" id="::DataSynchronization::SyncProfileInfo">
28420 <webidl> [Constructor(DOMString profileName, <ref>SyncInfo</ref> syncInfo, optional <ref>SyncServiceInfo</ref>[]? serviceInfo)]
28421 interface SyncProfileInfo {
28422 readonly attribute <ref>SyncProfileId</ref> profileId;
28424 attribute DOMString profileName;
28426 attribute <ref>SyncInfo</ref> syncInfo;
28428 attribute <ref>SyncServiceInfo</ref>[]? serviceInfo;
28432 This interface defines the sync profile information, based on which the synchronization is performed.
28438 <ExtendedAttributeList>
28439 <ExtendedAttribute name="Constructor">
28440 <webidl>Constructor(DOMString profileName, <ref>SyncInfo</ref> syncInfo, optional <ref>SyncServiceInfo</ref>[]? serviceInfo)</webidl>
28442 <Argument name="profileName">
28443 <Type type="DOMString"/>
28445 <Argument name="syncInfo">
28446 <Type name="SyncInfo"/>
28448 <Argument optional="optional" name="serviceInfo">
28449 <Type type="array" nullable="nullable">
28450 <Type name="SyncServiceInfo"/>
28454 </ExtendedAttribute>
28455 </ExtendedAttributeList>
28456 <Attribute readonly="readonly" name="profileId" id="::DataSynchronization::SyncProfileInfo::profileId">
28457 <webidl> readonly attribute <ref>SyncProfileId</ref> profileId;</webidl>
28460 An attribute to store the unique identifier provided by the platform for a profile that has been successfully added.
28466 <Type name="SyncProfileId"/>
28468 <Attribute name="profileName" id="::DataSynchronization::SyncProfileInfo::profileName">
28469 <webidl> attribute DOMString profileName;</webidl>
28472 An attribute to store the profile name.
28478 <Type type="DOMString"/>
28480 <Attribute name="syncInfo" id="::DataSynchronization::SyncProfileInfo::syncInfo">
28481 <webidl> attribute <ref>SyncInfo</ref> syncInfo;</webidl>
28484 An attribute to store the sync info.
28490 <Type name="SyncInfo"/>
28492 <Attribute name="serviceInfo" id="::DataSynchronization::SyncProfileInfo::serviceInfo">
28493 <webidl> attribute <ref>SyncServiceInfo</ref>[]? serviceInfo;</webidl>
28496 An attribute to indicate the service info.
28502 <Type type="array" nullable="nullable">
28503 <Type name="SyncServiceInfo"/>
28507 <Interface name="SyncStatistics" id="::DataSynchronization::SyncStatistics">
28508 <webidl> [NoInterfaceObject] interface SyncStatistics {
28509 readonly attribute <ref>SyncStatus</ref> syncStatus;
28511 readonly attribute <ref>SyncServiceType</ref> serviceType;
28513 readonly attribute Date lastSyncTime;
28515 readonly attribute unsigned long serverToClientTotal;
28517 readonly attribute unsigned long serverToClientAdded;
28519 readonly attribute unsigned long serverToClientUpdated;
28521 readonly attribute unsigned long serverToClientRemoved;
28523 readonly attribute unsigned long clientToServerTotal;
28525 readonly attribute unsigned long clientToServerAdded;
28527 readonly attribute unsigned long clientToServerUpdated;
28529 readonly attribute unsigned long clientToServerRemoved;
28533 This interface defines the sync statistics for a profile service.
28539 <ExtendedAttributeList>
28540 <ExtendedAttribute name="NoInterfaceObject">
28541 <webidl>NoInterfaceObject</webidl>
28542 </ExtendedAttribute>
28543 </ExtendedAttributeList>
28544 <Attribute readonly="readonly" name="syncStatus" id="::DataSynchronization::SyncStatistics::syncStatus">
28545 <webidl> readonly attribute <ref>SyncStatus</ref> syncStatus;</webidl>
28548 An attribute to store the last sync status for a corresponding service category.
28554 <Type name="SyncStatus"/>
28556 <Attribute readonly="readonly" name="serviceType" id="::DataSynchronization::SyncStatistics::serviceType">
28557 <webidl> readonly attribute <ref>SyncServiceType</ref> serviceType;</webidl>
28560 An attribute to indicate the sync service type.
28566 <Type name="SyncServiceType"/>
28568 <Attribute readonly="readonly" name="lastSyncTime" id="::DataSynchronization::SyncStatistics::lastSyncTime">
28569 <webidl> readonly attribute Date lastSyncTime;</webidl>
28572 An attribute to store the last sync time.
28578 <Type type="Date"/>
28580 <Attribute readonly="readonly" name="serverToClientTotal" id="::DataSynchronization::SyncStatistics::serverToClientTotal">
28581 <webidl> readonly attribute unsigned long serverToClientTotal;</webidl>
28584 An attribute to indicate the total number of items sent from the server to the client direction.
28590 <Type type="unsigned long"/>
28592 <Attribute readonly="readonly" name="serverToClientAdded" id="::DataSynchronization::SyncStatistics::serverToClientAdded">
28593 <webidl> readonly attribute unsigned long serverToClientAdded;</webidl>
28596 An attribute to indicate the number of added items from the server to the client direction.
28602 <Type type="unsigned long"/>
28604 <Attribute readonly="readonly" name="serverToClientUpdated" id="::DataSynchronization::SyncStatistics::serverToClientUpdated">
28605 <webidl> readonly attribute unsigned long serverToClientUpdated;</webidl>
28608 An attribute to indicate the number of updated items from the server to the client direction.
28614 <Type type="unsigned long"/>
28616 <Attribute readonly="readonly" name="serverToClientRemoved" id="::DataSynchronization::SyncStatistics::serverToClientRemoved">
28617 <webidl> readonly attribute unsigned long serverToClientRemoved;</webidl>
28620 An attribute to indicate the number of removed items from the server to the client direction.
28626 <Type type="unsigned long"/>
28628 <Attribute readonly="readonly" name="clientToServerTotal" id="::DataSynchronization::SyncStatistics::clientToServerTotal">
28629 <webidl> readonly attribute unsigned long clientToServerTotal;</webidl>
28632 An attribute to indicate the total number of items from the client to the server direction.
28638 <Type type="unsigned long"/>
28640 <Attribute readonly="readonly" name="clientToServerAdded" id="::DataSynchronization::SyncStatistics::clientToServerAdded">
28641 <webidl> readonly attribute unsigned long clientToServerAdded;</webidl>
28644 An attribute to indicate the number of added items from the client to the server direction.
28650 <Type type="unsigned long"/>
28652 <Attribute readonly="readonly" name="clientToServerUpdated" id="::DataSynchronization::SyncStatistics::clientToServerUpdated">
28653 <webidl> readonly attribute unsigned long clientToServerUpdated;</webidl>
28656 An attribute to indicate the number of updated items from the client to the server direction.
28662 <Type type="unsigned long"/>
28664 <Attribute readonly="readonly" name="clientToServerRemoved" id="::DataSynchronization::SyncStatistics::clientToServerRemoved">
28665 <webidl> readonly attribute unsigned long clientToServerRemoved;</webidl>
28668 An attribute to indicate the number of removed items from the client to the server direction.
28674 <Type type="unsigned long"/>
28677 <Interface name="DataSynchronizationManager" id="::DataSynchronization::DataSynchronizationManager">
28678 <webidl> [NoInterfaceObject] interface DataSynchronizationManager {
28679 void add(<ref>SyncProfileInfo</ref> profile) raises(<ref>WebAPIException</ref>);
28681 void update(<ref>SyncProfileInfo</ref> profile) raises(<ref>WebAPIException</ref>);
28683 void remove(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);
28685 long getMaxProfilesNum() raises(<ref>WebAPIException</ref>);
28687 unsigned long getProfilesNum() raises(<ref>WebAPIException</ref>);
28689 <ref>SyncProfileInfo</ref> get(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);
28691 <ref>SyncProfileInfo</ref>[] getAll() raises(<ref>WebAPIException</ref>);
28693 void startSync(<ref>SyncProfileId</ref> profileId, optional <ref>SyncProgressCallback</ref>? progressCallback) raises(<ref>WebAPIException</ref>);
28695 void stopSync(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);
28697 <ref>SyncStatistics</ref>[] getLastSyncStatistics(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);
28701 This interface allows managing profiles and synchronizing data between the server and the client device based on the stored profile information.
28707 <ExtendedAttributeList>
28708 <ExtendedAttribute name="NoInterfaceObject">
28709 <webidl>NoInterfaceObject</webidl>
28710 </ExtendedAttribute>
28711 </ExtendedAttributeList>
28712 <Operation name="add" id="::DataSynchronization::DataSynchronizationManager::add">
28713 <webidl> void add(<ref>SyncProfileInfo</ref> profile) raises(<ref>WebAPIException</ref>);</webidl>
28716 Adds a sync profile.
28720 The profile ID is provided when the profile is successfully added.
28730 http://tizen.org/privilege/datasync
28732 <Code> // Creates a sync info
28733 var syncInfo = new tizen.SyncInfo("http://example.com/sync", "myId", "myPassword", "MANUAL", "TWO_WAY");
28735 // Syncs both contacts and events
28736 var contactInfo = new tizen.SyncServiceInfo(true, "CONTACT", "serverContact");
28737 var eventInfo = new tizen.SyncServiceInfo(true, "EVENT", "serverEvent");
28738 var serviceInfo = [contactInfo, eventInfo];
28740 // Adds a profile to sync
28741 var profile = new tizen.SyncProfileInfo("MyProfile", syncInfo, serviceInfo);
28742 tizen.datasync.add(profile);
28745 <Type type="void"/>
28747 <Argument name="profile">
28750 The sync profile information to add.
28753 <Type name="SyncProfileInfo"/>
28757 <RaiseException name="WebAPIException">
28760 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
28763 with error type QuotaExceededError, if the platform has already reached the maximum number of profiles.
28766 with error type NotSupportedError, if this feature is not supported.
28769 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
28772 with error type SecurityError, if the application does not have the privilege to call this method.
28775 with error type UnknownError, if any other error occurs.
28781 <Operation name="update" id="::DataSynchronization::DataSynchronizationManager::update">
28782 <webidl> void update(<ref>SyncProfileInfo</ref> profile) raises(<ref>WebAPIException</ref>);</webidl>
28785 Updates an existing sync profile.
28794 http://tizen.org/privilege/datasync
28796 <Code> // Retrieves and updates a profile
28797 var profile = tizen.datasync.get(profileId);
28799 profile.profileName = "newProfileName";
28801 tizen.datasync.update(profile);
28804 <Type type="void"/>
28806 <Argument name="profile">
28809 The sync profile information to update.
28812 <Type name="SyncProfileInfo"/>
28816 <RaiseException name="WebAPIException">
28819 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
28822 with error type NotSupportedError, if this feature is not supported.
28825 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
28828 with error type SecurityError, if the application does not have the privilege to call this method.
28831 with error type UnknownError, if any other error occurs.
28837 <Operation name="remove" id="::DataSynchronization::DataSynchronizationManager::remove">
28838 <webidl> void remove(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);</webidl>
28841 Removes an existing sync profile.
28850 http://tizen.org/privilege/datasync
28852 <Code> // Removes a profile
28853 tizen.datasync.remove(profileId);
28856 <Type type="void"/>
28858 <Argument name="profileId">
28861 The sync profile ID to remove.
28864 <Type name="SyncProfileId"/>
28868 <RaiseException name="WebAPIException">
28871 with error type NotFoundError, if the identifier does not match any saved profile.
28874 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
28877 with error type NotSupportedError, if this feature is not supported.
28880 with error type SecurityError, if the application does not have the privilege to call this method.
28883 with error type UnknownError, if any other error occurs.
28889 <Operation name="getMaxProfilesNum" id="::DataSynchronization::DataSynchronizationManager::getMaxProfilesNum">
28890 <webidl> long getMaxProfilesNum() raises(<ref>WebAPIException</ref>);</webidl>
28893 Gets the maximum number of supported sync profiles on a platform.
28894 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.
28903 http://tizen.org/privilege/datasync
28905 <Code> // Gets the maximum number of supported profiles on the platform
28906 var numMaxProfiles = tizen.datasync.getMaxProfilesNum();
28912 long The number of supported profiles on a platform.
28918 <RaiseException name="WebAPIException">
28921 with error type NotSupportedError, if this feature is not supported.
28924 with error type SecurityError, if the application does not have the privilege to call this method.
28927 with error type UnknownError, if any other error occurs.
28933 <Operation name="getProfilesNum" id="::DataSynchronization::DataSynchronizationManager::getProfilesNum">
28934 <webidl> unsigned long getProfilesNum() raises(<ref>WebAPIException</ref>);</webidl>
28937 Gets the current number of sync profiles on a device.
28946 http://tizen.org/privilege/datasync
28948 <Code> // Gets the present number of profiles on the device
28949 var numProfiles = tizen.datasync.getProfilesNum();
28952 <Type type="unsigned long">
28955 unsigned long The current number of profiles on a device.
28961 <RaiseException name="WebAPIException">
28964 with error type NotSupportedError, if this feature is not supported.
28967 with error type SecurityError, if the application does not have the privilege to call this method.
28970 with error type UnknownError, if any other error occurs.
28976 <Operation name="get" id="::DataSynchronization::DataSynchronizationManager::get">
28977 <webidl> <ref>SyncProfileInfo</ref> get(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);</webidl>
28980 Gets the <em>SyncProfileInfo</em> object from a given profile ID.
28984 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>.
28994 http://tizen.org/privilege/datasync
28996 <Code> // Gets the profile information with the given ID
28997 var profile = tizen.datasync.get(profileId);
29000 <Type name="SyncProfileInfo">
29003 SyncProfileInfo The profile information of the given ID.
29008 <Argument name="profileId">
29011 The ID to use to get the profile information.
29014 <Type name="SyncProfileId"/>
29018 <RaiseException name="WebAPIException">
29021 with error type NotFoundError, if the identifier does not match any profile saved.
29024 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
29027 with error type NotSupportedError, if this feature is not supported.
29030 with error type SecurityError, if the application does not have the privilege to call this method.
29033 with error type UnknownError, if any other error occurs.
29039 <Operation name="getAll" id="::DataSynchronization::DataSynchronizationManager::getAll">
29040 <webidl> <ref>SyncProfileInfo</ref>[] getAll() raises(<ref>WebAPIException</ref>);</webidl>
29043 Gets the information of all sync profiles saved in a device.
29047 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>.
29057 http://tizen.org/privilege/datasync
29059 <Code> // Gets the all profile information
29060 var profiles = tizen.datasync.getAll();
29063 <Type type="array">
29066 SyncProfileInfo[] The profile information array.
29069 <Type name="SyncProfileInfo"/>
29073 <RaiseException name="WebAPIException">
29076 with error type NotSupportedError, if this feature is not supported.
29079 with error type SecurityError, if the application does not have the privilege to call this method.
29082 with error type UnknownError, if any other error occurs.
29088 <Operation name="startSync" id="::DataSynchronization::DataSynchronizationManager::startSync">
29089 <webidl> void startSync(<ref>SyncProfileId</ref> profileId, optional <ref>SyncProgressCallback</ref>? progressCallback) raises(<ref>WebAPIException</ref>);</webidl>
29092 Starts a sync operation with a given profile ID.
29096 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.
29106 http://tizen.org/privilege/datasync
29108 <Code> var profileId; //profileId obtained from SyncProfileInfo
29109 var syncCallback = {
29110 onprogress: function(profileId, serviceType, isFromServer, totalPerType, syncedPerType) {
29111 console.log('Total: ' + totalPerType + ', synced: ' + syncedPerType + ' for the sync type: ' + serviceType);
29113 onfailed: function(profileId, error) {
29114 console.log('Failed with id: ' + profileId + ', error name: ' + error.name);
29118 // Starts the sync operation with the corresponding callbacks
29119 tizen.datasync.startSync(profileId, syncCallback);
29122 <Type type="void"/>
29124 <Argument name="profileId">
29127 The profile ID with which to initiate the sync operation.
29130 <Type name="SyncProfileId"/>
29132 <Argument optional="optional" name="progressCallback">
29135 The method to invoke when the sync operation progresses or an error occurs.
29138 <Type name="SyncProgressCallback" nullable="nullable"/>
29142 <RaiseException name="WebAPIException">
29145 with error type NotFoundError, if the identifier does not match any profile saved.
29148 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
29151 with error type NotSupportedError, if this feature is not supported.
29154 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
29157 with error type SecurityError, if the application does not have the privilege to call this method.
29160 with error type UnknownError, if any other error occurs.
29166 <Operation name="stopSync" id="::DataSynchronization::DataSynchronizationManager::stopSync">
29167 <webidl> void stopSync(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);</webidl>
29170 Stops an ongoing sync operation that is specified by the <em>profileId</em> parameter.
29179 http://tizen.org/privilege/datasync
29181 <Code> var profileId; //profileId obtained from SyncProfileInfo
29182 // Stops the ongoing sync operation
29183 tizen.datasync.stopSync(profileId);
29186 <Type type="void"/>
29188 <Argument name="profileId">
29191 The ID of the ongoing sync operation to stop.
29194 <Type name="SyncProfileId"/>
29198 <RaiseException name="WebAPIException">
29201 with error type NotFoundError, if the identifier does not match any profile saved.
29204 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
29207 with error type NotSupportedError, if this feature is not supported.
29210 with error type SecurityError, if the application does not have the privilege to call this method.
29213 with error type UnknownError, if any other error occurs.
29219 <Operation name="getLastSyncStatistics" id="::DataSynchronization::DataSynchronizationManager::getLastSyncStatistics">
29220 <webidl> <ref>SyncStatistics</ref>[] getLastSyncStatistics(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);</webidl>
29223 Gets the sync statistics of a given profile ID.
29232 http://tizen.org/privilege/datasync
29234 <Code> var profileId; //profileId obtained from SyncProfileInfo
29235 // Gets the sync statistics information with the given ID
29236 var statistics = tizen.datasync.getLastSyncStatistics(profileId);
29239 <Type type="array">
29242 SyncStatictics[] The sync statistics information of a given ID.
29245 <Type name="SyncStatistics"/>
29248 <Argument name="profileId">
29251 The ID to use to get the sync statistics.
29254 <Type name="SyncProfileId"/>
29258 <RaiseException name="WebAPIException">
29261 with error type NotFoundError, if the identifier does not match any profile saved.
29264 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
29267 with error type NotSupportedError, if this feature is not supported.
29270 with error type SecurityError, if the application does not have the privilege to call this method.
29273 with error type UnknownError, if any other error occurs.
29280 <Interface name="SyncProgressCallback" id="::DataSynchronization::SyncProgressCallback">
29281 <webidl> [Callback, NoInterfaceObject] interface SyncProgressCallback {
29282 void onprogress(<ref>SyncProfileId</ref> profileId, <ref>SyncServiceType</ref> serviceType, boolean isFromServer, unsigned long totalPerService, unsigned long syncedPerService);
29284 void oncompleted(<ref>SyncProfileId</ref> profileId);
29286 void onstopped(<ref>SyncProfileId</ref> profileId);
29288 void onfailed(<ref>SyncProfileId</ref> profileId, <ref>WebAPIError</ref> error);
29292 This interface defines progress notification callbacks for the ongoing sync operation.
29298 <ExtendedAttributeList>
29299 <ExtendedAttribute name="Callback">
29300 <webidl>Callback</webidl>
29301 </ExtendedAttribute>
29302 <ExtendedAttribute name="NoInterfaceObject">
29303 <webidl> NoInterfaceObject</webidl>
29304 </ExtendedAttribute>
29305 </ExtendedAttributeList>
29306 <Operation name="onprogress" id="::DataSynchronization::SyncProgressCallback::onprogress">
29307 <webidl> void onprogress(<ref>SyncProfileId</ref> profileId, <ref>SyncServiceType</ref> serviceType, boolean isFromServer, unsigned long totalPerService, unsigned long syncedPerService);</webidl>
29310 Called when a synchronization operation is started and progress is made.
29314 The frequency of this callback invocation is dependent on the platform implementation.
29315 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.
29322 <Type type="void"/>
29324 <Argument name="profileId">
29327 The ID of the corresponding sync operation.
29330 <Type name="SyncProfileId"/>
29332 <Argument name="serviceType">
29335 The sync service category type.
29338 <Type name="SyncServiceType"/>
29340 <Argument name="isFromServer">
29343 The direction of the operation.<br/> If the direction of operation is from the server to the client, then value is<var> true</var>.
29346 <Type type="boolean"/>
29348 <Argument name="totalPerService">
29351 The total number of records to synchronize for the current sync service type aggregating all operations.
29354 <Type type="unsigned long"/>
29356 <Argument name="syncedPerService">
29359 The number of synchronized records for the current sync service type aggregating all operations.
29362 <Type type="unsigned long"/>
29366 <Operation name="oncompleted" id="::DataSynchronization::SyncProgressCallback::oncompleted">
29367 <webidl> void oncompleted(<ref>SyncProfileId</ref> profileId);</webidl>
29370 Called when the sync operation has completed.
29376 <Type type="void"/>
29378 <Argument name="profileId">
29381 The ID of the corresponding sync operation.
29384 <Type name="SyncProfileId"/>
29388 <Operation name="onstopped" id="::DataSynchronization::SyncProgressCallback::onstopped">
29389 <webidl> void onstopped(<ref>SyncProfileId</ref> profileId);</webidl>
29392 Called when the sync operation is stopped by user.
29398 <Type type="void"/>
29400 <Argument name="profileId">
29403 The ID of the corresponding sync operation.
29406 <Type name="SyncProfileId"/>
29410 <Operation name="onfailed" id="::DataSynchronization::SyncProgressCallback::onfailed">
29411 <webidl> void onfailed(<ref>SyncProfileId</ref> profileId, <ref>WebAPIError</ref> error);</webidl>
29414 Called when the sync operation fails.
29420 <Type type="void"/>
29422 <Argument name="profileId">
29425 The ID of the corresponding sync operation.
29428 <Type name="SyncProfileId"/>
29430 <Argument name="error">
29433 The reason for the sync failure.
29436 <Type name="WebAPIError"/>
29442 <Module name="Download" id="::Download">
29443 <webidl>module Download {
29444 typedef object DownloadHTTPHeaderFields;
29446 enum DownloadState { "QUEUED", "DOWNLOADING", "PAUSED", "CANCELED", "COMPLETED", "FAILED" };
29448 enum DownloadNetworkType { "CELLULAR", "WIFI", "ALL" };
29450 [NoInterfaceObject] interface DownloadManagerObject {
29451 readonly attribute <ref>DownloadManager</ref> download;
29453 <ref>Tizen</ref> implements <ref>DownloadManagerObject</ref>;
29455 [Constructor(DOMString url, optional DOMString? destination, optional DOMString? fileName, optional <ref>DownloadNetworkType</ref>? networkType, optional <ref>DownloadHTTPHeaderFields</ref>? httpHeader)]
29456 interface DownloadRequest {
29457 attribute DOMString url;
29459 attribute DOMString? destination;
29461 attribute DOMString? fileName;
29463 attribute <ref>DownloadNetworkType</ref>? networkType;
29465 attribute <ref>DownloadHTTPHeaderFields</ref>? httpHeader;
29468 [NoInterfaceObject] interface DownloadManager {
29469 long start(<ref>DownloadRequest</ref> downloadRequest,
29470 optional <ref>DownloadCallback</ref>? downloadCallback) raises(<ref>WebAPIException</ref>);
29472 void cancel(long downloadId) raises(<ref>WebAPIException</ref>);
29474 void pause(long downloadId) raises(<ref>WebAPIException</ref>);
29476 void resume(long downloadId) raises(<ref>WebAPIException</ref>);
29478 <ref>DownloadState</ref> getState(long downloadId) raises(<ref>WebAPIException</ref>);
29480 <ref>DownloadRequest</ref> getDownloadRequest(long downloadId) raises(<ref>WebAPIException</ref>);
29482 DOMString getMIMEType(long downloadId) raises(<ref>WebAPIException</ref>);
29484 void setListener(long downloadId, <ref>DownloadCallback</ref> downloadCallback) raises(<ref>WebAPIException</ref>);
29487 [Callback, NoInterfaceObject] interface DownloadCallback {
29488 void onprogress(long downloadId, unsigned long long receivedSize, unsigned long long totalSize);
29490 void onpaused(long downloadId);
29492 void oncanceled(long downloadId);
29494 void oncompleted(long downloadId, DOMString fullPath);
29496 void onfailed(long downloadId, <ref>WebAPIError</ref> error);
29501 This API provides methods to asynchronously download the contents of a URL to a storage.
29505 For more information on the Download features, see <a href="../../org.tizen.web.appprogramming/html/guide/content_guide/download.htm">Download Guide</a>.
29511 <def-api-feature identifier="http://tizen.org/feature/network.wifi">
29515 To guarantee this application running on a device with Wi-Fi feature, define below in the config file:
29520 <def-api-feature identifier="http://tizen.org/feature/network.telephony">
29524 To guarantee this application running on a device with Cellular feature, define below in the config file:
29530 <Typedef name="DownloadHTTPHeaderFields" id="::Download::DownloadHTTPHeaderFields">
29531 <webidl> typedef object DownloadHTTPHeaderFields;</webidl>
29534 A set of HTTP header fields.
29538 The key / value type of each HTTP header field should be DOMString.
29545 <Type type="object"/>
29547 <Enum name="DownloadState" id="::Download::DownloadState">
29548 <webidl> enum DownloadState { "QUEUED", "DOWNLOADING", "PAUSED", "CANCELED", "COMPLETED", "FAILED" };</webidl>
29551 An enumerator to indicate the state of a download operation.
29555 The following values are supported:
29559 QUEUED - Indicates that the download operation is listed in a queue. </li>
29561 DOWNLOADING - Indicates that the download operation is in progress. </li>
29563 PAUSED - Indicates that the download operation is in a paused state by user request. </li>
29565 CANCELED - Indicates that the download operation is canceled by user request. </li>
29567 COMPLETED - Indicates that the download operation is in a completed state. </li>
29569 FAILED - Indicates that the download operation has failed due to some reasons. </li>
29576 <EnumValue stringvalue="QUEUED">
29577 <webidl> "QUEUED</webidl>
29579 <EnumValue stringvalue="DOWNLOADING">
29580 <webidl> "DOWNLOADING</webidl>
29582 <EnumValue stringvalue="PAUSED">
29583 <webidl> "PAUSED</webidl>
29585 <EnumValue stringvalue="CANCELED">
29586 <webidl> "CANCELED</webidl>
29588 <EnumValue stringvalue="COMPLETED">
29589 <webidl> "COMPLETED</webidl>
29591 <EnumValue stringvalue="FAILED">
29592 <webidl> "FAILED</webidl>
29595 <Enum name="DownloadNetworkType" id="::Download::DownloadNetworkType">
29596 <webidl> enum DownloadNetworkType { "CELLULAR", "WIFI", "ALL" };</webidl>
29599 An enumerator to indicate the network type.
29603 The following values are supported:
29607 CELLULAR - Indicates that the download operation is allowed in the cellular network only. </li>
29609 WIFI - Indicates that the download operation is allowed in the Wi-Fi network only. </li>
29611 ALL - Indicates that the download operation is allowed in all network types. </li>
29618 <EnumValue stringvalue="CELLULAR">
29619 <webidl> "CELLULAR</webidl>
29621 <EnumValue stringvalue="WIFI">
29622 <webidl> "WIFI</webidl>
29624 <EnumValue stringvalue="ALL">
29625 <webidl> "ALL</webidl>
29628 <Interface name="DownloadManagerObject" id="::Download::DownloadManagerObject">
29629 <webidl> [NoInterfaceObject] interface DownloadManagerObject {
29630 readonly attribute <ref>DownloadManager</ref> download;
29634 This interface defines the default download manager that is instantiated by the <em>Tizen </em>object.
29635 There will be a <em>tizen.download </em>object that allows access to the functionality of the Download API.
29641 <ExtendedAttributeList>
29642 <ExtendedAttribute name="NoInterfaceObject">
29643 <webidl>NoInterfaceObject</webidl>
29644 </ExtendedAttribute>
29645 </ExtendedAttributeList>
29646 <Attribute readonly="readonly" name="download" id="::Download::DownloadManagerObject::download">
29647 <webidl> readonly attribute <ref>DownloadManager</ref> download;</webidl>
29648 <Type name="DownloadManager"/>
29651 <Implements name1="Tizen" name2="DownloadManagerObject">
29652 <webidl> <ref>Tizen</ref> implements <ref>DownloadManagerObject</ref>;</webidl>
29654 <Interface name="DownloadRequest" id="::Download::DownloadRequest">
29655 <webidl> [Constructor(DOMString url, optional DOMString? destination, optional DOMString? fileName, optional <ref>DownloadNetworkType</ref>? networkType, optional <ref>DownloadHTTPHeaderFields</ref>? httpHeader)]
29656 interface DownloadRequest {
29657 attribute DOMString url;
29659 attribute DOMString? destination;
29661 attribute DOMString? fileName;
29663 attribute <ref>DownloadNetworkType</ref>? networkType;
29665 attribute <ref>DownloadHTTPHeaderFields</ref>? httpHeader;
29669 This interface defines the download request object.
29675 <ExtendedAttributeList>
29676 <ExtendedAttribute name="Constructor">
29677 <webidl>Constructor(DOMString url, optional DOMString? destination, optional DOMString? fileName, optional <ref>DownloadNetworkType</ref>? networkType, optional <ref>DownloadHTTPHeaderFields</ref>? httpHeader)</webidl>
29679 <Argument name="url">
29680 <Type type="DOMString"/>
29682 <Argument optional="optional" name="destination">
29683 <Type type="DOMString" nullable="nullable"/>
29685 <Argument optional="optional" name="fileName">
29686 <Type type="DOMString" nullable="nullable"/>
29688 <Argument optional="optional" name="networkType">
29689 <Type name="DownloadNetworkType" nullable="nullable"/>
29691 <Argument optional="optional" name="httpHeader">
29692 <Type name="DownloadHTTPHeaderFields" nullable="nullable"/>
29695 </ExtendedAttribute>
29696 </ExtendedAttributeList>
29697 <Attribute name="url" id="::Download::DownloadRequest::url">
29698 <webidl> attribute DOMString url;</webidl>
29701 An attribute to store the URL of the object to download.
29707 <Type type="DOMString"/>
29709 <Attribute name="destination" id="::Download::DownloadRequest::destination">
29710 <webidl> attribute DOMString? destination;</webidl>
29713 An attribute to store the folder path of the destination folder to which a requested file object will be downloaded.
29717 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>.
29720 The default value is an empty string.
29727 <Type type="DOMString" nullable="nullable"/>
29729 <Attribute name="fileName" id="::Download::DownloadRequest::fileName">
29730 <webidl> attribute DOMString? fileName;</webidl>
29733 An attribute to store the file name for the specified URL.
29737 If the file name is not given or an empty string, the original file name from URL is used.
29740 The default value is an empty string.
29747 <Type type="DOMString" nullable="nullable"/>
29749 <Attribute name="networkType" id="::Download::DownloadRequest::networkType">
29750 <webidl> attribute <ref>DownloadNetworkType</ref>? networkType;</webidl>
29753 An attribute to store the allowed network type.
29757 If the network type is not given, all network type are allowed.
29760 The default value is "ALL".
29767 <Type name="DownloadNetworkType" nullable="nullable"/>
29769 <Attribute name="httpHeader" id="::Download::DownloadRequest::httpHeader">
29770 <webidl> attribute <ref>DownloadHTTPHeaderFields</ref>? httpHeader;</webidl>
29773 An attribute to store extra HTTP header fields.
29777 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>
29779 The default value is an empty object.
29782 <Code> var req = new tizen.DownloadRequest("http://download.tizen.org/tools/README.txt");
29783 req.httpHeader["Pragma"] = "no-cache";
29784 req.httpHeader["Cookie"] = "version=1; Skin=new";
29785 req.httpHeader["X-Agent"] = "Tizen Sample App";
29791 <Type name="DownloadHTTPHeaderFields" nullable="nullable"/>
29794 <Interface name="DownloadManager" id="::Download::DownloadManager">
29795 <webidl> [NoInterfaceObject] interface DownloadManager {
29796 long start(<ref>DownloadRequest</ref> downloadRequest,
29797 optional <ref>DownloadCallback</ref>? downloadCallback) raises(<ref>WebAPIException</ref>);
29799 void cancel(long downloadId) raises(<ref>WebAPIException</ref>);
29801 void pause(long downloadId) raises(<ref>WebAPIException</ref>);
29803 void resume(long downloadId) raises(<ref>WebAPIException</ref>);
29805 <ref>DownloadState</ref> getState(long downloadId) raises(<ref>WebAPIException</ref>);
29807 <ref>DownloadRequest</ref> getDownloadRequest(long downloadId) raises(<ref>WebAPIException</ref>);
29809 DOMString getMIMEType(long downloadId) raises(<ref>WebAPIException</ref>);
29811 void setListener(long downloadId, <ref>DownloadCallback</ref> downloadCallback) raises(<ref>WebAPIException</ref>);
29815 This interface handles requests for downloading. Each step of download operation will be informed through callbacks.
29821 <ExtendedAttributeList>
29822 <ExtendedAttribute name="NoInterfaceObject">
29823 <webidl>NoInterfaceObject</webidl>
29824 </ExtendedAttribute>
29825 </ExtendedAttributeList>
29826 <Operation name="start" id="::Download::DownloadManager::start">
29827 <webidl> long start(<ref>DownloadRequest</ref> downloadRequest,
29828 optional <ref>DownloadCallback</ref>? downloadCallback) raises(<ref>WebAPIException</ref>);</webidl>
29831 Starts a download operation with the specified URL information.
29840 http://tizen.org/privilege/download
29842 <Code> var listener = {
29843 onprogress: function(id, receivedSize, totalSize) {
29844 console.log('Received with id: ' + id + ', ' + receivedSize + '/' + totalSize);
29846 onpaused: function(id) {
29847 console.log('Paused with id: ' + id);
29849 oncanceled: function(id) {
29850 console.log('Canceled with id: ' + id);
29852 oncompleted: function(id, fullPath) {
29853 console.log('Completed with id: ' + id + ', full path: ' + fullPath);
29855 onfailed: function(id, error) {
29856 console.log('Failed with id: ' + id + ', error name: ' + error.name);
29860 // Starts downloading of the file from the Web with the corresponding callbacks.
29861 var downloadRequest = new tizen.DownloadRequest("http://download.tizen.org/tools/README.txt", "documents");
29862 downloadId = tizen.download.start(downloadRequest, listener);
29868 long An identifier for each download operation.
29873 <Argument name="downloadRequest">
29876 The URL and destination information of the object to download.
29879 <Type name="DownloadRequest"/>
29881 <Argument optional="optional" name="downloadCallback">
29884 The method to invoke when the download state changes or an error occurs.
29887 <Type name="DownloadCallback" nullable="nullable"/>
29891 <RaiseException name="WebAPIException">
29894 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
29897 with error type NotSupportedError, if this feature is not supported.
29900 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
29903 with error type SecurityError, if the application does not have the privilege to call this method.
29906 with error type UnknownError if any other error occurs.
29912 <Operation name="cancel" id="::Download::DownloadManager::cancel">
29913 <webidl> void cancel(long downloadId) raises(<ref>WebAPIException</ref>);</webidl>
29916 Cancels an ongoing download operation that is specified by the <em>downloadId</em> parameter.
29921 <Code> // Cancels the ongoing download operation with the specified id.
29922 tizen.download.cancel(downloadId);
29925 <Type type="void"/>
29927 <Argument name="downloadId">
29930 The ID of the ongoing download operation to stop.
29933 <Type type="long"/>
29937 <RaiseException name="WebAPIException">
29940 with error type NotFoundError, if the identifier does not match any download operation in progress.
29943 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
29946 with error type NotSupportedError, if this feature is not supported.
29949 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
29952 with error type UnknownError, if any other error occurs.
29958 <Operation name="pause" id="::Download::DownloadManager::pause">
29959 <webidl> void pause(long downloadId) raises(<ref>WebAPIException</ref>);</webidl>
29962 Pauses an ongoing download operation that is specified by the <em>downloadId</em> parameter.
29963 The paused download operation can be resumed later by the <em>resume()</em> method.
29968 <Code> // Pauses the ongoing download operation with the specified id.
29969 tizen.download.pause(downloadId);
29972 <Type type="void"/>
29974 <Argument name="downloadId">
29977 The ID of the ongoing download operation to pause.
29980 <Type type="long"/>
29984 <RaiseException name="WebAPIException">
29987 with error type NotFoundError, if the identifier does not match any download operation in progress.
29990 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
29993 with error type NotSupportedError, if this feature is not supported.
29996 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
29999 with error type UnknownError, if any other error occurs.
30005 <Operation name="resume" id="::Download::DownloadManager::resume">
30006 <webidl> void resume(long downloadId) raises(<ref>WebAPIException</ref>);</webidl>
30009 Resumes a paused download operation that is specified by the <em>downloadId</em> parameter.
30014 <Code> // Resumes the paused download operation with the specified id.
30015 tizen.download.resume(downloadId);
30018 <Type type="void"/>
30020 <Argument name="downloadId">
30023 The ID of the paused download operation to be resume.
30026 <Type type="long"/>
30030 <RaiseException name="WebAPIException">
30033 with error type NotFoundError, if the identifier does not match any download operation in progress.
30036 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
30039 with error type NotSupportedError, if this feature is not supported.
30042 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
30045 with error type UnknownError, if any other error occurs.
30051 <Operation name="getState" id="::Download::DownloadManager::getState">
30052 <webidl> <ref>DownloadState</ref> getState(long downloadId) raises(<ref>WebAPIException</ref>);</webidl>
30055 Gets the download state of an operation synchronously with the specified ID.
30060 <Code> // Gets the state of the download operation with the given id.
30061 var state = tizen.download.getState(downloadId);
30064 <Type name="DownloadState">
30067 DownloadState The current download state of the specified ID.
30072 <Argument name="downloadId">
30075 The ID to get the current state of download operation.
30078 <Type type="long"/>
30082 <RaiseException name="WebAPIException">
30085 with error type NotFoundError, if the identifier does not match any download operation in progress.
30088 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
30091 with error type NotSupportedError, if this feature is not supported.
30094 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
30097 with error type UnknownError, if any other error occurs.
30103 <Operation name="getDownloadRequest" id="::Download::DownloadManager::getDownloadRequest">
30104 <webidl> <ref>DownloadRequest</ref> getDownloadRequest(long downloadId) raises(<ref>WebAPIException</ref>);</webidl>
30107 Gets the DownloadRequest object from a given id.
30112 <Code> // Gets the download request information with the given id.
30113 var downloadRequest = tizen.download.getDownloadRequest(downloadId);
30116 <Type name="DownloadRequest">
30119 DownloadRequest The download request information of the given id.
30124 <Argument name="downloadId">
30127 The ID to get the download request information.
30130 <Type type="long"/>
30134 <RaiseException name="WebAPIException">
30137 with error type NotFoundError, if the identifier does not match
30138 any download operation in progress.
30141 with error type TypeMismatchError, if the input parameter is not
30142 compatible with the expected type.
30145 with error type NotSupportedError, if this feature is not supported.
30148 with error type InvalidValuesError, if any of the input
30149 parameters contain an invalid value.
30152 with error type UnknownError in any other error case.
30158 <Operation name="getMIMEType" id="::Download::DownloadManager::getMIMEType">
30159 <webidl> DOMString getMIMEType(long downloadId) raises(<ref>WebAPIException</ref>);</webidl>
30162 Gets the MIME type of the downloaded file.
30165 This function will return a valid MIME type when the download operation has been started
30166 and successfully retrieved the file header.
30171 <Code> // Get the MIME type of the download operation with the given id.
30172 var MIMEtype = tizen.download.getMIMEType(downloadId);
30175 <Type type="DOMString">
30178 DOMString The MIME type of the downloaded file.
30183 <Argument name="downloadId">
30186 The ID to get the MIME type information.
30189 <Type type="long"/>
30193 <RaiseException name="WebAPIException">
30196 with error type NotFoundError, if the identifier does not match
30197 any download operation in progress.
30200 with error type TypeMismatchError, if the input parameter is not
30201 compatible with the expected type.
30204 with error type NotSupportedError, if this feature is not supported.
30207 with error type InvalidValuesError, if any of the input
30208 parameters contain an invalid value.
30211 with error type UnknownError in any other error case.
30217 <Operation name="setListener" id="::Download::DownloadManager::setListener">
30218 <webidl> void setListener(long downloadId, <ref>DownloadCallback</ref> downloadCallback) raises(<ref>WebAPIException</ref>);</webidl>
30221 Sets the download callback to the download operation of given id.
30222 It's possible to change or register the listener of download operation using the saved id.
30227 <Code> var listener = {
30228 onprogress: function(id, receivedSize, totalSize) {
30229 console.log('Received with id: ' + id + ', ' + receivedSize + '/' + totalSize);
30231 onpaused: function(id) {
30232 console.log('Paused with id: ' + id);
30234 oncanceled: function(id) {
30235 console.log('Canceled with id: ' + id);
30237 oncompleted: function(id, fileName) {
30238 console.log('Completed with id: ' + id + ', file name: ' + fileName);
30240 onfailed: function(id, error) {
30241 console.log('Failed with id: ' + id + ', error name: ' + error.name);
30245 // Start downloading the html file on the web with the corresponding callbacks.
30246 var downloadRequest = new tizen.DownloadRequest("http://download.tizen.org/tools/README.txt", "documents");
30247 downloadId = tizen.download.start(downloadRequest);
30249 // Add the listener.
30250 tizen.download.setListener(downloadId, listener);
30253 <Type type="void"/>
30255 <Argument name="downloadId">
30258 The ID to set the download callback.
30261 <Type type="long"/>
30263 <Argument name="downloadCallback">
30266 The method to invoke when the download state changes or an error occurs.
30269 <Type name="DownloadCallback"/>
30273 <RaiseException name="WebAPIException">
30276 with error type NotFoundError, if the identifier does not match
30277 any download operation in progress.
30280 with error type TypeMismatchError, if the input parameter is not
30281 compatible with the expected type.
30284 with error type NotSupportedError, if this feature is not supported.
30287 with error type InvalidValuesError, if any of the input
30288 parameters contain an invalid value.
30291 with error type UnknownError in any other error case.
30298 <Interface name="DownloadCallback" id="::Download::DownloadCallback">
30299 <webidl> [Callback, NoInterfaceObject] interface DownloadCallback {
30300 void onprogress(long downloadId, unsigned long long receivedSize, unsigned long long totalSize);
30302 void onpaused(long downloadId);
30304 void oncanceled(long downloadId);
30306 void oncompleted(long downloadId, DOMString fullPath);
30308 void onfailed(long downloadId, <ref>WebAPIError</ref> error);
30312 This interface defines notification callbacks for the download state change or progress.
30318 <ExtendedAttributeList>
30319 <ExtendedAttribute name="Callback">
30320 <webidl>Callback</webidl>
30321 </ExtendedAttribute>
30322 <ExtendedAttribute name="NoInterfaceObject">
30323 <webidl> NoInterfaceObject</webidl>
30324 </ExtendedAttribute>
30325 </ExtendedAttributeList>
30326 <Operation name="onprogress" id="::Download::DownloadCallback::onprogress">
30327 <webidl> void onprogress(long downloadId, unsigned long long receivedSize, unsigned long long totalSize);</webidl>
30330 Called when a download is successful and it called multiple times as the download progresses.
30331 The interval between <em>onprogress()</em> callback is platform-dependent. When the download is started, the <em>receivedSize </em>can be <var>0</var>.
30337 <Type type="void"/>
30339 <Argument name="downloadId">
30342 The ID of the corresponding download operation.
30345 <Type type="long"/>
30347 <Argument name="receivedSize">
30350 The size of data received in bytes.
30353 <Type type="unsigned long long"/>
30355 <Argument name="totalSize">
30358 The total size of data to receive in bytes.
30361 <Type type="unsigned long long"/>
30365 <Operation name="onpaused" id="::Download::DownloadCallback::onpaused">
30366 <webidl> void onpaused(long downloadId);</webidl>
30369 Called when the download operation is paused by the <em>pause() </em>method.
30375 <Type type="void"/>
30377 <Argument name="downloadId">
30380 The ID of the corresponding download operation.
30383 <Type type="long"/>
30387 <Operation name="oncanceled" id="::Download::DownloadCallback::oncanceled">
30388 <webidl> void oncanceled(long downloadId);</webidl>
30391 Called when download is canceled by the <em>cancel() </em>method.
30397 <Type type="void"/>
30399 <Argument name="downloadId">
30402 The ID of the corresponding download operation.
30405 <Type type="long"/>
30409 <Operation name="oncompleted" id="::Download::DownloadCallback::oncompleted">
30410 <webidl> void oncompleted(long downloadId, DOMString fullPath);</webidl>
30413 Called when the download operation is completed with the final full path.
30414 If the same file name already exists in the destination, it is changed according to the platform policy and delivered in this callback.
30420 <Type type="void"/>
30422 <Argument name="downloadId">
30425 The ID of the corresponding download operation.
30428 <Type type="long"/>
30430 <Argument name="fullPath">
30433 The final full path for the downloaded file.
30436 <Type type="DOMString"/>
30440 <Operation name="onfailed" id="::Download::DownloadCallback::onfailed">
30441 <webidl> void onfailed(long downloadId, <ref>WebAPIError</ref> error);</webidl>
30444 Called when the download operation fails.
30450 <Type type="void"/>
30452 <Argument name="downloadId">
30455 The ID of the corresponding download operation.
30458 <Type type="long"/>
30460 <Argument name="error">
30463 The reason for the download failure.
30466 <Type name="WebAPIError"/>
30472 <Module name="Filesystem" id="::Filesystem">
30473 <webidl>module Filesystem {
30474 enum FileMode { "r", "rw", "w", "a" };
30476 enum FileSystemStorageType { "INTERNAL", "EXTERNAL" };
30478 enum FileSystemStorageState { "MOUNTED", "REMOVED", "UNMOUNTABLE" };
30480 [NoInterfaceObject] interface FileSystemManagerObject {
30481 readonly attribute <ref>FileSystemManager</ref> filesystem;
30483 <ref>Tizen</ref> implements <ref>FileSystemManagerObject</ref>;
30485 [NoInterfaceObject] interface FileSystemManager {
30486 readonly attribute long maxPathLength;
30488 void resolve(DOMString location,
30489 <ref>FileSuccessCallback</ref> onsuccess,
30490 optional <ref>ErrorCallback</ref>? onerror,
30491 optional <ref>FileMode</ref>? mode) raises(<ref>WebAPIException</ref>);
30493 void getStorage(DOMString label,
30494 <ref>FileSystemStorageSuccessCallback</ref> onsuccess,
30495 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
30497 void listStorages(<ref>FileSystemStorageArraySuccessCallback</ref> onsuccess,
30498 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
30500 long addStorageStateChangeListener(<ref>FileSystemStorageSuccessCallback</ref> onsuccess,
30501 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
30503 void removeStorageStateChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
30506 [NoInterfaceObject] interface FileSystemStorage {
30507 readonly attribute DOMString label;
30509 readonly attribute <ref>FileSystemStorageType</ref> type;
30511 readonly attribute <ref>FileSystemStorageState</ref> state;
30514 [NoInterfaceObject] interface File {
30515 readonly attribute <ref>File</ref>? parent;
30517 readonly attribute boolean readOnly;
30519 readonly attribute boolean isFile;
30521 readonly attribute boolean isDirectory;
30523 readonly attribute Date? created;
30525 readonly attribute Date? modified;
30527 readonly attribute DOMString path;
30529 readonly attribute DOMString name;
30531 readonly attribute DOMString fullPath;
30533 readonly attribute unsigned long long fileSize;
30535 readonly attribute long length;
30537 DOMString toURI() raises(<ref>WebAPIException</ref>);
30539 void listFiles(<ref>FileArraySuccessCallback</ref> onsuccess,
30540 optional <ref>ErrorCallback</ref>? onerror,
30541 optional <ref>FileFilter</ref>? filter) raises(<ref>WebAPIException</ref>);
30543 void openStream(<ref>FileMode</ref> mode,
30544 <ref>FileStreamSuccessCallback</ref> onsuccess,
30545 optional <ref>ErrorCallback</ref>? onerror,
30546 optional DOMString? encoding) raises(<ref>WebAPIException</ref>);
30548 void readAsText(<ref>FileStringSuccessCallback</ref> onsuccess,
30549 optional <ref>ErrorCallback</ref>? onerror,
30550 optional DOMString? encoding) raises(<ref>WebAPIException</ref>);
30552 void copyTo(DOMString originFilePath,
30553 DOMString destinationFilePath,
30555 optional <ref>SuccessCallback</ref>? onsuccess,
30556 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
30558 void moveTo(DOMString originFilePath,
30559 DOMString destinationFilePath,
30561 optional <ref>SuccessCallback</ref>? onsuccess,
30562 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
30564 <ref>File</ref> createDirectory(DOMString dirPath) raises(<ref>WebAPIException</ref>);
30566 <ref>File</ref> createFile(DOMString relativeFilePath) raises(<ref>WebAPIException</ref>);
30568 <ref>File</ref> resolve(DOMString filePath) raises(<ref>WebAPIException</ref>);
30570 void deleteDirectory(DOMString directoryPath,
30572 optional <ref>SuccessCallback</ref>? onsuccess,
30573 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
30575 void deleteFile(DOMString filePath,
30576 optional <ref>SuccessCallback</ref>? onsuccess,
30577 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
30581 dictionary FileFilter {
30584 Date startModified;
30593 [NoInterfaceObject] interface FileStream {
30594 readonly attribute boolean eof;
30596 attribute long position setraises(<ref>WebAPIException</ref>);
30598 readonly attribute long bytesAvailable;
30602 DOMString read(long charCount) raises(<ref>WebAPIException</ref>);
30604 octet[] readBytes(long byteCount) raises(<ref>WebAPIException</ref>);
30606 DOMString readBase64(long byteCount) raises(<ref>WebAPIException</ref>);
30608 void write(DOMString stringData) raises(<ref>WebAPIException</ref>);
30610 void writeBytes(octet[] byteData) raises(<ref>WebAPIException</ref>);
30612 void writeBase64(DOMString base64Data) raises(<ref>WebAPIException</ref>);
30615 [Callback=FunctionOnly, NoInterfaceObject] interface FileSuccessCallback {
30616 void onsuccess(<ref>File</ref> file);
30619 [Callback=FunctionOnly, NoInterfaceObject] interface FileSystemStorageArraySuccessCallback {
30620 void onsuccess(<ref>FileSystemStorage</ref>[] storages);
30623 [Callback=FunctionOnly, NoInterfaceObject] interface FileSystemStorageSuccessCallback {
30624 void onsuccess(<ref>FileSystemStorage</ref> storage);
30627 [Callback=FunctionOnly, NoInterfaceObject] interface FileStringSuccessCallback {
30628 void onsuccess(DOMString fileStr);
30631 [Callback=FunctionOnly, NoInterfaceObject] interface FileStreamSuccessCallback {
30632 void onsuccess(<ref>FileStream</ref> filestream);
30635 [Callback=FunctionOnly, NoInterfaceObject] interface FileArraySuccessCallback {
30636 void onsuccess(<ref>File</ref>[] files);
30641 This API provides access to a device's filesystem.
30645 The filesystem is represented as an abstract collection of disjointed filesystem virtual
30646 root locations, each corresponding to a specific location in the device
30647 filesystem. The filesystem API exposes the hierarchies below these root
30648 locations as a single virtual filesystem, but provides no access to other
30649 parts of the device filesystem.
30652 Each virtual root has a string name. Each file or directory within the virtual
30653 filesystem is addressed using a fully-qualified path of the form:
30654 <em><root name>/<path></em> where <em><rootname></em> is
30655 the name of the virtual root and <em><path></em> is the path to the file or
30656 directory relative to that root.
30659 The following virtual roots MUST be supported:
30663 images: the images location </li>
30665 videos: the videos location </li>
30667 music: the sounds location </li>
30669 documents: the documents location </li>
30671 downloads: the location for downloaded items </li>
30673 ringtones: the location for ringtones (read-only location) </li>
30675 wgt-package: the widget package location (read-only location) </li>
30677 wgt-private: the widget private storage </li>
30679 wgt-private-tmp: the widget private volatile storage area </li>
30682 The file URI path is also supported. if you want to access other paths out of virtual root,
30683 for example '/tmp/', 'file:///tmp' could be used as location parameter.
30686 To access specific locations from those specified above, a file handle
30687 must be retrieved using the filesystem.resolve call.
30690 A file handle represents either a file or a directory. For a file, the
30691 isFile attribute is <em>true</em>. For a directory, the isDirectory attribute
30692 is <em>true</em>. A file can be opened for read and write operations, using a
30693 FileStream handle. A list of files and sub-directories can be obtained from a
30694 directory and a resolve method exists to resolve files or sub-directories
30695 more conveniently than processing directory listings.
30698 The implementation MUST support the use of the following
30699 characters in file names:
30703 Letters (azAZ) </li>
30705 Numbers (0-9) </li>
30709 Underscores ("_") </li>
30711 Hyphens ("-") </li>
30713 Periods (".") </li>
30716 The implementation MAY support additional characters in file names,
30717 depending on platform support.
30720 The implementation MAY forbid the use of additional characters in file
30721 names, depending on the platform. The use of the path separator "/"
30722 in file names MUST NOT be allowed. The "/" character is used as the (path)
30723 component separator.
30726 Some other file name and path characteristics are platform-dependent,
30727 for example, maximum path length, file name length, case sensitivity, additional
30728 character support, etc. Therefore, it is recommended that you avoid any dependency
30729 on aspects that cannot be supported across many platforms.
30732 When a path is used to interact with the underlying filesystem,
30733 the encoding used for the file path SHOULD be the platform default.
30736 For more information on the Filesystem features, see <a href="../../org.tizen.web.appprogramming/html/guide/io_guide/filesystem.htm">File System Guide</a>.
30743 <Enum name="FileMode" id="::Filesystem::FileMode">
30744 <webidl> enum FileMode { "r", "rw", "w", "a" };</webidl>
30747 The file mode provided when opening.
30751 Value "r" to obtain read-only access, "rw" to obtain read and write
30752 access, "w" to obtain write access and "a" for appending.
30759 <EnumValue stringvalue="r">
30760 <webidl> "r</webidl>
30762 <EnumValue stringvalue="rw">
30763 <webidl> "rw</webidl>
30765 <EnumValue stringvalue="w">
30766 <webidl> "w</webidl>
30768 <EnumValue stringvalue="a">
30769 <webidl> "a</webidl>
30772 <Enum name="FileSystemStorageType" id="::Filesystem::FileSystemStorageType">
30773 <webidl> enum FileSystemStorageType { "INTERNAL", "EXTERNAL" };</webidl>
30776 The type of storage.
30781 INTERNAL: Internal storage is storage that cannot be removed, such as a
30782 flash memory. </li>
30784 EXTERNAL: External storage is removable storage, such as a USB drive or
30785 memory cards. </li>
30792 <EnumValue stringvalue="INTERNAL">
30793 <webidl> "INTERNAL</webidl>
30795 <EnumValue stringvalue="EXTERNAL">
30796 <webidl> "EXTERNAL</webidl>
30799 <Enum name="FileSystemStorageState" id="::Filesystem::FileSystemStorageState">
30800 <webidl> enum FileSystemStorageState { "MOUNTED", "REMOVED", "UNMOUNTABLE" };</webidl>
30803 The state of the storage.
30808 MOUNTED: The device is mounted and can be browsed. </li>
30810 REMOVED: The device was removed. This states only applies to external drives. </li>
30812 UNMOUNTABLE: The device cannot be mounted due to an error. </li>
30819 <EnumValue stringvalue="MOUNTED">
30820 <webidl> "MOUNTED</webidl>
30822 <EnumValue stringvalue="REMOVED">
30823 <webidl> "REMOVED</webidl>
30825 <EnumValue stringvalue="UNMOUNTABLE">
30826 <webidl> "UNMOUNTABLE</webidl>
30829 <Interface name="FileSystemManagerObject" id="::Filesystem::FileSystemManagerObject">
30830 <webidl> [NoInterfaceObject] interface FileSystemManagerObject {
30831 readonly attribute <ref>FileSystemManager</ref> filesystem;
30835 Defines what is instantiated in the tizen object.
30839 There will be a tizen.filesystem object that allows accessing the
30840 functionality of the filesystem API.
30847 <ExtendedAttributeList>
30848 <ExtendedAttribute name="NoInterfaceObject">
30849 <webidl>NoInterfaceObject</webidl>
30850 </ExtendedAttribute>
30851 </ExtendedAttributeList>
30852 <Attribute readonly="readonly" name="filesystem" id="::Filesystem::FileSystemManagerObject::filesystem">
30853 <webidl> readonly attribute <ref>FileSystemManager</ref> filesystem;</webidl>
30854 <Type name="FileSystemManager"/>
30857 <Implements name1="Tizen" name2="FileSystemManagerObject">
30858 <webidl> <ref>Tizen</ref> implements <ref>FileSystemManagerObject</ref>;</webidl>
30860 <Interface name="FileSystemManager" id="::Filesystem::FileSystemManager">
30861 <webidl> [NoInterfaceObject] interface FileSystemManager {
30862 readonly attribute long maxPathLength;
30864 void resolve(DOMString location,
30865 <ref>FileSuccessCallback</ref> onsuccess,
30866 optional <ref>ErrorCallback</ref>? onerror,
30867 optional <ref>FileMode</ref>? mode) raises(<ref>WebAPIException</ref>);
30869 void getStorage(DOMString label,
30870 <ref>FileSystemStorageSuccessCallback</ref> onsuccess,
30871 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
30873 void listStorages(<ref>FileSystemStorageArraySuccessCallback</ref> onsuccess,
30874 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
30876 long addStorageStateChangeListener(<ref>FileSystemStorageSuccessCallback</ref> onsuccess,
30877 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
30879 void removeStorageStateChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
30883 The file system manager interface that provides access to the filesystem API.
30887 This manager exposes the filesystem base API, and provides functionality, such as
30888 determining root and default locations, resolving a given location
30889 into a file handle, and registering filesystem listeners for
30896 <Code> var documentsDir;
30897 function onsuccess(files) {
30898 for(var i = 0; i < files.length; i++) {
30899 console.log("File Name is " + files[i].name); // displays file name
30902 var testFile = documentsDir.createFile("test.txt");
30904 if (testFile != null) {
30905 testFile.openStream(
30908 fs.write("HelloWorld");
30911 console.log("Error " + e.message);
30912 }, "UTF-8"
30917 function onerror(error) {
30918 console.log("The error " + error.message + " occurred when listing the files in the selected folder");
30921 tizen.filesystem.resolve(
30924 documentsDir = dir;
30925 dir.listFiles(onsuccess, onerror);
30927 console.log("Error" + e.message);
30932 <ExtendedAttributeList>
30933 <ExtendedAttribute name="NoInterfaceObject">
30934 <webidl>NoInterfaceObject</webidl>
30935 </ExtendedAttribute>
30936 </ExtendedAttributeList>
30937 <Attribute readonly="readonly" name="maxPathLength" id="::Filesystem::FileSystemManager::maxPathLength">
30938 <webidl> readonly attribute long maxPathLength;</webidl>
30941 Contains the platform-dependent maximum path length.
30946 <Code> console.log("The maximum path length is " + tizen.filesystem.maxPathLength);
30949 <Type type="long"/>
30951 <Operation name="resolve" id="::Filesystem::FileSystemManager::resolve">
30952 <webidl> void resolve(DOMString location,
30953 <ref>FileSuccessCallback</ref> onsuccess,
30954 optional <ref>ErrorCallback</ref>? onerror,
30955 optional <ref>FileMode</ref>? mode) raises(<ref>WebAPIException</ref>);</webidl>
30958 Resolves a location to a file handle.
30962 It validates and resolves the given location to a file handle.
30963 If the operation completes successfully, the handle is returned
30964 in the FileSuccessCallback.
30965 A valid location is prefixed with a valid root or
30966 default location and must address an existing,
30967 accessible file or directory.
30970 A location can contain virtual path like (<var>documents/some_file.txt</var>)
30971 or it can be a file's URI (<var>file:///my_strange_path/some_file.png</var>).
30974 The list of root locations that MUST be supported by a compliant
30975 implementation are:
30979 documents: Describes the default folder in which text documents
30980 (such as pdf, doc...) are stored by default in the device. For example, in some
30981 platforms it corresponds to the "My Documents" folder. </li>
30983 images: Describes the default folder in which still images, like
30984 pictures (such as jpg, gif, png, etc.), are stored in the
30985 device by default. For example, in some platforms it corresponds to the "My Images"
30988 music: Describes the default folder in which sound clips (such as mp3,
30989 aac, etc.) are stored in the device by default. For example, in some platforms it
30990 corresponds to the "My Music" folder. </li>
30992 videos: Describes the default folder in which video clips (such as
30993 avi, mp4, etc.) are stored in the device by default. For example, in some platforms
30994 it corresponds to the "My Videos" folder. </li>
30996 downloads: Describes the default folder in which files downloaded
30997 (such as by a browser, e-mail client, etc.) are stored by default in the
30998 device. For example, in some platforms it corresponds to the "Downloads" folder.
31001 ringtones: Describes the default folder in which ringtones (such as mp3, etc)
31002 are stored by default in the device. </li>
31004 wgt-package: Describes the read-only folder in which the content of
31005 the widget file was extracted to. </li>
31007 wgt-private: Describes a private folder in which a widget can
31008 store information. This folder MUST be accessible only to the
31009 widget. Other widgets or applications MUST NOT access the
31010 information stored there. </li>
31012 wgt-private-tmp: Describes a temporary, private folder in which a widget
31013 can store data that is available during one widget execution
31014 cycle. Content of this folder MAY be removed from this directory
31015 when the widget is closed or the Web Runtime is restarted.
31016 This folder MUST be accessible only to the widget. Other
31017 widgets or applications MUST NOT have access to it. </li>
31020 The mode parameter specifies whether the resulting File object
31021 has read-only access ("r" access), read and write access ("rw" access),
31022 append access ("a" access), or write access ("w" access)
31023 to the root location containing directory tree.
31024 Permission for the requested access is obtained from the security framework.
31025 Once the resulting File object has access, access is inherited by
31026 any other File objects derived from this instance without any
31027 further reference to the security framework, as noted in
31028 descriptions of certain methods of File.
31031 The ErrorCallback is launched with these error types:
31035 InvalidValuesError: If any of the input parameters contain an invalid value.
31036 For example, the mode is not valid (that is not "r", "rw", "a", or "w"). </li>
31038 NotFoundError: The location input argument does not correspond to a valid location. </li>
31040 UnknownError: In any other error case. </li>
31050 http://tizen.org/privilege/filesystem.read
31052 <Code> tizen.filesystem.resolve(
31055 console.log("Mount point Name is " + dir.path);
31057 console.log("Error: " + e.message);
31062 <Type type="void"/>
31064 <Argument name="location">
31067 Location to resolve.
31070 <Type type="DOMString"/>
31072 <Argument name="onsuccess">
31075 Called when the location has been.
31076 successfully resolved, passing the newly created File object.
31079 <Type name="FileSuccessCallback"/>
31081 <Argument optional="optional" name="onerror">
31084 Called if an error occurred.
31087 <Type name="ErrorCallback" nullable="nullable"/>
31089 <Argument optional="optional" name="mode">
31092 Optional string of value "r" to obtain read-only access,
31093 "rw" to obtain read and write access, "a" to obtain append access,
31094 or "w" to obtain write access to all files and
31095 directories that can be reached from the File object passed
31096 to onsuccess. Defaults to "rw" if absent or <em>null</em>.
31099 <Type name="FileMode" nullable="nullable"/>
31103 <RaiseException name="WebAPIException">
31106 with error type TypeMismatchError, if the input parameter
31107 is not compatible with the expected type for that parameter.
31110 with error type SecurityError, if the application does not have the privilege to call this method.
31113 with error type NotSupportedError, if the feature is not supported.
31119 <Operation name="getStorage" id="::Filesystem::FileSystemManager::getStorage">
31120 <webidl> void getStorage(DOMString label,
31121 <ref>FileSystemStorageSuccessCallback</ref> onsuccess,
31122 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);</webidl>
31125 Gets information about a storage based on its label.
31129 Get storage information based on its label (example: "MyThumbDrive",
31130 "InternalFlash"). The onsuccess will receive as input argument the data
31131 structure containing additional information about the drive.
31134 The ErrorCallback is launched with these error types:
31138 NotFoundError: No drive was found with the given label. </li>
31140 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
31142 UnknownError: In any other error case. </li>
31152 http://tizen.org/privilege/filesystem.read
31154 <Code> function onStorage(storage) {
31158 function onStorageError(e) {
31159 console.log("Storage not found!" + e.message);
31162 tizen.filesystem.getStorage("music", onStorage, onStorageError);
31165 <Type type="void"/>
31167 <Argument name="label">
31173 <Type type="DOMString"/>
31175 <Argument name="onsuccess">
31178 Called when the list of storage is available,
31179 passing the storage list to the callback.
31182 <Type name="FileSystemStorageSuccessCallback"/>
31184 <Argument optional="optional" name="onerror">
31187 Called if an error occurred.
31190 <Type name="ErrorCallback" nullable="nullable"/>
31194 <RaiseException name="WebAPIException">
31197 with error type TypeMismatchError, if the input parameter
31198 is not compatible with the expected type for that parameter.
31201 with error type SecurityError, if the application does not have the privilege to call this method.
31204 with error type NotSupportedError, if the feature is not supported.
31210 <Operation name="listStorages" id="::Filesystem::FileSystemManager::listStorages">
31211 <webidl> void listStorages(<ref>FileSystemStorageArraySuccessCallback</ref> onsuccess,
31212 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);</webidl>
31215 Lists the available storages on the device.
31219 Get the list of available internal and external storage devices. The
31220 onsuccess will receive as input argument a list of the data
31221 structure containing additional information about each drive found.
31222 Can get storages would have a label named as 'internal0', virtual roots (images, documents,...), 'removable1', 'removable2'.
31223 'removable1' label would be used to resolve sdcard and 'removable2' label would be used to resolve usb host, if supported.
31224 The vfat filesystem used widly as sdcard filesystem is not case-sensitive.
31225 If you want to handle the file on sdcard, you need to consider case-sensitive filenames are regarded as same name.
31228 Labels can be different, depends on platform implementation.
31231 The ErrorCallback is launched with these error types:
31235 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
31237 UnknownError: In any other error case. </li>
31247 http://tizen.org/privilege/filesystem.read
31249 <Code> function alertForCorruptedRemovableDrives(storages) {
31250 for (var i = 0; i < storages.length; i++) {
31251 if (storages[i].type != "EXTERNAL")
31253 if (storages[i].state == "UNMOUNTABLE")
31254 console.log("External drive " + storages[i].label + " is corrupted.");
31258 tizen.filesystem.listStorages(alertForCorruptedRemovableDrives);
31261 <Type type="void"/>
31263 <Argument name="onsuccess">
31266 Called when the list of storage is available,
31267 passing the storage list to the callback.
31270 <Type name="FileSystemStorageArraySuccessCallback"/>
31272 <Argument optional="optional" name="onerror">
31275 Called if an error occurred.
31278 <Type name="ErrorCallback" nullable="nullable"/>
31282 <RaiseException name="WebAPIException">
31285 with error type TypeMismatchError, if the input parameter
31286 is not compatible with the expected type for that parameter.
31289 with error type SecurityError, if the application does not have the privilege to call this method.
31292 with error type NotSupportedError, if the feature is not supported.
31298 <Operation name="addStorageStateChangeListener" id="::Filesystem::FileSystemManager::addStorageStateChangeListener">
31299 <webidl> long addStorageStateChangeListener(<ref>FileSystemStorageSuccessCallback</ref> onsuccess,
31300 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);</webidl>
31303 Subscribes to notifications when a storage state changes.
31307 The most common usage for this method would be to watch notifications of
31308 additions and removals of external storages.
31311 When executed, the implementation MUST immediately return a subscription identifier that identifies
31312 the watch operation. After returning the identifier, the watch operation is started
31313 asynchronously. The onsuccess MUST be invoked every time
31314 a storage state changes. If the attempt fails, the onerror (if present)
31315 MUST be invoked with the relevant error type.
31318 The watch operation MUST continue until the removeStorageStateChangeListener() method is
31319 called with the corresponding subscription identifier.
31329 http://tizen.org/privilege/filesystem.write
31331 <Code> var watchID;
31332 function onStorageStateChanged(storage) {
31333 if (storage.state == "MOUNTED")
31334 console.log("Storage " + storage.label + " was added!");
31337 watchID = tizen.filesystem.addStorageStateChangeListener(onStorageStateChanged);
31343 long The identifier used to clear the watch subscription.
31348 <Argument name="onsuccess">
31351 To be invoked in every change on storage state.
31354 <Type name="FileSystemStorageSuccessCallback"/>
31356 <Argument optional="optional" name="onerror">
31359 To be invoked in case of error during the watch process.
31362 <Type name="ErrorCallback" nullable="nullable"/>
31366 <RaiseException name="WebAPIException">
31369 with error type TypeMismatchError, if any input parameter
31370 is not compatible with the expected type for that parameter.
31373 with error type SecurityError, if the application does not have the privilege to call this method.
31376 with error type NotSupportedError, if the feature is not supported.
31379 with error type UnknownError, if any other error case.
31385 <Operation name="removeStorageStateChangeListener" id="::Filesystem::FileSystemManager::removeStorageStateChangeListener">
31386 <webidl> void removeStorageStateChangeListener(long watchId) raises(<ref>WebAPIException</ref>);</webidl>
31389 Unsubscribes a storage watch operation.
31393 If the watchId argument is valid and corresponds to a subscription already in
31394 place, the watch process MUST immediately stop and no further callbacks MUST be
31405 http://tizen.org/privilege/filesystem.write
31407 <Code> var watchID;
31408 function onStorageStateChanged(storage) {
31409 if (storage.state == "MOUNTED")
31410 console.log("Storage " + storage.label + " was added!");
31411 tizen.filesystem.removeStorageStateChangeListener(watchID);
31414 watchID = tizen.filesystem.addStorageStateChangeListener(onStorageStateChanged);
31419 <Type type="void"/>
31421 <Argument name="watchId">
31424 Subscription Identifier.
31427 <Type type="long"/>
31431 <RaiseException name="WebAPIException">
31434 with error type TypeMismatchError, if any input parameter
31435 is not compatible with the expected type for that parameter.
31438 with error type InvalidValuesError, if any of the input
31439 parameters contain an invalid value.
31442 with error type SecurityError, if the application does not have the privilege to call this method.
31445 with error type NotSupportedError, if the feature is not supported.
31448 with error type UnknownError, if any other error case.
31451 with error type NotFoundError, if the watchId does not exist.
31458 <Interface name="FileSystemStorage" id="::Filesystem::FileSystemStorage">
31459 <webidl> [NoInterfaceObject] interface FileSystemStorage {
31460 readonly attribute DOMString label;
31462 readonly attribute <ref>FileSystemStorageType</ref> type;
31464 readonly attribute <ref>FileSystemStorageState</ref> state;
31468 The FileSystemStorage interface.
31472 This interface gives additional information about a storage, such as if the
31473 device is mounted, if it's a removable drive or not, or the device's name.
31474 To retrieve the mount point, the resolve() method should be used using
31475 the label as argument.
31482 <ExtendedAttributeList>
31483 <ExtendedAttribute name="NoInterfaceObject">
31484 <webidl>NoInterfaceObject</webidl>
31485 </ExtendedAttribute>
31486 </ExtendedAttributeList>
31487 <Attribute readonly="readonly" name="label" id="::Filesystem::FileSystemStorage::label">
31488 <webidl> readonly attribute DOMString label;</webidl>
31495 Used as input for functions like getStorage() and also used as 'location' parameter for File.resolve() and FileSystemManager.resolve().
31502 <Type type="DOMString"/>
31504 <Attribute readonly="readonly" name="type" id="::Filesystem::FileSystemStorage::type">
31505 <webidl> readonly attribute <ref>FileSystemStorageType</ref> type;</webidl>
31512 Defines whether the storage is internal or external.
31519 <Type name="FileSystemStorageType"/>
31521 <Attribute readonly="readonly" name="state" id="::Filesystem::FileSystemStorage::state">
31522 <webidl> readonly attribute <ref>FileSystemStorageState</ref> state;</webidl>
31529 Defines whether the storage is mounted or not.
31536 <Type name="FileSystemStorageState"/>
31539 <Interface name="File" id="::Filesystem::File">
31540 <webidl> [NoInterfaceObject] interface File {
31541 readonly attribute <ref>File</ref>? parent;
31543 readonly attribute boolean readOnly;
31545 readonly attribute boolean isFile;
31547 readonly attribute boolean isDirectory;
31549 readonly attribute Date? created;
31551 readonly attribute Date? modified;
31553 readonly attribute DOMString path;
31555 readonly attribute DOMString name;
31557 readonly attribute DOMString fullPath;
31559 readonly attribute unsigned long long fileSize;
31561 readonly attribute long length;
31563 DOMString toURI() raises(<ref>WebAPIException</ref>);
31565 void listFiles(<ref>FileArraySuccessCallback</ref> onsuccess,
31566 optional <ref>ErrorCallback</ref>? onerror,
31567 optional <ref>FileFilter</ref>? filter) raises(<ref>WebAPIException</ref>);
31569 void openStream(<ref>FileMode</ref> mode,
31570 <ref>FileStreamSuccessCallback</ref> onsuccess,
31571 optional <ref>ErrorCallback</ref>? onerror,
31572 optional DOMString? encoding) raises(<ref>WebAPIException</ref>);
31574 void readAsText(<ref>FileStringSuccessCallback</ref> onsuccess,
31575 optional <ref>ErrorCallback</ref>? onerror,
31576 optional DOMString? encoding) raises(<ref>WebAPIException</ref>);
31578 void copyTo(DOMString originFilePath,
31579 DOMString destinationFilePath,
31581 optional <ref>SuccessCallback</ref>? onsuccess,
31582 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
31584 void moveTo(DOMString originFilePath,
31585 DOMString destinationFilePath,
31587 optional <ref>SuccessCallback</ref>? onsuccess,
31588 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
31590 <ref>File</ref> createDirectory(DOMString dirPath) raises(<ref>WebAPIException</ref>);
31592 <ref>File</ref> createFile(DOMString relativeFilePath) raises(<ref>WebAPIException</ref>);
31594 <ref>File</ref> resolve(DOMString filePath) raises(<ref>WebAPIException</ref>);
31596 void deleteDirectory(DOMString directoryPath,
31598 optional <ref>SuccessCallback</ref>? onsuccess,
31599 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
31601 void deleteFile(DOMString filePath,
31602 optional <ref>SuccessCallback</ref>? onsuccess,
31603 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
31607 The file interface.
31611 This interface represents the file abstraction in use.
31612 A file handle represents a file
31613 if the isFile property is <em>true</em>, if the isFile property is <em>false</em>, the file
31614 handle represents a directory.
31615 If a file handle represents a directory, it can address files and directories.
31618 The file object permissions for the file object location and tree rooted
31619 at that location depends upon the mode defined in the resolve method.
31620 When a File object creates a child File object,
31621 the new File object inherits its access rights from
31622 the parent object without any reference to the security framework, as
31623 noted in certain methods of File.
31626 A file handle representing a file can be opened for I/O operations,
31627 such as reading and writing.
31630 A file handle representing a directory can be used for listing all
31631 files and directories rooted as the file handle location.
31637 <Code> function onsuccess(files) {
31638 for(var i = 0; i < files.length; i++) {
31639 // alerts each name of dir's contents
31640 console.log(files[i].name);
31644 function onerror(error) {
31645 console.log("The error " + error.message +
31646 " occurred when listing the files in the selected folder");
31649 // list directory contents
31650 dir.listFiles(onsuccess, onerror);
31653 <ExtendedAttributeList>
31654 <ExtendedAttribute name="NoInterfaceObject">
31655 <webidl>NoInterfaceObject</webidl>
31656 </ExtendedAttribute>
31657 </ExtendedAttributeList>
31658 <Attribute readonly="readonly" name="parent" id="::Filesystem::File::parent">
31659 <webidl> readonly attribute <ref>File</ref>? parent;</webidl>
31662 The parent directory handle.
31666 <em>null</em> if there is no parent directory.
31669 If there is no parent directory, this represents a root location.
31675 <Code> // list directory contents
31676 dir.listFiles(onsuccess, onerror);
31678 function onsuccess(files) {
31679 for(var i = 0; i < files.length; i++) {
31680 // prints the file parent, should contain the
31681 // same value for all the files in the loop
31682 console.log("All the files should have the same parent " +
31687 function onerror(error){
31688 console.log("The error " + error.message +
31689 " occurred when listing the files in the selected folder");
31693 <Type name="File" nullable="nullable"/>
31695 <Attribute readonly="readonly" name="readOnly" id="::Filesystem::File::readOnly">
31696 <webidl> readonly attribute boolean readOnly;</webidl>
31699 The file/directory access state in the filesystem.
31703 <em>true</em> if object has read-only access at its location.
31706 <em>false</em> if object has write access at its location.
31709 This attribute represents the actual state of a
31710 file or directory in the filesystem. Its value is not affected by
31711 the mode used in FileSystemManager.resolve that was used to
31712 create the File object from which this File object was obtained.
31718 <Code> // list directory contents
31719 dir.listFiles(onsuccess, onerror);
31721 function onsuccess(files) {
31722 for(var i = 0; i < files.length; i++) {
31723 if(files[i].readOnly)
31724 console.log("Cannot write to file " + files[i].name);
31726 console.log("Can write to file " + files[i].name);
31730 function onerror(error) {
31731 console.log("The error " + error.message + " occurred when listing the files in the selected folder");
31735 <Type type="boolean"/>
31737 <Attribute readonly="readonly" name="isFile" id="::Filesystem::File::isFile">
31738 <webidl> readonly attribute boolean isFile;</webidl>
31745 <em>true</em> if this handle is a file.
31746 <em>false</em> if this handle is a directory.
31753 <Type type="boolean"/>
31755 <Attribute readonly="readonly" name="isDirectory" id="::Filesystem::File::isDirectory">
31756 <webidl> readonly attribute boolean isDirectory;</webidl>
31763 <em>true</em> if this handle is a directory,
31764 <em>false</em> if this handle is a file.
31771 <Type type="boolean"/>
31773 <Attribute readonly="readonly" name="created" id="::Filesystem::File::created">
31774 <webidl> readonly attribute Date? created;</webidl>
31777 The creation timestamp of this file.
31781 This is the timestamp when the file was first created in the filesystem.
31782 Equivalent to the timestamp when a call to createFile() succeeds.
31785 If the platform does not support this attribute, it MUST
31789 It is unspecified and platform-dependent if the creation
31790 timestamp changes when a file is moved.
31797 <Type type="Date" nullable="nullable"/>
31799 <Attribute readonly="readonly" name="modified" id="::Filesystem::File::modified">
31800 <webidl> readonly attribute Date? modified;</webidl>
31803 The modification timestamp.
31807 The modification timestamp of this file. This is the timestamp
31808 of the most recent modification to the file, usually when the last
31809 write operation succeeded. Opening a file for reading does not change
31810 the modification timestamp.
31813 If the platform does not support this attribute, it MUST
31817 It is unspecified and platform-dependent if the modified
31818 timestamp changes when a file is moved.
31824 <Code> console.log(file.modified); // displays the modification timestamp
31827 <Type type="Date" nullable="nullable"/>
31829 <Attribute readonly="readonly" name="path" id="::Filesystem::File::path">
31830 <webidl> readonly attribute DOMString path;</webidl>
31833 The path of this file, excluding the file name.
31837 This is the path of this file, beginning with the name of the root containing the file,
31838 up to and including the directory containing the file, but excluding the file name.
31841 Except in a special case of the File representing the root itself, the last
31842 character is always the character '/'.
31845 For example, if a file is located at music/ramones/volume1/RockawayBeach.mp3,
31846 the path would be music/ramones/volume1/.
31849 For example, if a directory is located at music/ramones/volume1, the path would be
31853 For the virtual roots, the path is same as the name of the virtual root.
31854 For example, if the root is music, then the path is music. If the root is documents, then the path is documents.
31860 <Code> console.log(file.path); // should be 'music/' if the file is music/foo.mp3
31863 <Type type="DOMString"/>
31865 <Attribute readonly="readonly" name="name" id="::Filesystem::File::name">
31866 <webidl> readonly attribute DOMString name;</webidl>
31869 The file name, excluding any path components.
31873 This is the name of this file, excluding the root name and any other path components.
31876 For example, if a file is located at
31877 music/ramones/volume1/RockawayBeach.mp3, the name would be RockawayBeach.mp3.
31880 For example, if a directory is located at music/ramones/volume1, the
31881 name would be volume1.
31884 For the special case of the root itself, the name is an empty string.
31890 <Code> console.log(file.name); // should be foo.mp3 if the file path is music/foo.mp3
31893 <Type type="DOMString"/>
31895 <Attribute readonly="readonly" name="fullPath" id="::Filesystem::File::fullPath">
31896 <webidl> readonly attribute DOMString fullPath;</webidl>
31899 The full path of this file.
31903 The full path of this file, beginning with the name of the root containing the file,
31904 and including the name of the file or directory itself.
31907 For instance, for a file, if the file is located at
31908 music/ramones/volume1/RockawayBeach.mp3, then the fullPath is
31909 music/ramones/volume1/RockawayBeach.mp3.
31912 For a directory, if the directory is located at music/ramones/volume1, then the
31913 fullPath is music/ramones/volume1.
31916 For the special case of the root itself, if the root is music, then the fullPath is
31920 The fullPath is always equal to path + name.
31926 <Code> console.log(file.fullPath); // should be music/track1.mp3 if the file is music/track1.mp3
31929 <Type type="DOMString"/>
31931 <Attribute readonly="readonly" name="fileSize" id="::Filesystem::File::fileSize">
31932 <webidl> readonly attribute unsigned long long fileSize;</webidl>
31935 The size of this file, in bytes.
31939 If there's an attempt to read this attribute on a directory,
31940 <em>undefined</em> is returned. To retrieve the
31941 number of files and directories contained in the directory,
31942 use the length attribute, instead.
31948 <Code> console.log(file.fileSize); // displays the file size
31951 <Type type="unsigned long long"/>
31953 <Attribute readonly="readonly" name="length" id="::Filesystem::File::length">
31954 <webidl> readonly attribute long length;</webidl>
31957 The number of files and directories contained in this file handle.
31961 If there's an attempt to read this attribute on a file,
31962 <em>undefined</em> is returned. To retrieve the
31963 size of a file, use the fileSize attribute instead.
31969 <Code> console.log(file.length); // '3' if the directory contains two files and one sub-directory
31972 <Type type="long"/>
31974 <Operation name="toURI" id="::Filesystem::File::toURI">
31975 <webidl> DOMString toURI() raises(<ref>WebAPIException</ref>);</webidl>
31978 Returns a URI for the file.
31982 Returns a URI that can be used to identify this entry (such as using it
31983 as the src attribute on an HTML img element). The URI has no specific
31984 expiration, it should be valid at least as long as the file exists.
31987 When this method is invoked, the implementation MUST generate a URI.
31990 If that URI corresponds to any of the public virtual roots (that is
31991 images, videos, music, documents, and downloads) the URI
31992 MUST be globally unique and could be used by any widget.
31995 If that URI corresponds to a file located in any of the widget private
31996 areas (such as wgt-package, wgt-private, wgt-private-tmp). The generated
31997 URI MUST be unique for that file and for the widget making the request
31998 (such as including some derived from the widget id in the URI).
31999 These URIs MUST NOT be accessible to other widgets,
32000 apart from the one invoking this method.
32010 http://tizen.org/privilege/filesystem.read
32012 <Code> // 'file:///opt/usr/media/music/ramones/RockawayBeach.mp3' if the file is
32013 // music/ramones/RockawayBeach.mp3
32014 console.log(file.toURI());
32017 <Type type="DOMString">
32020 DOMString The URI that identifies the file or <em>null</em> if an error occurs.
32026 <RaiseException name="WebAPIException">
32029 with error type NotSupportedError, if the feature is not supported.
32032 with error type SecurityError, if the application does not have the privilege to call this method.
32035 with error type UnknownError in any other error situation.
32041 <Operation name="listFiles" id="::Filesystem::File::listFiles">
32042 <webidl> void listFiles(<ref>FileArraySuccessCallback</ref> onsuccess,
32043 optional <ref>ErrorCallback</ref>? onerror,
32044 optional <ref>FileFilter</ref>? filter) raises(<ref>WebAPIException</ref>);</webidl>
32047 Returns the list of all files in this directory.
32051 The list of files will be passed as a File[] in the onsuccess
32052 and contains directories and files. However, the directories "." and ".."
32053 MUST NOT be returned. Each File object part of the array MUST inherit
32054 all the access rights (that is one of the values in FileMode) from the File object in which
32055 this method was invoked.
32058 If the filter is passed and contains valid values, only those directories
32059 and files in the directory that match the filter criteria specified
32060 in the FileFilter interface MUST be returned in the onsuccess.
32061 If no filter is passed, the filter is <em>null</em> or undefined, or the filter contains invalid
32062 values, the implementation MUST return the full list of files in the directory.
32065 If the directory does not contain any files or directories, or
32066 the filter criteria is unmatched to any files or directories, the onsuccess will be
32067 invoked with an empty array.
32070 The ErrorCallback is launched with these error types:
32074 IOError: The operation is launched on a file (not a directory). </li>
32076 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
32078 UnknownError: In any other error case. </li>
32088 http://tizen.org/privilege/filesystem.read
32090 <Code> function onsuccess(files) {
32091 console.log("There are " + files.length + " in the selected folder");
32094 function onerror(error) {
32095 console.log("The error " + error.message + " occurred when listing the files in the selected folder");
32098 tizen.filesystem.resolve(
32099 "documents",
32101 dir.listFiles(onsuccess, onerror);
32103 console.log("Error " + e.message);
32108 <Type type="void"/>
32110 <Argument name="onsuccess">
32113 Called when the list operation has been successfully completed.
32116 <Type name="FileArraySuccessCallback"/>
32118 <Argument optional="optional" name="onerror">
32121 Called if an error occurred.
32124 <Type name="ErrorCallback" nullable="nullable"/>
32126 <Argument optional="optional" name="filter">
32129 Used to restrict the listed files.
32132 <Type name="FileFilter" nullable="nullable"/>
32136 <RaiseException name="WebAPIException">
32139 with error type TypeMismatchError, if the input parameter
32140 is not compatible with the expected type for that parameter.
32143 with error type SecurityError, if the application does not have the privilege to call this method.
32146 with error type NotSupportedError, if the feature is not supported.
32152 <Operation name="openStream" id="::Filesystem::File::openStream">
32153 <webidl> void openStream(<ref>FileMode</ref> mode,
32154 <ref>FileStreamSuccessCallback</ref> onsuccess,
32155 optional <ref>ErrorCallback</ref>? onerror,
32156 optional DOMString? encoding) raises(<ref>WebAPIException</ref>);</webidl>
32159 Opens the file in the given mode supporting the given
32164 This operation is performed asynchronously. If the file is opened
32165 successfully, the onsuccess is invoked with a FileStream
32166 that can be used for reading and writing the file, depending on the
32167 mode. The return FileStream instance includes a file pointer, which represents
32168 the current position in the file. The filepointer will, by default, be at the start of the file,
32169 except in the case of opening with append ("a") mode, in which case
32170 the filepointer points to the end of the file.
32173 The ErrorCallback is launched with these error types:
32177 InvalidValuesError: If any of the input parameters contains an invalid value. </li>
32179 IOError: The operation is launched on a directory (not a file), the file is not
32180 valid or it does not exist. </li>
32182 UnknownError: In any other error case. </li>
32192 http://tizen.org/privilege/filesystem.read
32194 <Code> var documentsDir;
32195 function onsuccess(files) {
32196 for(var i = 0; i < files.length; i++) {
32197 console.log("File Name is " + files[i].name); // displays file name
32200 var testFile = documentsDir.createFile("test.txt");
32201 if (testFile != null) {
32202 testFile.openStream(
32205 fs.write("HelloWorld");
32208 console.log("Error " + e.message);
32209 }, "UTF-8"
32214 function onerror(error) {
32215 console.log("The error " + error.message + " occurred when listing the files in the selected folder");
32218 tizen.filesystem.resolve(
32221 documentsDir = dir; dir.listFiles(onsuccess,onerror);
32223 console.log("Error" + e.message);
32228 <Type type="void"/>
32230 <Argument name="mode">
32233 The mode for opening a file:
32234 <b>"r"</b> for reading
32235 <b>"a"</b> for appending
32236 <b>"w"</b> for [over]writing
32237 <b>"rw"</b> for reading and writing
32240 <Type name="FileMode"/>
32242 <Argument name="onsuccess">
32245 Called when the file has been opened.
32248 <Type name="FileStreamSuccessCallback"/>
32250 <Argument optional="optional" name="onerror">
32253 Called if an error occurred.
32256 <Type name="ErrorCallback" nullable="nullable"/>
32258 <Argument optional="optional" name="encoding">
32261 The encoding for read/write operations on the file,
32262 at least the following encodings MUST be supported:
32263 "<a href="http://www.ietf.org/rfc/rfc2279.txt">UTF-8</a>" default encoding,
32264 "<a href="http://en.wikipedia.org/wiki/ISO/IEC_8859-1">ISO-8859-1</a>" latin1 encoding.
32265 If no encoding is passed by the developer, then the default platform encoding
32269 <Type type="DOMString" nullable="nullable"/>
32273 <RaiseException name="WebAPIException">
32276 with error type TypeMismatchError, if the input parameter
32277 is not compatible with the expected type for that parameter.
32280 with error type SecurityError, if the application does not have the privilege to call this method.
32283 with error type NotSupportedError, if the feature is not supported.
32289 <Operation name="readAsText" id="::Filesystem::File::readAsText">
32290 <webidl> void readAsText(<ref>FileStringSuccessCallback</ref> onsuccess,
32291 optional <ref>ErrorCallback</ref>? onerror,
32292 optional DOMString? encoding) raises(<ref>WebAPIException</ref>);</webidl>
32295 Reads the content of a file as a DOMString.
32299 If the operation is successfully executed, the onsuccess is
32300 invoked and a DOMString is passed as input parameter that represents
32301 the file content in the format determined by the encoding parameter.
32304 The ErrorCallback is launched with these error types:
32308 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
32310 IOError: The operation is launched on a directory (not a file), the file is not
32311 valid, or the file does not exist. </li>
32313 UnknownError: In any other error case. </li>
32323 http://tizen.org/privilege/filesystem.read
32325 <Code> function onsuccess(files) {
32326 for(var i = 0; i < files.length; i++) {
32327 console.log("File Name is " + files[i].name); // displays file name
32328 if (files[i].isDirectory == false)
32329 files[i].readAsText(
32331 console.log("The file content " + str);
32333 console.log("Error " + e.message);
32334 }, "UTF-8"
32339 function onerror(error) {
32340 console.log("The error " + error.message + " occurred when listing the files in the selected folder");
32344 tizen.filesystem.resolve(
32347 documentsDir = dir;
32348 dir.listFiles(onsuccess,onerror);
32350 console.log("Error" + e.message);
32355 <Type type="void"/>
32357 <Argument name="onsuccess">
32360 Called when the file has been successfully read.
32363 <Type name="FileStringSuccessCallback"/>
32365 <Argument optional="optional" name="onerror">
32368 If an error occurs while reading the file.
32371 <Type name="ErrorCallback" nullable="nullable"/>
32373 <Argument optional="optional" name="encoding">
32376 The encoding for read/write operations on the file,
32377 at least the following encodings MUST be supported:
32378 "<a href="http://www.ietf.org/rfc/rfc2279.txt">UTF-8</a>" default encoding,
32379 "<a href="http://en.wikipedia.org/wiki/ISO/IEC_8859-1">ISO-8859-1</a>" latin1 encoding.
32380 If no encoding is passed by the developer, then the default platform
32381 encoding MUST be used.
32384 <Type type="DOMString" nullable="nullable"/>
32388 <RaiseException name="WebAPIException">
32391 with error type TypeMismatchError, if the input parameter
32392 is not compatible with the expected type for that parameter.
32395 with error type SecurityError, if the application does not have the privilege to call this method.
32398 with error type NotSupportedError, if the feature is not supported.
32404 <Operation name="copyTo" id="::Filesystem::File::copyTo">
32405 <webidl> void copyTo(DOMString originFilePath,
32406 DOMString destinationFilePath,
32408 optional <ref>SuccessCallback</ref>? onsuccess,
32409 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);</webidl>
32412 Copies (and overwrites if possible and specified) a file or a
32413 directory from a specified location to another specified location.
32417 The copy of the file or directory identified by the originFilePath parameter
32418 MUST be created in the path passed in the destinationFilePath parameter.
32421 The file or directory to be copied MUST be under the Directory from which the method
32422 is invoked, otherwise the operation MUST NOT be performed.
32425 If the copy is performed successfully, the onsuccess is invoked.
32428 The ErrorCallback is launched with these error types:
32432 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
32434 NotFoundError: originFilePath does not correspond to a valid file or destinationPath is not a valid path. </li>
32436 IOError: The File in which the copyTo method is invoked is a file (not a directory),
32437 originFilePath corresponds to a file or directory in use by another process,
32438 overwrite parameter is <em>false</em> and destinationFilePath corresponds to an existing
32439 file or directory. </li>
32441 UnknownError: In any other error case. </li>
32451 http://tizen.org/privilege/filesystem.write
32453 <Code> var documentsDir;
32454 function onsuccess(files) {
32455 for(var i = 0; i < files.length; i++) {
32456 if (files[i].isDirectory == false) {
32457 documentsDir.copyTo(files[i].fullPath,
32458 "images/backup/" + files[i].name,
32460 function(){console.log("file copied");});
32465 function onerror(error) {
32466 console.log("The error " + error.message +
32467 " occurred when listing the files in the selected folder");
32470 tizen.filesystem.resolve(
32473 documentsDir = dir;
32474 dir.listFiles(onsuccess, onerror);
32476 console.log("Error" + e.message);
32481 <Type type="void"/>
32483 <Argument name="originFilePath">
32486 The origin full virtual file or directory path, it must be under the current directory.
32489 <Type type="DOMString"/>
32491 <Argument name="destinationFilePath">
32494 The new full virtual file path or directory path.
32497 <Type type="DOMString"/>
32499 <Argument name="overwrite">
32502 <em>true</em> enforces overwriting an existing file.
32505 <Type type="boolean"/>
32507 <Argument optional="optional" name="onsuccess">
32510 Called when the file has been copied.
32513 <Type name="SuccessCallback" nullable="nullable"/>
32515 <Argument optional="optional" name="onerror">
32518 Called if an error occurred.
32521 <Type name="ErrorCallback" nullable="nullable"/>
32525 <RaiseException name="WebAPIException">
32528 with error type TypeMismatchError, if the input parameter
32529 is not compatible with the expected type for that parameter.
32532 with error type SecurityError, if the application does not have the privilege to call this method.
32535 with error type NotSupportedError, if the feature is not supported.
32541 <Operation name="moveTo" id="::Filesystem::File::moveTo">
32542 <webidl> void moveTo(DOMString originFilePath,
32543 DOMString destinationFilePath,
32545 optional <ref>SuccessCallback</ref>? onsuccess,
32546 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);</webidl>
32549 Moves a file or a directory from a specified location to another.
32553 The file or directory will be moved (and will overwrite if possible and specified)
32554 atomically to the given path. This operation is different from
32555 instantiating copyTo and then deleting the original file, as on certain
32556 platforms, this operation does not require extra disk space.
32559 The file or directory identified by the originFilePath parameter
32560 MUST be moved to the path passed in the destinationFilePath parameter.
32563 The file to be moved MUST be under the Directory from which the method
32564 is invoked, otherwise the operation MUST NOT be performed.
32567 If the file or directory is moved successfully, the onsuccess is
32571 The ErrorCallback is launched with these error types:
32575 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
32577 NotFoundError: originFilePath does not correspond to a valid file or destinationPath is not a valid path. </li>
32579 IOError: The File in which the moveTo method is invoked is a file (not a directory),
32580 originFilePath corresponds to a file or directory in use by another process,
32581 overwrite parameter is <em>false</em> and destinationFilePath corresponds to an existing
32582 file or directory. </li>
32584 UnknownError: In any other error case. </li>
32594 http://tizen.org/privilege/filesystem.write
32596 <Code> var documentsDir;
32597 function onsuccess(files) {
32598 for(var i = 0; i < files.length; i++) {
32599 if (files[i].isDirectory == false) {
32600 documentsDir.moveTo(files[i].fullPath,
32601 "images/newFolder/" + files[i].name,
32603 function(){console.log("file moved");});
32608 function onerror(error) {
32609 console.log("The error " + error.message +
32610 " occurred during listing the files in the selected folder");
32613 tizen.filesystem.resolve(
32616 documentsDir = dir;
32617 dir.listFiles(onsuccess, onerror);
32619 console.log("Error" + e.message);
32624 <Type type="void"/>
32626 <Argument name="originFilePath">
32629 The origin full virtual file or directory path, it must be under the current directory.
32632 <Type type="DOMString"/>
32634 <Argument name="destinationFilePath">
32637 The new full virtual file path or directory path.
32640 <Type type="DOMString"/>
32642 <Argument name="overwrite">
32645 <em>true</em> enforces overwriting an existing file.
32648 <Type type="boolean"/>
32650 <Argument optional="optional" name="onsuccess">
32653 Called when the file has been moved.
32656 <Type name="SuccessCallback" nullable="nullable"/>
32658 <Argument optional="optional" name="onerror">
32661 Called if an error occurred.
32664 <Type name="ErrorCallback" nullable="nullable"/>
32668 <RaiseException name="WebAPIException">
32671 with error type TypeMismatchError, if the input parameter
32672 is not compatible with the expected type for that parameter.
32675 with error type SecurityError, if the application does not have the privilege to call this method.
32678 with error type NotSupportedError, if the feature is not supported.
32684 <Operation name="createDirectory" id="::Filesystem::File::createDirectory">
32685 <webidl> <ref>File</ref> createDirectory(DOMString dirPath) raises(<ref>WebAPIException</ref>);</webidl>
32688 Creates a new directory.
32692 A new directory will be created relative to the current
32693 directory that this operation is performed on. The implementation will attempt to
32694 create all necessary sub-directories specified in the dirPath, as well. The use of "."
32695 or ".." in path components is not supported.
32698 This operation can only be performed on file handlers that
32699 represent a directory (that is, <var>isDirectory == true</var>).
32702 If the directory is successfully created, it will be returned.
32705 In case the directory cannot be created, an error MUST be thrown
32706 with the appropriate error type.
32716 http://tizen.org/privilege/filesystem.write
32718 <Code> var dir; //Directory object obtained from filesystem API
32719 var newDir = dir.createDirectory("newDir");
32720 var anotherNewDir = dir.createDirectory("newDir1/subNewDir1");
32726 File The file handle of the new directory. The new File object
32727 will have "rw" access rights, as it inherits this from
32728 the File object on which the createDirectory() method is
32734 <Argument name="dirPath">
32737 The relative directory path, it should only contain
32738 characters supported by the underlying filesystem.
32741 <Type type="DOMString"/>
32745 <RaiseException name="WebAPIException">
32748 with error type IOError, if the dirPath already exists.
32751 with error type InvalidValuesError, if the dirPath does not contain a valid path.
32754 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
32757 with error type SecurityError, if the application does not have the privilege to call this method.
32760 with error type NotSupportedError, if the feature is not supported.
32763 with error type UnknownError in any other error case.
32769 <Operation name="createFile" id="::Filesystem::File::createFile">
32770 <webidl> <ref>File</ref> createFile(DOMString relativeFilePath) raises(<ref>WebAPIException</ref>);</webidl>
32773 Creates a new empty file in a specified location.
32777 A new empty file is created in the given path relative
32778 to the directory indicated by current 'File' object's 'path' attribute.
32779 The use of "." or ".." in path components is not supported.
32780 This operation can only be performed on file handlers that
32781 represent a directory (that is, <var>isDirectory == true</var>).
32784 If the file is successfully created, a file handler MUST
32785 be returned by this method.
32788 In case the file cannot be created, an error MUST be thrown
32789 with the appropriate error type.
32799 http://tizen.org/privilege/filesystem.write
32801 <Code> var newFile = dir.createFile("newFilePath");
32807 File The file handle of the new empty file. The new File object
32808 will have "rw" access rights, as it inherits this from
32809 the File object on which the createFile() method is
32815 <Argument name="relativeFilePath">
32818 The new file path, it should only contain characters supported by the underlying filesystem.
32821 <Type type="DOMString"/>
32825 <RaiseException name="WebAPIException">
32828 with error type IOError, if the filePath already exists.
32831 with error type InvalidValuesError, if the filePath contains an invalid value.
32834 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
32837 with error type SecurityError, if the application does not have the privilege to call this method.
32840 with error type NotSupportedError, if the feature is not supported.
32843 with error type UnknownError, in any other error case.
32849 <Operation name="resolve" id="::Filesystem::File::resolve">
32850 <webidl> <ref>File</ref> resolve(DOMString filePath) raises(<ref>WebAPIException</ref>);</webidl>
32853 Resolves an existing file or directory relative to
32854 the current directory this operation is performed on, and
32855 returns a file handle for it.
32859 The filePath is not allowed to contain the "." or ".." directories.
32862 The encoding of file paths is <a href="http://www.ietf.org/rfc/rfc2279.txt">UTF-8</a>.
32872 http://tizen.org/privilege/filesystem.read
32875 // Resolves helloWorld.doc file that is located in the
32876 // documents root location
32877 tizen.filesystem.resolve(
32879 function(dir){ file = dir.resolve("helloWorld.doc");},
32880 function(e){ console.log("Error" + e.message);},
32887 File The file handle of the file. The new File object will inherit its access
32888 rights from the File object on which this resolve() method
32894 <Argument name="filePath">
32897 The relative file/directory path/file URI to resolve.
32900 <Type type="DOMString"/>
32904 <RaiseException name="WebAPIException">
32907 with error type TypeMismatchError, if the input parameter
32908 is not compatible with the expected type for that parameter.
32911 with error type InvalidValuesError, if the file path contains an
32915 with error type IOError, if the method is executed in a File object
32916 that does not represent a directory (that is, isDirectory attribute is false).
32919 with error type NotFoundError, if a file does not exist for the passed
32923 with error type SecurityError, if the application does not have the privilege to call this method.
32926 with error type NotSupportedError, if the feature is not supported.
32929 with error type UnknownError in any other error case.
32935 <Operation name="deleteDirectory" id="::Filesystem::File::deleteDirectory">
32936 <webidl> void deleteDirectory(DOMString directoryPath,
32938 optional <ref>SuccessCallback</ref>? onsuccess,
32939 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);</webidl>
32942 Deletes a specified directory and directory tree if specified.
32946 This function attempts to asynchronously delete a directory or directory tree under the current
32950 If the recursive parameter is set to <em>true</em>, all the directories and files under the specified
32951 directory MUST be deleted. If the recursive parameter is set to false, the directory will
32952 only be deleted if it is empty, otherwise an IOError error type will be passed in onerror.
32955 The directory to be deleted MUST be under the Directory that the method
32956 is invoked from, otherwise the operation MUST NOT be performed.
32957 If the deletion is performed successfully, the onsuccess is invoked.
32960 The ErrorCallback is launched with these error types:
32964 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
32966 NotFoundError: The passed directory does not correspond to a valid directory. </li>
32968 IOError: The File in which the delete method is invoked
32969 is a file (not a directory), the directory is in use by another process
32970 or the directory is not empty and recursive argument is <em>false</em>.
32971 This code will be also used if a recursive deletion partially fails
32972 and any data deleted so far cannot be recovered. This may occur
32973 due to the lack of filesystem permissions or if any
32974 directories or files are opened by other processes. </li>
32976 UnknownError: In any other error case. </li>
32986 http://tizen.org/privilege/filesystem.write
32988 <Code> var documentsDir;
32989 function onsuccess(files) {
32990 for(var i = 0; i < files.length; i++) {
32991 if (files[i].isDirectory) {
32992 documentsDir.deleteDirectory(
32996 console.log("Directory Deleted");
32998 console.log("Error" + e.message);
33001 documentsDir.deleteFile(
33004 console.log("File Deleted");
33006 console.log("Error" + e.message);
33012 function onerror(error) {
33013 console.log("The error " + error.message + " occurred when listing the files in the selected folder");
33016 tizen.filesystem.resolve(
33019 documentsDir = dir;
33020 dir.listFiles(onsuccess,onerror);
33022 console.log("Error" + e.message);
33027 <Type type="void"/>
33029 <Argument name="directoryPath">
33032 The full virtual path to the directory to be deleted (must be under the current one).
33035 <Type type="DOMString"/>
33037 <Argument name="recursive">
33040 <em>true</em> means a recursive deletion. This
33041 will delete all data in all subdirectories. Use with caution.
33044 <Type type="boolean"/>
33046 <Argument optional="optional" name="onsuccess">
33049 Called if the directory is successfully deleted.
33052 <Type name="SuccessCallback" nullable="nullable"/>
33054 <Argument optional="optional" name="onerror">
33057 Called if an error occurred.
33060 <Type name="ErrorCallback" nullable="nullable"/>
33064 <RaiseException name="WebAPIException">
33067 with error type TypeMismatchError, if the input parameter
33068 is not compatible with the expected type for that parameter.
33071 with error type SecurityError, if the application does not have the privilege to call this method.
33074 with error type NotSupportedError, if the feature is not supported.
33080 <Operation name="deleteFile" id="::Filesystem::File::deleteFile">
33081 <webidl> void deleteFile(DOMString filePath,
33082 optional <ref>SuccessCallback</ref>? onsuccess,
33083 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);</webidl>
33086 Deletes a specified file.
33090 This function attempts to asynchronously delete a file under the current directory.
33093 The file to be deleted MUST be under the Directory from which the method
33094 is invoked, otherwise the operation MUST NOT be performed.
33097 If the deletion is performed successfully, the onsuccess is invoked.
33100 The ErrorCallback is launched with these error types:
33104 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
33106 NotFoundError: The file does not correspond to a valid file. </li>
33108 IOError: The file in which the delete method is invoked
33109 is a directory (not a file), the file is in use by another process,
33110 or there is no permission in the file system. </li>
33112 UnknownError: In any other error case. </li>
33122 http://tizen.org/privilege/filesystem.write
33124 <Code> function onsuccess(files) {
33125 for(var i = 0; i < files.length; i++) {
33126 if (files[i].isDirectory) {
33127 documentsDir.deleteDirectory(
33131 console.log("Directory Deleted");
33133 console.log("Error" + e.message);
33136 documentsDir.deleteFile(
33139 console.log("File Deleted");
33141 console.log("Error" + e.message);
33147 function onerror(error) {
33148 console.log("The error " + error.message + " occurred when listing the files in the selected folder");
33152 tizen.filesystem.resolve(
33155 documentsDir = dir;
33156 dir.listFiles(onsuccess,onerror);
33158 console.log("Error" + e.message);
33163 <Type type="void"/>
33165 <Argument name="filePath">
33168 The full virtual path to the file to be deleted (must be under the current directory).
33171 <Type type="DOMString"/>
33173 <Argument optional="optional" name="onsuccess">
33176 Called if the file is successfully deleted.
33179 <Type name="SuccessCallback" nullable="nullable"/>
33181 <Argument optional="optional" name="onerror">
33184 Called if an error occurred.
33187 <Type name="ErrorCallback" nullable="nullable"/>
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 SecurityError, if the application does not have the privilege to call this method.
33201 with error type NotSupportedError, if the feature is not supported.
33208 <Dictionary name="FileFilter" id="::Filesystem::FileFilter">
33209 <webidl> dictionary FileFilter {
33212 Date startModified;
33222 Dictionary created to filter the items returned by the listFiles method.
33226 When this dictionary is passed in the listFiles method, the result-set of
33227 the listFiles method MUST only contain the file items entries that match
33228 the attribute values of the filter.
33229 The result set of the listFiles method does not guarantee any sort order.
33232 A file item only matches the FileFilter object if all the attributes of the file item match
33233 all the attribute values of the filter which are defined (that is, only matching values other
33234 than undefined or <em>null</em>). This is similar to an SQL "AND" operation.
33237 An attribute of the file entry matches the FileFilter attribute value in accordance with the
33242 For FileFilter attributes of type DOMString, an entry matches this value only if its
33243 corresponding attribute is an exact match. If the filter contains U+0025 'PERCENT SIGN' it is
33244 interpreted as a wildcard character and '%' matches any string of any length, including no
33245 length. If wildcards are used, the behavior is similar to the LIKE condition in SQL. To
33246 specify that a 'PERCENT SIGN' character is to be considered literally instead of interpreting it
33247 as a wildcard, developers may escape it with the backslash character (\).
33248 The matching is not case sensitive, such as "FOO" matches a "foo" or an "f%" filter.
33251 For File entry attributes of type Date, attributes start and end are included to allow
33252 filtering of File entries between two supplied dates. If either or both of these attributes are
33253 specified, the following rules apply:
33254 A) If both start and end dates are specified (that is, other than <em>null</em>), a File entry matches the
33255 filter if it's corresponding attribute is the same as either start or end or between the two
33256 supplied dates (that is, after start and before end).
33257 B) If only the start attribute contains a value (other than <em>null</em>), a File entry matches the
33258 filter if its corresponding attribute is later than or equal to the start one.
33259 C) If only the end date contains a value (other than <em>null</em>), a file matches the filter if its
33260 corresponding attribute is earlier than or equal to the end date.
33268 <DictionaryMember name="name" id="::Filesystem::FileFilter::name">
33269 <webidl> DOMString name;</webidl>
33272 Used for filtering the File name attribute.
33276 Files which name corresponds with this attribute
33277 (either exactly or with the specified wildcards) match
33278 this filtering criteria.
33285 <Type type="DOMString"/>
33286 </DictionaryMember>
33287 <DictionaryMember name="startModified" id="::Filesystem::FileFilter::startModified">
33288 <webidl> Date startModified;</webidl>
33291 Used for filtering the File modified attribute.
33295 Files with modified date later than this attribute or equal to it match
33296 the filtering criteria.
33303 <Type type="Date"/>
33304 </DictionaryMember>
33305 <DictionaryMember name="endModified" id="::Filesystem::FileFilter::endModified">
33306 <webidl> Date endModified;</webidl>
33309 Used for filtering the File created attribute.
33313 Files with modified date earlier than this attribute or equal to it
33314 match the filtering criteria.
33321 <Type type="Date"/>
33322 </DictionaryMember>
33323 <DictionaryMember name="startCreated" id="::Filesystem::FileFilter::startCreated">
33324 <webidl> Date startCreated;</webidl>
33327 Used for filtering the File created attribute.
33331 Files with created date later than this attribute or equal to it match
33332 the filtering criteria.
33339 <Type type="Date"/>
33340 </DictionaryMember>
33341 <DictionaryMember name="endCreated" id="::Filesystem::FileFilter::endCreated">
33342 <webidl> Date endCreated;</webidl>
33345 Used for filtering the File created attribute.
33349 Files with created date earlier than this attribute or equal to it
33350 match the filtering criteria.
33357 <Type type="Date"/>
33358 </DictionaryMember>
33360 <Interface name="FileStream" id="::Filesystem::FileStream">
33361 <webidl> [NoInterfaceObject] interface FileStream {
33362 readonly attribute boolean eof;
33364 attribute long position setraises(<ref>WebAPIException</ref>);
33366 readonly attribute long bytesAvailable;
33370 DOMString read(long charCount) raises(<ref>WebAPIException</ref>);
33372 octet[] readBytes(long byteCount) raises(<ref>WebAPIException</ref>);
33374 DOMString readBase64(long byteCount) raises(<ref>WebAPIException</ref>);
33376 void write(DOMString stringData) raises(<ref>WebAPIException</ref>);
33378 void writeBytes(octet[] byteData) raises(<ref>WebAPIException</ref>);
33380 void writeBase64(DOMString base64Data) raises(<ref>WebAPIException</ref>);
33388 A FileStream represents a handle to a File opened for read and/or
33389 write operations. Read and write operations are performed relative
33390 to a position attribute, which is a pointer that represents the current position in the file.
33393 A series of read/write methods are available that permit both binary and
33394 text to be processed.
33397 Once a file stream is closed, any operation attempted on this stream
33398 will result in a standard JavaScript error.
33401 The read/write operations in this interface do not throw any security
33402 exceptions as the access rights are expected to be granted through the initial
33403 resolve() method or through the openStream() method of the File interface.
33404 Therefore, all actions performed on a successfully resolved File and FileStream are
33405 expected to succeed. This avoids successive asynchronous calls and may potentially increase
33406 application for a user.
33413 <ExtendedAttributeList>
33414 <ExtendedAttribute name="NoInterfaceObject">
33415 <webidl>NoInterfaceObject</webidl>
33416 </ExtendedAttribute>
33417 </ExtendedAttributeList>
33418 <Attribute readonly="readonly" name="eof" id="::Filesystem::FileStream::eof">
33419 <webidl> readonly attribute boolean eof;</webidl>
33422 Indicates whether or not the current file pointer is at the end
33427 If <em>true</em>, this attribute indicates that the file pointer is at the end of the file.
33430 If <em>false</em>, this attribute indicates that the file pointer is not at the end of the file
33431 and may be anywhere within the file.
33437 <Code> if(stream.eof) {
33438 // file has been read completely
33442 <Type type="boolean"/>
33444 <Attribute name="position" id="::Filesystem::FileStream::position">
33445 <webidl> attribute long position setraises(<ref>WebAPIException</ref>);</webidl>
33448 Gets/sets stream position for reads/writes.
33452 The stream position is an offset of bytes from the start of
33453 the file stream. When invoking an operation that reads or
33454 writes from the stream, the operation will take place from the
33455 byte defined by this position attribute. If the read or write
33456 operation is successful, the position of the stream is advanced
33457 by the number of bytes read or written. If the read/write operation is not
33458 successful, the position of the stream is unchanged.
33464 <Code> console.log(stream.position); // displays current stream position
33465 // alters current stream position to the begin of the file,
33466 // like seek() in C
33467 stream.position = 0;
33470 <Type type="long"/>
33472 <RaiseException name="WebAPIException"/>
33475 <Attribute readonly="readonly" name="bytesAvailable" id="::Filesystem::FileStream::bytesAvailable">
33476 <webidl> readonly attribute long bytesAvailable;</webidl>
33479 Returns the number of bytes that are available for
33480 reading from the stream.
33484 The number of bytes available for reading is the maximum
33485 amount of bytes that can be read in the next read operation.
33486 It corresponds to the number of bytes available after the file pointer
33487 denoted by the position attribute.
33490 -1 if eof is <em>true</em>.
33496 <Code> console.log(stream.bytesAvailable); // displays the available bytes to be read
33499 <Type type="long"/>
33501 <Operation name="close" id="::Filesystem::FileStream::close">
33502 <webidl> void close();</webidl>
33505 Closes this FileStream.
33509 Flushes any pending buffered writes and closes the File. Always succeeds.
33510 Note that pending writes might not succeed.
33520 http://tizen.org/privilege/filesystem.read
33522 <Code> stream.close(); // closes this stream, no subsequent access to stream allowed
33525 <Type type="void"/>
33528 <Operation name="read" id="::Filesystem::FileStream::read">
33529 <webidl> DOMString read(long charCount) raises(<ref>WebAPIException</ref>);</webidl>
33532 Reads the specified number of characters from this FileStream.
33536 Reads the specified number of characters after the position file pointer and returns them as a string.
33537 The resulting string length might be shorter than charCount if eof
33548 http://tizen.org/privilege/filesystem.read
33550 <Code> var text = stream.read(file.fileSize);
33554 <Type type="DOMString">
33557 DOMString The result of read characters as a string.
33562 <Argument name="charCount">
33565 Number of characters being read.
33568 <Type type="long"/>
33572 <RaiseException name="WebAPIException">
33575 with error type IOError, if a read error occurs, such as the bytes in the stream
33576 cannot be decoded with the encoding in use.
33579 with error type TypeMismatchError, if the input parameter
33580 is not compatible with the expected type for that parameter.
33583 with error type InvalidValuesError, if any of the input
33584 parameters contain an invalid value.
33587 with error type SecurityError, if the application does not have the privilege to call this method.
33590 with error type NotSupportedError, if the feature is not supported.
33596 <Operation name="readBytes" id="::Filesystem::FileStream::readBytes">
33597 <webidl> octet[] readBytes(long byteCount) raises(<ref>WebAPIException</ref>);</webidl>
33600 Reads the specified number of bytes from this FileStream.
33609 http://tizen.org/privilege/filesystem.read
33611 <Code> // reads up to 256 bytes from the stream
33612 var raw = stream.readBytes(256);
33613 for(var i = 0; i < raw.length; i++) {
33614 // raw[i] contains the i-th byte of the current data chunk
33618 <Type type="array">
33621 octet[] The result of read bytes as a byte (or number) array.
33624 <Type type="octet"/>
33627 <Argument name="byteCount">
33630 Number of bytes being read.
33633 <Type type="long"/>
33637 <RaiseException name="WebAPIException">
33640 with error type IOError, if a read error occurs.
33643 with error type TypeMismatchError, if the input parameter
33644 is not compatible with the expected type for that parameter.
33647 with error type InvalidValuesError, if any of the input
33648 parameters contain an invalid value.
33651 with error type SecurityError, if the application does not have the privilege to call this method.
33654 with error type NotSupportedError, if the feature is not supported.
33660 <Operation name="readBase64" id="::Filesystem::FileStream::readBase64">
33661 <webidl> DOMString readBase64(long byteCount) raises(<ref>WebAPIException</ref>);</webidl>
33664 Reads the specified number of bytes from this FileStream, encoding
33665 the result in base64.
33674 http://tizen.org/privilege/filesystem.read
33676 <Code> // reads up to 256 bytes from the stream
33677 var base64 = stream.readBase64(256);
33680 <Type type="DOMString">
33683 DOMString The result of read bytes as base64 encoding string.
33688 <Argument name="byteCount">
33691 Number of bytes being read.
33694 <Type type="long"/>
33698 <RaiseException name="WebAPIException">
33701 with error type IOError, if a read error occurs.
33704 with error type TypeMismatchError, if the input parameter
33705 is not compatible with the expected type for that parameter.
33708 with error type InvalidValuesError, if any of the input
33709 parameters contain an invalid value.
33712 with error type SecurityError, if the application does not have the privilege to call this method.
33715 with error type NotSupportedError, if the feature is not supported.
33721 <Operation name="write" id="::Filesystem::FileStream::write">
33722 <webidl> void write(DOMString stringData) raises(<ref>WebAPIException</ref>);</webidl>
33725 Writes the specified DOMString to this FileStream.
33734 http://tizen.org/privilege/filesystem.write
33736 <Code> var text = "Hello world";
33737 stream.write(text);
33740 <Type type="void"/>
33742 <Argument name="stringData">
33745 The actual string to be written.
33748 <Type type="DOMString"/>
33752 <RaiseException name="WebAPIException">
33755 with error type IOError, if a write error occurs.
33758 with error type TypeMismatchError, if the input parameter
33759 is not compatible with the expected type for that parameter.
33762 with error type SecurityError, if the application does not have the privilege to call this method.
33765 with error type NotSupportedError, if the feature is not supported.
33771 <Operation name="writeBytes" id="::Filesystem::FileStream::writeBytes">
33772 <webidl> void writeBytes(octet[] byteData) raises(<ref>WebAPIException</ref>);</webidl>
33775 Writes the specified bytes to this FileStream.
33784 http://tizen.org/privilege/filesystem.write
33786 <Code> var bytes = in.readBytes(256);
33787 out.writeBytes(bytes); // writes the bytes read from in to out
33790 <Type type="void"/>
33792 <Argument name="byteData">
33795 The byte data array being written.
33798 <Type type="array">
33799 <Type type="octet"/>
33804 <RaiseException name="WebAPIException">
33807 with error type IOError, if a write error occurs.
33810 with error type TypeMismatchError, if the input parameter
33811 is not compatible with the expected type for that parameter.
33814 with error type SecurityError, if the application does not have the privilege to call this method.
33817 with error type NotSupportedError, if the feature is not supported.
33823 <Operation name="writeBase64" id="::Filesystem::FileStream::writeBase64">
33824 <webidl> void writeBase64(DOMString base64Data) raises(<ref>WebAPIException</ref>);</webidl>
33827 Converts the specified base64 DOMString to bytes and writes the
33828 result to this FileStream.
33837 http://tizen.org/privilege/filesystem.write
33839 <Code> var base64 = in.readBase64(256);
33840 out.writeBase64(base64); // writes the base64 data read from in to out
33843 <Type type="void"/>
33845 <Argument name="base64Data">
33848 The base64 data being written.
33851 <Type type="DOMString"/>
33855 <RaiseException name="WebAPIException">
33858 with error type IOError, if an error occurs during writeBase64.
33861 with error type TypeMismatchError, if the input parameter
33862 is not compatible with the expected type for that parameter.
33865 with error type SecurityError, if the application does not have the privilege to call this method.
33868 with error type NotSupportedError, if the feature is not supported.
33875 <Interface name="FileSuccessCallback" id="::Filesystem::FileSuccessCallback">
33876 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface FileSuccessCallback {
33877 void onsuccess(<ref>File</ref> file);
33881 The file system specific success callback.
33885 This callback interface specifies a success callback with
33886 a File object as input argument. It is used in asynchronous
33887 operations, such as FileSystemManager.resolve() and
33888 copying, moving, and deleting files.
33895 <ExtendedAttributeList>
33896 <ExtendedAttribute name="Callback" value="FunctionOnly">
33897 <webidl>Callback</webidl>
33898 </ExtendedAttribute>
33899 <ExtendedAttribute name="NoInterfaceObject">
33900 <webidl> NoInterfaceObject</webidl>
33901 </ExtendedAttribute>
33902 </ExtendedAttributeList>
33903 <Operation name="onsuccess" id="::Filesystem::FileSuccessCallback::onsuccess">
33904 <webidl> void onsuccess(<ref>File</ref> file);</webidl>
33907 The method invoked when the asynchronous call completes successfully.
33913 <Type type="void"/>
33915 <Argument name="file">
33918 The file resulting from the asynchronous call.
33921 <Type name="File"/>
33926 <Interface name="FileSystemStorageArraySuccessCallback" id="::Filesystem::FileSystemStorageArraySuccessCallback">
33927 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface FileSystemStorageArraySuccessCallback {
33928 void onsuccess(<ref>FileSystemStorage</ref>[] storages);
33932 The success callback to retrieve FileSystemStorage objects.
33936 This callback interface specifies a success callback with
33937 an array of FileSystemStorage objects as input argument. It is used in asynchronous
33938 operations, such as FileSystemManager.listStorages().
33945 <ExtendedAttributeList>
33946 <ExtendedAttribute name="Callback" value="FunctionOnly">
33947 <webidl>Callback</webidl>
33948 </ExtendedAttribute>
33949 <ExtendedAttribute name="NoInterfaceObject">
33950 <webidl> NoInterfaceObject</webidl>
33951 </ExtendedAttribute>
33952 </ExtendedAttributeList>
33953 <Operation name="onsuccess" id="::Filesystem::FileSystemStorageArraySuccessCallback::onsuccess">
33954 <webidl> void onsuccess(<ref>FileSystemStorage</ref>[] storages);</webidl>
33957 The method invoked when the asynchronous call completes successfully.
33963 <Type type="void"/>
33965 <Argument name="storages">
33968 List of available storage devices.
33971 <Type type="array">
33972 <Type name="FileSystemStorage"/>
33978 <Interface name="FileSystemStorageSuccessCallback" id="::Filesystem::FileSystemStorageSuccessCallback">
33979 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface FileSystemStorageSuccessCallback {
33980 void onsuccess(<ref>FileSystemStorage</ref> storage);
33984 The success callback to retrieve a FileSystemStorage object.
33988 This callback interface specifies a success callback with
33989 a FileSystmeStorage object as input argument. It is used in asynchronous
33990 operations, such as FileSystemManager.getStorage() and
33991 FileSystemManager.addStorageStateChangeListener().
33998 <ExtendedAttributeList>
33999 <ExtendedAttribute name="Callback" value="FunctionOnly">
34000 <webidl>Callback</webidl>
34001 </ExtendedAttribute>
34002 <ExtendedAttribute name="NoInterfaceObject">
34003 <webidl> NoInterfaceObject</webidl>
34004 </ExtendedAttribute>
34005 </ExtendedAttributeList>
34006 <Operation name="onsuccess" id="::Filesystem::FileSystemStorageSuccessCallback::onsuccess">
34007 <webidl> void onsuccess(<ref>FileSystemStorage</ref> storage);</webidl>
34010 The method invoked when the asynchronous call completes successfully.
34016 <Type type="void"/>
34018 <Argument name="storage">
34021 The storage device structure.
34024 <Type name="FileSystemStorage"/>
34029 <Interface name="FileStringSuccessCallback" id="::Filesystem::FileStringSuccessCallback">
34030 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface FileStringSuccessCallback {
34031 void onsuccess(DOMString fileStr);
34035 The success callback to read the content of a file as a DOMString.
34039 This callback interface specifies a success callback with
34040 a DOMString object as input argument. It is used in asynchronous
34041 operations, such as File.readAsText().
34048 <ExtendedAttributeList>
34049 <ExtendedAttribute name="Callback" value="FunctionOnly">
34050 <webidl>Callback</webidl>
34051 </ExtendedAttribute>
34052 <ExtendedAttribute name="NoInterfaceObject">
34053 <webidl> NoInterfaceObject</webidl>
34054 </ExtendedAttribute>
34055 </ExtendedAttributeList>
34056 <Operation name="onsuccess" id="::Filesystem::FileStringSuccessCallback::onsuccess">
34057 <webidl> void onsuccess(DOMString fileStr);</webidl>
34060 The method invoked when the asynchronous call completes successfully.
34066 <Type type="void"/>
34068 <Argument name="fileStr">
34071 The file represented as a DOMString resulting from the asynchronous call.
34074 <Type type="DOMString"/>
34079 <Interface name="FileStreamSuccessCallback" id="::Filesystem::FileStreamSuccessCallback">
34080 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface FileStreamSuccessCallback {
34081 void onsuccess(<ref>FileStream</ref> filestream);
34085 The success callback to open a file for raw access.
34089 This callback interface specifies a success callback with
34090 a FileStream object as input argument. It is used by asynchronous
34091 methods, such as File.openStream().
34098 <ExtendedAttributeList>
34099 <ExtendedAttribute name="Callback" value="FunctionOnly">
34100 <webidl>Callback</webidl>
34101 </ExtendedAttribute>
34102 <ExtendedAttribute name="NoInterfaceObject">
34103 <webidl> NoInterfaceObject</webidl>
34104 </ExtendedAttribute>
34105 </ExtendedAttributeList>
34106 <Operation name="onsuccess" id="::Filesystem::FileStreamSuccessCallback::onsuccess">
34107 <webidl> void onsuccess(<ref>FileStream</ref> filestream);</webidl>
34110 The method invoked when the File.openStream asynchronous call completes successfully.
34116 <Type type="void"/>
34118 <Argument name="filestream">
34121 The filestream to access file content.
34124 <Type name="FileStream"/>
34129 <Interface name="FileArraySuccessCallback" id="::Filesystem::FileArraySuccessCallback">
34130 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface FileArraySuccessCallback {
34131 void onsuccess(<ref>File</ref>[] files);
34135 The file system specific success callback for listing methods.
34139 This callback interface specifies a success callback with a function
34140 taking an array of File objects as input argument. It is used in asynchronous
34141 methods, such as File.listFiles().
34148 <ExtendedAttributeList>
34149 <ExtendedAttribute name="Callback" value="FunctionOnly">
34150 <webidl>Callback</webidl>
34151 </ExtendedAttribute>
34152 <ExtendedAttribute name="NoInterfaceObject">
34153 <webidl> NoInterfaceObject</webidl>
34154 </ExtendedAttribute>
34155 </ExtendedAttributeList>
34156 <Operation name="onsuccess" id="::Filesystem::FileArraySuccessCallback::onsuccess">
34157 <webidl> void onsuccess(<ref>File</ref>[] files);</webidl>
34160 The method invoked when the asynchronous call completes successfully.
34166 <Type type="void"/>
34168 <Argument name="files">
34171 The files resulting from the asynchronous call.
34174 <Type type="array">
34175 <Type name="File"/>
34182 <Module name="MessagePort" id="::MessagePort">
34183 <webidl>module MessagePort {
34185 [NoInterfaceObject] interface MessagePortManagerObject {
34186 readonly attribute <ref>MessagePortManager</ref> messageport;
34188 <ref>Tizen</ref> implements <ref>MessagePortManagerObject</ref>;
34190 [NoInterfaceObject] interface MessagePortManager {
34192 <ref>LocalMessagePort</ref> requestLocalMessagePort(DOMString localMessagePortName) raises(<ref>WebAPIException</ref>);
34194 <ref>LocalMessagePort</ref> requestTrustedLocalMessagePort(DOMString localMessagePortName) raises(<ref>WebAPIException</ref>);
34196 <ref>RemoteMessagePort</ref> requestRemoteMessagePort(<ref>ApplicationId</ref> appId, DOMString remoteMessagePortName) raises(<ref>WebAPIException</ref>);
34198 <ref>RemoteMessagePort</ref> requestTrustedRemoteMessagePort(<ref>ApplicationId</ref> appId, DOMString remoteMessagePortName) raises(<ref>WebAPIException</ref>);
34201 [NoInterfaceObject] interface LocalMessagePort {
34203 readonly attribute DOMString messagePortName;
34205 readonly attribute boolean isTrusted;
34207 long addMessagePortListener(<ref>MessagePortCallback</ref> listener) raises(<ref>WebAPIException</ref>);
34209 void removeMessagePortListener(long watchId) raises(<ref>WebAPIException</ref>);
34212 [NoInterfaceObject] interface RemoteMessagePort {
34214 readonly attribute DOMString messagePortName;
34216 readonly attribute <ref>ApplicationId</ref> appId;
34218 readonly attribute boolean isTrusted;
34220 void sendMessage(<ref>MessagePortDataItem</ref>[] data, optional <ref>LocalMessagePort</ref>? localMessagePort) raises(<ref>WebAPIException</ref>);
34223 dictionary MessagePortDataItem {
34228 [Callback=FunctionOnly, NoInterfaceObject] interface MessagePortCallback {
34229 void onreceived(<ref>MessagePortDataItem</ref>[] data, <ref>RemoteMessagePort</ref>? remoteMessagePort);
34234 This API provides the functionality for communicating with other applications.
34240 <Interface name="MessagePortManagerObject" id="::MessagePort::MessagePortManagerObject">
34241 <webidl> [NoInterfaceObject] interface MessagePortManagerObject {
34242 readonly attribute <ref>MessagePortManager</ref> messageport;
34246 The <em>MessagePortManagerObject</em> interface defines what is instantiated by the Tizen object from the Tizen Platform.
34250 There is a <em>tizen.messageport</em> object that allows access to the functionality of the Message Port API.
34257 <ExtendedAttributeList>
34258 <ExtendedAttribute name="NoInterfaceObject">
34259 <webidl>NoInterfaceObject</webidl>
34260 </ExtendedAttribute>
34261 </ExtendedAttributeList>
34262 <Attribute readonly="readonly" name="messageport" id="::MessagePort::MessagePortManagerObject::messageport">
34263 <webidl> readonly attribute <ref>MessagePortManager</ref> messageport;</webidl>
34264 <Type name="MessagePortManager"/>
34267 <Implements name1="Tizen" name2="MessagePortManagerObject">
34268 <webidl> <ref>Tizen</ref> implements <ref>MessagePortManagerObject</ref>;</webidl>
34270 <Interface name="MessagePortManager" id="::MessagePort::MessagePortManager">
34271 <webidl> [NoInterfaceObject] interface MessagePortManager {
34273 <ref>LocalMessagePort</ref> requestLocalMessagePort(DOMString localMessagePortName) raises(<ref>WebAPIException</ref>);
34275 <ref>LocalMessagePort</ref> requestTrustedLocalMessagePort(DOMString localMessagePortName) raises(<ref>WebAPIException</ref>);
34277 <ref>RemoteMessagePort</ref> requestRemoteMessagePort(<ref>ApplicationId</ref> appId, DOMString remoteMessagePortName) raises(<ref>WebAPIException</ref>);
34279 <ref>RemoteMessagePort</ref> requestTrustedRemoteMessagePort(<ref>ApplicationId</ref> appId, DOMString remoteMessagePortName) raises(<ref>WebAPIException</ref>);
34283 The <em>MessagePortManager</em> interface provides methods to request message port to communicate.
34289 <ExtendedAttributeList>
34290 <ExtendedAttribute name="NoInterfaceObject">
34291 <webidl>NoInterfaceObject</webidl>
34292 </ExtendedAttribute>
34293 </ExtendedAttributeList>
34294 <Operation name="requestLocalMessagePort" id="::MessagePort::MessagePortManager::requestLocalMessagePort">
34295 <webidl> <ref>LocalMessagePort</ref> requestLocalMessagePort(DOMString localMessagePortName) raises(<ref>WebAPIException</ref>);</webidl>
34298 Requests a LocalMessage Port instance to start receiving message from another application.
34303 <Code> // Requests the LocalMessagePort instance with the specified message port name
34304 var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
34307 <Type name="LocalMessagePort">
34310 LocalMessagePort The LocalMessagePort instance.
34315 <Argument name="localMessagePortName">
34318 The name of the local message port to retrieve.<br/>The LocalMessagePort instances are identical for the same message port name.
34321 <Type type="DOMString"/>
34325 <RaiseException name="WebAPIException">
34328 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
34331 with error type InvalidValuesError, if the input parameter contains an invalid value.
34334 with error type UnknownError, if any other error occurs.
34340 <Operation name="requestTrustedLocalMessagePort" id="::MessagePort::MessagePortManager::requestTrustedLocalMessagePort">
34341 <webidl> <ref>LocalMessagePort</ref> requestTrustedLocalMessagePort(DOMString localMessagePortName) raises(<ref>WebAPIException</ref>);</webidl>
34344 Requests a trusted LocalMessagePort instance to receive message from another application.
34348 Trusted local message port can communicate with applications that are signed with same certificate.
34354 <Code> // Requests the LocalMessagePort instance with the specified message port name
34355 var localMsgPort = tizen.messageport.requestTrustedLocalMessagePort('MessagePortB');
34358 <Type name="LocalMessagePort">
34361 LocalMessagePort The trusted LocalMessagePort instance.
34366 <Argument name="localMessagePortName">
34369 The name of local message port.<br/>The LocalMessagePort instances are identical for the same message port name.
34372 <Type type="DOMString"/>
34376 <RaiseException name="WebAPIException">
34379 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
34382 with error type InvalidValuesError, if the input parameter contains an invalid value.
34385 with error type UnknownError, if any other error occurs.
34391 <Operation name="requestRemoteMessagePort" id="::MessagePort::MessagePortManager::requestRemoteMessagePort">
34392 <webidl> <ref>RemoteMessagePort</ref> requestRemoteMessagePort(<ref>ApplicationId</ref> appId, DOMString remoteMessagePortName) raises(<ref>WebAPIException</ref>);</webidl>
34395 Requests a RemoteMessagePort instance to send message to another application.
34399 If the message port name and application ID is the same, the platform returns the same RemoteMessagePort instance.
34405 <Code> // Requests the RemoteMessagePort instance with the specified message port name
34406 var remoteMsgPort = tizen.messageport.requestRemoteMessagePort('6xaeuflskd.App1', 'MessagePortA');
34409 <Type name="RemoteMessagePort">
34412 RemoteMessagePort The RemoteMessagePort instance.
34417 <Argument name="appId">
34420 The ID of the application to send messages.
34423 <Type name="ApplicationId"/>
34425 <Argument name="remoteMessagePortName">
34428 The name of remote message port.
34431 <Type type="DOMString"/>
34435 <RaiseException name="WebAPIException">
34438 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
34441 with error type InvalidValuesError, if an input parameter contains an invalid value.
34444 with error type NotFoundError, if the port of the target application is not found.
34447 with error type UnknownError, if any other error occurs.
34453 <Operation name="requestTrustedRemoteMessagePort" id="::MessagePort::MessagePortManager::requestTrustedRemoteMessagePort">
34454 <webidl> <ref>RemoteMessagePort</ref> requestTrustedRemoteMessagePort(<ref>ApplicationId</ref> appId, DOMString remoteMessagePortName) raises(<ref>WebAPIException</ref>);</webidl>
34457 Requests a trusted RemoteMessagePort instance to receive message from another application.
34461 If the message port name and application ID is the same, the platform returns the same RemoteMessagePort instance.
34462 Trusted remote message port can communicate with applications that are signed with same certificate.
34468 <Code> // Requests the RemoteMessagePort instance with the specified message port name.
34469 var remoteMsgPort = tizen.messageport.requestTrustedRemoteMessagePort('6xauflskd.App1', 'MessagePortB');
34472 <Type name="RemoteMessagePort">
34475 RemoteMessagePort The trusted RemoteMessagePort instance.
34480 <Argument name="appId">
34483 The ID of the application to send messages.
34486 <Type name="ApplicationId"/>
34488 <Argument name="remoteMessagePortName">
34491 The name of remote message port.
34494 <Type type="DOMString"/>
34498 <RaiseException name="WebAPIException">
34501 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
34504 with error type InvalidValuesError, if an input parameter contains an invalid value.
34507 with error type NotFoundError, if the port of the target application is not found.
34510 with error type InvalidAccessError, if the target application is not signed with the same certification.
34513 with error type UnknownError, if any other error occurs
34520 <Interface name="LocalMessagePort" id="::MessagePort::LocalMessagePort">
34521 <webidl> [NoInterfaceObject] interface LocalMessagePort {
34523 readonly attribute DOMString messagePortName;
34525 readonly attribute boolean isTrusted;
34527 long addMessagePortListener(<ref>MessagePortCallback</ref> listener) raises(<ref>WebAPIException</ref>);
34529 void removeMessagePortListener(long watchId) raises(<ref>WebAPIException</ref>);
34533 The <em>LocalMessagePort</em> interface provides methods to receive data.
34539 <ExtendedAttributeList>
34540 <ExtendedAttribute name="NoInterfaceObject">
34541 <webidl>NoInterfaceObject</webidl>
34542 </ExtendedAttribute>
34543 </ExtendedAttributeList>
34544 <Attribute readonly="readonly" name="messagePortName" id="::MessagePort::LocalMessagePort::messagePortName">
34545 <webidl> readonly attribute DOMString messagePortName;</webidl>
34548 An attribute that stores the name of the message port name.
34554 <Type type="DOMString"/>
34556 <Attribute readonly="readonly" name="isTrusted" id="::MessagePort::LocalMessagePort::isTrusted">
34557 <webidl> readonly attribute boolean isTrusted;</webidl>
34560 An attribute that determines whether the message port is trusted or not.
34566 <Type type="boolean"/>
34568 <Operation name="addMessagePortListener" id="::MessagePort::LocalMessagePort::addMessagePortListener">
34569 <webidl> long addMessagePortListener(<ref>MessagePortCallback</ref> listener) raises(<ref>WebAPIException</ref>);</webidl>
34572 Adds a message port listener to receive messages from other applications.
34577 <Code> function onreceived(data, remoteMsgPort) {
34578 console.log('Received data to \'' + remoteMsgPort.messagePortName + '\'');
34581 var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
34582 var watchId = localMsgPort.addMessagePortListener(onreceived);
34588 long ID of the listener that is later used to remove the listener.
34593 <Argument name="listener">
34596 The method to invoke when a message is received.
34599 <Type name="MessagePortCallback"/>
34603 <RaiseException name="WebAPIException">
34606 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
34609 with error type InvalidValuesError, if the input parameter contains an invalid value.
34612 with error type UnknownError, if any other error occurs.
34618 <Operation name="removeMessagePortListener" id="::MessagePort::LocalMessagePort::removeMessagePortListener">
34619 <webidl> void removeMessagePortListener(long watchId) raises(<ref>WebAPIException</ref>);</webidl>
34622 Removes the message port listener.
34627 <Code> var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
34628 var watchId = localMsgPort.addMessagePortListener(onreceived);
34629 // Communication routines of your app...
34630 localMsgPort.removeMessagePortListener(watchId);
34633 <Type type="void"/>
34635 <Argument name="watchId">
34638 ID to identify the listener.
34641 <Type type="long"/>
34645 <RaiseException name="WebAPIException">
34648 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
34651 with error type InvalidValuesError, if the input parameter contains an invalid value.
34654 with error type NotFoundError, if the watch ID has not been found.
34657 with error type UnknownError, if any other error occurs.
34664 <Interface name="RemoteMessagePort" id="::MessagePort::RemoteMessagePort">
34665 <webidl> [NoInterfaceObject] interface RemoteMessagePort {
34667 readonly attribute DOMString messagePortName;
34669 readonly attribute <ref>ApplicationId</ref> appId;
34671 readonly attribute boolean isTrusted;
34673 void sendMessage(<ref>MessagePortDataItem</ref>[] data, optional <ref>LocalMessagePort</ref>? localMessagePort) raises(<ref>WebAPIException</ref>);
34677 The <em>RemoteMessagePort</em> interface provides methods to send messages.
34683 <ExtendedAttributeList>
34684 <ExtendedAttribute name="NoInterfaceObject">
34685 <webidl>NoInterfaceObject</webidl>
34686 </ExtendedAttribute>
34687 </ExtendedAttributeList>
34688 <Attribute readonly="readonly" name="messagePortName" id="::MessagePort::RemoteMessagePort::messagePortName">
34689 <webidl> readonly attribute DOMString messagePortName;</webidl>
34692 An attribute to store the message port name.
34698 <Type type="DOMString"/>
34700 <Attribute readonly="readonly" name="appId" id="::MessagePort::RemoteMessagePort::appId">
34701 <webidl> readonly attribute <ref>ApplicationId</ref> appId;</webidl>
34704 An attribute that store the application ID to connect with.
34710 <Type name="ApplicationId"/>
34712 <Attribute readonly="readonly" name="isTrusted" id="::MessagePort::RemoteMessagePort::isTrusted">
34713 <webidl> readonly attribute boolean isTrusted;</webidl>
34716 An attribute that determines whether the message port is trusted or not.
34722 <Type type="boolean"/>
34724 <Operation name="sendMessage" id="::MessagePort::RemoteMessagePort::sendMessage">
34725 <webidl> void sendMessage(<ref>MessagePortDataItem</ref>[] data, optional <ref>LocalMessagePort</ref>? localMessagePort) raises(<ref>WebAPIException</ref>);</webidl>
34728 Sends messages to the specified application.
34732 The sent messages will be ignored without any notice, unless the target application added one or more listeners to the target local message port.
34738 <Code> // Sends message
34739 var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
34740 var remoteMsgPort = tizen.messageport.requestRemoteMessagePort('6xaeuflskd.App1', 'MessagePortB');
34741 localMsgPort.addMessagePortListener(function(items, remoteport) {
34743 if(remoteport !== null) {
34744 remoteport.sendMessage([{key:'RESULT', value:'OK'}]);
34747 remoteMsgPort.sendMessage(
34749 { key:'CMD', value:'openWindow' },
34750 { key:'OPTION', value:'bx' }
34755 <Type type="void"/>
34757 <Argument name="data">
34760 Data array of data to send.
34763 <Type type="array">
34764 <Type name="MessagePortDataItem"/>
34767 <Argument optional="optional" name="localMessagePort">
34770 <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.
34771 </em></em> </p></description>
34773 <Type name="LocalMessagePort" nullable="nullable"/>
34777 <RaiseException name="WebAPIException">
34780 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
34783 with error type InvalidValuesError, if an input parameter contains an invalid value.
34786 with error type QuotaExceededError, if the size of message has exceeded the maximum limit.
34789 with error type UnknownError, if any other error occurs.
34796 <Dictionary name="MessagePortDataItem" id="::MessagePort::MessagePortDataItem">
34797 <webidl> dictionary MessagePortDataItem {
34803 A dictionary for specifying the data item that is transferred.
34809 <DictionaryMember name="key" id="::MessagePort::MessagePortDataItem::key">
34810 <webidl> DOMString key;</webidl>
34811 <Type type="DOMString"/>
34812 </DictionaryMember>
34813 <DictionaryMember name="value" id="::MessagePort::MessagePortDataItem::value">
34814 <webidl> DOMString value;</webidl>
34815 <Type type="DOMString"/>
34816 </DictionaryMember>
34818 <Interface name="MessagePortCallback" id="::MessagePort::MessagePortCallback">
34819 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface MessagePortCallback {
34820 void onreceived(<ref>MessagePortDataItem</ref>[] data, <ref>RemoteMessagePort</ref>? remoteMessagePort);
34824 This interface defines notification callbacks for receiving data from other applications.
34830 <ExtendedAttributeList>
34831 <ExtendedAttribute name="Callback" value="FunctionOnly">
34832 <webidl>Callback</webidl>
34833 </ExtendedAttribute>
34834 <ExtendedAttribute name="NoInterfaceObject">
34835 <webidl> NoInterfaceObject</webidl>
34836 </ExtendedAttribute>
34837 </ExtendedAttributeList>
34838 <Operation name="onreceived" id="::MessagePort::MessagePortCallback::onreceived">
34839 <webidl> void onreceived(<ref>MessagePortDataItem</ref>[] data, <ref>RemoteMessagePort</ref>? remoteMessagePort);</webidl>
34842 Called when data is received from other applications via the specified message port name.
34848 <Type type="void"/>
34850 <Argument name="data">
34853 An array of data received from another application.
34856 <Type type="array">
34857 <Type name="MessagePortDataItem"/>
34860 <Argument name="remoteMessagePort">
34863 The RemoteMessagePort port that can be used to reply for the received message.
34866 <Type name="RemoteMessagePort" nullable="nullable"/>
34872 <Module name="Messaging" id="::Messaging">
34873 <webidl>module Messaging {
34875 [NoInterfaceObject] interface MessageManagerObject {
34876 readonly attribute <ref>Messaging</ref> messaging;
34878 <ref>Tizen</ref> implements <ref>MessageManagerObject</ref>;
34880 enum MessageServiceTag {"messaging.sms", "messaging.mms", "messaging.email" };
34882 typedef DOMString MessageId;
34884 typedef DOMString MessageAttachmentId;
34886 typedef DOMString MessageConvId;
34888 typedef DOMString MessageFolderId;
34890 [Constructor(<ref>MessageServiceTag</ref> type, optional <ref>MessageInit</ref>? messageInitDict)]
34891 interface Message {
34893 readonly attribute <ref>MessageId</ref>? id;
34895 readonly attribute <ref>MessageConvId</ref>? conversationId;
34897 readonly attribute <ref>MessageFolderId</ref>? folderId;
34899 readonly attribute <ref>MessageServiceTag</ref> type;
34901 readonly attribute Date? timestamp;
34903 readonly attribute DOMString? from;
34905 attribute DOMString[] to setraises(<ref>WebAPIException</ref>);
34907 attribute DOMString[] cc setraises(<ref>WebAPIException</ref>);
34909 attribute DOMString[] bcc setraises(<ref>WebAPIException</ref>);
34911 attribute <ref>MessageBody</ref> body setraises(<ref>WebAPIException</ref>);
34913 attribute boolean isRead setraises(<ref>WebAPIException</ref>);
34915 readonly attribute boolean hasAttachment;
34917 attribute boolean isHighPriority setraises(<ref>WebAPIException</ref>);
34919 attribute DOMString subject setraises(<ref>WebAPIException</ref>);
34921 readonly attribute <ref>MessageId</ref>? inResponseTo setraises(<ref>WebAPIException</ref>);
34923 readonly attribute DOMString messageStatus;
34925 attribute <ref>MessageAttachment</ref>[] attachments setraises(<ref>WebAPIException</ref>);
34927 dictionary MessageInit
34938 DOMString plainBody;
34940 DOMString htmlBody;
34942 boolean isHighPriority;
34945 [NoInterfaceObject] interface MessageBody {
34947 readonly attribute <ref>MessageId</ref> messageId;
34949 readonly attribute boolean loaded;
34951 attribute DOMString plainBody setraises(<ref>WebAPIException</ref>);
34953 attribute DOMString htmlBody setraises(<ref>WebAPIException</ref>);
34955 attribute <ref>MessageAttachment</ref>[] inlineAttachments setraises(<ref>WebAPIException</ref>);
34958 [Constructor(DOMString filePath, optional DOMString? mimeType)]
34959 interface MessageAttachment {
34961 readonly attribute <ref>MessageAttachmentId</ref>? id;
34963 readonly attribute <ref>MessageId</ref>? messageId;
34965 readonly attribute DOMString? mimeType;
34967 readonly attribute DOMString? filePath;
34970 [NoInterfaceObject] interface Messaging {
34972 void getMessageServices(<ref>MessageServiceTag</ref> messageServiceType,
34973 <ref>MessageServiceArraySuccessCallback</ref> successCallback,
34974 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
34977 [Callback=FunctionOnly, NoInterfaceObject] interface MessageServiceArraySuccessCallback {
34979 void onsuccess(<ref>MessageService</ref>[] services);
34984 [NoInterfaceObject] interface MessageService {
34986 readonly attribute DOMString id;
34988 readonly attribute <ref>MessageServiceTag</ref> type;
34990 readonly attribute DOMString name;
34992 void sendMessage(<ref>Message</ref> message,
34993 optional <ref>MessageRecipientsCallback</ref>? successCallback,
34994 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
34996 void loadMessageBody(<ref>Message</ref> message,
34997 <ref>MessageBodySuccessCallback</ref> successCallback,
34998 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35000 void loadMessageAttachment(<ref>MessageAttachment</ref> attachment,
35001 <ref>MessageAttachmentSuccessCallback</ref> successCallback,
35002 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35004 long sync(optional <ref>SuccessCallback</ref>? successCallback,
35005 optional <ref>ErrorCallback</ref>? errorCallback,
35006 optional unsigned long? limit) raises(<ref>WebAPIException</ref>);
35008 long syncFolder(<ref>MessageFolder</ref> folder,
35009 optional <ref>SuccessCallback</ref>? successCallback,
35010 optional <ref>ErrorCallback</ref>? errorCallback,
35011 optional unsigned long? limit) raises(<ref>WebAPIException</ref>);
35013 void stopSync(long opId) raises(<ref>WebAPIException</ref>);
35015 readonly attribute <ref>MessageStorage</ref> messageStorage getraises(<ref>WebAPIException</ref>);
35018 [Callback=FunctionOnly, NoInterfaceObject] interface MessageRecipientsCallback {
35020 void onsuccess(DOMString[] recipients);
35024 [Callback=FunctionOnly, NoInterfaceObject] interface MessageBodySuccessCallback {
35026 void onsuccess(<ref>Message</ref> message);
35029 [Callback=FunctionOnly, NoInterfaceObject] interface MessageAttachmentSuccessCallback {
35031 void onsuccess(<ref>MessageAttachment</ref> attachment);
35034 [NoInterfaceObject] interface MessageStorage {
35036 void addDraftMessage(<ref>Message</ref> message,
35037 optional <ref>SuccessCallback</ref>? successCallback,
35038 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35040 void findMessages(<ref>AbstractFilter</ref> filter,
35041 <ref>MessageArraySuccessCallback</ref> successCallback,
35042 optional <ref>ErrorCallback</ref>? errorCallback,
35043 optional <ref>SortMode</ref>? sort,
35044 optional unsigned long? limit,
35045 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);
35047 void removeMessages(<ref>Message</ref>[] messages,
35048 optional <ref>SuccessCallback</ref>? successCallback,
35049 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35051 void updateMessages(<ref>Message</ref>[] messages,
35052 optional <ref>SuccessCallback</ref>? successCallback,
35053 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35055 void findConversations(<ref>AbstractFilter</ref> filter,
35056 <ref>MessageConversationArraySuccessCallback</ref> successCallback,
35057 optional <ref>ErrorCallback</ref>? errorCallback,
35058 optional <ref>SortMode</ref>? sort,
35059 optional unsigned long? limit,
35060 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);
35062 void removeConversations(<ref>MessageConversation</ref>[] conversations,
35063 optional <ref>SuccessCallback</ref>? successCallback,
35064 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35067 void findFolders(<ref>AbstractFilter</ref> filter,
35068 <ref>MessageFolderArraySuccessCallback</ref> successCallback,
35069 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35071 long addMessagesChangeListener(<ref>MessagesChangeCallback</ref> messagesChangeCallback,
35072 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);
35074 long addConversationsChangeListener(<ref>MessageConversationsChangeCallback</ref> conversationsChangeCallback,
35075 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);
35077 long addFoldersChangeListener(<ref>MessageFoldersChangeCallback</ref> foldersChangeCallback,
35078 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);
35080 void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
35083 [Callback=FunctionOnly, NoInterfaceObject] interface MessageArraySuccessCallback {
35085 void onsuccess(<ref>Message</ref>[] messages);
35088 [Callback=FunctionOnly, NoInterfaceObject] interface MessageConversationArraySuccessCallback {
35090 void onsuccess(<ref>MessageConversation</ref>[] conversations);
35093 [Callback=FunctionOnly, NoInterfaceObject] interface MessageFolderArraySuccessCallback {
35095 void onsuccess(<ref>MessageFolder</ref>[] folders);
35098 [Callback, NoInterfaceObject] interface MessagesChangeCallback {
35100 void messagesadded(<ref>Message</ref>[] addedMessages);
35102 void messagesupdated(<ref>Message</ref>[] updatedMessages);
35104 void messagesremoved(<ref>Message</ref>[] removedMessages);
35107 [Callback, NoInterfaceObject] interface MessageConversationsChangeCallback {
35109 void conversationsadded(<ref>MessageConversation</ref>[] addedConversations);
35111 void conversationsupdated(<ref>MessageConversation</ref>[] updatedConversations);
35113 void conversationsremoved(<ref>MessageConversation</ref>[] removedConversations);
35116 [Callback, NoInterfaceObject] interface MessageFoldersChangeCallback {
35118 void foldersadded(<ref>MessageFolder</ref>[] addedFolders);
35120 void foldersupdated(<ref>MessageFolder</ref>[] updatedFolders);
35122 void foldersremoved(<ref>MessageFolder</ref>[] removedFolders);
35125 [NoInterfaceObject] interface MessageConversation {
35127 readonly attribute <ref>MessageConvId</ref> id;
35129 readonly attribute <ref>MessageServiceTag</ref> type;
35131 readonly attribute Date timestamp;
35133 readonly attribute unsigned long messageCount;
35135 readonly attribute unsigned long unreadMessages;
35137 readonly attribute DOMString preview;
35139 readonly attribute DOMString subject;
35141 readonly attribute boolean isRead;
35143 readonly attribute DOMString from;
35145 readonly attribute DOMString[] to;
35147 readonly attribute DOMString[] cc;
35149 readonly attribute DOMString[] bcc;
35151 readonly attribute <ref>MessageId</ref> lastMessageId;
35154 [NoInterfaceObject] interface MessageFolder {
35156 readonly attribute <ref>MessageFolderId</ref> id;
35158 readonly attribute <ref>MessageFolderId</ref> parentId;
35160 readonly attribute DOMString serviceId;
35162 readonly attribute <ref>MessageServiceTag</ref> contentType;
35164 attribute DOMString name setraises(<ref>WebAPIException</ref>);
35166 readonly attribute DOMString path;
35168 readonly attribute DOMString type;
35170 attribute boolean synchronizable setraises(<ref>WebAPIException</ref>);
35176 This API provides interfaces and methods for managing SMS, MMS, and email messages.
35180 The Messaging API provides access to these capabilities:
35184 Sending messages through different technologies: SMS, MMS, and email messages. </li>
35186 Retrieving available message services. </li>
35188 Searching for messages. </li>
35190 Managing messages: update, delete, and add. </li>
35192 Subscribing to receive notifications of message storage modifications. </li>
35194 Fetching conversations and subscribing to conversation updates. </li>
35197 For more information on the Messaging features, see <a href="../../org.tizen.web.appprogramming/html/guide/communication_guide/messaging.htm">Messaging Guide</a>.
35203 <def-api-feature identifier="http://tizen.org/feature/network.telephony">
35207 To guarantee this application running on a device with SMS feature, define below in the config file:
35212 <def-api-feature identifier="http://tizen.org/feature/network.telephony.mms">
35216 To guarantee this application running on a device with MMS feature, define below in the config file:
35222 <Interface name="MessageManagerObject" id="::Messaging::MessageManagerObject">
35223 <webidl> [NoInterfaceObject] interface MessageManagerObject {
35224 readonly attribute <ref>Messaging</ref> messaging;
35228 This interface defines what is instantiated by the Tizen object.
35232 There is a <em>tizen.messaging </em>object that allows access to the Messaging API.
35239 <ExtendedAttributeList>
35240 <ExtendedAttribute name="NoInterfaceObject">
35241 <webidl>NoInterfaceObject</webidl>
35242 </ExtendedAttribute>
35243 </ExtendedAttributeList>
35244 <Attribute readonly="readonly" name="messaging" id="::Messaging::MessageManagerObject::messaging">
35245 <webidl> readonly attribute <ref>Messaging</ref> messaging;</webidl>
35246 <Type name="Messaging"/>
35249 <Implements name1="Tizen" name2="MessageManagerObject">
35250 <webidl> <ref>Tizen</ref> implements <ref>MessageManagerObject</ref>;</webidl>
35252 <Enum name="MessageServiceTag" id="::Messaging::MessageServiceTag">
35253 <webidl> enum MessageServiceTag {"messaging.sms", "messaging.mms", "messaging.email" };</webidl>
35256 The supported Messaging service tags.
35257 The following values are supported in this release:
35262 messaging.sms, for SMS services </li>
35264 messaging.mms, for MMS services </li>
35266 messaging.email, for email services </li>
35273 <EnumValue stringvalue="messaging.sms">
35274 <webidl>"messaging.sms</webidl>
35276 <EnumValue stringvalue="messaging.mms">
35277 <webidl> "messaging.mms</webidl>
35279 <EnumValue stringvalue="messaging.email">
35280 <webidl> "messaging.email</webidl>
35283 <Typedef name="MessageId" id="::Messaging::MessageId">
35284 <webidl> typedef DOMString MessageId;</webidl>
35287 The Message identifier.
35293 <Type type="DOMString"/>
35295 <Typedef name="MessageAttachmentId" id="::Messaging::MessageAttachmentId">
35296 <webidl> typedef DOMString MessageAttachmentId;</webidl>
35299 The MessageAttachment identifier within a message.
35305 <Type type="DOMString"/>
35307 <Typedef name="MessageConvId" id="::Messaging::MessageConvId">
35308 <webidl> typedef DOMString MessageConvId;</webidl>
35311 The MessageConversation identifier.
35317 <Type type="DOMString"/>
35319 <Typedef name="MessageFolderId" id="::Messaging::MessageFolderId">
35320 <webidl> typedef DOMString MessageFolderId;</webidl>
35323 The identifier of an email folder .
35329 <Type type="DOMString"/>
35331 <Interface name="Message" id="::Messaging::Message">
35332 <webidl> [Constructor(<ref>MessageServiceTag</ref> type, optional <ref>MessageInit</ref>? messageInitDict)]
35333 interface Message {
35335 readonly attribute <ref>MessageId</ref>? id;
35337 readonly attribute <ref>MessageConvId</ref>? conversationId;
35339 readonly attribute <ref>MessageFolderId</ref>? folderId;
35341 readonly attribute <ref>MessageServiceTag</ref> type;
35343 readonly attribute Date? timestamp;
35345 readonly attribute DOMString? from;
35347 attribute DOMString[] to setraises(<ref>WebAPIException</ref>);
35349 attribute DOMString[] cc setraises(<ref>WebAPIException</ref>);
35351 attribute DOMString[] bcc setraises(<ref>WebAPIException</ref>);
35353 attribute <ref>MessageBody</ref> body setraises(<ref>WebAPIException</ref>);
35355 attribute boolean isRead setraises(<ref>WebAPIException</ref>);
35357 readonly attribute boolean hasAttachment;
35359 attribute boolean isHighPriority setraises(<ref>WebAPIException</ref>);
35361 attribute DOMString subject setraises(<ref>WebAPIException</ref>);
35363 readonly attribute <ref>MessageId</ref>? inResponseTo setraises(<ref>WebAPIException</ref>);
35365 readonly attribute DOMString messageStatus;
35367 attribute <ref>MessageAttachment</ref>[] attachments setraises(<ref>WebAPIException</ref>);
35371 Defines the content and attributes of a message.
35375 This interface allows a web application to define the set of properties
35376 linked to a message.
35379 It also allows an application to retrieve the content of a
35380 message through <em>MessageStorage </em>methods. In these
35381 cases, the implementation can return, in some situations, only the meta-information
35382 of a message without the loaded body. In such situations, the method <em>MessageService.loadMessageBody() </em>should be used.
35388 <Code> // Define the success callback.
35389 var messageSentCallback = function(recipients) {
35390 console.log("Message sent successfully to " + recipients.length + " recipients.");
35393 // Define the error callback.
35394 function errorCallback(err) {
35395 console.log(err.name + " error: " + err.message);
35398 function serviceListCB(services) {
35399 if (services.length > 0) {
35400 var msg = new tizen.Message("messaging.sms", {plainBody: "Tizen first SMS message."});
35401 services[0].sendMessage(msg, messageSentCallback, errorCallback);
35405 tizen.messaging.getMessageServices("messaging.sms",
35410 <ExtendedAttributeList>
35411 <ExtendedAttribute name="Constructor">
35412 <webidl>Constructor(<ref>MessageServiceTag</ref> type, optional <ref>MessageInit</ref>? messageInitDict)</webidl>
35414 <Argument name="type">
35415 <Type name="MessageServiceTag"/>
35417 <Argument optional="optional" name="messageInitDict">
35418 <Type name="MessageInit" nullable="nullable"/>
35421 </ExtendedAttribute>
35422 </ExtendedAttributeList>
35423 <Attribute readonly="readonly" name="id" id="::Messaging::Message::id">
35424 <webidl> readonly attribute <ref>MessageId</ref>? id;</webidl>
35427 The message identifier.
35431 The ID is locally unique and persistent property, assigned by the device or the Web runtime (WRT).
35432 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>.
35435 By default, this attribute is set to <var>null</var>.
35442 <Type name="MessageId" nullable="nullable"/>
35444 <Attribute readonly="readonly" name="conversationId" id="::Messaging::Message::conversationId">
35445 <webidl> readonly attribute <ref>MessageConvId</ref>? conversationId;</webidl>
35448 The identifier of the conversation to which the message belongs.
35452 By default, this attribute is set to <var>null</var>.
35459 <Type name="MessageConvId" nullable="nullable"/>
35461 <Attribute readonly="readonly" name="folderId" id="::Messaging::Message::folderId">
35462 <webidl> readonly attribute <ref>MessageFolderId</ref>? folderId;</webidl>
35465 The identifier of the folder to which the message belongs.
35469 By default, this attribute is set to null.
35472 For SMS and MMS, <em>folderId </em>can be one of these values:
35489 <Type name="MessageFolderId" nullable="nullable"/>
35491 <Attribute readonly="readonly" name="type" id="::Messaging::Message::type">
35492 <webidl> readonly attribute <ref>MessageServiceTag</ref> type;</webidl>
35495 The type of a given message.
35501 <Type name="MessageServiceTag"/>
35503 <Attribute readonly="readonly" name="timestamp" id="::Messaging::Message::timestamp">
35504 <webidl> readonly attribute Date? timestamp;</webidl>
35507 The timestamp of a message.
35511 For a received message, the timestamps indicates the time at which a message is received.
35512 For a sent message, the timestamp indicates the time at which a message is sent.
35513 For a draft message, the timestamp indicates the time at which a message is added.
35514 By default, this attribute is set to <var>null</var>.
35521 <Type type="Date" nullable="nullable"/>
35523 <Attribute readonly="readonly" name="from" id="::Messaging::Message::from">
35524 <webidl> readonly attribute DOMString? from;</webidl>
35527 The source address (or source phone number) of a message.
35531 This property is set up by the device or the web runtime environment.
35532 By default, this attribute is set to null.
35539 <Type type="DOMString" nullable="nullable"/>
35541 <Attribute name="to" id="::Messaging::Message::to">
35542 <webidl> attribute DOMString[] to setraises(<ref>WebAPIException</ref>);</webidl>
35545 The destination of a message.
35551 <Type type="array">
35552 <Type type="DOMString"/>
35555 <RaiseException name="WebAPIException"/>
35558 <Attribute name="cc" id="::Messaging::Message::cc">
35559 <webidl> attribute DOMString[] cc setraises(<ref>WebAPIException</ref>);</webidl>
35562 The carbon copy address of a message.
35566 This property is used only for email messages.
35573 <Type type="array">
35574 <Type type="DOMString"/>
35577 <RaiseException name="WebAPIException"/>
35580 <Attribute name="bcc" id="::Messaging::Message::bcc">
35581 <webidl> attribute DOMString[] bcc setraises(<ref>WebAPIException</ref>);</webidl>
35584 The blind carbon copy (bcc) address of a message.
35588 This property is used only with email messages.
35595 <Type type="array">
35596 <Type type="DOMString"/>
35599 <RaiseException name="WebAPIException"/>
35602 <Attribute name="body" id="::Messaging::Message::body">
35603 <webidl> attribute <ref>MessageBody</ref> body setraises(<ref>WebAPIException</ref>);</webidl>
35606 An attribute to store the body of a message.
35612 <Type name="MessageBody"/>
35614 <RaiseException name="WebAPIException"/>
35617 <Attribute name="isRead" id="::Messaging::Message::isRead">
35618 <webidl> attribute boolean isRead setraises(<ref>WebAPIException</ref>);</webidl>
35621 An attribute to indicate the read state for a message.
35625 This property is set to <var>true</var> if the message has been read. Else it is set to <var>false</var>.
35632 <Type type="boolean"/>
35634 <RaiseException name="WebAPIException"/>
35637 <Attribute readonly="readonly" name="hasAttachment" id="::Messaging::Message::hasAttachment">
35638 <webidl> readonly attribute boolean hasAttachment;</webidl>
35641 An attribute to indicate whether an attachment(s) exists or not.
35645 It is set to <var>true</var> if a message has one or more attachments.
35648 This property is used only with email and MMS messages.(It is valid when body is loaded)
35655 <Type type="boolean"/>
35657 <Attribute name="isHighPriority" id="::Messaging::Message::isHighPriority">
35658 <webidl> attribute boolean isHighPriority setraises(<ref>WebAPIException</ref>);</webidl>
35661 An attribute to indicate the priority of a message.
35665 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.
35668 This property is used only with email messages.
35675 <Type type="boolean"/>
35677 <RaiseException name="WebAPIException"/>
35680 <Attribute name="subject" id="::Messaging::Message::subject">
35681 <webidl> attribute DOMString subject setraises(<ref>WebAPIException</ref>);</webidl>
35684 An attribute to store the subject of a message.
35688 This property is used only with email and MMS messages.
35695 <Type type="DOMString"/>
35697 <RaiseException name="WebAPIException"/>
35700 <Attribute readonly="readonly" name="inResponseTo" id="::Messaging::Message::inResponseTo">
35701 <webidl> readonly attribute <ref>MessageId</ref>? inResponseTo setraises(<ref>WebAPIException</ref>);</webidl>
35704 The identifier of the original message.
35708 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>.
35715 <Type name="MessageId" nullable="nullable"/>
35717 <RaiseException name="WebAPIException"/>
35720 <Attribute readonly="readonly" name="messageStatus" id="::Messaging::Message::messageStatus">
35721 <webidl> readonly attribute DOMString messageStatus;</webidl>
35724 The status of a given message.
35728 It can be one of these values:
35741 If the status of the current message does not correspond to any item from
35742 the list, an empty value is returned.
35749 <Type type="DOMString"/>
35751 <Attribute name="attachments" id="::Messaging::Message::attachments">
35752 <webidl> attribute <ref>MessageAttachment</ref>[] attachments setraises(<ref>WebAPIException</ref>);</webidl>
35755 The list of the message attachments.
35759 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).
35765 <Code> // Define the success callback.
35766 function serviceListCB(services) {
35767 if (services.length > 0) {
35768 var msg = new tizen.Message("messaging.email");
35769 msg.attachments = [new tizen.MessageAttachment("images/myimage.png", "image/png"),
35770 new tizen.MessageAttachment("documents/mydoc.pdf", "text/pdf")];
35774 tizen.messaging.getMessageServices("messaging.email", serviceListCB);
35779 <Type type="array">
35780 <Type name="MessageAttachment"/>
35783 <RaiseException name="WebAPIException"/>
35787 <Dictionary name="MessageInit" id="::Messaging::MessageInit">
35788 <webidl> dictionary MessageInit
35799 DOMString plainBody;
35801 DOMString htmlBody;
35803 boolean isHighPriority;
35807 Provides specific message attributes upon message creation.
35811 This interface is used to input parameters when messages are created using
35812 the Message constructor.
35815 All the attributes are optional and are <var>undefined </var>by default, unless otherwise stated in the parameter description.
35822 <DictionaryMember name="subject" id="::Messaging::MessageInit::subject">
35823 <webidl> DOMString subject;</webidl>
35826 The subject of a message.
35830 This property is used only with email and MMS messages.
35837 <Type type="DOMString"/>
35838 </DictionaryMember>
35839 <DictionaryMember name="to" id="::Messaging::MessageInit::to">
35840 <webidl> DOMString[] to;</webidl>
35843 The destination addresses (or phone numbers) of a message.
35849 <Type type="array">
35850 <Type type="DOMString"/>
35852 </DictionaryMember>
35853 <DictionaryMember name="cc" id="::Messaging::MessageInit::cc">
35854 <webidl> DOMString[] cc;</webidl>
35857 The carbon copy addresses of a message.
35861 This property is used only with email messages.
35868 <Type type="array">
35869 <Type type="DOMString"/>
35871 </DictionaryMember>
35872 <DictionaryMember name="bcc" id="::Messaging::MessageInit::bcc">
35873 <webidl> DOMString[] bcc;</webidl>
35876 The blind carbon copy addresses of a message.
35880 This property is used only with email messages.
35887 <Type type="array">
35888 <Type type="DOMString"/>
35890 </DictionaryMember>
35891 <DictionaryMember name="plainBody" id="::Messaging::MessageInit::plainBody">
35892 <webidl> DOMString plainBody;</webidl>
35895 The plain text representation of a message body.
35901 <Type type="DOMString"/>
35902 </DictionaryMember>
35903 <DictionaryMember name="htmlBody" id="::Messaging::MessageInit::htmlBody">
35904 <webidl> DOMString htmlBody;</webidl>
35907 The HTML representation of a message body.
35911 This property is used only with email messages.
35918 <Type type="DOMString"/>
35919 </DictionaryMember>
35920 <DictionaryMember name="isHighPriority" id="::Messaging::MessageInit::isHighPriority">
35921 <webidl> boolean isHighPriority;</webidl>
35924 The priority of a message.
35928 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.
35931 This property is used only with email messages.
35938 <Type type="boolean"/>
35939 </DictionaryMember>
35941 <Interface name="MessageBody" id="::Messaging::MessageBody">
35942 <webidl> [NoInterfaceObject] interface MessageBody {
35944 readonly attribute <ref>MessageId</ref> messageId;
35946 readonly attribute boolean loaded;
35948 attribute DOMString plainBody setraises(<ref>WebAPIException</ref>);
35950 attribute DOMString htmlBody setraises(<ref>WebAPIException</ref>);
35952 attribute <ref>MessageAttachment</ref>[] inlineAttachments setraises(<ref>WebAPIException</ref>);
35956 This interface describes a message body.
35960 Message body is comprised of a plain text, an HTML, and inline attachments.
35967 <ExtendedAttributeList>
35968 <ExtendedAttribute name="NoInterfaceObject">
35969 <webidl>NoInterfaceObject</webidl>
35970 </ExtendedAttribute>
35971 </ExtendedAttributeList>
35972 <Attribute readonly="readonly" name="messageId" id="::Messaging::MessageBody::messageId">
35973 <webidl> readonly attribute <ref>MessageId</ref> messageId;</webidl>
35976 The ID of a parent message.
35980 It holds the ID of the message containing this body.
35987 <Type name="MessageId"/>
35989 <Attribute readonly="readonly" name="loaded" id="::Messaging::MessageBody::loaded">
35990 <webidl> readonly attribute boolean loaded;</webidl>
35993 An attribute to indicate whether the message body has been loaded or not.
35997 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.
35998 The default value is <var>false</var>.
36005 <Type type="boolean"/>
36007 <Attribute name="plainBody" id="::Messaging::MessageBody::plainBody">
36008 <webidl> attribute DOMString plainBody setraises(<ref>WebAPIException</ref>);</webidl>
36011 The plain text representation of a message body.
36017 <Type type="DOMString"/>
36019 <RaiseException name="WebAPIException"/>
36022 <Attribute name="htmlBody" id="::Messaging::MessageBody::htmlBody">
36023 <webidl> attribute DOMString htmlBody setraises(<ref>WebAPIException</ref>);</webidl>
36026 The HTML representation of a message body.
36030 This attribute holds an empty string if the message does not have any HTML body content.
36031 This property is used only with email messages.
36038 <Type type="DOMString"/>
36040 <RaiseException name="WebAPIException"/>
36043 <Attribute name="inlineAttachments" id="::Messaging::MessageBody::inlineAttachments">
36044 <webidl> attribute <ref>MessageAttachment</ref>[] inlineAttachments setraises(<ref>WebAPIException</ref>);</webidl>
36047 The list of the inline attachments.
36051 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).
36054 To indicate where to show an inline attachment within the HTML body, a link of the following format should be provided:
36055 "<img src="The file name of a inline attachment">"
36056 This property is used only with email messages.
36062 <Code> // Define the success callback.
36063 function serviceListCB(services) {
36064 if (services.length > 0) {
36065 var msg = new tizen.Message("messaging.email");
36066 msg.body.htmlBody = "<html><body><img src='myimage.png'></body></html>";
36067 msg.body.inlineAttachments = [new tizen.MessageAttachment("images/myimage.png")];
36071 tizen.messaging.getMessageServices("messaging.email", serviceListCB);
36075 <Type type="array">
36076 <Type name="MessageAttachment"/>
36079 <RaiseException name="WebAPIException"/>
36083 <Interface name="MessageAttachment" id="::Messaging::MessageAttachment">
36084 <webidl> [Constructor(DOMString filePath, optional DOMString? mimeType)]
36085 interface MessageAttachment {
36087 readonly attribute <ref>MessageAttachmentId</ref>? id;
36089 readonly attribute <ref>MessageId</ref>? messageId;
36091 readonly attribute DOMString? mimeType;
36093 readonly attribute DOMString? filePath;
36097 This interface defines the content and attributes of a message attachment.
36103 <ExtendedAttributeList>
36104 <ExtendedAttribute name="Constructor">
36105 <webidl>Constructor(DOMString filePath, optional DOMString? mimeType)</webidl>
36107 <Argument name="filePath">
36108 <Type type="DOMString"/>
36110 <Argument optional="optional" name="mimeType">
36111 <Type type="DOMString" nullable="nullable"/>
36114 </ExtendedAttribute>
36115 </ExtendedAttributeList>
36116 <Attribute readonly="readonly" name="id" id="::Messaging::MessageAttachment::id">
36117 <webidl> readonly attribute <ref>MessageAttachmentId</ref>? id;</webidl>
36120 The ID of an attachment.
36124 It holds the identifier of the attachment within its parent message.
36127 By default, this attribute is set to <var>null</var>.
36134 <Type name="MessageAttachmentId" nullable="nullable"/>
36136 <Attribute readonly="readonly" name="messageId" id="::Messaging::MessageAttachment::messageId">
36137 <webidl> readonly attribute <ref>MessageId</ref>? messageId;</webidl>
36140 The ID of a parent message.
36144 By default, this attribute is set to <var>null</var>.
36151 <Type name="MessageId" nullable="nullable"/>
36153 <Attribute readonly="readonly" name="mimeType" id="::Messaging::MessageAttachment::mimeType">
36154 <webidl> readonly attribute DOMString? mimeType;</webidl>
36157 The attachment MIME type.
36161 It describes the MIME type of an attachment, for example; "text/html".
36164 By default, this attribute is set to <var>null</var>.
36171 <Type type="DOMString" nullable="nullable"/>
36173 <Attribute readonly="readonly" name="filePath" id="::Messaging::MessageAttachment::filePath">
36174 <webidl> readonly attribute DOMString? filePath;</webidl>
36177 The location path to a loaded attachment file.
36181 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.
36188 <Type type="DOMString" nullable="nullable"/>
36191 <Interface name="Messaging" id="::Messaging::Messaging">
36192 <webidl> [NoInterfaceObject] interface Messaging {
36194 void getMessageServices(<ref>MessageServiceTag</ref> messageServiceType,
36195 <ref>MessageServiceArraySuccessCallback</ref> successCallback,
36196 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
36200 This interface retrieves messaging services.
36204 Fetches all existing messaging services by type or a messaging service of a given type
36205 for concrete account.
36211 <Code> // Define the success callback.
36212 function serviceListCB(services) {
36213 if (services.length > 0) {
36214 var msg = new tizen.Message("messaging.sms");
36218 // Define error callback.
36219 function errorCallback(error) {
36220 console.log("Cannot get messaging service " + error.message);
36223 tizen.messaging.getMessageServices("messaging.sms", serviceListCB,
36227 <ExtendedAttributeList>
36228 <ExtendedAttribute name="NoInterfaceObject">
36229 <webidl>NoInterfaceObject</webidl>
36230 </ExtendedAttribute>
36231 </ExtendedAttributeList>
36232 <Operation name="getMessageServices" id="::Messaging::Messaging::getMessageServices">
36233 <webidl> void getMessageServices(<ref>MessageServiceTag</ref> messageServiceType,
36234 <ref>MessageServiceArraySuccessCallback</ref> successCallback,
36235 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
36238 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.
36242 The errorCallback is launched with these error types:
36246 InvalidValuesError - If any of the input parameters contain an invalid value, the encoding is not valid or onsuccess is null.
36247 Please note that to allow developers to ignore errors, errorCallback accepts null as a valid value. </li>
36249 UnknownError - In any other error case. </li>
36255 <Code> // Define the error callback.
36256 function errorCallback(error) {
36257 console.log("Cannot get messaging service " + error.message);
36260 // Define the success callback.
36261 function serviceListCB(services) {
36262 console.log("Found " + services.length + "email services");
36265 tizen.messaging.getMessageServices("messaging.email", serviceListCB,
36269 <Type type="void"/>
36271 <Argument name="messageServiceType">
36274 Type of the services to be retrieved.
36277 <Type name="MessageServiceTag"/>
36279 <Argument name="successCallback">
36282 The method invoked when the services are successfully retrieved.
36285 <Type name="MessageServiceArraySuccessCallback"/>
36287 <Argument optional="optional" name="errorCallback">
36290 The method invoked when an error occurs.
36293 <Type name="ErrorCallback" nullable="nullable"/>
36297 <RaiseException name="WebAPIException">
36300 with error type TypeMismatchError, if any input parameter
36301 is not compatible with the expected type for that parameter.
36304 with error type NotSupportedError, if this feature is not supported.
36311 <Interface name="MessageServiceArraySuccessCallback" id="::Messaging::MessageServiceArraySuccessCallback">
36312 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface MessageServiceArraySuccessCallback {
36314 void onsuccess(<ref>MessageService</ref>[] services);
36319 Defines callback(s) for retrieving message services.
36325 <ExtendedAttributeList>
36326 <ExtendedAttribute name="Callback" value="FunctionOnly">
36327 <webidl>Callback</webidl>
36328 </ExtendedAttribute>
36329 <ExtendedAttribute name="NoInterfaceObject">
36330 <webidl> NoInterfaceObject</webidl>
36331 </ExtendedAttribute>
36332 </ExtendedAttributeList>
36333 <Operation name="onsuccess" id="::Messaging::MessageServiceArraySuccessCallback::onsuccess">
36334 <webidl> void onsuccess(<ref>MessageService</ref>[] services);</webidl>
36337 Called when finding message services is successful.
36343 <Type type="void"/>
36345 <Argument name="services">
36348 Array of available <em>MessageService</em> objects on the device.
36351 <Type type="array">
36352 <Type name="MessageService"/>
36358 <Interface name="MessageService" id="::Messaging::MessageService">
36359 <webidl> [NoInterfaceObject] interface MessageService {
36361 readonly attribute DOMString id;
36363 readonly attribute <ref>MessageServiceTag</ref> type;
36365 readonly attribute DOMString name;
36367 void sendMessage(<ref>Message</ref> message,
36368 optional <ref>MessageRecipientsCallback</ref>? successCallback,
36369 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
36371 void loadMessageBody(<ref>Message</ref> message,
36372 <ref>MessageBodySuccessCallback</ref> successCallback,
36373 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
36375 void loadMessageAttachment(<ref>MessageAttachment</ref> attachment,
36376 <ref>MessageAttachmentSuccessCallback</ref> successCallback,
36377 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
36379 long sync(optional <ref>SuccessCallback</ref>? successCallback,
36380 optional <ref>ErrorCallback</ref>? errorCallback,
36381 optional unsigned long? limit) raises(<ref>WebAPIException</ref>);
36383 long syncFolder(<ref>MessageFolder</ref> folder,
36384 optional <ref>SuccessCallback</ref>? successCallback,
36385 optional <ref>ErrorCallback</ref>? errorCallback,
36386 optional unsigned long? limit) raises(<ref>WebAPIException</ref>);
36388 void stopSync(long opId) raises(<ref>WebAPIException</ref>);
36390 readonly attribute <ref>MessageStorage</ref> messageStorage getraises(<ref>WebAPIException</ref>);
36394 This interface allows a web application to manipulate and send messages and supports the message creating, sending, and fetching capabilities.
36398 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.
36401 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.
36404 The interface allows fetching of the message body for a given message using loadMessageBody() method.
36410 <Code> // Define the success callback.
36411 function messageSent(recipients) {
36412 console.log("The SMS has been sent");
36415 // Define the error callback.
36416 function messageFailed(error) {
36417 console.log("The SMS could not be sent " + error.message);
36420 // Define service error callback.
36421 function serviceErrorCB(error) {
36422 console.log("Cannot get messaging service " + error.message);
36425 // Define the success callback.
36426 function serviceListCB(services) {
36427 if (services.length > 0) {
36428 // SMS sending example
36429 var msg = new tizen.Message("messaging.sms", {plainBody:"I will arrive in 10 minutes.",
36430 to:["+34666666666"]});
36432 services[0].sendMessage(msg, messageSent, messageFailed);
36436 tizen.messaging.getMessageServices("messaging.sms",
36441 <ExtendedAttributeList>
36442 <ExtendedAttribute name="NoInterfaceObject">
36443 <webidl>NoInterfaceObject</webidl>
36444 </ExtendedAttribute>
36445 </ExtendedAttributeList>
36446 <Attribute readonly="readonly" name="id" id="::Messaging::MessageService::id">
36447 <webidl> readonly attribute DOMString id;</webidl>
36450 The unique identifier of this Messaging service.
36456 <Type type="DOMString"/>
36458 <Attribute readonly="readonly" name="type" id="::Messaging::MessageService::type">
36459 <webidl> readonly attribute <ref>MessageServiceTag</ref> type;</webidl>
36462 The tag supported by this messaging service.
36468 <Type name="MessageServiceTag"/>
36470 <Attribute readonly="readonly" name="name" id="::Messaging::MessageService::name">
36471 <webidl> readonly attribute DOMString name;</webidl>
36474 The messaging service name taken from the messaging service
36480 <Type type="DOMString"/>
36482 <Operation name="sendMessage" id="::Messaging::MessageService::sendMessage">
36483 <webidl> void sendMessage(<ref>Message</ref> message,
36484 optional <ref>MessageRecipientsCallback</ref>? successCallback,
36485 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
36488 Sends a specified message.
36492 For messaging technologies in which the message is sent individually to every recipient(such as SMS), individual notification must be supported as follows:
36495 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.
36496 These error types may be passed, depending on the error conditions:
36500 NetworkError - If the network connection is not accessible. </li>
36502 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
36504 UnknownError - If any other error occurs. </li>
36507 The error message contains the name of the recipient who has failed to receive the sent message.
36510 When the operation is fully completed (that is, the implementation has the
36511 result of the send operation for all recipients), the onsuccess()
36512 method of the successCallback will be invoked with an array of recipients who received
36513 the sent message, as input parameter.
36523 http://tizen.org/privilege/messaging.write
36525 <Code> // Define the success callback
36526 function messageSent(recipients) {
36527 for (var i = 0; i < recipients.length; i++) {
36528 console.log("The SMS has been sent to " + recipients[i]);
36532 // Define the error callback.
36533 function messageFailed(error) {
36534 console.log("The SMS could not be sent " + error.message);
36537 // Define the success callback.
36538 function serviceListCB(services) {
36539 if (services.length > 0) {
36540 // SMS sending example
36541 var msg = new tizen.Message("messaging.sms", {plainBody: "I will arrive in 10 minutes.",
36542 to: ["+34666666666", "+34888888888"]});
36544 services[0].sendMessage(msg, messageSent, messageFailed);
36547 tizen.messaging.getMessageServices("messaging.sms", serviceListCB);
36550 <Type type="void"/>
36552 <Argument name="message">
36555 The message to be sent.
36558 <Type name="Message"/>
36560 <Argument optional="optional" name="successCallback">
36563 The method to be invoked when the message is successfully sent.
36566 <Type name="MessageRecipientsCallback" nullable="nullable"/>
36568 <Argument optional="optional" name="errorCallback">
36571 The method to be invoked when the sending request has failed.
36574 <Type name="ErrorCallback" nullable="nullable"/>
36578 <RaiseException name="WebAPIException">
36581 with error type TypeMismatchError, if any input parameter
36582 is not compatible with the expected type for that parameter.
36585 with error type SecurityError, if the application does not have the privilege to call this method.
36588 with error type NotSupportedError, if this feature is not supported.
36594 <Operation name="loadMessageBody" id="::Messaging::MessageService::loadMessageBody">
36595 <webidl> void loadMessageBody(<ref>Message</ref> message,
36596 <ref>MessageBodySuccessCallback</ref> successCallback,
36597 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
36600 Loads the body for a specified message.
36604 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.
36605 If the message body is already loaded, the onsuccess() method of the successCallback will be invoked immediately.
36608 The errorCallback is launched with these error types:
36612 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
36614 UnknownError - If any other error occurs. </li>
36624 http://tizen.org/privilege/messaging.write
36626 <Code> // Assume messaging service is initialized.
36628 // Define the success body loaded callback.
36629 function successCallback(message) {
36630 console.log ("body for message: " + message.subject + "from: " + message.from + "loaded.");
36632 // Define error callback.
36633 function errorCallback(error) {
36634 console.log("Cannot load message body" + error.message);
36637 function messageQueryCallback(messages) {
36638 for (var i = 0; i < messages.length; i++) {
36639 var message = messages[i];
36640 if (!message.body.loaded) {
36641 service.loadMessageBody(message, successCallback, errorCallback);
36646 service.messageStorage.findMessages(new tizen.AttributeFilter("type", "EXACTLY", "messaging.email"), messageQueryCallback);
36649 <Type type="void"/>
36651 <Argument name="message">
36654 Message with the body to be loaded.
36657 <Type name="Message"/>
36659 <Argument name="successCallback">
36662 The method to be invoked when the message body is successfully loaded.
36665 <Type name="MessageBodySuccessCallback"/>
36667 <Argument optional="optional" name="errorCallback">
36670 The method to be invoked when the loading request fails.
36673 <Type name="ErrorCallback" nullable="nullable"/>
36677 <RaiseException name="WebAPIException">
36680 with error type TypeMismatchError, if any input parameter
36681 is not compatible with the expected type for that parameter.
36684 with error type SecurityError, if the application does not have the privilege to call this method.
36687 with error type NotSupportedError, if this feature is not supported.
36693 <Operation name="loadMessageAttachment" id="::Messaging::MessageService::loadMessageAttachment">
36694 <webidl> void loadMessageAttachment(<ref>MessageAttachment</ref> attachment,
36695 <ref>MessageAttachmentSuccessCallback</ref> successCallback,
36696 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
36699 Loads a specified message attachment.
36703 This method is used only for email services. If the message attachment is already loaded, the onsuccess() method of the successCallback is invoked immediately.
36706 The errorCallback is launched with these error types:
36710 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
36712 UnknownError - If any other error occurs. </li>
36722 http://tizen.org/privilege/messaging.write
36724 <Code> // Assume messaging service is initialized.
36726 // Define success body loaded callback
36727 function successCallback(attachment) {
36728 console.log("attachment" + attachment.id + "is loaded to:" + attachment.filePath);
36730 // Define error callback
36731 function errorCallback(error) {
36732 console.log("Cannot load message attachment" + error.message);
36735 function messagesFoundCB(messages) {
36736 for (var i = 0; i < messages.length; i++) {
36737 var message = messages[i];
36738 if (!message.attachments[0].loaded) {
36739 service.loadMessageAttachment(message.attachments[0], successCallback, errorCallback);
36744 service.messageStorage.findMessages(new tizen.AttributeFilter("hasAttachment", "EXACTLY", true), messagesFoundCB);
36747 <Type type="void"/>
36749 <Argument name="attachment">
36752 Message attachment to be loaded.
36755 <Type name="MessageAttachment"/>
36757 <Argument name="successCallback">
36760 The method to be invoked when the message attachment is successfully loaded.
36763 <Type name="MessageAttachmentSuccessCallback"/>
36765 <Argument optional="optional" name="errorCallback">
36768 The method to be invoked when the loading request fails.
36771 <Type name="ErrorCallback" nullable="nullable"/>
36775 <RaiseException name="WebAPIException">
36778 with error type TypeMismatchError, if any input parameter
36779 is not compatible with the expected type for that parameter.
36782 with error type SecurityError, if the application does not have the privilege to call this method.
36785 with error type NotSupportedError, if this feature is not supported.
36791 <Operation name="sync" id="::Messaging::MessageService::sync">
36792 <webidl> long sync(optional <ref>SuccessCallback</ref>? successCallback,
36793 optional <ref>ErrorCallback</ref>? errorCallback,
36794 optional unsigned long? limit) raises(<ref>WebAPIException</ref>);</webidl>
36797 Synchronizes the service content with an external mail server.
36801 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.
36804 The errorCallback is launched with these error types:
36808 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
36810 AbortError - If the operation has been stopped. </li>
36812 UnknownError - If any other error occurs. </li>
36822 http://tizen.org/privilege/messaging.write
36824 <Code> // Define the success callback.
36825 function serviceSynced() {
36826 console.log("New messages are fetched!");
36829 // Define the success callback.
36830 function servicesListSuccessCB(services) {
36831 services[0].sync(serviceSynced, null, 30);
36832 // Subscribe to MessageStorage notification
36834 tizen.messaging.getMessageServices("messaging.email", servicesListSuccessCB);
36840 long The identifier which can be used to stop this service operation.
36845 <Argument optional="optional" name="successCallback">
36848 The method to be invoked when all the actions are completed successfully.
36851 <Type name="SuccessCallback" nullable="nullable"/>
36853 <Argument optional="optional" name="errorCallback">
36856 The method to be invoked when the request fails.
36859 <Type name="ErrorCallback" nullable="nullable"/>
36861 <Argument optional="optional" name="limit">
36864 The maximum amount of messages retrieved within each folder.
36867 <Type type="unsigned long" nullable="nullable"/>
36871 <RaiseException name="WebAPIException">
36874 with error type TypeMismatchError, if any input parameter
36875 is not compatible with the expected type for that parameter.
36878 with error type SecurityError, if the application does not have the privilege to call this method.
36881 with error type NotSupportedError, if this feature is not supported.
36887 <Operation name="syncFolder" id="::Messaging::MessageService::syncFolder">
36888 <webidl> long syncFolder(<ref>MessageFolder</ref> folder,
36889 optional <ref>SuccessCallback</ref>? successCallback,
36890 optional <ref>ErrorCallback</ref>? errorCallback,
36891 optional unsigned long? limit) raises(<ref>WebAPIException</ref>);</webidl>
36894 Synchronizes the folder content with an external mail server.
36898 This method is used only for email services. This method performs the following actions:
36902 Exports local changes within a given folder from device to server. </li>
36904 Retrieves the list of available messages from within the given folder. </li>
36907 Messages that are retrieved from a given folder, even if synchronizable flag for this folder is not set.
36908 The backend is responsible in deciding which data is retrieved for every message. It can be:
36912 Message header details </li>
36914 Whole message body </li>
36917 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.
36920 The errorCallback is launched with these error types:
36924 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
36926 AbortError - If the operation is stopped. </li>
36928 UnknownError - If any other error occurs. </li>
36938 http://tizen.org/privilege/messaging.write
36940 <Code> var emailService; // Assume email service is initialized
36941 // Define the error callback.
36942 function errorCallback(err) {
36943 console.log(err.name + " error: " + err.message);
36945 function serviceCallback(services) {
36946 emailService = services[0];
36947 var filter = new tizen.AttributeFilter("serviceId", "EXACTLY", emailService.id);
36949 emailService.messageStorage.findFolders(filter, folderQueryCallback);
36952 // Define the success callback.
36953 function folderSynced() {
36954 console.log("New messages are fetched!");
36956 function folderQueryCallback(folders) {
36957 console.log(folders.length + " folders(s) found!");
36958 for (var i = 0; i < folders.length; i++) {
36959 emailService.syncFolder (folders[i], folderSynced, null, 30);
36963 tizen.messaging.getMessageServices("messaging.email", serviceCallback, errorCallback);
36969 long The identifier which can be used to stop this service operation.
36974 <Argument name="folder">
36977 The folder to be synchronized.
36980 <Type name="MessageFolder"/>
36982 <Argument optional="optional" name="successCallback">
36985 The method to be invoked when all actions are completed successfully.
36988 <Type name="SuccessCallback" nullable="nullable"/>
36990 <Argument optional="optional" name="errorCallback">
36993 The method to be invoked when the request fails.
36996 <Type name="ErrorCallback" nullable="nullable"/>
36998 <Argument optional="optional" name="limit">
37001 The maximum amount of messages retrieved within a given folder.
37004 <Type type="unsigned long" nullable="nullable"/>
37008 <RaiseException name="WebAPIException">
37011 with error type TypeMismatchError, if any input parameter
37012 is not compatible with the expected type for that parameter.
37015 with error type SecurityError, if the application does not have the privilege to call this method.
37018 with error type NotSupportedError, if this feature is not supported.
37024 <Operation name="stopSync" id="::Messaging::MessageService::stopSync">
37025 <webidl> void stopSync(long opId) raises(<ref>WebAPIException</ref>);</webidl>
37028 Stops sync() and syncFoler() operation.
37032 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.
37035 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.
37042 <Type type="void"/>
37044 <Argument name="opId">
37047 A service operation identifier.
37050 <Type type="long"/>
37054 <RaiseException name="WebAPIException">
37057 with error type TypeMismatchError, if any input parameter
37058 is not compatible with the expected type for that parameter.
37061 with error type InvalidValuesError, if any of the input parameters contains an invalid value.
37067 <Attribute readonly="readonly" name="messageStorage" id="::Messaging::MessageService::messageStorage">
37068 <webidl> readonly attribute <ref>MessageStorage</ref> messageStorage getraises(<ref>WebAPIException</ref>);</webidl>
37071 An attribute to access <em>MessageStorage </em>for this messaging service.
37075 If the backend does not support <em>MessageStorage </em>for this messaging service, a WebAPIException is raised with error type NotSupportedError.
37082 <Type name="MessageStorage"/>
37084 <RaiseException name="WebAPIException"/>
37088 <Interface name="MessageRecipientsCallback" id="::Messaging::MessageRecipientsCallback">
37089 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface MessageRecipientsCallback {
37091 void onsuccess(DOMString[] recipients);
37096 This interface specifies the methods to be called for the sendMessage() operation.
37102 <ExtendedAttributeList>
37103 <ExtendedAttribute name="Callback" value="FunctionOnly">
37104 <webidl>Callback</webidl>
37105 </ExtendedAttribute>
37106 <ExtendedAttribute name="NoInterfaceObject">
37107 <webidl> NoInterfaceObject</webidl>
37108 </ExtendedAttribute>
37109 </ExtendedAttributeList>
37110 <Operation name="onsuccess" id="::Messaging::MessageRecipientsCallback::onsuccess">
37111 <webidl> void onsuccess(DOMString[] recipients);</webidl>
37114 Called when the message sending is finished.
37120 <Type type="void"/>
37122 <Argument name="recipients">
37125 The recipients of the message.
37128 <Type type="array">
37129 <Type type="DOMString"/>
37135 <Interface name="MessageBodySuccessCallback" id="::Messaging::MessageBodySuccessCallback">
37136 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface MessageBodySuccessCallback {
37138 void onsuccess(<ref>Message</ref> message);
37142 This interface specifies a success callback function that takes a message as the input argument.
37143 It is used in the loadMessageBody() asynchronous operation.
37149 <ExtendedAttributeList>
37150 <ExtendedAttribute name="Callback" value="FunctionOnly">
37151 <webidl>Callback</webidl>
37152 </ExtendedAttribute>
37153 <ExtendedAttribute name="NoInterfaceObject">
37154 <webidl> NoInterfaceObject</webidl>
37155 </ExtendedAttribute>
37156 </ExtendedAttributeList>
37157 <Operation name="onsuccess" id="::Messaging::MessageBodySuccessCallback::onsuccess">
37158 <webidl> void onsuccess(<ref>Message</ref> message);</webidl>
37161 Called when the asynchronous query completes successfully.
37167 <Type type="void"/>
37169 <Argument name="message">
37172 The message containing the loaded body.
37175 <Type name="Message"/>
37180 <Interface name="MessageAttachmentSuccessCallback" id="::Messaging::MessageAttachmentSuccessCallback">
37181 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface MessageAttachmentSuccessCallback {
37183 void onsuccess(<ref>MessageAttachment</ref> attachment);
37187 This callback interface specifies a success callback function that takes the loaded attachment as the input argument.
37188 It is used in the loadMessageAttachment() asynchronous operation.
37194 <ExtendedAttributeList>
37195 <ExtendedAttribute name="Callback" value="FunctionOnly">
37196 <webidl>Callback</webidl>
37197 </ExtendedAttribute>
37198 <ExtendedAttribute name="NoInterfaceObject">
37199 <webidl> NoInterfaceObject</webidl>
37200 </ExtendedAttribute>
37201 </ExtendedAttributeList>
37202 <Operation name="onsuccess" id="::Messaging::MessageAttachmentSuccessCallback::onsuccess">
37203 <webidl> void onsuccess(<ref>MessageAttachment</ref> attachment);</webidl>
37206 Called when the asynchronous query completes successfully.
37212 <Type type="void"/>
37214 <Argument name="attachment">
37217 The loaded attachment.
37220 <Type name="MessageAttachment"/>
37225 <Interface name="MessageStorage" id="::Messaging::MessageStorage">
37226 <webidl> [NoInterfaceObject] interface MessageStorage {
37228 void addDraftMessage(<ref>Message</ref> message,
37229 optional <ref>SuccessCallback</ref>? successCallback,
37230 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
37232 void findMessages(<ref>AbstractFilter</ref> filter,
37233 <ref>MessageArraySuccessCallback</ref> successCallback,
37234 optional <ref>ErrorCallback</ref>? errorCallback,
37235 optional <ref>SortMode</ref>? sort,
37236 optional unsigned long? limit,
37237 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);
37239 void removeMessages(<ref>Message</ref>[] messages,
37240 optional <ref>SuccessCallback</ref>? successCallback,
37241 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
37243 void updateMessages(<ref>Message</ref>[] messages,
37244 optional <ref>SuccessCallback</ref>? successCallback,
37245 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
37247 void findConversations(<ref>AbstractFilter</ref> filter,
37248 <ref>MessageConversationArraySuccessCallback</ref> successCallback,
37249 optional <ref>ErrorCallback</ref>? errorCallback,
37250 optional <ref>SortMode</ref>? sort,
37251 optional unsigned long? limit,
37252 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);
37254 void removeConversations(<ref>MessageConversation</ref>[] conversations,
37255 optional <ref>SuccessCallback</ref>? successCallback,
37256 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
37259 void findFolders(<ref>AbstractFilter</ref> filter,
37260 <ref>MessageFolderArraySuccessCallback</ref> successCallback,
37261 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
37263 long addMessagesChangeListener(<ref>MessagesChangeCallback</ref> messagesChangeCallback,
37264 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);
37266 long addConversationsChangeListener(<ref>MessageConversationsChangeCallback</ref> conversationsChangeCallback,
37267 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);
37269 long addFoldersChangeListener(<ref>MessageFoldersChangeCallback</ref> foldersChangeCallback,
37270 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);
37272 void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
37276 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.
37280 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.
37287 <ExtendedAttributeList>
37288 <ExtendedAttribute name="NoInterfaceObject">
37289 <webidl>NoInterfaceObject</webidl>
37290 </ExtendedAttribute>
37291 </ExtendedAttributeList>
37292 <Operation name="addDraftMessage" id="::Messaging::MessageStorage::addDraftMessage">
37293 <webidl> void addDraftMessage(<ref>Message</ref> message,
37294 optional <ref>SuccessCallback</ref>? successCallback,
37295 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
37298 Adds a draft message to <em>MessageStorage</em> and these messages are stored in the Drafts folder.
37302 The errorCallback is launched with these error types:
37306 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
37308 UnknownError - If any other error occurs. </li>
37318 http://tizen.org/privilege/messaging.write
37320 <Code> // Define success callback
37321 function successCallback() {
37322 console.log("Draft message added");
37325 // Define error callback
37326 function errorCallback(error) {
37327 console.log("Cannot add draft message " + error.message);
37330 // Define service query success callback.
37331 function serviceListCB(services) {
37332 if (services.length > 0) {
37333 var msg = new tizen.Message("messaging.sms", {plainBody: "Tizen draft SMS message."});
37334 services[0].messageStorage.addDraftMessage(msg,
37339 tizen.messaging.getMessageServices("messaging.sms", serviceListCB);
37342 <Type type="void"/>
37344 <Argument name="message">
37347 The draft message to add to the storage.
37350 <Type name="Message"/>
37352 <Argument optional="optional" name="successCallback">
37355 The method called when draft messages successfully added.
37358 <Type name="SuccessCallback" nullable="nullable"/>
37360 <Argument optional="optional" name="errorCallback">
37363 The method called when an error occurs.
37366 <Type name="ErrorCallback" nullable="nullable"/>
37370 <RaiseException name="WebAPIException">
37373 with error type TypeMismatchError, if any input parameter
37374 is not compatible with the expected type for that parameter or if the method is invoked for an incoming message.
37377 with error type SecurityError, if the application does not have the privilege to call this method.
37380 with error type NotSupportedError, if this feature is not supported.
37386 <Operation name="findMessages" id="::Messaging::MessageStorage::findMessages">
37387 <webidl> void findMessages(<ref>AbstractFilter</ref> filter,
37388 <ref>MessageArraySuccessCallback</ref> successCallback,
37389 optional <ref>ErrorCallback</ref>? errorCallback,
37390 optional <ref>SortMode</ref>? sort,
37391 optional unsigned long? limit,
37392 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);</webidl>
37395 Finds messages from <em>MessageStorage</em>.
37399 The errorCallback is launched with these error types:
37403 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
37405 UnknownError - If any other error occurs. </li>
37415 http://tizen.org/privilege/messaging.read
37417 <Code> var service; // Assume messaging service is initialized
37418 var messageStorage = service.messageStorage;
37419 function messageArrayCB(messages) {
37420 console.log(messages.length + " message(s) fetched!");
37421 for (var i = 0; i < messages.length; i++) {
37422 console.log(i + ". message from " + messages[i].from);
37426 // Define error callback
37427 function errorCallback(error) {
37428 console.log("Cannot query messages" + error.message);
37431 var filter = new tizen.AttributeFilter("from", "CONTAINS", "2593");
37432 messageStorage.findMessages(filter, messageArrayCB, errorCallback);
37435 <Type type="void"/>
37437 <Argument name="filter">
37440 The criteria to be used when filtering.
37443 <Type name="AbstractFilter"/>
37445 <Argument name="successCallback">
37448 The method called when the invocation ends successfully.
37451 <Type name="MessageArraySuccessCallback"/>
37453 <Argument optional="optional" name="errorCallback">
37456 The method called when an error occurs.
37459 <Type name="ErrorCallback" nullable="nullable"/>
37461 <Argument optional="optional" name="sort">
37464 The sorting mode for the query.
37467 <Type name="SortMode" nullable="nullable"/>
37469 <Argument optional="optional" name="limit">
37472 The maximum limit the query result is set to as specified by the parameter (It is the same meaning as SQL LIMIT).
37473 If <var>0</var>, there is no limit set.
37476 <Type type="unsigned long" nullable="nullable"/>
37478 <Argument optional="optional" name="offset">
37481 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.
37484 <Type type="unsigned long" nullable="nullable"/>
37488 <RaiseException name="WebAPIException">
37491 with error type TypeMismatchError, if any input parameter
37492 is not compatible with the expected type for that parameter.
37495 with error type SecurityError, if the application does not have the privilege to call this method.
37498 with error type NotSupportedError, if this feature is not supported.
37504 <Operation name="removeMessages" id="::Messaging::MessageStorage::removeMessages">
37505 <webidl> void removeMessages(<ref>Message</ref>[] messages,
37506 optional <ref>SuccessCallback</ref>? successCallback,
37507 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
37510 Removes messages from <em>MessageStorage</em>.
37514 The errorCallback is launched with these error types:
37518 InvalidValuesError - If any of the input parameters contain an invalid value </li>
37520 UnknownError - If any other error occurs. </li>
37530 http://tizen.org/privilege/messaging.write
37532 <Code> // Define success callback
37533 var service; // Assume messaging service is initialized
37534 var messageStorage = service.messageStorage;
37535 function successCallback() {
37536 console.log("Messages were deleted");
37539 // Define error callback
37540 function errorCallback(error) {
37541 console.log("Cannot delete messages " + error.message);
37544 function messageArrayCB(messages) {
37545 if (messages.length > 0) {
37546 messageStorage.removeMessages(messages, successCallback, errorCallback);
37548 console.log("No messages found");
37552 var filter = new tizen.AttributeFilter("from", "CONTAINS", "2593");
37553 messageStorage.findMessages(filter, messageArrayCB);
37556 <Type type="void"/>
37558 <Argument name="messages">
37561 An array of messages to delete.
37564 <Type type="array">
37565 <Type name="Message"/>
37568 <Argument optional="optional" name="successCallback">
37571 The method called when messages are successfully deleted.
37574 <Type name="SuccessCallback" nullable="nullable"/>
37576 <Argument optional="optional" name="errorCallback">
37579 The method called when an error occurs.
37582 <Type name="ErrorCallback" nullable="nullable"/>
37586 <RaiseException name="WebAPIException">
37589 with error type TypeMismatchError, if any input parameter
37590 is not compatible with the expected type for that parameter.
37593 with error type SecurityError, if the application does not have the privilege to call this method.
37596 with error type NotSupportedError, if this feature is not supported.
37602 <Operation name="updateMessages" id="::Messaging::MessageStorage::updateMessages">
37603 <webidl> void updateMessages(<ref>Message</ref>[] messages,
37604 optional <ref>SuccessCallback</ref>? successCallback,
37605 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
37608 Updates messages in <em>MessageStorage</em>.
37612 The backend must check whether the required updates can be applied and invoke the errorCallback method, if they cannot be checked.
37613 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.
37616 The errorCallback is launched with these error types:
37620 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
37622 UnknownError - If any other error occurs. </li>
37632 http://tizen.org/privilege/messaging.write
37634 <Code> var service; // Assume messaging service is initialized
37635 var messageStorage = service.messageStorage;
37637 // Define success callback
37638 function successCallback() {
37639 console.log("Messages were updated");
37642 // Define error callback
37643 function errorCallback(error) {
37644 console.log("Cannot update messages " + error.message);
37647 function messageArrayCB(messages) {
37648 if (messages.length > 0) {
37649 messages[0].isRead = true;
37650 messageStorage.updateMessages([messages[0]], successCallback, errorCallback);
37652 console.log("No messages found");
37656 var filter = new tizen.AttributeFilter('isRead', 'EXACTLY', false);
37657 messageStorage.findMessages(filter, messageArrayCB);
37661 <Type type="void"/>
37663 <Argument name="messages">
37669 <Type type="array">
37670 <Type name="Message"/>
37673 <Argument optional="optional" name="successCallback">
37676 The method called when messages are successfully updated.
37679 <Type name="SuccessCallback" nullable="nullable"/>
37681 <Argument optional="optional" name="errorCallback">
37684 The method called when an error occurs.
37687 <Type name="ErrorCallback" nullable="nullable"/>
37691 <RaiseException name="WebAPIException">
37694 with error type TypeMismatchError, if any input parameter
37695 is not compatible with the expected type for that parameter.
37698 with error type SecurityError, if the application does not have the privilege to call this method.
37701 with error type NotSupportedError, if this feature is not supported.
37707 <Operation name="findConversations" id="::Messaging::MessageStorage::findConversations">
37708 <webidl> void findConversations(<ref>AbstractFilter</ref> filter,
37709 <ref>MessageConversationArraySuccessCallback</ref> successCallback,
37710 optional <ref>ErrorCallback</ref>? errorCallback,
37711 optional <ref>SortMode</ref>? sort,
37712 optional unsigned long? limit,
37713 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);</webidl>
37716 Finds conversations from <em>MessageStorage</em>.
37720 The errorCallback is launched with these error types:
37724 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
37726 UnknownError - If any other error occurs. </li>
37736 http://tizen.org/privilege/messaging.read
37738 <Code> var service; // Assume messaging service is initialized
37739 var messageStorage = service.messageStorage;
37740 function conversationsArrayCB(conversations) {
37741 console.log(conversations.length + " conversation(s) found!");
37742 for (var i = 0; i < conversations.length; i++) {
37743 console.log(i + ". conversation preview " + conversations[i].preview);
37747 // Define error callback.
37748 function errorCallback(error) {
37749 console.log("Cannot query conversations" + error.message);
37752 var filter = new tizen.AttributeFilter('from', 'CONTAINS', '2593');
37753 messageStorage.findConversations(filter, conversationsArrayCB, errorCallback);
37756 <Type type="void"/>
37758 <Argument name="filter">
37761 The criteria to be used when filtering.
37764 <Type name="AbstractFilter"/>
37766 <Argument name="successCallback">
37769 The method called when the invocation ends successfully.
37772 <Type name="MessageConversationArraySuccessCallback"/>
37774 <Argument optional="optional" name="errorCallback">
37777 The method called when an error occurs.
37780 <Type name="ErrorCallback" nullable="nullable"/>
37782 <Argument optional="optional" name="sort">
37785 The sorting rules for the query.
37788 <Type name="SortMode" nullable="nullable"/>
37790 <Argument optional="optional" name="limit">
37793 The maximum limit the query result is set to as specified by the parameter (It is the same meaning as SQL LIMIT).
37794 If set to <var>0</var>, there is no limit set.
37797 <Type type="unsigned long" nullable="nullable"/>
37799 <Argument optional="optional" name="offset">
37802 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.
37805 <Type type="unsigned long" nullable="nullable"/>
37809 <RaiseException name="WebAPIException">
37812 with error type TypeMismatchError, if any input parameter
37813 is not compatible with the expected type for that parameter.
37816 with error type SecurityError, if the application does not have the privilege to call this method.
37819 with error type NotSupportedError, if this feature is not supported.
37825 <Operation name="removeConversations" id="::Messaging::MessageStorage::removeConversations">
37826 <webidl> void removeConversations(<ref>MessageConversation</ref>[] conversations,
37827 optional <ref>SuccessCallback</ref>? successCallback,
37828 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
37831 Removes conversations from <em>MessageStorage</em>.
37835 The errorCallback is launched with these error types:
37839 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
37841 UnknownError - If any other error occurs. </li>
37851 http://tizen.org/privilege/messaging.write
37853 <Code> var service; // Assume messaging service is initialized
37854 var messageStorage = service.messageStorage;
37855 // Define success callback.
37856 function successCallback() {
37857 console.log("Conversations deleted");
37860 // Define error callback.
37861 function errorCallback(error) {
37862 console.log("Cannot delete conversations " + error.message);
37865 function conversationsArrayCB(conversations) {
37866 if (conversations.length > 0) {
37867 messageStorage.removeConversations(conversations, successCallback,
37870 console.log("No conversations found");
37872 console.log("Deleted " + conversations.length + " conversation(s)");
37875 // Define error callback.
37876 function queryErrorCB(error) {
37877 console.log("Cannot query conversations" + error.message);
37880 var filter = new tizen.AttributeFilter('from', 'CONTAINS', '2593');
37881 messageStorage.findConversations(filter, conversationsArrayCB,
37885 <Type type="void"/>
37887 <Argument name="conversations">
37890 An array of conversations to delete.
37893 <Type type="array">
37894 <Type name="MessageConversation"/>
37897 <Argument optional="optional" name="successCallback">
37900 The method called when conversations are successfully deleted.
37903 <Type name="SuccessCallback" nullable="nullable"/>
37905 <Argument optional="optional" name="errorCallback">
37908 The method called when an error occurs.
37911 <Type name="ErrorCallback" nullable="nullable"/>
37915 <RaiseException name="WebAPIException">
37918 with error type TypeMismatchError, if any input parameter
37919 is not compatible with the expected type for that parameter.
37922 with error type SecurityError, if the application does not have the privilege to call this method.
37925 with error type NotSupportedError, if this feature is not supported.
37931 <Operation name="findFolders" id="::Messaging::MessageStorage::findFolders">
37932 <webidl> void findFolders(<ref>AbstractFilter</ref> filter,
37933 <ref>MessageFolderArraySuccessCallback</ref> successCallback,
37934 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
37937 Queries folders from MessageStorage.
37941 The errorCallback is launched with these error types:
37945 InvalidValuesError: If any of the input parameters contains an invalid value. </li>
37947 UnknownError: In any other error case. </li>
37957 http://tizen.org/privilege/messaging.read
37959 <Code> var service; // Assume messaging service is initialized
37960 var messageStorage = service.messageStorage;
37961 function folderArrayCB(folders) {
37962 console.log(folders.length + " folders(s) found!");
37963 for (var i = 0; i < folders.length; i++) {
37964 console.log(i + ", folder: " + folders[i].name);
37967 var filter = new tizen.AttributeFilter("serviceId", "EXACTLY", service.id);
37968 messageStorage.findFolders(filter, folderArrayCB);
37971 <Type type="void"/>
37973 <Argument name="filter">
37976 The criteria used when filtering.
37979 <Type name="AbstractFilter"/>
37981 <Argument name="successCallback">
37984 The method called when the invocation ends successfully.
37987 <Type name="MessageFolderArraySuccessCallback"/>
37989 <Argument optional="optional" name="errorCallback">
37992 The method called when an error occurs.
37995 <Type name="ErrorCallback" nullable="nullable"/>
37999 <RaiseException name="WebAPIException">
38002 with error type TypeMismatchError, if any input parameter
38003 is not compatible with the expected type for that parameter.
38006 with error type SecurityError, if the application does not have the privilege to call this method.
38009 with error type NotSupportedError, if this feature is not supported.
38015 <Operation name="addMessagesChangeListener" id="::Messaging::MessageStorage::addMessagesChangeListener">
38016 <webidl> long addMessagesChangeListener(<ref>MessagesChangeCallback</ref> messagesChangeCallback,
38017 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);</webidl>
38020 Adds a listener to subscribe to notification for MessageStorage changes.
38024 The errorCallback is launched with these error types:
38028 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
38030 UnknownError - If any other error occurs. </li>
38040 http://tizen.org/privilege/messaging.read
38042 <Code> var service; // Assume messaging service is initialized
38043 var messageStorage = service.messageStorage;
38044 var messageChangeCallback = {
38045 messagesupdated: function(messages) {
38046 console.log(messages.length + " message(s) updated");},
38047 messagesadded: function(messages) {
38048 console.log(messages.length + " message(s) added");},
38049 messagesremoved: function(messages) {
38050 console.log(messages.length + " message(s) removed");}
38053 messageStorage.addMessagesChangeListener(messageChangeCallback);
38059 long The subscription identifier.
38064 <Argument name="messagesChangeCallback">
38067 Callback that is called when the MessageStorage is changed.
38070 <Type name="MessagesChangeCallback"/>
38072 <Argument optional="optional" name="filter">
38075 The criteria to be used when filtering.
38078 <Type name="AbstractFilter" nullable="nullable"/>
38082 <RaiseException name="WebAPIException">
38085 with error type TypeMismatchError, if any input parameter
38086 is not compatible with the expected type for that parameter.
38089 with error type SecurityError, if the application does not have the privilege to call this method.
38092 with error type NotSupportedError, if this feature is not supported.
38098 <Operation name="addConversationsChangeListener" id="::Messaging::MessageStorage::addConversationsChangeListener">
38099 <webidl> long addConversationsChangeListener(<ref>MessageConversationsChangeCallback</ref> conversationsChangeCallback,
38100 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);</webidl>
38103 Adds a listener to subscribe to notifications for MessageConversation changes.
38107 The errorCallback is launched with these error types:
38111 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
38113 UnknownError - If any other error occurs. </li>
38123 http://tizen.org/privilege/messaging.read
38125 <Code> var service; // Assume messaging service is initialized
38126 var messageStorage = service.messageStorage;
38127 var conversationChangeCB = {
38128 conversationsupdated: function(conversations) {
38129 console.log(conversations.length + " conversations(s) updated");},
38130 conversationsadded: function(conversations) {
38131 console.log(conversations.length + " conversations(s) added");},
38132 conversationsremoved: function(conversations) {
38133 console.log(conversations.length + " conversations(s) removed");}
38136 messageStorage.addConversationsChangeListener(conversationChangeCB);
38142 long The subscription identifier.
38147 <Argument name="conversationsChangeCallback">
38150 Callback that is called when the MessageStorage is changed.
38153 <Type name="MessageConversationsChangeCallback"/>
38155 <Argument optional="optional" name="filter">
38158 The criteria to be used when filtering.
38161 <Type name="AbstractFilter" nullable="nullable"/>
38165 <RaiseException name="WebAPIException">
38168 with error type TypeMismatchError, if any input parameter
38169 is not compatible with the expected type for that parameter.
38172 with error type SecurityError, if the application does not have the privilege to call this method.
38175 with error type NotSupportedError, if this feature is not supported.
38181 <Operation name="addFoldersChangeListener" id="::Messaging::MessageStorage::addFoldersChangeListener">
38182 <webidl> long addFoldersChangeListener(<ref>MessageFoldersChangeCallback</ref> foldersChangeCallback,
38183 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);</webidl>
38186 Adds a listener to subscribe to notifications for MessageFolder changes.
38190 The errorCallback is launched with these error types:
38194 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
38196 UnknownError - If any other error occurs. </li>
38206 http://tizen.org/privilege/messaging.read
38208 <Code> var service; // Assume messaging service is initialized
38209 var messageStorage = service.messageStorage;
38210 var folderChangeCB = {
38211 foldersupdated: function(folders) {
38212 console.log(folders.length + " folders(s) updated");},
38213 foldersadded: function(folders) {
38214 console.log(folders.length + " folders(s) added");},
38215 foldersremoved: function(folders) {
38216 console.log(folders.length + " folders(s) removed");}
38219 messageStorage.addFoldersChangeListener(folderChangeCB);
38225 long The subscription identifier.
38230 <Argument name="foldersChangeCallback">
38233 Callback that is called when the MessageStorage is changed.
38236 <Type name="MessageFoldersChangeCallback"/>
38238 <Argument optional="optional" name="filter">
38241 The criteria to be used when filtering.
38244 <Type name="AbstractFilter" nullable="nullable"/>
38248 <RaiseException name="WebAPIException">
38251 with error type TypeMismatchError, if any input parameter
38252 is not compatible with the expected type for that parameter.
38255 with error type SecurityError, if the application does not have the privilege to call this method.
38258 with error type NotSupportedError, if this feature is not supported.
38264 <Operation name="removeChangeListener" id="::Messaging::MessageStorage::removeChangeListener">
38265 <webidl> void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);</webidl>
38268 Removes a listener to unsubscribe from receiving message notifications.
38272 The errorCallback is launched with these error types:
38276 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
38278 UnknownError - If any other error occurs. </li>
38281 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.
38282 If the <em>subscriptionId argument does not correspond to a valid subscription, the method will return without any further action.
38292 http://tizen.org/privilege/messaging.read
38294 <Code> var watchId;
38295 var service; // Assume messaging service is initialized
38296 var messageStorage = service.messageStorage;
38297 var folderChangeCB = {
38298 foldersupdated: function(folders) {
38299 console.log(folders.length + " folders(s) updated. Cancel watching.");
38300 messageStorage.removeChangeListener(watchId); },
38301 foldersadded: function(folders) {
38302 console.log(folders.length + " folders(s) added. Cancel watching.");
38303 messageStorage.removeChangeListener(watchId); },
38304 foldersremoved: function(folders) {
38305 console.log(folders.length + " folders(s) removed. Cancel watching.");
38306 messageStorage.removeChangeListener(watchId);}
38309 watchId = messageStorage.addFoldersChangeListener(folderChangeCB);
38313 <Type type="void"/>
38315 <Argument name="watchId">
38318 An identifier of the subscription returned by addMessagesChangeListener, addConversationsChangeListener or
38319 addFoldersChangeListener methods.
38322 <Type type="long"/>
38326 <RaiseException name="WebAPIException">
38329 with error type TypeMismatchError, if any input parameter
38330 is not compatible with the expected type for that parameter.
38333 with error type SecurityError, if the application does not have the privilege to call this method.
38336 with error type NotSupportedError, if this feature is not supported.
38343 <Interface name="MessageArraySuccessCallback" id="::Messaging::MessageArraySuccessCallback">
38344 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface MessageArraySuccessCallback {
38346 void onsuccess(<ref>Message</ref>[] messages);
38350 findMessages specific success callback.
38354 This callback interface specifies a success callback function,
38355 taking a list of messages that satisfy the filtering criteria as the input argument.
38356 It is used in the findMessages asynchronous operation.
38363 <ExtendedAttributeList>
38364 <ExtendedAttribute name="Callback" value="FunctionOnly">
38365 <webidl>Callback</webidl>
38366 </ExtendedAttribute>
38367 <ExtendedAttribute name="NoInterfaceObject">
38368 <webidl> NoInterfaceObject</webidl>
38369 </ExtendedAttribute>
38370 </ExtendedAttributeList>
38371 <Operation name="onsuccess" id="::Messaging::MessageArraySuccessCallback::onsuccess">
38372 <webidl> void onsuccess(<ref>Message</ref>[] messages);</webidl>
38375 Method invoked when an asynchronous query completes successfully.
38381 <Type type="void"/>
38383 <Argument name="messages">
38386 Array of messages that satisfy the query.
38389 <Type type="array">
38390 <Type name="Message"/>
38396 <Interface name="MessageConversationArraySuccessCallback" id="::Messaging::MessageConversationArraySuccessCallback">
38397 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface MessageConversationArraySuccessCallback {
38399 void onsuccess(<ref>MessageConversation</ref>[] conversations);
38403 findConversations specific success callback.
38407 This callback interface specifies a success callback function,
38408 taking a list of conversations that satisfy the filtering criteria as the input argument.
38409 It is used in the findConversations asynchronous operation.
38416 <ExtendedAttributeList>
38417 <ExtendedAttribute name="Callback" value="FunctionOnly">
38418 <webidl>Callback</webidl>
38419 </ExtendedAttribute>
38420 <ExtendedAttribute name="NoInterfaceObject">
38421 <webidl> NoInterfaceObject</webidl>
38422 </ExtendedAttribute>
38423 </ExtendedAttributeList>
38424 <Operation name="onsuccess" id="::Messaging::MessageConversationArraySuccessCallback::onsuccess">
38425 <webidl> void onsuccess(<ref>MessageConversation</ref>[] conversations);</webidl>
38428 Method invoked when an asynchronous query completes successfully.
38434 <Type type="void"/>
38436 <Argument name="conversations">
38439 Array of conversations that satisfy the query.
38442 <Type type="array">
38443 <Type name="MessageConversation"/>
38449 <Interface name="MessageFolderArraySuccessCallback" id="::Messaging::MessageFolderArraySuccessCallback">
38450 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface MessageFolderArraySuccessCallback {
38452 void onsuccess(<ref>MessageFolder</ref>[] folders);
38456 findFolders specific success callback.
38460 This callback interface specifies a success callback function,
38461 taking a list of folders that satisfy the filtering criteria as the input argument.
38462 It is used in the findFolders asynchronous operation.
38469 <ExtendedAttributeList>
38470 <ExtendedAttribute name="Callback" value="FunctionOnly">
38471 <webidl>Callback</webidl>
38472 </ExtendedAttribute>
38473 <ExtendedAttribute name="NoInterfaceObject">
38474 <webidl> NoInterfaceObject</webidl>
38475 </ExtendedAttribute>
38476 </ExtendedAttributeList>
38477 <Operation name="onsuccess" id="::Messaging::MessageFolderArraySuccessCallback::onsuccess">
38478 <webidl> void onsuccess(<ref>MessageFolder</ref>[] folders);</webidl>
38481 Method invoked when an asynchronous query completes successfully.
38487 <Type type="void"/>
38489 <Argument name="folders">
38492 Array of folders that satisfy the query.
38495 <Type type="array">
38496 <Type name="MessageFolder"/>
38502 <Interface name="MessagesChangeCallback" id="::Messaging::MessagesChangeCallback">
38503 <webidl> [Callback, NoInterfaceObject] interface MessagesChangeCallback {
38505 void messagesadded(<ref>Message</ref>[] addedMessages);
38507 void messagesupdated(<ref>Message</ref>[] updatedMessages);
38509 void messagesremoved(<ref>Message</ref>[] removedMessages);
38513 watchMessagesChanges callback.
38517 This callback interface specifies a callback as a set of functions that will be
38518 invoked when messages from MessageStorage change. Each function takes a list of messages as the input argument.
38525 <ExtendedAttributeList>
38526 <ExtendedAttribute name="Callback">
38527 <webidl>Callback</webidl>
38528 </ExtendedAttribute>
38529 <ExtendedAttribute name="NoInterfaceObject">
38530 <webidl> NoInterfaceObject</webidl>
38531 </ExtendedAttribute>
38532 </ExtendedAttributeList>
38533 <Operation name="messagesadded" id="::Messaging::MessagesChangeCallback::messagesadded">
38534 <webidl> void messagesadded(<ref>Message</ref>[] addedMessages);</webidl>
38537 Method invoked when messages are added to the MessageStorage.
38543 <Type type="void"/>
38545 <Argument name="addedMessages">
38548 Array of added messages.
38551 <Type type="array">
38552 <Type name="Message"/>
38557 <Operation name="messagesupdated" id="::Messaging::MessagesChangeCallback::messagesupdated">
38558 <webidl> void messagesupdated(<ref>Message</ref>[] updatedMessages);</webidl>
38561 Method invoked when messages are updated in MessageStorage.
38567 <Type type="void"/>
38569 <Argument name="updatedMessages">
38572 Array of updated messages.
38575 <Type type="array">
38576 <Type name="Message"/>
38581 <Operation name="messagesremoved" id="::Messaging::MessagesChangeCallback::messagesremoved">
38582 <webidl> void messagesremoved(<ref>Message</ref>[] removedMessages);</webidl>
38585 Method invoked when messages are removed from MessageStorage.
38591 <Type type="void"/>
38593 <Argument name="removedMessages">
38596 Array of removed messages. It contains only MessageId attribute.
38599 <Type type="array">
38600 <Type name="Message"/>
38606 <Interface name="MessageConversationsChangeCallback" id="::Messaging::MessageConversationsChangeCallback">
38607 <webidl> [Callback, NoInterfaceObject] interface MessageConversationsChangeCallback {
38609 void conversationsadded(<ref>MessageConversation</ref>[] addedConversations);
38611 void conversationsupdated(<ref>MessageConversation</ref>[] updatedConversations);
38613 void conversationsremoved(<ref>MessageConversation</ref>[] removedConversations);
38617 watchConversationsChanges callback.
38621 This callback interface specifies a callback as a set of functions that will be
38622 invoked when conversations from MessageStorage change. Each function takes a list of conversations as the input argument.
38629 <ExtendedAttributeList>
38630 <ExtendedAttribute name="Callback">
38631 <webidl>Callback</webidl>
38632 </ExtendedAttribute>
38633 <ExtendedAttribute name="NoInterfaceObject">
38634 <webidl> NoInterfaceObject</webidl>
38635 </ExtendedAttribute>
38636 </ExtendedAttributeList>
38637 <Operation name="conversationsadded" id="::Messaging::MessageConversationsChangeCallback::conversationsadded">
38638 <webidl> void conversationsadded(<ref>MessageConversation</ref>[] addedConversations);</webidl>
38641 Method invoked when conversations are added to MessageStorage.
38647 <Type type="void"/>
38649 <Argument name="addedConversations">
38652 Array of added conversations.
38655 <Type type="array">
38656 <Type name="MessageConversation"/>
38661 <Operation name="conversationsupdated" id="::Messaging::MessageConversationsChangeCallback::conversationsupdated">
38662 <webidl> void conversationsupdated(<ref>MessageConversation</ref>[] updatedConversations);</webidl>
38665 Method invoked when conversations are updated in MessageStorage.
38671 <Type type="void"/>
38673 <Argument name="updatedConversations">
38676 Array of updated conversations.
38679 <Type type="array">
38680 <Type name="MessageConversation"/>
38685 <Operation name="conversationsremoved" id="::Messaging::MessageConversationsChangeCallback::conversationsremoved">
38686 <webidl> void conversationsremoved(<ref>MessageConversation</ref>[] removedConversations);</webidl>
38689 Method invoked when conversations are removed from MessageStorage.
38695 <Type type="void"/>
38697 <Argument name="removedConversations">
38700 Array of removed conversations. It contains only MessageConvId attribute.
38703 <Type type="array">
38704 <Type name="MessageConversation"/>
38710 <Interface name="MessageFoldersChangeCallback" id="::Messaging::MessageFoldersChangeCallback">
38711 <webidl> [Callback, NoInterfaceObject] interface MessageFoldersChangeCallback {
38713 void foldersadded(<ref>MessageFolder</ref>[] addedFolders);
38715 void foldersupdated(<ref>MessageFolder</ref>[] updatedFolders);
38717 void foldersremoved(<ref>MessageFolder</ref>[] removedFolders);
38721 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.
38727 <ExtendedAttributeList>
38728 <ExtendedAttribute name="Callback">
38729 <webidl>Callback</webidl>
38730 </ExtendedAttribute>
38731 <ExtendedAttribute name="NoInterfaceObject">
38732 <webidl> NoInterfaceObject</webidl>
38733 </ExtendedAttribute>
38734 </ExtendedAttributeList>
38735 <Operation name="foldersadded" id="::Messaging::MessageFoldersChangeCallback::foldersadded">
38736 <webidl> void foldersadded(<ref>MessageFolder</ref>[] addedFolders);</webidl>
38739 Called when folders are added to <em>MessageStorage</em>.
38745 <Type type="void"/>
38747 <Argument name="addedFolders">
38750 An array of added folders.
38753 <Type type="array">
38754 <Type name="MessageFolder"/>
38759 <Operation name="foldersupdated" id="::Messaging::MessageFoldersChangeCallback::foldersupdated">
38760 <webidl> void foldersupdated(<ref>MessageFolder</ref>[] updatedFolders);</webidl>
38763 Called when folders are updated in <em>MessageStorage</em>.
38769 <Type type="void"/>
38771 <Argument name="updatedFolders">
38774 An array of updated folders.
38777 <Type type="array">
38778 <Type name="MessageFolder"/>
38783 <Operation name="foldersremoved" id="::Messaging::MessageFoldersChangeCallback::foldersremoved">
38784 <webidl> void foldersremoved(<ref>MessageFolder</ref>[] removedFolders);</webidl>
38787 Called when folders are removed from <em>MessageStorage</em>.
38793 <Type type="void"/>
38795 <Argument name="removedFolders">
38798 Array of removed folders. It contains only MessageFolderId attribute.
38801 <Type type="array">
38802 <Type name="MessageFolder"/>
38808 <Interface name="MessageConversation" id="::Messaging::MessageConversation">
38809 <webidl> [NoInterfaceObject] interface MessageConversation {
38811 readonly attribute <ref>MessageConvId</ref> id;
38813 readonly attribute <ref>MessageServiceTag</ref> type;
38815 readonly attribute Date timestamp;
38817 readonly attribute unsigned long messageCount;
38819 readonly attribute unsigned long unreadMessages;
38821 readonly attribute DOMString preview;
38823 readonly attribute DOMString subject;
38825 readonly attribute boolean isRead;
38827 readonly attribute DOMString from;
38829 readonly attribute DOMString[] to;
38831 readonly attribute DOMString[] cc;
38833 readonly attribute DOMString[] bcc;
38835 readonly attribute <ref>MessageId</ref> lastMessageId;
38839 This interface defines the message conversation (also known as the thread of messages).
38843 This interface allows a web application to get the set of properties linked to a conversation.
38844 This interface provides only read-only attributes.
38851 <ExtendedAttributeList>
38852 <ExtendedAttribute name="NoInterfaceObject">
38853 <webidl>NoInterfaceObject</webidl>
38854 </ExtendedAttribute>
38855 </ExtendedAttributeList>
38856 <Attribute readonly="readonly" name="id" id="::Messaging::MessageConversation::id">
38857 <webidl> readonly attribute <ref>MessageConvId</ref> id;</webidl>
38860 The conversation identifier.
38864 The ID is locally unique and persistent property, assigned by the device or the Web runtime (WRT).
38871 <Type name="MessageConvId"/>
38873 <Attribute readonly="readonly" name="type" id="::Messaging::MessageConversation::type">
38874 <webidl> readonly attribute <ref>MessageServiceTag</ref> type;</webidl>
38877 The type of a given conversation.
38883 <Type name="MessageServiceTag"/>
38885 <Attribute readonly="readonly" name="timestamp" id="::Messaging::MessageConversation::timestamp">
38886 <webidl> readonly attribute Date timestamp;</webidl>
38889 The timestamp of the latest message in a conversation.
38893 This property is set up by the device or the Web runtime environment.
38900 <Type type="Date"/>
38902 <Attribute readonly="readonly" name="messageCount" id="::Messaging::MessageConversation::messageCount">
38903 <webidl> readonly attribute unsigned long messageCount;</webidl>
38906 The count of messages in a conversation.
38912 <Type type="unsigned long"/>
38914 <Attribute readonly="readonly" name="unreadMessages" id="::Messaging::MessageConversation::unreadMessages">
38915 <webidl> readonly attribute unsigned long unreadMessages;</webidl>
38918 The count of unread messages in a conversation.
38924 <Type type="unsigned long"/>
38926 <Attribute readonly="readonly" name="preview" id="::Messaging::MessageConversation::preview">
38927 <webidl> readonly attribute DOMString preview;</webidl>
38930 A preview of the latest message in a conversation.
38936 <Type type="DOMString"/>
38938 <Attribute readonly="readonly" name="subject" id="::Messaging::MessageConversation::subject">
38939 <webidl> readonly attribute DOMString subject;</webidl>
38942 The subject of a conversation (applicable for group chats, MMS, email).
38948 <Type type="DOMString"/>
38950 <Attribute readonly="readonly" name="isRead" id="::Messaging::MessageConversation::isRead">
38951 <webidl> readonly attribute boolean isRead;</webidl>
38954 An attribute to indicate whether the latest message in a conversation has been read or not.
38958 This property is set to <var>true</var> if the message has been read, else it is set to <var>false</var>.
38965 <Type type="boolean"/>
38967 <Attribute readonly="readonly" name="from" id="::Messaging::MessageConversation::from">
38968 <webidl> readonly attribute DOMString from;</webidl>
38971 The source address (or source phone number) of the latest message in the conversation.
38975 This property is set up by the device or the Web runtime environment.
38982 <Type type="DOMString"/>
38984 <Attribute readonly="readonly" name="to" id="::Messaging::MessageConversation::to">
38985 <webidl> readonly attribute DOMString[] to;</webidl>
38988 The destination of the latest message in a conversation.
38994 <Type type="array">
38995 <Type type="DOMString"/>
38998 <Attribute readonly="readonly" name="cc" id="::Messaging::MessageConversation::cc">
38999 <webidl> readonly attribute DOMString[] cc;</webidl>
39002 The carbon copy (cc) address of the latest message in a conversation.
39006 This property is used only for email.
39013 <Type type="array">
39014 <Type type="DOMString"/>
39017 <Attribute readonly="readonly" name="bcc" id="::Messaging::MessageConversation::bcc">
39018 <webidl> readonly attribute DOMString[] bcc;</webidl>
39021 The blind carbon copy (bcc) address of the latest message in a conversation.
39025 This property is used only for email.
39032 <Type type="array">
39033 <Type type="DOMString"/>
39036 <Attribute readonly="readonly" name="lastMessageId" id="::Messaging::MessageConversation::lastMessageId">
39037 <webidl> readonly attribute <ref>MessageId</ref> lastMessageId;</webidl>
39040 The identifier of a latest message in a conversation.
39044 This property is set up by the device or the Web runtime environment.
39051 <Type name="MessageId"/>
39054 <Interface name="MessageFolder" id="::Messaging::MessageFolder">
39055 <webidl> [NoInterfaceObject] interface MessageFolder {
39057 readonly attribute <ref>MessageFolderId</ref> id;
39059 readonly attribute <ref>MessageFolderId</ref> parentId;
39061 readonly attribute DOMString serviceId;
39063 readonly attribute <ref>MessageServiceTag</ref> contentType;
39065 attribute DOMString name setraises(<ref>WebAPIException</ref>);
39067 readonly attribute DOMString path;
39069 readonly attribute DOMString type;
39071 attribute boolean synchronizable setraises(<ref>WebAPIException</ref>);
39075 This interface defines the email folder.
39079 This interface allows a web application to get the set of properties that are linked to an email folder.
39082 The concept of folders is present in several email protocols, such as IMAP, Mail For Exchange.
39085 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.
39092 <ExtendedAttributeList>
39093 <ExtendedAttribute name="NoInterfaceObject">
39094 <webidl>NoInterfaceObject</webidl>
39095 </ExtendedAttribute>
39096 </ExtendedAttributeList>
39097 <Attribute readonly="readonly" name="id" id="::Messaging::MessageFolder::id">
39098 <webidl> readonly attribute <ref>MessageFolderId</ref> id;</webidl>
39101 The folder identifier.
39102 The ID is locally unique and persistent property, assigned by the device or the Web runtime (WRT).
39108 <Type name="MessageFolderId"/>
39110 <Attribute readonly="readonly" name="parentId" id="::Messaging::MessageFolder::parentId">
39111 <webidl> readonly attribute <ref>MessageFolderId</ref> parentId;</webidl>
39114 The identifier for the parent folder of a specified folder.
39118 If this folder is a root folder, the parent folder ID is <var>null</var>.
39125 <Type name="MessageFolderId"/>
39127 <Attribute readonly="readonly" name="serviceId" id="::Messaging::MessageFolder::serviceId">
39128 <webidl> readonly attribute DOMString serviceId;</webidl>
39131 The identifier of the service to which a specified folder belongs.
39137 <Type type="DOMString"/>
39139 <Attribute readonly="readonly" name="contentType" id="::Messaging::MessageFolder::contentType">
39140 <webidl> readonly attribute <ref>MessageServiceTag</ref> contentType;</webidl>
39143 The type of the messages contained within a folder.
39149 <Type name="MessageServiceTag"/>
39151 <Attribute name="name" id="::Messaging::MessageFolder::name">
39152 <webidl> attribute DOMString name setraises(<ref>WebAPIException</ref>);</webidl>
39155 The visible name of a folder.
39159 Can be modified. By default, it contains the folder name from the server.
39162 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.
39169 <Type type="DOMString"/>
39171 <RaiseException name="WebAPIException"/>
39174 <Attribute readonly="readonly" name="path" id="::Messaging::MessageFolder::path">
39175 <webidl> readonly attribute DOMString path;</webidl>
39178 The whole path of a remote folder on the server.
39182 If the current Messaging service does not support remote folders on the server,
39183 this attribute will be empty.
39190 <Type type="DOMString"/>
39192 <Attribute readonly="readonly" name="type" id="::Messaging::MessageFolder::type">
39193 <webidl> readonly attribute DOMString type;</webidl>
39196 The standard type of a folder.
39200 It can be one of the following values:
39213 If this folder is not a standard folder, an empty value must be returned.
39216 This property is unique for each type within one Messaging service.
39223 <Type type="DOMString"/>
39225 <Attribute name="synchronizable" id="::Messaging::MessageFolder::synchronizable">
39226 <webidl> attribute boolean synchronizable setraises(<ref>WebAPIException</ref>);</webidl>
39229 An attribute to show whether this folder should be synchronized or not.
39233 This attribute affects the behavior of the MessageService.sync() method.
39240 <Type type="boolean"/>
39242 <RaiseException name="WebAPIException"/>
39247 <Module name="NetworkBearerSelection" id="::NetworkBearerSelection">
39248 <webidl>module NetworkBearerSelection {
39250 enum NetworkType { "CELLULAR", "UNKNOWN" };
39252 [NoInterfaceObject] interface NetworkBearerSelectionObject {
39253 readonly attribute <ref>NetworkBearerSelection</ref> networkbearerselection;
39255 <ref>Tizen</ref> implements <ref>NetworkBearerSelectionObject</ref>;
39257 [NoInterfaceObject] interface NetworkBearerSelection {
39259 void requestRouteToHost(<ref>NetworkType</ref> networkType,
39260 DOMString domainName,
39261 <ref>NetworkSuccessCallback</ref> successCallback,
39262 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
39264 void releaseRouteToHost(<ref>NetworkType</ref> networkType,
39265 DOMString domainName,
39266 <ref>SuccessCallback</ref> successCallback,
39267 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
39270 [Callback, NoInterfaceObject] interface NetworkSuccessCallback {
39273 void ondisconnected();
39278 This specification defines interfaces and methods providing Web applications to access the devices.
39282 This API provides interfaces and methods for users to set network bearer selection.
39288 <def-api-feature identifier="http://tizen.org/feature/network.telephony">
39293 To guarantee this application running on a device with telephony feature, define below in the config file:
39299 <Enum name="NetworkType" id="::NetworkBearerSelection::NetworkType">
39300 <webidl> enum NetworkType { "CELLULAR", "UNKNOWN" };</webidl>
39303 An enumerator that defines the type of a network.
39309 <EnumValue stringvalue="CELLULAR">
39310 <webidl> "CELLULAR</webidl>
39312 <EnumValue stringvalue="UNKNOWN">
39313 <webidl> "UNKNOWN</webidl>
39316 <Interface name="NetworkBearerSelectionObject" id="::NetworkBearerSelection::NetworkBearerSelectionObject">
39317 <webidl> [NoInterfaceObject] interface NetworkBearerSelectionObject {
39318 readonly attribute <ref>NetworkBearerSelection</ref> networkbearerselection;
39322 Defines what is instantiated the Tizen object from the Tizen Platform.
39326 There is a <em>tizen.networkbearerselection </em>object that allows accessing the functionality of the Networkbearerselection API.
39333 <ExtendedAttributeList>
39334 <ExtendedAttribute name="NoInterfaceObject">
39335 <webidl>NoInterfaceObject</webidl>
39336 </ExtendedAttribute>
39337 </ExtendedAttributeList>
39338 <Attribute readonly="readonly" name="networkbearerselection" id="::NetworkBearerSelection::NetworkBearerSelectionObject::networkbearerselection">
39339 <webidl> readonly attribute <ref>NetworkBearerSelection</ref> networkbearerselection;</webidl>
39340 <Type name="NetworkBearerSelection"/>
39343 <Implements name1="Tizen" name2="NetworkBearerSelectionObject">
39344 <webidl> <ref>Tizen</ref> implements <ref>NetworkBearerSelectionObject</ref>;</webidl>
39346 <Interface name="NetworkBearerSelection" id="::NetworkBearerSelection::NetworkBearerSelection">
39347 <webidl> [NoInterfaceObject] interface NetworkBearerSelection {
39349 void requestRouteToHost(<ref>NetworkType</ref> networkType,
39350 DOMString domainName,
39351 <ref>NetworkSuccessCallback</ref> successCallback,
39352 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
39354 void releaseRouteToHost(<ref>NetworkType</ref> networkType,
39355 DOMString domainName,
39356 <ref>SuccessCallback</ref> successCallback,
39357 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
39361 This entry interface provides methods to query the network bearer selection.
39365 This API offers methods for network bearer selection.
39372 <ExtendedAttributeList>
39373 <ExtendedAttribute name="NoInterfaceObject">
39374 <webidl>NoInterfaceObject</webidl>
39375 </ExtendedAttribute>
39376 </ExtendedAttributeList>
39377 <Operation name="requestRouteToHost" id="::NetworkBearerSelection::NetworkBearerSelection::requestRouteToHost">
39378 <webidl> void requestRouteToHost(<ref>NetworkType</ref> networkType,
39379 DOMString domainName,
39380 <ref>NetworkSuccessCallback</ref> successCallback,
39381 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
39384 Requests a specific network connection.
39388 The function must asynchronously acquire success or fail.
39391 When called, it starts a request process defined with these set of steps:
39395 1. Open "networkType" network connection. </li>
39397 2. Resolve "domainName" to IP. </li>
39399 3. Change the routing path bound to domainName's IP to use the specific network type. </li>
39401 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>
39407 <Code> var statuscb = {
39408 onsuccess: function() { console.log("onsuccess func is called"); },
39409 ondisconnected: function() { console.log("ondisconnected func is called"); }
39411 function ecb(e) { console.log("error callback is called : " + e.message + " : " + e.code); }
39412 tizen.networkbearerselection.requestRouteToHost("CELLULAR", "www.tizen.org", statuscb, ecb);
39419 http://tizen.org/privilege/networkbearerselection
39422 <Type type="void"/>
39424 <Argument name="networkType">
39430 <Type name="NetworkType"/>
39432 <Argument name="domainName">
39438 <Type type="DOMString"/>
39440 <Argument name="successCallback">
39443 To be invoked if data network connection is connected or not.
39446 <Type name="NetworkSuccessCallback"/>
39448 <Argument optional="optional" name="errorCallback">
39451 To be invoked if the request is failed.
39454 <Type name="ErrorCallback" nullable="nullable"/>
39458 <RaiseException name="WebAPIException">
39461 with error type NotSupportedError, if this feature is not supported.
39464 with error type SecurityError, if the application does not have the privilege to call this method.
39467 with error type UnknownError, if any other error occurs.
39473 <Operation name="releaseRouteToHost" id="::NetworkBearerSelection::NetworkBearerSelection::releaseRouteToHost">
39474 <webidl> void releaseRouteToHost(<ref>NetworkType</ref> networkType,
39475 DOMString domainName,
39476 <ref>SuccessCallback</ref> successCallback,
39477 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
39480 Releases a specific network connection.
39484 The function must asynchronously acquire success or fail.
39487 When called, it closes a network connection.
39493 <Code> function scb() { console.log("success callback is called"); }
39494 function ecb(e) { console.log("error callback is called : " + e.message + " : " + e.code); }
39496 onsuccess: function() {
39497 console.log("onsuccess func is called");
39498 tizen.networkbearerselection.releaseRouteToHost("CELLULAR", "www.google.com", scb, ecb);
39500 ondisconnected: function() { console.log("ondisconnected func is called"); }
39502 tizen.networkbearerselection.requestRouteToHost("CELLULAR", "www.google.com", statuscb, ecb);
39509 http://tizen.org/privilege/networkbearerselection
39512 <Type type="void"/>
39514 <Argument name="networkType">
39520 <Type name="NetworkType"/>
39522 <Argument name="domainName">
39528 <Type type="DOMString"/>
39530 <Argument name="successCallback">
39533 To be invoked if data network connection is released.
39536 <Type name="SuccessCallback"/>
39538 <Argument optional="optional" name="errorCallback">
39541 To be invoked if the release is failed.
39544 <Type name="ErrorCallback" nullable="nullable"/>
39548 <RaiseException name="WebAPIException">
39551 with error type NotSupportedError, if this feature is not supported.
39554 with error type SecurityError, if the application does not have the privilege to call this method.
39557 with error type UnknownError, if any other error occurs.
39564 <Interface name="NetworkSuccessCallback" id="::NetworkBearerSelection::NetworkSuccessCallback">
39565 <webidl> [Callback, NoInterfaceObject] interface NetworkSuccessCallback {
39568 void ondisconnected();
39572 This interface provides a success callback specific to NetworkBearerSelection.
39576 It is used in asynchronous operations with requestRouteToHost().
39583 <ExtendedAttributeList>
39584 <ExtendedAttribute name="Callback">
39585 <webidl>Callback</webidl>
39586 </ExtendedAttribute>
39587 <ExtendedAttribute name="NoInterfaceObject">
39588 <webidl> NoInterfaceObject</webidl>
39589 </ExtendedAttribute>
39590 </ExtendedAttributeList>
39591 <Operation name="onsuccess" id="::NetworkBearerSelection::NetworkSuccessCallback::onsuccess">
39592 <webidl> void onsuccess();</webidl>
39595 Called when a network is connected successfully.
39601 <Type type="void"/>
39604 <Operation name="ondisconnected" id="::NetworkBearerSelection::NetworkSuccessCallback::ondisconnected">
39605 <webidl> void ondisconnected();</webidl>
39608 Called when a network is disconnected.
39614 <Type type="void"/>
39619 <Module name="NFC" id="::NFC">
39620 <webidl>module NFC {
39621 enum NDEFRecordTextEncoding { "UTF8", "UTF16" };
39623 enum NFCTagType { "GENERIC_TARGET", "ISO14443_A", "ISO14443_4A", "ISO14443_3A",
39624 "MIFARE_MINI", "MIFARE_1K", "MIFARE_4K", "MIFARE_ULTRA", "MIFARE_DESFIRE",
39625 "ISO14443_B", "ISO14443_4B", "ISO14443_BPRIME", "FELICA", "JEWEL", "ISO15693",
39626 "UNKNOWN_TARGET" };
39628 [NoInterfaceObject] interface NFCManagerObject {
39629 readonly attribute <ref>NFCManager</ref> nfc;
39631 <ref>Tizen</ref> implements <ref>NFCManagerObject</ref>;
39633 [NoInterfaceObject] interface NFCManager {
39634 const short NFC_RECORD_TNF_EMPTY = 0;
39635 const short NFC_RECORD_TNF_WELL_KNOWN = 1;
39636 const short NFC_RECORD_TNF_MIME_MEDIA = 2;
39637 const short NFC_RECORD_TNF_URI = 3;
39638 const short NFC_RECORD_TNF_EXTERNAL_RTD = 4;
39639 const short NFC_RECORD_TNF_UNKNOWN = 5;
39640 const short NFC_RECORD_TNF_UNCHANGED = 6;
39642 <ref>NFCAdapter</ref> getDefaultAdapter() raises(<ref>WebAPIException</ref>);
39644 void setExclusiveMode(boolean mode) raises(<ref>WebAPIException</ref>);
39648 [NoInterfaceObject] interface NFCAdapter {
39649 readonly attribute boolean powered ;
39652 void setPowered(boolean state,
39653 optional <ref>SuccessCallback</ref>? successCallback,
39654 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
39657 void setTagListener(<ref>NFCTagDetectCallback</ref> detectCallback,
39658 optional <ref>NFCTagType</ref>[]? tagFilter) raises(<ref>WebAPIException</ref>);
39660 void setPeerListener(<ref>NFCPeerDetectCallback</ref> detectCallback) raises(<ref>WebAPIException</ref>);
39662 void unsetTagListener() raises(<ref>WebAPIException</ref>);
39664 void unsetPeerListener() raises(<ref>WebAPIException</ref>);
39666 <ref>NDEFMessage</ref>? getCachedMessage() raises(<ref>WebAPIException</ref>);
39671 [NoInterfaceObject] interface NFCTag {
39672 readonly attribute <ref>NFCTagType</ref> type;
39674 readonly attribute boolean isSupportedNDEF;
39676 readonly attribute long ndefSize;
39678 readonly attribute object properties;
39680 readonly attribute boolean isConnected;
39683 void readNDEF(<ref>NDEFMessageReadCallback</ref> readCallback,
39684 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
39686 void writeNDEF(<ref>NDEFMessage</ref> ndefMessage,
39687 optional <ref>SuccessCallback</ref>? successCallback,
39688 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
39690 void transceive(byte[] data,
39691 <ref>ByteArraySuccessCallback</ref> dataCallback,
39692 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
39696 [NoInterfaceObject] interface NFCPeer {
39697 readonly attribute boolean isConnected;
39699 void setReceiveNDEFListener(<ref>NDEFMessageReadCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);
39701 void unsetReceiveNDEFListener() raises(<ref>WebAPIException</ref>);
39703 void sendNDEF(<ref>NDEFMessage</ref> ndefMessage,
39704 optional <ref>SuccessCallback</ref>? successCallback,
39705 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
39710 Constructor(<ref>NDEFRecord</ref>[] ndefRecords),
39711 Constructor(byte[] rawData)]
39712 interface NDEFMessage {
39713 readonly attribute long recordCount;
39715 attribute <ref>NDEFRecord</ref>[] records;
39717 byte[] toByte() raises(<ref>WebAPIException</ref>);
39720 [Constructor(short tnf, byte[] type, byte[] payload, optional byte[]? id),
39721 Constructor(byte[] raw_data)]
39722 interface NDEFRecord {
39723 readonly attribute short tnf;
39725 readonly attribute byte[] type;
39727 readonly attribute byte[] id;
39729 readonly attribute byte[] payload;
39732 [Constructor(DOMString text, DOMString languageCode, optional DOMString? encoding)]
39733 interface NDEFRecordText : <ref>NDEFRecord</ref> {
39734 readonly attribute DOMString text;
39736 readonly attribute DOMString languageCode;
39738 readonly attribute <ref>NDEFRecordTextEncoding</ref> encoding;
39741 [Constructor(DOMString uri)]
39742 interface NDEFRecordURI : <ref>NDEFRecord</ref> {
39743 readonly attribute DOMString uri;
39745 [Constructor(DOMString mimeType, byte[] data)]
39746 interface NDEFRecordMedia : <ref>NDEFRecord</ref> {
39747 readonly attribute DOMString mimeType;
39751 [Callback, NoInterfaceObject] interface NFCTagDetectCallback {
39752 void onattach(<ref>NFCTag</ref> nfcTag);
39756 [Callback, NoInterfaceObject] interface NFCPeerDetectCallback {
39757 void onattach(<ref>NFCPeer</ref> nfcPeer);
39761 [Callback=FunctionOnly, NoInterfaceObject] interface NDEFMessageReadCallback {
39762 void onsuccess(<ref>NDEFMessage</ref> ndefMessage);
39765 [Callback=FunctionOnly, NoInterfaceObject] interface ByteArraySuccessCallback {
39766 void onsuccess(byte[] data);
39772 This interface specifies a protocol for simple wireless interconnection of
39773 closely coupled devices operating at 13.56 MHz using Near Field Communication (NFC),
39774 which is an international standard (ISO/IEC 18092).
39775 To know more, see <a href="http://www.nfc-forum.org/specs/spec_list/">Technical Specifications</a>.
39779 There are three groups of application scenarios for NFC:
39783 Exchanging some digital information or data by holding a device close to a wireless tag. </li>
39785 Exchanging some information or data between two devices by holding them close to each other. </li>
39787 Making payments by holding mobile phones close to point of sales terminals instead of swiping smart cards. </li>
39790 For more information on the NFC features, see <a href="../../org.tizen.web.appprogramming/html/guide/communication_guide/nfc.htm">NFC Guide</a>.
39796 <def-api-feature identifier="http://tizen.org/feature/network.nfc">
39800 To guarantee this application running on a device with NFC feature, define below in the config file:
39806 <Enum name="NDEFRecordTextEncoding" id="::NFC::NDEFRecordTextEncoding">
39807 <webidl> enum NDEFRecordTextEncoding { "UTF8", "UTF16" };</webidl>
39810 An enumerator that defines an encoding format for an NDEF record text.
39816 <EnumValue stringvalue="UTF8">
39817 <webidl> "UTF8</webidl>
39819 <EnumValue stringvalue="UTF16">
39820 <webidl> "UTF16</webidl>
39823 <Enum name="NFCTagType" id="::NFC::NFCTagType">
39824 <webidl> enum NFCTagType { "GENERIC_TARGET", "ISO14443_A", "ISO14443_4A", "ISO14443_3A",
39825 "MIFARE_MINI", "MIFARE_1K", "MIFARE_4K", "MIFARE_ULTRA", "MIFARE_DESFIRE",
39826 "ISO14443_B", "ISO14443_4B", "ISO14443_BPRIME", "FELICA", "JEWEL", "ISO15693",
39827 "UNKNOWN_TARGET" };</webidl>
39830 An enumerator that defines the type of NFC tag.
39834 The following values are supported:
39838 GENERIC_TARGET </li>
39854 MIFARE_DESFIRE </li>
39860 ISO14443_BPRIME </li>
39868 UNKNOWN_TARGET </li>
39875 <EnumValue stringvalue="GENERIC_TARGET">
39876 <webidl> "GENERIC_TARGET</webidl>
39878 <EnumValue stringvalue="ISO14443_A">
39879 <webidl> "ISO14443_A</webidl>
39881 <EnumValue stringvalue="ISO14443_4A">
39882 <webidl> "ISO14443_4A</webidl>
39884 <EnumValue stringvalue="ISO14443_3A">
39885 <webidl> "ISO14443_3A</webidl>
39887 <EnumValue stringvalue="MIFARE_MINI">
39888 <webidl> "MIFARE_MINI</webidl>
39890 <EnumValue stringvalue="MIFARE_1K">
39891 <webidl> "MIFARE_1K</webidl>
39893 <EnumValue stringvalue="MIFARE_4K">
39894 <webidl> "MIFARE_4K</webidl>
39896 <EnumValue stringvalue="MIFARE_ULTRA">
39897 <webidl> "MIFARE_ULTRA</webidl>
39899 <EnumValue stringvalue="MIFARE_DESFIRE">
39900 <webidl> "MIFARE_DESFIRE</webidl>
39902 <EnumValue stringvalue="ISO14443_B">
39903 <webidl> "ISO14443_B</webidl>
39905 <EnumValue stringvalue="ISO14443_4B">
39906 <webidl> "ISO14443_4B</webidl>
39908 <EnumValue stringvalue="ISO14443_BPRIME">
39909 <webidl> "ISO14443_BPRIME</webidl>
39911 <EnumValue stringvalue="FELICA">
39912 <webidl> "FELICA</webidl>
39914 <EnumValue stringvalue="JEWEL">
39915 <webidl> "JEWEL</webidl>
39917 <EnumValue stringvalue="ISO15693">
39918 <webidl> "ISO15693</webidl>
39920 <EnumValue stringvalue="UNKNOWN_TARGET">
39921 <webidl> "UNKNOWN_TARGET</webidl>
39924 <Interface name="NFCManagerObject" id="::NFC::NFCManagerObject">
39925 <webidl> [NoInterfaceObject] interface NFCManagerObject {
39926 readonly attribute <ref>NFCManager</ref> nfc;
39930 This interface defines what is instantiated by the <em>Tizen</em> object from the Tizen Platform.
39931 There will be a <em>tizen.nfc </em>object that allows access to the functionality of the NFC API.
39937 <ExtendedAttributeList>
39938 <ExtendedAttribute name="NoInterfaceObject">
39939 <webidl>NoInterfaceObject</webidl>
39940 </ExtendedAttribute>
39941 </ExtendedAttributeList>
39942 <Attribute readonly="readonly" name="nfc" id="::NFC::NFCManagerObject::nfc">
39943 <webidl> readonly attribute <ref>NFCManager</ref> nfc;</webidl>
39944 <Type name="NFCManager"/>
39947 <Implements name1="Tizen" name2="NFCManagerObject">
39948 <webidl> <ref>Tizen</ref> implements <ref>NFCManagerObject</ref>;</webidl>
39950 <Interface name="NFCManager" id="::NFC::NFCManager">
39951 <webidl> [NoInterfaceObject] interface NFCManager {
39952 const short NFC_RECORD_TNF_EMPTY = 0;
39953 const short NFC_RECORD_TNF_WELL_KNOWN = 1;
39954 const short NFC_RECORD_TNF_MIME_MEDIA = 2;
39955 const short NFC_RECORD_TNF_URI = 3;
39956 const short NFC_RECORD_TNF_EXTERNAL_RTD = 4;
39957 const short NFC_RECORD_TNF_UNKNOWN = 5;
39958 const short NFC_RECORD_TNF_UNCHANGED = 6;
39960 <ref>NFCAdapter</ref> getDefaultAdapter() raises(<ref>WebAPIException</ref>);
39962 void setExclusiveMode(boolean mode) raises(<ref>WebAPIException</ref>);
39966 Accesses to the NFC tag/target.
39970 It provides access to the API functionalities through the tizen.nfc interface.
39977 <ExtendedAttributeList>
39978 <ExtendedAttribute name="NoInterfaceObject">
39979 <webidl>NoInterfaceObject</webidl>
39980 </ExtendedAttribute>
39981 </ExtendedAttributeList>
39982 <Const name="NFC_RECORD_TNF_EMPTY" value="0" id="::NFC::NFCManager::NFC_RECORD_TNF_EMPTY">
39983 <webidl> const short NFC_RECORD_TNF_EMPTY = 0;</webidl>
39986 A constant to indicate empty format of NDEF record's type field.
39992 <Type type="short"/>
39994 <Const name="NFC_RECORD_TNF_WELL_KNOWN" value="1" id="::NFC::NFCManager::NFC_RECORD_TNF_WELL_KNOWN">
39995 <webidl> const short NFC_RECORD_TNF_WELL_KNOWN = 1;</webidl>
39998 A constant to indicate Record Type Definition (RTD) format of NDEF record's type field.
40004 <Type type="short"/>
40006 <Const name="NFC_RECORD_TNF_MIME_MEDIA" value="2" id="::NFC::NFCManager::NFC_RECORD_TNF_MIME_MEDIA">
40007 <webidl> const short NFC_RECORD_TNF_MIME_MEDIA = 2;</webidl>
40010 A constant to indicate MIME media types format in RFC 2046 [RFC 2046] of NDEF record's type field.
40016 <Type type="short"/>
40018 <Const name="NFC_RECORD_TNF_URI" value="3" id="::NFC::NFCManager::NFC_RECORD_TNF_URI">
40019 <webidl> const short NFC_RECORD_TNF_URI = 3;</webidl>
40022 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.
40028 <Type type="short"/>
40030 <Const name="NFC_RECORD_TNF_EXTERNAL_RTD" value="4" id="::NFC::NFCManager::NFC_RECORD_TNF_EXTERNAL_RTD">
40031 <webidl> const short NFC_RECORD_TNF_EXTERNAL_RTD = 4;</webidl>
40034 A constant to indicate NFC forum external type [NFC RTD] format in RFC 2046 [RFC 2046] of NDEF record's type field.
40040 <Type type="short"/>
40042 <Const name="NFC_RECORD_TNF_UNKNOWN" value="5" id="::NFC::NFCManager::NFC_RECORD_TNF_UNKNOWN">
40043 <webidl> const short NFC_RECORD_TNF_UNKNOWN = 5;</webidl>
40046 A constant to indicate unknown type format in RFC 2046 [RFC 2046] of NDEF record's type field.
40052 <Type type="short"/>
40054 <Const name="NFC_RECORD_TNF_UNCHANGED" value="6" id="::NFC::NFCManager::NFC_RECORD_TNF_UNCHANGED">
40055 <webidl> const short NFC_RECORD_TNF_UNCHANGED = 6;</webidl>
40058 A constant to indicate whether the payload is an intermediate or final chunk of a chunked NDEF record.
40064 <Type type="short"/>
40066 <Operation name="getDefaultAdapter" id="::NFC::NFCManager::getDefaultAdapter">
40067 <webidl> <ref>NFCAdapter</ref> getDefaultAdapter() raises(<ref>WebAPIException</ref>);</webidl>
40070 Gets the default NFC adapter of the device.
40076 http://tizen.org/privilege/nfc.common
40082 var adapter = tizen.nfc.getDefaultAdapter() ;
40084 console.log (err.name +": " + err.message);
40088 <Type name="NFCAdapter">
40091 NFCAdapter The default NFCAdapter object.
40097 <RaiseException name="WebAPIException">
40100 with error type SecurityError, if the application does not have the privilege to call this method.
40103 with error type UnknownError in any other error case.
40109 <Operation name="setExclusiveMode" id="::NFC::NFCManager::setExclusiveMode">
40110 <webidl> void setExclusiveMode(boolean mode) raises(<ref>WebAPIException</ref>);</webidl>
40113 Gives priority to the current application for NFC operations over other applications when it is in the foreground.
40117 If the current application has the priority and is on the foreground, the system stops sending
40118 application control requests that are used to pick an application to handle a request about NFC.
40119 Such a request is usually sent, for example, when detecting an NFC tag or receiving an NDEF message
40120 from a connected NFC peer-to-peer target.
40123 When the current application moves to the background, it loses the priority.
40126 The exclusive mode can only be set when NFC is on. If NFC is off, the mode is ignored.
40133 http://tizen.org/privilege/nfc.common
40139 tizen.nfc.setExclusiveMode(true) ;
40141 console.log (err.name + ": " + err.message);
40145 <Type type="void"/>
40147 <Argument name="mode">
40150 The value of exclusive mode.
40153 <Type type="boolean"/>
40157 <RaiseException name="WebAPIException">
40160 with error type SecurityError, if the application does not have the privilege to call this method.
40163 with error type UnknownError in any other error case.
40170 <Interface name="NFCAdapter" id="::NFC::NFCAdapter">
40171 <webidl> [NoInterfaceObject] interface NFCAdapter {
40172 readonly attribute boolean powered ;
40175 void setPowered(boolean state,
40176 optional <ref>SuccessCallback</ref>? successCallback,
40177 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
40180 void setTagListener(<ref>NFCTagDetectCallback</ref> detectCallback,
40181 optional <ref>NFCTagType</ref>[]? tagFilter) raises(<ref>WebAPIException</ref>);
40183 void setPeerListener(<ref>NFCPeerDetectCallback</ref> detectCallback) raises(<ref>WebAPIException</ref>);
40185 void unsetTagListener() raises(<ref>WebAPIException</ref>);
40187 void unsetPeerListener() raises(<ref>WebAPIException</ref>);
40189 <ref>NDEFMessage</ref>? getCachedMessage() raises(<ref>WebAPIException</ref>);
40194 This interface provides access to control the adapter by offering methods to control local NFC behaviors, such as turning on/off an adapter.
40200 <ExtendedAttributeList>
40201 <ExtendedAttribute name="NoInterfaceObject">
40202 <webidl>NoInterfaceObject</webidl>
40203 </ExtendedAttribute>
40204 </ExtendedAttributeList>
40205 <Attribute readonly="readonly" name="powered" id="::NFC::NFCAdapter::powered">
40206 <webidl> readonly attribute boolean powered ;</webidl>
40209 The state of the NFC adapter.
40215 <Type type="boolean"/>
40217 <Operation name="setPowered" id="::NFC::NFCAdapter::setPowered">
40218 <webidl> void setPowered(boolean state,
40219 optional <ref>SuccessCallback</ref>? successCallback,
40220 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
40223 Sets the power of an NFC adapter to either a on state or a off state.
40227 The ErrorCallback is launched with these error types:
40231 ServiceNotAvailableError - If the NFC device is busy. </li>
40233 UnknownError - If any other error occurs. </li>
40240 http://tizen.org/privilege/nfc.admin
40245 <Code> var gNfcAdapter;
40246 var onPowerOn = function(){ // Called when NFC adapter is powered on
40248 console.log("Power on succeed");
40249 // Implement NFC communication routines ...
40250 gNfcAdapter.setPowered(
40251 false, // Disable NFC adapter
40252 function () {console.log("Power off succeed"); }, // Handle success
40253 function () {console.log("Power off failed"); }); // Handle failure
40255 console.log (err.name + ": " + err.message);
40259 gNfcAdapter = tizen.nfc.getDefaultAdapter();
40260 if (!gNfcAdapter.powered) {
40261 gNfcAdapter.setPowered(
40262 true, // Enable NFC adapter
40263 onPowerOn, // Handle succes
40264 function () {console.log("Power on failed")}); // Handle failure
40269 console.log (err.name + ": " + err.message);
40273 <Type type="void"/>
40275 <Argument name="state">
40278 The state of NFC adapter, <var>true</var> means on, <var>false</var> means off
40281 <Type type="boolean"/>
40283 <Argument optional="optional" name="successCallback">
40286 The method to call when NFC adapter is
40287 enabled or disabled successfully.
40290 <Type name="SuccessCallback" nullable="nullable"/>
40292 <Argument optional="optional" name="errorCallback">
40295 The method to call when an error occurs.
40298 <Type name="ErrorCallback" nullable="nullable"/>
40302 <RaiseException name="WebAPIException">
40305 with error type TypeMismatchError, if the input parameter
40306 is not compatible with the expected type for that parameter.
40309 with error type SecurityError, if this functionality is not allowed
40315 <Operation name="setTagListener" id="::NFC::NFCAdapter::setTagListener">
40316 <webidl> void setTagListener(<ref>NFCTagDetectCallback</ref> detectCallback,
40317 optional <ref>NFCTagType</ref>[]? tagFilter) raises(<ref>WebAPIException</ref>);</webidl>
40320 Registers a callback function to invoke when an NFC tag is detected.
40324 If the registration completes successfully, the detectCallback must be
40325 invoked when NFC tag is detected.
40328 If no tagFilter is passed, it shall consider the default tagFilter, that is to set all tag types.
40335 http://tizen.org/privilege/nfc.tag
40340 <Code> var adapter = tizen.nfc.getDefaultAdapter();
40341 var onSuccessCB = {onattach : function(nfcTag) {
40342 console.log("NFC Tag's type is " + nfcTag.type);
40343 }, ondetach : function() {
40344 console.log("NFC Tag is detached");
40346 adapter.setTagListener(onSuccessCB);
40349 <Type type="void"/>
40351 <Argument name="detectCallback">
40354 The method to invoke when a NFC tag is successfully detected.
40357 <Type name="NFCTagDetectCallback"/>
40359 <Argument optional="optional" name="tagFilter">
40362 A filter to be used when specific NFC tag is detected.
40365 <Type type="array" nullable="nullable">
40366 <Type name="NFCTagType"/>
40371 <RaiseException name="WebAPIException">
40374 with error type TypeMismatchError, if the input parameter
40375 is not compatible with the expected type for that parameter.
40378 with error type SecurityError, if the application does not have the privilege to call this method.
40381 with error type ServiceNotAvailableError, if the NFC service is not available.
40384 with error type UnknownError in any other error case.
40390 <Operation name="setPeerListener" id="::NFC::NFCAdapter::setPeerListener">
40391 <webidl> void setPeerListener(<ref>NFCPeerDetectCallback</ref> detectCallback) raises(<ref>WebAPIException</ref>);</webidl>
40394 Registers a callback function to be invoked when NFC peer-to-peer target is detected.
40398 If the registration completes successfully, the detectCallback must be
40399 invoked when NFC peer-to-peer target is detected.
40406 http://tizen.org/privilege/nfc.p2p
40411 <Code> var adapter = tizen.nfc.getDefaultAdapter();
40412 var onSuccessCB = {onattach : function(nfcPeer) {
40413 console.log("NFC Target is detected");
40414 }, ondetach : function() {
40415 console.log("NFC Target is detached");
40417 adapter.setPeerListener(onSuccessCB);
40420 <Type type="void"/>
40422 <Argument name="detectCallback">
40425 The method to invoke when a NFC peer-to-peer target is successfully detected.
40428 <Type name="NFCPeerDetectCallback"/>
40432 <RaiseException name="WebAPIException">
40435 with error type TypeMismatchError, if the input parameter
40436 is not compatible with the expected type for that parameter.
40439 with error type SecurityError, if the application does not have the privilege to call this method.
40442 with error type ServiceNotAvailableError, if the NFC service is not available.
40445 with error type UnknownError in any other error case.
40451 <Operation name="unsetTagListener" id="::NFC::NFCAdapter::unsetTagListener">
40452 <webidl> void unsetTagListener() raises(<ref>WebAPIException</ref>);</webidl>
40455 Unregisters the listener for detecting an NFC tag.
40461 http://tizen.org/privilege/nfc.tag
40466 <Code> var adapter = tizen.nfc.getDefaultAdapter();
40469 var onSuccessCB = {onattach : function(nfcTag) {
40470 console.log("NFC Tag's type is " + nfcTag.type);
40471 }, ondetach : function() {
40472 console.log("NFC Tag is detached");
40475 // Unregister the listener
40476 function unsetListen() {
40477 adapter.unsetTagListener();
40480 // Registers to be notified when NFC tag is detected.
40481 adapter.setTagListener(onSuccessCB)
40484 <Type type="void"/>
40487 <RaiseException name="WebAPIException">
40490 with error type SecurityError, if the application does not have the privilege to call this method.
40493 with error type ServiceNotAvailableError, if the NFC service is not available.
40496 with error type UnknownError in any other error case.
40502 <Operation name="unsetPeerListener" id="::NFC::NFCAdapter::unsetPeerListener">
40503 <webidl> void unsetPeerListener() raises(<ref>WebAPIException</ref>);</webidl>
40506 Unregisters the listener for detecting an NFC peer-to-peer target.
40512 http://tizen.org/privilege/nfc.p2p
40517 <Code> var adapter = tizen.nfc.getDefaultAdapter();
40519 // Receives an NFC peer.
40520 var onSuccessCB = {onattach : function(nfcPeer) {
40521 console.log("NFC Target is detected");
40522 }, ondetach : function() {
40523 console.log("NFC Target is detached");
40526 // Unregisters the listener.
40527 function unsetListen() {
40528 adapter.unsetPeerListener();
40531 // Registers to be notified when NFC peer-to-peer target is detected.
40532 adapter.setPeerListener(onSuccessCB)
40535 <Type type="void"/>
40538 <RaiseException name="WebAPIException">
40541 with error type SecurityError, if the application does not have the privilege to call this method.
40544 with error type ServiceNotAvailableError, if the NFC service is not available.
40547 with error type UnknownError in any other error case.
40553 <Operation name="getCachedMessage" id="::NFC::NFCAdapter::getCachedMessage">
40554 <webidl> <ref>NDEFMessage</ref>? getCachedMessage() raises(<ref>WebAPIException</ref>);</webidl>
40557 Gets the NDEF message cached when the tag is detected.
40561 If the operation completes successfully, the NDEF Message that was last read
40562 should be returned.
40569 http://tizen.org/privilege/nfc.common
40574 <Code> // Gets the cached message
40575 var cachedMessage = tizen.nfc.getDefaultAdapter().getCachedMessage();
40578 <Type name="NDEFMessage" nullable="nullable">
40581 The NDEF Message that was last read.
40587 <RaiseException name="WebAPIException">
40590 with error type SecurityError, if the application does not have the privilege to call this method.
40593 with error type UnknownError in any other error case.
40600 <Interface name="NFCTag" id="::NFC::NFCTag">
40601 <webidl> [NoInterfaceObject] interface NFCTag {
40602 readonly attribute <ref>NFCTagType</ref> type;
40604 readonly attribute boolean isSupportedNDEF;
40606 readonly attribute long ndefSize;
40608 readonly attribute object properties;
40610 readonly attribute boolean isConnected;
40613 void readNDEF(<ref>NDEFMessageReadCallback</ref> readCallback,
40614 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
40616 void writeNDEF(<ref>NDEFMessage</ref> ndefMessage,
40617 optional <ref>SuccessCallback</ref>? successCallback,
40618 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
40620 void transceive(byte[] data,
40621 <ref>ByteArraySuccessCallback</ref> dataCallback,
40622 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
40626 This interface provides accesses to the NFC tag.
40632 <ExtendedAttributeList>
40633 <ExtendedAttribute name="NoInterfaceObject">
40634 <webidl>NoInterfaceObject</webidl>
40635 </ExtendedAttribute>
40636 </ExtendedAttributeList>
40637 <Attribute readonly="readonly" name="type" id="::NFC::NFCTag::type">
40638 <webidl> readonly attribute <ref>NFCTagType</ref> type;</webidl>
40641 The type of the NFC tag.
40647 <Type name="NFCTagType"/>
40649 <Attribute readonly="readonly" name="isSupportedNDEF" id="::NFC::NFCTag::isSupportedNDEF">
40650 <webidl> readonly attribute boolean isSupportedNDEF;</webidl>
40653 An attribute to check if the NFC Tag supports NDEF format.
40659 <Type type="boolean"/>
40661 <Attribute readonly="readonly" name="ndefSize" id="::NFC::NFCTag::ndefSize">
40662 <webidl> readonly attribute long ndefSize;</webidl>
40665 The size of NDEF message stored in the tag.
40671 <Type type="long"/>
40673 <Attribute readonly="readonly" name="properties" id="::NFC::NFCTag::properties">
40674 <webidl> readonly attribute object properties;</webidl>
40677 The value is all tag information.
40681 It is pairs of key and value.
40682 The array's index is the pair's key and value is its value.
40685 <Code> var adapter = tizen.nfc.getDefaultAdapter();
40686 var onSuccessCB = {onattach : function(nfcTag) {
40687 console.log("NFC Tag's type is " + nfcTag.type);
40688 for(var i in nfcTag.properties) {
40689 console.log("key:" + i + " value:" + nfcTag.properties[i]);
40691 }, ondetach : function() {
40692 console.log("NFC Tag is detached");
40694 adapter.setTagListener(onSuccessCB);
40701 <Type type="object"/>
40703 <Attribute readonly="readonly" name="isConnected" id="::NFC::NFCTag::isConnected">
40704 <webidl> readonly attribute boolean isConnected;</webidl>
40707 The value is necessary to check if this tag is connected.
40713 <Type type="boolean"/>
40715 <Operation name="readNDEF" id="::NFC::NFCTag::readNDEF">
40716 <webidl> void readNDEF(<ref>NDEFMessageReadCallback</ref> readCallback,
40717 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
40720 Reads the NDEF data from the NFC tag.
40724 The ErrorCallback is launched with these error types:
40728 ServiceNotAvailableError - If the NFC service is not available. </li>
40730 UnknownError - If any other error occurs. </li>
40737 http://tizen.org/privilege/nfc.tag
40743 <Type type="void"/>
40745 <Argument name="readCallback">
40748 The method invoked in case of successfully reading the NDEF Data.
40751 <Type name="NDEFMessageReadCallback"/>
40753 <Argument optional="optional" name="errorCallback">
40756 The method invoked in case of any error during reading the NDEF Data.
40759 <Type name="ErrorCallback" nullable="nullable"/>
40763 <RaiseException name="WebAPIException">
40766 with error type TypeMismatchError, if the input parameter
40767 is not compatible with the expected type for that parameter.
40770 with error type SecurityError, if the application does not have the privilege to call this method.
40773 with error type NotSupportedError, if current Tag doesn't support NDEF format.
40779 <Operation name="writeNDEF" id="::NFC::NFCTag::writeNDEF">
40780 <webidl> void writeNDEF(<ref>NDEFMessage</ref> ndefMessage,
40781 optional <ref>SuccessCallback</ref>? successCallback,
40782 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
40785 Writes the NDEF data to the NFC tag.
40789 The ErrorCallback is launched with these error types:
40793 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
40795 ServiceNotAvailableError: If the NFC service is not available. </li>
40797 UnknownError: In any other error case. </li>
40804 http://tizen.org/privilege/nfc.tag
40810 <Type type="void"/>
40812 <Argument name="ndefMessage">
40815 The NDEF message to write to NFC tag.
40818 <Type name="NDEFMessage"/>
40820 <Argument optional="optional" name="successCallback">
40823 The method invoked in case of successfully writing the NDEF Data.
40826 <Type name="SuccessCallback" nullable="nullable"/>
40828 <Argument optional="optional" name="errorCallback">
40831 The method invoked in case of any error during writing the NDEF Data.
40834 <Type name="ErrorCallback" nullable="nullable"/>
40838 <RaiseException name="WebAPIException">
40841 with error type TypeMismatchError, if the input parameter
40842 is not compatible with the expected type for that parameter.
40845 with error type SecurityError, if the application does not have the privilege to call this method.
40848 with error type NotSupportedError, if current Tag doesn't support NDEF format.
40854 <Operation name="transceive" id="::NFC::NFCTag::transceive">
40855 <webidl> void transceive(byte[] data,
40856 <ref>ByteArraySuccessCallback</ref> dataCallback,
40857 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
40860 Access the raw format card. The transceive function is the only way to access the raw format card (not formatted).
40861 Each tag type requires its own command to access tags.
40862 This API provides low level access of tag operation. (Note that you must know each tag technology.)
40866 The ErrorCallback is launched with these error types:
40870 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
40872 ServiceNotAvailableError - If the NFC service is not available. </li>
40874 UnknownError - If any other error occurs. </li>
40881 http://tizen.org/privilege/nfc.tag
40887 <Type type="void"/>
40889 <Argument name="data">
40892 The raw data to transceive with the NFC tag.
40895 <Type type="array">
40896 <Type type="byte"/>
40899 <Argument name="dataCallback">
40902 Invoked in case of successfully transceiving the raw data.
40905 <Type name="ByteArraySuccessCallback"/>
40907 <Argument optional="optional" name="errorCallback">
40910 Invoked in case of any error during transceiving the NDEF Data.
40913 <Type name="ErrorCallback" nullable="nullable"/>
40917 <RaiseException name="WebAPIException">
40920 with error type TypeMismatchError, if the input parameter
40921 is not compatible with the expected type for that parameter.
40924 with error type SecurityError, if the application does not have the privilege to call this method.
40931 <Interface name="NFCPeer" id="::NFC::NFCPeer">
40932 <webidl> [NoInterfaceObject] interface NFCPeer {
40933 readonly attribute boolean isConnected;
40935 void setReceiveNDEFListener(<ref>NDEFMessageReadCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);
40937 void unsetReceiveNDEFListener() raises(<ref>WebAPIException</ref>);
40939 void sendNDEF(<ref>NDEFMessage</ref> ndefMessage,
40940 optional <ref>SuccessCallback</ref>? successCallback,
40941 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
40946 An interface that provides access to the NFC peer-to-peer target.
40952 <ExtendedAttributeList>
40953 <ExtendedAttribute name="NoInterfaceObject">
40954 <webidl>NoInterfaceObject</webidl>
40955 </ExtendedAttribute>
40956 </ExtendedAttributeList>
40957 <Attribute readonly="readonly" name="isConnected" id="::NFC::NFCPeer::isConnected">
40958 <webidl> readonly attribute boolean isConnected;</webidl>
40961 The value is necessary to check if this NFC peer-to-peer target is connected.
40967 <Type type="boolean"/>
40969 <Operation name="setReceiveNDEFListener" id="::NFC::NFCPeer::setReceiveNDEFListener">
40970 <webidl> void setReceiveNDEFListener(<ref>NDEFMessageReadCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);</webidl>
40973 Registers a callback function to be invoked when an NDEF message is received from the connected NFC peer-to-peer target.
40979 http://tizen.org/privilege/nfc.p2p
40984 <Code> var adapter = tizen.nfc.getDefaultAdapter();
40986 // Receives NFCPeer
40987 var onSuccessCB = {onattach : function(nfcPeer) {
40988 console.log("NFC Target is detected");
40989 nfcPeer.setReceiveNDEFListener(
40991 console.log("Receive message");
40993 }, ondetach : function() {
40994 console.log("NFC Target is detached");
40997 adapter.setPeerListener(onSuccessCB);
41000 <Type type="void"/>
41002 <Argument name="successCallback">
41005 Invoked in case of successful receiving the message.
41008 <Type name="NDEFMessageReadCallback"/>
41012 <RaiseException name="WebAPIException">
41015 with error type TypeMismatchError, if the input parameter
41016 is not compatible with the expected type for that parameter.
41019 with error type SecurityError, if the application does not have the privilege to call this method.
41022 with error type ServiceNotAvailableError, if the NFC service is not available.
41025 with error type UnknownError in any other error case.
41031 <Operation name="unsetReceiveNDEFListener" id="::NFC::NFCPeer::unsetReceiveNDEFListener">
41032 <webidl> void unsetReceiveNDEFListener() raises(<ref>WebAPIException</ref>);</webidl>
41035 Unregisters the listener for receiving NDEF messages from the NFC peer-to-peer target connected.
41041 http://tizen.org/privilege/nfc.p2p
41046 <Code> var adapter = tizen.nfc.getDefaultAdapter();
41047 var onSuccessCB = {onattach : function(nfcPeer) {
41048 console.log("NFC Target is detected");
41049 nfcPeer.setReceiveNDEFListener(
41051 console.log("Receive message");
41052 nfcPeer.unsetReceiveNDEFListener();
41054 }, ondetach : function() {
41055 console.log("NFC Target is detached");
41059 adapter.setPeerListener(onSuccessCB);
41062 <Type type="void"/>
41065 <RaiseException name="WebAPIException">
41068 with error type SecurityError, if the application does not have the privilege to call this method.
41071 with error type ServiceNotAvailableError, if the NFC service is not available.
41074 with error type UnknownError in any other error case.
41080 <Operation name="sendNDEF" id="::NFC::NFCPeer::sendNDEF">
41081 <webidl> void sendNDEF(<ref>NDEFMessage</ref> ndefMessage,
41082 optional <ref>SuccessCallback</ref>? successCallback,
41083 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
41086 Sends data to the NFC peer-to-peer target.
41090 The ErrorCallback is launched with these error types:
41094 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
41096 ServiceNotAvailableError: If the NFC service is not available. </li>
41098 UnknownError: In any other error case. </li>
41105 http://tizen.org/privilege/nfc.p2p
41111 <Type type="void"/>
41113 <Argument name="ndefMessage">
41116 The NDEF message to send to NFC peer-to-peer target.
41119 <Type name="NDEFMessage"/>
41121 <Argument optional="optional" name="successCallback">
41124 Invoked in case of successfully sending data to NFC peer-to-peer target.
41127 <Type name="SuccessCallback" nullable="nullable"/>
41129 <Argument optional="optional" name="errorCallback">
41132 Invoked in case of any error during sending.
41135 <Type name="ErrorCallback" nullable="nullable"/>
41139 <RaiseException name="WebAPIException">
41142 with error type TypeMismatchError, if the input parameter
41143 is not compatible with the expected type for that parameter.
41146 with error type SecurityError, if the application does not have the privilege to call this method.
41153 <Interface name="NDEFMessage" id="::NFC::NDEFMessage">
41154 <webidl> [Constructor(),
41155 Constructor(<ref>NDEFRecord</ref>[] ndefRecords),
41156 Constructor(byte[] rawData)]
41157 interface NDEFMessage {
41158 readonly attribute long recordCount;
41160 attribute <ref>NDEFRecord</ref>[] records;
41162 byte[] toByte() raises(<ref>WebAPIException</ref>);
41166 The NDEFMessage interface. An NDEFmessage is composed of multiple NDEFRecords.
41167 The NDEFMessage must have at least one NDEFRecord.
41173 <ExtendedAttributeList>
41174 <ExtendedAttribute name="Constructor">
41175 <webidl>Constructor()</webidl>
41177 </ExtendedAttribute>
41178 <ExtendedAttribute name="Constructor">
41179 <webidl> Constructor(<ref>NDEFRecord</ref>[] ndefRecords)</webidl>
41181 <Argument name="ndefRecords">
41182 <Type type="array">
41183 <Type name="NDEFRecord"/>
41187 </ExtendedAttribute>
41188 <ExtendedAttribute name="Constructor">
41189 <webidl> Constructor(byte[] rawData)</webidl>
41191 <Argument name="rawData">
41192 <Type type="array">
41193 <Type type="byte"/>
41197 </ExtendedAttribute>
41198 </ExtendedAttributeList>
41199 <Attribute readonly="readonly" name="recordCount" id="::NFC::NDEFMessage::recordCount">
41200 <webidl> readonly attribute long recordCount;</webidl>
41203 The number of records in the NDEFMessage.
41209 <Type type="long"/>
41211 <Attribute name="records" id="::NFC::NDEFMessage::records">
41212 <webidl> attribute <ref>NDEFRecord</ref>[] records;</webidl>
41215 The array of NDEFRecord objects in the NDEFMessage.
41221 <Type type="array">
41222 <Type name="NDEFRecord"/>
41225 <Operation name="toByte" id="::NFC::NDEFMessage::toByte">
41226 <webidl> byte[] toByte() raises(<ref>WebAPIException</ref>);</webidl>
41229 Gets the serial byte array of the NDEF message.
41233 If the operation completes successfully, it returns the serial byte array of the NDEF message.
41239 <Code> // Gets the cached message.
41240 var cachedMessage = tizen.nfc.getDefaultAdapter().getCachedMessage();
41241 var raw = cachedMessage.toByte();
41244 <Type type="array">
41247 byte[] The raw data in the NDEFMessage.
41250 <Type type="byte"/>
41254 <RaiseException name="WebAPIException">
41257 with error type TypeMismatchError, if the records whose type is not NDEFRecord are included in the NDEFMessage.
41260 with error type UnknownError in any other error case.
41267 <Interface name="NDEFRecord" id="::NFC::NDEFRecord">
41268 <webidl> [Constructor(short tnf, byte[] type, byte[] payload, optional byte[]? id),
41269 Constructor(byte[] raw_data)]
41270 interface NDEFRecord {
41271 readonly attribute short tnf;
41273 readonly attribute byte[] type;
41275 readonly attribute byte[] id;
41277 readonly attribute byte[] payload;
41281 The NDEFRecord interface.
41287 <ExtendedAttributeList>
41288 <ExtendedAttribute name="Constructor">
41289 <webidl>Constructor(short tnf, byte[] type, byte[] payload, optional byte[]? id)</webidl>
41291 <Argument name="tnf">
41292 <Type type="short"/>
41294 <Argument name="type">
41295 <Type type="array">
41296 <Type type="byte"/>
41299 <Argument name="payload">
41300 <Type type="array">
41301 <Type type="byte"/>
41304 <Argument optional="optional" name="id">
41305 <Type type="array" nullable="nullable">
41306 <Type type="byte"/>
41310 </ExtendedAttribute>
41311 <ExtendedAttribute name="Constructor">
41312 <webidl> Constructor(byte[] raw_data)</webidl>
41314 <Argument name="raw_data">
41315 <Type type="array">
41316 <Type type="byte"/>
41320 </ExtendedAttribute>
41321 </ExtendedAttributeList>
41322 <Attribute readonly="readonly" name="tnf" id="::NFC::NDEFRecord::tnf">
41323 <webidl> readonly attribute short tnf;</webidl>
41326 The value of the record type (TNF value).
41330 At least the following values must be supported:
41334 NFC_RECORD_TNF_EMPTY - The record type is empty </li>
41336 NFC_RECORD_TNF_WELL_KNOWN - Record Type Definition (RTD) format [NFC RTD] </li>
41338 NFC_RECORD_TNF_MIME_MEDIA - MIME media types in RFC 2046 [RFC 2046] </li>
41340 NFC_RECORD_TNF_URI - Absolute URI as defined in RFC 3986 [RFC 3986] </li>
41342 NFC_RECORD_TNF_EXTERNAL_RTD - NFC forum external type [NFC RTD] </li>
41344 NFC_RECORD_TNF_UNKNOWN - The payload type is unknown </li>
41346 NFC_RECORD_TNF_UNCHANGED - It means the payload is an intermediate or final chunk of a chunked NDEF record </li>
41353 <Type type="short"/>
41355 <Attribute readonly="readonly" name="type" id="::NFC::NDEFRecord::type">
41356 <webidl> readonly attribute byte[] type;</webidl>
41359 The specified type in byte array.
41363 The byte array contains <var>0</var> to <var>255</var> bytes.
41370 <Type type="array">
41371 <Type type="byte"/>
41374 <Attribute readonly="readonly" name="id" id="::NFC::NDEFRecord::id">
41375 <webidl> readonly attribute byte[] id;</webidl>
41382 The byte array contains <var>0</var> to <var>255</var> bytes.
41385 By default, this attribute is set to an empty array.
41392 <Type type="array">
41393 <Type type="byte"/>
41396 <Attribute readonly="readonly" name="payload" id="::NFC::NDEFRecord::payload">
41397 <webidl> readonly attribute byte[] payload;</webidl>
41400 The record payload.
41404 The byte array contains <var>0</var> to <var>(2 ** 32 - 1)</var> bytes.
41410 <Code> // Creates a new NDEF record.
41411 var newRecord = new tizen.NDEFRecordURI("https://www.tizen.org/");
41412 var payload = newRecord.payload;
41415 <Type type="array">
41416 <Type type="byte"/>
41420 <Interface name="NDEFRecordText" id="::NFC::NDEFRecordText">
41421 <webidl> [Constructor(DOMString text, DOMString languageCode, optional DOMString? encoding)]
41422 interface NDEFRecordText : <ref>NDEFRecord</ref> {
41423 readonly attribute DOMString text;
41425 readonly attribute DOMString languageCode;
41427 readonly attribute <ref>NDEFRecordTextEncoding</ref> encoding;
41431 The NDEFRecord that has the text type payload.
41437 <ExtendedAttributeList>
41438 <ExtendedAttribute name="Constructor">
41439 <webidl>Constructor(DOMString text, DOMString languageCode, optional DOMString? encoding)</webidl>
41441 <Argument name="text">
41442 <Type type="DOMString"/>
41444 <Argument name="languageCode">
41445 <Type type="DOMString"/>
41447 <Argument optional="optional" name="encoding">
41448 <Type type="DOMString" nullable="nullable"/>
41451 </ExtendedAttribute>
41452 </ExtendedAttributeList>
41453 <InterfaceInheritance>
41454 <Name name="NDEFRecord"/>
41455 </InterfaceInheritance>
41456 <Attribute readonly="readonly" name="text" id="::NFC::NDEFRecordText::text">
41457 <webidl> readonly attribute DOMString text;</webidl>
41466 <Type type="DOMString"/>
41468 <Attribute readonly="readonly" name="languageCode" id="::NFC::NDEFRecordText::languageCode">
41469 <webidl> readonly attribute DOMString languageCode;</webidl>
41472 The language code string value, followed by IANA[RFC 3066] (for example, en-US, ko-KR).
41478 <Type type="DOMString"/>
41480 <Attribute readonly="readonly" name="encoding" id="::NFC::NDEFRecordText::encoding">
41481 <webidl> readonly attribute <ref>NDEFRecordTextEncoding</ref> encoding;</webidl>
41484 The encoding type. By default, this attribute is set to UTF8.
41490 <Type name="NDEFRecordTextEncoding"/>
41493 <Interface name="NDEFRecordURI" id="::NFC::NDEFRecordURI">
41494 <webidl> [Constructor(DOMString uri)]
41495 interface NDEFRecordURI : <ref>NDEFRecord</ref> {
41496 readonly attribute DOMString uri;
41500 The NDEFRecord that has URI type payload.
41506 <ExtendedAttributeList>
41507 <ExtendedAttribute name="Constructor">
41508 <webidl>Constructor(DOMString uri)</webidl>
41510 <Argument name="uri">
41511 <Type type="DOMString"/>
41514 </ExtendedAttribute>
41515 </ExtendedAttributeList>
41516 <InterfaceInheritance>
41517 <Name name="NDEFRecord"/>
41518 </InterfaceInheritance>
41519 <Attribute readonly="readonly" name="uri" id="::NFC::NDEFRecordURI::uri">
41520 <webidl> readonly attribute DOMString uri;</webidl>
41523 The URI string that is stored in the payload.
41529 <Type type="DOMString"/>
41532 <Interface name="NDEFRecordMedia" id="::NFC::NDEFRecordMedia">
41533 <webidl> [Constructor(DOMString mimeType, byte[] data)]
41534 interface NDEFRecordMedia : <ref>NDEFRecord</ref> {
41535 readonly attribute DOMString mimeType;
41539 The NDEFRecord that has mime type payload.
41545 <ExtendedAttributeList>
41546 <ExtendedAttribute name="Constructor">
41547 <webidl>Constructor(DOMString mimeType, byte[] data)</webidl>
41552 <b>data</b> : Mime type payload. The byte array contains <var>0</var> to <var>(2 ** 32 - 1)</var> bytes. </li>
41557 <Argument name="mimeType">
41558 <Type type="DOMString"/>
41560 <Argument name="data">
41561 <Type type="array">
41562 <Type type="byte"/>
41566 </ExtendedAttribute>
41567 </ExtendedAttributeList>
41568 <InterfaceInheritance>
41569 <Name name="NDEFRecord"/>
41570 </InterfaceInheritance>
41571 <Attribute readonly="readonly" name="mimeType" id="::NFC::NDEFRecordMedia::mimeType">
41572 <webidl> readonly attribute DOMString mimeType;</webidl>
41575 The mime type [RFC 2046] (for example, text/plain, image/jpeg ).
41581 <Type type="DOMString"/>
41584 <Interface name="NFCTagDetectCallback" id="::NFC::NFCTagDetectCallback">
41585 <webidl> [Callback, NoInterfaceObject] interface NFCTagDetectCallback {
41586 void onattach(<ref>NFCTag</ref> nfcTag);
41591 The success callback to be invoked when an NFC tag is detected or lost.
41595 This callback interface specifies two methods:
41599 onattach: invoked when an NFC tag is detected </li>
41601 ondetach: invoked when the NFC tag is lost </li>
41604 It is used in NFCAdapter.setTagListener().
41611 <ExtendedAttributeList>
41612 <ExtendedAttribute name="Callback">
41613 <webidl>Callback</webidl>
41614 </ExtendedAttribute>
41615 <ExtendedAttribute name="NoInterfaceObject">
41616 <webidl> NoInterfaceObject</webidl>
41617 </ExtendedAttribute>
41618 </ExtendedAttributeList>
41619 <Operation name="onattach" id="::NFC::NFCTagDetectCallback::onattach">
41620 <webidl> void onattach(<ref>NFCTag</ref> nfcTag);</webidl>
41623 The method invoked when a tag is attached.
41629 <Type type="void"/>
41631 <Argument name="nfcTag">
41634 The attached NFC tag.
41637 <Type name="NFCTag"/>
41641 <Operation name="ondetach" id="::NFC::NFCTagDetectCallback::ondetach">
41642 <webidl> void ondetach();</webidl>
41645 The method invoked when the connected tag is detached.
41651 <Type type="void"/>
41655 <Interface name="NFCPeerDetectCallback" id="::NFC::NFCPeerDetectCallback">
41656 <webidl> [Callback, NoInterfaceObject] interface NFCPeerDetectCallback {
41657 void onattach(<ref>NFCPeer</ref> nfcPeer);
41662 The success callback to be invoked when an NFC peer-to-peer target is detected or lost.
41666 This callback interface specifies two methods:
41670 onattach: invoked when an NFC peer-to-peer target is detected </li>
41672 ondetach: invoked when the NFC peer-to-peer target is lost </li>
41675 It is used in NFCAdapter.setPeerListener().
41682 <ExtendedAttributeList>
41683 <ExtendedAttribute name="Callback">
41684 <webidl>Callback</webidl>
41685 </ExtendedAttribute>
41686 <ExtendedAttribute name="NoInterfaceObject">
41687 <webidl> NoInterfaceObject</webidl>
41688 </ExtendedAttribute>
41689 </ExtendedAttributeList>
41690 <Operation name="onattach" id="::NFC::NFCPeerDetectCallback::onattach">
41691 <webidl> void onattach(<ref>NFCPeer</ref> nfcPeer);</webidl>
41694 The method invoked when the NFC peer-to-peer target is attached.
41700 <Type type="void"/>
41702 <Argument name="nfcPeer">
41705 The attached NFC peer-to-peer target.
41708 <Type name="NFCPeer"/>
41712 <Operation name="ondetach" id="::NFC::NFCPeerDetectCallback::ondetach">
41713 <webidl> void ondetach();</webidl>
41716 The method invoked when the NFC peer-to-peer target connected is detached.
41722 <Type type="void"/>
41726 <Interface name="NDEFMessageReadCallback" id="::NFC::NDEFMessageReadCallback">
41727 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface NDEFMessageReadCallback {
41728 void onsuccess(<ref>NDEFMessage</ref> ndefMessage);
41732 The success callback to be invoked when data has been read successfully from the NFC tag or target.
41736 This callback interface specifies a success method with
41737 an NDEF message as an input parameter.
41738 It is used in asynchronous
41739 operations, such as NFCTag.readNDEF() or NFCPeer.setReceiveNDEFListener().
41746 <ExtendedAttributeList>
41747 <ExtendedAttribute name="Callback" value="FunctionOnly">
41748 <webidl>Callback</webidl>
41749 </ExtendedAttribute>
41750 <ExtendedAttribute name="NoInterfaceObject">
41751 <webidl> NoInterfaceObject</webidl>
41752 </ExtendedAttribute>
41753 </ExtendedAttributeList>
41754 <Operation name="onsuccess" id="::NFC::NDEFMessageReadCallback::onsuccess">
41755 <webidl> void onsuccess(<ref>NDEFMessage</ref> ndefMessage);</webidl>
41758 The method invoked when the asynchronous call completes successfully.
41764 <Type type="void"/>
41766 <Argument name="ndefMessage">
41769 NDEF message that is read from the NFC tag or target.
41772 <Type name="NDEFMessage"/>
41777 <Interface name="ByteArraySuccessCallback" id="::NFC::ByteArraySuccessCallback">
41778 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ByteArraySuccessCallback {
41779 void onsuccess(byte[] data);
41783 The success callback to be invoked when NFCTag.transceive() completes successfully.
41787 This callback interface specifies a success method, with
41788 a raw data as an input parameter. It is used in NFCTag.transceive().
41795 <ExtendedAttributeList>
41796 <ExtendedAttribute name="Callback" value="FunctionOnly">
41797 <webidl>Callback</webidl>
41798 </ExtendedAttribute>
41799 <ExtendedAttribute name="NoInterfaceObject">
41800 <webidl> NoInterfaceObject</webidl>
41801 </ExtendedAttribute>
41802 </ExtendedAttributeList>
41803 <Operation name="onsuccess" id="::NFC::ByteArraySuccessCallback::onsuccess">
41804 <webidl> void onsuccess(byte[] data);</webidl>
41807 The method invoked when the asynchronous call completes successfully.
41813 <Type type="void"/>
41815 <Argument name="data">
41818 The raw data that is read from NFC tag or response of transceive operation.
41821 <Type type="array">
41822 <Type type="byte"/>
41829 <Module name="Notification" id="::Notification">
41830 <webidl>module Notification {
41832 typedef DOMString NotificationId;
41834 enum NotificationType { "STATUS" };
41836 enum StatusNotificationType { "SIMPLE", "THUMBNAIL", "ONGOING", "PROGRESS" };
41838 enum NotificationProgressType { "PERCENTAGE", "BYTE" };
41841 [NoInterfaceObject] interface NotificationObject {
41842 readonly attribute <ref>NotificationManager</ref> notification;
41844 <ref>Tizen</ref> implements <ref>NotificationObject</ref>;
41846 [NoInterfaceObject] interface NotificationManager {
41848 void post(<ref>Notification</ref> notification) raises(<ref>WebAPIException</ref>);
41850 void update(<ref>Notification</ref> notification) raises(<ref>WebAPIException</ref>);
41852 void remove(<ref>NotificationId</ref> id) raises(<ref>WebAPIException</ref>);
41854 void removeAll() raises(<ref>WebAPIException</ref>);
41856 <ref>Notification</ref> get(<ref>NotificationId</ref> id) raises(<ref>WebAPIException</ref>);
41858 <ref>Notification</ref>[] getAll() raises(<ref>WebAPIException</ref>);
41863 [NoInterfaceObject] interface Notification {
41866 readonly attribute <ref>NotificationId</ref> id;
41868 readonly attribute <ref>NotificationType</ref> type;
41870 readonly attribute Date postedTime;
41872 attribute DOMString title;
41874 attribute DOMString? content;
41879 dictionary StatusNotificationInit {
41880 DOMString? content;
41881 DOMString? iconPath;
41882 DOMString? soundPath;
41883 boolean? vibration;
41884 <ref>ApplicationControl</ref>? appControl;
41885 <ref>ApplicationId</ref>? appId;
41886 <ref>NotificationProgressType</ref>? progressType;
41887 unsigned long? progressValue;
41889 DOMString? subIconPath;
41890 <ref>NotificationDetailInfo</ref>[]? detailInfo;
41891 DOMString? ledColor;
41892 unsigned long ledOnPeriod;
41893 unsigned long ledOffPeriod;
41894 DOMString? backgroundImagePath;
41895 DOMString[]? thumbnails;
41898 [Constructor(<ref>StatusNotificationType</ref> statusType, DOMString title, optional <ref>StatusNotificationInit</ref>? notificationInitDict)]
41901 interface StatusNotification : <ref>Notification</ref> {
41903 readonly attribute <ref>StatusNotificationType</ref> statusType;
41905 attribute DOMString? iconPath;
41907 attribute DOMString? subIconPath;
41909 attribute long? number;
41911 attribute <ref>NotificationDetailInfo</ref>[]? detailInfo;
41913 attribute DOMString? ledColor;
41915 attribute unsigned long ledOnPeriod;
41917 attribute unsigned long ledOffPeriod;
41919 attribute DOMString? backgroundImagePath;
41921 attribute DOMString[]? thumbnails;
41923 attribute DOMString? soundPath;
41925 attribute boolean vibration;
41927 attribute <ref>ApplicationControl</ref>? appControl;
41929 attribute <ref>ApplicationId</ref>? appId;
41931 attribute <ref>NotificationProgressType</ref> progressType;
41933 attribute unsigned long? progressValue;
41937 [Constructor(DOMString mainText, optional DOMString? subText)]
41938 interface NotificationDetailInfo {
41939 attribute DOMString mainText;
41941 attribute DOMString? subText;
41947 The Notification API provides a way to notify users of events that happen in an application.
41951 For more information on the Notification features, see <a href="../../org.tizen.web.appprogramming/html/guide/ui_guide/notification.htm">Notification Guide</a>.
41958 <Typedef name="NotificationId" id="::Notification::NotificationId">
41959 <webidl> typedef DOMString NotificationId;</webidl>
41968 <Type type="DOMString"/>
41970 <Enum name="NotificationType" id="::Notification::NotificationType">
41971 <webidl> enum NotificationType { "STATUS" };</webidl>
41974 A notification type.
41978 The following notification type is supported:
41982 STATUS - The posted status notification is displayed in status bar and the notification tray.
41983 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>
41990 <EnumValue stringvalue="STATUS">
41991 <webidl> "STATUS</webidl>
41994 <Enum name="StatusNotificationType" id="::Notification::StatusNotificationType">
41995 <webidl> enum StatusNotificationType { "SIMPLE", "THUMBNAIL", "ONGOING", "PROGRESS" };</webidl>
41998 A status notification type.
42002 The following status notification types are supported:
42006 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>
42008 THUMBNAIL - The thumbnail status notification posts a thumbnail-format notification which includes several thumbnail image paths.
42009 The thumbnail status notification is also removed by a user selection.
42012 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>
42014 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>
42021 <EnumValue stringvalue="SIMPLE">
42022 <webidl> "SIMPLE</webidl>
42024 <EnumValue stringvalue="THUMBNAIL">
42025 <webidl> "THUMBNAIL</webidl>
42027 <EnumValue stringvalue="ONGOING">
42028 <webidl> "ONGOING</webidl>
42030 <EnumValue stringvalue="PROGRESS">
42031 <webidl> "PROGRESS</webidl>
42034 <Enum name="NotificationProgressType" id="::Notification::NotificationProgressType">
42035 <webidl> enum NotificationProgressType { "PERCENTAGE", "BYTE" };</webidl>
42038 A notification progress type.
42042 Supporting notification progress types are:
42046 "BYTE" - The progress is indicated in bytes. </li>
42048 "PERCENTAGE" -The progress is indicated in percentage. </li>
42055 <EnumValue stringvalue="PERCENTAGE">
42056 <webidl> "PERCENTAGE</webidl>
42058 <EnumValue stringvalue="BYTE">
42059 <webidl> "BYTE</webidl>
42062 <Interface name="NotificationObject" id="::Notification::NotificationObject">
42063 <webidl> [NoInterfaceObject] interface NotificationObject {
42064 readonly attribute <ref>NotificationManager</ref> notification;
42068 Defines what is instantiated by the <em>Tizen</em> object.
42072 There is a <em>tizen.notification</em> object that allows access to the
42080 <ExtendedAttributeList>
42081 <ExtendedAttribute name="NoInterfaceObject">
42082 <webidl>NoInterfaceObject</webidl>
42083 </ExtendedAttribute>
42084 </ExtendedAttributeList>
42085 <Attribute readonly="readonly" name="notification" id="::Notification::NotificationObject::notification">
42086 <webidl> readonly attribute <ref>NotificationManager</ref> notification;</webidl>
42087 <Type name="NotificationManager"/>
42090 <Implements name1="Tizen" name2="NotificationObject">
42091 <webidl> <ref>Tizen</ref> implements <ref>NotificationObject</ref>;</webidl>
42093 <Interface name="NotificationManager" id="::Notification::NotificationManager">
42094 <webidl> [NoInterfaceObject] interface NotificationManager {
42096 void post(<ref>Notification</ref> notification) raises(<ref>WebAPIException</ref>);
42098 void update(<ref>Notification</ref> notification) raises(<ref>WebAPIException</ref>);
42100 void remove(<ref>NotificationId</ref> id) raises(<ref>WebAPIException</ref>);
42102 void removeAll() raises(<ref>WebAPIException</ref>);
42104 <ref>Notification</ref> get(<ref>NotificationId</ref> id) raises(<ref>WebAPIException</ref>);
42106 <ref>Notification</ref>[] getAll() raises(<ref>WebAPIException</ref>);
42111 Notification manager interface that provides access to the API.
42115 This interface provides access to the notification object.
42122 <ExtendedAttributeList>
42123 <ExtendedAttribute name="NoInterfaceObject">
42124 <webidl>NoInterfaceObject</webidl>
42125 </ExtendedAttribute>
42126 </ExtendedAttributeList>
42127 <Operation name="post" id="::Notification::NotificationManager::post">
42128 <webidl> void post(<ref>Notification</ref> notification) raises(<ref>WebAPIException</ref>);</webidl>
42131 Posts a notification to display.
42140 http://tizen.org/privilege/notification
42143 var appControl = new tizen.ApplicationControl(
42144 "http://tizen.org/appcontrol/operation/create_content",
42146 "image/jpg",
42148 var notificationDict = {
42149 content : "This is a simple notification.",
42150 iconPath : "images/image1.jpg",
42151 soundPath : "music/Over the horizon.mp3",
42153 appControl : appControl};
42155 var notification = new tizen.StatusNotification("SIMPLE",
42156 "Simple notification", notificationDict);
42158 tizen.notification.post(notification);
42160 console.log (err.name + ": " + err.message);
42164 <Type type="void"/>
42166 <Argument name="notification">
42169 A notification to post.
42172 <Type name="Notification"/>
42176 <RaiseException name="WebAPIException">
42179 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
42182 with error type InvalidValuesError, if any of the input
42183 parameters contain an invalid value.
42186 with error type SecurityError, if the application does not have the privilege to call this method.
42189 with error type UnknownError if any other error occurs.
42195 <Operation name="update" id="::Notification::NotificationManager::update">
42196 <webidl> void update(<ref>Notification</ref> notification) raises(<ref>WebAPIException</ref>);</webidl>
42199 Updates a previously posted notification.
42208 http://tizen.org/privilege/notification
42211 // Uses a variable for the previously posted notification.
42212 notification.content = "My notification";
42213 tizen.notification.update(notification);
42215 console.log (err.name + ": " + err.message);
42220 <Type type="void"/>
42222 <Argument name="notification">
42225 A notification to update.
42228 <Type name="Notification"/>
42232 <RaiseException name="WebAPIException">
42235 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
42238 with error type InvalidValuesError, if any of the input
42239 parameters contain an invalid value.
42242 with error type SecurityError, if the application does not have the privilege to call this method.
42245 with error type UnknownError if any other error occurs.
42251 <Operation name="remove" id="::Notification::NotificationManager::remove">
42252 <webidl> void remove(<ref>NotificationId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
42255 Removes a previously posted notification.
42264 http://tizen.org/privilege/notification
42267 // Uses a variable for the previously posted notification.
42268 tizen.notification.remove(notification.id);
42270 console.log (err.name + ": " + err.message);
42275 <Type type="void"/>
42277 <Argument name="id">
42280 A previously posted notification ID to remove.
42283 <Type name="NotificationId"/>
42287 <RaiseException name="WebAPIException">
42290 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
42293 with error type NotFoundError, if NotificationId is not found in the previously posted notifications.
42296 with error type SecurityError, if the application does not have the privilege to call this method.
42299 with error type UnknownError if any other error occurs.
42305 <Operation name="removeAll" id="::Notification::NotificationManager::removeAll">
42306 <webidl> void removeAll() raises(<ref>WebAPIException</ref>);</webidl>
42309 Removes all notifications that have been posted by the current application.
42318 http://tizen.org/privilege/notification
42321 tizen.notification.removeAll();
42323 console.log (err.name + ": " + err.message);
42328 <Type type="void"/>
42331 <RaiseException name="WebAPIException">
42334 with error type SecurityError, if the application does not have the privilege to call this method.
42337 with error type UnknownError if any other error occurs.
42343 <Operation name="get" id="::Notification::NotificationManager::get">
42344 <webidl> <ref>Notification</ref> get(<ref>NotificationId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
42347 Gets a notification that has previously been posted by the current application. Note that the obtaining notification's progressType is <em>PERCENTAGE</em> </brief>
42352 // Uses a variable for the previously posted notification
42353 // Saves notification ID for future use
42354 var myId = notification.id;
42356 var myNotification = tizen.notification.get(myId);
42358 console.log (err.name + ": " + err.message);
42363 <Type name="Notification"/>
42365 <Argument name="id">
42368 A previously posted notification ID.
42371 <Type name="NotificationId"/>
42375 <RaiseException name="WebAPIException">
42378 with error type NotFoundError, if NotificationId is not found in the previously posted notifications.
42381 with error type UnknownError if any other error occurs.
42387 <Operation name="getAll" id="::Notification::NotificationManager::getAll">
42388 <webidl> <ref>Notification</ref>[] getAll() raises(<ref>WebAPIException</ref>);</webidl>
42391 Gets all notifications that have previously been posted by the current application. Note that the obtaining notification's progressType is <em>PERCENTAGE</em> </brief>
42396 var notifications = tizen.notification.getAll();
42399 for ( index = 0; notifications.length > index; index++ )
42401 console.log(notifications[index].id);
42402 console.log(notifications[index].title);
42403 console.log(notifications[index].statusType);
42404 console.log(notifications[index].type);
42405 console.log(notifications[index].content);
42406 console.log(notifications[index].postedTime);
42407 console.log(notifications[index].iconPath);
42408 console.log(notifications[index].soundPath);
42409 console.log(notifications[index].vibration);
42410 console.log(notifications[index].appControl);
42413 console.log (err.name + ": " + err.message);
42417 <Type type="array">
42418 <Type name="Notification"/>
42422 <RaiseException name="WebAPIException">
42425 with error type UnknownError, if any other error occurs.
42432 <Interface name="Notification" id="::Notification::Notification">
42433 <webidl> [NoInterfaceObject] interface Notification {
42436 readonly attribute <ref>NotificationId</ref> id;
42438 readonly attribute <ref>NotificationType</ref> type;
42440 readonly attribute Date postedTime;
42442 attribute DOMString title;
42444 attribute DOMString? content;
42449 This interface offers common attributes to represent <em>Notification</em> object.
42455 <ExtendedAttributeList>
42456 <ExtendedAttribute name="NoInterfaceObject">
42457 <webidl>NoInterfaceObject</webidl>
42458 </ExtendedAttribute>
42459 </ExtendedAttributeList>
42460 <Attribute readonly="readonly" name="id" id="::Notification::Notification::id">
42461 <webidl> readonly attribute <ref>NotificationId</ref> id;</webidl>
42464 The Notification identifier. Before the notification is posted, this value is undefined.
42470 <Type name="NotificationId"/>
42472 <Attribute readonly="readonly" name="type" id="::Notification::Notification::type">
42473 <webidl> readonly attribute <ref>NotificationType</ref> type;</webidl>
42476 The Notification type.
42482 <Type name="NotificationType"/>
42484 <Attribute readonly="readonly" name="postedTime" id="::Notification::Notification::postedTime">
42485 <webidl> readonly attribute Date postedTime;</webidl>
42488 The time that the notification is posted. Before the notification is posted, this value is undefined.
42494 <Type type="Date"/>
42496 <Attribute name="title" id="::Notification::Notification::title">
42497 <webidl> attribute DOMString title;</webidl>
42500 The title to display in a notification.
42506 <Type type="DOMString"/>
42508 <Attribute name="content" id="::Notification::Notification::content">
42509 <webidl> attribute DOMString? content;</webidl>
42512 The content to display in a notification.
42518 <Type type="DOMString" nullable="nullable"/>
42521 <Dictionary name="StatusNotificationInit" id="::Notification::StatusNotificationInit">
42522 <webidl> dictionary StatusNotificationInit {
42523 DOMString? content;
42524 DOMString? iconPath;
42525 DOMString? soundPath;
42526 boolean? vibration;
42527 <ref>ApplicationControl</ref>? appControl;
42528 <ref>ApplicationId</ref>? appId;
42529 <ref>NotificationProgressType</ref>? progressType;
42530 unsigned long? progressValue;
42532 DOMString? subIconPath;
42533 <ref>NotificationDetailInfo</ref>[]? detailInfo;
42534 DOMString? ledColor;
42535 unsigned long ledOnPeriod;
42536 unsigned long ledOffPeriod;
42537 DOMString? backgroundImagePath;
42538 DOMString[]? thumbnails;
42542 The properties of StatusNotification, to pass a constructor.
42548 <DictionaryMember name="content" id="::Notification::StatusNotificationInit::content">
42549 <webidl> DOMString? content;</webidl>
42550 <Type type="DOMString" nullable="nullable"/>
42551 </DictionaryMember>
42552 <DictionaryMember name="iconPath" id="::Notification::StatusNotificationInit::iconPath">
42553 <webidl> DOMString? iconPath;</webidl>
42554 <Type type="DOMString" nullable="nullable"/>
42555 </DictionaryMember>
42556 <DictionaryMember name="soundPath" id="::Notification::StatusNotificationInit::soundPath">
42557 <webidl> DOMString? soundPath;</webidl>
42558 <Type type="DOMString" nullable="nullable"/>
42559 </DictionaryMember>
42560 <DictionaryMember name="vibration" id="::Notification::StatusNotificationInit::vibration">
42561 <webidl> boolean? vibration;</webidl>
42562 <Type type="boolean" nullable="nullable"/>
42563 </DictionaryMember>
42564 <DictionaryMember name="appControl" id="::Notification::StatusNotificationInit::appControl">
42565 <webidl> <ref>ApplicationControl</ref>? appControl;</webidl>
42566 <Type name="ApplicationControl" nullable="nullable"/>
42567 </DictionaryMember>
42568 <DictionaryMember name="appId" id="::Notification::StatusNotificationInit::appId">
42569 <webidl> <ref>ApplicationId</ref>? appId;</webidl>
42570 <Type name="ApplicationId" nullable="nullable"/>
42571 </DictionaryMember>
42572 <DictionaryMember name="progressType" id="::Notification::StatusNotificationInit::progressType">
42573 <webidl> <ref>NotificationProgressType</ref>? progressType;</webidl>
42574 <Type name="NotificationProgressType" nullable="nullable"/>
42575 </DictionaryMember>
42576 <DictionaryMember name="progressValue" id="::Notification::StatusNotificationInit::progressValue">
42577 <webidl> unsigned long? progressValue;</webidl>
42578 <Type type="unsigned long" nullable="nullable"/>
42579 </DictionaryMember>
42580 <DictionaryMember name="number" id="::Notification::StatusNotificationInit::number">
42581 <webidl> long? number;</webidl>
42582 <Type type="long" nullable="nullable"/>
42583 </DictionaryMember>
42584 <DictionaryMember name="subIconPath" id="::Notification::StatusNotificationInit::subIconPath">
42585 <webidl> DOMString? subIconPath;</webidl>
42586 <Type type="DOMString" nullable="nullable"/>
42587 </DictionaryMember>
42588 <DictionaryMember name="detailInfo" id="::Notification::StatusNotificationInit::detailInfo">
42589 <webidl> <ref>NotificationDetailInfo</ref>[]? detailInfo;</webidl>
42590 <Type type="array" nullable="nullable">
42591 <Type name="NotificationDetailInfo"/>
42593 </DictionaryMember>
42594 <DictionaryMember name="ledColor" id="::Notification::StatusNotificationInit::ledColor">
42595 <webidl> DOMString? ledColor;</webidl>
42596 <Type type="DOMString" nullable="nullable"/>
42597 </DictionaryMember>
42598 <DictionaryMember name="ledOnPeriod" id="::Notification::StatusNotificationInit::ledOnPeriod">
42599 <webidl> unsigned long ledOnPeriod;</webidl>
42600 <Type type="unsigned long"/>
42601 </DictionaryMember>
42602 <DictionaryMember name="ledOffPeriod" id="::Notification::StatusNotificationInit::ledOffPeriod">
42603 <webidl> unsigned long ledOffPeriod;</webidl>
42604 <Type type="unsigned long"/>
42605 </DictionaryMember>
42606 <DictionaryMember name="backgroundImagePath" id="::Notification::StatusNotificationInit::backgroundImagePath">
42607 <webidl> DOMString? backgroundImagePath;</webidl>
42608 <Type type="DOMString" nullable="nullable"/>
42609 </DictionaryMember>
42610 <DictionaryMember name="thumbnails" id="::Notification::StatusNotificationInit::thumbnails">
42611 <webidl> DOMString[]? thumbnails;</webidl>
42612 <Type type="array" nullable="nullable">
42613 <Type type="DOMString"/>
42615 </DictionaryMember>
42617 <Interface name="StatusNotification" id="::Notification::StatusNotification">
42618 <webidl> [Constructor(<ref>StatusNotificationType</ref> statusType, DOMString title, optional <ref>StatusNotificationInit</ref>? notificationInitDict)]
42621 interface StatusNotification : <ref>Notification</ref> {
42623 readonly attribute <ref>StatusNotificationType</ref> statusType;
42625 attribute DOMString? iconPath;
42627 attribute DOMString? subIconPath;
42629 attribute long? number;
42631 attribute <ref>NotificationDetailInfo</ref>[]? detailInfo;
42633 attribute DOMString? ledColor;
42635 attribute unsigned long ledOnPeriod;
42637 attribute unsigned long ledOffPeriod;
42639 attribute DOMString? backgroundImagePath;
42641 attribute DOMString[]? thumbnails;
42643 attribute DOMString? soundPath;
42645 attribute boolean vibration;
42647 attribute <ref>ApplicationControl</ref>? appControl;
42649 attribute <ref>ApplicationId</ref>? appId;
42651 attribute <ref>NotificationProgressType</ref> progressType;
42653 attribute unsigned long? progressValue;
42657 This interface represents status notification and offers additional attributes to represent notification displayed in notification tray.
42661 All notification must have a title attribute.
42668 <ExtendedAttributeList>
42669 <ExtendedAttribute name="Constructor">
42670 <webidl>Constructor(<ref>StatusNotificationType</ref> statusType, DOMString title, optional <ref>StatusNotificationInit</ref>? notificationInitDict)</webidl>
42672 <Argument name="statusType">
42673 <Type name="StatusNotificationType"/>
42675 <Argument name="title">
42676 <Type type="DOMString"/>
42678 <Argument optional="optional" name="notificationInitDict">
42679 <Type name="StatusNotificationInit" nullable="nullable"/>
42682 </ExtendedAttribute>
42683 </ExtendedAttributeList>
42684 <InterfaceInheritance>
42685 <Name name="Notification"/>
42686 </InterfaceInheritance>
42687 <Attribute readonly="readonly" name="statusType" id="::Notification::StatusNotification::statusType">
42688 <webidl> readonly attribute <ref>StatusNotificationType</ref> statusType;</webidl>
42691 The status notification type.
42697 <Type name="StatusNotificationType"/>
42699 <Attribute name="iconPath" id="::Notification::StatusNotification::iconPath">
42700 <webidl> attribute DOMString? iconPath;</webidl>
42703 The icon path to display in the notification.
42709 <Type type="DOMString" nullable="nullable"/>
42711 <Attribute name="subIconPath" id="::Notification::StatusNotification::subIconPath">
42712 <webidl> attribute DOMString? subIconPath;</webidl>
42715 The sub icon path to display in the notification.
42721 <Type type="DOMString" nullable="nullable"/>
42723 <Attribute name="number" id="::Notification::StatusNotification::number">
42724 <webidl> attribute long? number;</webidl>
42727 The number of events to display in the notification.
42733 <Type type="long" nullable="nullable"/>
42735 <Attribute name="detailInfo" id="::Notification::StatusNotification::detailInfo">
42736 <webidl> attribute <ref>NotificationDetailInfo</ref>[]? detailInfo;</webidl>
42739 Appends lines of the detail information to the notification.
42740 This attribute is available in simple status notification.
42741 By default, this attribute is initialized with an empty array.
42742 The maximum number of detail information elements in the array is 2.
42748 <Type type="array" nullable="nullable">
42749 <Type name="NotificationDetailInfo"/>
42752 <Attribute name="ledColor" id="::Notification::StatusNotification::ledColor">
42753 <webidl> attribute DOMString? ledColor;</webidl>
42756 Sets the notification LED indicator color property.
42757 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.
42758 The LED indicator color will show its a close approximation.
42759 LED will only light on when screen is off. To turn the LED off, set "#000000" or null to ledColor.
42760 This method has effects when the device has notification LED.
42763 var notificationDict = {
42764 content : "This is a simple notification.",
42765 iconPath : "images/image1.jpg",
42766 soundPath : "music/Over the horizon.mp3",
42768 ledColor : "#FFFF00",
42770 ledOffPeriod : 500 };
42772 var notification = new tizen.StatusNotification("SIMPLE",
42773 "Simple notification", notificationDict);
42775 tizen.notification.post(notification);
42777 console.log (err.name + ": " + err.message);
42784 <Type type="DOMString" nullable="nullable"/>
42786 <Attribute name="ledOnPeriod" id="::Notification::StatusNotification::ledOnPeriod">
42787 <webidl> attribute unsigned long ledOnPeriod;</webidl>
42790 The milliseconds for which the light is on
42791 The light continuously toggles on (ledOnPeriod) and off (ledOffPeriod).
42792 By default, this attribute is set to 0
42798 <Type type="unsigned long"/>
42800 <Attribute name="ledOffPeriod" id="::Notification::StatusNotification::ledOffPeriod">
42801 <webidl> attribute unsigned long ledOffPeriod;</webidl>
42804 The milliseconds for which the light is off
42805 By default, this attribute is set to 0
42811 <Type type="unsigned long"/>
42813 <Attribute name="backgroundImagePath" id="::Notification::StatusNotification::backgroundImagePath">
42814 <webidl> attribute DOMString? backgroundImagePath;</webidl>
42817 The image path to use as the background of the notification.
42818 This attribute is available on simple or thumbnail status notifications.
42824 <Type type="DOMString" nullable="nullable"/>
42826 <Attribute name="thumbnails" id="::Notification::StatusNotification::thumbnails">
42827 <webidl> attribute DOMString[]? thumbnails;</webidl>
42830 The image paths associated with the thumbnail status notification.
42831 By default, this attribute is initialized with an empty array.
42832 The maximum number of thumbnail path elements in the array is 4.
42838 <Type type="array" nullable="nullable">
42839 <Type type="DOMString"/>
42842 <Attribute name="soundPath" id="::Notification::StatusNotification::soundPath">
42843 <webidl> attribute DOMString? soundPath;</webidl>
42846 The path of a sound file to play when the notification is shown.
42852 <Type type="DOMString" nullable="nullable"/>
42854 <Attribute name="vibration" id="::Notification::StatusNotification::vibration">
42855 <webidl> attribute boolean vibration;</webidl>
42858 Holds whether to vibrate when the notification is shown. By default, this attribute is set to false.
42864 <Type type="boolean"/>
42866 <Attribute name="appControl" id="::Notification::StatusNotification::appControl">
42867 <webidl> attribute <ref>ApplicationControl</ref>? appControl;</webidl>
42870 Holds the application control to launch an application when the notification is selected from the notification tray.
42876 <Type name="ApplicationControl" nullable="nullable"/>
42878 <Attribute name="appId" id="::Notification::StatusNotification::appId">
42879 <webidl> attribute <ref>ApplicationId</ref>? appId;</webidl>
42882 Holds the application ID to launch when the notification is selected from the notification tray.
42889 // Gets a current application information with tizen.application.getAppInfo
42890 var myappInfo = tizen.application.getAppInfo();
42892 var notificationDict = {
42893 content : "This is a simple notification.",
42894 iconPath : "images/image1.jpg",
42895 soundPath : "music/Over the horizon.mp3",
42897 appId : myappInfo.id };
42899 var notification = new tizen.StatusNotification("SIMPLE",
42900 "Simple notification", notificationDict);
42902 tizen.notification.post(notification);
42904 console.log (err.name + ": " + err.message);
42908 <Type name="ApplicationId" nullable="nullable"/>
42910 <Attribute name="progressType" id="::Notification::StatusNotification::progressType">
42911 <webidl> attribute <ref>NotificationProgressType</ref> progressType;</webidl>
42914 Defines the type for an ongoing notification's progress.
42915 By default, this attribute is set to PERCENTAGE.
42921 <Type name="NotificationProgressType"/>
42923 <Attribute name="progressValue" id="::Notification::StatusNotification::progressValue">
42924 <webidl> attribute unsigned long? progressValue;</webidl>
42927 Defines the current notification progress value (<em>PERCENTAGE</em> or <em>BYTE</em>), depending on the <em>progressType</em> </brief>
42930 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
42931 If 0, the indeterminate progressbar will be shown.
42932 This attribute is only available for StatusNotifcation of type <em>PROGRESS</em>.
42935 Application should keep the progress value for its job because
42936 the saved value in the notification status tray would be different from
42937 exact progress value.
42940 Range of <em>progressValue</em>: percent (0 to 100).
42944 var appControl = new tizen.ApplicationControl(
42945 "http://tizen.org/appcontrol/operation/create_content",
42947 "image/jpg",
42950 var notificationDict = {
42951 content : "This is a progress notificaiton.",
42952 iconPath : "images/image2.jpg",
42953 soundPath : "music/Over the horizon.mp3",
42955 appControl : appControl,
42956 progressValue : 20};
42957 // Constructs the progress notification
42958 var notification = new tizen.StatusNotification("PROGRESS",
42959 "Progress notification", notificationDict);
42960 // Posts the notification
42961 tizen.notification.post(notification);
42963 // Updates the progress value of the notification
42964 notification.progressValue = 59;
42965 tizen.notification.update(notification);
42969 console.log (err.name + ": " + err.message);
42976 <Type type="unsigned long" nullable="nullable"/>
42979 <Interface name="NotificationDetailInfo" id="::Notification::NotificationDetailInfo">
42980 <webidl>[Constructor(DOMString mainText, optional DOMString? subText)]
42981 interface NotificationDetailInfo {
42982 attribute DOMString mainText;
42984 attribute DOMString? subText;
42988 The NotificationDetailInfo object that contains the detail information to the notification.
42993 <Code> var detailInfo1 = new tizen.NotificationDetailInfo('Missed Call from James', 'Feb 11 2013');
42994 notification.detailInfo = [detailInfo1];
42997 <ExtendedAttributeList>
42998 <ExtendedAttribute name="Constructor">
42999 <webidl>Constructor(DOMString mainText, optional DOMString? subText)</webidl>
43001 <Argument name="mainText">
43002 <Type type="DOMString"/>
43004 <Argument optional="optional" name="subText">
43005 <Type type="DOMString" nullable="nullable"/>
43008 </ExtendedAttribute>
43009 </ExtendedAttributeList>
43010 <Attribute name="mainText" id="::Notification::NotificationDetailInfo::mainText">
43011 <webidl> attribute DOMString mainText;</webidl>
43014 The main content of the detail information.
43015 This attribute is available on simple status notifications.
43021 <Type type="DOMString"/>
43023 <Attribute name="subText" id="::Notification::NotificationDetailInfo::subText">
43024 <webidl> attribute DOMString? subText;</webidl>
43027 The secondary content of the detail information.
43031 By default, this attribute is set to null.
43038 <Type type="DOMString" nullable="nullable"/>
43042 <Module name="Package" id="::Package">
43043 <webidl>module Package {
43046 typedef DOMString PackageId;
43049 [NoInterfaceObject] interface PackageManagerObject {
43050 readonly attribute <ref>PackageManager</ref> package;
43052 <ref>Tizen</ref> implements <ref>PackageManagerObject</ref>;
43055 [NoInterfaceObject] interface PackageManager {
43058 void install(DOMString path,
43059 <ref>PackageProgressCallback</ref> progressCallback,
43060 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
43063 void uninstall(<ref>PackageId</ref> id,
43064 <ref>PackageProgressCallback</ref> progressCallback,
43065 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
43070 void getPackagesInfo(<ref>PackageInformationArraySuccessCallback</ref> successCallback,
43071 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
43074 <ref>PackageInformation</ref> getPackageInfo(optional <ref>PackageId</ref>? id) raises(<ref>WebAPIException</ref>);
43077 void setPackageInfoEventListener(<ref>PackageInformationEventCallback</ref> eventCallback) raises(<ref>WebAPIException</ref>);
43080 void unsetPackageInfoEventListener() raises(<ref>WebAPIException</ref>);
43085 [NoInterfaceObject] interface PackageInformation {
43087 readonly attribute <ref>PackageId</ref> id;
43090 readonly attribute DOMString name;
43093 readonly attribute DOMString iconPath;
43096 readonly attribute DOMString version;
43099 readonly attribute long totalSize;
43102 readonly attribute long dataSize;
43105 readonly attribute Date lastModified;
43108 readonly attribute DOMString author;
43111 readonly attribute DOMString description;
43114 readonly attribute <ref>ApplicationId</ref>[] appIds;
43119 [Callback=FunctionOnly, NoInterfaceObject] interface PackageInformationArraySuccessCallback {
43122 void onsuccess(<ref>PackageInformation</ref>[] informationArray);
43126 [Callback, NoInterfaceObject] interface PackageProgressCallback {
43129 void onprogress(<ref>PackageId</ref> id, short progress);
43132 void oncomplete(<ref>PackageId</ref> id);
43136 [Callback, NoInterfaceObject] interface PackageInformationEventCallback {
43139 void oninstalled(<ref>PackageInformation</ref> info);
43142 void onupdated(<ref>PackageInformation</ref> info);
43145 void onuninstalled(<ref>PackageId</ref> id);
43151 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.
43152 For more information on the Package features, see <a href="../../org.tizen.web.appprogramming/html/guide/app_guide/package.htm">Package Guide</a>.
43158 <Typedef name="PackageId" id="::Package::PackageId">
43159 <webidl> typedef DOMString PackageId;</webidl>
43162 A unique ID for an installed package.
43168 <Type type="DOMString"/>
43170 <Interface name="PackageManagerObject" id="::Package::PackageManagerObject">
43171 <webidl> [NoInterfaceObject] interface PackageManagerObject {
43172 readonly attribute <ref>PackageManager</ref> package;
43176 This interface defines what is instantiated by the <em>Tizen </em>object from the Tizen Platform.
43180 There is a <em>tizen.package </em>object that allows access to Package API functionality.
43187 <ExtendedAttributeList>
43188 <ExtendedAttribute name="NoInterfaceObject">
43189 <webidl>NoInterfaceObject</webidl>
43190 </ExtendedAttribute>
43191 </ExtendedAttributeList>
43192 <Attribute readonly="readonly" name="package" id="::Package::PackageManagerObject::package">
43193 <webidl> readonly attribute <ref>PackageManager</ref> package;</webidl>
43194 <Type name="PackageManager"/>
43197 <Implements name1="Tizen" name2="PackageManagerObject">
43198 <webidl> <ref>Tizen</ref> implements <ref>PackageManagerObject</ref>;</webidl>
43200 <Interface name="PackageManager" id="::Package::PackageManager">
43201 <webidl> [NoInterfaceObject] interface PackageManager {
43204 void install(DOMString path,
43205 <ref>PackageProgressCallback</ref> progressCallback,
43206 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
43209 void uninstall(<ref>PackageId</ref> id,
43210 <ref>PackageProgressCallback</ref> progressCallback,
43211 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
43216 void getPackagesInfo(<ref>PackageInformationArraySuccessCallback</ref> successCallback,
43217 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
43220 <ref>PackageInformation</ref> getPackageInfo(optional <ref>PackageId</ref>? id) raises(<ref>WebAPIException</ref>);
43223 void setPackageInfoEventListener(<ref>PackageInformationEventCallback</ref> eventCallback) raises(<ref>WebAPIException</ref>);
43226 void unsetPackageInfoEventListener() raises(<ref>WebAPIException</ref>);
43231 This interface defines the package manager.
43237 <ExtendedAttributeList>
43238 <ExtendedAttribute name="NoInterfaceObject">
43239 <webidl>NoInterfaceObject</webidl>
43240 </ExtendedAttribute>
43241 </ExtendedAttributeList>
43242 <Operation name="install" id="::Package::PackageManager::install">
43243 <webidl> void install(DOMString path,
43244 <ref>PackageProgressCallback</ref> progressCallback,
43245 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
43248 Installs a package with a specified package path on a device.
43252 This API provides a way to notify the progress and completion of an installation request through PackageProgressCallback.
43255 The <em>ErrorCallback() </em>is launched with these error types:
43259 NotFoundError - If the package is not found in the specified path. </li>
43261 UnknownError - If it is not allowed to install the package by platform or any other platform error occurs. </li>
43271 http://tizen.org/privilege/packagemanager.install
43274 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.
43276 <Code> var onInstallation = {
43277 onprogress: function(packageId, percentage) {
43278 console.log("On installation(" + packageId + ") : progress(" + percentage + ")");
43280 oncomplete: function(packageId) {
43281 console.log("Installation(" + packageId + ") Complete");
43285 var onError = function (err) {
43286 console.log("Error occurred on installation : " + err.name);
43289 // Let's assume that "test.wgt" file is exist in the downloads directory
43290 tizen.filesystem.resolve("downloads/test.wgt",
43292 console.log("file path : " + file.path);
43293 tizen.package.install(file.toURI(), onInstallation, onError);
43296 console.log("Error occurred on resolve : " + err.name);
43302 <Type type="void"/>
43304 <Argument name="path">
43307 The package path to install
43310 <Type type="DOMString"/>
43312 <Argument name="progressCallback">
43315 The method to invoke when the installation is in progress or has been completed
43318 <Type name="PackageProgressCallback"/>
43320 <Argument optional="optional" name="errorCallback">
43323 The method to invoke when an error occurs
43326 <Type name="ErrorCallback" nullable="nullable"/>
43330 <RaiseException name="WebAPIException">
43333 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
43336 with error type SecurityError, if the application does not have the privilege to call this method.
43342 <Operation name="uninstall" id="::Package::PackageManager::uninstall">
43343 <webidl> void uninstall(<ref>PackageId</ref> id,
43344 <ref>PackageProgressCallback</ref> progressCallback,
43345 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
43348 Uninstalls the package with a specified package ID.
43352 This API provides a way to notify about the progress and completion of an uninstallation request through PackageProgressCallback.
43355 The <em>ErrorCallback() </em>is launched with these error types:
43359 NotFoundError - If the package is not found with specified ID. </li>
43361 UnknownError - If it is not allowed to uninstall the package from the platform or any other platform error occurs. </li>
43371 http://tizen.org/privilege/packagemanager.install
43374 Some preloaded packages cannot be uninstalled. In this case, ErrorCallback with UnKnownError type will be launched.
43376 <Code> var onUninstallation = {
43377 onprogress: function(packageId, percentage) {
43378 console.log("On Uninstallation(" + packageId + ") : progress(" + percentage + ")");
43380 oncomplete: function(packageId) {
43381 console.log("Uninstallation(" + packageId + ") Complete");
43385 var onError = function (err) {
43386 console.log("Error occurred on installation : " + err.name);
43389 // Let's assume that the package id to uninstall is "testapp001"
43390 tizen.package.uninstall("testapp001", onUninstallation, onError);
43393 <Type type="void"/>
43395 <Argument name="id">
43398 The package ID to uninstall
43401 <Type name="PackageId"/>
43403 <Argument name="progressCallback">
43406 The method to invoke when uninstallation is in progress or has been completed
43409 <Type name="PackageProgressCallback"/>
43411 <Argument optional="optional" name="errorCallback">
43414 The method to invoke when an error occurs
43417 <Type name="ErrorCallback" nullable="nullable"/>
43421 <RaiseException name="WebAPIException">
43424 with error type TypeMismatchError, if an input parameter is not compatible with the expected type for that parameter.
43427 with error type SecurityError, if the application does not have the privilege to call this method.
43433 <Operation name="getPackagesInfo" id="::Package::PackageManager::getPackagesInfo">
43434 <webidl> void getPackagesInfo(<ref>PackageInformationArraySuccessCallback</ref> successCallback,
43435 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
43438 Gets information of the installed packages.
43442 The result contains the snapshots of the installed packages information.
43445 The <em>errorCallback()</em> is launched with this error type:
43449 UnknownError - If any other platform error occurs. </li>
43459 http://tizen.org/privilege/package.info
43461 <Code> function onListInstalledPackages(packages) {
43462 for (var i = 0; i < packages.length; i++) {
43463 console.log("Package id["+i+"] : " +packages[i].id);
43467 tizen.package.getPackagesInfo(
43468 onListInstalledPackages,
43469 function (err) {console.log("Can't obtain packages list" + err.name);});
43472 <Type type="void"/>
43474 <Argument name="successCallback">
43477 The method to call when an invocation ends successfully
43480 <Type name="PackageInformationArraySuccessCallback"/>
43482 <Argument optional="optional" name="errorCallback">
43485 The method to call when an error occurs
43488 <Type name="ErrorCallback" nullable="nullable"/>
43492 <RaiseException name="WebAPIException">
43495 with error type TypeMismatchError, if an input parameter is not compatible with the expected type for that parameter.
43498 with error type SecurityError, if the application does not have the privilege to call this method.
43504 <Operation name="getPackageInfo" id="::Package::PackageManager::getPackageInfo">
43505 <webidl> <ref>PackageInformation</ref> getPackageInfo(optional <ref>PackageId</ref>? id) raises(<ref>WebAPIException</ref>);</webidl>
43508 Gets information of an installed package.
43512 If the ID is set to <var>null</var> or not set at all, it returns package information of the current application.
43513 The list of installed packages and their package IDs is obtained using <em>getPackagesInfo()</em>.
43523 http://tizen.org/privilege/package.info
43525 <Code> var packageInfo = tizen.package.getPackageInfo(null);
43527 console.log("Current Package ID : " + packageInfo.id);
43530 <Type name="PackageInformation">
43533 PackageInformation The information of a package
43538 <Argument optional="optional" name="id">
43541 A string representing package ID. If the ID is not provided, the package information of the calling application is returned.
43544 <Type name="PackageId" nullable="nullable"/>
43548 <RaiseException name="WebAPIException">
43551 with error type TypeMismatchError, if an input parameter is not compatible with the expected type for that parameter.
43554 with error type SecurityError, if the application does not have the privilege to call this method.
43557 with error type NotFoundError, if the package with the specified ID is not found.
43560 with error type UnknownError, if the package information cannot be retrieved because of a platform error.
43566 <Operation name="setPackageInfoEventListener" id="::Package::PackageManager::setPackageInfoEventListener">
43567 <webidl> void setPackageInfoEventListener(<ref>PackageInformationEventCallback</ref> eventCallback) raises(<ref>WebAPIException</ref>);</webidl>
43570 Sets a listener to receive notifications for any changes made to the list of installed packages.
43574 This method sets a <em>PackageInformationEventCallback</em> type callback that is triggered when a package is installed, removed or updated.
43577 The callback lasts until <em>unsetPackageInfoEventListener()</em> method is called.
43587 http://tizen.org/privilege/package.info
43589 <Code> var packageEventCallback = {
43590 oninstalled: function(packageInfo) {
43591 console.log('The package ' + packageInfo.name + ' is installed');
43593 onupdated: function(packageInfo) {
43594 console.log('The package ' + packageInfo.name + ' is updated');
43596 onuninstalled: function(packageId) {
43597 console.log('The package ' + packageId + ' is uninstalled');
43601 tizen.package.setPackageInfoEventListener(packageEventCallback);
43604 <Type type="void"/>
43606 <Argument name="eventCallback">
43609 The method to be called when any change is made to the list of installed packages.
43612 <Type name="PackageInformationEventCallback"/>
43616 <RaiseException name="WebAPIException">
43619 with error type TypeMismatchError, if an input parameter is not compatible with the expected type for that parameter.
43622 with error type SecurityError, if the application does not have the privilege to call this method.
43625 with error type UnknownError, if the package list change event cannot be generated because of a platform error.
43631 <Operation name="unsetPackageInfoEventListener" id="::Package::PackageManager::unsetPackageInfoEventListener">
43632 <webidl> void unsetPackageInfoEventListener() raises(<ref>WebAPIException</ref>);</webidl>
43635 Unsets the listener to stop receiving package notifications.
43644 http://tizen.org/privilege/package.info
43646 <Code> tizen.package.unsetPackageInfoEventListener();
43649 <Type type="void"/>
43652 <RaiseException name="WebAPIException">
43655 with error type SecurityError, if the application does not have the privilege to call this method.
43658 with error type UnknownError, if the listener removal request fails because of a platform error.
43665 <Interface name="PackageInformation" id="::Package::PackageInformation">
43666 <webidl> [NoInterfaceObject] interface PackageInformation {
43668 readonly attribute <ref>PackageId</ref> id;
43671 readonly attribute DOMString name;
43674 readonly attribute DOMString iconPath;
43677 readonly attribute DOMString version;
43680 readonly attribute long totalSize;
43683 readonly attribute long dataSize;
43686 readonly attribute Date lastModified;
43689 readonly attribute DOMString author;
43692 readonly attribute DOMString description;
43695 readonly attribute <ref>ApplicationId</ref>[] appIds;
43700 This interface defines the general information available to an installed package.
43706 <ExtendedAttributeList>
43707 <ExtendedAttribute name="NoInterfaceObject">
43708 <webidl>NoInterfaceObject</webidl>
43709 </ExtendedAttribute>
43710 </ExtendedAttributeList>
43711 <Attribute readonly="readonly" name="id" id="::Package::PackageInformation::id">
43712 <webidl> readonly attribute <ref>PackageId</ref> id;</webidl>
43715 An attribute to store the identifier of a package.
43721 <Type name="PackageId"/>
43723 <Attribute readonly="readonly" name="name" id="::Package::PackageInformation::name">
43724 <webidl> readonly attribute DOMString name;</webidl>
43727 An attribute to store the package name.
43733 <Type type="DOMString"/>
43735 <Attribute readonly="readonly" name="iconPath" id="::Package::PackageInformation::iconPath">
43736 <webidl> readonly attribute DOMString iconPath;</webidl>
43739 An attribute to store the icon path of a package.
43745 <Type type="DOMString"/>
43747 <Attribute readonly="readonly" name="version" id="::Package::PackageInformation::version">
43748 <webidl> readonly attribute DOMString version;</webidl>
43751 An attribute to store the package version.
43757 <Type type="DOMString"/>
43759 <Attribute readonly="readonly" name="totalSize" id="::Package::PackageInformation::totalSize">
43760 <webidl> readonly attribute long totalSize;</webidl>
43763 An attribute to store the total installed size(package + data) of a package.
43769 <Type type="long"/>
43771 <Attribute readonly="readonly" name="dataSize" id="::Package::PackageInformation::dataSize">
43772 <webidl> readonly attribute long dataSize;</webidl>
43775 An attribute to store the current data size of a package.
43781 <Type type="long"/>
43783 <Attribute readonly="readonly" name="lastModified" id="::Package::PackageInformation::lastModified">
43784 <webidl> readonly attribute Date lastModified;</webidl>
43787 An attribute to store the latest installed or updated time of a package.
43793 <Type type="Date"/>
43795 <Attribute readonly="readonly" name="author" id="::Package::PackageInformation::author">
43796 <webidl> readonly attribute DOMString author;</webidl>
43799 An attribute to store the author of a package.
43805 <Type type="DOMString"/>
43807 <Attribute readonly="readonly" name="description" id="::Package::PackageInformation::description">
43808 <webidl> readonly attribute DOMString description;</webidl>
43811 An attribute to store the package description.
43817 <Type type="DOMString"/>
43819 <Attribute readonly="readonly" name="appIds" id="::Package::PackageInformation::appIds">
43820 <webidl> readonly attribute <ref>ApplicationId</ref>[] appIds;</webidl>
43823 An attribute to store the application ID list of a package.
43829 <Type type="array">
43830 <Type name="ApplicationId"/>
43834 <Interface name="PackageInformationArraySuccessCallback" id="::Package::PackageInformationArraySuccessCallback">
43835 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface PackageInformationArraySuccessCallback {
43838 void onsuccess(<ref>PackageInformation</ref>[] informationArray);
43842 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.
43846 It is used in <em>tizen.package.getPackagesInfo()</em>.
43853 <ExtendedAttributeList>
43854 <ExtendedAttribute name="Callback" value="FunctionOnly">
43855 <webidl>Callback</webidl>
43856 </ExtendedAttribute>
43857 <ExtendedAttribute name="NoInterfaceObject">
43858 <webidl> NoInterfaceObject</webidl>
43859 </ExtendedAttribute>
43860 </ExtendedAttributeList>
43861 <Operation name="onsuccess" id="::Package::PackageInformationArraySuccessCallback::onsuccess">
43862 <webidl> void onsuccess(<ref>PackageInformation</ref>[] informationArray);</webidl>
43865 Called when the asynchronous call completes successfully.
43871 <Type type="void"/>
43873 <Argument name="informationArray">
43876 A list of installed packages information.
43879 <Type type="array">
43880 <Type name="PackageInformation"/>
43886 <Interface name="PackageProgressCallback" id="::Package::PackageProgressCallback">
43887 <webidl> [Callback, NoInterfaceObject] interface PackageProgressCallback {
43890 void onprogress(<ref>PackageId</ref> id, short progress);
43893 void oncomplete(<ref>PackageId</ref> id);
43897 This callback interface specifies subscriptions for any notification on the progress or completion of requests.
43903 <ExtendedAttributeList>
43904 <ExtendedAttribute name="Callback">
43905 <webidl>Callback</webidl>
43906 </ExtendedAttribute>
43907 <ExtendedAttribute name="NoInterfaceObject">
43908 <webidl> NoInterfaceObject</webidl>
43909 </ExtendedAttribute>
43910 </ExtendedAttributeList>
43911 <Operation name="onprogress" id="::Package::PackageProgressCallback::onprogress">
43912 <webidl> void onprogress(<ref>PackageId</ref> id, short progress);</webidl>
43915 Called while the request is in progress.
43921 <Type type="void"/>
43923 <Argument name="id">
43929 <Type name="PackageId"/>
43931 <Argument name="progress">
43934 The progress in percentage.
43937 <Type type="short"/>
43941 <Operation name="oncomplete" id="::Package::PackageProgressCallback::oncomplete">
43942 <webidl> void oncomplete(<ref>PackageId</ref> id);</webidl>
43945 Called while the request is completed.
43951 <Type type="void"/>
43953 <Argument name="id">
43959 <Type name="PackageId"/>
43964 <Interface name="PackageInformationEventCallback" id="::Package::PackageInformationEventCallback">
43965 <webidl> [Callback, NoInterfaceObject] interface PackageInformationEventCallback {
43968 void oninstalled(<ref>PackageInformation</ref> info);
43971 void onupdated(<ref>PackageInformation</ref> info);
43974 void onuninstalled(<ref>PackageId</ref> id);
43978 This callback interface specifies methods that are invoked when a package is installed, updated, or uninstalled.
43984 <ExtendedAttributeList>
43985 <ExtendedAttribute name="Callback">
43986 <webidl>Callback</webidl>
43987 </ExtendedAttribute>
43988 <ExtendedAttribute name="NoInterfaceObject">
43989 <webidl> NoInterfaceObject</webidl>
43990 </ExtendedAttribute>
43991 </ExtendedAttributeList>
43992 <Operation name="oninstalled" id="::Package::PackageInformationEventCallback::oninstalled">
43993 <webidl> void oninstalled(<ref>PackageInformation</ref> info);</webidl>
43996 Called when a package is installed.
44002 <Type type="void"/>
44004 <Argument name="info">
44007 The information of the installed package
44010 <Type name="PackageInformation"/>
44014 <Operation name="onupdated" id="::Package::PackageInformationEventCallback::onupdated">
44015 <webidl> void onupdated(<ref>PackageInformation</ref> info);</webidl>
44018 Called when a package is updated.
44024 <Type type="void"/>
44026 <Argument name="info">
44029 The information of the updated package
44032 <Type name="PackageInformation"/>
44036 <Operation name="onuninstalled" id="::Package::PackageInformationEventCallback::onuninstalled">
44037 <webidl> void onuninstalled(<ref>PackageId</ref> id);</webidl>
44040 Called when a package is uninstalled.
44046 <Type type="void"/>
44048 <Argument name="id">
44051 The ID of the uninstalled package
44054 <Type name="PackageId"/>
44060 <Module name="Power" id="::Power">
44061 <webidl>module Power {
44063 enum PowerResource { "SCREEN", "CPU" };
44065 enum PowerScreenState { "SCREEN_OFF", "SCREEN_DIM", "SCREEN_NORMAL", "SCREEN_BRIGHT" };
44067 enum PowerCpuState { "CPU_AWAKE" };
44069 typedef (<ref>PowerScreenState</ref> or <ref>PowerCpuState</ref>) PowerState;
44071 [NoInterfaceObject] interface PowerManagerObject {
44072 readonly attribute <ref>PowerManager</ref> power;
44074 <ref>Tizen</ref> implements <ref>PowerManagerObject</ref>;
44076 [NoInterfaceObject] interface PowerManager {
44077 void request(<ref>PowerResource</ref> resource, <ref>PowerState</ref> state) raises(<ref>WebAPIException</ref>);
44079 void release(<ref>PowerResource</ref> resource) raises(<ref>WebAPIException</ref>);
44081 void setScreenStateChangeListener(<ref>ScreenStateChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);
44083 void unsetScreenStateChangeListener() raises(<ref>WebAPIException</ref>);
44085 double getScreenBrightness() raises(<ref>WebAPIException</ref>);
44087 void setScreenBrightness(double brightness) raises(<ref>WebAPIException</ref>);
44089 boolean isScreenOn() raises(<ref>WebAPIException</ref>);
44091 void restoreScreenBrightness() raises(<ref>WebAPIException</ref>);
44093 void turnScreenOn() raises(<ref>WebAPIException</ref>);
44095 void turnScreenOff() raises(<ref>WebAPIException</ref>);
44098 [Callback=FunctionOnly, NoInterfaceObject] interface ScreenStateChangeCallback {
44099 void onchanged(<ref>PowerScreenState</ref> previousState, <ref>PowerScreenState</ref> changedState);
44105 This API provides support for requesting power management related resource states.
44109 For more information on the Power features, see <a href="../../org.tizen.web.appprogramming/html/guide/sys_guide/power.htm">Power Guide</a>.
44116 <Enum name="PowerResource" id="::Power::PowerResource">
44117 <webidl> enum PowerResource { "SCREEN", "CPU" };</webidl>
44120 An enumerator that defines power resources with values aligned with <em>SystemInfo </em>property values.
44124 We support screen and cpu resources for now.
44125 Supported power resource states are provided in PowerScreenState and PowerCpuState enums respectively prefixed by the corresponding resource type.
44132 <EnumValue stringvalue="SCREEN">
44133 <webidl> "SCREEN</webidl>
44135 <EnumValue stringvalue="CPU">
44136 <webidl> "CPU</webidl>
44139 <Enum name="PowerScreenState" id="::Power::PowerScreenState">
44140 <webidl> enum PowerScreenState { "SCREEN_OFF", "SCREEN_DIM", "SCREEN_NORMAL", "SCREEN_BRIGHT" };</webidl>
44143 An enumerator that indicates the power state for screen resource.
44147 The supported values are:
44151 SCREEN_OFF - This screen state cannot be requested but can only be used in the state change callback. </li>
44153 SCREEN_DIM - The minimal screen state is set to <em>DIM</em> and device does not change to <em>OFF</em> state automatically. </li>
44155 SCREEN_NORMAL - The minimal screen state is set to <em>NORMAL</em> and device does not change to <em>DIM</em> state automatically. </li>
44157 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>
44160 <em>DIM</em> state refers to the screen that the backlight is turned off
44161 <em>NORMAL</em> state refers to the default screen brightness that a user has configured for the device.
44162 <em>BRIGHT(Deprecated)</em> state refers to the maximum screen brightness that the device provides.
44163 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.
44167 SCREEN_BRIGHT is deprecated.
44173 <EnumValue stringvalue="SCREEN_OFF">
44174 <webidl> "SCREEN_OFF</webidl>
44176 <EnumValue stringvalue="SCREEN_DIM">
44177 <webidl> "SCREEN_DIM</webidl>
44179 <EnumValue stringvalue="SCREEN_NORMAL">
44180 <webidl> "SCREEN_NORMAL</webidl>
44182 <EnumValue stringvalue="SCREEN_BRIGHT">
44183 <webidl> "SCREEN_BRIGHT</webidl>
44186 <Enum name="PowerCpuState" id="::Power::PowerCpuState">
44187 <webidl> enum PowerCpuState { "CPU_AWAKE" };</webidl>
44190 An enumerator that indicates the power state for cpu resource.
44194 The supported values are:
44198 CPU_AWAKE - The cpu state is set to be awaken and it does not go to <em>SLEEP</em> state automatically. </li>
44205 <EnumValue stringvalue="CPU_AWAKE">
44206 <webidl> "CPU_AWAKE</webidl>
44209 <Typedef name="PowerState" id="::Power::PowerState">
44210 <webidl> typedef (<ref>PowerScreenState</ref> or <ref>PowerCpuState</ref>) PowerState;</webidl>
44213 The supported power states in general.
44214 It can be either a PowerScreenState or a PowerCpuState.
44220 <Type type="union">
44221 <Type name="PowerScreenState"/>
44222 <Type name="PowerCpuState"/>
44225 <Interface name="PowerManagerObject" id="::Power::PowerManagerObject">
44226 <webidl> [NoInterfaceObject] interface PowerManagerObject {
44227 readonly attribute <ref>PowerManager</ref> power;
44231 This interface defines what is instantiated by the <em>Tizen</em> object from the Tizen Platform.
44235 There will be a <em>tizen.power </em>object that allows accessing of a functionality of the Power API.
44242 <ExtendedAttributeList>
44243 <ExtendedAttribute name="NoInterfaceObject">
44244 <webidl>NoInterfaceObject</webidl>
44245 </ExtendedAttribute>
44246 </ExtendedAttributeList>
44247 <Attribute readonly="readonly" name="power" id="::Power::PowerManagerObject::power">
44248 <webidl> readonly attribute <ref>PowerManager</ref> power;</webidl>
44249 <Type name="PowerManager"/>
44252 <Implements name1="Tizen" name2="PowerManagerObject">
44253 <webidl> <ref>Tizen</ref> implements <ref>PowerManagerObject</ref>;</webidl>
44255 <Interface name="PowerManager" id="::Power::PowerManager">
44256 <webidl> [NoInterfaceObject] interface PowerManager {
44257 void request(<ref>PowerResource</ref> resource, <ref>PowerState</ref> state) raises(<ref>WebAPIException</ref>);
44259 void release(<ref>PowerResource</ref> resource) raises(<ref>WebAPIException</ref>);
44261 void setScreenStateChangeListener(<ref>ScreenStateChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);
44263 void unsetScreenStateChangeListener() raises(<ref>WebAPIException</ref>);
44265 double getScreenBrightness() raises(<ref>WebAPIException</ref>);
44267 void setScreenBrightness(double brightness) raises(<ref>WebAPIException</ref>);
44269 boolean isScreenOn() raises(<ref>WebAPIException</ref>);
44271 void restoreScreenBrightness() raises(<ref>WebAPIException</ref>);
44273 void turnScreenOn() raises(<ref>WebAPIException</ref>);
44275 void turnScreenOff() raises(<ref>WebAPIException</ref>);
44279 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.
44285 <ExtendedAttributeList>
44286 <ExtendedAttribute name="NoInterfaceObject">
44287 <webidl>NoInterfaceObject</webidl>
44288 </ExtendedAttribute>
44289 </ExtendedAttributeList>
44290 <Operation name="request" id="::Power::PowerManager::request">
44291 <webidl> void request(<ref>PowerResource</ref> resource, <ref>PowerState</ref> state) raises(<ref>WebAPIException</ref>);</webidl>
44294 Requests the minimum-state for a power resource.
44303 http://tizen.org/privilege/power
44305 <Code> tizen.power.request("SCREEN", "SCREEN_NORMAL");
44308 <Type type="void"/>
44310 <Argument name="resource">
44313 The power resource for which the request is made.
44316 <Type name="PowerResource"/>
44318 <Argument name="state">
44321 The minimal power state in which the power resource is desired to be.
44324 <Type name="PowerState"/>
44328 <RaiseException name="WebAPIException">
44331 with error type TypeMismatchError, if the input parameter is not
44332 compatible with the expected type.
44335 with error type NotSupportedError, if this feature is not supported.
44338 with error type InvalidValuesError, if any of the input
44339 parameters contain an invalid value.
44342 with error type SecurityError, if the application does not have the privilege to call this method.
44345 with error type UnknownError in any other error case.
44351 <Operation name="release" id="::Power::PowerManager::release">
44352 <webidl> void release(<ref>PowerResource</ref> resource) raises(<ref>WebAPIException</ref>);</webidl>
44355 Releases the power state request for the given resource.
44360 <Code> // Release SCREEN resource.
44361 tizen.power.release("SCREEN");
44364 <Type type="void"/>
44366 <Argument name="resource">
44369 The resource for which requests are to be removed.
44372 <Type name="PowerResource"/>
44376 <RaiseException name="WebAPIException">
44379 with error type TypeMismatchError, if the input parameter is not
44380 compatible with the expected type.
44383 with error type NotSupportedError, if this feature is not supported.
44386 with error type InvalidValuesError, if any of the input
44387 parameters contain an invalid value.
44390 with error type UnknownError in any other error case.
44396 <Operation name="setScreenStateChangeListener" id="::Power::PowerManager::setScreenStateChangeListener">
44397 <webidl> void setScreenStateChangeListener(<ref>ScreenStateChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);</webidl>
44400 Sets the screen state change callback and monitors its state changes.
44405 <Code> function onScreenStateChanged(previousState, changedState) {
44406 console.log("Screen state changed from " + previousState + " to " + changedState);
44409 // Set the screen state change listener.
44410 tizen.power.setScreenStateChangeListener(onScreenStateChanged);
44413 <Type type="void"/>
44415 <Argument name="listener">
44418 The screen state change callback.
44421 <Type name="ScreenStateChangeCallback"/>
44425 <RaiseException name="WebAPIException">
44428 with error type TypeMismatchError, if the input parameter is not
44429 compatible with the expected type.
44432 with error type NotSupportedError, if this feature is not supported.
44435 with error type InvalidValuesError, if any of the input
44436 parameters contain an invalid value.
44439 with error type UnknownError in any other error case.
44445 <Operation name="unsetScreenStateChangeListener" id="::Power::PowerManager::unsetScreenStateChangeListener">
44446 <webidl> void unsetScreenStateChangeListener() raises(<ref>WebAPIException</ref>);</webidl>
44449 Unsets the screen state change callback and stop monitoring it.
44454 <Code> // Unset the screen state change listener.
44455 tizen.power.unsetScreenStateChangeListener();
44458 <Type type="void"/>
44461 <RaiseException name="WebAPIException">
44464 with error type NotSupportedError, if this feature is not supported.
44467 with error type UnknownError in any other error case.
44473 <Operation name="getScreenBrightness" id="::Power::PowerManager::getScreenBrightness">
44474 <webidl> double getScreenBrightness() raises(<ref>WebAPIException</ref>);</webidl>
44477 Gets the screen brightness level of an application, from 0 to 1.
44482 <Code> // Get the current screen brightness value.
44483 var screenBrightness = tizen.power.getScreenBrightness();
44486 <Type type="double">
44489 double Current screen brightness value.
44495 <RaiseException name="WebAPIException">
44498 with error type NotSupportedError, if this feature is not supported.
44501 with error type UnknownError in any other error case.
44507 <Operation name="setScreenBrightness" id="::Power::PowerManager::setScreenBrightness">
44508 <webidl> void setScreenBrightness(double brightness) raises(<ref>WebAPIException</ref>);</webidl>
44511 Sets the screen brightness level for an application, from 0 to 1.
44515 An approximation is made for best effort when the given value is not exactly applicable by the hardware or system.
44525 http://tizen.org/privilege/power
44527 <Code> // Set the screen brightness value for the application.
44528 tizen.power.setScreenBrightness(1);
44531 <Type type="void"/>
44533 <Argument name="brightness">
44536 The screen brightness value to set.
44539 <Type type="double"/>
44543 <RaiseException name="WebAPIException">
44546 with error type TypeMismatchError, if the input parameter is not
44547 compatible with the expected type.
44550 with error type NotSupportedError, if this feature is not supported.
44553 with error type InvalidValuesError, if any of the input
44554 parameters contain an invalid value.
44557 with error type SecurityError, if the application does not have the privilege to call this method.
44560 with error type UnknownError in any other error case.
44566 <Operation name="isScreenOn" id="::Power::PowerManager::isScreenOn">
44567 <webidl> boolean isScreenOn() raises(<ref>WebAPIException</ref>);</webidl>
44570 Returns <var>true</var> if the screen is on.
44575 <Code> // Check whether the screen is on or off.
44576 var isScreenOn = tizen.power.isScreenOn();
44579 <Type type="boolean">
44582 boolean true if screen is on.
44588 <RaiseException name="WebAPIException">
44591 with error type NotSupportedError, if this feature is not supported.
44594 with error type UnknownError in any other error case.
44600 <Operation name="restoreScreenBrightness" id="::Power::PowerManager::restoreScreenBrightness">
44601 <webidl> void restoreScreenBrightness() raises(<ref>WebAPIException</ref>);</webidl>
44604 Restores the screen brightness to the system default setting value.
44609 <Code> // Restore the screen brightness value to the system default setting value.
44610 tizen.power.restoreScreenBrightness();
44613 <Type type="void"/>
44616 <RaiseException name="WebAPIException">
44619 with error type NotSupportedError, if this feature is not supported.
44622 with error type UnknownError in any other error case.
44628 <Operation name="turnScreenOn" id="::Power::PowerManager::turnScreenOn">
44629 <webidl> void turnScreenOn() raises(<ref>WebAPIException</ref>);</webidl>
44632 Turns on the screen.
44636 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.
44646 http://tizen.org/privilege/power
44648 <Code> // Turn on the screen.
44649 tizen.power.turnScreenOn();
44652 <Type type="void"/>
44655 <RaiseException name="WebAPIException">
44658 with error type NotSupportedError, if this feature is not supported.
44661 with error type SecurityError, if the application does not have the privilege to call this method.
44664 with error type UnknownError in any other error case.
44670 <Operation name="turnScreenOff" id="::Power::PowerManager::turnScreenOff">
44671 <webidl> void turnScreenOff() raises(<ref>WebAPIException</ref>);</webidl>
44674 Turns off the screen.
44678 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
44688 http://tizen.org/privilege/power
44690 <Code> // Turn off the screen.
44691 tizen.power.turnScreenOff();
44694 <Type type="void"/>
44697 <RaiseException name="WebAPIException">
44700 with error type NotSupportedError, if this feature is not supported.
44703 with error type SecurityError, if the application does not have the privilege to call this method.
44706 with error type UnknownError in any other error case.
44713 <Interface name="ScreenStateChangeCallback" id="::Power::ScreenStateChangeCallback">
44714 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ScreenStateChangeCallback {
44715 void onchanged(<ref>PowerScreenState</ref> previousState, <ref>PowerScreenState</ref> changedState);
44719 This callback interface defines notification for the screen state changes.
44725 <ExtendedAttributeList>
44726 <ExtendedAttribute name="Callback" value="FunctionOnly">
44727 <webidl>Callback</webidl>
44728 </ExtendedAttribute>
44729 <ExtendedAttribute name="NoInterfaceObject">
44730 <webidl> NoInterfaceObject</webidl>
44731 </ExtendedAttribute>
44732 </ExtendedAttributeList>
44733 <Operation name="onchanged" id="::Power::ScreenStateChangeCallback::onchanged">
44734 <webidl> void onchanged(<ref>PowerScreenState</ref> previousState, <ref>PowerScreenState</ref> changedState);</webidl>
44737 Called on screen state change.
44743 <Type type="void"/>
44745 <Argument name="previousState">
44748 The previous screen state.
44751 <Type name="PowerScreenState"/>
44753 <Argument name="changedState">
44756 The changed screen state.
44759 <Type name="PowerScreenState"/>
44765 <Module name="Push" id="::Push">
44766 <webidl>module Push {
44768 typedef DOMString PushRegistrationId;
44771 [NoInterfaceObject] interface PushManagerObject {
44772 readonly attribute <ref>PushManager</ref> push;
44774 <ref>Tizen</ref> implements <ref>PushManagerObject</ref>;
44777 [NoInterfaceObject] interface PushManager {
44779 void registerService(<ref>ApplicationControl</ref> appControl, <ref>PushRegisterSuccessCallback</ref> successCallback,
44780 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
44783 void unregisterService(optional <ref>SuccessCallback</ref>? successCallback,
44784 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
44787 void connectService(<ref>PushNotificationCallback</ref> notificationCallback) raises(<ref>WebAPIException</ref>);
44790 void disconnectService() raises(<ref>WebAPIException</ref>);
44793 <ref>PushRegistrationId</ref> getRegistrationId() raises(<ref>WebAPIException</ref>);
44797 [NoInterfaceObject] interface PushMessage {
44799 readonly attribute DOMString appData;
44802 readonly attribute DOMString alertMessage;
44805 readonly attribute Date date;
44809 [Callback=FunctionOnly, NoInterfaceObject]
44810 interface PushRegisterSuccessCallback {
44812 void onsuccess(<ref>PushRegistrationId</ref> id);
44816 [Callback=FunctionOnly, NoInterfaceObject]
44817 interface PushNotificationCallback {
44819 void onsuccess(<ref>PushMessage</ref> message);
44824 This API provides the functionality for receiving push notifications
44825 from Tizen push server.
44826 The push service is a client daemon that maintains a permanent connection
44827 between your device and Tizen push server in order to process your registration
44828 and deregistration requests, deliver push notifications to applications on a device.
44832 If the application is connected, the push service passes the notification data over
44833 the connection. Otherwise, the push service posts UI notification with the data.
44834 It will be delivered when a user launches the application by selecting the posting.
44837 To receive push notifications, follow the steps below:
44841 Get administrative permission for an application on your device </li>
44843 Register the application </li>
44845 Connect to the push service </li>
44847 Get notification data </li>
44850 For more information on the Push features, see <a href="../../org.tizen.web.appprogramming/html/guide/communication_guide/push.htm">Push Guide</a>.
44856 <def-api-feature identifier="http://tizen.org/feature/network.push">
44860 To guarantee this application running on a device with Push feature, define below in the config file:
44866 <Typedef name="PushRegistrationId" id="::Push::PushRegistrationId">
44867 <webidl> typedef DOMString PushRegistrationId;</webidl>
44870 A push service registration identifier.
44876 <Type type="DOMString"/>
44878 <Interface name="PushManagerObject" id="::Push::PushManagerObject">
44879 <webidl> [NoInterfaceObject] interface PushManagerObject {
44880 readonly attribute <ref>PushManager</ref> push;
44884 This interface defines what is instantiated by the <em>Tizen </em>object from the Tizen Platform.
44888 There will be a <em>tizen.push </em>object that allows access to the functionality of the Push API.
44895 <ExtendedAttributeList>
44896 <ExtendedAttribute name="NoInterfaceObject">
44897 <webidl>NoInterfaceObject</webidl>
44898 </ExtendedAttribute>
44899 </ExtendedAttributeList>
44900 <Attribute readonly="readonly" name="push" id="::Push::PushManagerObject::push">
44901 <webidl> readonly attribute <ref>PushManager</ref> push;</webidl>
44902 <Type name="PushManager"/>
44905 <Implements name1="Tizen" name2="PushManagerObject">
44906 <webidl> <ref>Tizen</ref> implements <ref>PushManagerObject</ref>;</webidl>
44908 <Interface name="PushManager" id="::Push::PushManager">
44909 <webidl> [NoInterfaceObject] interface PushManager {
44911 void registerService(<ref>ApplicationControl</ref> appControl, <ref>PushRegisterSuccessCallback</ref> successCallback,
44912 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
44915 void unregisterService(optional <ref>SuccessCallback</ref>? successCallback,
44916 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
44919 void connectService(<ref>PushNotificationCallback</ref> notificationCallback) raises(<ref>WebAPIException</ref>);
44922 void disconnectService() raises(<ref>WebAPIException</ref>);
44925 <ref>PushRegistrationId</ref> getRegistrationId() raises(<ref>WebAPIException</ref>);
44929 This interface provides methods to manage push registration and notification.
44935 <ExtendedAttributeList>
44936 <ExtendedAttribute name="NoInterfaceObject">
44937 <webidl>NoInterfaceObject</webidl>
44938 </ExtendedAttribute>
44939 </ExtendedAttributeList>
44940 <Operation name="registerService" id="::Push::PushManager::registerService">
44941 <webidl> void registerService(<ref>ApplicationControl</ref> appControl, <ref>PushRegisterSuccessCallback</ref> successCallback,
44942 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
44945 Registers an application to the Tizen push server.
44948 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>.
44952 The <em>ErrorCallback()</em> is launched with these error types:
44956 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
44958 UnknownError - If any other error occurs. </li>
44968 http://tizen.org/privilege/push
44970 <Code> // Defines the data to be used when this process is launched by notification service.
44971 var service = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/push_test");
44973 // Defines the error callback.
44974 function errorCallback(response) {
44975 console.log( 'The following error occurred: ' + response.name);
44978 // Defines the registration success callback
44979 function registerSuccessCallback(id) {
44980 console.log("Registration succeeded with id: " + id);
44983 // Requests registration.
44984 tizen.push.registerService(service, registerSuccessCallback, errorCallback);
44987 <Type type="void"/>
44989 <Argument name="appControl">
44992 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>.
44995 <Type name="ApplicationControl"/>
44997 <Argument name="successCallback">
45000 The method to be called when the registration request succeeds.
45003 <Type name="PushRegisterSuccessCallback"/>
45005 <Argument optional="optional" name="errorCallback">
45008 The method to be called when the registration request fails.
45011 <Type name="ErrorCallback" nullable="nullable"/>
45015 <RaiseException name="WebAPIException">
45018 with error type TypeMismatchError, if any input parameter
45019 is not compatible with the expected type for that parameter.
45022 with error type InvalidValuesError, if any input parameters
45023 does not contain a valid value.
45026 with error type SecurityError, if the application does not have the privilege to call this method.
45029 with error type NotSupportedError, if this feature is not supported.
45032 with error type UnknownError, if any other error occurs.
45038 <Operation name="unregisterService" id="::Push::PushManager::unregisterService">
45039 <webidl> void unregisterService(optional <ref>SuccessCallback</ref>? successCallback,
45040 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
45043 Unregisters an application from the Tizen push server.
45047 The <em>ErrorCallback()</em> is launched with these error types:
45051 UnknownError - If an unknown error occurs. </li>
45061 http://tizen.org/privilege/push
45063 <Code> // Defines the error callback
45064 function errorCallback(response) {
45065 console.log( 'The following error occurred: ' + response.name);
45068 // Defines the unregistration success callback
45069 function unregisterSuccessCallback() {
45070 console.log("Unregistration succeeded.");
45073 // Requests unregistration
45074 tizen.push.unregisterService(unregisterSuccessCallback, errorCallback);
45077 <Type type="void"/>
45079 <Argument optional="optional" name="successCallback">
45082 The method to be called when the request is successfully unregistered.
45085 <Type name="SuccessCallback" nullable="nullable"/>
45087 <Argument optional="optional" name="errorCallback">
45090 The method to be called when the unregistration request fails.
45093 <Type name="ErrorCallback" nullable="nullable"/>
45097 <RaiseException name="WebAPIException">
45100 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
45103 with error type InvalidValuesError, if any input parameters does not contain a valid value.
45106 with error type SecurityError, if the application does not have the privilege to call this method.
45109 with error type NotSupportedError, if this feature is not supported.
45112 with error type UnknownError, if any other error occurs.
45118 <Operation name="connectService" id="::Push::PushManager::connectService">
45119 <webidl> void connectService(<ref>PushNotificationCallback</ref> notificationCallback) raises(<ref>WebAPIException</ref>);</webidl>
45122 Connects to the push service and receives push notifications.
45131 http://tizen.org/privilege/push
45133 <Code> // Defines the connect success callback
45134 function notificationCallback(noti) {
45135 console.log("Notification received with alert message: " + noti.alertMessage);
45138 // Requests for push service connection
45139 tizen.push.connectService(notificationCallback, errorCallback);
45142 <Type type="void"/>
45144 <Argument name="notificationCallback">
45147 The method to be called when the notification message arrives.
45150 <Type name="PushNotificationCallback"/>
45154 <RaiseException name="WebAPIException">
45157 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
45160 with error type InvalidValuesError, if any input parameters does not contain a valid value.
45163 with error type SecurityError, if the application does not have the privilege to call this method.
45166 with error type NotSupportedError, if this feature is not supported.
45169 with error type UnknownError, if any other error occurs.
45175 <Operation name="disconnectService" id="::Push::PushManager::disconnectService">
45176 <webidl> void disconnectService() raises(<ref>WebAPIException</ref>);</webidl>
45179 Disconnects to the push service and stop receiving push notifications.
45188 http://tizen.org/privilege/push
45190 <Code> // Requests disconnection
45191 tizen.push.disconnectService();
45194 <Type type="void"/>
45197 <RaiseException name="WebAPIException">
45200 with error type SecurityError, if the application does not have the privilege to call this method.
45203 with error type NotSupportedError, if this feature is not supported.
45206 with error type UnknownError, if any other error occurs.
45212 <Operation name="getRegistrationId" id="::Push::PushManager::getRegistrationId">
45213 <webidl> <ref>PushRegistrationId</ref> getRegistrationId() raises(<ref>WebAPIException</ref>);</webidl>
45216 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.
45225 http://tizen.org/privilege/push
45227 <Code> var registrationId = tizen.push.getRegistrationId();
45228 if ( registrationId != NULL ) {
45229 console.log("The registration id: " + registrationId);
45233 <Type name="PushRegistrationId"/>
45236 <RaiseException name="WebAPIException">
45239 with error type SecurityError, if the application does not have the privilege to call this method.
45242 with error type NotSupportedError, if this feature is not supported.
45245 with error type UnknownError, if any other error occurs.
45252 <Interface name="PushMessage" id="::Push::PushMessage">
45253 <webidl> [NoInterfaceObject] interface PushMessage {
45255 readonly attribute DOMString appData;
45258 readonly attribute DOMString alertMessage;
45261 readonly attribute Date date;
45265 This interface specifies the push message that is delivered from the push service.
45271 <ExtendedAttributeList>
45272 <ExtendedAttribute name="NoInterfaceObject">
45273 <webidl>NoInterfaceObject</webidl>
45274 </ExtendedAttribute>
45275 </ExtendedAttributeList>
45276 <Attribute readonly="readonly" name="appData" id="::Push::PushMessage::appData">
45277 <webidl> readonly attribute DOMString appData;</webidl>
45280 An attribute to store the push notification data.
45284 This data is the message that the sender wants to send and its length must be less than 1 KB.
45291 <Type type="DOMString"/>
45293 <Attribute readonly="readonly" name="alertMessage" id="::Push::PushMessage::alertMessage">
45294 <webidl> readonly attribute DOMString alertMessage;</webidl>
45297 An attribute to store the push notification message that is displayed as an alert message to the user.
45303 <Type type="DOMString"/>
45305 <Attribute readonly="readonly" name="date" id="::Push::PushMessage::date">
45306 <webidl> readonly attribute Date date;</webidl>
45309 An attribute to store the date/time when a push notification message is received.
45315 <Type type="Date"/>
45318 <Interface name="PushRegisterSuccessCallback" id="::Push::PushRegisterSuccessCallback">
45319 <webidl> [Callback=FunctionOnly, NoInterfaceObject]
45320 interface PushRegisterSuccessCallback {
45322 void onsuccess(<ref>PushRegistrationId</ref> id);
45326 This interface specifies the success callback for push service registration request.
45330 This success callback is invoked when a push service registration request is successful.
45337 <ExtendedAttributeList>
45338 <ExtendedAttribute name="Callback" value="FunctionOnly">
45339 <webidl>Callback</webidl>
45340 </ExtendedAttribute>
45341 <ExtendedAttribute name="NoInterfaceObject">
45342 <webidl> NoInterfaceObject</webidl>
45343 </ExtendedAttribute>
45344 </ExtendedAttributeList>
45345 <Operation name="onsuccess" id="::Push::PushRegisterSuccessCallback::onsuccess">
45346 <webidl> void onsuccess(<ref>PushRegistrationId</ref> id);</webidl>
45349 Called when a push service registration request is successful.
45355 <Type type="void"/>
45357 <Argument name="id">
45360 The registration ID.
45363 <Type name="PushRegistrationId"/>
45368 <Interface name="PushNotificationCallback" id="::Push::PushNotificationCallback">
45369 <webidl> [Callback=FunctionOnly, NoInterfaceObject]
45370 interface PushNotificationCallback {
45372 void onsuccess(<ref>PushMessage</ref> message);
45376 This interface specifies the notification callback for the received push notification message.
45380 This notification callback is invoked when the push notification message arrives.
45387 <ExtendedAttributeList>
45388 <ExtendedAttribute name="Callback" value="FunctionOnly">
45389 <webidl>Callback</webidl>
45390 </ExtendedAttribute>
45391 <ExtendedAttribute name="NoInterfaceObject">
45392 <webidl> NoInterfaceObject</webidl>
45393 </ExtendedAttribute>
45394 </ExtendedAttributeList>
45395 <Operation name="onsuccess" id="::Push::PushNotificationCallback::onsuccess">
45396 <webidl> void onsuccess(<ref>PushMessage</ref> message);</webidl>
45399 Called when the push notification message arrives.
45405 <Type type="void"/>
45407 <Argument name="message">
45410 The received push notification message.
45413 <Type name="PushMessage"/>
45419 <Module name="SecureElement" id="::SecureElement">
45420 <webidl>module SecureElement {
45422 [NoInterfaceObject] interface SEServiceManagerObject {
45423 readonly attribute <ref>SEService</ref> seService;
45425 <ref>Tizen</ref> implements <ref>SEServiceManagerObject</ref>;
45428 [NoInterfaceObject] interface SEService
45431 void getReaders(<ref>ReaderArraySuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45433 unsigned long registerSEListener(<ref>SEChangeListener</ref> listener) raises(<ref>WebAPIException</ref>);
45435 void unregisterSEListener(unsigned long id) raises(<ref>WebAPIException</ref>);
45438 void shutdown() raises(<ref>WebAPIException</ref>);
45442 [NoInterfaceObject] interface Reader
45445 readonly attribute boolean isPresent;
45447 DOMString getName() raises(<ref>WebAPIException</ref>);
45449 void openSession(<ref>SessionSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45451 void closeSessions() raises(<ref>WebAPIException</ref>);
45454 [NoInterfaceObject] interface Session
45457 readonly attribute boolean isClosed;
45459 void openBasicChannel(byte[] aid, <ref>ChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45461 void openLogicalChannel(byte[] aid, <ref>ChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45463 byte[] getATR() raises(<ref>WebAPIException</ref>);
45465 void close() raises(<ref>WebAPIException</ref>);
45467 void closeChannels() raises(<ref>WebAPIException</ref>);
45471 [NoInterfaceObject] interface Channel {
45473 readonly attribute boolean isBasicChannel;
45475 void close() raises(<ref>WebAPIException</ref>);
45478 void transmit(byte[] command, <ref>TransmitSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45482 [Callback, NoInterfaceObject] interface SEChangeListener {
45484 void onSEReady(<ref>Reader</ref> reader);
45486 void onSENotReady(<ref>Reader</ref> reader);
45490 [Callback=FunctionOnly, NoInterfaceObject] interface ReaderArraySuccessCallback {
45492 void onsuccess(<ref>Reader</ref>[] readers);
45496 [Callback=FunctionOnly, NoInterfaceObject] interface SessionSuccessCallback {
45498 void onsuccess(<ref>Session</ref> session);
45502 [Callback=FunctionOnly, NoInterfaceObject] interface ChannelSuccessCallback {
45504 void onsuccess(<ref>Channel</ref> channel);
45508 [Callback=FunctionOnly, NoInterfaceObject] interface TransmitSuccessCallback {
45510 void onsuccess(byte[] response);
45515 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.
45519 This API provides functionality to communicate with applications in several Secure Elements.
45525 <def-api-feature identifier="http://tizen.org/feature/network.secure_element">
45529 To guarantee this application running on a device with SecureElement feature, define below in the config file:
45535 <Interface name="SEServiceManagerObject" id="::SecureElement::SEServiceManagerObject">
45536 <webidl> [NoInterfaceObject] interface SEServiceManagerObject {
45537 readonly attribute <ref>SEService</ref> seService;
45541 Defines what is instantiated by the Tizen object from the Tizen Platform.
45545 There is a <em>tizen.seService</em> object that allows access to the functionalities of the Secure Element API.
45552 <ExtendedAttributeList>
45553 <ExtendedAttribute name="NoInterfaceObject">
45554 <webidl>NoInterfaceObject</webidl>
45555 </ExtendedAttribute>
45556 </ExtendedAttributeList>
45557 <Attribute readonly="readonly" name="seService" id="::SecureElement::SEServiceManagerObject::seService">
45558 <webidl> readonly attribute <ref>SEService</ref> seService;</webidl>
45559 <Type name="SEService"/>
45562 <Implements name1="Tizen" name2="SEServiceManagerObject">
45563 <webidl> <ref>Tizen</ref> implements <ref>SEServiceManagerObject</ref>;</webidl>
45565 <Interface name="SEService" id="::SecureElement::SEService">
45566 <webidl> [NoInterfaceObject] interface SEService
45569 void getReaders(<ref>ReaderArraySuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45571 unsigned long registerSEListener(<ref>SEChangeListener</ref> listener) raises(<ref>WebAPIException</ref>);
45573 void unregisterSEListener(unsigned long id) raises(<ref>WebAPIException</ref>);
45576 void shutdown() raises(<ref>WebAPIException</ref>);
45580 This interface provides access to the available Secure Element readers.
45584 It provides access to the API functionalities through the <em>tizen.seService</em> interface.
45591 <ExtendedAttributeList>
45592 <ExtendedAttribute name="NoInterfaceObject">
45593 <webidl>NoInterfaceObject</webidl>
45594 </ExtendedAttribute>
45595 </ExtendedAttributeList>
45596 <Operation name="getReaders" id="::SecureElement::SEService::getReaders">
45597 <webidl> void getReaders(<ref>ReaderArraySuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
45600 Gets all the available Secure Element readers.
45604 The ErrorCallback is launched with these error types:
45608 UnknownError - If any error occurs during retrieval. </li>
45615 http://tizen.org/privilege/secureelement
45621 function success(readers) {
45622 for (var i = 0; i < readers.length; i++) {
45623 if (readers[i].isPresent) {
45624 console.log ("Reader Name : " + readers[i].getName());
45628 function error(err) {
45629 console.log (err.name + ": " + err.message);
45631 tizen.seService.getReaders(success, error);
45633 console.log (err.name + ": " + err.message);
45637 <Type type="void"/>
45639 <Argument name="successCallback">
45642 The method to be invoked when the list of available Secure Element readers has been successfully retrieved
45645 <Type name="ReaderArraySuccessCallback"/>
45647 <Argument optional="optional" name="errorCallback">
45650 The method to call when an error occurs
45653 <Type name="ErrorCallback" nullable="nullable"/>
45657 <RaiseException name="WebAPIException">
45660 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
45663 with error type SecurityError, if the application does not have the privilege to call this method.
45669 <Operation name="registerSEListener" id="::SecureElement::SEService::registerSEListener">
45670 <webidl> unsigned long registerSEListener(<ref>SEChangeListener</ref> listener) raises(<ref>WebAPIException</ref>);</webidl>
45673 Registers a callback function that is invoked when an available Secure Element reader is detected.
45679 http://tizen.org/privilege/secureelement
45685 var seListener = tizen.seService.registerSEListener({
45686 onSEReady:function(reader) {
45687 console.log (reader.getName() + "is ready.");
45688 }, onSENotReady:function(reader) {
45689 console.log (reader.getName() + "is not ready.");
45692 console.log (err.name + ": " + err.message);
45696 <Type type="unsigned long">
45699 unsigned long An identifier used to clear the watch subscription.
45704 <Argument name="listener">
45707 A listener to be invoked for successful detection of available Secure Element readers.
45710 <Type name="SEChangeListener"/>
45714 <RaiseException name="WebAPIException">
45717 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
45720 with error type SecurityError, if the application does not have the privilege to call this method.
45723 with error type UnknownError, if any other error occurs.
45729 <Operation name="unregisterSEListener" id="::SecureElement::SEService::unregisterSEListener">
45730 <webidl> void unregisterSEListener(unsigned long id) raises(<ref>WebAPIException</ref>);</webidl>
45733 Unregisters the listener from notifying any detection of an available Secure Element reader.
45739 http://tizen.org/privilege/secureelement
45744 <Code> var seListener; //seListener obtained from registerSEListener
45746 tizen.seService.unregisterSEListener(seListener);
45748 console.log (err.name + ": " + err.message);
45752 <Type type="void"/>
45754 <Argument name="id">
45757 A subscription identifier that is returned by the <em>registerSEListener()</em> method.
45760 <Type type="unsigned long"/>
45764 <RaiseException name="WebAPIException">
45767 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
45770 with error type InvalidValuesError, if any of the input parameters contains an invalid value.
45773 with error type SecurityError, if the application does not have the privilege to call this method.
45776 with error type UnknownError, if any other error occurs.
45782 <Operation name="shutdown" id="::SecureElement::SEService::shutdown">
45783 <webidl> void shutdown() raises(<ref>WebAPIException</ref>);</webidl>
45786 Shuts down Secure Elements after releasing all resources.
45792 http://tizen.org/privilege/secureelement
45798 tizen.seService.shutdown();
45800 console.log (err.name + ": " + err.message);
45804 <Type type="void"/>
45807 <RaiseException name="WebAPIException">
45810 with error type SecurityError, if the application does not have the privilege to call this method.
45813 with error type UnknownError, if any other error occurs.
45820 <Interface name="Reader" id="::SecureElement::Reader">
45821 <webidl> [NoInterfaceObject] interface Reader
45824 readonly attribute boolean isPresent;
45826 DOMString getName() raises(<ref>WebAPIException</ref>);
45828 void openSession(<ref>SessionSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45830 void closeSessions() raises(<ref>WebAPIException</ref>);
45834 Reader interface that is connected to this device.
45838 This interface offers methods to control sessions on the reader.
45845 <ExtendedAttributeList>
45846 <ExtendedAttribute name="NoInterfaceObject">
45847 <webidl>NoInterfaceObject</webidl>
45848 </ExtendedAttribute>
45849 </ExtendedAttributeList>
45850 <Attribute readonly="readonly" name="isPresent" id="::SecureElement::Reader::isPresent">
45851 <webidl> readonly attribute boolean isPresent;</webidl>
45854 An attribute to check whether a Secure Element is present on a reader.
45860 <Type type="boolean"/>
45862 <Operation name="getName" id="::SecureElement::Reader::getName">
45863 <webidl> DOMString getName() raises(<ref>WebAPIException</ref>);</webidl>
45866 Gets reader's name.
45872 http://tizen.org/privilege/secureelement
45878 function success(readers) {
45879 for (var i = 0; i < readers.length; i++) {
45880 if (readers[i].isPresent) {
45881 console.log ("Reader Name : " + readers[i].getName());
45885 function error(err) {
45886 console.log (err.name + ": " + err.message);
45888 tizen.seService.getReaders(success, error);
45890 console.log (err.name + ": " + err.message);
45894 <Type type="DOMString">
45897 DOMString The name of the reader.
45903 <RaiseException name="WebAPIException">
45906 with error type SecurityError, if the application does not have the privilege to call this method.
45909 with error type UnknownError, if any other error occurs.
45915 <Operation name="openSession" id="::SecureElement::Reader::openSession">
45916 <webidl> void openSession(<ref>SessionSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
45919 Opens a session on a reader.
45923 The ErrorCallback is launched with these error types:
45927 IOError - An error occurred in communication with the Secure Element in this reader. </li>
45929 InvalidStateError - If a Secure Element is not present on this reader. </li>
45931 UnknownError - If any other error occurs. </li>
45938 http://tizen.org/privilege/secureelement
45944 function success(session) {
45945 console.log ("Open Session Success : " + !session.isClosed);
45947 function error(err) {
45948 console.log (err.name + ": " + err.message);
45950 reader.openSession(success, error);
45952 console.log (err.name + ": " + err.message);
45956 <Type type="void"/>
45958 <Argument name="successCallback">
45961 The method to be invoked when a session has been successfully opened
45964 <Type name="SessionSuccessCallback"/>
45966 <Argument optional="optional" name="errorCallback">
45969 The method to be called when an error occurs
45972 <Type name="ErrorCallback" nullable="nullable"/>
45976 <RaiseException name="WebAPIException">
45979 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
45982 with error type SecurityError, if the application does not have the privilege to call this method.
45988 <Operation name="closeSessions" id="::SecureElement::Reader::closeSessions">
45989 <webidl> void closeSessions() raises(<ref>WebAPIException</ref>);</webidl>
45992 Closes all sessions opened on a reader.
45998 http://tizen.org/privilege/secureelement
46004 reader.closeSessions();
46006 console.log (err.name + ": " + err.message);
46010 <Type type="void"/>
46013 <RaiseException name="WebAPIException">
46016 with error type SecurityError, if the application does not have the privilege to call this method.
46019 with error type UnknownError in any other error case.
46026 <Interface name="Session" id="::SecureElement::Session">
46027 <webidl> [NoInterfaceObject] interface Session
46030 readonly attribute boolean isClosed;
46032 void openBasicChannel(byte[] aid, <ref>ChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
46034 void openLogicalChannel(byte[] aid, <ref>ChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
46036 byte[] getATR() raises(<ref>WebAPIException</ref>);
46038 void close() raises(<ref>WebAPIException</ref>);
46040 void closeChannels() raises(<ref>WebAPIException</ref>);
46044 This interface is connected to one of the readers and offers methods to control channels in a session.
46050 <ExtendedAttributeList>
46051 <ExtendedAttribute name="NoInterfaceObject">
46052 <webidl>NoInterfaceObject</webidl>
46053 </ExtendedAttribute>
46054 </ExtendedAttributeList>
46055 <Attribute readonly="readonly" name="isClosed" id="::SecureElement::Session::isClosed">
46056 <webidl> readonly attribute boolean isClosed;</webidl>
46059 An attribute to check whether a session is closed or not.
46065 <Type type="boolean"/>
46067 <Operation name="openBasicChannel" id="::SecureElement::Session::openBasicChannel">
46068 <webidl> void openBasicChannel(byte[] aid, <ref>ChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
46071 Opens a basic channel in a session.
46072 The basic channel (defined in the ISO7816-4 specification) is opened by default and its channel ID is <var>0</var>.
46073 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.
46074 Some Secure Elements might always deny opening a basic channel.
46078 The ErrorCallback is launched with these error types:
46082 IOError - If an error occurs while communicating with the Secure Element in the reader. </li>
46084 SecurityError - If access to this AID or the default application on this session is not allowed . </li>
46086 InvalidStateError - If this session is closed. </li>
46088 NotFoundError - If the application of the AID does not exist in the Secure Element. </li>
46090 NoChannelError - If basic channel is unavailable. </li>
46092 UnknownError - If any other error occurs. </li>
46099 http://tizen.org/privilege/secureelement
46105 function successChannel(channel) {
46106 if (channel.isBasicChannel) {
46107 console.log ("Basic channel is opened.");
46109 console.log ("Logical channel is opened.");
46112 function errorChannel(err) {
46113 console.log ("openBasicChannel Error :" + err.name +": " + err.message);
46116 function successSession(session) {
46117 console.log ("Open Session Success : " + !session.isClosed);
46118 // This aid is for test. Use aid for your applet in secure element.
46119 session.openBasicChannel([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe], successChannel, errorChannel);
46121 function errorSession(err) {
46122 console.log ("openSession Error : " + err.name + ": " + err.message);
46124 reader.openSession(successSession, errorSession);
46126 console.log (err.name + ": " + err.message);
46130 <Type type="void"/>
46132 <Argument name="aid">
46135 The id of the applet to select on this channel.<br/>If the array is empty, the default applet is selected in this session.
46138 <Type type="array">
46139 <Type type="byte"/>
46142 <Argument name="successCallback">
46145 The method to be invoked when a basic channel has been successfully opened
46148 <Type name="ChannelSuccessCallback"/>
46150 <Argument optional="optional" name="errorCallback">
46153 The method to be called when an error occurs
46156 <Type name="ErrorCallback" nullable="nullable"/>
46160 <RaiseException name="WebAPIException">
46163 with error type TypeMismatchError, if the input parameter
46164 is not compatible with the expected type for that parameter.
46167 with error type InvalidValuesError, if the AID's length is not within the limit: 5 to 16(inclusive).
46170 with error type SecurityError, if the application does not have the privilege to call this method.
46176 <Operation name="openLogicalChannel" id="::SecureElement::Session::openLogicalChannel">
46177 <webidl> void openLogicalChannel(byte[] aid, <ref>ChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
46180 Opens a logical channel in a session by the specified applet id.
46181 The logical channel is defined in the ISO7816-4 specification.
46185 The ErrorCallback is launched with these error types:
46189 IOError - If an error occurs while communicating with the Secure Element in the reader. </li>
46191 SecurityError - If access to this AID or the default application in this session is not allowed. </li>
46193 InvalidStateError - If this session is closed. </li>
46195 NotFoundError - If the application of the AID does not exist in the Secure Element. </li>
46197 NoChannelError - If logical channel is unavailable. </li>
46199 UnknownError - If any other error occurs. </li>
46206 http://tizen.org/privilege/secureelement
46211 <Code> var session; //Session obtained from openSession callback
46213 function successChannel(channel) {
46214 if (channel.isBasicChannel) {
46215 console.log ("Basic channel is opened.");
46217 console.log ("Logical channel is opened.");
46220 function errorChannel(err) {
46221 console.log ("openLogicalChannel Error :" + err.name + ": " + err.message);
46224 // This aid is for test. Use aid for your applet in secure element.
46225 session.openLogicalChannel([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe], successChannel, errorChannel);
46227 console.log (err.name + ": " + err.message);
46231 <Type type="void"/>
46233 <Argument name="aid">
46236 The id of the applet to select on this channel<br/>If the array is empty, the default application is selected in this session.
46239 <Type type="array">
46240 <Type type="byte"/>
46243 <Argument name="successCallback">
46246 The method to be invoked when a logical channel has been successfully opened
46249 <Type name="ChannelSuccessCallback"/>
46251 <Argument optional="optional" name="errorCallback">
46254 The method to be called when an error occurs
46257 <Type name="ErrorCallback" nullable="nullable"/>
46261 <RaiseException name="WebAPIException">
46264 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
46267 with error type InvalidValuesError, if the AID's length is not within the limit: 5 to 16(inclusive).
46270 with error type SecurityError, if the application does not have the privilege to call this method.
46276 <Operation name="getATR" id="::SecureElement::Session::getATR">
46277 <webidl> byte[] getATR() raises(<ref>WebAPIException</ref>);</webidl>
46280 Gets the answer to reset(ATR) of a Secure Element.
46286 http://tizen.org/privilege/secureelement
46291 <Code> var session; //Session obtained from openSession callback
46293 var atr = session.getATR();
46295 console.log (err.name + ": " + err.message);
46299 <Type type="array">
46302 byte[] The ATR of a Secure Element.
46305 <Type type="byte"/>
46309 <RaiseException name="WebAPIException">
46312 with error type SecurityError, if the application does not have the privilege to call this method.
46315 with error type UnknownError, if any other error occurs.
46321 <Operation name="close" id="::SecureElement::Session::close">
46322 <webidl> void close() raises(<ref>WebAPIException</ref>);</webidl>
46331 http://tizen.org/privilege/secureelement
46336 <Code> var session; //Session obtained from openSession callback
46340 console.log (err.name + ": " + err.message);
46344 <Type type="void"/>
46347 <RaiseException name="WebAPIException">
46350 with error type SecurityError, if the application does not have the privilege to call this method.
46353 with error type UnknownError, if any other error occurs.
46359 <Operation name="closeChannels" id="::SecureElement::Session::closeChannels">
46360 <webidl> void closeChannels() raises(<ref>WebAPIException</ref>);</webidl>
46363 Closes all channels on this session.
46369 http://tizen.org/privilege/secureelement
46374 <Code> var session; //Session obtained from openSession callback
46376 session.closeChannels();
46378 console.log (err.name + ": " + err.message);
46382 <Type type="void"/>
46385 <RaiseException name="WebAPIException">
46388 with error type SecurityError, if the application does not have the privilege to call this method.
46391 with error type UnknownError in any other error case.
46398 <Interface name="Channel" id="::SecureElement::Channel">
46399 <webidl> [NoInterfaceObject] interface Channel {
46401 readonly attribute boolean isBasicChannel;
46403 void close() raises(<ref>WebAPIException</ref>);
46406 void transmit(byte[] command, <ref>TransmitSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
46410 This interface is open to a Secure Element and offers methods to send Application Protocol Data Units(APDU) to the Secure Element.
46411 The channel is defined in the ISO7816-4.
46417 <ExtendedAttributeList>
46418 <ExtendedAttribute name="NoInterfaceObject">
46419 <webidl>NoInterfaceObject</webidl>
46420 </ExtendedAttribute>
46421 </ExtendedAttributeList>
46422 <Attribute readonly="readonly" name="isBasicChannel" id="::SecureElement::Channel::isBasicChannel">
46423 <webidl> readonly attribute boolean isBasicChannel;</webidl>
46426 An attribute to check whether it is a basic channel or not.
46432 <Type type="boolean"/>
46434 <Operation name="close" id="::SecureElement::Channel::close">
46435 <webidl> void close() raises(<ref>WebAPIException</ref>);</webidl>
46444 http://tizen.org/privilege/secureelement
46449 <Code> var channel; //Obtained from openLogicalChannel or openBasicChannel
46453 console.log (err.name + ": " + err.message);
46457 <Type type="void"/>
46460 <RaiseException name="WebAPIException">
46463 with error type SecurityError, if the application does not have the privilege to call this method.
46466 with error type UnknownError, if any other error occurs.
46472 <Operation name="transmit" id="::SecureElement::Channel::transmit">
46473 <webidl> void transmit(byte[] command, <ref>TransmitSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
46476 Transmits an APDU command to a Secure Element. The APDU command is defined in ISO7816-4.
46480 Some commands that are not allowed to be sent are:
46484 MANAGE_CHANNEL commands. </li>
46486 SELECT by DF Name (p1=04). </li>
46488 The commands that CLA bytes with channel numbers are de-masked. </li>
46491 The ErrorCallback is launched with these error types:
46495 InvalidValuesError - If the command contain an invalid value. </li>
46497 IOError - An error occurred while communicating with the Secure Element in the reader. </li>
46499 SecurityError - If the command is not allowed. </li>
46501 InvalidStateError - If this channel is closed. </li>
46503 UnknownError - If any other error occurs. </li>
46510 http://tizen.org/privilege/secureelement
46516 <Type type="void"/>
46518 <Argument name="command">
46521 The APDU command to transmit through this channel
46524 <Type type="array">
46525 <Type type="byte"/>
46528 <Argument name="successCallback">
46531 The method to be invoked when a command has been successfully transmitted
46534 <Type name="TransmitSuccessCallback"/>
46536 <Argument optional="optional" name="errorCallback">
46539 The method to be called when an error occurs
46542 <Type name="ErrorCallback" nullable="nullable"/>
46546 <RaiseException name="WebAPIException">
46549 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
46552 with error type SecurityError, if the application does not have the privilege to call this method.
46559 <Interface name="SEChangeListener" id="::SecureElement::SEChangeListener">
46560 <webidl> [Callback, NoInterfaceObject] interface SEChangeListener {
46562 void onSEReady(<ref>Reader</ref> reader);
46564 void onSENotReady(<ref>Reader</ref> reader);
46568 This interface provides the success callback that is invoked when a Secure Element reader is detected or lost.
46572 It is used in <em>SEService.registerSEListener()</em>.
46579 <ExtendedAttributeList>
46580 <ExtendedAttribute name="Callback">
46581 <webidl>Callback</webidl>
46582 </ExtendedAttribute>
46583 <ExtendedAttribute name="NoInterfaceObject">
46584 <webidl> NoInterfaceObject</webidl>
46585 </ExtendedAttribute>
46586 </ExtendedAttributeList>
46587 <Operation name="onSEReady" id="::SecureElement::SEChangeListener::onSEReady">
46588 <webidl> void onSEReady(<ref>Reader</ref> reader);</webidl>
46591 Called when a Secure Element reader is detected.
46597 <Type type="void"/>
46599 <Argument name="reader">
46602 A newly detected Secure Element reader
46605 <Type name="Reader"/>
46609 <Operation name="onSENotReady" id="::SecureElement::SEChangeListener::onSENotReady">
46610 <webidl> void onSENotReady(<ref>Reader</ref> reader);</webidl>
46613 Called when a Secure Element reader is lost.
46619 <Type type="void"/>
46621 <Argument name="reader">
46624 A lost Secure Element reader
46627 <Type name="Reader"/>
46632 <Interface name="ReaderArraySuccessCallback" id="::SecureElement::ReaderArraySuccessCallback">
46633 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ReaderArraySuccessCallback {
46635 void onsuccess(<ref>Reader</ref>[] readers);
46639 This callback interface provides a success callback that is invoked when a list of available Secure Element readers is retrieved.
46643 It specifies a success method with an array of <em>Reader</em> objects as an input parameter.
46644 It is used in asynchronous operations such as <em>SEService.getReaders()</em>.
46651 <ExtendedAttributeList>
46652 <ExtendedAttribute name="Callback" value="FunctionOnly">
46653 <webidl>Callback</webidl>
46654 </ExtendedAttribute>
46655 <ExtendedAttribute name="NoInterfaceObject">
46656 <webidl> NoInterfaceObject</webidl>
46657 </ExtendedAttribute>
46658 </ExtendedAttributeList>
46659 <Operation name="onsuccess" id="::SecureElement::ReaderArraySuccessCallback::onsuccess">
46660 <webidl> void onsuccess(<ref>Reader</ref>[] readers);</webidl>
46663 Called when an asynchronous call completes successfully.
46669 <Type type="void"/>
46671 <Argument name="readers">
46674 A list of available Secure Element readers
46677 <Type type="array">
46678 <Type name="Reader"/>
46684 <Interface name="SessionSuccessCallback" id="::SecureElement::SessionSuccessCallback">
46685 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface SessionSuccessCallback {
46687 void onsuccess(<ref>Session</ref> session);
46691 This interface specifies the success callback that is invoked when a session on a specific reader is open.
46695 This callback interface specifies a success method with a <em>Session</em> object as an input parameter.
46696 It is used in asynchronous operations such as <em>Reader.openSession()</em>.
46703 <ExtendedAttributeList>
46704 <ExtendedAttribute name="Callback" value="FunctionOnly">
46705 <webidl>Callback</webidl>
46706 </ExtendedAttribute>
46707 <ExtendedAttribute name="NoInterfaceObject">
46708 <webidl> NoInterfaceObject</webidl>
46709 </ExtendedAttribute>
46710 </ExtendedAttributeList>
46711 <Operation name="onsuccess" id="::SecureElement::SessionSuccessCallback::onsuccess">
46712 <webidl> void onsuccess(<ref>Session</ref> session);</webidl>
46715 Called when an asynchronous call completes successfully.
46721 <Type type="void"/>
46723 <Argument name="session">
46729 <Type name="Session"/>
46734 <Interface name="ChannelSuccessCallback" id="::SecureElement::ChannelSuccessCallback">
46735 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ChannelSuccessCallback {
46737 void onsuccess(<ref>Channel</ref> channel);
46741 This interface specifies the success callback that is invoked when a channel is open to communicate with a specific applet.
46745 This callback interface specifies a success method with a <em>Channel</em> object as an input parameter.
46746 It is used in asynchronous operations such as <em>Session.openBasicChannel() </em>or <em>Session.openLogicalChannel()</em>.
46753 <ExtendedAttributeList>
46754 <ExtendedAttribute name="Callback" value="FunctionOnly">
46755 <webidl>Callback</webidl>
46756 </ExtendedAttribute>
46757 <ExtendedAttribute name="NoInterfaceObject">
46758 <webidl> NoInterfaceObject</webidl>
46759 </ExtendedAttribute>
46760 </ExtendedAttributeList>
46761 <Operation name="onsuccess" id="::SecureElement::ChannelSuccessCallback::onsuccess">
46762 <webidl> void onsuccess(<ref>Channel</ref> channel);</webidl>
46765 Called when an asynchronous call completes successfully.
46771 <Type type="void"/>
46773 <Argument name="channel">
46779 <Type name="Channel"/>
46784 <Interface name="TransmitSuccessCallback" id="::SecureElement::TransmitSuccessCallback">
46785 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface TransmitSuccessCallback {
46787 void onsuccess(byte[] response);
46791 This interface specifies the success callback that is invoked when <em>Channel.transmit() </em>completes successfully.
46795 This callback interface specifies a success method with an array of bytes as an input parameter. It is used in <em>Channel.transmit()</em>.
46802 <ExtendedAttributeList>
46803 <ExtendedAttribute name="Callback" value="FunctionOnly">
46804 <webidl>Callback</webidl>
46805 </ExtendedAttribute>
46806 <ExtendedAttribute name="NoInterfaceObject">
46807 <webidl> NoInterfaceObject</webidl>
46808 </ExtendedAttribute>
46809 </ExtendedAttributeList>
46810 <Operation name="onsuccess" id="::SecureElement::TransmitSuccessCallback::onsuccess">
46811 <webidl> void onsuccess(byte[] response);</webidl>
46814 Called when an asynchronous call completes successfully.
46820 <Type type="void"/>
46822 <Argument name="response">
46825 An APDU command response that is transmitted on a channel
46828 <Type type="array">
46829 <Type type="byte"/>
46836 <Module name="SystemInfo" id="::SystemInfo">
46837 <webidl>module SystemInfo {
46839 enum SystemInfoPropertyId { "BATTERY" , "CPU", "STORAGE", "DISPLAY", "DEVICE_ORIENTATION", "BUILD", "LOCALE", "NETWORK", "WIFI_NETWORK", "CELLULAR_NETWORK", "SIM", "PERIPHERAL" };
46841 enum SystemInfoNetworkType { "NONE", "2G", "2.5G", "3G", "4G", "WIFI", "ETHERNET", "UNKNOWN" };
46843 enum SystemInfoDeviceOrientationStatus { "PORTRAIT_PRIMARY", "PORTRAIT_SECONDARY", "LANDSCAPE_PRIMARY", "LANDSCAPE_SECONDARY" };
46845 enum SystemInfoSimState { "ABSENT", "INITIALIZING", "READY", "PIN_REQUIRED", "PUK_REQUIRED", "NETWORK_LOCKED", "SIM_LOCKED", "UNKNOWN" };
46847 enum SystemInfoProfile { "MOBILE_FULL", "MOBILE_WEB" };
46849 [NoInterfaceObject] interface SystemInfoObject {
46850 readonly attribute <ref>SystemInfo</ref> systeminfo;
46852 <ref>Tizen</ref> implements <ref>SystemInfoObject</ref>;
46854 [NoInterfaceObject] interface SystemInfo {
46856 <ref>SystemInfoDeviceCapability</ref> getCapabilities() raises(<ref>WebAPIException</ref>);
46858 void getPropertyValue(<ref>SystemInfoPropertyId</ref> property,
46859 <ref>SystemInfoPropertySuccessCallback</ref> successCallback,
46860 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
46862 unsigned long addPropertyValueChangeListener(<ref>SystemInfoPropertyId</ref> property,
46863 <ref>SystemInfoPropertySuccessCallback</ref> successCallback,
46864 optional <ref>SystemInfoOptions</ref>? options) raises(<ref>WebAPIException</ref>);
46866 void removePropertyValueChangeListener(unsigned long listenerId) raises(<ref>WebAPIException</ref>);
46869 [NoInterfaceObject] interface SystemInfoDeviceCapability {
46870 readonly attribute boolean bluetooth;
46872 readonly attribute boolean nfc;
46874 readonly attribute boolean nfcReservedPush ;
46876 readonly attribute unsigned short multiTouchCount;
46878 readonly attribute boolean inputKeyboard;
46880 readonly attribute boolean inputKeyboardLayout;
46882 readonly attribute boolean wifi;
46884 readonly attribute boolean wifiDirect;
46886 readonly attribute boolean opengles;
46888 readonly attribute DOMString openglestextureFormat;
46890 readonly attribute boolean openglesVersion1_1;
46892 readonly attribute boolean openglesVersion2_0;
46894 readonly attribute boolean fmRadio;
46896 readonly attribute DOMString platformVersion raises(<ref>WebAPIException</ref>);
46898 readonly attribute DOMString webApiVersion raises(<ref>WebAPIException</ref>);
46900 readonly attribute DOMString nativeApiVersion raises(<ref>WebAPIException</ref>);
46902 readonly attribute DOMString platformName;
46904 readonly attribute boolean camera;
46906 readonly attribute boolean cameraFront;
46908 readonly attribute boolean cameraFrontFlash;
46910 readonly attribute boolean cameraBack;
46912 readonly attribute boolean cameraBackFlash;
46914 readonly attribute boolean location;
46916 readonly attribute boolean locationGps;
46918 readonly attribute boolean locationWps;
46920 readonly attribute boolean microphone;
46922 readonly attribute boolean usbHost;
46924 readonly attribute boolean usbAccessory;
46926 readonly attribute boolean screenOutputRca;
46928 readonly attribute boolean screenOutputHdmi;
46930 readonly attribute DOMString platformCoreCpuArch;
46932 readonly attribute DOMString platformCoreFpuArch;
46934 readonly attribute boolean sipVoip;
46936 readonly attribute DOMString duid;
46938 readonly attribute boolean speechRecognition;
46940 readonly attribute boolean speechSynthesis;
46942 readonly attribute boolean accelerometer;
46944 readonly attribute boolean accelerometerWakeup;
46946 readonly attribute boolean barometer;
46948 readonly attribute boolean barometerWakeup;
46950 readonly attribute boolean gyroscope;
46952 readonly attribute boolean gyroscopeWakeup;
46954 readonly attribute boolean magnetometer;
46956 readonly attribute boolean magnetometerWakeup;
46958 readonly attribute boolean photometer;
46960 readonly attribute boolean photometerWakeup;
46962 readonly attribute boolean proximity;
46964 readonly attribute boolean proximityWakeup;
46966 readonly attribute boolean tiltmeter;
46968 readonly attribute boolean tiltmeterWakeup;
46970 readonly attribute boolean dataEncryption;
46972 readonly attribute boolean graphicsAcceleration;
46974 readonly attribute boolean push;
46976 readonly attribute boolean telephony;
46978 readonly attribute boolean telephonyMms;
46980 readonly attribute boolean telephonySms;
46982 readonly attribute boolean screenSizeNormal;
46984 readonly attribute boolean screenSize480_800;
46986 readonly attribute boolean screenSize720_1280;
46988 readonly attribute boolean autoRotation;
46990 readonly attribute boolean shellAppWidget;
46992 readonly attribute boolean visionImageRecognition;
46994 readonly attribute boolean visionQrcodeGeneration;
46996 readonly attribute boolean visionQrcodeRecognition;
46998 readonly attribute boolean visionFaceRecognition;
47000 readonly attribute boolean secureElement;
47002 readonly attribute boolean nativeOspCompatible;
47004 readonly attribute <ref>SystemInfoProfile</ref> profile;
47007 dictionary SystemInfoOptions {
47008 unsigned long timeout;
47010 double highThreshold;
47012 double lowThreshold;
47015 [Callback=FunctionOnly, NoInterfaceObject] interface SystemInfoPropertySuccessCallback {
47016 void onsuccess(<ref>SystemInfoProperty</ref> prop);
47019 [NoInterfaceObject] interface SystemInfoProperty {
47022 [NoInterfaceObject] interface SystemInfoBattery : <ref>SystemInfoProperty</ref> {
47023 readonly attribute double level;
47025 readonly attribute boolean isCharging;
47028 [NoInterfaceObject] interface SystemInfoCpu : <ref>SystemInfoProperty</ref> {
47029 readonly attribute double load;
47032 [NoInterfaceObject] interface SystemInfoStorage : <ref>SystemInfoProperty</ref> {
47033 readonly attribute <ref>SystemInfoStorageUnit</ref>[] units;
47036 [NoInterfaceObject] interface SystemInfoStorageUnit : <ref>SystemInfoProperty</ref> {
47037 readonly attribute DOMString type;
47039 readonly attribute unsigned long long capacity;
47041 readonly attribute unsigned long long availableCapacity;
47043 readonly attribute boolean isRemovable;
47045 readonly attribute boolean isRemoveable;
47048 [NoInterfaceObject] interface SystemInfoDisplay : <ref>SystemInfoProperty</ref> {
47049 readonly attribute unsigned long resolutionWidth;
47051 readonly attribute unsigned long resolutionHeight;
47053 readonly attribute unsigned long dotsPerInchWidth;
47055 readonly attribute unsigned long dotsPerInchHeight;
47057 readonly attribute double physicalWidth;
47059 readonly attribute double physicalHeight;
47061 readonly attribute double brightness;
47064 [NoInterfaceObject] interface SystemInfoDeviceOrientation : <ref>SystemInfoProperty</ref> {
47066 readonly attribute <ref>SystemInfoDeviceOrientationStatus</ref> status;
47067 readonly attribute boolean isAutoRotation;
47070 [NoInterfaceObject] interface SystemInfoBuild : <ref>SystemInfoProperty</ref> {
47072 readonly attribute DOMString model;
47073 readonly attribute DOMString manufacturer;
47074 readonly attribute DOMString buildVersion;
47077 [NoInterfaceObject] interface SystemInfoLocale : <ref>SystemInfoProperty</ref> {
47079 readonly attribute DOMString language;
47081 readonly attribute DOMString country;
47084 [NoInterfaceObject] interface SystemInfoNetwork : <ref>SystemInfoProperty</ref> {
47086 readonly attribute <ref>SystemInfoNetworkType</ref> networkType;
47089 [NoInterfaceObject] interface SystemInfoWifiNetwork : <ref>SystemInfoProperty</ref> {
47091 readonly attribute DOMString status;
47092 readonly attribute DOMString ssid;
47093 readonly attribute DOMString ipAddress;
47094 readonly attribute DOMString ipv6Address;
47095 readonly attribute double signalStrength;
47098 [NoInterfaceObject] interface SystemInfoCellularNetwork : <ref>SystemInfoProperty</ref> {
47100 readonly attribute DOMString status;
47101 readonly attribute DOMString apn;
47102 readonly attribute DOMString ipAddress;
47103 readonly attribute DOMString ipv6Address;
47104 readonly attribute unsigned short mcc;
47105 readonly attribute unsigned short mnc;
47106 readonly attribute unsigned short cellId;
47107 readonly attribute unsigned short lac;
47108 readonly attribute boolean isRoaming;
47109 readonly attribute boolean isFlightMode;
47110 readonly attribute DOMString imei raises(<ref>WebAPIException</ref>);
47113 [NoInterfaceObject] interface SystemInfoSIM : <ref>SystemInfoProperty</ref> {
47114 readonly attribute <ref>SystemInfoSimState</ref> state raises(<ref>WebAPIException</ref>);
47115 readonly attribute DOMString operatorName raises(<ref>WebAPIException</ref>);
47116 readonly attribute DOMString msisdn raises(<ref>WebAPIException</ref>);
47117 readonly attribute DOMString iccid raises(<ref>WebAPIException</ref>);
47118 readonly attribute unsigned short mcc raises(<ref>WebAPIException</ref>);
47119 readonly attribute unsigned short mnc raises(<ref>WebAPIException</ref>);
47120 readonly attribute DOMString msin raises(<ref>WebAPIException</ref>);
47121 readonly attribute DOMString spn raises(<ref>WebAPIException</ref>);
47124 [NoInterfaceObject] interface SystemInfoPeripheral : <ref>SystemInfoProperty</ref> {
47126 readonly attribute boolean isVideoOutputOn;
47131 This specification defines interfaces and methods that provide web applications with access to various properties of a system.
47135 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.
47138 The following provides an overview of the tree data structure:
47150 DEVICE_ORIENTATION </li>
47160 CELLULAR_NETWORK </li>
47167 For more information on the SystemInfo features, see <a href="../../org.tizen.web.appprogramming/html/guide/sys_guide/systeminfo.htm">System Information Guide</a>.
47174 <Enum name="SystemInfoPropertyId" id="::SystemInfo::SystemInfoPropertyId">
47175 <webidl> enum SystemInfoPropertyId { "BATTERY" , "CPU", "STORAGE", "DISPLAY", "DEVICE_ORIENTATION", "BUILD", "LOCALE", "NETWORK", "WIFI_NETWORK", "CELLULAR_NETWORK", "SIM", "PERIPHERAL" };</webidl>
47178 The device property identifier.
47184 LOCALE and PERIPHERAL are supported Since 2.1
47187 <EnumValue stringvalue="BATTERY">
47188 <webidl> "BATTERY</webidl>
47190 <EnumValue stringvalue="CPU">
47191 <webidl> "CPU</webidl>
47193 <EnumValue stringvalue="STORAGE">
47194 <webidl> "STORAGE</webidl>
47196 <EnumValue stringvalue="DISPLAY">
47197 <webidl> "DISPLAY</webidl>
47199 <EnumValue stringvalue="DEVICE_ORIENTATION">
47200 <webidl> "DEVICE_ORIENTATION</webidl>
47202 <EnumValue stringvalue="BUILD">
47203 <webidl> "BUILD</webidl>
47205 <EnumValue stringvalue="LOCALE">
47206 <webidl> "LOCALE</webidl>
47208 <EnumValue stringvalue="NETWORK">
47209 <webidl> "NETWORK</webidl>
47211 <EnumValue stringvalue="WIFI_NETWORK">
47212 <webidl> "WIFI_NETWORK</webidl>
47214 <EnumValue stringvalue="CELLULAR_NETWORK">
47215 <webidl> "CELLULAR_NETWORK</webidl>
47217 <EnumValue stringvalue="SIM">
47218 <webidl> "SIM</webidl>
47220 <EnumValue stringvalue="PERIPHERAL">
47221 <webidl> "PERIPHERAL</webidl>
47224 <Enum name="SystemInfoNetworkType" id="::SystemInfo::SystemInfoNetworkType">
47225 <webidl> enum SystemInfoNetworkType { "NONE", "2G", "2.5G", "3G", "4G", "WIFI", "ETHERNET", "UNKNOWN" };</webidl>
47234 <EnumValue stringvalue="NONE">
47235 <webidl> "NONE</webidl>
47237 <EnumValue stringvalue="2G">
47238 <webidl> "2G</webidl>
47240 <EnumValue stringvalue="2.5G">
47241 <webidl> "2.5G</webidl>
47243 <EnumValue stringvalue="3G">
47244 <webidl> "3G</webidl>
47246 <EnumValue stringvalue="4G">
47247 <webidl> "4G</webidl>
47249 <EnumValue stringvalue="WIFI">
47250 <webidl> "WIFI</webidl>
47252 <EnumValue stringvalue="ETHERNET">
47253 <webidl> "ETHERNET</webidl>
47255 <EnumValue stringvalue="UNKNOWN">
47256 <webidl> "UNKNOWN</webidl>
47259 <Enum name="SystemInfoDeviceOrientationStatus" id="::SystemInfo::SystemInfoDeviceOrientationStatus">
47260 <webidl> enum SystemInfoDeviceOrientationStatus { "PORTRAIT_PRIMARY", "PORTRAIT_SECONDARY", "LANDSCAPE_PRIMARY", "LANDSCAPE_SECONDARY" };</webidl>
47263 Device Orientation Status.
47269 <EnumValue stringvalue="PORTRAIT_PRIMARY">
47270 <webidl> "PORTRAIT_PRIMARY</webidl>
47272 <EnumValue stringvalue="PORTRAIT_SECONDARY">
47273 <webidl> "PORTRAIT_SECONDARY</webidl>
47275 <EnumValue stringvalue="LANDSCAPE_PRIMARY">
47276 <webidl> "LANDSCAPE_PRIMARY</webidl>
47278 <EnumValue stringvalue="LANDSCAPE_SECONDARY">
47279 <webidl> "LANDSCAPE_SECONDARY</webidl>
47282 <Enum name="SystemInfoSimState" id="::SystemInfo::SystemInfoSimState">
47283 <webidl> enum SystemInfoSimState { "ABSENT", "INITIALIZING", "READY", "PIN_REQUIRED", "PUK_REQUIRED", "NETWORK_LOCKED", "SIM_LOCKED", "UNKNOWN" };</webidl>
47292 <EnumValue stringvalue="ABSENT">
47293 <webidl> "ABSENT</webidl>
47295 <EnumValue stringvalue="INITIALIZING">
47296 <webidl> "INITIALIZING</webidl>
47298 <EnumValue stringvalue="READY">
47299 <webidl> "READY</webidl>
47301 <EnumValue stringvalue="PIN_REQUIRED">
47302 <webidl> "PIN_REQUIRED</webidl>
47304 <EnumValue stringvalue="PUK_REQUIRED">
47305 <webidl> "PUK_REQUIRED</webidl>
47307 <EnumValue stringvalue="NETWORK_LOCKED">
47308 <webidl> "NETWORK_LOCKED</webidl>
47310 <EnumValue stringvalue="SIM_LOCKED">
47311 <webidl> "SIM_LOCKED</webidl>
47313 <EnumValue stringvalue="UNKNOWN">
47314 <webidl> "UNKNOWN</webidl>
47317 <Enum name="SystemInfoProfile" id="::SystemInfo::SystemInfoProfile">
47318 <webidl> enum SystemInfoProfile { "MOBILE_FULL", "MOBILE_WEB" };</webidl>
47327 <EnumValue stringvalue="MOBILE_FULL">
47328 <webidl> "MOBILE_FULL</webidl>
47330 <EnumValue stringvalue="MOBILE_WEB">
47331 <webidl> "MOBILE_WEB</webidl>
47334 <Interface name="SystemInfoObject" id="::SystemInfo::SystemInfoObject">
47335 <webidl> [NoInterfaceObject] interface SystemInfoObject {
47336 readonly attribute <ref>SystemInfo</ref> systeminfo;
47340 Defines what is instantiated by the <em>Tizen </em>object from the Tizen Platform.
47344 There will be a tizen.systeminfo object that allows accessing the
47345 functionality of the SystemInfo API.
47352 <ExtendedAttributeList>
47353 <ExtendedAttribute name="NoInterfaceObject">
47354 <webidl>NoInterfaceObject</webidl>
47355 </ExtendedAttribute>
47356 </ExtendedAttributeList>
47357 <Attribute readonly="readonly" name="systeminfo" id="::SystemInfo::SystemInfoObject::systeminfo">
47358 <webidl> readonly attribute <ref>SystemInfo</ref> systeminfo;</webidl>
47359 <Type name="SystemInfo"/>
47362 <Implements name1="Tizen" name2="SystemInfoObject">
47363 <webidl> <ref>Tizen</ref> implements <ref>SystemInfoObject</ref>;</webidl>
47365 <Interface name="SystemInfo" id="::SystemInfo::SystemInfo">
47366 <webidl> [NoInterfaceObject] interface SystemInfo {
47368 <ref>SystemInfoDeviceCapability</ref> getCapabilities() raises(<ref>WebAPIException</ref>);
47370 void getPropertyValue(<ref>SystemInfoPropertyId</ref> property,
47371 <ref>SystemInfoPropertySuccessCallback</ref> successCallback,
47372 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
47374 unsigned long addPropertyValueChangeListener(<ref>SystemInfoPropertyId</ref> property,
47375 <ref>SystemInfoPropertySuccessCallback</ref> successCallback,
47376 optional <ref>SystemInfoOptions</ref>? options) raises(<ref>WebAPIException</ref>);
47378 void removePropertyValueChangeListener(unsigned long listenerId) raises(<ref>WebAPIException</ref>);
47382 This entry interface queries the information of a system.
47386 This API offers methods for retrieving system information
47387 and for subscribing notifications of system information changes.
47391 <ExtendedAttributeList>
47392 <ExtendedAttribute name="NoInterfaceObject">
47393 <webidl>NoInterfaceObject</webidl>
47394 </ExtendedAttribute>
47395 </ExtendedAttributeList>
47396 <Operation name="getCapabilities" id="::SystemInfo::SystemInfo::getCapabilities">
47397 <webidl> <ref>SystemInfoDeviceCapability</ref> getCapabilities() raises(<ref>WebAPIException</ref>);</webidl>
47400 Gets the capabilities of the device.
47404 The function must synchronously acquire the capabilities of the device.
47410 <Code> var deviceCapabilities;
47411 deviceCapabilities = tizen.systeminfo.getCapabilities();
47412 if (deviceCapabilities.bluetooth)
47414 console.log("Bluetooth is supported");
47418 <Type name="SystemInfoDeviceCapability"/>
47421 <RaiseException name="WebAPIException">
47424 with error type NotSupportedError, if this feature is not supported.
47427 with error type SecurityError, if this functionality is not allowed.
47430 with error type UnknownError in any other error case.
47436 <Operation name="getPropertyValue" id="::SystemInfo::SystemInfo::getPropertyValue">
47437 <webidl> void getPropertyValue(<ref>SystemInfoPropertyId</ref> property,
47438 <ref>SystemInfoPropertySuccessCallback</ref> successCallback,
47439 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
47442 Gets the current value of a specified system property.
47446 The function must asynchronously acquire the current value of the requested property. If it is successful,
47447 the successCallback must be invoked with an object containing the information provided by the property.
47450 The <em>errorCallback() </em>can be launched with any of these error types:
47454 UnknownError - If any other error occurs. </li>
47460 <Code> function onSuccessCallback(battery) {
47461 console.log("The battery level is " + battery.level);
47464 function onErrorCallback(error) {
47465 console.log("An error occurred " + error.message);
47468 tizen.systeminfo.getPropertyValue("BATTERY", onSuccessCallback, onErrorCallback);
47471 <Type type="void"/>
47473 <Argument name="property">
47476 The name of the property to retrieve.
47479 <Type name="SystemInfoPropertyId"/>
47481 <Argument name="successCallback">
47484 Function called when the properties have been successfully retrieved.
47487 <Type name="SystemInfoPropertySuccessCallback"/>
47489 <Argument optional="optional" name="errorCallback">
47492 Function called when an error occurred while retrieving the properties.
47495 <Type name="ErrorCallback" nullable="nullable"/>
47499 <RaiseException name="WebAPIException">
47502 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
47505 with error type SecurityError, if this functionality is not allowed.
47508 with error type UnknownError in any other error case.
47514 <Operation name="addPropertyValueChangeListener" id="::SystemInfo::SystemInfo::addPropertyValueChangeListener">
47515 <webidl> unsigned long addPropertyValueChangeListener(<ref>SystemInfoPropertyId</ref> property,
47516 <ref>SystemInfoPropertySuccessCallback</ref> successCallback,
47517 optional <ref>SystemInfoOptions</ref>? options) raises(<ref>WebAPIException</ref>);</webidl>
47520 Adds a listener to allow tracking of changes in one or more system properties.
47524 When called, it immediately returns and then asynchronously starts a watch process defined by the following steps:
47527 1. Register the successCallback to receive system events that the status of the requested properties may have changed.
47530 2. When a system event is successfully received invoke the associated successCallback with an object containing the property
47534 3. Repeat step 2 until removePropertyValueChangeListener function is called.
47537 If property value is 'BUILD', listener would not be registered because 'BUILD' property's value is a fixed value.
47543 <Code> function onSuccessCallback(battery) {
47544 console.log("Low battery: " + battery.level);
47548 tizen.systeminfo.addPropertyValueChangeListener("BATTERY", onSuccessCallback, {lowThreshold : 0.2});
47551 <Type type="unsigned long">
47554 unsigned long An identifier used to clear the watch subscription.
47559 <Argument name="property">
47562 The name of the property to retrieve.
47565 <Type name="SystemInfoPropertyId"/>
47567 <Argument name="successCallback">
47570 Function called when the properties have been successfully retrieved.
47573 <Type name="SystemInfoPropertySuccessCallback"/>
47575 <Argument optional="optional" name="options">
47578 An object containing the various options for fetching the properties requested.
47581 <Type name="SystemInfoOptions" nullable="nullable"/>
47585 <RaiseException name="WebAPIException">
47588 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
47591 with error type NotSupportedError, if this feature is not supported.
47594 with error type InvalidValuesError, if any of the input
47595 parameters contain an invalid value.
47598 with error type SecurityError, if this functionality is not allowed.
47601 with error type UnknownError in any other error case.
47607 <Operation name="removePropertyValueChangeListener" id="::SystemInfo::SystemInfo::removePropertyValueChangeListener">
47608 <webidl> void removePropertyValueChangeListener(unsigned long listenerId) raises(<ref>WebAPIException</ref>);</webidl>
47611 Unsubscribes notifications for property changes set up by addPropertyValueChangeListener.
47615 If a valid listenerId argument is passed that corresponds to a subscription
47616 already place, then the watch process MUST immediately terminate and no further
47617 callback is invoked. If the listenerId argument does not correspond to a valid subscription,
47618 the method should return without any further action.
47624 <Code> var id = null;
47625 function onSuccessCallback(battery) {
47626 console.log("New value for Battery level is " + battery.level);
47627 if (id != null) { // After receiving the first notification, we clear it
47628 tizen.systeminfo.removePropertyValueChangeListener(id);
47632 id = tizen.systeminfo.addPropertyValueChangeListener("BATTERY", onSuccessCallback);
47635 <Type type="void"/>
47637 <Argument name="listenerId">
47640 An identifier of the subscription returned by the addPropertyValueChangeListener() method.
47643 <Type type="unsigned long"/>
47647 <RaiseException name="WebAPIException">
47650 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
47653 with error type NotSupportedError, if this feature is not supported.
47656 with error type InvalidValuesError, if any of the input
47657 parameters contain an invalid value.
47660 with error type SecurityError, if this functionality is not allowed.
47663 with error type UnknownError in any other error case.
47670 <Interface name="SystemInfoDeviceCapability" id="::SystemInfo::SystemInfoDeviceCapability">
47671 <webidl> [NoInterfaceObject] interface SystemInfoDeviceCapability {
47672 readonly attribute boolean bluetooth;
47674 readonly attribute boolean nfc;
47676 readonly attribute boolean nfcReservedPush ;
47678 readonly attribute unsigned short multiTouchCount;
47680 readonly attribute boolean inputKeyboard;
47682 readonly attribute boolean inputKeyboardLayout;
47684 readonly attribute boolean wifi;
47686 readonly attribute boolean wifiDirect;
47688 readonly attribute boolean opengles;
47690 readonly attribute DOMString openglestextureFormat;
47692 readonly attribute boolean openglesVersion1_1;
47694 readonly attribute boolean openglesVersion2_0;
47696 readonly attribute boolean fmRadio;
47698 readonly attribute DOMString platformVersion raises(<ref>WebAPIException</ref>);
47700 readonly attribute DOMString webApiVersion raises(<ref>WebAPIException</ref>);
47702 readonly attribute DOMString nativeApiVersion raises(<ref>WebAPIException</ref>);
47704 readonly attribute DOMString platformName;
47706 readonly attribute boolean camera;
47708 readonly attribute boolean cameraFront;
47710 readonly attribute boolean cameraFrontFlash;
47712 readonly attribute boolean cameraBack;
47714 readonly attribute boolean cameraBackFlash;
47716 readonly attribute boolean location;
47718 readonly attribute boolean locationGps;
47720 readonly attribute boolean locationWps;
47722 readonly attribute boolean microphone;
47724 readonly attribute boolean usbHost;
47726 readonly attribute boolean usbAccessory;
47728 readonly attribute boolean screenOutputRca;
47730 readonly attribute boolean screenOutputHdmi;
47732 readonly attribute DOMString platformCoreCpuArch;
47734 readonly attribute DOMString platformCoreFpuArch;
47736 readonly attribute boolean sipVoip;
47738 readonly attribute DOMString duid;
47740 readonly attribute boolean speechRecognition;
47742 readonly attribute boolean speechSynthesis;
47744 readonly attribute boolean accelerometer;
47746 readonly attribute boolean accelerometerWakeup;
47748 readonly attribute boolean barometer;
47750 readonly attribute boolean barometerWakeup;
47752 readonly attribute boolean gyroscope;
47754 readonly attribute boolean gyroscopeWakeup;
47756 readonly attribute boolean magnetometer;
47758 readonly attribute boolean magnetometerWakeup;
47760 readonly attribute boolean photometer;
47762 readonly attribute boolean photometerWakeup;
47764 readonly attribute boolean proximity;
47766 readonly attribute boolean proximityWakeup;
47768 readonly attribute boolean tiltmeter;
47770 readonly attribute boolean tiltmeterWakeup;
47772 readonly attribute boolean dataEncryption;
47774 readonly attribute boolean graphicsAcceleration;
47776 readonly attribute boolean push;
47778 readonly attribute boolean telephony;
47780 readonly attribute boolean telephonyMms;
47782 readonly attribute boolean telephonySms;
47784 readonly attribute boolean screenSizeNormal;
47786 readonly attribute boolean screenSize480_800;
47788 readonly attribute boolean screenSize720_1280;
47790 readonly attribute boolean autoRotation;
47792 readonly attribute boolean shellAppWidget;
47794 readonly attribute boolean visionImageRecognition;
47796 readonly attribute boolean visionQrcodeGeneration;
47798 readonly attribute boolean visionQrcodeRecognition;
47800 readonly attribute boolean visionFaceRecognition;
47802 readonly attribute boolean secureElement;
47804 readonly attribute boolean nativeOspCompatible;
47806 readonly attribute <ref>SystemInfoProfile</ref> profile;
47810 SystemInfoDeviceCapability object.
47816 <ExtendedAttributeList>
47817 <ExtendedAttribute name="NoInterfaceObject">
47818 <webidl>NoInterfaceObject</webidl>
47819 </ExtendedAttribute>
47820 </ExtendedAttributeList>
47821 <Attribute readonly="readonly" name="bluetooth" id="::SystemInfo::SystemInfoDeviceCapability::bluetooth">
47822 <webidl> readonly attribute boolean bluetooth;</webidl>
47825 Indicates whether the device supports Bluetooth.
47831 <Type type="boolean"/>
47833 <Attribute readonly="readonly" name="nfc" id="::SystemInfo::SystemInfoDeviceCapability::nfc">
47834 <webidl> readonly attribute boolean nfc;</webidl>
47837 Indicates whether the device supports NFC.
47843 <Type type="boolean"/>
47845 <Attribute readonly="readonly" name="nfcReservedPush" id="::SystemInfo::SystemInfoDeviceCapability::nfcReservedPush">
47846 <webidl> readonly attribute boolean nfcReservedPush ;</webidl>
47849 Indicates whether the device supports NFC reserved push.
47855 <Type type="boolean"/>
47857 <Attribute readonly="readonly" name="multiTouchCount" id="::SystemInfo::SystemInfoDeviceCapability::multiTouchCount">
47858 <webidl> readonly attribute unsigned short multiTouchCount;</webidl>
47861 The number of point in Multi-point touch.
47867 <Type type="unsigned short"/>
47869 <Attribute readonly="readonly" name="inputKeyboard" id="::SystemInfo::SystemInfoDeviceCapability::inputKeyboard">
47870 <webidl> readonly attribute boolean inputKeyboard;</webidl>
47873 Indicates whether the device supports the built-in Keyboard.
47879 <Type type="boolean"/>
47881 <Attribute readonly="readonly" name="inputKeyboardLayout" id="::SystemInfo::SystemInfoDeviceCapability::inputKeyboardLayout">
47882 <webidl> readonly attribute boolean inputKeyboardLayout;</webidl>
47885 Indicates whether the device supports the built-in keyboard layout.
47891 <Type type="boolean"/>
47893 <Attribute readonly="readonly" name="wifi" id="::SystemInfo::SystemInfoDeviceCapability::wifi">
47894 <webidl> readonly attribute boolean wifi;</webidl>
47897 Indicates whether the device supports Wi-Fi.
47903 <Type type="boolean"/>
47905 <Attribute readonly="readonly" name="wifiDirect" id="::SystemInfo::SystemInfoDeviceCapability::wifiDirect">
47906 <webidl> readonly attribute boolean wifiDirect;</webidl>
47909 Indicates whether the device supports Wi-Fi direct.
47915 <Type type="boolean"/>
47917 <Attribute readonly="readonly" name="opengles" id="::SystemInfo::SystemInfoDeviceCapability::opengles">
47918 <webidl> readonly attribute boolean opengles;</webidl>
47921 Indicates whether the device supports OpenGL-ES.
47927 <Type type="boolean"/>
47929 <Attribute readonly="readonly" name="openglestextureFormat" id="::SystemInfo::SystemInfoDeviceCapability::openglestextureFormat">
47930 <webidl> readonly attribute DOMString openglestextureFormat;</webidl>
47933 The device 3DC texture format for OpenGL-ES.
47934 One example of possible output is as follows: "3dc/atc/etc/ptc/pvrtc/utc"
47940 <Type type="DOMString"/>
47942 <Attribute readonly="readonly" name="openglesVersion1_1" id="::SystemInfo::SystemInfoDeviceCapability::openglesVersion1_1">
47943 <webidl> readonly attribute boolean openglesVersion1_1;</webidl>
47946 Indicates whether the device supports OpenGL-ES version 1.1.
47952 <Type type="boolean"/>
47954 <Attribute readonly="readonly" name="openglesVersion2_0" id="::SystemInfo::SystemInfoDeviceCapability::openglesVersion2_0">
47955 <webidl> readonly attribute boolean openglesVersion2_0;</webidl>
47958 Indicates whether the device supports OpenGL-ES version 2.0.
47964 <Type type="boolean"/>
47966 <Attribute readonly="readonly" name="fmRadio" id="::SystemInfo::SystemInfoDeviceCapability::fmRadio">
47967 <webidl> readonly attribute boolean fmRadio;</webidl>
47970 Indicates whether the device supports FM radio.
47976 <Type type="boolean"/>
47978 <Attribute readonly="readonly" name="platformVersion" id="::SystemInfo::SystemInfoDeviceCapability::platformVersion">
47979 <webidl> readonly attribute DOMString platformVersion raises(<ref>WebAPIException</ref>);</webidl>
47982 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>.
47991 http://tizen.org/privilege/system
47994 <Type type="DOMString"/>
47996 <RaiseException name="WebAPIException">
47999 with error type SecurityError, if this attribute is not allowed.
48005 <Attribute readonly="readonly" name="webApiVersion" id="::SystemInfo::SystemInfoDeviceCapability::webApiVersion">
48006 <webidl> readonly attribute DOMString webApiVersion raises(<ref>WebAPIException</ref>);</webidl>
48009 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>.
48018 http://tizen.org/privilege/system
48021 <Type type="DOMString"/>
48023 <RaiseException name="WebAPIException">
48026 with error type SecurityError, if this attribute is not allowed.
48032 <Attribute readonly="readonly" name="nativeApiVersion" id="::SystemInfo::SystemInfoDeviceCapability::nativeApiVersion">
48033 <webidl> readonly attribute DOMString nativeApiVersion raises(<ref>WebAPIException</ref>);</webidl>
48036 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>.
48045 http://tizen.org/privilege/system
48048 <Type type="DOMString"/>
48050 <RaiseException name="WebAPIException">
48053 with error type SecurityError, if this attribute is not allowed.
48059 <Attribute readonly="readonly" name="platformName" id="::SystemInfo::SystemInfoDeviceCapability::platformName">
48060 <webidl> readonly attribute DOMString platformName;</webidl>
48063 The name of the platform.
48069 <Type type="DOMString"/>
48071 <Attribute readonly="readonly" name="camera" id="::SystemInfo::SystemInfoDeviceCapability::camera">
48072 <webidl> readonly attribute boolean camera;</webidl>
48075 Indicates whether the device supports camera.
48081 <Type type="boolean"/>
48083 <Attribute readonly="readonly" name="cameraFront" id="::SystemInfo::SystemInfoDeviceCapability::cameraFront">
48084 <webidl> readonly attribute boolean cameraFront;</webidl>
48087 Indicates whether the device supports front camera.
48093 <Type type="boolean"/>
48095 <Attribute readonly="readonly" name="cameraFrontFlash" id="::SystemInfo::SystemInfoDeviceCapability::cameraFrontFlash">
48096 <webidl> readonly attribute boolean cameraFrontFlash;</webidl>
48099 Indicates whether the device supports flash on the front camera.
48105 <Type type="boolean"/>
48107 <Attribute readonly="readonly" name="cameraBack" id="::SystemInfo::SystemInfoDeviceCapability::cameraBack">
48108 <webidl> readonly attribute boolean cameraBack;</webidl>
48111 Indicates whether the device supports back-side camera.
48117 <Type type="boolean"/>
48119 <Attribute readonly="readonly" name="cameraBackFlash" id="::SystemInfo::SystemInfoDeviceCapability::cameraBackFlash">
48120 <webidl> readonly attribute boolean cameraBackFlash;</webidl>
48123 Indicates whether the device supports flash on the back-side camera.
48129 <Type type="boolean"/>
48131 <Attribute readonly="readonly" name="location" id="::SystemInfo::SystemInfoDeviceCapability::location">
48132 <webidl> readonly attribute boolean location;</webidl>
48135 Indicates whether the device supports CPS or not.
48141 <Type type="boolean"/>
48143 <Attribute readonly="readonly" name="locationGps" id="::SystemInfo::SystemInfoDeviceCapability::locationGps">
48144 <webidl> readonly attribute boolean locationGps;</webidl>
48147 Indicates whether the device supports GPS based location feature.
48153 <Type type="boolean"/>
48155 <Attribute readonly="readonly" name="locationWps" id="::SystemInfo::SystemInfoDeviceCapability::locationWps">
48156 <webidl> readonly attribute boolean locationWps;</webidl>
48159 Indicates whether the device supports WPS based location feature.
48165 <Type type="boolean"/>
48167 <Attribute readonly="readonly" name="microphone" id="::SystemInfo::SystemInfoDeviceCapability::microphone">
48168 <webidl> readonly attribute boolean microphone;</webidl>
48171 Indicates whether the device supports microphone.
48177 <Type type="boolean"/>
48179 <Attribute readonly="readonly" name="usbHost" id="::SystemInfo::SystemInfoDeviceCapability::usbHost">
48180 <webidl> readonly attribute boolean usbHost;</webidl>
48183 Indicates whether the device supports USB host.
48189 <Type type="boolean"/>
48191 <Attribute readonly="readonly" name="usbAccessory" id="::SystemInfo::SystemInfoDeviceCapability::usbAccessory">
48192 <webidl> readonly attribute boolean usbAccessory;</webidl>
48195 Indicates whether the device supports USB accessory.
48201 <Type type="boolean"/>
48203 <Attribute readonly="readonly" name="screenOutputRca" id="::SystemInfo::SystemInfoDeviceCapability::screenOutputRca">
48204 <webidl> readonly attribute boolean screenOutputRca;</webidl>
48207 Indicates whether the device supports RCA output.
48213 <Type type="boolean"/>
48215 <Attribute readonly="readonly" name="screenOutputHdmi" id="::SystemInfo::SystemInfoDeviceCapability::screenOutputHdmi">
48216 <webidl> readonly attribute boolean screenOutputHdmi;</webidl>
48219 Indicates whether the device supports HDMI output.
48225 <Type type="boolean"/>
48227 <Attribute readonly="readonly" name="platformCoreCpuArch" id="::SystemInfo::SystemInfoDeviceCapability::platformCoreCpuArch">
48228 <webidl> readonly attribute DOMString platformCoreCpuArch;</webidl>
48231 The device CPU architecture.
48232 The possible values for this attribute are: armv6, armv7, x86.
48238 <Type type="DOMString"/>
48240 <Attribute readonly="readonly" name="platformCoreFpuArch" id="::SystemInfo::SystemInfoDeviceCapability::platformCoreFpuArch">
48241 <webidl> readonly attribute DOMString platformCoreFpuArch;</webidl>
48244 The device FPU architecture.
48245 The possible values for this attribute are: vfpv3 / sse2 / sse3 / ssse3.
48251 <Type type="DOMString"/>
48253 <Attribute readonly="readonly" name="sipVoip" id="::SystemInfo::SystemInfoDeviceCapability::sipVoip">
48254 <webidl> readonly attribute boolean sipVoip;</webidl>
48257 Indicates whether the device supports VOIP.
48263 <Type type="boolean"/>
48265 <Attribute readonly="readonly" name="duid" id="::SystemInfo::SystemInfoDeviceCapability::duid">
48266 <webidl> readonly attribute DOMString duid;</webidl>
48269 The device unique ID.
48275 <Type type="DOMString"/>
48277 <Attribute readonly="readonly" name="speechRecognition" id="::SystemInfo::SystemInfoDeviceCapability::speechRecognition">
48278 <webidl> readonly attribute boolean speechRecognition;</webidl>
48281 Indicates whether the device supports speech recognition.
48287 <Type type="boolean"/>
48289 <Attribute readonly="readonly" name="speechSynthesis" id="::SystemInfo::SystemInfoDeviceCapability::speechSynthesis">
48290 <webidl> readonly attribute boolean speechSynthesis;</webidl>
48293 Indicates whether the device supports speech synthesis.
48299 <Type type="boolean"/>
48301 <Attribute readonly="readonly" name="accelerometer" id="::SystemInfo::SystemInfoDeviceCapability::accelerometer">
48302 <webidl> readonly attribute boolean accelerometer;</webidl>
48305 Indicates whether the device supports Accelerometer sensor.
48311 <Type type="boolean"/>
48313 <Attribute readonly="readonly" name="accelerometerWakeup" id="::SystemInfo::SystemInfoDeviceCapability::accelerometerWakeup">
48314 <webidl> readonly attribute boolean accelerometerWakeup;</webidl>
48317 Indicates whether the device supports Accelerometer sensor wake-up feature.
48323 <Type type="boolean"/>
48325 <Attribute readonly="readonly" name="barometer" id="::SystemInfo::SystemInfoDeviceCapability::barometer">
48326 <webidl> readonly attribute boolean barometer;</webidl>
48329 Indicates whether the device supports Barometer sensor.
48335 <Type type="boolean"/>
48337 <Attribute readonly="readonly" name="barometerWakeup" id="::SystemInfo::SystemInfoDeviceCapability::barometerWakeup">
48338 <webidl> readonly attribute boolean barometerWakeup;</webidl>
48341 Indicates whether the device supports Barometer sensor wake-up feature.
48347 <Type type="boolean"/>
48349 <Attribute readonly="readonly" name="gyroscope" id="::SystemInfo::SystemInfoDeviceCapability::gyroscope">
48350 <webidl> readonly attribute boolean gyroscope;</webidl>
48353 Indicates whether the device supports Gyroscope sensor.
48359 <Type type="boolean"/>
48361 <Attribute readonly="readonly" name="gyroscopeWakeup" id="::SystemInfo::SystemInfoDeviceCapability::gyroscopeWakeup">
48362 <webidl> readonly attribute boolean gyroscopeWakeup;</webidl>
48365 Indicates whether the device supports Gyroscope sensor wake-up feature.
48371 <Type type="boolean"/>
48373 <Attribute readonly="readonly" name="magnetometer" id="::SystemInfo::SystemInfoDeviceCapability::magnetometer">
48374 <webidl> readonly attribute boolean magnetometer;</webidl>
48377 Indicates whether the device supports Magnetometer sensor.
48383 <Type type="boolean"/>
48385 <Attribute readonly="readonly" name="magnetometerWakeup" id="::SystemInfo::SystemInfoDeviceCapability::magnetometerWakeup">
48386 <webidl> readonly attribute boolean magnetometerWakeup;</webidl>
48389 Indicates whether the device supports Magnetometer sensor wake-up feature.
48395 <Type type="boolean"/>
48397 <Attribute readonly="readonly" name="photometer" id="::SystemInfo::SystemInfoDeviceCapability::photometer">
48398 <webidl> readonly attribute boolean photometer;</webidl>
48401 Indicates whether the device supports Photometer sensor.
48407 <Type type="boolean"/>
48409 <Attribute readonly="readonly" name="photometerWakeup" id="::SystemInfo::SystemInfoDeviceCapability::photometerWakeup">
48410 <webidl> readonly attribute boolean photometerWakeup;</webidl>
48413 Indicates whether the device supports Photometer sensor wake-up feature.
48419 <Type type="boolean"/>
48421 <Attribute readonly="readonly" name="proximity" id="::SystemInfo::SystemInfoDeviceCapability::proximity">
48422 <webidl> readonly attribute boolean proximity;</webidl>
48425 Indicates whether the device supports Proximity sensor.
48431 <Type type="boolean"/>
48433 <Attribute readonly="readonly" name="proximityWakeup" id="::SystemInfo::SystemInfoDeviceCapability::proximityWakeup">
48434 <webidl> readonly attribute boolean proximityWakeup;</webidl>
48437 Indicates whether the device supports Proximity sensor wake-up feature.
48443 <Type type="boolean"/>
48445 <Attribute readonly="readonly" name="tiltmeter" id="::SystemInfo::SystemInfoDeviceCapability::tiltmeter">
48446 <webidl> readonly attribute boolean tiltmeter;</webidl>
48449 Indicates whether the device supports Tiltmeter sensor.
48455 <Type type="boolean"/>
48457 <Attribute readonly="readonly" name="tiltmeterWakeup" id="::SystemInfo::SystemInfoDeviceCapability::tiltmeterWakeup">
48458 <webidl> readonly attribute boolean tiltmeterWakeup;</webidl>
48461 Indicates whether the device supports Tiltmeter sensor wake-up feature.
48467 <Type type="boolean"/>
48469 <Attribute readonly="readonly" name="dataEncryption" id="::SystemInfo::SystemInfoDeviceCapability::dataEncryption">
48470 <webidl> readonly attribute boolean dataEncryption;</webidl>
48473 Indicates whether the device supports data encryption.
48479 <Type type="boolean"/>
48481 <Attribute readonly="readonly" name="graphicsAcceleration" id="::SystemInfo::SystemInfoDeviceCapability::graphicsAcceleration">
48482 <webidl> readonly attribute boolean graphicsAcceleration;</webidl>
48485 Indicates whether the device supports hardware acceleration for 2D/3D graphics.
48491 <Type type="boolean"/>
48493 <Attribute readonly="readonly" name="push" id="::SystemInfo::SystemInfoDeviceCapability::push">
48494 <webidl> readonly attribute boolean push;</webidl>
48497 Indicates whether the device supports push service.
48503 <Type type="boolean"/>
48505 <Attribute readonly="readonly" name="telephony" id="::SystemInfo::SystemInfoDeviceCapability::telephony">
48506 <webidl> readonly attribute boolean telephony;</webidl>
48509 Indicates whether the device supports the telephony feature.
48515 <Type type="boolean"/>
48517 <Attribute readonly="readonly" name="telephonyMms" id="::SystemInfo::SystemInfoDeviceCapability::telephonyMms">
48518 <webidl> readonly attribute boolean telephonyMms;</webidl>
48521 Indicates whether the device supports the mms feature.
48527 <Type type="boolean"/>
48529 <Attribute readonly="readonly" name="telephonySms" id="::SystemInfo::SystemInfoDeviceCapability::telephonySms">
48530 <webidl> readonly attribute boolean telephonySms;</webidl>
48533 Indicates whether the device supports the sms feature.
48539 <Type type="boolean"/>
48541 <Attribute readonly="readonly" name="screenSizeNormal" id="::SystemInfo::SystemInfoDeviceCapability::screenSizeNormal">
48542 <webidl> readonly attribute boolean screenSizeNormal;</webidl>
48545 Indicates whether the device supports the screen normal size.
48551 <Type type="boolean"/>
48553 <Attribute readonly="readonly" name="screenSize480_800" id="::SystemInfo::SystemInfoDeviceCapability::screenSize480_800">
48554 <webidl> readonly attribute boolean screenSize480_800;</webidl>
48557 Indicates whether the device supports the 480 * 800 screen size.
48563 <Type type="boolean"/>
48565 <Attribute readonly="readonly" name="screenSize720_1280" id="::SystemInfo::SystemInfoDeviceCapability::screenSize720_1280">
48566 <webidl> readonly attribute boolean screenSize720_1280;</webidl>
48569 Indicates whether the device supports the 720 * 1280 screen size.
48575 <Type type="boolean"/>
48577 <Attribute readonly="readonly" name="autoRotation" id="::SystemInfo::SystemInfoDeviceCapability::autoRotation">
48578 <webidl> readonly attribute boolean autoRotation;</webidl>
48581 Indicates whether the device supports auto rotation.
48587 <Type type="boolean"/>
48589 <Attribute readonly="readonly" name="shellAppWidget" id="::SystemInfo::SystemInfoDeviceCapability::shellAppWidget">
48590 <webidl> readonly attribute boolean shellAppWidget;</webidl>
48593 Indicates whether the device supports shell app widget.
48599 <Type type="boolean"/>
48601 <Attribute readonly="readonly" name="visionImageRecognition" id="::SystemInfo::SystemInfoDeviceCapability::visionImageRecognition">
48602 <webidl> readonly attribute boolean visionImageRecognition;</webidl>
48605 Indicates whether the device supports vision image recognition.
48611 <Type type="boolean"/>
48613 <Attribute readonly="readonly" name="visionQrcodeGeneration" id="::SystemInfo::SystemInfoDeviceCapability::visionQrcodeGeneration">
48614 <webidl> readonly attribute boolean visionQrcodeGeneration;</webidl>
48617 Indicates whether the device supports vision qrcode generation.
48623 <Type type="boolean"/>
48625 <Attribute readonly="readonly" name="visionQrcodeRecognition" id="::SystemInfo::SystemInfoDeviceCapability::visionQrcodeRecognition">
48626 <webidl> readonly attribute boolean visionQrcodeRecognition;</webidl>
48629 Indicates whether the device supports vision qrcode recognition.
48635 <Type type="boolean"/>
48637 <Attribute readonly="readonly" name="visionFaceRecognition" id="::SystemInfo::SystemInfoDeviceCapability::visionFaceRecognition">
48638 <webidl> readonly attribute boolean visionFaceRecognition;</webidl>
48641 Indicates whether the device supports vision face recognition.
48647 <Type type="boolean"/>
48649 <Attribute readonly="readonly" name="secureElement" id="::SystemInfo::SystemInfoDeviceCapability::secureElement">
48650 <webidl> readonly attribute boolean secureElement;</webidl>
48653 Indicates whether the device supports secure element.
48659 <Type type="boolean"/>
48661 <Attribute readonly="readonly" name="nativeOspCompatible" id="::SystemInfo::SystemInfoDeviceCapability::nativeOspCompatible">
48662 <webidl> readonly attribute boolean nativeOspCompatible;</webidl>
48665 Indicates whether the device supports native osp API.
48671 <Type type="boolean"/>
48673 <Attribute readonly="readonly" name="profile" id="::SystemInfo::SystemInfoDeviceCapability::profile">
48674 <webidl> readonly attribute <ref>SystemInfoProfile</ref> profile;</webidl>
48677 Represents the profile of the current device.
48683 <Type name="SystemInfoProfile"/>
48686 <Dictionary name="SystemInfoOptions" id="::SystemInfo::SystemInfoOptions">
48687 <webidl> dictionary SystemInfoOptions {
48688 unsigned long timeout;
48690 double highThreshold;
48692 double lowThreshold;
48696 An object containing the various options for fetching the properties requested.
48702 <DictionaryMember name="timeout" id="::SystemInfo::SystemInfoOptions::timeout">
48703 <webidl> unsigned long timeout;</webidl>
48706 The number of milliseconds beyond which the operation must be interrupted.
48712 <Type type="unsigned long"/>
48713 </DictionaryMember>
48714 <DictionaryMember name="highThreshold" id="::SystemInfo::SystemInfoOptions::highThreshold">
48715 <webidl> double highThreshold;</webidl>
48718 An attribute to indicate that the <em>successCallback()</em> method in the watch
48719 operation will be triggered only if the device property is a number and its value is greater than or equal to this number.
48720 This attribute has no effect on the <em>get()</em> method.
48726 <Type type="double"/>
48727 </DictionaryMember>
48728 <DictionaryMember name="lowThreshold" id="::SystemInfo::SystemInfoOptions::lowThreshold">
48729 <webidl> double lowThreshold;</webidl>
48732 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.
48733 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>.
48734 This attribute has no effect on the get method.
48740 <Type type="double"/>
48741 </DictionaryMember>
48743 <Interface name="SystemInfoPropertySuccessCallback" id="::SystemInfo::SystemInfoPropertySuccessCallback">
48744 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface SystemInfoPropertySuccessCallback {
48745 void onsuccess(<ref>SystemInfoProperty</ref> prop);
48749 Systemfinfo specific success callback.
48753 This callback interface specifies a success callback with SystemInfoProperty as input argument.
48754 It is used in asynchronous
48755 operations, such as getPropertyValue() or addPropertyValueChangeListener()
48762 <ExtendedAttributeList>
48763 <ExtendedAttribute name="Callback" value="FunctionOnly">
48764 <webidl>Callback</webidl>
48765 </ExtendedAttribute>
48766 <ExtendedAttribute name="NoInterfaceObject">
48767 <webidl> NoInterfaceObject</webidl>
48768 </ExtendedAttribute>
48769 </ExtendedAttributeList>
48770 <Operation name="onsuccess" id="::SystemInfo::SystemInfoPropertySuccessCallback::onsuccess">
48771 <webidl> void onsuccess(<ref>SystemInfoProperty</ref> prop);</webidl>
48774 Method invoked when the asynchronous call completes successfully.
48780 <Type type="void"/>
48782 <Argument name="prop">
48785 The property returned from a successful asynchronous operation.
48788 <Type name="SystemInfoProperty"/>
48793 <Interface name="SystemInfoProperty" id="::SystemInfo::SystemInfoProperty">
48794 <webidl> [NoInterfaceObject] interface SystemInfoProperty {
48798 This is a common abstract interface used by different types of system information objects.
48804 <ExtendedAttributeList>
48805 <ExtendedAttribute name="NoInterfaceObject">
48806 <webidl>NoInterfaceObject</webidl>
48807 </ExtendedAttribute>
48808 </ExtendedAttributeList>
48810 <Interface name="SystemInfoBattery" id="::SystemInfo::SystemInfoBattery">
48811 <webidl> [NoInterfaceObject] interface SystemInfoBattery : <ref>SystemInfoProperty</ref> {
48812 readonly attribute double level;
48814 readonly attribute boolean isCharging;
48818 This property reflects the general state of the system's battery
48824 <ExtendedAttributeList>
48825 <ExtendedAttribute name="NoInterfaceObject">
48826 <webidl>NoInterfaceObject</webidl>
48827 </ExtendedAttribute>
48828 </ExtendedAttributeList>
48829 <InterfaceInheritance>
48830 <Name name="SystemInfoProperty"/>
48831 </InterfaceInheritance>
48832 <Attribute readonly="readonly" name="level" id="::SystemInfo::SystemInfoBattery::level">
48833 <webidl> readonly attribute double level;</webidl>
48836 An attribute to specify the remaining level of an internal battery, scaled from <var>0 </var>to <var>1</var>:
48841 <var>0 </var>indicates that the battery level is the lowest and the system is about to enter shutdown mode. </li>
48843 <var>1 </var>indicates that the system's charge is maximum. </li>
48846 Any threshold parameter used in a watch operation to monitor this property applies to this attribute.
48853 <Type type="double"/>
48855 <Attribute readonly="readonly" name="isCharging" id="::SystemInfo::SystemInfoBattery::isCharging">
48856 <webidl> readonly attribute boolean isCharging;</webidl>
48859 Indicates whether the battery source is currently charging.
48865 <Type type="boolean"/>
48868 <Interface name="SystemInfoCpu" id="::SystemInfo::SystemInfoCpu">
48869 <webidl> [NoInterfaceObject] interface SystemInfoCpu : <ref>SystemInfoProperty</ref> {
48870 readonly attribute double load;
48874 This property reflects the state of the CPUs available to this system.
48880 <ExtendedAttributeList>
48881 <ExtendedAttribute name="NoInterfaceObject">
48882 <webidl>NoInterfaceObject</webidl>
48883 </ExtendedAttribute>
48884 </ExtendedAttributeList>
48885 <InterfaceInheritance>
48886 <Name name="SystemInfoProperty"/>
48887 </InterfaceInheritance>
48888 <Attribute readonly="readonly" name="load" id="::SystemInfo::SystemInfoCpu::load">
48889 <webidl> readonly attribute double load;</webidl>
48892 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.
48893 Any threshold parameter used in a watch function to monitor this property applies to this attribute.
48899 <Type type="double"/>
48902 <Interface name="SystemInfoStorage" id="::SystemInfo::SystemInfoStorage">
48903 <webidl> [NoInterfaceObject] interface SystemInfoStorage : <ref>SystemInfoProperty</ref> {
48904 readonly attribute <ref>SystemInfoStorageUnit</ref>[] units;
48908 This property exposes the data storage devices connected to this system.
48914 <ExtendedAttributeList>
48915 <ExtendedAttribute name="NoInterfaceObject">
48916 <webidl>NoInterfaceObject</webidl>
48917 </ExtendedAttribute>
48918 </ExtendedAttributeList>
48919 <InterfaceInheritance>
48920 <Name name="SystemInfoProperty"/>
48921 </InterfaceInheritance>
48922 <Attribute readonly="readonly" name="units" id="::SystemInfo::SystemInfoStorage::units">
48923 <webidl> readonly attribute <ref>SystemInfoStorageUnit</ref>[] units;</webidl>
48926 The array of storage units connected to this device.
48932 <Type type="array">
48933 <Type name="SystemInfoStorageUnit"/>
48937 <Interface name="SystemInfoStorageUnit" id="::SystemInfo::SystemInfoStorageUnit">
48938 <webidl> [NoInterfaceObject] interface SystemInfoStorageUnit : <ref>SystemInfoProperty</ref> {
48939 readonly attribute DOMString type;
48941 readonly attribute unsigned long long capacity;
48943 readonly attribute unsigned long long availableCapacity;
48945 readonly attribute boolean isRemovable;
48947 readonly attribute boolean isRemoveable;
48951 This property exposes a single storage device connected to this system.
48954 <ExtendedAttributeList>
48955 <ExtendedAttribute name="NoInterfaceObject">
48956 <webidl>NoInterfaceObject</webidl>
48957 </ExtendedAttribute>
48958 </ExtendedAttributeList>
48959 <InterfaceInheritance>
48960 <Name name="SystemInfoProperty"/>
48961 </InterfaceInheritance>
48962 <Attribute readonly="readonly" name="type" id="::SystemInfo::SystemInfoStorageUnit::type">
48963 <webidl> readonly attribute DOMString type;</webidl>
48966 The type of a storage device. The value is one of the constants defined for this type.
48970 The supported storage unit types are:
48989 <Type type="DOMString"/>
48991 <Attribute readonly="readonly" name="capacity" id="::SystemInfo::SystemInfoStorageUnit::capacity">
48992 <webidl> readonly attribute unsigned long long capacity;</webidl>
48995 The amount of data that this device can hold, in bytes.
49001 <Type type="unsigned long long"/>
49003 <Attribute readonly="readonly" name="availableCapacity" id="::SystemInfo::SystemInfoStorageUnit::availableCapacity">
49004 <webidl> readonly attribute unsigned long long availableCapacity;</webidl>
49007 The amount of available data that this device can hold, in bytes.
49013 <Type type="unsigned long long"/>
49015 <Attribute readonly="readonly" name="isRemovable" id="::SystemInfo::SystemInfoStorageUnit::isRemovable">
49016 <webidl> readonly attribute boolean isRemovable;</webidl>
49019 An attribute to indicate whether a device can be removed or not.
49023 The following values are supported:
49027 <var>true </var> - If this storage unit can be removed from the system (such as an sdcard unplugged) </li>
49029 <var>false</var> - If this storage unit cannot be removed from the system </li>
49036 <Type type="boolean"/>
49038 <Attribute readonly="readonly" name="isRemoveable" id="::SystemInfo::SystemInfoStorageUnit::isRemoveable">
49039 <webidl> readonly attribute boolean isRemoveable;</webidl>
49042 true if this unit can be removed from the system (such as an sdcard unplugged), false otherwise.
49048 A typographic error.
49051 <Type type="boolean"/>
49054 <Interface name="SystemInfoDisplay" id="::SystemInfo::SystemInfoDisplay">
49055 <webidl> [NoInterfaceObject] interface SystemInfoDisplay : <ref>SystemInfoProperty</ref> {
49056 readonly attribute unsigned long resolutionWidth;
49058 readonly attribute unsigned long resolutionHeight;
49060 readonly attribute unsigned long dotsPerInchWidth;
49062 readonly attribute unsigned long dotsPerInchHeight;
49064 readonly attribute double physicalWidth;
49066 readonly attribute double physicalHeight;
49068 readonly attribute double brightness;
49072 This property reflects the information of the Display.
49078 <ExtendedAttributeList>
49079 <ExtendedAttribute name="NoInterfaceObject">
49080 <webidl>NoInterfaceObject</webidl>
49081 </ExtendedAttribute>
49082 </ExtendedAttributeList>
49083 <InterfaceInheritance>
49084 <Name name="SystemInfoProperty"/>
49085 </InterfaceInheritance>
49086 <Attribute readonly="readonly" name="resolutionWidth" id="::SystemInfo::SystemInfoDisplay::resolutionWidth">
49087 <webidl> readonly attribute unsigned long resolutionWidth;</webidl>
49090 The total number of addressable pixels in the horizontal direction of a rectangular entity
49091 (such as Camera, Display, Image, Video, ...) when held in its default orientation.
49097 <Type type="unsigned long"/>
49099 <Attribute readonly="readonly" name="resolutionHeight" id="::SystemInfo::SystemInfoDisplay::resolutionHeight">
49100 <webidl> readonly attribute unsigned long resolutionHeight;</webidl>
49103 The total number of addressable pixels in the vertical direction of a rectangular element
49104 (such as Camera, Display, Image, Video, ...) when held in its default orientation.
49110 <Type type="unsigned long"/>
49112 <Attribute readonly="readonly" name="dotsPerInchWidth" id="::SystemInfo::SystemInfoDisplay::dotsPerInchWidth">
49113 <webidl> readonly attribute unsigned long dotsPerInchWidth;</webidl>
49116 Resolution of this device, along its width, in dots per inch.
49122 <Type type="unsigned long"/>
49124 <Attribute readonly="readonly" name="dotsPerInchHeight" id="::SystemInfo::SystemInfoDisplay::dotsPerInchHeight">
49125 <webidl> readonly attribute unsigned long dotsPerInchHeight;</webidl>
49128 Resolution of this device, along its height, in dots per inch.
49134 <Type type="unsigned long"/>
49136 <Attribute readonly="readonly" name="physicalWidth" id="::SystemInfo::SystemInfoDisplay::physicalWidth">
49137 <webidl> readonly attribute double physicalWidth;</webidl>
49140 The display's physical width in millimeters.
49146 <Type type="double"/>
49148 <Attribute readonly="readonly" name="physicalHeight" id="::SystemInfo::SystemInfoDisplay::physicalHeight">
49149 <webidl> readonly attribute double physicalHeight;</webidl>
49152 The display's physical height in millimeters.
49158 <Type type="double"/>
49160 <Attribute readonly="readonly" name="brightness" id="::SystemInfo::SystemInfoDisplay::brightness">
49161 <webidl> readonly attribute double brightness;</webidl>
49164 The current brightness of a display ranging between <var>0 </var>to <var>1</var>.
49170 <Type type="double"/>
49173 <Interface name="SystemInfoDeviceOrientation" id="::SystemInfo::SystemInfoDeviceOrientation">
49174 <webidl> [NoInterfaceObject] interface SystemInfoDeviceOrientation : <ref>SystemInfoProperty</ref> {
49176 readonly attribute <ref>SystemInfoDeviceOrientationStatus</ref> status;
49177 readonly attribute boolean isAutoRotation;
49181 This property reflects the information of the device orientation in this system.
49187 <ExtendedAttributeList>
49188 <ExtendedAttribute name="NoInterfaceObject">
49189 <webidl>NoInterfaceObject</webidl>
49190 </ExtendedAttribute>
49191 </ExtendedAttributeList>
49192 <InterfaceInheritance>
49193 <Name name="SystemInfoProperty"/>
49194 </InterfaceInheritance>
49195 <Attribute readonly="readonly" name="status" id="::SystemInfo::SystemInfoDeviceOrientation::status">
49196 <webidl> readonly attribute <ref>SystemInfoDeviceOrientationStatus</ref> status;</webidl>
49199 Represents the status of the current device orientation.
49205 <Type name="SystemInfoDeviceOrientationStatus"/>
49207 <Attribute readonly="readonly" name="isAutoRotation" id="::SystemInfo::SystemInfoDeviceOrientation::isAutoRotation">
49208 <webidl> readonly attribute boolean isAutoRotation;</webidl>
49211 whether the device is in autorotation.
49217 <Type type="boolean"/>
49220 <Interface name="SystemInfoBuild" id="::SystemInfo::SystemInfoBuild">
49221 <webidl> [NoInterfaceObject] interface SystemInfoBuild : <ref>SystemInfoProperty</ref> {
49223 readonly attribute DOMString model;
49224 readonly attribute DOMString manufacturer;
49225 readonly attribute DOMString buildVersion;
49229 This property reflects the information of the current device.
49235 <ExtendedAttributeList>
49236 <ExtendedAttribute name="NoInterfaceObject">
49237 <webidl>NoInterfaceObject</webidl>
49238 </ExtendedAttribute>
49239 </ExtendedAttributeList>
49240 <InterfaceInheritance>
49241 <Name name="SystemInfoProperty"/>
49242 </InterfaceInheritance>
49243 <Attribute readonly="readonly" name="model" id="::SystemInfo::SystemInfoBuild::model">
49244 <webidl> readonly attribute DOMString model;</webidl>
49247 Represents the model name of the current device.
49253 <Type type="DOMString"/>
49255 <Attribute readonly="readonly" name="manufacturer" id="::SystemInfo::SystemInfoBuild::manufacturer">
49256 <webidl> readonly attribute DOMString manufacturer;</webidl>
49259 Represents the manufacturer of the device.
49265 <Type type="DOMString"/>
49267 <Attribute readonly="readonly" name="buildVersion" id="::SystemInfo::SystemInfoBuild::buildVersion">
49268 <webidl> readonly attribute DOMString buildVersion;</webidl>
49271 Represents the build version information of the device.
49277 <Type type="DOMString"/>
49280 <Interface name="SystemInfoLocale" id="::SystemInfo::SystemInfoLocale">
49281 <webidl> [NoInterfaceObject] interface SystemInfoLocale : <ref>SystemInfoProperty</ref> {
49283 readonly attribute DOMString language;
49285 readonly attribute DOMString country;
49289 This property reflects the locale information of the current device.
49295 <ExtendedAttributeList>
49296 <ExtendedAttribute name="NoInterfaceObject">
49297 <webidl>NoInterfaceObject</webidl>
49298 </ExtendedAttribute>
49299 </ExtendedAttributeList>
49300 <InterfaceInheritance>
49301 <Name name="SystemInfoProperty"/>
49302 </InterfaceInheritance>
49303 <Attribute readonly="readonly" name="language" id="::SystemInfo::SystemInfoLocale::language">
49304 <webidl> readonly attribute DOMString language;</webidl>
49307 Indicates the current language setting in the (LANGUAGE)_(REGION) syntax.
49308 The language setting is in the ISO 630-2 format and the region setting is in the ISO 3166-1 format.
49309 The language setting is case-sensitive.
49315 <Type type="DOMString"/>
49317 <Attribute readonly="readonly" name="country" id="::SystemInfo::SystemInfoLocale::country">
49318 <webidl> readonly attribute DOMString country;</webidl>
49321 Indicates the current country setting in the (LANGUAGE)_(REGION) syntax.
49322 The language setting is in the ISO 630-2 format and the region setting is in the ISO 3166-1 format.
49323 The country setting is case-sensitive.
49329 <Type type="DOMString"/>
49332 <Interface name="SystemInfoNetwork" id="::SystemInfo::SystemInfoNetwork">
49333 <webidl> [NoInterfaceObject] interface SystemInfoNetwork : <ref>SystemInfoProperty</ref> {
49335 readonly attribute <ref>SystemInfoNetworkType</ref> networkType;
49339 This property reflects the information of the data network in this system.
49345 <ExtendedAttributeList>
49346 <ExtendedAttribute name="NoInterfaceObject">
49347 <webidl>NoInterfaceObject</webidl>
49348 </ExtendedAttribute>
49349 </ExtendedAttributeList>
49350 <InterfaceInheritance>
49351 <Name name="SystemInfoProperty"/>
49352 </InterfaceInheritance>
49353 <Attribute readonly="readonly" name="networkType" id="::SystemInfo::SystemInfoNetwork::networkType">
49354 <webidl> readonly attribute <ref>SystemInfoNetworkType</ref> networkType;</webidl>
49357 Represents the network type of the current data network.
49363 <Type name="SystemInfoNetworkType"/>
49366 <Interface name="SystemInfoWifiNetwork" id="::SystemInfo::SystemInfoWifiNetwork">
49367 <webidl> [NoInterfaceObject] interface SystemInfoWifiNetwork : <ref>SystemInfoProperty</ref> {
49369 readonly attribute DOMString status;
49370 readonly attribute DOMString ssid;
49371 readonly attribute DOMString ipAddress;
49372 readonly attribute DOMString ipv6Address;
49373 readonly attribute double signalStrength;
49377 This property reflects the information of the Wi-Fi network in this system.
49383 <ExtendedAttributeList>
49384 <ExtendedAttribute name="NoInterfaceObject">
49385 <webidl>NoInterfaceObject</webidl>
49386 </ExtendedAttribute>
49387 </ExtendedAttributeList>
49388 <InterfaceInheritance>
49389 <Name name="SystemInfoProperty"/>
49390 </InterfaceInheritance>
49391 <Attribute readonly="readonly" name="status" id="::SystemInfo::SystemInfoWifiNetwork::status">
49392 <webidl> readonly attribute DOMString status;</webidl>
49395 Represents the status (ON or OFF) of the Wi-Fi interface.
49401 <Type type="DOMString"/>
49403 <Attribute readonly="readonly" name="ssid" id="::SystemInfo::SystemInfoWifiNetwork::ssid">
49404 <webidl> readonly attribute DOMString ssid;</webidl>
49407 Represents the SSID of a Wi-Fi network.
49413 <Type type="DOMString"/>
49415 <Attribute readonly="readonly" name="ipAddress" id="::SystemInfo::SystemInfoWifiNetwork::ipAddress">
49416 <webidl> readonly attribute DOMString ipAddress;</webidl>
49419 Represents the IPv4 address of Wi-Fi network.
49425 <Type type="DOMString"/>
49427 <Attribute readonly="readonly" name="ipv6Address" id="::SystemInfo::SystemInfoWifiNetwork::ipv6Address">
49428 <webidl> readonly attribute DOMString ipv6Address;</webidl>
49431 Represents the IPv6 address of Wi-Fi network.
49437 <Type type="DOMString"/>
49439 <Attribute readonly="readonly" name="signalStrength" id="::SystemInfo::SystemInfoWifiNetwork::signalStrength">
49440 <webidl> readonly attribute double signalStrength;</webidl>
49443 This connection's signal strength, as a normalized value between 0 (no signal detected) and 1 (the level is at its maximum value).
49449 <Type type="double"/>
49452 <Interface name="SystemInfoCellularNetwork" id="::SystemInfo::SystemInfoCellularNetwork">
49453 <webidl> [NoInterfaceObject] interface SystemInfoCellularNetwork : <ref>SystemInfoProperty</ref> {
49455 readonly attribute DOMString status;
49456 readonly attribute DOMString apn;
49457 readonly attribute DOMString ipAddress;
49458 readonly attribute DOMString ipv6Address;
49459 readonly attribute unsigned short mcc;
49460 readonly attribute unsigned short mnc;
49461 readonly attribute unsigned short cellId;
49462 readonly attribute unsigned short lac;
49463 readonly attribute boolean isRoaming;
49464 readonly attribute boolean isFlightMode;
49465 readonly attribute DOMString imei raises(<ref>WebAPIException</ref>);
49469 This property reflects the information of the Cellular network in this system.
49475 <ExtendedAttributeList>
49476 <ExtendedAttribute name="NoInterfaceObject">
49477 <webidl>NoInterfaceObject</webidl>
49478 </ExtendedAttribute>
49479 </ExtendedAttributeList>
49480 <InterfaceInheritance>
49481 <Name name="SystemInfoProperty"/>
49482 </InterfaceInheritance>
49483 <Attribute readonly="readonly" name="status" id="::SystemInfo::SystemInfoCellularNetwork::status">
49484 <webidl> readonly attribute DOMString status;</webidl>
49487 Represents the status (ON or OFF) of the cellular network.
49493 <Type type="DOMString"/>
49495 <Attribute readonly="readonly" name="apn" id="::SystemInfo::SystemInfoCellularNetwork::apn">
49496 <webidl> readonly attribute DOMString apn;</webidl>
49499 Represents an Access Point Name of the cellular network.
49505 <Type type="DOMString"/>
49507 <Attribute readonly="readonly" name="ipAddress" id="::SystemInfo::SystemInfoCellularNetwork::ipAddress">
49508 <webidl> readonly attribute DOMString ipAddress;</webidl>
49511 Represents the IPv4 address of the cellular network.
49517 <Type type="DOMString"/>
49519 <Attribute readonly="readonly" name="ipv6Address" id="::SystemInfo::SystemInfoCellularNetwork::ipv6Address">
49520 <webidl> readonly attribute DOMString ipv6Address;</webidl>
49523 Represents the IPv6 address of the cellular network.
49529 <Type type="DOMString"/>
49531 <Attribute readonly="readonly" name="mcc" id="::SystemInfo::SystemInfoCellularNetwork::mcc">
49532 <webidl> readonly attribute unsigned short mcc;</webidl>
49535 Represents Mobile Country Code (MCC) of the cellular network.
49541 <Type type="unsigned short"/>
49543 <Attribute readonly="readonly" name="mnc" id="::SystemInfo::SystemInfoCellularNetwork::mnc">
49544 <webidl> readonly attribute unsigned short mnc;</webidl>
49547 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
49548 identify a mobile phone operator/carrier using the GSM, CDMA, iDEN, TETRA and UMTS public land mobile networks and some satellite mobile networks.
49554 <Type type="unsigned short"/>
49556 <Attribute readonly="readonly" name="cellId" id="::SystemInfo::SystemInfoCellularNetwork::cellId">
49557 <webidl> readonly attribute unsigned short cellId;</webidl>
49560 Represents Cell Id.
49566 <Type type="unsigned short"/>
49568 <Attribute readonly="readonly" name="lac" id="::SystemInfo::SystemInfoCellularNetwork::lac">
49569 <webidl> readonly attribute unsigned short lac;</webidl>
49572 Represents Location Area Code.
49578 <Type type="unsigned short"/>
49580 <Attribute readonly="readonly" name="isRoaming" id="::SystemInfo::SystemInfoCellularNetwork::isRoaming">
49581 <webidl> readonly attribute boolean isRoaming;</webidl>
49584 Whether the connection is set up while the device is roaming.
49590 <Type type="boolean"/>
49592 <Attribute readonly="readonly" name="isFlightMode" id="::SystemInfo::SystemInfoCellularNetwork::isFlightMode">
49593 <webidl> readonly attribute boolean isFlightMode;</webidl>
49596 Indicates whether the device is in flight mode.
49602 <Type type="boolean"/>
49604 <Attribute readonly="readonly" name="imei" id="::SystemInfo::SystemInfoCellularNetwork::imei">
49605 <webidl> readonly attribute DOMString imei raises(<ref>WebAPIException</ref>);</webidl>
49608 Represents the International Mobile Equipment Identity (IMEI).
49617 http://tizen.org/privilege/systemmanager
49620 <Type type="DOMString"/>
49622 <RaiseException name="WebAPIException">
49625 with error type SecurityError, if this attribute is not allowed.
49632 <Interface name="SystemInfoSIM" id="::SystemInfo::SystemInfoSIM">
49633 <webidl> [NoInterfaceObject] interface SystemInfoSIM : <ref>SystemInfoProperty</ref> {
49634 readonly attribute <ref>SystemInfoSimState</ref> state raises(<ref>WebAPIException</ref>);
49635 readonly attribute DOMString operatorName raises(<ref>WebAPIException</ref>);
49636 readonly attribute DOMString msisdn raises(<ref>WebAPIException</ref>);
49637 readonly attribute DOMString iccid raises(<ref>WebAPIException</ref>);
49638 readonly attribute unsigned short mcc raises(<ref>WebAPIException</ref>);
49639 readonly attribute unsigned short mnc raises(<ref>WebAPIException</ref>);
49640 readonly attribute DOMString msin raises(<ref>WebAPIException</ref>);
49641 readonly attribute DOMString spn raises(<ref>WebAPIException</ref>);
49645 This property reflects the information of the SIM card information.
49651 <ExtendedAttributeList>
49652 <ExtendedAttribute name="NoInterfaceObject">
49653 <webidl>NoInterfaceObject</webidl>
49654 </ExtendedAttribute>
49655 </ExtendedAttributeList>
49656 <InterfaceInheritance>
49657 <Name name="SystemInfoProperty"/>
49658 </InterfaceInheritance>
49659 <Attribute readonly="readonly" name="state" id="::SystemInfo::SystemInfoSIM::state">
49660 <webidl> readonly attribute <ref>SystemInfoSimState</ref> state raises(<ref>WebAPIException</ref>);</webidl>
49663 Represents the SIM card state.
49672 http://tizen.org/privilege/system
49675 <Type name="SystemInfoSimState"/>
49677 <RaiseException name="WebAPIException">
49680 with error type SecurityError, if this attribute is not allowed.
49686 <Attribute readonly="readonly" name="operatorName" id="::SystemInfo::SystemInfoSIM::operatorName">
49687 <webidl> readonly attribute DOMString operatorName raises(<ref>WebAPIException</ref>);</webidl>
49690 Represents the Operator Name String (ONS) of Common PCN Handset Specification (CPHS) in SIM card.
49699 http://tizen.org/privilege/system
49702 <Type type="DOMString"/>
49704 <RaiseException name="WebAPIException">
49707 with error type SecurityError, if this attribute is not allowed.
49713 <Attribute readonly="readonly" name="msisdn" id="::SystemInfo::SystemInfoSIM::msisdn">
49714 <webidl> readonly attribute DOMString msisdn raises(<ref>WebAPIException</ref>);</webidl>
49717 Represents the SIM card subscriber number.
49726 http://tizen.org/privilege/systemmanager
49729 <Type type="DOMString"/>
49731 <RaiseException name="WebAPIException">
49734 with error type SecurityError, if this attribute is not allowed.
49740 <Attribute readonly="readonly" name="iccid" id="::SystemInfo::SystemInfoSIM::iccid">
49741 <webidl> readonly attribute DOMString iccid raises(<ref>WebAPIException</ref>);</webidl>
49744 Represents the Integrated Circuit Card ID.
49753 http://tizen.org/privilege/system
49756 <Type type="DOMString"/>
49758 <RaiseException name="WebAPIException">
49761 with error type SecurityError, if this attribute is not allowed.
49767 <Attribute readonly="readonly" name="mcc" id="::SystemInfo::SystemInfoSIM::mcc">
49768 <webidl> readonly attribute unsigned short mcc raises(<ref>WebAPIException</ref>);</webidl>
49771 Represents the Mobile Country Code (MCC) of SIM provider.
49780 http://tizen.org/privilege/system
49783 <Type type="unsigned short"/>
49785 <RaiseException name="WebAPIException">
49788 with error type SecurityError, if this attribute is not allowed.
49794 <Attribute readonly="readonly" name="mnc" id="::SystemInfo::SystemInfoSIM::mnc">
49795 <webidl> readonly attribute unsigned short mnc raises(<ref>WebAPIException</ref>);</webidl>
49798 Represents the Mobile Network Code (MNC) of SIM provider.
49807 http://tizen.org/privilege/system
49810 <Type type="unsigned short"/>
49812 <RaiseException name="WebAPIException">
49815 with error type SecurityError, if this attribute is not allowed.
49821 <Attribute readonly="readonly" name="msin" id="::SystemInfo::SystemInfoSIM::msin">
49822 <webidl> readonly attribute DOMString msin raises(<ref>WebAPIException</ref>);</webidl>
49825 Represents the Mobile Subscription Identification Number (MSIN) of SIM provider.
49834 http://tizen.org/privilege/systemmanager
49837 <Type type="DOMString"/>
49839 <RaiseException name="WebAPIException">
49842 with error type SecurityError, if this attribute is not allowed.
49848 <Attribute readonly="readonly" name="spn" id="::SystemInfo::SystemInfoSIM::spn">
49849 <webidl> readonly attribute DOMString spn raises(<ref>WebAPIException</ref>);</webidl>
49852 Represents the Service Provider Name (SPN) of SIM card.
49861 http://tizen.org/privilege/system
49864 <Type type="DOMString"/>
49866 <RaiseException name="WebAPIException">
49869 with error type SecurityError, if this attribute is not allowed.
49876 <Interface name="SystemInfoPeripheral" id="::SystemInfo::SystemInfoPeripheral">
49877 <webidl> [NoInterfaceObject] interface SystemInfoPeripheral : <ref>SystemInfoProperty</ref> {
49879 readonly attribute boolean isVideoOutputOn;
49883 This property reflects the peripheral information of the current device.
49889 <ExtendedAttributeList>
49890 <ExtendedAttribute name="NoInterfaceObject">
49891 <webidl>NoInterfaceObject</webidl>
49892 </ExtendedAttribute>
49893 </ExtendedAttributeList>
49894 <InterfaceInheritance>
49895 <Name name="SystemInfoProperty"/>
49896 </InterfaceInheritance>
49897 <Attribute readonly="readonly" name="isVideoOutputOn" id="::SystemInfo::SystemInfoPeripheral::isVideoOutputOn">
49898 <webidl> readonly attribute boolean isVideoOutputOn;</webidl>
49901 Represents the video out status.
49907 <Type type="boolean"/>
49911 <Module name="SystemSetting" id="::SystemSetting">
49912 <webidl>module SystemSetting {
49914 [NoInterfaceObject] interface SystemSettingObject {
49915 readonly attribute <ref>SystemSettingManager</ref> systemsetting;
49917 <ref>Tizen</ref> implements <ref>SystemSettingObject</ref>;
49919 enum SystemSettingType {"HOME_SCREEN", "LOCK_SCREEN", "INCOMING_CALL", "NOTIFICATION_EMAIL"};
49921 [NoInterfaceObject] interface SystemSettingManager {
49923 void setProperty(<ref>SystemSettingType</ref> type,
49925 <ref>SuccessCallback</ref> successCallback,
49926 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);
49928 void getProperty(<ref>SystemSettingType</ref> type,
49929 <ref>SystemSettingSuccessCallback</ref> successCallback,
49930 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);
49934 [Callback=FunctionOnly, NoInterfaceObject] interface SystemSettingSuccessCallback {
49935 void onsuccess(DOMString value);
49941 This API provides interfaces and methods providing Web applications with access to various values of the system.
49945 This API provides an interface and method through features such as:
49953 INCOMING_CALL </li>
49955 NOTIFICATION_EMAIL </li>
49958 For more information on the SystemSetting features, see <a href="../../org.tizen.web.appprogramming/html/guide/sys_guide/systemsetting.htm">System Setting Guide</a>.
49965 <Interface name="SystemSettingObject" id="::SystemSetting::SystemSettingObject">
49966 <webidl> [NoInterfaceObject] interface SystemSettingObject {
49967 readonly attribute <ref>SystemSettingManager</ref> systemsetting;
49971 This interface defines what is instantiated by the <em>Tizen </em>object from the Tizen Platform.
49975 There will be a <em>tizen.systemsetting </em>object that allows accessing the functionality of the SystemSetting API.
49982 <ExtendedAttributeList>
49983 <ExtendedAttribute name="NoInterfaceObject">
49984 <webidl>NoInterfaceObject</webidl>
49985 </ExtendedAttribute>
49986 </ExtendedAttributeList>
49987 <Attribute readonly="readonly" name="systemsetting" id="::SystemSetting::SystemSettingObject::systemsetting">
49988 <webidl> readonly attribute <ref>SystemSettingManager</ref> systemsetting;</webidl>
49989 <Type name="SystemSettingManager"/>
49992 <Implements name1="Tizen" name2="SystemSettingObject">
49993 <webidl> <ref>Tizen</ref> implements <ref>SystemSettingObject</ref>;</webidl>
49995 <Enum name="SystemSettingType" id="::SystemSetting::SystemSettingType">
49996 <webidl> enum SystemSettingType {"HOME_SCREEN", "LOCK_SCREEN", "INCOMING_CALL", "NOTIFICATION_EMAIL"};</webidl>
49999 This enumerator indicates the type of supported system setting.
50000 The following values are supported in this release:
50005 HOME_SCREEN - For homescreen background image. </li>
50007 LOCK_SCREEN - For lockscreen background image. </li>
50009 INCOMING_CALL - For incoming call ringtone. </li>
50011 NOTIFICATION_EMAIL - For email notification alert tone. </li>
50014 Defines supporting setting types.
50015 The HOME_SCREEN and LOCK_SCREEN are supported for images files.
50016 The INCOMING_CALL and NOTIFICATION_EMAIL are support for sound files.
50023 <EnumValue stringvalue="HOME_SCREEN">
50024 <webidl>"HOME_SCREEN</webidl>
50026 <EnumValue stringvalue="LOCK_SCREEN">
50027 <webidl> "LOCK_SCREEN</webidl>
50029 <EnumValue stringvalue="INCOMING_CALL">
50030 <webidl> "INCOMING_CALL</webidl>
50032 <EnumValue stringvalue="NOTIFICATION_EMAIL">
50033 <webidl> "NOTIFICATION_EMAIL</webidl>
50036 <Interface name="SystemSettingManager" id="::SystemSetting::SystemSettingManager">
50037 <webidl> [NoInterfaceObject] interface SystemSettingManager {
50039 void setProperty(<ref>SystemSettingType</ref> type,
50041 <ref>SuccessCallback</ref> successCallback,
50042 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);
50044 void getProperty(<ref>SystemSettingType</ref> type,
50045 <ref>SystemSettingSuccessCallback</ref> successCallback,
50046 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);
50051 This is the top-level interface for the SystemSetting API that provides
50052 access to the module functionalities.
50055 <ExtendedAttributeList>
50056 <ExtendedAttribute name="NoInterfaceObject">
50057 <webidl>NoInterfaceObject</webidl>
50058 </ExtendedAttribute>
50059 </ExtendedAttributeList>
50060 <Operation name="setProperty" id="::SystemSetting::SystemSettingManager::setProperty">
50061 <webidl> void setProperty(<ref>SystemSettingType</ref> type,
50063 <ref>SuccessCallback</ref> successCallback,
50064 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);</webidl>
50067 Sets the property of a device.
50071 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.
50079 The ErrorCallback is launched with these error types:
50083 TypeMismatchError - If any input parameter is not compatible with the expected type for that parameter. </li>
50085 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
50087 UnknownError - If any other error occurs. </li>
50094 http://tizen.org/privilege/setting
50096 <Code> // Define the success callback
50097 function successCallback() {
50098 console.log("Success to setProperty");
50101 // Define the error callback.
50102 function errorCallback(error) {
50103 console.log("Fail to setProperty" + error.message);
50106 tizen.systemsetting.setProperty("HOME_SCREEN", "/opt/usr/media/Images/image1.jpg", successCallback, errorCallback);
50110 <Type type="void"/>
50112 <Argument name="type">
50115 The setting type to set.
50118 <Type name="SystemSettingType"/>
50120 <Argument name="value">
50123 The location path of a wallpaper or ringtone file.
50126 <Type type="DOMString"/>
50128 <Argument name="successCallback">
50131 To be invoked if the setting value is successfully set.
50134 <Type name="SuccessCallback"/>
50136 <Argument optional="optional" name="errorCallback">
50139 To be invoked if the setting value cannot be set.
50142 <Type name="ErrorCallback" nullable="nullable"/>
50146 <RaiseException name="WebAPIException">
50149 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
50152 with error type NotSupportedError, if this feature is not supported.
50155 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
50158 with error type SecurityError, if this functionality is not allowed.
50161 with error type UnknownError in any other error case.
50167 <Operation name="getProperty" id="::SystemSetting::SystemSettingManager::getProperty">
50168 <webidl> void getProperty(<ref>SystemSettingType</ref> type,
50169 <ref>SystemSettingSuccessCallback</ref> successCallback,
50170 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);</webidl>
50173 Gets the value of the property of a device.
50177 This method allows the user to get the value of the specified system property as wallpaper or ringtone of a device.
50185 The ErrorCallback is launched with these error types:
50189 TypeMismatchError - If any input parameter is not compatible with the expected type for that parameter. </li>
50191 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
50193 UnknownError - If any other error occurs. </li>
50196 <Code> // Define the success callback
50197 function getPropertySuccessCallback(value) {
50198 console.log("Success to getProperty : " + value);
50201 // Define the error callback.
50202 function errorCallback(error) {
50203 console.log("Fail to getProperty" + error.message);
50206 tizen.systemsetting.getProperty("HOME_SCREEN", getPropertySuccessCallback, errorCallback);
50210 <Type type="void"/>
50212 <Argument name="type">
50215 The type of the property to get.
50218 <Type name="SystemSettingType"/>
50220 <Argument name="successCallback">
50223 To be invoked if the setting value is successfully retrieved.
50226 <Type name="SystemSettingSuccessCallback"/>
50228 <Argument optional="optional" name="errorCallback">
50231 To be invoked if the setting value cannot be retrieved.
50234 <Type name="ErrorCallback" nullable="nullable"/>
50238 <RaiseException name="WebAPIException">
50241 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
50244 with error type NotSupportedError, if this feature is not supported.
50247 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
50250 with error type UnknownError in any other error case.
50257 <Interface name="SystemSettingSuccessCallback" id="::SystemSetting::SystemSettingSuccessCallback">
50258 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface SystemSettingSuccessCallback {
50259 void onsuccess(DOMString value);
50263 The success callback for getProperty().
50269 <ExtendedAttributeList>
50270 <ExtendedAttribute name="Callback" value="FunctionOnly">
50271 <webidl>Callback</webidl>
50272 </ExtendedAttribute>
50273 <ExtendedAttribute name="NoInterfaceObject">
50274 <webidl> NoInterfaceObject</webidl>
50275 </ExtendedAttribute>
50276 </ExtendedAttributeList>
50277 <Operation name="onsuccess" id="::SystemSetting::SystemSettingSuccessCallback::onsuccess">
50278 <webidl> void onsuccess(DOMString value);</webidl>
50279 <Type type="void"/>
50281 <Argument name="value">
50282 <Type type="DOMString"/>
50288 <Module name="Time" id="::Time">
50289 <webidl>module Time {
50291 enum TimeDurationUnit { "MSECS", "SECS", "MINS", "HOURS", "DAYS" };
50293 [NoInterfaceObject] interface TimeManagerObject {
50294 readonly attribute <ref>TimeUtil</ref> time;
50296 <ref>Tizen</ref> implements <ref>TimeManagerObject</ref>;
50298 [NoInterfaceObject] interface TimeUtil {
50299 <ref>TZDate</ref> getCurrentDateTime() raises(<ref>WebAPIException</ref>);
50301 DOMString getLocalTimezone() raises(<ref>WebAPIException</ref>);
50303 DOMString[] getAvailableTimezones() raises(<ref>WebAPIException</ref>);
50305 DOMString getDateFormat(optional boolean? shortformat) raises(<ref>WebAPIException</ref>);
50307 DOMString getTimeFormat() raises(<ref>WebAPIException</ref>);
50309 boolean isLeapYear(long year) raises(<ref>WebAPIException</ref>);
50313 [Constructor(optional Date? datetime, optional DOMString? timezone),
50314 Constructor(long year, long month, long day, optional long? hours, optional long? minutes, optional long? seconds, optional long? milliseconds, optional DOMString? timezone)]
50319 void setDate(long date);
50323 long getFullYear();
50325 void setFullYear(long year);
50329 void setHours(long hours);
50331 long getMilliseconds();
50333 void setMilliseconds(long ms);
50337 void setMinutes(long minutes);
50341 void setMonth(long month);
50345 void setSeconds(long seconds);
50349 void setUTCDate(long date);
50353 long getUTCFullYear();
50355 void setUTCFullYear(long year);
50357 long getUTCHours();
50359 void setUTCHours(long hours);
50361 long getUTCMilliseconds();
50363 void setUTCMilliseconds(long ms);
50365 long getUTCMinutes();
50367 void setUTCMinutes(long minutes);
50369 long getUTCMonth();
50371 void setUTCMonth(long month);
50373 long getUTCSeconds();
50375 void setUTCSeconds(long seconds);
50377 DOMString getTimezone();
50379 <ref>TZDate</ref> toTimezone(DOMString tzid) raises(<ref>WebAPIException</ref>);
50381 <ref>TZDate</ref> toLocalTimezone() raises(<ref>WebAPIException</ref>);
50383 <ref>TZDate</ref> toUTC() raises(<ref>WebAPIException</ref>);
50385 <ref>TimeDuration</ref> difference(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);
50387 boolean equalsTo(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);
50389 boolean earlierThan(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);
50391 boolean laterThan(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);
50393 <ref>TZDate</ref> addDuration(<ref>TimeDuration</ref> duration) raises(<ref>WebAPIException</ref>);
50395 DOMString toLocaleDateString();
50397 DOMString toLocaleTimeString();
50399 DOMString toLocaleString();
50401 DOMString toDateString();
50403 DOMString toTimeString();
50405 DOMString toString();
50407 DOMString getTimezoneAbbreviation() raises(<ref>WebAPIException</ref>);
50409 long secondsFromUTC() raises(<ref>WebAPIException</ref>);
50411 boolean isDST() raises(<ref>WebAPIException</ref>);
50413 <ref>TZDate</ref>? getPreviousDSTTransition() raises(<ref>WebAPIException</ref>);
50415 <ref>TZDate</ref>? getNextDSTTransition() raises(<ref>WebAPIException</ref>);
50418 [Constructor(long long length, optional <ref>TimeDurationUnit</ref>? unit)]
50419 interface TimeDuration
50421 attribute long long length;
50423 attribute <ref>TimeDurationUnit</ref> unit;
50425 <ref>TimeDuration</ref> difference(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);
50427 boolean equalsTo(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);
50429 boolean lessThan(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);
50431 boolean greaterThan(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);
50436 The Time API provides information regarding date / time and time zones.
50443 The JavaScript Date object does not have full timezone support.
50444 Date objects allow only simple representations to denote a particular location's
50445 offset from Universal Coordinated Time (UTC). This is typically provided as a +/-
50446 offset from UTC-0 (also known as Greenwich Mean Time, or GMT) for example, +05:30 denotes
50447 that a location is 5 hours and 30 minutes ahead of UTC +00:00.
50448 The issue with this method is not getting the correct
50449 local time for a given date. The existing methods are sufficient for this purpose.
50450 The issue is correctly converting to and from local time and UTC for all points in
50451 time - in any of the past, present, and future - based on an initial time provided.
50452 This is important for defining relative dates, where a time in a given location may
50453 observe different UTC offsets, according to any Daylight Savings Rules (DST) in effect
50454 or any other changes that may occur to a location's time zone over time.
50455 Without the communication of the explicit time zone rules governing a given date and
50456 time, the ability to effectively calculate the offset of the local time to UTC or to
50457 any other time zone at any point in the past or future is lost.
50460 This API can be used to get TZDate objects with full time zone support, convert them
50461 between timezones, retrieve available timezones.
50464 For more information on the Time features, see <a href="../../org.tizen.web.appprogramming/html/guide/sys_guide/time.htm">Time Guide</a>.
50468 <Enum name="TimeDurationUnit" id="::Time::TimeDurationUnit">
50469 <webidl> enum TimeDurationUnit { "MSECS", "SECS", "MINS", "HOURS", "DAYS" };</webidl>
50472 TimeDuration unit (milliseconds, seconds, minutes, hours or days).
50476 At least the following values must be supported:
50480 MSECS - Indicates a duration in milliseconds </li>
50482 SECS - Indicates a duration in seconds </li>
50484 MINS - Indicates a duration in minutes </li>
50486 HOURS - Indicates a duration in hours </li>
50488 DAYS - Indicates a duration in days </li>
50495 <EnumValue stringvalue="MSECS">
50496 <webidl> "MSECS</webidl>
50498 <EnumValue stringvalue="SECS">
50499 <webidl> "SECS</webidl>
50501 <EnumValue stringvalue="MINS">
50502 <webidl> "MINS</webidl>
50504 <EnumValue stringvalue="HOURS">
50505 <webidl> "HOURS</webidl>
50507 <EnumValue stringvalue="DAYS">
50508 <webidl> "DAYS</webidl>
50511 <Interface name="TimeManagerObject" id="::Time::TimeManagerObject">
50512 <webidl> [NoInterfaceObject] interface TimeManagerObject {
50513 readonly attribute <ref>TimeUtil</ref> time;
50517 Defines what is instantiated in the tizen object by the Tizen Platform.
50521 There will be a tizen.time object that allows accessing the
50522 functionality of the Time API.
50529 <ExtendedAttributeList>
50530 <ExtendedAttribute name="NoInterfaceObject">
50531 <webidl>NoInterfaceObject</webidl>
50532 </ExtendedAttribute>
50533 </ExtendedAttributeList>
50534 <Attribute readonly="readonly" name="time" id="::Time::TimeManagerObject::time">
50535 <webidl> readonly attribute <ref>TimeUtil</ref> time;</webidl>
50536 <Type name="TimeUtil"/>
50539 <Implements name1="Tizen" name2="TimeManagerObject">
50540 <webidl> <ref>Tizen</ref> implements <ref>TimeManagerObject</ref>;</webidl>
50542 <Interface name="TimeUtil" id="::Time::TimeUtil">
50543 <webidl> [NoInterfaceObject] interface TimeUtil {
50544 <ref>TZDate</ref> getCurrentDateTime() raises(<ref>WebAPIException</ref>);
50546 DOMString getLocalTimezone() raises(<ref>WebAPIException</ref>);
50548 DOMString[] getAvailableTimezones() raises(<ref>WebAPIException</ref>);
50550 DOMString getDateFormat(optional boolean? shortformat) raises(<ref>WebAPIException</ref>);
50552 DOMString getTimeFormat() raises(<ref>WebAPIException</ref>);
50554 boolean isLeapYear(long year) raises(<ref>WebAPIException</ref>);
50558 The TimeUtil class that provides access to the time API.
50562 This interface offers methods to manage date / time as well as timezones such as:
50566 Get the current date / time using getCurrentDateTime(). </li>
50568 Get timezones using getLocalTimezone() and getAvailableTimezones(). </li>
50575 <ExtendedAttributeList>
50576 <ExtendedAttribute name="NoInterfaceObject">
50577 <webidl>NoInterfaceObject</webidl>
50578 </ExtendedAttribute>
50579 </ExtendedAttributeList>
50580 <Operation name="getCurrentDateTime" id="::Time::TimeUtil::getCurrentDateTime">
50581 <webidl> <ref>TZDate</ref> getCurrentDateTime() raises(<ref>WebAPIException</ref>);</webidl>
50584 Returns the current date / time.
50589 <Code> var current_dt = tizen.time.getCurrentDateTime();
50590 console.log("current date / time is " + current_dt.toLocaleString());
50593 <Type name="TZDate">
50596 TZDate Current TZDate object.
50602 <RaiseException name="WebAPIException">
50605 with error type UnknownError, if the call failed due to an unknown error.
50611 <Operation name="getLocalTimezone" id="::Time::TimeUtil::getLocalTimezone">
50612 <webidl> DOMString getLocalTimezone() raises(<ref>WebAPIException</ref>);</webidl>
50615 Returns identifier of the local system timezone.
50620 <Code> console.log("The local time zone is " + tizen.time.getLocalTimezone());
50623 <Type type="DOMString">
50626 Timezone Local timezone.
50632 <RaiseException name="WebAPIException">
50635 with error type UnknownError, if the call failed due to an unknown error.
50641 <Operation name="getAvailableTimezones" id="::Time::TimeUtil::getAvailableTimezones">
50642 <webidl> DOMString[] getAvailableTimezones() raises(<ref>WebAPIException</ref>);</webidl>
50645 Returns synchronously the identifiers of the timezones supported by the device.
50649 Zero or more slashes separate different components of a timezone identifier,
50650 with the most general descriptor first and the most specific one last. For example,
50651 'Europe/Berlin', 'America/Argentina/Buenos_Aires'.
50657 <Code> var tzids = tizen.time.getAvailableTimezones();
50658 console.log("The device supports " + tzids.length + " time zones.");
50661 <Type type="array">
50664 Array of time zone identifiers.
50667 <Type type="DOMString"/>
50671 <RaiseException name="WebAPIException">
50674 with error type UnknownError, if the call failed due to an unknown error.
50680 <Operation name="getDateFormat" id="::Time::TimeUtil::getDateFormat">
50681 <webidl> DOMString getDateFormat(optional boolean? shortformat) raises(<ref>WebAPIException</ref>);</webidl>
50685 Returns the date format according to the system's locale settings.
50688 These expressions may be used in the returned string:
50692 "d" = day number (1 to 31) </li>
50694 "D" = day name </li>
50696 "m" = month number (1 to 12) </li>
50698 "M" = month name </li>
50700 "y" = year </li>
50703 Examples of string formats include: "d/m/y", "y-d-m", "D, M d y".
50710 <Type type="DOMString">
50713 DOMString The date format according to the system's locale settings.
50718 <Argument optional="optional" name="shortformat">
50721 Flag indicating if the user is interested in the short
50722 date format (23/10/2011) instead of a long date format ("Monday, October 23 2011").
50723 By default, this attribute is set to false.
50726 <Type type="boolean" nullable="nullable"/>
50730 <RaiseException name="WebAPIException">
50733 with error type UnknownError, if the call failed due to an unknown error.
50739 <Operation name="getTimeFormat" id="::Time::TimeUtil::getTimeFormat">
50740 <webidl> DOMString getTimeFormat() raises(<ref>WebAPIException</ref>);</webidl>
50744 Returns the time format according to the system's locale settings.
50747 These expressions may be used in the returned string:
50751 "h" = hours (0 to 23 or 1 to 12 if AM/PM display) </li>
50753 "m" = minutes (0 to 59) </li>
50755 "s" = seconds (0 to 59) </li>
50757 "ap" = AM/PM display </li>
50760 Examples of string formats include: "h:m:s ap", "h:m:s".
50767 <Type type="DOMString">
50770 DOMString The time format according to the system's locale settings.
50776 <RaiseException name="WebAPIException">
50779 with error type UnknownError, if the call failed due to an unknown error.
50785 <Operation name="isLeapYear" id="::Time::TimeUtil::isLeapYear">
50786 <webidl> boolean isLeapYear(long year) raises(<ref>WebAPIException</ref>);</webidl>
50789 Returns <em>true</em> if the given year is a leap year.
50794 <Code> var current_dt = tizen.time.getCurrentDateTime();
50795 var is_leap = tizen.time.isLeapYear(current_dt.getFullYear());
50797 console.log("This year is a leap year.");
50800 <Type type="boolean">
50803 boolean <em>true</em>, if the year is a leap year.
50808 <Argument name="year">
50814 <Type type="long"/>
50818 <RaiseException name="WebAPIException">
50821 with error type TypeMismatchError, if the input parameter
50822 is not compatible with the expected type for that parameter.
50825 with error type InvalidValuesError, if any of the input
50826 parameters contain an invalid value.
50829 with error type UnknownError, if the call failed due to an unknown error.
50836 <Interface name="TZDate" id="::Time::TZDate">
50837 <webidl> [Constructor(optional Date? datetime, optional DOMString? timezone),
50838 Constructor(long year, long month, long day, optional long? hours, optional long? minutes, optional long? seconds, optional long? milliseconds, optional DOMString? timezone)]
50843 void setDate(long date);
50847 long getFullYear();
50849 void setFullYear(long year);
50853 void setHours(long hours);
50855 long getMilliseconds();
50857 void setMilliseconds(long ms);
50861 void setMinutes(long minutes);
50865 void setMonth(long month);
50869 void setSeconds(long seconds);
50873 void setUTCDate(long date);
50877 long getUTCFullYear();
50879 void setUTCFullYear(long year);
50881 long getUTCHours();
50883 void setUTCHours(long hours);
50885 long getUTCMilliseconds();
50887 void setUTCMilliseconds(long ms);
50889 long getUTCMinutes();
50891 void setUTCMinutes(long minutes);
50893 long getUTCMonth();
50895 void setUTCMonth(long month);
50897 long getUTCSeconds();
50899 void setUTCSeconds(long seconds);
50901 DOMString getTimezone();
50903 <ref>TZDate</ref> toTimezone(DOMString tzid) raises(<ref>WebAPIException</ref>);
50905 <ref>TZDate</ref> toLocalTimezone() raises(<ref>WebAPIException</ref>);
50907 <ref>TZDate</ref> toUTC() raises(<ref>WebAPIException</ref>);
50909 <ref>TimeDuration</ref> difference(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);
50911 boolean equalsTo(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);
50913 boolean earlierThan(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);
50915 boolean laterThan(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);
50917 <ref>TZDate</ref> addDuration(<ref>TimeDuration</ref> duration) raises(<ref>WebAPIException</ref>);
50919 DOMString toLocaleDateString();
50921 DOMString toLocaleTimeString();
50923 DOMString toLocaleString();
50925 DOMString toDateString();
50927 DOMString toTimeString();
50929 DOMString toString();
50931 DOMString getTimezoneAbbreviation() raises(<ref>WebAPIException</ref>);
50933 long secondsFromUTC() raises(<ref>WebAPIException</ref>);
50935 boolean isDST() raises(<ref>WebAPIException</ref>);
50937 <ref>TZDate</ref>? getPreviousDSTTransition() raises(<ref>WebAPIException</ref>);
50939 <ref>TZDate</ref>? getNextDSTTransition() raises(<ref>WebAPIException</ref>);
50943 The TZDate object represents information regarding a given
50944 date / time in a predefined timezone.
50945 If its date / time is exceed the platform limit, TZDate will be invalid.
50951 <ExtendedAttributeList>
50952 <ExtendedAttribute name="Constructor">
50953 <webidl>Constructor(optional Date? datetime, optional DOMString? timezone)</webidl>
50955 <Argument optional="optional" name="datetime">
50956 <Type type="Date" nullable="nullable"/>
50958 <Argument optional="optional" name="timezone">
50959 <Type type="DOMString" nullable="nullable"/>
50962 </ExtendedAttribute>
50963 <ExtendedAttribute name="Constructor">
50964 <webidl> Constructor(long year, long month, long day, optional long? hours, optional long? minutes, optional long? seconds, optional long? milliseconds, optional DOMString? timezone)</webidl>
50969 <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>
50974 <Argument name="year">
50975 <Type type="long"/>
50977 <Argument name="month">
50978 <Type type="long"/>
50980 <Argument name="day">
50981 <Type type="long"/>
50983 <Argument optional="optional" name="hours">
50984 <Type type="long" nullable="nullable"/>
50986 <Argument optional="optional" name="minutes">
50987 <Type type="long" nullable="nullable"/>
50989 <Argument optional="optional" name="seconds">
50990 <Type type="long" nullable="nullable"/>
50992 <Argument optional="optional" name="milliseconds">
50993 <Type type="long" nullable="nullable"/>
50995 <Argument optional="optional" name="timezone">
50996 <Type type="DOMString" nullable="nullable"/>
50999 </ExtendedAttribute>
51000 </ExtendedAttributeList>
51001 <Operation name="getDate" id="::Time::TZDate::getDate">
51002 <webidl> long getDate();</webidl>
51005 Returns the day of the month (from 1-31).
51014 long The day of the month.
51020 <Operation name="setDate" id="::Time::TZDate::setDate">
51021 <webidl> void setDate(long date);</webidl>
51024 Sets the day of the month (from 1-31).
51028 If it tries to set the day bigger than the last day of the month or smaller than 1, it will be calculated automatically.
51029 For example, if TZDate's month is May and parameter is 32, it will be June 1.
51036 <Type type="void"/>
51038 <Argument name="date">
51044 <Type type="long"/>
51048 <Operation name="getDay" id="::Time::TZDate::getDay">
51049 <webidl> long getDay();</webidl>
51052 Returns the day of the week (from 0-6).
51061 long The day of the week.
51067 <Operation name="getFullYear" id="::Time::TZDate::getFullYear">
51068 <webidl> long getFullYear();</webidl>
51075 Positive values indicate AD(Anno Domini) years. 0 and negative values indicate BC(Before Christ) years.
51076 For example, 1 = AD 1, 0 = BC 1, -1 = BC 2.
51092 <Operation name="setFullYear" id="::Time::TZDate::setFullYear">
51093 <webidl> void setFullYear(long year);</webidl>
51102 <Type type="void"/>
51104 <Argument name="year">
51110 <Type type="long"/>
51114 <Operation name="getHours" id="::Time::TZDate::getHours">
51115 <webidl> long getHours();</webidl>
51118 Returns the hour (0-23).
51133 <Operation name="setHours" id="::Time::TZDate::setHours">
51134 <webidl> void setHours(long hours);</webidl>
51137 Sets the hour (0-23).
51141 If it tries to set the hour bigger than 23 or smaller than 0, it will be calculated automatically.
51142 For example, if hours is 24, it will set 0 and add to a date.
51149 <Type type="void"/>
51151 <Argument name="hours">
51157 <Type type="long"/>
51161 <Operation name="getMilliseconds" id="::Time::TZDate::getMilliseconds">
51162 <webidl> long getMilliseconds();</webidl>
51165 Returns the milliseconds (from 0-999).
51174 long The milliseconds.
51180 <Operation name="setMilliseconds" id="::Time::TZDate::setMilliseconds">
51181 <webidl> void setMilliseconds(long ms);</webidl>
51184 Sets the milliseconds (from 0-999).
51188 If it tries to set the millisecond bigger than 999 or smaller than 0, it will be calculated automatically.
51189 For example, if ms is 1000, it will set 0 and add to a second.
51196 <Type type="void"/>
51198 <Argument name="ms">
51201 Milliseconds to set.
51204 <Type type="long"/>
51208 <Operation name="getMinutes" id="::Time::TZDate::getMinutes">
51209 <webidl> long getMinutes();</webidl>
51212 Returns the minutes (from 0-59).
51227 <Operation name="setMinutes" id="::Time::TZDate::setMinutes">
51228 <webidl> void setMinutes(long minutes);</webidl>
51235 If it tries to set the minute bigger than 59 or smaller than 0, it will be calculated automatically.
51236 For example, if minutes is 60, it will set 0 and add to an hour.
51243 <Type type="void"/>
51245 <Argument name="minutes">
51251 <Type type="long"/>
51255 <Operation name="getMonth" id="::Time::TZDate::getMonth">
51256 <webidl> long getMonth();</webidl>
51259 Returns the month (from 0-11).
51274 <Operation name="setMonth" id="::Time::TZDate::setMonth">
51275 <webidl> void setMonth(long month);</webidl>
51278 Sets the month (from 0-11).
51282 If it tries to set the month bigger than 11 or smaller than 0, it will be calculated automatically.
51283 For example, if month is 12, it will set 0 and add to a year.
51290 <Type type="void"/>
51292 <Argument name="month">
51298 <Type type="long"/>
51302 <Operation name="getSeconds" id="::Time::TZDate::getSeconds">
51303 <webidl> long getSeconds();</webidl>
51306 Returns the seconds (from 0-59).
51321 <Operation name="setSeconds" id="::Time::TZDate::setSeconds">
51322 <webidl> void setSeconds(long seconds);</webidl>
51325 Sets the seconds (from 0-59).
51329 If it tries to set the second bigger than 59 or smaller than 0, it will be calculated automatically.
51330 For example, if seconds is 60, it will set 0 and add to a minute.
51337 <Type type="void"/>
51339 <Argument name="seconds">
51345 <Type type="long"/>
51349 <Operation name="getUTCDate" id="::Time::TZDate::getUTCDate">
51350 <webidl> long getUTCDate();</webidl>
51353 Returns the day of the month, according to universal time (from 1-31).
51362 long The day of the month, according to universal time.
51368 <Operation name="setUTCDate" id="::Time::TZDate::setUTCDate">
51369 <webidl> void setUTCDate(long date);</webidl>
51372 Sets the day of the month, according to universal time (from 1-31).
51376 If it tries to set the day bigger than the last day of the month or smaller than 1, it will be calculated automatically.
51377 For example, if TZDate's month is May and date is 32, it will be June 1.
51384 <Type type="void"/>
51386 <Argument name="date">
51392 <Type type="long"/>
51396 <Operation name="getUTCDay" id="::Time::TZDate::getUTCDay">
51397 <webidl> long getUTCDay();</webidl>
51400 Returns the day of the week, according to universal time (from 0-6).
51409 long The day of the week, according to universal time.
51415 <Operation name="getUTCFullYear" id="::Time::TZDate::getUTCFullYear">
51416 <webidl> long getUTCFullYear();</webidl>
51419 Returns the year, according to universal time.
51423 Positive values indicate AD(Anno Domini) years. 0 and negative values indicate BC(Before Christ) years.
51424 For example, 1 = AD 1, 0 = BC 1, -1 = BC 2.
51434 long The year, according to universal time.
51440 <Operation name="setUTCFullYear" id="::Time::TZDate::setUTCFullYear">
51441 <webidl> void setUTCFullYear(long year);</webidl>
51444 Sets the year, according to universal time.
51450 <Type type="void"/>
51452 <Argument name="year">
51458 <Type type="long"/>
51462 <Operation name="getUTCHours" id="::Time::TZDate::getUTCHours">
51463 <webidl> long getUTCHours();</webidl>
51466 Returns the hour, according to universal time (0-23).
51475 long The hour, according to universal time.
51481 <Operation name="setUTCHours" id="::Time::TZDate::setUTCHours">
51482 <webidl> void setUTCHours(long hours);</webidl>
51485 Sets the hour, according to universal time (0-23).
51489 If it tries to set the hour bigger than 23 or smaller than 0, it will be calculated automatically.
51490 For example, if hours is 24, it will set 0 and add to a date.
51497 <Type type="void"/>
51499 <Argument name="hours">
51505 <Type type="long"/>
51509 <Operation name="getUTCMilliseconds" id="::Time::TZDate::getUTCMilliseconds">
51510 <webidl> long getUTCMilliseconds();</webidl>
51513 Returns the milliseconds, according to universal time (from 0-999).
51522 long The milliseconds, according to universal time.
51528 <Operation name="setUTCMilliseconds" id="::Time::TZDate::setUTCMilliseconds">
51529 <webidl> void setUTCMilliseconds(long ms);</webidl>
51532 Sets the milliseconds, according to universal time (from 0-999).
51536 If it tries to set the millisecond bigger than 999 or smaller than 0, it will be calculated automatically.
51537 For example, if ms is 1000, it will set 0 and add to a second.
51544 <Type type="void"/>
51546 <Argument name="ms">
51549 Milliseconds to set.
51552 <Type type="long"/>
51556 <Operation name="getUTCMinutes" id="::Time::TZDate::getUTCMinutes">
51557 <webidl> long getUTCMinutes();</webidl>
51560 Returns the minutes, according to universal time (from 0-59).
51569 long The minutes, according to universal time.
51575 <Operation name="setUTCMinutes" id="::Time::TZDate::setUTCMinutes">
51576 <webidl> void setUTCMinutes(long minutes);</webidl>
51579 Sets the minutes, according to universal time (from 0-59).
51583 If it tries to set the minute bigger than 59 or smaller than 0, it will be calculated automatically.
51584 For example, if minutes is 60, it will set 0 and add to an hour.
51591 <Type type="void"/>
51593 <Argument name="minutes">
51599 <Type type="long"/>
51603 <Operation name="getUTCMonth" id="::Time::TZDate::getUTCMonth">
51604 <webidl> long getUTCMonth();</webidl>
51607 Returns the month, according to universal time (from 0-11).
51616 long The month, according to universal time.
51622 <Operation name="setUTCMonth" id="::Time::TZDate::setUTCMonth">
51623 <webidl> void setUTCMonth(long month);</webidl>
51626 Sets the month, according to universal time (from 0-11).
51630 If it tries to set the month bigger than 11 or smaller than 0, it will be calculated automatically.
51631 For example, if month is 12, it will set 0 and add to a year.
51638 <Type type="void"/>
51640 <Argument name="month">
51646 <Type type="long"/>
51650 <Operation name="getUTCSeconds" id="::Time::TZDate::getUTCSeconds">
51651 <webidl> long getUTCSeconds();</webidl>
51654 Returns the seconds, according to universal time (from 0-59).
51663 long The seconds, according to universal time.
51669 <Operation name="setUTCSeconds" id="::Time::TZDate::setUTCSeconds">
51670 <webidl> void setUTCSeconds(long seconds);</webidl>
51673 Sets the seconds, according to universal time (from 0-59).
51677 If it tries to set the second bigger than 59 or smaller than 0, it will be calculated automatically.
51678 For example, if seconds is 60, it will set 0 and add to a minute.
51685 <Type type="void"/>
51687 <Argument name="seconds">
51693 <Type type="long"/>
51697 <Operation name="getTimezone" id="::Time::TZDate::getTimezone">
51698 <webidl> DOMString getTimezone();</webidl>
51701 Returns timezone identifier.
51705 Zero or more slashes separate different components, with the most general
51706 descriptor first and the most specific one last. For example,
51707 'Europe/Berlin', 'America/Argentina/Buenos_Aires'.
51710 This attribute uniquely identifies the timezone.
51717 <Type type="DOMString">
51720 DOMString String timezone identifier. If TZDate is invalid, it will return 'Invalid Date'.
51726 <Operation name="toTimezone" id="::Time::TZDate::toTimezone">
51727 <webidl> <ref>TZDate</ref> toTimezone(DOMString tzid) raises(<ref>WebAPIException</ref>);</webidl>
51730 Returns a copy of the TZDate converted to a given time zone.
51736 <Type name="TZDate">
51739 TZDate New TZDate in given Timezone.
51744 <Argument name="tzid">
51747 Timezone identifier to set.
51750 <Type type="DOMString"/>
51754 <RaiseException name="WebAPIException">
51757 with error type TypeMismatchError, if the input parameter
51758 is not compatible with the expected type for that parameter.
51761 with error type InvalidValuesError, if the provided TZID
51762 is not recognized as a valid timezone identifier.
51765 with error type UnknownError, if the call failed due to an unknown error.
51771 <Operation name="toLocalTimezone" id="::Time::TZDate::toLocalTimezone">
51772 <webidl> <ref>TZDate</ref> toLocalTimezone() raises(<ref>WebAPIException</ref>);</webidl>
51775 Returns a copy of the TZDate converted to the local time zone.
51781 <Type name="TZDate">
51784 TZDate The new TZDate in local Timezone.
51790 <RaiseException name="WebAPIException">
51793 with error type UnknownError, if the call failed due to an unknown error.
51799 <Operation name="toUTC" id="::Time::TZDate::toUTC">
51800 <webidl> <ref>TZDate</ref> toUTC() raises(<ref>WebAPIException</ref>);</webidl>
51803 Returns a copy of the TZDate converted to Coordinated Universal Time (UTC).
51809 <Type name="TZDate">
51812 TZDate Date/Time in UTC.
51818 <RaiseException name="WebAPIException">
51821 with error type UnknownError, if the call failed due to an unknown error.
51827 <Operation name="difference" id="::Time::TZDate::difference">
51828 <webidl> <ref>TimeDuration</ref> difference(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);</webidl>
51831 Calculates the difference with another TZDate object.
51835 Calculates the difference in time between <em>this</em> and other.
51836 This comparison method takes timezones into consideration for the comparison.
51839 The TimeDuration that is returned is effectively <em>this</em> - other.
51840 The return value is a duration in milliseconds both TZDate objects have a time component, in days, otherwise.
51841 The result value will be:
51845 Negative, if other is in the future </li>
51847 0 if the two date / times are equal </li>
51849 Positive, if other is in the past </li>
51856 <Type name="TimeDuration">
51859 TimeDuration Duration in milliseconds between the two date / time objects
51860 (or in days for comparison between dates with no time component).
51865 <Argument name="other">
51868 Other Date/Time to compare to.
51871 <Type name="TZDate"/>
51875 <RaiseException name="WebAPIException">
51878 with error type TypeMismatchError, if the input parameter
51879 is not compatible with the expected type for that parameter.
51882 with error type UnknownError, if the call failed due to an unknown error.
51888 <Operation name="equalsTo" id="::Time::TZDate::equalsTo">
51889 <webidl> boolean equalsTo(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);</webidl>
51892 Checks if the TZDate is equal to another.
51896 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.
51903 <Type type="boolean">
51906 boolean <em>true</em> if the 2 date/times are the same.
51911 <Argument name="other">
51914 Other Date/Time to compare to.
51917 <Type name="TZDate"/>
51921 <RaiseException name="WebAPIException">
51924 with error type TypeMismatchError, if the input parameter
51925 is not compatible with the expected type for that parameter.
51928 with error type UnknownError, if the call failed due to an unknown error.
51934 <Operation name="earlierThan" id="::Time::TZDate::earlierThan">
51935 <webidl> boolean earlierThan(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);</webidl>
51938 Checks if the TZDate is earlier than another.
51942 This method takes the timezones into consideration.
51949 <Type type="boolean">
51952 boolean <em>true</em>, if the Date/Time is earlier than the one passed in argument.
51957 <Argument name="other">
51960 Other Date/Time to compare to.
51963 <Type name="TZDate"/>
51967 <RaiseException name="WebAPIException">
51970 with error type TypeMismatchError, if the input parameter
51971 is not compatible with the expected type for that parameter.
51974 with error type UnknownError, if the call failed due to an unknown error.
51980 <Operation name="laterThan" id="::Time::TZDate::laterThan">
51981 <webidl> boolean laterThan(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);</webidl>
51984 Checks if the TZDate is later than another.
51988 This method takes the timezones into consideration.
51995 <Type type="boolean">
51998 boolean <em>true</em>, if the Date/Time is later than the one passed in argument.
52003 <Argument name="other">
52006 Other Date/Time to compare to.
52009 <Type name="TZDate"/>
52013 <RaiseException name="WebAPIException">
52016 with error type TypeMismatchError, if the input parameter
52017 is not compatible with the expected type for that parameter.
52020 with error type UnknownError, if the call failed due to an unknown error.
52026 <Operation name="addDuration" id="::Time::TZDate::addDuration">
52027 <webidl> <ref>TZDate</ref> addDuration(<ref>TimeDuration</ref> duration) raises(<ref>WebAPIException</ref>);</webidl>
52030 Returns a new date by adding a duration to the current TZDate object.
52034 If the length of duration is negative, the new date / time will be
52035 earlier than it used to.
52038 Note that calling this method does not alter the current object.
52044 <Code> var now = tizen.time.getCurrentDateTime();
52045 var in_one_week = now.addDuration(new tizen.TimeDuration(7, "DAYS"));
52048 <Type name="TZDate">
52051 TZDate The new TZDate by adding a duration.
52056 <Argument name="duration">
52059 TimeDuration to add.
52062 <Type name="TimeDuration"/>
52066 <RaiseException name="WebAPIException">
52069 with error type TypeMismatchError, if the input parameter
52070 is not compatible with the expected type for that parameter.
52073 with error type UnknownError, if the call failed due to an unknown error.
52079 <Operation name="toLocaleDateString" id="::Time::TZDate::toLocaleDateString">
52080 <webidl> DOMString toLocaleDateString();</webidl>
52083 Returns the date portion of a TZDate object as a string, using locale conventions.
52089 <Type type="DOMString">
52092 DOMString Date portion of the TZDate object as a string, using locale conventions. If TZDate is invalid, it will return 'Invalid Date'.
52098 <Operation name="toLocaleTimeString" id="::Time::TZDate::toLocaleTimeString">
52099 <webidl> DOMString toLocaleTimeString();</webidl>
52102 Returns the time portion of a TZDate object as a string, using locale conventions.
52108 <Type type="DOMString">
52111 DOMString Time portion of the TZDate object as a string, using locale conventions. If TZDate is invalid, it will return 'Invalid Date'.
52117 <Operation name="toLocaleString" id="::Time::TZDate::toLocaleString">
52118 <webidl> DOMString toLocaleString();</webidl>
52121 Converts a TZDate object to a string, using locale conventions.
52127 <Type type="DOMString">
52130 DOMString String representation of the TZDate object, using locale conventions. If TZDate is invalid, it will return 'Invalid Date'.
52136 <Operation name="toDateString" id="::Time::TZDate::toDateString">
52137 <webidl> DOMString toDateString();</webidl>
52140 Returns the date portion of a TZDate object as a string.
52146 <Type type="DOMString">
52149 DOMString Date portion of the TZDate object as a string. If TZDate is invalid, it will return 'Invalid Date'.
52155 <Operation name="toTimeString" id="::Time::TZDate::toTimeString">
52156 <webidl> DOMString toTimeString();</webidl>
52159 Returns the time portion of a TZDate object as a string.
52165 <Type type="DOMString">
52168 DOMString Time portion of the TZDate object as a string. If TZDate is invalid, it will return 'Invalid Date'.
52174 <Operation name="toString" id="::Time::TZDate::toString">
52175 <webidl> DOMString toString();</webidl>
52178 Converts a TZDate object to a string.
52184 <Type type="DOMString">
52187 DOMString String representation of the TZDate object. If TZDate is invalid, it will return 'Invalid Date'.
52193 <Operation name="getTimezoneAbbreviation" id="::Time::TZDate::getTimezoneAbbreviation">
52194 <webidl> DOMString getTimezoneAbbreviation() raises(<ref>WebAPIException</ref>);</webidl>
52197 Determines the time zone abbreviation to be used at a particular date in the time zone.
52201 For example, in Toronto this is currently "EST" during the winter months and "EDT" during the
52202 summer months when daylight savings time is in effect.
52209 Some timezones return "GMT[+-]hh:mm". It is inconsistent.
52212 <Type type="DOMString">
52215 DOMString Abbreviation of the time zone (such as "EST"). If TZDate is invalid, it will return 'Invalid Date'.
52221 <RaiseException name="WebAPIException">
52224 with error type UnknownError, if the call failed due to an unknown error.
52230 <Operation name="secondsFromUTC" id="::Time::TZDate::secondsFromUTC">
52231 <webidl> long secondsFromUTC() raises(<ref>WebAPIException</ref>);</webidl>
52234 Gets the number of seconds from Coordinated Universal Time (UTC) offset for the timezone.
52238 Returns the offset (in seconds) from UTC of the timezone, accounting for daylight
52239 savings if in effect in the timezone. For example, if time zone is GMT+8, it will return -32,400.
52245 <Code> var offset = tizen.time.getCurrentDateTime().secondsFromUTC();
52246 var myDate = new Date();
52247 var exp_offset = myDate.getTimezoneOffset()*60;
52248 //offset is equals to exp_offset.
52254 long Offset from UTC in seconds.
52260 <RaiseException name="WebAPIException">
52263 with error type UnknownError, if the call failed due to an unknown error.
52269 <Operation name="isDST" id="::Time::TZDate::isDST">
52270 <webidl> boolean isDST() raises(<ref>WebAPIException</ref>);</webidl>
52273 Indicates if Daylight Saving Time(DST) is active for this TZDate.
52277 Indicates if daylight savings are in effect for the time zone and instant
52278 identified by the TZDate object.
52285 <Type type="boolean">
52288 boolean Flag indicating if daylight saving are in effect.
52294 <RaiseException name="WebAPIException">
52297 with error type UnknownError, if the call failed due to an unknown error.
52303 <Operation name="getPreviousDSTTransition" id="::Time::TZDate::getPreviousDSTTransition">
52304 <webidl> <ref>TZDate</ref>? getPreviousDSTTransition() raises(<ref>WebAPIException</ref>);</webidl>
52307 Returns the date of the previous daylight saving time transition for the timezone.
52313 <Type name="TZDate" nullable="nullable">
52316 TZDate The date of the previous daylight saving transition (before the instant identified by the TZDate).
52322 <RaiseException name="WebAPIException">
52325 with error type UnknownError, if the call failed due to an unknown error.
52331 <Operation name="getNextDSTTransition" id="::Time::TZDate::getNextDSTTransition">
52332 <webidl> <ref>TZDate</ref>? getNextDSTTransition() raises(<ref>WebAPIException</ref>);</webidl>
52335 Returns the date of the next daylight saving time transition for the timezone.
52341 <Type name="TZDate" nullable="nullable">
52344 TZDate The date of the next daylight saving transition (after the instant identified by the TZDate).
52350 <RaiseException name="WebAPIException">
52353 with error type UnknownError, if the call failed due to an unknown error.
52360 <Interface name="TimeDuration" id="::Time::TimeDuration">
52361 <webidl> [Constructor(long long length, optional <ref>TimeDurationUnit</ref>? unit)]
52362 interface TimeDuration
52364 attribute long long length;
52366 attribute <ref>TimeDurationUnit</ref> unit;
52368 <ref>TimeDuration</ref> difference(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);
52370 boolean equalsTo(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);
52372 boolean lessThan(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);
52374 boolean greaterThan(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);
52378 The TimeDuration object that contains the length and its associated
52384 <Code> var now = tizen.time.getCurrentDateTime();
52385 var tomorrow = now.addDuration(new tizen.TimeDuration(1, "DAYS")); // Becomes tomorrow, same time.
52388 <ExtendedAttributeList>
52389 <ExtendedAttribute name="Constructor">
52390 <webidl>Constructor(long long length, optional <ref>TimeDurationUnit</ref>? unit)</webidl>
52392 <Argument name="length">
52393 <Type type="long long"/>
52395 <Argument optional="optional" name="unit">
52396 <Type name="TimeDurationUnit" nullable="nullable"/>
52399 </ExtendedAttribute>
52400 </ExtendedAttributeList>
52401 <Attribute name="length" id="::Time::TimeDuration::length">
52402 <webidl> attribute long long length;</webidl>
52409 The unit of the duration length (milliseconds, seconds, minutes, hours, or days)
52410 is determined by the duration unit attribute.
52417 <Type type="long long"/>
52419 <Attribute name="unit" id="::Time::TimeDuration::unit">
52420 <webidl> attribute <ref>TimeDurationUnit</ref> unit;</webidl>
52423 Duration unit (milliseconds, seconds, minutes, hours, or days).
52427 The default value is "MSECS" (milliseconds unit).
52434 <Type name="TimeDurationUnit"/>
52436 <Operation name="difference" id="::Time::TimeDuration::difference">
52437 <webidl> <ref>TimeDuration</ref> difference(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);</webidl>
52440 Calculates the difference between two TimeDuration objects.
52444 Calculates the difference in time between <em>this</em> and <em>other</em>.
52445 The TimeDuration that is returned is effectively <em>first</em> - <em>other</em> (that is: positive if the first parameter is larger).
52448 The returned TimeDuration is the biggest possible unit without losing the precision.
52454 <Code> // Compute event1.duration - event2.duration
52455 var diff = event1.duration.difference(event2.duration);
52456 if (diff.length > 0)
52457 console.log("event 1's duration is longer than event 2's");
52458 else if (diff.length == 0)
52459 console.log("event 1's duration is as long as event 2's");
52461 console.log("event 1's duration is shorter than event 2's");
52464 <Type name="TimeDuration">
52467 New TimeDuration object corresponding to the result of <em>this</em> - <em>other</em>.
52472 <Argument name="other">
52475 Other TimeDuration object to compare to.
52478 <Type name="TimeDuration"/>
52482 <RaiseException name="WebAPIException">
52485 with error type TypeMismatchError, if the input parameter
52486 is not compatible with the expected type for that parameter.
52489 with error type UnknownError, if the call failed due to an unknown error.
52495 <Operation name="equalsTo" id="::Time::TimeDuration::equalsTo">
52496 <webidl> boolean equalsTo(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);</webidl>
52499 Checks if the TimeDuration is equal to another.
52503 This method takes the units into consideration and will return true
52504 if the two TimeDuration objects represent the same duration in different units.
52510 <Code> var d1 = new tizen.TimeDuration(60, "MINS"); // 60 minutes
52511 var d2 = new tizen.TimeDuration(1, "HOURS"); // 1 hour
52512 var ret = d1.equalsTo(d2); // Returns true
52515 <Type type="boolean">
52518 boolean <em>true</em> if the two TimeDuration object represent the same duration.
52523 <Argument name="other">
52526 Other TimeDuration object to compare to.
52529 <Type name="TimeDuration"/>
52533 <RaiseException name="WebAPIException">
52536 with error type TypeMismatchError, if the input parameter
52537 is not compatible with the expected type for that parameter.
52540 with error type UnknownError, if the call failed due to an unknown error.
52546 <Operation name="lessThan" id="::Time::TimeDuration::lessThan">
52547 <webidl> boolean lessThan(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);</webidl>
52550 Checks if the TimeDuration is lower than another.
52554 This method takes the units into consideration when doing the comparison.
52560 <Code> var d1 = new tizen.TimeDuration(1, "HOURS"); // 1 hour
52561 var d2 = new tizen.TimeDuration(120, "MINS"); // 120 minutes
52562 var ret = d1.lessThan(d2); // Returns true
52565 <Type type="boolean">
52568 boolean <em>true</em> if the TimeDuration is less than <em>other</em>.
52573 <Argument name="other">
52576 Other TimeDuration object to compare to.
52579 <Type name="TimeDuration"/>
52583 <RaiseException name="WebAPIException">
52586 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
52589 with error type UnknownError, if the call failed due to an unknown error.
52595 <Operation name="greaterThan" id="::Time::TimeDuration::greaterThan">
52596 <webidl> boolean greaterThan(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);</webidl>
52599 Checks if the TimeDuration is greater than another.
52603 This method takes the units into consideration when doing the comparison.
52609 <Code> var d1 = new tizen.TimeDuration(120, "MINS"); // 120 minutes
52610 var d2 = new tizen.TimeDuration(1, "HOURS"); // 1 hour
52611 var ret = d1.greaterThan(d2); // Returns true
52614 <Type type="boolean">
52617 boolean <em>true</em> if the TimeDuration is greater than <em>other</em>.
52622 <Argument name="other">
52625 Other TimeDuration object to compare to.
52628 <Type name="TimeDuration"/>
52632 <RaiseException name="WebAPIException">
52635 with error type TypeMismatchError, if the input parameter
52636 is not compatible with the expected type for that parameter.
52639 with error type UnknownError, if the call failed due to an unknown error.
52647 <Module name="Tizen" id="::Tizen">
52648 <webidl>module Tizen {
52649 enum FilterMatchFlag { "EXACTLY", "FULLSTRING", "CONTAINS", "STARTSWITH", "ENDSWITH", "EXISTS" };
52651 enum SortModeOrder { "ASC", "DESC" };
52653 enum CompositeFilterType { "UNION", "INTERSECTION" };
52655 [NoInterfaceObject] interface TizenObject {
52656 readonly attribute <ref>Tizen</ref> tizen;
52658 <ref>Window</ref> implements <ref>TizenObject</ref>;
52660 [NoInterfaceObject] interface Tizen {
52663 [NoInterfaceObject] interface AbstractFilter {
52666 [Constructor(DOMString attributeName, optional <ref>FilterMatchFlag</ref>? matchFlag, optional any matchValue)]
52667 interface AttributeFilter : <ref>AbstractFilter</ref> {
52668 attribute DOMString attributeName;
52670 attribute <ref>FilterMatchFlag</ref> matchFlag setraises(<ref>WebAPIException</ref>);
52672 attribute any matchValue;
52675 [Constructor(DOMString attributeName, optional any initialValue, optional any endValue)]
52676 interface AttributeRangeFilter : <ref>AbstractFilter</ref> {
52677 attribute DOMString attributeName;
52679 attribute any initialValue;
52681 attribute any endValue;
52684 [Constructor(<ref>CompositeFilterType</ref> type, optional <ref>AbstractFilter</ref>[]? filters)]
52685 interface CompositeFilter : <ref>AbstractFilter</ref> {
52687 attribute <ref>CompositeFilterType</ref> type;
52689 attribute <ref>AbstractFilter</ref>[] filters;
52692 [Constructor(DOMString attributeName, optional <ref>SortModeOrder</ref>? order)]
52693 interface SortMode {
52694 attribute DOMString attributeName;
52696 attribute <ref>SortModeOrder</ref> order setraises(<ref>WebAPIException</ref>);
52699 [Constructor(double latitude, double longitude)]
52700 interface SimpleCoordinates {
52701 attribute double latitude setraises(<ref>WebAPIException</ref>);
52703 attribute double longitude setraises(<ref>WebAPIException</ref>);
52706 [NoInterfaceObject]
52707 interface WebAPIException {
52708 readonly attribute unsigned short code;
52710 readonly attribute DOMString name;
52712 readonly attribute DOMString message;
52714 const unsigned short INDEX_SIZE_ERR = 1;
52715 const unsigned short DOMSTRING_SIZE_ERR = 2;
52716 const unsigned short HIERARCHY_REQUEST_ERR = 3;
52717 const unsigned short WRONG_DOCUMENT_ERR = 4;
52718 const unsigned short INVALID_CHARACTER_ERR = 5;
52719 const unsigned short NO_DATA_ALLOWED_ERR = 6;
52720 const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7;
52721 const unsigned short NOT_FOUND_ERR = 8;
52722 const unsigned short NOT_SUPPORTED_ERR = 9;
52723 const unsigned short INUSE_ATTRIBUTE_ERR = 10;
52724 const unsigned short INVALID_STATE_ERR = 11;
52725 const unsigned short SYNTAX_ERR = 12;
52726 const unsigned short INVALID_MODIFICATION_ERR = 13;
52727 const unsigned short NAMESPACE_ERR = 14;
52728 const unsigned short INVALID_ACCESS_ERR = 15;
52729 const unsigned short VALIDATION_ERR = 16;
52730 const unsigned short TYPE_MISMATCH_ERR = 17;
52731 const unsigned short SECURITY_ERR = 18;
52732 const unsigned short NETWORK_ERR = 19;
52733 const unsigned short ABORT_ERR = 20;
52734 const unsigned short URL_MISMATCH_ERR = 21;
52735 const unsigned short QUOTA_EXCEEDED_ERR = 22;
52736 const unsigned short TIMEOUT_ERR = 23;
52737 const unsigned short INVALID_NODE_TYPE_ERR = 24;
52738 const unsigned short DATA_CLONE_ERR = 25;
52741 [NoInterfaceObject]
52742 interface WebAPIError {
52743 readonly attribute unsigned short code;
52745 readonly attribute DOMString name;
52747 readonly attribute DOMString message;
52750 [Callback=FunctionOnly, NoInterfaceObject]
52751 interface SuccessCallback {
52755 [Callback=FunctionOnly, NoInterfaceObject]
52756 interface ErrorCallback {
52758 void onerror (<ref>WebAPIError</ref> error);
52763 This API provides common Tizen functionality.
52767 The API provides the basic definitions that are used in the Tizen Web Device API.
52768 These include generic callbacks that are invoked when the operations succeed or fail,
52769 WebAPIError and WebAPIException that gives information of the platform's error and
52770 filters interfaces that are used to make query for searching.
52773 Additionally, this API specifies the location in the ECMAScript hierarchy in which
52774 the Tizen Web Device API is instantiated (<em>window.tizen</em>).
52777 For more information on the Tizen features, see <a href="../../org.tizen.web.appprogramming/html/guide/tizen_guide/tizen.htm">Tizen Guide</a>.
52784 <Enum name="FilterMatchFlag" id="::Tizen::FilterMatchFlag">
52785 <webidl> enum FilterMatchFlag { "EXACTLY", "FULLSTRING", "CONTAINS", "STARTSWITH", "ENDSWITH", "EXISTS" };</webidl>
52792 These values are supported:
52796 EXACTLY - Indicates that an attribute value should match exactly with the specified default value.
52797 For strings, this type of comparison is case-sensitive. </li>
52799 FULLSTRING - Indicates String-based comparison and that the attribute value should match the whole string (case insensitive). </li>
52801 CONTAINS - Indicates that an attribute value should contain the specified string. This type of comparison works only on strings and is case insensitive. </li>
52803 STARTSWITH - Indicates that an attribute value should start with the specified string.
52804 This type of comparison works only on strings and is case insensitive. </li>
52806 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>
52808 EXISTS - Indicates that a filter comparison should match if the specified attribute exists. </li>
52815 <EnumValue stringvalue="EXACTLY">
52816 <webidl> "EXACTLY</webidl>
52818 <EnumValue stringvalue="FULLSTRING">
52819 <webidl> "FULLSTRING</webidl>
52821 <EnumValue stringvalue="CONTAINS">
52822 <webidl> "CONTAINS</webidl>
52824 <EnumValue stringvalue="STARTSWITH">
52825 <webidl> "STARTSWITH</webidl>
52827 <EnumValue stringvalue="ENDSWITH">
52828 <webidl> "ENDSWITH</webidl>
52830 <EnumValue stringvalue="EXISTS">
52831 <webidl> "EXISTS</webidl>
52834 <Enum name="SortModeOrder" id="::Tizen::SortModeOrder">
52835 <webidl> enum SortModeOrder { "ASC", "DESC" };</webidl>
52838 An enumerator that indicates the sorting order.
52842 The following values are supported:
52846 ASC - Indicates the sorting order is ascending </li>
52848 DESC - Indicates the sorting order is descending </li>
52855 <EnumValue stringvalue="ASC">
52856 <webidl> "ASC</webidl>
52858 <EnumValue stringvalue="DESC">
52859 <webidl> "DESC</webidl>
52862 <Enum name="CompositeFilterType" id="::Tizen::CompositeFilterType">
52863 <webidl> enum CompositeFilterType { "UNION", "INTERSECTION" };</webidl>
52866 An enumerator that indicates the type of composite filter.
52870 The following values are supported:
52874 UNION - Indicates that the composite is a union of filters ("OR" operator) </li>
52876 INTERSECTION - Indicates that the composite is an intersection of filters ("AND" operator) </li>
52883 <EnumValue stringvalue="UNION">
52884 <webidl> "UNION</webidl>
52886 <EnumValue stringvalue="INTERSECTION">
52887 <webidl> "INTERSECTION</webidl>
52890 <Interface name="TizenObject" id="::Tizen::TizenObject">
52891 <webidl> [NoInterfaceObject] interface TizenObject {
52892 readonly attribute <ref>Tizen</ref> tizen;
52896 Defines the tizen interface as a part of the window global object.
52900 The <em>Tizen</em> interface is always available within the <em>Window </em>object in the ECMAScript hierarchy.
52907 <ExtendedAttributeList>
52908 <ExtendedAttribute name="NoInterfaceObject">
52909 <webidl>NoInterfaceObject</webidl>
52910 </ExtendedAttribute>
52911 </ExtendedAttributeList>
52912 <Attribute readonly="readonly" name="tizen" id="::Tizen::TizenObject::tizen">
52913 <webidl> readonly attribute <ref>Tizen</ref> tizen;</webidl>
52914 <Type name="Tizen"/>
52917 <Implements name1="Window" name2="TizenObject">
52918 <webidl> <ref>Window</ref> implements <ref>TizenObject</ref>;</webidl>
52920 <Interface name="Tizen" id="::Tizen::Tizen">
52921 <webidl> [NoInterfaceObject] interface Tizen {
52925 The root of Tizen Web Device API.
52929 This is the Tizen root interface.
52930 It is a property of the ECMAScript global object, as specified by the <em>TizenObject</em> interface.
52937 <ExtendedAttributeList>
52938 <ExtendedAttribute name="NoInterfaceObject">
52939 <webidl>NoInterfaceObject</webidl>
52940 </ExtendedAttribute>
52941 </ExtendedAttributeList>
52943 <Interface name="AbstractFilter" id="::Tizen::AbstractFilter">
52944 <webidl> [NoInterfaceObject] interface AbstractFilter {
52948 This is a common interface used by different types of
52953 Never use this base interface directly, instead use <em>AbstractFilter</em> subtypes,
52954 such as <em>AttributeFilter</em>, <em>AttributeRangeFilter</em>, and <em>CompositeFilter</em>.
52961 <ExtendedAttributeList>
52962 <ExtendedAttribute name="NoInterfaceObject">
52963 <webidl>NoInterfaceObject</webidl>
52964 </ExtendedAttribute>
52965 </ExtendedAttributeList>
52967 <Interface name="AttributeFilter" id="::Tizen::AttributeFilter">
52968 <webidl> [Constructor(DOMString attributeName, optional <ref>FilterMatchFlag</ref>? matchFlag, optional any matchValue)]
52969 interface AttributeFilter : <ref>AbstractFilter</ref> {
52970 attribute DOMString attributeName;
52972 attribute <ref>FilterMatchFlag</ref> matchFlag setraises(<ref>WebAPIException</ref>);
52974 attribute any matchValue;
52978 This interface represents a set of filter.
52982 It represents the query statement for the specified value of the <em>matchValue</em> by the rule of <em>matchFlag</em>.
52985 If no <em>matchValue</em> is defined, the filter will match all objects that have the attribute
52986 defined (same as the "EXISTS" filter works), otherwise, it will only match objects which have an attribute that matches
52987 the specified value.
52993 <Code> // Define success callback
52994 function successCallback(contacts) {
52995 console.log(contacts.length + " contacts found.");
52998 // Define error callback
52999 function errorCallback(error) {
53000 console.log("An error occurred: " + error.message);
53003 // Create an attribute filter based on first name: "First name should contain 'Chris' (case insensitive)"
53004 var filter = new tizen.AttributeFilter("name.firstName", "CONTAINS", "Chris");
53005 // Send request on contact address book.
53006 tizen.contact.getDefaultAddressBook().find(successCallback, errorCallback, filter);
53009 <ExtendedAttributeList>
53010 <ExtendedAttribute name="Constructor">
53011 <webidl>Constructor(DOMString attributeName, optional <ref>FilterMatchFlag</ref>? matchFlag, optional any matchValue)</webidl>
53013 <Argument name="attributeName">
53014 <Type type="DOMString"/>
53016 <Argument optional="optional" name="matchFlag">
53017 <Type name="FilterMatchFlag" nullable="nullable"/>
53019 <Argument optional="optional" name="matchValue">
53023 </ExtendedAttribute>
53024 </ExtendedAttributeList>
53025 <InterfaceInheritance>
53026 <Name name="AbstractFilter"/>
53027 </InterfaceInheritance>
53028 <Attribute name="attributeName" id="::Tizen::AttributeFilter::attributeName">
53029 <webidl> attribute DOMString attributeName;</webidl>
53032 The name of the object attribute used for filtering.
53036 This is the name of the object attribute exactly as it is defined in
53037 the object's interface. For attributes of complex type, use fully-qualified names
53038 (such as 'organizations.role' to filter on a contact's role in an organization).
53041 For attributes of an array type, the filter will match if any value in the array
53049 <Type type="DOMString"/>
53051 <Attribute name="matchFlag" id="::Tizen::AttributeFilter::matchFlag">
53052 <webidl> attribute <ref>FilterMatchFlag</ref> matchFlag setraises(<ref>WebAPIException</ref>);</webidl>
53055 The match flag used for attribute-based filtering.
53059 By default, this attribute is set to "EXACTLY".
53066 <Type name="FilterMatchFlag"/>
53068 <RaiseException name="WebAPIException"/>
53071 <Attribute name="matchValue" id="::Tizen::AttributeFilter::matchValue">
53072 <webidl> attribute any matchValue;</webidl>
53075 The value used for matching.
53079 The filter will match if the attribute value matches the given matchValue.
53082 This value is not used if the <em>matchFlag</em> is set to "EXISTS".
53083 By default, this attribute is set to null.
53093 <Interface name="AttributeRangeFilter" id="::Tizen::AttributeRangeFilter">
53094 <webidl> [Constructor(DOMString attributeName, optional any initialValue, optional any endValue)]
53095 interface AttributeRangeFilter : <ref>AbstractFilter</ref> {
53096 attribute DOMString attributeName;
53098 attribute any initialValue;
53100 attribute any endValue;
53104 <em>AttributeRangeFilter</em> represents a filter based on an object attribute
53105 which has values that are within a particular range.
53109 Range filters, where only one boundary is set, are available.
53115 <Code> // Define success callback
53116 function successCallback(events) {
53117 console.log(events.length + " events today.");
53120 // Define error callback
53121 function errorCallback(error) {
53122 console.log("An error occurred: " + error.message);
53125 // Create an attribute range filter based on event start date: "All events occurring today".
53126 var now_dt = tizen.time.getCurrentDateTime();
53127 var today_begin = new tizen.TZDate(now_dt.getFullYear(), now_dt.getMonth(), now_dt.getDate());
53128 var today_end = today_begin.addDuration(new tizen.TimeDuration(1, "DAYS"));
53129 var filter = new tizen.AttributeRangeFilter("startDate", today_begin, today_end);
53131 // Send a search request to default event calendar.
53132 tizen.calendar.getDefaultCalendar("EVENT").find(successCallback, errorCallback, filter);
53135 <ExtendedAttributeList>
53136 <ExtendedAttribute name="Constructor">
53137 <webidl>Constructor(DOMString attributeName, optional any initialValue, optional any endValue)</webidl>
53139 <Argument name="attributeName">
53140 <Type type="DOMString"/>
53142 <Argument optional="optional" name="initialValue">
53145 <Argument optional="optional" name="endValue">
53149 </ExtendedAttribute>
53150 </ExtendedAttributeList>
53151 <InterfaceInheritance>
53152 <Name name="AbstractFilter"/>
53153 </InterfaceInheritance>
53154 <Attribute name="attributeName" id="::Tizen::AttributeRangeFilter::attributeName">
53155 <webidl> attribute DOMString attributeName;</webidl>
53158 The name of the object attribute used for filtering.
53162 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
53163 (such as 'organizations.role' to filter on a contact's role in an organization).
53166 For attributes of array type, the filter will match if any value in the array
53174 <Type type="DOMString"/>
53176 <Attribute name="initialValue" id="::Tizen::AttributeRangeFilter::initialValue">
53177 <webidl> attribute any initialValue;</webidl>
53180 Objects with an attribute that is greater than or equal to <em>initialValue</em> will match.
53184 By default, this attribute is set to <var>null</var>.
53193 <Attribute name="endValue" id="::Tizen::AttributeRangeFilter::endValue">
53194 <webidl> attribute any endValue;</webidl>
53197 Objects with an attribute that is strictly lower than to <em>endValue</em> will match.
53201 By default, this attribute is set to <var>null</var>.
53211 <Interface name="CompositeFilter" id="::Tizen::CompositeFilter">
53212 <webidl> [Constructor(<ref>CompositeFilterType</ref> type, optional <ref>AbstractFilter</ref>[]? filters)]
53213 interface CompositeFilter : <ref>AbstractFilter</ref> {
53215 attribute <ref>CompositeFilterType</ref> type;
53217 attribute <ref>AbstractFilter</ref>[] filters;
53221 <em>CompositeFilter</em> represents a set of filters.
53225 The composite filters can be one of the 2 types:
53229 The union - used to filter objects that match any of the filters it includes. </li>
53231 The intersection - used to filter objects that match all filters it includes. </li>
53237 <Code> // Define success callback
53238 function successCallback(contacts) {
53239 console.log(contacts.length + " contacts found.");
53242 // Define error callback
53243 function errorCallback(error) {
53244 console.log("An error occurred: " + error.message);
53247 // Create an attribute filter based on first name: "First name should contain 'Chris' (case insensitive)
53248 var firstNameFilter = new tizen.AttributeFilter("name.firstName", "CONTAINS", "Chris");
53250 // Create an attribute filter based on last name: "Last name should be exactly 'Smith' (case insensitive)
53251 var lastNameFilter = new tizen.AttributeFilter("name.lastName", "EXACTLY", "Smith"};
53253 // Create a filter based on the intersection of these two filter:
53254 // "First name should contain 'Chris' AND last name should be 'Smith'".
53255 var filter = new tizen.CompositeFilter("INTERSECTION", [firstNameFilter, lastNameFilter]);
53257 // Send request on contact address book.
53258 tizen.contact.getDefaultAddressBook().find(successCallback, errorCallback, filter);
53261 <ExtendedAttributeList>
53262 <ExtendedAttribute name="Constructor">
53263 <webidl>Constructor(<ref>CompositeFilterType</ref> type, optional <ref>AbstractFilter</ref>[]? filters)</webidl>
53265 <Argument name="type">
53266 <Type name="CompositeFilterType"/>
53268 <Argument optional="optional" name="filters">
53269 <Type type="array" nullable="nullable">
53270 <Type name="AbstractFilter"/>
53274 </ExtendedAttribute>
53275 </ExtendedAttributeList>
53276 <InterfaceInheritance>
53277 <Name name="AbstractFilter"/>
53278 </InterfaceInheritance>
53279 <Attribute name="type" id="::Tizen::CompositeFilter::type">
53280 <webidl> attribute <ref>CompositeFilterType</ref> type;</webidl>
53283 The composite filter type.
53289 <Type name="CompositeFilterType"/>
53291 <Attribute name="filters" id="::Tizen::CompositeFilter::filters">
53292 <webidl> attribute <ref>AbstractFilter</ref>[] filters;</webidl>
53295 The list of filters in the composite filter.
53301 <Type type="array">
53302 <Type name="AbstractFilter"/>
53306 <Interface name="SortMode" id="::Tizen::SortMode">
53307 <webidl> [Constructor(DOMString attributeName, optional <ref>SortModeOrder</ref>? order)]
53308 interface SortMode {
53309 attribute DOMString attributeName;
53311 attribute <ref>SortModeOrder</ref> order setraises(<ref>WebAPIException</ref>);
53315 <em>SortMode</em> is a common interface used for sorting of queried data.
53319 Note that the sorting result of list type attributes is not determined.
53325 <Code> // Define a success callback
53326 function successCallback(contacts) {
53327 // The returned contacts are sorted by first name (ascending)
53328 console.log(contacts.length + " contacts found.");
53331 // Define an error callback
53332 function errorCallback(error) {
53333 console.log("An error occurred: " + error.message);
53336 // Create an attribute filter based on first name: "First name should contain 'Chris' (case insensitive)"
53337 var filter = new tizen.AttributeFilter("name.firstName", "CONTAINS", "Chris");
53338 // Sort by first name, ascending
53339 var sortMode = new tizen.SortMode("name.firstName", "ASC");
53340 // Send request on contact address book.
53341 tizen.contact.getDefaultAddressBook().find(successCallback, errorCallback, filter, sortMode);
53344 <ExtendedAttributeList>
53345 <ExtendedAttribute name="Constructor">
53346 <webidl>Constructor(DOMString attributeName, optional <ref>SortModeOrder</ref>? order)</webidl>
53348 <Argument name="attributeName">
53349 <Type type="DOMString"/>
53351 <Argument optional="optional" name="order">
53352 <Type name="SortModeOrder" nullable="nullable"/>
53355 </ExtendedAttribute>
53356 </ExtendedAttributeList>
53357 <Attribute name="attributeName" id="::Tizen::SortMode::attributeName">
53358 <webidl> attribute DOMString attributeName;</webidl>
53361 The name of the object attribute used for sorting.
53367 <Type type="DOMString"/>
53369 <Attribute name="order" id="::Tizen::SortMode::order">
53370 <webidl> attribute <ref>SortModeOrder</ref> order setraises(<ref>WebAPIException</ref>);</webidl>
53373 The type of the sorting.
53377 By default, this attribute is set to <var>ASC</var>.
53384 <Type name="SortModeOrder"/>
53386 <RaiseException name="WebAPIException"/>
53390 <Interface name="SimpleCoordinates" id="::Tizen::SimpleCoordinates">
53391 <webidl> [Constructor(double latitude, double longitude)]
53392 interface SimpleCoordinates {
53393 attribute double latitude setraises(<ref>WebAPIException</ref>);
53395 attribute double longitude setraises(<ref>WebAPIException</ref>);
53399 <em>SimpleCoordinates</em> represents a point (latitude and longitude) in map coordinate system.
53403 Latitude and longitude are of the WGS84 datum.
53410 <ExtendedAttributeList>
53411 <ExtendedAttribute name="Constructor">
53412 <webidl>Constructor(double latitude, double longitude)</webidl>
53414 <Argument name="latitude">
53415 <Type type="double"/>
53417 <Argument name="longitude">
53418 <Type type="double"/>
53421 </ExtendedAttribute>
53422 </ExtendedAttributeList>
53423 <Attribute name="latitude" id="::Tizen::SimpleCoordinates::latitude">
53424 <webidl> attribute double latitude setraises(<ref>WebAPIException</ref>);</webidl>
53433 <Type type="double"/>
53435 <RaiseException name="WebAPIException"/>
53438 <Attribute name="longitude" id="::Tizen::SimpleCoordinates::longitude">
53439 <webidl> attribute double longitude setraises(<ref>WebAPIException</ref>);</webidl>
53448 <Type type="double"/>
53450 <RaiseException name="WebAPIException"/>
53454 <Interface name="WebAPIException" id="::Tizen::WebAPIException">
53455 <webidl> [NoInterfaceObject]
53456 interface WebAPIException {
53457 readonly attribute unsigned short code;
53459 readonly attribute DOMString name;
53461 readonly attribute DOMString message;
53463 const unsigned short INDEX_SIZE_ERR = 1;
53464 const unsigned short DOMSTRING_SIZE_ERR = 2;
53465 const unsigned short HIERARCHY_REQUEST_ERR = 3;
53466 const unsigned short WRONG_DOCUMENT_ERR = 4;
53467 const unsigned short INVALID_CHARACTER_ERR = 5;
53468 const unsigned short NO_DATA_ALLOWED_ERR = 6;
53469 const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7;
53470 const unsigned short NOT_FOUND_ERR = 8;
53471 const unsigned short NOT_SUPPORTED_ERR = 9;
53472 const unsigned short INUSE_ATTRIBUTE_ERR = 10;
53473 const unsigned short INVALID_STATE_ERR = 11;
53474 const unsigned short SYNTAX_ERR = 12;
53475 const unsigned short INVALID_MODIFICATION_ERR = 13;
53476 const unsigned short NAMESPACE_ERR = 14;
53477 const unsigned short INVALID_ACCESS_ERR = 15;
53478 const unsigned short VALIDATION_ERR = 16;
53479 const unsigned short TYPE_MISMATCH_ERR = 17;
53480 const unsigned short SECURITY_ERR = 18;
53481 const unsigned short NETWORK_ERR = 19;
53482 const unsigned short ABORT_ERR = 20;
53483 const unsigned short URL_MISMATCH_ERR = 21;
53484 const unsigned short QUOTA_EXCEEDED_ERR = 22;
53485 const unsigned short TIMEOUT_ERR = 23;
53486 const unsigned short INVALID_NODE_TYPE_ERR = 24;
53487 const unsigned short DATA_CLONE_ERR = 25;
53491 Generic exception interface.
53495 This interface will be used by the APIs to throw errors synchronously.
53498 The attempt to set an attribute value may or may not raise WebAPIException synchronously with error type TypeMismatchError or InvalidValuesError.
53505 <ExtendedAttributeList>
53506 <ExtendedAttribute name="NoInterfaceObject">
53507 <webidl>NoInterfaceObject</webidl>
53508 </ExtendedAttribute>
53509 </ExtendedAttributeList>
53510 <Attribute readonly="readonly" name="code" id="::Tizen::WebAPIException::code">
53511 <webidl> readonly attribute unsigned short code;</webidl>
53515 For the possible values for this attribute, see <a href="http://www.w3.org/TR/dom/#domexception">DOMException</a>.
53521 <Type type="unsigned short"/>
53523 <Attribute readonly="readonly" name="name" id="::Tizen::WebAPIException::name">
53524 <webidl> readonly attribute DOMString name;</webidl>
53527 An error type. The name attribute must return the value it was initialized with.
53528 This attribute can have one of the following values:
53533 UnknownError - An unknown error has occurred. </li>
53535 InvalidValuesError - The content of an object does not contain valid values. </li>
53537 IOError - An error occurred in communication with the underlying implementation and so the requested method cannot be completed. </li>
53539 ServiceNotAvailableError - The requested service is not available. </li>
53542 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>
53549 <Type type="DOMString"/>
53551 <Attribute readonly="readonly" name="message" id="::Tizen::WebAPIException::message">
53552 <webidl> readonly attribute DOMString message;</webidl>
53555 An error message that describes the details of an encountered error.
53556 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.
53562 <Type type="DOMString"/>
53564 <Const name="INDEX_SIZE_ERR" value="1" id="::Tizen::WebAPIException::INDEX_SIZE_ERR">
53565 <webidl> const unsigned short INDEX_SIZE_ERR = 1;</webidl>
53568 The index is not in the allowed range.
53574 <Type type="unsigned short"/>
53576 <Const name="DOMSTRING_SIZE_ERR" value="2" id="::Tizen::WebAPIException::DOMSTRING_SIZE_ERR">
53577 <webidl> const unsigned short DOMSTRING_SIZE_ERR = 2;</webidl>
53580 The specified range of text is too large.
53586 <Type type="unsigned short"/>
53588 <Const name="HIERARCHY_REQUEST_ERR" value="3" id="::Tizen::WebAPIException::HIERARCHY_REQUEST_ERR">
53589 <webidl> const unsigned short HIERARCHY_REQUEST_ERR = 3;</webidl>
53592 The operation would yield an incorrect node tree.
53598 <Type type="unsigned short"/>
53600 <Const name="WRONG_DOCUMENT_ERR" value="4" id="::Tizen::WebAPIException::WRONG_DOCUMENT_ERR">
53601 <webidl> const unsigned short WRONG_DOCUMENT_ERR = 4;</webidl>
53604 The object is in the wrong document.
53610 <Type type="unsigned short"/>
53612 <Const name="INVALID_CHARACTER_ERR" value="5" id="::Tizen::WebAPIException::INVALID_CHARACTER_ERR">
53613 <webidl> const unsigned short INVALID_CHARACTER_ERR = 5;</webidl>
53616 The string contains invalid characters.
53622 <Type type="unsigned short"/>
53624 <Const name="NO_DATA_ALLOWED_ERR" value="6" id="::Tizen::WebAPIException::NO_DATA_ALLOWED_ERR">
53625 <webidl> const unsigned short NO_DATA_ALLOWED_ERR = 6;</webidl>
53628 Data is specified for a node that does not support data.
53634 <Type type="unsigned short"/>
53636 <Const name="NO_MODIFICATION_ALLOWED_ERR" value="7" id="::Tizen::WebAPIException::NO_MODIFICATION_ALLOWED_ERR">
53637 <webidl> const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7;</webidl>
53640 The object cannot be modified.
53646 <Type type="unsigned short"/>
53648 <Const name="NOT_FOUND_ERR" value="8" id="::Tizen::WebAPIException::NOT_FOUND_ERR">
53649 <webidl> const unsigned short NOT_FOUND_ERR = 8;</webidl>
53652 The object cannot be found here.
53658 <Type type="unsigned short"/>
53660 <Const name="NOT_SUPPORTED_ERR" value="9" id="::Tizen::WebAPIException::NOT_SUPPORTED_ERR">
53661 <webidl> const unsigned short NOT_SUPPORTED_ERR = 9;</webidl>
53664 The operation is not supported.
53670 <Type type="unsigned short"/>
53672 <Const name="INUSE_ATTRIBUTE_ERR" value="10" id="::Tizen::WebAPIException::INUSE_ATTRIBUTE_ERR">
53673 <webidl> const unsigned short INUSE_ATTRIBUTE_ERR = 10;</webidl>
53676 The specified attribute is already in use elsewhere.
53682 <Type type="unsigned short"/>
53684 <Const name="INVALID_STATE_ERR" value="11" id="::Tizen::WebAPIException::INVALID_STATE_ERR">
53685 <webidl> const unsigned short INVALID_STATE_ERR = 11;</webidl>
53688 The object is in an invalid state.
53694 <Type type="unsigned short"/>
53696 <Const name="SYNTAX_ERR" value="12" id="::Tizen::WebAPIException::SYNTAX_ERR">
53697 <webidl> const unsigned short SYNTAX_ERR = 12;</webidl>
53700 The string did not match the expected pattern.
53706 <Type type="unsigned short"/>
53708 <Const name="INVALID_MODIFICATION_ERR" value="13" id="::Tizen::WebAPIException::INVALID_MODIFICATION_ERR">
53709 <webidl> const unsigned short INVALID_MODIFICATION_ERR = 13;</webidl>
53712 The object cannot be modified in this way.
53718 <Type type="unsigned short"/>
53720 <Const name="NAMESPACE_ERR" value="14" id="::Tizen::WebAPIException::NAMESPACE_ERR">
53721 <webidl> const unsigned short NAMESPACE_ERR = 14;</webidl>
53724 The operation is not allowed by Namespaces in XML.
53730 <Type type="unsigned short"/>
53732 <Const name="INVALID_ACCESS_ERR" value="15" id="::Tizen::WebAPIException::INVALID_ACCESS_ERR">
53733 <webidl> const unsigned short INVALID_ACCESS_ERR = 15;</webidl>
53736 The object does not support the operation or argument.
53742 <Type type="unsigned short"/>
53744 <Const name="VALIDATION_ERR" value="16" id="::Tizen::WebAPIException::VALIDATION_ERR">
53745 <webidl> const unsigned short VALIDATION_ERR = 16;</webidl>
53748 The operation would cause the node to fail validation.
53754 <Type type="unsigned short"/>
53756 <Const name="TYPE_MISMATCH_ERR" value="17" id="::Tizen::WebAPIException::TYPE_MISMATCH_ERR">
53757 <webidl> const unsigned short TYPE_MISMATCH_ERR = 17;</webidl>
53760 The type of the object does not match the expected type.
53766 <Type type="unsigned short"/>
53768 <Const name="SECURITY_ERR" value="18" id="::Tizen::WebAPIException::SECURITY_ERR">
53769 <webidl> const unsigned short SECURITY_ERR = 18;</webidl>
53772 The operation is insecure.
53778 <Type type="unsigned short"/>
53780 <Const name="NETWORK_ERR" value="19" id="::Tizen::WebAPIException::NETWORK_ERR">
53781 <webidl> const unsigned short NETWORK_ERR = 19;</webidl>
53784 A network error occurred.
53790 <Type type="unsigned short"/>
53792 <Const name="ABORT_ERR" value="20" id="::Tizen::WebAPIException::ABORT_ERR">
53793 <webidl> const unsigned short ABORT_ERR = 20;</webidl>
53796 The operation was aborted.
53802 <Type type="unsigned short"/>
53804 <Const name="URL_MISMATCH_ERR" value="21" id="::Tizen::WebAPIException::URL_MISMATCH_ERR">
53805 <webidl> const unsigned short URL_MISMATCH_ERR = 21;</webidl>
53808 The given URL does not match another URL.
53814 <Type type="unsigned short"/>
53816 <Const name="QUOTA_EXCEEDED_ERR" value="22" id="::Tizen::WebAPIException::QUOTA_EXCEEDED_ERR">
53817 <webidl> const unsigned short QUOTA_EXCEEDED_ERR = 22;</webidl>
53820 The quota has been exceeded.
53826 <Type type="unsigned short"/>
53828 <Const name="TIMEOUT_ERR" value="23" id="::Tizen::WebAPIException::TIMEOUT_ERR">
53829 <webidl> const unsigned short TIMEOUT_ERR = 23;</webidl>
53832 The operation timed out.
53838 <Type type="unsigned short"/>
53840 <Const name="INVALID_NODE_TYPE_ERR" value="24" id="::Tizen::WebAPIException::INVALID_NODE_TYPE_ERR">
53841 <webidl> const unsigned short INVALID_NODE_TYPE_ERR = 24;</webidl>
53844 The supplied node is incorrect or has an incorrect ancestor for this operation.
53850 <Type type="unsigned short"/>
53852 <Const name="DATA_CLONE_ERR" value="25" id="::Tizen::WebAPIException::DATA_CLONE_ERR">
53853 <webidl> const unsigned short DATA_CLONE_ERR = 25;</webidl>
53856 The object cannot be cloned.
53862 <Type type="unsigned short"/>
53865 <Interface name="WebAPIError" id="::Tizen::WebAPIError">
53866 <webidl> [NoInterfaceObject]
53867 interface WebAPIError {
53868 readonly attribute unsigned short code;
53870 readonly attribute DOMString name;
53872 readonly attribute DOMString message;
53876 Generic error interface.
53880 This interface will be used by the APIs in order to return them in the error callback of asynchronous methods.
53887 <ExtendedAttributeList>
53888 <ExtendedAttribute name="NoInterfaceObject">
53889 <webidl>NoInterfaceObject</webidl>
53890 </ExtendedAttribute>
53891 </ExtendedAttributeList>
53892 <Attribute readonly="readonly" name="code" id="::Tizen::WebAPIError::code">
53893 <webidl> readonly attribute unsigned short code;</webidl>
53897 Possible values are defined in <a href="http://www.w3.org/TR/dom/#domexception">DOMException</a>.
53903 <Type type="unsigned short"/>
53905 <Attribute readonly="readonly" name="name" id="::Tizen::WebAPIError::name">
53906 <webidl> readonly attribute DOMString name;</webidl>
53909 An error type. The name attribute must return the value it was initialized with.
53910 This attribute can have one of the following values:
53915 UnknownError - An unknown error has occurred. </li>
53917 InvalidValuesError - The content of an object does not contain valid values. </li>
53919 IOError - An error occurred in communication with the underlying implementation and so the requested method cannot be completed. </li>
53921 ServiceNotAvailableError - The requested service is not available. </li>
53924 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>
53931 <Type type="DOMString"/>
53933 <Attribute readonly="readonly" name="message" id="::Tizen::WebAPIError::message">
53934 <webidl> readonly attribute DOMString message;</webidl>
53937 An error message that describes the details of the error encountered. This attribute is not intended
53938 to be used directly in the user interfaces as it is mainly intended to be useful for developers rather than end users.
53944 <Type type="DOMString"/>
53947 <Interface name="SuccessCallback" id="::Tizen::SuccessCallback">
53948 <webidl> [Callback=FunctionOnly, NoInterfaceObject]
53949 interface SuccessCallback {
53954 This interface is used in methods that do not require any return value in the success callback.
53955 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.
53960 <Code> function onSuccess() {
53961 console.log("Application launched successfully");
53963 tizen.application.launch('0pnxz8hbsr.MyFiles', onSuccess);
53966 <ExtendedAttributeList>
53967 <ExtendedAttribute name="Callback" value="FunctionOnly">
53968 <webidl>Callback</webidl>
53969 </ExtendedAttribute>
53970 <ExtendedAttribute name="NoInterfaceObject">
53971 <webidl> NoInterfaceObject</webidl>
53972 </ExtendedAttribute>
53973 </ExtendedAttributeList>
53974 <Operation name="onsuccess" id="::Tizen::SuccessCallback::onsuccess">
53975 <webidl> void onsuccess ();</webidl>
53978 Method invoked when the asynchronous call completes successfully.
53984 <Type type="void"/>
53988 <Interface name="ErrorCallback" id="::Tizen::ErrorCallback">
53989 <webidl> [Callback=FunctionOnly, NoInterfaceObject]
53990 interface ErrorCallback {
53992 void onerror (<ref>WebAPIError</ref> error);
53996 This interface is used in methods that require only an error as input parameter in the error callback.
53997 If an invalid function (such as null) is passed to the API that accepts ErrorCallback,
53998 it silently fails and there is no further action.
54003 <Code> // Define the error callback.
54004 function onError(error) {
54005 console.log(error.message);
54008 // Define the success callback.
54009 function onSuccess(services) {
54010 //send a message using the found service
54012 tizen.messaging.getMessageServices("messaging.sms", onSuccess, onError);
54015 <ExtendedAttributeList>
54016 <ExtendedAttribute name="Callback" value="FunctionOnly">
54017 <webidl>Callback</webidl>
54018 </ExtendedAttribute>
54019 <ExtendedAttribute name="NoInterfaceObject">
54020 <webidl> NoInterfaceObject</webidl>
54021 </ExtendedAttribute>
54022 </ExtendedAttributeList>
54023 <Operation name="onerror" id="::Tizen::ErrorCallback::onerror">
54024 <webidl> void onerror (<ref>WebAPIError</ref> error);</webidl>
54027 Method that is invoked when the error occurs.
54033 <Type type="void"/>
54035 <Argument name="error">
54041 <Type name="WebAPIError"/>
54047 <Module name="WebSetting" id="::WebSetting">
54048 <webidl>module WebSetting {
54050 [NoInterfaceObject] interface WebSettingObject {
54051 readonly attribute <ref>WebSettingManager</ref> websetting;
54053 <ref>Tizen</ref> implements <ref>WebSettingObject</ref>;
54055 [NoInterfaceObject] interface WebSettingManager {
54057 void setUserAgentString(DOMString userAgent,
54058 optional <ref>SuccessCallback</ref>? successCallback,
54059 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);
54061 void removeAllCookies(optional <ref>SuccessCallback</ref>? successCallback,
54062 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);
54068 This Web setting API defines a set of APIs that manages the setting states of the Web view in your Web application.
54072 A Tizen Web application includes a web view and the properties below of the web view can be managed via the Web setting API:
54076 Delete all the cookies saved for the web view in the Web application. </li>
54078 Set a custom user agent string of the web view in the Web application. </li>
54081 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.
54088 <Interface name="WebSettingObject" id="::WebSetting::WebSettingObject">
54089 <webidl> [NoInterfaceObject] interface WebSettingObject {
54090 readonly attribute <ref>WebSettingManager</ref> websetting;
54094 This interface defines what is instantiated for the Web setting API by the <em>Tizen</em> object from the Tizen Platform.
54098 <em>tizen.websetting</em> object is available to manage the settings of the Web view in your Web application.
54105 <ExtendedAttributeList>
54106 <ExtendedAttribute name="NoInterfaceObject">
54107 <webidl>NoInterfaceObject</webidl>
54108 </ExtendedAttribute>
54109 </ExtendedAttributeList>
54110 <Attribute readonly="readonly" name="websetting" id="::WebSetting::WebSettingObject::websetting">
54111 <webidl> readonly attribute <ref>WebSettingManager</ref> websetting;</webidl>
54112 <Type name="WebSettingManager"/>
54115 <Implements name1="Tizen" name2="WebSettingObject">
54116 <webidl> <ref>Tizen</ref> implements <ref>WebSettingObject</ref>;</webidl>
54118 <Interface name="WebSettingManager" id="::WebSetting::WebSettingManager">
54119 <webidl> [NoInterfaceObject] interface WebSettingManager {
54121 void setUserAgentString(DOMString userAgent,
54122 optional <ref>SuccessCallback</ref>? successCallback,
54123 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);
54125 void removeAllCookies(optional <ref>SuccessCallback</ref>? successCallback,
54126 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);
54131 This is the top-level interface for the WebSetting API that managed the settings of the Web view in your Web application.
54134 <ExtendedAttributeList>
54135 <ExtendedAttribute name="NoInterfaceObject">
54136 <webidl>NoInterfaceObject</webidl>
54137 </ExtendedAttribute>
54138 </ExtendedAttributeList>
54139 <Operation name="setUserAgentString" id="::WebSetting::WebSettingManager::setUserAgentString">
54140 <webidl> void setUserAgentString(DOMString userAgent,
54141 optional <ref>SuccessCallback</ref>? successCallback,
54142 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);</webidl>
54145 Sets the custom user agent string for your Web application.
54149 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
54150 has the same user agent string as the Tizen browser on the device.
54153 The <em>ErrorCallback</em> is launched with these error types:
54157 UnknownError - If any error occurs while setting the user agent string. </li>
54159 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
54165 <Code> function successCallback() {
54166 console.log("The requested user agent string has just been set successfully.");
54169 tizen.websetting.setUserAgentString("the new user agent string to set", successCallback);
54173 <Type type="void"/>
54175 <Argument name="userAgent">
54178 User agent to set for the Web view in your Web application.
54181 <Type type="DOMString"/>
54183 <Argument optional="optional" name="successCallback">
54186 To be invoked if the requested setting operation succeeds.
54189 <Type name="SuccessCallback" nullable="nullable"/>
54191 <Argument optional="optional" name="errorCallback">
54194 To be invoked if the requested setting operation fails.
54197 <Type name="ErrorCallback" nullable="nullable"/>
54201 <RaiseException name="WebAPIException">
54204 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
54210 <Operation name="removeAllCookies" id="::WebSetting::WebSettingManager::removeAllCookies">
54211 <webidl> void removeAllCookies(optional <ref>SuccessCallback</ref>? successCallback,
54212 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);</webidl>
54215 Removes all the cookies saved for the Web view in your Web application.
54219 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.
54222 The <em>ErrorCallback</em> is launched with these error types:
54226 UnknownError - If any error occurs while deleting the cookies. </li>
54236 http://tizen.org/privilege/websetting
54238 <Code> function successCallback() {
54239 console.log("The cookies saved for your application have just been removed.");
54242 tizen.websetting.removeAllCookies(successCallback);
54246 <Type type="void"/>
54248 <Argument optional="optional" name="successCallback">
54251 To be invoked if the requested delete operation succeeds.
54254 <Type name="SuccessCallback" nullable="nullable"/>
54256 <Argument optional="optional" name="errorCallback">
54259 To be invoked if the requested delete operation fails.
54262 <Type name="ErrorCallback" nullable="nullable"/>
54266 <RaiseException name="WebAPIException">
54269 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
54272 with error type SecurityError, if the application does not have the privilege to call this method.