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 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>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>Tizen</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="Tizen" name2="MediaServerManagerObject">
3847 <webidl><ref>Tizen</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="Locale" id="::Locale">
4043 <webidl> module Locale {
4045 interface LocaleManagerObject {
4046 readonly attribute <ref>Locale</ref> locale;
4049 <ref>Tizen</ref> implements <ref>LocaleManagerObject</ref>;
4051 callback LocaleChangedCallback = void (DOMString newLocale);
4059 void setLocale(DOMString newLocale);
4061 void localeChanged(<ref>LocaleChangedCallback</ref> cb);
4064 <Interface name="LocaleManagerObject" id="::LocaleManagerObject">
4065 <webidl>[NoInterfaceObject]
4066 interface LocaleManagerObject {
4067 readonly attribute <ref>Locale</ref> locale;
4075 def-api-feature http://tizen.org/api/vehicle
4076 brief Allows access to the vehicle API
4080 <ExtendedAttributeList>
4081 <ExtendedAttribute name="NoInterfaceObject">
4082 <webidl>NoInterfaceObject</webidl>
4083 </ExtendedAttribute>
4084 </ExtendedAttributeList>
4085 <Attribute readonly="readonly" name="locale" id="::LocaleManagerObject::locale">
4086 <webidl> readonly attribute <ref>Locale</ref> locale;</webidl>
4087 <Type name="Locale"/>
4090 <Implements name1="Tizen" name2="LocaleManagerObject">
4091 <webidl><ref>Tizen</ref> implements <ref>LocaleManagerObject</ref>;</webidl>
4093 <Callback name="LocaleChangedCallback" id="::LocaleChangedCallback">
4094 <webidl>callback LocaleChangedCallback = void (DOMString newLocale);</webidl>
4097 <Argument name="newLocale">
4098 <Type type="DOMString"/>
4102 <Interface name="Locale" id="::Locale">
4103 <webidl>[NoInterfaceObject]
4108 void setLocale(DOMString newLocale);
4110 void localeChanged(<ref>LocaleChangedCallback</ref> cb);
4113 <ExtendedAttributeList>
4114 <ExtendedAttribute name="NoInterfaceObject">
4115 <webidl>NoInterfaceObject</webidl>
4116 </ExtendedAttribute>
4117 </ExtendedAttributeList>
4118 <Operation name="getLocale" id="::Locale::getLocale">
4119 <webidl> void getLocale();</webidl>
4123 brief gets the current locale
4124 returns current locale in ISO 639-2 format (ie en_US for english US)
4131 <Operation name="setLocale" id="::Locale::setLocale">
4132 <webidl> void setLocale(DOMString newLocale);</webidl>
4136 brief sets the system locale
4137 param newLocale locale to set in ISO 639-2 format
4143 <Argument name="newLocale">
4144 <Type type="DOMString"/>
4148 <Operation name="localeChanged" id="::Locale::localeChanged">
4149 <webidl> void localeChanged(<ref>LocaleChangedCallback</ref> cb);</webidl>
4153 brief subscribe to locale changes.
4154 param cb callback to be called when this even occurs.
4160 <Argument name="cb">
4161 <Type name="LocaleChangedCallback"/>
4167 <Module name="Speech" id="::Speech">
4168 <webidl> module Speech {
4170 interface SpeechManagerObject {
4171 readonly attribute <ref>SpeechManager</ref> speech;
4173 <ref>Tizen</ref> implements <ref>SpeechManagerObject</ref>;
4177 interface SpeechManager {
4178 void vocalizeString(DOMString speakString);
4182 interface SpeechRecognition : <ref>EventTarget</ref> {
4183 attribute <ref>SpeechGrammarList</ref> grammars;
4184 attribute DOMString lang;
4185 attribute boolean continuous;
4186 attribute boolean interimResults;
4187 attribute unsigned long maxAlternatives;
4188 attribute DOMString serviceURI;
4194 attribute <ref>EventHandler</ref> onaudiostart;
4195 attribute <ref>EventHandler</ref> onsoundstart;
4196 attribute <ref>EventHandler</ref> onspeechstart;
4197 attribute <ref>EventHandler</ref> onspeechend;
4198 attribute <ref>EventHandler</ref> onsoundend;
4199 attribute <ref>EventHandler</ref> onaudioend;
4200 attribute <ref>EventHandler</ref> onresult;
4201 attribute <ref>EventHandler</ref> onnomatch;
4202 attribute <ref>EventHandler</ref> onerror;
4203 attribute <ref>EventHandler</ref> onstart;
4204 attribute <ref>EventHandler</ref> onend;
4208 "no-speech",
4209 "aborted",
4210 "audio-capture",
4211 "network",
4212 "not-allowed",
4213 "service-not-allowed",
4214 "bad-grammar",
4215 "language-not-supported"
4218 interface SpeechRecognitionError : <ref>Event</ref> {
4219 readonly attribute <ref>ErrorCode</ref> error;
4220 readonly attribute DOMString message;
4223 interface SpeechRecognitionAlternative {
4224 readonly attribute DOMString transcript;
4225 readonly attribute float confidence;
4228 interface SpeechRecognitionResult {
4229 readonly attribute unsigned long length;
4230 getter <ref>SpeechRecognitionAlternative</ref> item(unsigned long index);
4231 readonly attribute boolean final;
4234 interface SpeechRecognitionResultList {
4235 readonly attribute unsigned long length;
4236 getter <ref>SpeechRecognitionResult</ref> item(unsigned long index);
4239 interface SpeechRecognitionEvent : <ref>Event</ref> {
4240 readonly attribute unsigned long resultIndex;
4241 readonly attribute <ref>SpeechRecognitionResultList</ref> results;
4242 readonly attribute any interpretation;
4243 readonly attribute <ref>Document</ref> emma;
4247 interface SpeechGrammar {
4248 attribute DOMString src;
4249 attribute float weight;
4253 interface SpeechGrammarList {
4254 readonly attribute unsigned long length;
4255 getter <ref>SpeechGrammar</ref> item(unsigned long index);
4256 void addFromURI(DOMString src, optional float weight);
4257 void addFromString(DOMString string, optional float weight);
4260 <Interface name="SpeechManagerObject" id="::SpeechManagerObject">
4261 <webidl> [NoInterfaceObject]
4262 interface SpeechManagerObject {
4263 readonly attribute <ref>SpeechManager</ref> speech;
4265 <ExtendedAttributeList>
4266 <ExtendedAttribute name="NoInterfaceObject">
4267 <webidl>NoInterfaceObject</webidl>
4268 </ExtendedAttribute>
4269 </ExtendedAttributeList>
4270 <Attribute readonly="readonly" name="speech" id="::SpeechManagerObject::speech">
4271 <webidl> readonly attribute <ref>SpeechManager</ref> speech;</webidl>
4272 <Type name="SpeechManager"/>
4275 <Implements name1="Tizen" name2="SpeechManagerObject">
4276 <webidl> <ref>Tizen</ref> implements <ref>SpeechManagerObject</ref>;</webidl>
4278 <Interface name="SpeechManager" id="::SpeechManager">
4279 <webidl> [NoInterfaceObject]
4280 interface SpeechManager {
4281 void vocalizeString(DOMString speakString);
4283 <ExtendedAttributeList>
4284 <ExtendedAttribute name="NoInterfaceObject">
4285 <webidl>NoInterfaceObject</webidl>
4286 </ExtendedAttribute>
4287 </ExtendedAttributeList>
4288 <Operation name="vocalizeString" id="::SpeechManager::vocalizeString">
4289 <webidl> void vocalizeString(DOMString speakString);</webidl>
4292 <Argument name="speakString">
4293 <Type type="DOMString"/>
4298 <Interface name="SpeechRecognition" id="::SpeechRecognition">
4299 <webidl> [Constructor]
4300 interface SpeechRecognition : <ref>EventTarget</ref> {
4301 attribute <ref>SpeechGrammarList</ref> grammars;
4302 attribute DOMString lang;
4303 attribute boolean continuous;
4304 attribute boolean interimResults;
4305 attribute unsigned long maxAlternatives;
4306 attribute DOMString serviceURI;
4312 attribute <ref>EventHandler</ref> onaudiostart;
4313 attribute <ref>EventHandler</ref> onsoundstart;
4314 attribute <ref>EventHandler</ref> onspeechstart;
4315 attribute <ref>EventHandler</ref> onspeechend;
4316 attribute <ref>EventHandler</ref> onsoundend;
4317 attribute <ref>EventHandler</ref> onaudioend;
4318 attribute <ref>EventHandler</ref> onresult;
4319 attribute <ref>EventHandler</ref> onnomatch;
4320 attribute <ref>EventHandler</ref> onerror;
4321 attribute <ref>EventHandler</ref> onstart;
4322 attribute <ref>EventHandler</ref> onend;
4324 <ExtendedAttributeList>
4325 <ExtendedAttribute name="Constructor">
4326 <webidl>Constructor</webidl>
4327 </ExtendedAttribute>
4328 </ExtendedAttributeList>
4329 <InterfaceInheritance>
4330 <Name name="EventTarget"/>
4331 </InterfaceInheritance>
4332 <Attribute name="grammars" id="::SpeechRecognition::grammars">
4333 <webidl> attribute <ref>SpeechGrammarList</ref> grammars;</webidl>
4334 <Type name="SpeechGrammarList"/>
4336 <Attribute name="lang" id="::SpeechRecognition::lang">
4337 <webidl> attribute DOMString lang;</webidl>
4338 <Type type="DOMString"/>
4340 <Attribute name="continuous" id="::SpeechRecognition::continuous">
4341 <webidl> attribute boolean continuous;</webidl>
4342 <Type type="boolean"/>
4344 <Attribute name="interimResults" id="::SpeechRecognition::interimResults">
4345 <webidl> attribute boolean interimResults;</webidl>
4346 <Type type="boolean"/>
4348 <Attribute name="maxAlternatives" id="::SpeechRecognition::maxAlternatives">
4349 <webidl> attribute unsigned long maxAlternatives;</webidl>
4350 <Type type="unsigned long"/>
4352 <Attribute name="serviceURI" id="::SpeechRecognition::serviceURI">
4353 <webidl> attribute DOMString serviceURI;</webidl>
4354 <Type type="DOMString"/>
4356 <Operation name="start" id="::SpeechRecognition::start">
4357 <webidl> void start();</webidl>
4361 <Operation name="stop" id="::SpeechRecognition::stop">
4362 <webidl> void stop();</webidl>
4366 <Operation name="abort" id="::SpeechRecognition::abort">
4367 <webidl> void abort();</webidl>
4371 <Attribute name="onaudiostart" id="::SpeechRecognition::onaudiostart">
4372 <webidl> attribute <ref>EventHandler</ref> onaudiostart;</webidl>
4373 <Type name="EventHandler"/>
4375 <Attribute name="onsoundstart" id="::SpeechRecognition::onsoundstart">
4376 <webidl> attribute <ref>EventHandler</ref> onsoundstart;</webidl>
4377 <Type name="EventHandler"/>
4379 <Attribute name="onspeechstart" id="::SpeechRecognition::onspeechstart">
4380 <webidl> attribute <ref>EventHandler</ref> onspeechstart;</webidl>
4381 <Type name="EventHandler"/>
4383 <Attribute name="onspeechend" id="::SpeechRecognition::onspeechend">
4384 <webidl> attribute <ref>EventHandler</ref> onspeechend;</webidl>
4385 <Type name="EventHandler"/>
4387 <Attribute name="onsoundend" id="::SpeechRecognition::onsoundend">
4388 <webidl> attribute <ref>EventHandler</ref> onsoundend;</webidl>
4389 <Type name="EventHandler"/>
4391 <Attribute name="onaudioend" id="::SpeechRecognition::onaudioend">
4392 <webidl> attribute <ref>EventHandler</ref> onaudioend;</webidl>
4393 <Type name="EventHandler"/>
4395 <Attribute name="onresult" id="::SpeechRecognition::onresult">
4396 <webidl> attribute <ref>EventHandler</ref> onresult;</webidl>
4397 <Type name="EventHandler"/>
4399 <Attribute name="onnomatch" id="::SpeechRecognition::onnomatch">
4400 <webidl> attribute <ref>EventHandler</ref> onnomatch;</webidl>
4401 <Type name="EventHandler"/>
4403 <Attribute name="onerror" id="::SpeechRecognition::onerror">
4404 <webidl> attribute <ref>EventHandler</ref> onerror;</webidl>
4405 <Type name="EventHandler"/>
4407 <Attribute name="onstart" id="::SpeechRecognition::onstart">
4408 <webidl> attribute <ref>EventHandler</ref> onstart;</webidl>
4409 <Type name="EventHandler"/>
4411 <Attribute name="onend" id="::SpeechRecognition::onend">
4412 <webidl> attribute <ref>EventHandler</ref> onend;</webidl>
4413 <Type name="EventHandler"/>
4416 <Enum name="ErrorCode" id="::ErrorCode">
4417 <webidl> enum ErrorCode {
4418 "no-speech",
4419 "aborted",
4420 "audio-capture",
4421 "network",
4422 "not-allowed",
4423 "service-not-allowed",
4424 "bad-grammar",
4425 "language-not-supported"
4427 <EnumValue stringvalue="no-speech">
4428 <webidl> "no-speech</webidl>
4430 <EnumValue stringvalue="aborted">
4431 <webidl> "aborted</webidl>
4433 <EnumValue stringvalue="audio-capture">
4434 <webidl> "audio-capture</webidl>
4436 <EnumValue stringvalue="network">
4437 <webidl> "network</webidl>
4439 <EnumValue stringvalue="not-allowed">
4440 <webidl> "not-allowed</webidl>
4442 <EnumValue stringvalue="service-not-allowed">
4443 <webidl> "service-not-allowed</webidl>
4445 <EnumValue stringvalue="bad-grammar">
4446 <webidl> "bad-grammar</webidl>
4448 <EnumValue stringvalue="language-not-supported">
4449 <webidl> "language-not-supported</webidl>
4452 <Interface name="SpeechRecognitionError" id="::SpeechRecognitionError">
4453 <webidl> interface SpeechRecognitionError : <ref>Event</ref> {
4454 readonly attribute <ref>ErrorCode</ref> error;
4455 readonly attribute DOMString message;
4457 <InterfaceInheritance>
4458 <Name name="Event"/>
4459 </InterfaceInheritance>
4460 <Attribute readonly="readonly" name="error" id="::SpeechRecognitionError::error">
4461 <webidl> readonly attribute <ref>ErrorCode</ref> error;</webidl>
4462 <Type name="ErrorCode"/>
4464 <Attribute readonly="readonly" name="message" id="::SpeechRecognitionError::message">
4465 <webidl> readonly attribute DOMString message;</webidl>
4466 <Type type="DOMString"/>
4469 <Interface name="SpeechRecognitionAlternative" id="::SpeechRecognitionAlternative">
4470 <webidl> interface SpeechRecognitionAlternative {
4471 readonly attribute DOMString transcript;
4472 readonly attribute float confidence;
4474 <Attribute readonly="readonly" name="transcript" id="::SpeechRecognitionAlternative::transcript">
4475 <webidl> readonly attribute DOMString transcript;</webidl>
4476 <Type type="DOMString"/>
4478 <Attribute readonly="readonly" name="confidence" id="::SpeechRecognitionAlternative::confidence">
4479 <webidl> readonly attribute float confidence;</webidl>
4480 <Type type="float"/>
4483 <Interface name="SpeechRecognitionResult" id="::SpeechRecognitionResult">
4484 <webidl> interface SpeechRecognitionResult {
4485 readonly attribute unsigned long length;
4486 getter <ref>SpeechRecognitionAlternative</ref> item(unsigned long index);
4487 readonly attribute boolean final;
4489 <Attribute readonly="readonly" name="length" id="::SpeechRecognitionResult::length">
4490 <webidl> readonly attribute unsigned long length;</webidl>
4491 <Type type="unsigned long"/>
4493 <Operation getter="getter" name="item" id="::SpeechRecognitionResult::item">
4494 <webidl> getter <ref>SpeechRecognitionAlternative</ref> item(unsigned long index);</webidl>
4495 <Type name="SpeechRecognitionAlternative"/>
4497 <Argument name="index">
4498 <Type type="unsigned long"/>
4502 <Attribute readonly="readonly" name="final" id="::SpeechRecognitionResult::final">
4503 <webidl> readonly attribute boolean final;</webidl>
4504 <Type type="boolean"/>
4507 <Interface name="SpeechRecognitionResultList" id="::SpeechRecognitionResultList">
4508 <webidl> interface SpeechRecognitionResultList {
4509 readonly attribute unsigned long length;
4510 getter <ref>SpeechRecognitionResult</ref> item(unsigned long index);
4512 <Attribute readonly="readonly" name="length" id="::SpeechRecognitionResultList::length">
4513 <webidl> readonly attribute unsigned long length;</webidl>
4514 <Type type="unsigned long"/>
4516 <Operation getter="getter" name="item" id="::SpeechRecognitionResultList::item">
4517 <webidl> getter <ref>SpeechRecognitionResult</ref> item(unsigned long index);</webidl>
4518 <Type name="SpeechRecognitionResult"/>
4520 <Argument name="index">
4521 <Type type="unsigned long"/>
4526 <Interface name="SpeechRecognitionEvent" id="::SpeechRecognitionEvent">
4527 <webidl> interface SpeechRecognitionEvent : <ref>Event</ref> {
4528 readonly attribute unsigned long resultIndex;
4529 readonly attribute <ref>SpeechRecognitionResultList</ref> results;
4530 readonly attribute any interpretation;
4531 readonly attribute <ref>Document</ref> emma;
4533 <InterfaceInheritance>
4534 <Name name="Event"/>
4535 </InterfaceInheritance>
4536 <Attribute readonly="readonly" name="resultIndex" id="::SpeechRecognitionEvent::resultIndex">
4537 <webidl> readonly attribute unsigned long resultIndex;</webidl>
4538 <Type type="unsigned long"/>
4540 <Attribute readonly="readonly" name="results" id="::SpeechRecognitionEvent::results">
4541 <webidl> readonly attribute <ref>SpeechRecognitionResultList</ref> results;</webidl>
4542 <Type name="SpeechRecognitionResultList"/>
4544 <Attribute readonly="readonly" name="interpretation" id="::SpeechRecognitionEvent::interpretation">
4545 <webidl> readonly attribute any interpretation;</webidl>
4548 <Attribute readonly="readonly" name="emma" id="::SpeechRecognitionEvent::emma">
4549 <webidl> readonly attribute <ref>Document</ref> emma;</webidl>
4550 <Type name="Document"/>
4553 <Interface name="SpeechGrammar" id="::SpeechGrammar">
4554 <webidl> [Constructor]
4555 interface SpeechGrammar {
4556 attribute DOMString src;
4557 attribute float weight;
4559 <ExtendedAttributeList>
4560 <ExtendedAttribute name="Constructor">
4561 <webidl>Constructor</webidl>
4562 </ExtendedAttribute>
4563 </ExtendedAttributeList>
4564 <Attribute name="src" id="::SpeechGrammar::src">
4565 <webidl> attribute DOMString src;</webidl>
4566 <Type type="DOMString"/>
4568 <Attribute name="weight" id="::SpeechGrammar::weight">
4569 <webidl> attribute float weight;</webidl>
4570 <Type type="float"/>
4573 <Interface name="SpeechGrammarList" id="::SpeechGrammarList">
4574 <webidl> [Constructor]
4575 interface SpeechGrammarList {
4576 readonly attribute unsigned long length;
4577 getter <ref>SpeechGrammar</ref> item(unsigned long index);
4578 void addFromURI(DOMString src, optional float weight);
4579 void addFromString(DOMString string, optional float weight);
4581 <ExtendedAttributeList>
4582 <ExtendedAttribute name="Constructor">
4583 <webidl>Constructor</webidl>
4584 </ExtendedAttribute>
4585 </ExtendedAttributeList>
4586 <Attribute readonly="readonly" name="length" id="::SpeechGrammarList::length">
4587 <webidl> readonly attribute unsigned long length;</webidl>
4588 <Type type="unsigned long"/>
4590 <Operation getter="getter" name="item" id="::SpeechGrammarList::item">
4591 <webidl> getter <ref>SpeechGrammar</ref> item(unsigned long index);</webidl>
4592 <Type name="SpeechGrammar"/>
4594 <Argument name="index">
4595 <Type type="unsigned long"/>
4599 <Operation name="addFromURI" id="::SpeechGrammarList::addFromURI">
4600 <webidl> void addFromURI(DOMString src, optional float weight);</webidl>
4603 <Argument name="src">
4604 <Type type="DOMString"/>
4606 <Argument optional="optional" name="weight">
4607 <Type type="float"/>
4611 <Operation name="addFromString" id="::SpeechGrammarList::addFromString">
4612 <webidl> void addFromString(DOMString string, optional float weight);</webidl>
4615 <Argument name="string">
4616 <Type type="DOMString"/>
4618 <Argument optional="optional" name="weight">
4619 <Type type="float"/>
4625 <Module name="MediaServer" id="::MediaServer">
4626 <webidl>module MediaServer {
4630 partial interface Navigator {
4631 readonly attribute <ref>MediaServerManager</ref> mediaserver;
4637 interface MediaServerManager {
4639 <ref>scanNetwork</ref>(<ref>MediaServerFoundServerCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
4645 interface MediaServer {
4647 readonly attribute DOMString id;
4649 readonly attribute DOMString friendlyName;
4651 readonly attribute object root;
4653 <ref>browse</ref>(DOMString containerId, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
4655 <ref>find</ref>(DOMString containerId, DOMString searchFilter, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
4661 interface MediaServerError {
4662 const unsigned short GENERIC = 1;
4664 attribute unsigned short code;
4666 attribute DOMString message;
4671 callback MediaServerFoundServerCallback = void (<ref>MediaServer</ref> value);
4673 callback MediaServerBrowseFindCallback = void (sequence<object> value);
4675 callback MediaServerErrorCallback = void (<ref>MediaServerError</ref> error);
4684 <def-api-feature identifier="http://tizen.org/api/mediaserver">
4687 Allows access to the mediaserver API
4692 <Interface name="Navigator" partial="partial" id="::MediaServer::Navigator">
4693 <webidl>partial interface Navigator {
4694 readonly attribute <ref>MediaServerManager</ref> mediaserver;
4696 <Attribute readonly="readonly" name="mediaserver" id="::MediaServer::Navigator::mediaserver">
4697 <webidl> readonly attribute <ref>MediaServerManager</ref> mediaserver;</webidl>
4698 <Type name="MediaServerManager"/>
4701 <Interface name="MediaServerManager" id="::MediaServer::MediaServerManager">
4702 <webidl>[NoInterfaceObject]
4703 interface MediaServerManager {
4705 <ref>scanNetwork</ref>(<ref>MediaServerFoundServerCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
4707 <ExtendedAttributeList>
4708 <ExtendedAttribute name="NoInterfaceObject">
4709 <webidl>NoInterfaceObject</webidl>
4710 </ExtendedAttribute>
4711 </ExtendedAttributeList>
4713 <webidl> <ref>scanNetwork</ref>(<ref>MediaServerFoundServerCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);</webidl>
4716 Scans local network for MediaServers.
4719 <Type name="scanNetwork"/>
4721 <Argument name="successCallback">
4724 callback invoqued for each MediaServer discovered.
4727 <Type name="MediaServerFoundServerCallback"/>
4729 <Argument optional="optional" name="errorCallback">
4734 <Type name="MediaServerErrorCallback"/>
4739 <Interface name="MediaServer" id="::MediaServer::MediaServer">
4740 <webidl>[NoInterfaceObject]
4741 interface MediaServer {
4743 readonly attribute DOMString id;
4745 readonly attribute DOMString friendlyName;
4747 readonly attribute object root;
4749 <ref>browse</ref>(DOMString containerId, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
4751 <ref>find</ref>(DOMString containerId, DOMString searchFilter, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
4753 <ExtendedAttributeList>
4754 <ExtendedAttribute name="NoInterfaceObject">
4755 <webidl>NoInterfaceObject</webidl>
4756 </ExtendedAttribute>
4757 </ExtendedAttributeList>
4758 <Attribute readonly="readonly" name="id" id="::MediaServer::MediaServer::id">
4759 <webidl> readonly attribute DOMString id;</webidl>
4767 An opaque unique ID.
4770 <Type type="DOMString"/>
4772 <Attribute readonly="readonly" name="friendlyName" id="::MediaServer::MediaServer::friendlyName">
4773 <webidl> readonly attribute DOMString friendlyName;</webidl>
4781 A user-friendly name for the device.
4784 <Type type="DOMString"/>
4786 <Attribute readonly="readonly" name="root" id="::MediaServer::MediaServer::root">
4787 <webidl> readonly attribute object root;</webidl>
4795 Media Server root folder.
4798 <Type type="object"/>
4801 <webidl> <ref>browse</ref>(DOMString containerId, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);</webidl>
4804 Browses for media item under a given MediaContainer.
4807 <Type name="browse"/>
4809 <Argument name="containerId">
4814 <Type type="DOMString"/>
4816 <Argument name="sortMode">
4821 <Type type="DOMString"/>
4823 <Argument name="count">
4828 <Type type="unsigned long"/>
4830 <Argument name="offset">
4835 <Type type="unsigned long"/>
4837 <Argument name="successCallback">
4842 <Type name="MediaServerBrowseFindCallback"/>
4844 <Argument optional="optional" name="errorCallback">
4849 <Type name="MediaServerErrorCallback"/>
4854 <webidl> <ref>find</ref>(DOMString containerId, DOMString searchFilter, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);</webidl>
4857 Searches for media item under a given MediaContainer.
4862 <Argument name="containerId">
4867 <Type type="DOMString"/>
4869 <Argument name="searchFilter">
4874 <Type type="DOMString"/>
4876 <Argument name="sortMode">
4881 <Type type="DOMString"/>
4883 <Argument name="count">
4888 <Type type="unsigned long"/>
4890 <Argument name="offset">
4895 <Type type="unsigned long"/>
4897 <Argument name="successCallback">
4902 <Type name="MediaServerBrowseFindCallback"/>
4904 <Argument optional="optional" name="errorCallback">
4909 <Type name="MediaServerErrorCallback"/>
4914 <Interface name="MediaServerError" id="::MediaServer::MediaServerError">
4915 <webidl>[NoInterfaceObject]
4916 interface MediaServerError {
4917 const unsigned short GENERIC = 1;
4919 attribute unsigned short code;
4921 attribute DOMString message;
4923 <ExtendedAttributeList>
4924 <ExtendedAttribute name="NoInterfaceObject">
4925 <webidl>NoInterfaceObject</webidl>
4926 </ExtendedAttribute>
4927 </ExtendedAttributeList>
4928 <Const name="GENERIC" value="1" id="::MediaServer::MediaServerError::GENERIC">
4929 <webidl> const unsigned short GENERIC = 1;</webidl>
4930 <Type type="unsigned short"/>
4932 <Attribute name="code" id="::MediaServer::MediaServerError::code">
4933 <webidl> attribute unsigned short code;</webidl>
4938 MUST return error code.
4942 <Type type="unsigned short"/>
4944 <Attribute name="message" id="::MediaServer::MediaServerError::message">
4945 <webidl> attribute DOMString message;</webidl>
4950 MUST return error message
4954 <Type type="DOMString"/>
4957 <Callback name="MediaServerFoundServerCallback" id="::MediaServer::MediaServerFoundServerCallback">
4958 <webidl>callback MediaServerFoundServerCallback = void (<ref>MediaServer</ref> value);</webidl>
4961 <Argument name="value">
4962 <Type name="MediaServer"/>
4966 <Callback name="MediaServerBrowseFindCallback" id="::MediaServer::MediaServerBrowseFindCallback">
4967 <webidl>callback MediaServerBrowseFindCallback = void (sequence<object> value);</webidl>
4970 <Argument name="value">
4971 <Type type="sequence">
4972 <Type type="object"/>
4977 <Callback name="MediaServerErrorCallback" id="::MediaServer::MediaServerErrorCallback">
4978 <webidl>callback MediaServerErrorCallback = void (<ref>MediaServerError</ref> error);</webidl>
4981 <Argument name="error">
4982 <Type name="MediaServerError"/>
4987 <Module name="Alarm" id="::Alarm">
4988 <webidl>module Alarm {
4990 typedef DOMString AlarmId;
4994 [NoInterfaceObject] interface AlarmManagerObject {
4995 readonly attribute <ref>AlarmManager</ref> alarm;
4997 <ref>Tizen</ref> implements <ref>AlarmManagerObject</ref>;
5000 [NoInterfaceObject] interface AlarmManager {
5002 const long PERIOD_MINUTE = 60;
5005 const long PERIOD_HOUR = 3600;
5008 const long PERIOD_DAY = 86400;
5011 const long PERIOD_WEEK = 604800;
5014 void add(<ref>Alarm</ref> alarm, <ref>ApplicationId</ref> applicationId, optional <ref>ApplicationControl</ref>? appControl) raises(<ref>WebAPIException</ref>);
5017 void remove(<ref>AlarmId</ref> id) raises(<ref>WebAPIException</ref>);
5020 void removeAll() raises(<ref>WebAPIException</ref>);
5023 <ref>Alarm</ref> get(<ref>AlarmId</ref> id) raises(<ref>WebAPIException</ref>);
5026 <ref>Alarm</ref>[] getAll() raises(<ref>WebAPIException</ref>);
5030 [NoInterfaceObject] interface Alarm {
5032 readonly attribute <ref>AlarmId</ref>? id;
5035 [Constructor(long delay, optional long? period)]
5037 interface AlarmRelative : <ref>Alarm</ref> {
5039 readonly attribute long delay;
5042 readonly attribute long? period;
5045 long? getRemainingSeconds() raises(<ref>WebAPIException</ref>);
5048 [Constructor(Date date),
5050 Constructor(Date date, <ref>ByDayValue</ref>[] daysOfTheWeek),
5052 Constructor(Date date, long period)]
5054 interface AlarmAbsolute : <ref>Alarm</ref> {
5056 readonly attribute Date date;
5059 readonly attribute long? period;
5062 readonly attribute <ref>ByDayValue</ref>[] daysOfTheWeek;
5065 Date? getNextScheduledDate() raises(<ref>WebAPIException</ref>);
5070 This API provides the functionality for scheduling the system alarm.
5071 It allows you to run other applications and have them perform operations at the specific time.
5072 You can schedule an alarm to go off once or to repeat at specific intervals.
5076 Each application has its own individual alarm storage, that is, applications cannot view or edit alarms set by other applications.
5079 Once an alarm goes off, it will be removed from the alarm storage automatically.
5080 <em>AlarmManager</em> provides methods to manage alarms such as adding and removing.
5081 For more information on the Alarm features, see <a href="../../org.tizen.web.appprogramming/html/guide/app_guide/alarm.htm">Alarm Guide</a>.
5088 <Typedef name="AlarmId" id="::Alarm::AlarmId">
5089 <webidl> typedef DOMString AlarmId;</webidl>
5092 An alarm identifier.
5098 <Type type="DOMString"/>
5100 <Interface name="AlarmManagerObject" id="::Alarm::AlarmManagerObject">
5101 <webidl> [NoInterfaceObject] interface AlarmManagerObject {
5102 readonly attribute <ref>AlarmManager</ref> alarm;
5106 This interface defines what is instantiated by the <em>Tizen </em>object from the Tizen Platform.
5107 There will be a <em>tizen.alarm </em>object that allows access to the functionality of the Alarm API.
5113 <ExtendedAttributeList>
5114 <ExtendedAttribute name="NoInterfaceObject">
5115 <webidl>NoInterfaceObject</webidl>
5116 </ExtendedAttribute>
5117 </ExtendedAttributeList>
5118 <Attribute readonly="readonly" name="alarm" id="::Alarm::AlarmManagerObject::alarm">
5119 <webidl> readonly attribute <ref>AlarmManager</ref> alarm;</webidl>
5120 <Type name="AlarmManager"/>
5123 <Implements name1="Tizen" name2="AlarmManagerObject">
5124 <webidl> <ref>Tizen</ref> implements <ref>AlarmManagerObject</ref>;</webidl>
5126 <Interface name="AlarmManager" id="::Alarm::AlarmManager">
5127 <webidl> [NoInterfaceObject] interface AlarmManager {
5129 const long PERIOD_MINUTE = 60;
5132 const long PERIOD_HOUR = 3600;
5135 const long PERIOD_DAY = 86400;
5138 const long PERIOD_WEEK = 604800;
5141 void add(<ref>Alarm</ref> alarm, <ref>ApplicationId</ref> applicationId, optional <ref>ApplicationControl</ref>? appControl) raises(<ref>WebAPIException</ref>);
5144 void remove(<ref>AlarmId</ref> id) raises(<ref>WebAPIException</ref>);
5147 void removeAll() raises(<ref>WebAPIException</ref>);
5150 <ref>Alarm</ref> get(<ref>AlarmId</ref> id) raises(<ref>WebAPIException</ref>);
5153 <ref>Alarm</ref>[] getAll() raises(<ref>WebAPIException</ref>);
5157 This interface provides methods to manage alarms.
5163 <ExtendedAttributeList>
5164 <ExtendedAttribute name="NoInterfaceObject">
5165 <webidl>NoInterfaceObject</webidl>
5166 </ExtendedAttribute>
5167 </ExtendedAttributeList>
5168 <Const name="PERIOD_MINUTE" value="60" id="::Alarm::AlarmManager::PERIOD_MINUTE">
5169 <webidl> const long PERIOD_MINUTE = 60;</webidl>
5172 The period of a minute.
5173 It defines the number of seconds per minute.
5181 <Const name="PERIOD_HOUR" value="3600" id="::Alarm::AlarmManager::PERIOD_HOUR">
5182 <webidl> const long PERIOD_HOUR = 3600;</webidl>
5185 The period of an hour.
5186 It defines the number of seconds per hour.
5194 <Const name="PERIOD_DAY" value="86400" id="::Alarm::AlarmManager::PERIOD_DAY">
5195 <webidl> const long PERIOD_DAY = 86400;</webidl>
5198 The period of a day.
5199 It defines the number of seconds per day.
5207 <Const name="PERIOD_WEEK" value="604800" id="::Alarm::AlarmManager::PERIOD_WEEK">
5208 <webidl> const long PERIOD_WEEK = 604800;</webidl>
5211 The period of a week.
5212 It defines the number of seconds in a week.
5220 <Operation name="add" id="::Alarm::AlarmManager::add">
5221 <webidl> void add(<ref>Alarm</ref> alarm, <ref>ApplicationId</ref> applicationId, optional <ref>ApplicationControl</ref>? appControl) raises(<ref>WebAPIException</ref>);</webidl>
5224 Adds an alarm to the storage.
5228 Set an alarm with the application ID to be run. You should definitely provide the application ID to run
5229 and the <a href=" ../../org.tizen.web.appprogramming/html/guide/app_guide/application_service.htm">application control </a>information if it is necessary.
5230 For more information about the application contorl, see <a href="../../org.tizen.web.device.apireference/tizen/application.html">The Application API</a>.
5240 http://tizen.org/privilege/alarm
5242 <Code> // Triggers an alarm on a given date/time
5243 var alarm = new tizen.AlarmAbsolute(new Date(2014, 10, 4, 8, 0));
5244 var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/view");
5245 tizen.alarm.add(alarm, tizen.application.getCurrentApplication().appInfo.id, appControl);
5246 console.log("Alarm added with id: " + alarm.id);
5251 <Argument name="alarm">
5254 An alarm to add. It can be either <em>AlarmRelative </em> or <em>AlarmAbsolute</em>.
5257 <Type name="Alarm"/>
5259 <Argument name="applicationId">
5262 The application ID to run when the alarm is triggered.
5265 <Type name="ApplicationId"/>
5267 <Argument optional="optional" name="appControl">
5270 The data structure describing application control details.
5273 <Type name="ApplicationControl" nullable="nullable"/>
5277 <RaiseException name="WebAPIException">
5280 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
5283 with error type InvalidValuesError, if any input parameter does not contain a valid value.
5286 with error type SecurityError, if the application does not have the privilege to call this method.
5289 with error type UnknownError, if any other error occurs.
5295 <Operation name="remove" id="::Alarm::AlarmManager::remove">
5296 <webidl> void remove(<ref>AlarmId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
5299 Removes an alarm from the storage.
5303 If an alarm goes off, it will be removed from the storage automatically.
5313 http://tizen.org/privilege/alarm
5315 <Code> var alarms = tizen.alarm.getAll();
5317 // Removes the first alarm
5318 if (alarms.length > 0) {
5320 tizen.alarm.remove(alarms[0].id);
5321 console.log("Successfully removed the first alarm.");
5323 console.log("Failed to remove the first alarm.");
5330 <Argument name="id">
5333 The ID of the alarm to remove
5336 <Type name="AlarmId"/>
5340 <RaiseException name="WebAPIException">
5343 with error type NotFoundError, if this alarm identifier cannot be found in the storage.
5346 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
5349 with error type InvalidValuesError, if any input parameter does not contain a valid value.
5352 with error type SecurityError, if the application does not have the privilege to call this method.
5355 with error type UnknownError, if the method cannot be completed because of an unknown error.
5361 <Operation name="removeAll" id="::Alarm::AlarmManager::removeAll">
5362 <webidl> void removeAll() raises(<ref>WebAPIException</ref>);</webidl>
5365 Removes all alarms added by an application.
5369 Because each application has its own alarm storage, this method removes alarms only added by the calling application.
5379 http://tizen.org/privilege/alarm
5381 <Code> tizen.alarm.removeAll();
5382 console.log("remove all registered alarms in the storage.");
5388 <RaiseException name="WebAPIException">
5391 with error type SecurityError, if the application does not have the privilege to call this method.
5394 with error type UnknownError, if the method cannot be completed because of an unknown error.
5400 <Operation name="get" id="::Alarm::AlarmManager::get">
5401 <webidl> <ref>Alarm</ref> get(<ref>AlarmId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
5404 Returns an alarm as per the specified identifier.
5409 <Code> // Sets an alarm
5410 var date = new Date();
5411 date.setHours(date.getHours()+1);
5412 var abs_alarm = new tizen.AlarmAbsolute(date);
5415 tizen.alarm.add(abs_alarm, tizen.application.getCurrentApplication().appInfo.id);
5418 var alarm = tizen.alarm.get(abs_alarm.id);
5419 console.log("The alarm will trigger at " + alarm.getNextScheduledDate());
5425 Alarm An alarm object with the specified ID.
5430 <Argument name="id">
5433 The alarm ID to retrieve.
5436 <Type name="AlarmId"/>
5440 <RaiseException name="WebAPIException">
5443 with error type NotFoundError, if this alarm identifier cannot be found in the storage.
5446 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
5449 with error type InvalidValuesError, if any input parameter does not contain a valid value.
5452 with error type UnknownError, if the method cannot be completed because of an unknown error.
5458 <Operation name="getAll" id="::Alarm::AlarmManager::getAll">
5459 <webidl> <ref>Alarm</ref>[] getAll() raises(<ref>WebAPIException</ref>);</webidl>
5462 Retrieves all alarms in an application storage..
5466 Alarms that have already been triggered are removed automatically from the storage.
5472 <Code> var alarms = tizen.alarm.getAll();
5473 console.log(alarms.length + " alarms present in the storage.");
5479 Alarm[] All Alarm objects.
5482 <Type name="Alarm"/>
5486 <RaiseException name="WebAPIException">
5489 with error type UnknownError, if the method cannot be completed because of an unknown error.
5496 <Interface name="Alarm" id="::Alarm::Alarm">
5497 <webidl> [NoInterfaceObject] interface Alarm {
5499 readonly attribute <ref>AlarmId</ref>? id;
5503 This interface is an abstract interface for alarm types.
5509 <ExtendedAttributeList>
5510 <ExtendedAttribute name="NoInterfaceObject">
5511 <webidl>NoInterfaceObject</webidl>
5512 </ExtendedAttribute>
5513 </ExtendedAttributeList>
5514 <Attribute readonly="readonly" name="id" id="::Alarm::Alarm::id">
5515 <webidl> readonly attribute <ref>AlarmId</ref>? id;</webidl>
5518 The alarm identifier.
5524 <Type name="AlarmId" nullable="nullable"/>
5527 <Interface name="AlarmRelative" id="::Alarm::AlarmRelative">
5528 <webidl> [Constructor(long delay, optional long? period)]
5530 interface AlarmRelative : <ref>Alarm</ref> {
5532 readonly attribute long delay;
5535 readonly attribute long? period;
5538 long? getRemainingSeconds() raises(<ref>WebAPIException</ref>);
5542 This interface provides the relative alarm, which occurs at a fixed interval in future.
5546 This alarm triggers after a duration mentioned in <em>delay</em> attribute from the moment the alarm is added.
5547 If a <em>period</em> is provided, the alarm keeps triggering for the given interval.
5553 <Code> // Gets the current application id.
5554 var appId = tizen.application.getCurrentApplication().appInfo.id;
5556 // Sets an alarm in 3 hours from now
5557 var alarm1 = new tizen.AlarmRelative(3 * tizen.alarm.PERIOD_HOUR);
5558 tizen.alarm.add(alarm1, appId);
5560 // Sets an alarm in one hour, recurring after every 2 minutes
5561 var alarm2 = new tizen.AlarmRelative(tizen.alarm.PERIOD_HOUR, 2 * tizen.alarm.PERIOD_MINUTE);
5562 tizen.alarm.add(alarm2, appId);
5565 <ExtendedAttributeList>
5566 <ExtendedAttribute name="Constructor">
5567 <webidl>Constructor(long delay, optional long? period)</webidl>
5569 <Argument name="delay">
5572 <Argument optional="optional" name="period">
5573 <Type type="long" nullable="nullable"/>
5576 </ExtendedAttribute>
5577 </ExtendedAttributeList>
5578 <InterfaceInheritance>
5579 <Name name="Alarm"/>
5580 </InterfaceInheritance>
5581 <Attribute readonly="readonly" name="delay" id="::Alarm::AlarmRelative::delay">
5582 <webidl> readonly attribute long delay;</webidl>
5585 An attribute to store the difference in time (in seconds) between when an alarm is added and it is triggered.
5593 <Attribute readonly="readonly" name="period" id="::Alarm::AlarmRelative::period">
5594 <webidl> readonly attribute long? period;</webidl>
5597 An attribute to store the duration in seconds between each trigger of an alarm.
5598 By default, this attribute is set to <var>null</var>, indicating that this alarm does not repeat.
5604 <Type type="long" nullable="nullable"/>
5606 <Operation name="getRemainingSeconds" id="::Alarm::AlarmRelative::getRemainingSeconds">
5607 <webidl> long? getRemainingSeconds() raises(<ref>WebAPIException</ref>);</webidl>
5610 Returns duration in seconds before the next alarm is triggered.
5614 If the alarm has expired, this method returns <var>null</var>.
5620 <Code> // Gets the current application id.
5621 var appId = tizen.application.getCurrentApplication().appInfo.id;
5623 // Sets an alarm in 3 hours from now
5624 var alarm = new tizen.AlarmRelative(3 * tizen.alarm.PERIOD_HOUR);
5625 tizen.alarm.add(alarm, appId);
5627 var sec = alarm.getRemainingSeconds();
5628 console.log("remaining time is " + sec);
5631 <Type type="long" nullable="nullable">
5634 long The duration before the next alarm trigger.
5640 <RaiseException name="WebAPIException">
5643 with error type UnknownError, if the method cannot be completed because of an unknown error.
5650 <Interface name="AlarmAbsolute" id="::Alarm::AlarmAbsolute">
5651 <webidl> [Constructor(Date date),
5653 Constructor(Date date, <ref>ByDayValue</ref>[] daysOfTheWeek),
5655 Constructor(Date date, long period)]
5657 interface AlarmAbsolute : <ref>Alarm</ref> {
5659 readonly attribute Date date;
5662 readonly attribute long? period;
5665 readonly attribute <ref>ByDayValue</ref>[] daysOfTheWeek;
5668 Date? getNextScheduledDate() raises(<ref>WebAPIException</ref>);
5672 This interface provides an absolute alarm, which triggers at a specified absolute date.
5676 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.
5682 <Code> // Gets the current application id.
5683 var appId = tizen.application.getCurrentApplication().appInfo.id;
5685 // Sets an alarm on January 1st 2014 08:00
5686 var date = new Date(2014, 0, 1, 8, 0);
5687 var alarm1 = new tizen.AlarmAbsolute(date);
5688 tizen.alarm.add(alarm1, appId);
5690 // Sets an alarm on January 1st 2014 08:00, repeating every 2 days
5691 var alarm2 = new tizen.AlarmAbsolute(date, 2 * tizen.alarm.PERIOD_DAY);
5692 tizen.alarm.add(alarm2, appId);
5694 // Sets an alarm occurring on every Saturday and Sunday, at 08:00, starting from January 1st 2014
5695 var alarm3 = new tizen.AlarmAbsolute(date, ["SA", "SU"]);
5696 tizen.alarm.add(alarm3, appId);
5699 <ExtendedAttributeList>
5700 <ExtendedAttribute name="Constructor">
5701 <webidl>Constructor(Date date)</webidl>
5703 <Argument name="date">
5707 </ExtendedAttribute>
5708 <ExtendedAttribute name="Constructor">
5709 <webidl> Constructor(Date date, <ref>ByDayValue</ref>[] daysOfTheWeek)</webidl>
5711 <Argument name="date">
5714 <Argument name="daysOfTheWeek">
5716 <Type name="ByDayValue"/>
5720 </ExtendedAttribute>
5721 <ExtendedAttribute name="Constructor">
5722 <webidl> Constructor(Date date, long period)</webidl>
5724 <Argument name="date">
5727 <Argument name="period">
5731 </ExtendedAttribute>
5732 </ExtendedAttributeList>
5733 <InterfaceInheritance>
5734 <Name name="Alarm"/>
5735 </InterfaceInheritance>
5736 <Attribute readonly="readonly" name="date" id="::Alarm::AlarmAbsolute::date">
5737 <webidl> readonly attribute Date date;</webidl>
5740 An attribute to store the absolute date/time when the alarm is initially triggered.
5744 This attribute is precise to the second. Milliseconds will be ignored.
5753 <Attribute readonly="readonly" name="period" id="::Alarm::AlarmAbsolute::period">
5754 <webidl> readonly attribute long? period;</webidl>
5757 An attribute to store the duration in seconds between each trigger of the alarm.
5761 By default, this attribute is set to <var>null</var>, indicating that this alarm does not repeat.
5762 The <em>period</em> and <em>daysOfTheWeek</em> attributes are mutually exclusive.
5769 <Type type="long" nullable="nullable"/>
5771 <Attribute readonly="readonly" name="daysOfTheWeek" id="::Alarm::AlarmAbsolute::daysOfTheWeek">
5772 <webidl> readonly attribute <ref>ByDayValue</ref>[] daysOfTheWeek;</webidl>
5775 An attribute to store the days of the week associated with the recurrence rule.
5779 By default, this attribute is set to an empty array.
5780 The <em>period</em> and <em>daysOfTheWeek</em> attributes are mutually exclusive.
5788 <Type name="ByDayValue"/>
5791 <Operation name="getNextScheduledDate" id="::Alarm::AlarmAbsolute::getNextScheduledDate">
5792 <webidl> Date? getNextScheduledDate() raises(<ref>WebAPIException</ref>);</webidl>
5795 Returns the date / time of the next alarm trigger.
5799 If the alarm has expired, this method returns <var>null</var>. The returned date is precise to the second.
5805 <Code> // Gets the current application id.
5806 var appId = tizen.application.getCurrentApplication().appInfo.id;
5808 // Sets an alarm on January 1st 2014 08:00
5809 var date = new Date(2014, 0, 1, 8, 0);
5810 var alarm1 = new tizen.AlarmAbsolute(date);
5811 tizen.alarm.add(alarm1, appId);
5813 var date = alarm1.getNextScheduledDate();
5814 console.log("next scheduled time is " + date);
5817 <Type type="Date" nullable="nullable">
5820 Date The date/time of the next alarm trigger.
5826 <RaiseException name="WebAPIException">
5829 with error type UnknownError, if the method cannot be completed because of an unknown error.
5837 <Module name="Application" id="::Application">
5838 <webidl>module Application {
5840 typedef DOMString ApplicationId;
5842 typedef DOMString ApplicationContextId;
5844 [NoInterfaceObject] interface ApplicationManagerObject {
5845 readonly attribute <ref>ApplicationManager</ref> application;
5847 <ref>Tizen</ref> implements <ref>ApplicationManagerObject</ref>;
5849 [NoInterfaceObject] interface ApplicationManager {
5851 <ref>Application</ref> getCurrentApplication() raises(<ref>WebAPIException</ref>);
5853 void kill(<ref>ApplicationContextId</ref> contextId,
5854 optional <ref>SuccessCallback</ref>? successCallback,
5855 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5857 void launch(<ref>ApplicationId</ref> id,
5858 optional <ref>SuccessCallback</ref>? successCallback,
5859 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5861 void launchAppControl(<ref>ApplicationControl</ref> appControl,
5862 optional <ref>ApplicationId</ref>? id,
5863 optional <ref>SuccessCallback</ref>? successCallback,
5864 optional <ref>ErrorCallback</ref>? errorCallback,
5865 optional <ref>ApplicationControlDataArrayReplyCallback</ref>? replyCallback) raises(<ref>WebAPIException</ref>);
5867 void findAppControl(<ref>ApplicationControl</ref> appControl,
5868 <ref>FindAppControlSuccessCallback</ref> successCallback,
5869 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5871 void getAppsContext(<ref>ApplicationContextArraySuccessCallback</ref> successCallback,
5872 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5874 <ref>ApplicationContext</ref> getAppContext(optional <ref>ApplicationContextId</ref>? contextId) raises(<ref>WebAPIException</ref>);
5876 void getAppsInfo(<ref>ApplicationInformationArraySuccessCallback</ref> successCallback,
5877 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5879 <ref>ApplicationInformation</ref> getAppInfo(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);
5881 <ref>ApplicationCertificate</ref>[] getAppCerts(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);
5883 DOMString getAppSharedURI(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);
5885 <ref>ApplicationMetaData</ref>[] getAppMetaData(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);
5887 long addAppInfoEventListener(<ref>ApplicationInformationEventCallback</ref> eventCallback) raises(<ref>WebAPIException</ref>);
5889 void removeAppInfoEventListener(long watchId) raises(<ref>WebAPIException</ref>);
5893 [NoInterfaceObject] interface Application {
5895 readonly attribute <ref>ApplicationInformation</ref> appInfo;
5897 readonly attribute <ref>ApplicationContextId</ref> contextId;
5899 void exit() raises(<ref>WebAPIException</ref>);
5901 void hide() raises(<ref>WebAPIException</ref>);
5903 <ref>RequestedApplicationControl</ref> getRequestedAppControl() raises(<ref>WebAPIException</ref>);
5907 [NoInterfaceObject] interface ApplicationInformation {
5909 readonly attribute <ref>ApplicationId</ref> id;
5911 readonly attribute DOMString name;
5913 readonly attribute DOMString iconPath;
5915 readonly attribute DOMString version;
5917 readonly attribute boolean show;
5919 readonly attribute DOMString[] categories;
5921 readonly attribute Date installDate;
5923 readonly attribute long size raises(<ref>WebAPIException</ref>);
5925 readonly attribute <ref>PackageId</ref> packageId;
5928 [NoInterfaceObject] interface ApplicationContext {
5930 readonly attribute <ref>ApplicationContextId</ref> id;
5932 readonly attribute <ref>ApplicationId</ref> appId;
5936 [Constructor(DOMString key, DOMString[] value)]
5937 interface ApplicationControlData {
5939 attribute DOMString key;
5941 attribute DOMString[] value;
5945 [Constructor(DOMString operation, optional DOMString? uri,
5946 optional DOMString? mime, optional DOMString? category,
5947 optional <ref>ApplicationControlData</ref>[]? data)]
5948 interface ApplicationControl {
5950 attribute DOMString operation;
5952 attribute DOMString? uri;
5954 attribute DOMString? mime;
5956 attribute DOMString? category;
5958 attribute <ref>ApplicationControlData</ref>[] data;
5962 [NoInterfaceObject] interface RequestedApplicationControl {
5964 readonly attribute <ref>ApplicationControl</ref> appControl;
5966 readonly attribute <ref>ApplicationId</ref> callerAppId;
5968 void replyResult(optional <ref>ApplicationControlData</ref>[]? data) raises(<ref>WebAPIException</ref>);
5970 void replyFailure() raises(<ref>WebAPIException</ref>);
5975 [NoInterfaceObject] interface ApplicationCertificate {
5977 readonly attribute DOMString type;
5979 readonly attribute DOMString value;
5984 [NoInterfaceObject] interface ApplicationMetaData {
5986 readonly attribute DOMString key;
5988 readonly attribute DOMString value;
5993 [Callback=FunctionOnly, NoInterfaceObject] interface ApplicationInformationArraySuccessCallback {
5994 void onsuccess(<ref>ApplicationInformation</ref>[] informationArray);
5997 [Callback=FunctionOnly, NoInterfaceObject] interface FindAppControlSuccessCallback {
5998 void onsuccess(<ref>ApplicationInformation</ref>[] informationArray, <ref>ApplicationControl</ref> appControl);
6001 [Callback=FunctionOnly, NoInterfaceObject] interface ApplicationContextArraySuccessCallback {
6002 void onsuccess(<ref>ApplicationContext</ref>[] contexts);
6005 [Callback, NoInterfaceObject] interface ApplicationControlDataArrayReplyCallback {
6006 void onsuccess(optional <ref>ApplicationControlData</ref>[]? data);
6011 [Callback, NoInterfaceObject] interface ApplicationInformationEventCallback {
6012 void oninstalled(<ref>ApplicationInformation</ref> info);
6014 void onupdated(<ref>ApplicationInformation</ref> info);
6016 void onuninstalled(<ref>ApplicationId</ref> id);
6022 This API provides a way to launch other applications and access
6023 application management.
6027 The <em>ApplicationManager</em> interface also provides methods to launch other applications
6028 explicitly and implicitly through the <em>ApplicationControl</em> interface.
6029 The <em>ApplicationControl</em> interface consists of an operation, URI, and MIME type
6030 and also describes an action to be performed by other
6031 applications and can carry the result from the subsequent application.
6032 The <em>ApplicationManager</em> interface also provides methods to handle the application
6033 lifecycle, to access the installed applications on the device, and to let
6034 an application be notified of a change in the application list.
6037 The <em>Application</em> interface defines the current application's information and
6038 the basic operations for current application such as exit or hide.
6041 For more information on the Application features, see <a href="../../org.tizen.web.appprogramming/html/guide/app_guide/application.htm">Application Guide</a>.
6048 <Typedef name="ApplicationId" id="::Application::ApplicationId">
6049 <webidl> typedef DOMString ApplicationId;</webidl>
6052 The unique ID for an installed application.
6058 <Type type="DOMString"/>
6060 <Typedef name="ApplicationContextId" id="::Application::ApplicationContextId">
6061 <webidl> typedef DOMString ApplicationContextId;</webidl>
6064 The unique ID for a running application.
6070 <Type type="DOMString"/>
6072 <Interface name="ApplicationManagerObject" id="::Application::ApplicationManagerObject">
6073 <webidl> [NoInterfaceObject] interface ApplicationManagerObject {
6074 readonly attribute <ref>ApplicationManager</ref> application;
6078 This interface defines what is instantiated by the <em>Tizen </em>object by the Tizen Platform.
6082 There will be a <em>tizen.application </em>object that allows access to Application API functionality.
6089 <ExtendedAttributeList>
6090 <ExtendedAttribute name="NoInterfaceObject">
6091 <webidl>NoInterfaceObject</webidl>
6092 </ExtendedAttribute>
6093 </ExtendedAttributeList>
6094 <Attribute readonly="readonly" name="application" id="::Application::ApplicationManagerObject::application">
6095 <webidl> readonly attribute <ref>ApplicationManager</ref> application;</webidl>
6096 <Type name="ApplicationManager"/>
6099 <Implements name1="Tizen" name2="ApplicationManagerObject">
6100 <webidl> <ref>Tizen</ref> implements <ref>ApplicationManagerObject</ref>;</webidl>
6102 <Interface name="ApplicationManager" id="::Application::ApplicationManager">
6103 <webidl> [NoInterfaceObject] interface ApplicationManager {
6105 <ref>Application</ref> getCurrentApplication() raises(<ref>WebAPIException</ref>);
6107 void kill(<ref>ApplicationContextId</ref> contextId,
6108 optional <ref>SuccessCallback</ref>? successCallback,
6109 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
6111 void launch(<ref>ApplicationId</ref> id,
6112 optional <ref>SuccessCallback</ref>? successCallback,
6113 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
6115 void launchAppControl(<ref>ApplicationControl</ref> appControl,
6116 optional <ref>ApplicationId</ref>? id,
6117 optional <ref>SuccessCallback</ref>? successCallback,
6118 optional <ref>ErrorCallback</ref>? errorCallback,
6119 optional <ref>ApplicationControlDataArrayReplyCallback</ref>? replyCallback) raises(<ref>WebAPIException</ref>);
6121 void findAppControl(<ref>ApplicationControl</ref> appControl,
6122 <ref>FindAppControlSuccessCallback</ref> successCallback,
6123 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
6125 void getAppsContext(<ref>ApplicationContextArraySuccessCallback</ref> successCallback,
6126 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
6128 <ref>ApplicationContext</ref> getAppContext(optional <ref>ApplicationContextId</ref>? contextId) raises(<ref>WebAPIException</ref>);
6130 void getAppsInfo(<ref>ApplicationInformationArraySuccessCallback</ref> successCallback,
6131 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
6133 <ref>ApplicationInformation</ref> getAppInfo(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);
6135 <ref>ApplicationCertificate</ref>[] getAppCerts(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);
6137 DOMString getAppSharedURI(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);
6139 <ref>ApplicationMetaData</ref>[] getAppMetaData(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);
6141 long addAppInfoEventListener(<ref>ApplicationInformationEventCallback</ref> eventCallback) raises(<ref>WebAPIException</ref>);
6143 void removeAppInfoEventListener(long watchId) raises(<ref>WebAPIException</ref>);
6148 This section defines the application manager interface.
6154 <ExtendedAttributeList>
6155 <ExtendedAttribute name="NoInterfaceObject">
6156 <webidl>NoInterfaceObject</webidl>
6157 </ExtendedAttribute>
6158 </ExtendedAttributeList>
6159 <Operation name="getCurrentApplication" id="::Application::ApplicationManager::getCurrentApplication">
6160 <webidl> <ref>Application</ref> getCurrentApplication() raises(<ref>WebAPIException</ref>);</webidl>
6163 Gets the <em>Application </em>object defining the current application.
6168 <Code> var app = tizen.application.getCurrentApplication();
6169 console.log("Current application's app id is " + app.appInfo.id);
6172 <Type name="Application">
6175 Application The data structure that defines current application.
6181 <RaiseException name="WebAPIException">
6184 with error type UnknownError, if the application cannot be retrieved because of an unknown error.
6190 <Operation name="kill" id="::Application::ApplicationManager::kill">
6191 <webidl> void kill(<ref>ApplicationContextId</ref> contextId,
6192 optional <ref>SuccessCallback</ref>? successCallback,
6193 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
6196 Kills an application with the specified application context ID.
6200 The <em>ErrorCallback() </em>is launched with these error types:
6204 NotFoundError - If the context is not found with specified context ID. </li>
6206 InvalidValuesError - If any of the input parameters contain an invalid value
6207 or if the specified context ID matches the context ID of the calling application. </li>
6209 UnknownError - If any other error occurs. </li>
6219 http://tizen.org/privilege/appmanager.kill
6221 <Code> function onKillSuccess() {
6222 console.log("Application terminated successfully");
6225 function onRunningAppsContext(contexts) {
6226 // let's assume that the application "targetApp0.main" has been installed.
6227 var targetId = "targetApp0.main";
6229 for (var i = 0; i < contexts.length; i++) {
6230 if (contexts[i].appId == targetId) {
6231 tizen.application.kill(contexts[i].id, onKillSuccess);
6236 tizen.application.getAppsContext(onRunningAppsContext);
6241 <Argument name="contextId">
6244 The identifier of the application to kill
6247 <Type name="ApplicationContextId"/>
6249 <Argument optional="optional" name="successCallback">
6252 The method to invoke when an application is killed successfully.
6255 <Type name="SuccessCallback" nullable="nullable"/>
6257 <Argument optional="optional" name="errorCallback">
6260 The method to invoke when an error occurs.
6263 <Type name="ErrorCallback" nullable="nullable"/>
6267 <RaiseException name="WebAPIException">
6270 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6273 with error type SecurityError, if the application does not have the privilege to call this method.
6279 <Operation name="launch" id="::Application::ApplicationManager::launch">
6280 <webidl> void launch(<ref>ApplicationId</ref> id,
6281 optional <ref>SuccessCallback</ref>? successCallback,
6282 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
6285 Launches an application with the given application ID.
6289 The <em>ErrorCallback()</em> is launched with these error types:
6293 NotFoundError - If the application is not found with given ID. </li>
6295 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
6297 UnknownError - If any other error occurs. </li>
6307 http://tizen.org/privilege/application.launch
6309 <Code> function onsuccess() {
6310 console.log("The application has launched successfully");
6313 // let's assume that application "targetApp0.main" has been installed
6314 tizen.application.launch("targetApp0.main", onsuccess);
6319 <Argument name="id">
6322 A unique string representing application ID.
6325 <Type name="ApplicationId"/>
6327 <Argument optional="optional" name="successCallback">
6330 The method to call when the invocation ends successfully.
6333 <Type name="SuccessCallback" nullable="nullable"/>
6335 <Argument optional="optional" name="errorCallback">
6338 The method to call when an error occurs.
6341 <Type name="ErrorCallback" nullable="nullable"/>
6345 <RaiseException name="WebAPIException">
6348 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6351 with error type SecurityError, if the application does not have the privilege to call this method.
6357 <Operation name="launchAppControl" id="::Application::ApplicationManager::launchAppControl">
6358 <webidl> void launchAppControl(<ref>ApplicationControl</ref> appControl,
6359 optional <ref>ApplicationId</ref>? id,
6360 optional <ref>SuccessCallback</ref>? successCallback,
6361 optional <ref>ErrorCallback</ref>? errorCallback,
6362 optional <ref>ApplicationControlDataArrayReplyCallback</ref>? replyCallback) raises(<ref>WebAPIException</ref>);</webidl>
6365 Launches an application with the specified application control.
6369 An application can launch other applications with the application control,
6370 and get back the results from the launched applications.
6373 The application control consists of an operation, URI, and MIME type, and describes
6374 the request to be performed by the newly launched application. The
6375 application control is passed to the <em>launchAppControl()</em> method to launch an
6376 application. The system tries to find the proper application
6377 to perform the requested application control, then launches the selected application.
6380 The application control request is passed to the newly launched application
6381 and it can be accessed by <em>getRequestedAppControl() </em>method. The passed
6382 application control contains the reason the application was launched and
6383 information about what the application is doing. The launched application
6384 can send a result to the caller application with the <em>replyResult() </em>method of
6385 <em>RequestedApplicationControl</em> interface.
6388 The <em>ErrorCallback() </em>is launched with these error types:
6392 NotFoundError - If system cannot find the application that matches the specified application control. </li>
6394 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
6396 UnknownError: If any other error occurs. </li>
6406 http://tizen.org/privilege/application.launch
6408 <Code> var appControl = new tizen.ApplicationControl(
6409 "http://tizen.org/appcontrol/operation/pick",
6411 "image/jpeg",
6414 var appControlReplyCallback = {
6415 // callee sent a reply
6416 onsuccess: function(data) {
6417 for (var i = 0; i < data.length; i++) {
6418 if (data[i].key == "http://tizen.org/appcontrol/data/selected") {
6419 console.log('Selected image is ' + data[i].value[0]);
6423 // callee returned failure
6424 onfailure: function() {
6425 console.log('The launch application control failed');
6429 tizen.application.launchAppControl(
6432 function() {console.log("launch application control succeed"); },
6433 function(e) {console.log("launch application control failed. reason: " + e.message); },
6434 appControlReplyCallback );
6439 <Argument name="appControl">
6442 The data structure describing application control details.
6445 <Type name="ApplicationControl"/>
6447 <Argument optional="optional" name="id">
6450 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.
6453 <Type name="ApplicationId" nullable="nullable"/>
6455 <Argument optional="optional" name="successCallback">
6458 The method to call when the invocation ends successfully.
6461 <Type name="SuccessCallback" nullable="nullable"/>
6463 <Argument optional="optional" name="errorCallback">
6466 The method to invoke when an error occurs.
6469 <Type name="ErrorCallback" nullable="nullable"/>
6471 <Argument optional="optional" name="replyCallback">
6474 The method to invoke when the application gets back results from the launched application.
6477 <Type name="ApplicationControlDataArrayReplyCallback" nullable="nullable"/>
6481 <RaiseException name="WebAPIException">
6484 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6487 with error type SecurityError, if the application does not have the privilege to call this method.
6493 <Operation name="findAppControl" id="::Application::ApplicationManager::findAppControl">
6494 <webidl> void findAppControl(<ref>ApplicationControl</ref> appControl,
6495 <ref>FindAppControlSuccessCallback</ref> successCallback,
6496 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
6499 Finds application information can be launched with the given application control.
6503 An application can get a list of other applications can be launched with the application control.
6506 The <em>ErrorCallback()<em> is launched with these error types:
6510 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
6512 UnknownError - If any other error occurs. </li>
6518 <Code> var appControl = new tizen.ApplicationControl(
6519 "http://tizen.org/appcontrol/operation/pick",
6521 "image/jpeg",
6524 function successCB(appInfos, appControl)
6526 // em>appControl/em> is same object with the value passed as first parameter to em>findAppControl()/em>
6527 var appControlReplyCallback = {
6528 // callee sent a reply
6529 onsuccess: function(data) {
6530 for (var i = 0; i < data.length; i++) {
6531 if (data[i].key == "http://tizen.org/appcontrol/data/selected") {
6532 console.log('Selected image is ' + data[i].value[0]);
6536 // callee returned failure
6537 onfailure: function() {
6538 console.log('The launch application control failed');
6542 var appId = appInfos[0].id; // select first app's id
6544 tizen.application.launchAppControl(
6547 function() {console.log("launch application control succeed"); },
6548 function(e) {console.log("launch application control failed. reason: " + e.message); },
6549 appControlReplyCallback );
6552 tizen.application.findAppControl(appControl, successCB);
6557 <Argument name="appControl">
6560 A data structure describing application control details.
6563 <Type name="ApplicationControl"/>
6565 <Argument name="successCallback">
6568 The method to call that returns a list of application information.
6571 <Type name="FindAppControlSuccessCallback"/>
6573 <Argument optional="optional" name="errorCallback">
6576 The method to call when an error occurs.
6579 <Type name="ErrorCallback" nullable="nullable"/>
6583 <RaiseException name="WebAPIException">
6586 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6592 <Operation name="getAppsContext" id="::Application::ApplicationManager::getAppsContext">
6593 <webidl> void getAppsContext(<ref>ApplicationContextArraySuccessCallback</ref> successCallback,
6594 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
6597 Gets a list of application contexts for applications that are currently running on a device.
6598 The information contained for each application corresponds to the application state at the time when the list was generated.
6602 The <em>errorCallback()</em> is launched with this error type:
6606 UnknownError - If an unknown error occurs. </li>
6612 <Code> function onRunningAppsContext(contexts) {
6613 for (var i = 0; i < contexts.length; i++)
6614 console.log("ID : " + contexts[i].id);
6617 tizen.application.getAppsContext(onRunningAppsContext);
6622 <Argument name="successCallback">
6625 The method to call when the invocation ends successfully.
6628 <Type name="ApplicationContextArraySuccessCallback"/>
6630 <Argument optional="optional" name="errorCallback">
6633 The method to call when an error occurs.
6636 <Type name="ErrorCallback" nullable="nullable"/>
6640 <RaiseException name="WebAPIException">
6643 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6649 <Operation name="getAppContext" id="::Application::ApplicationManager::getAppContext">
6650 <webidl> <ref>ApplicationContext</ref> getAppContext(optional <ref>ApplicationContextId</ref>? contextId) raises(<ref>WebAPIException</ref>);</webidl>
6653 Gets the application context for the specified application context ID.
6654 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.
6655 The list of running applications and their application IDs is obtained with <em>getAppsContext()</em>.
6660 <Code> var appContext = tizen.application.getAppContext(null);
6661 console.log("Application context retrieved for app " + appContext.appId);
6664 <Type name="ApplicationContext">
6667 ApplicationContext A data structure that lists running application details.
6672 <Argument optional="optional" name="contextId">
6675 A string representing an application context ID. If the ID is not provided, the application context of the calling application will be returned.
6678 <Type name="ApplicationContextId" nullable="nullable"/>
6682 <RaiseException name="WebAPIException">
6685 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6688 with error type NotFoundError, if the application context is not found with provided ID.
6691 with error type UnknownError, if the application context cannot be retrieved because of an unknown error.
6697 <Operation name="getAppsInfo" id="::Application::ApplicationManager::getAppsInfo">
6698 <webidl> void getAppsInfo(<ref>ApplicationInformationArraySuccessCallback</ref> successCallback,
6699 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
6702 Gets the list of installed application's information on a device.
6703 The information contained on each application corresponds to the application state at the moment when the list was generated.
6707 The <em>errorCallback()</em> is launched with this error type:
6711 UnknownError - If an unknown error occurs. </li>
6717 <Code> function onListInstalledApps(applications) {
6718 for (var i = 0; i < applications.length; i++)
6719 console.log("ID : " + applications[i].id);
6722 tizen.application.getAppsInfo(onListInstalledApps);
6727 <Argument name="successCallback">
6730 The method to call when the invocation ends successfully.
6733 <Type name="ApplicationInformationArraySuccessCallback"/>
6735 <Argument optional="optional" name="errorCallback">
6738 The method to call when an error occurs.
6741 <Type name="ErrorCallback" nullable="nullable"/>
6745 <RaiseException name="WebAPIException">
6748 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6754 <Operation name="getAppInfo" id="::Application::ApplicationManager::getAppInfo">
6755 <webidl> <ref>ApplicationInformation</ref> getAppInfo(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);</webidl>
6758 Gets application information for a specified application ID.
6762 If the ID is set to <var>null</var> or not set at all, it returns application information for the current application.
6763 The list of installed applications and their application IDs is obtained with <em>getAppsInfo()</em>.
6769 <Code> var appInfo = tizen.application.getAppInfo(null);
6770 console.log("Current application name : " + appInfo.name);
6773 <Type name="ApplicationInformation">
6776 ApplicationInformation The information of an application.
6781 <Argument optional="optional" name="id">
6784 A string representing application ID. If the ID is not provided, the application information of the calling application will be returned.
6787 <Type name="ApplicationId" nullable="nullable"/>
6791 <RaiseException name="WebAPIException">
6794 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6797 with error type NotFoundError, if the application is not found with specified ID.
6800 with error type UnknownError, if the application cannot be retrieved because of an unknown error.
6806 <Operation name="getAppCerts" id="::Application::ApplicationManager::getAppCerts">
6807 <webidl> <ref>ApplicationCertificate</ref>[] getAppCerts(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);</webidl>
6810 Gets application certificates for a specified application ID.
6814 If the ID is set to <var>null</var> or not set at all, it returns application certificates for the current application.
6817 The certificate types are listed below
6821 AUTHOR_ROOT - Author Root Certificate </li>
6823 AUTHOR_INTERMEDIATE - Author Intermediate Certificate </li>
6825 AUTHOR_SIGNER - Author Signer Certificate </li>
6827 DISTRIBUTOR_ROOT - Distributor Root Certificate </li>
6829 DISTRIBUTOR_INTERMEDIATE - Distributor Intermediate Certificate </li>
6831 DISTRIBUTOR_SIGNER - Distributor Signer Certificate </li>
6833 DISTRIBUTOR2_ROOT - Distributor2 Root Certificate </li>
6835 DISTRIBUTOR2_INTERMEDIATE - Distributor2 Intermediate Certificate </li>
6837 DISTRIBUTOR2_SIGNER - Distributor2 Signer Certificate </li>
6847 http://tizen.org/privilege/appmanager.certificate
6849 <Code> var appCerts = tizen.application.getAppCerts(null);
6851 for (var i = 0; i < appCerts.length; i++) {
6852 console.log("#" + i + " type:" + appCerts[i].type);
6853 console.log("#" + i + " value:" + appCerts[i].value);
6860 ApplicationCertificate[] Array of certificate information of a specified application
6863 <Type name="ApplicationCertificate"/>
6866 <Argument optional="optional" name="id">
6869 A string representing application ID. If the ID is not provided, the application certificate of the calling application will be returned.
6872 <Type name="ApplicationId" nullable="nullable"/>
6876 <RaiseException name="WebAPIException">
6879 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6882 with error type SecurityError, if the application does not have the privilege to call this method.
6885 with error type NotFoundError, if the application is not found with specified ID.
6888 with error type UnknownError, if the application cannot be retrieved because of an unknown error.
6894 <Operation name="getAppSharedURI" id="::Application::ApplicationManager::getAppSharedURI">
6895 <webidl> DOMString getAppSharedURI(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);</webidl>
6898 Gets URI of read-only shared directory of application for a specified application ID.
6902 The shared directory is used to export data to other applications.
6903 If the ID is set to <var>null</var> or not set at all, it returns shared directory URI for the current application.
6909 <Code> var sharedDir = tizen.application.getAppSharedURI(null);
6910 console.log("shared directory : " + sharedDir);
6913 <Type type="DOMString">
6916 DOMString The shared directory URI of application
6921 <Argument optional="optional" name="id">
6924 A string representing application ID. If the ID is not provided, the shared directory URI of the calling application will be returned.
6927 <Type name="ApplicationId" nullable="nullable"/>
6931 <RaiseException name="WebAPIException">
6934 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6937 with error type NotFoundError, if the application is not found with specified ID.
6940 with error type UnknownError, if the application cannot be retrieved because of an unknown error.
6946 <Operation name="getAppMetaData" id="::Application::ApplicationManager::getAppMetaData">
6947 <webidl> <ref>ApplicationMetaData</ref>[] getAppMetaData(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);</webidl>
6950 Gets application meta data array for a specified application ID.
6954 If the ID is set to <var>null</var> or not set at all, it returns application meta data array for the current application.
6964 http://tizen.org/privilege/application.info
6966 <Code> var metaDataArray = tizen.application.getAppMetaData(null);
6967 console.log("size of metadata : " + metaDataArray.length);
6974 ApplicationMetaData[] Array of meta data of a specified application. If there are no meta data for a specified application,
6975 empty array will be returned
6978 <Type name="ApplicationMetaData"/>
6981 <Argument optional="optional" name="id">
6984 A string representing application ID. If the ID is not provided, the application metadata array of the calling application will be returned.
6987 <Type name="ApplicationId" nullable="nullable"/>
6991 <RaiseException name="WebAPIException">
6994 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6997 with error type SecurityError, if the application does not have the privilege to call this method.
7000 with error type NotFoundError, if the application is not found with specified ID.
7003 with error type UnknownError, if the application cannot be retrieved because of an unknown error.
7009 <Operation name="addAppInfoEventListener" id="::Application::ApplicationManager::addAppInfoEventListener">
7010 <webidl> long addAppInfoEventListener(<ref>ApplicationInformationEventCallback</ref> eventCallback) raises(<ref>WebAPIException</ref>);</webidl>
7013 Adds a listener for receiving any notification for changes in the list of the installed applications
7018 It install a callback that is triggered every time a change occurs on
7019 the list of installed applications on a device. This change may
7020 be occurred by a new installation, uninstallation, or update of an application.
7023 When executed, the implementation must immediately return a listener
7024 ID that identifies the listener. After returning the ID, the change
7025 detection operation is started asynchronously.
7028 The <em>ApplicationInformationEventCallback </em>must be invoked every time a new
7029 application is installed, removed, or updated.
7032 The change detection must continue until the <em>removeAppInfoEventListener()</em> method is called
7033 with the corresponding listener identifier.
7039 <Code> var appEventCallback = {
7040 oninstalled: function(appInfo) {
7041 console.log('The application ' + appInfo.name + ' is installed');
7043 onupdated: function(appInfo) {
7044 console.log('The application ' + appInfo.name + ' is updated');
7046 onuninstalled: function(appid) {
7047 console.log('The application ' + appid + ' is uninstalled');
7050 var watchId = tizen.application.addAppInfoEventListener(appEventCallback);
7056 long ID of the listener that can be used to remove the listener later.
7061 <Argument name="eventCallback">
7064 The method to call when a change on the installed applications is made.
7067 <Type name="ApplicationInformationEventCallback"/>
7071 <RaiseException name="WebAPIException">
7074 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
7077 with error type UnknownError, if fails to add listener because of an unknown error.
7083 <Operation name="removeAppInfoEventListener" id="::Application::ApplicationManager::removeAppInfoEventListener">
7084 <webidl> void removeAppInfoEventListener(long watchId) raises(<ref>WebAPIException</ref>);</webidl>
7087 Removes the listener to stop receiving notifications for changes on the list of installed
7088 applications on a device.
7093 <Code> tizen.application.removeAppInfoEventListener(watchId);
7098 <Argument name="watchId">
7101 An ID that identifies the listener.
7108 <RaiseException name="WebAPIException">
7111 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
7114 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
7117 with error type NotFoundError, if the listener is not found with specified ID.
7120 with error type UnknownError, if fails to remove listener because of an unknown error.
7127 <Interface name="Application" id="::Application::Application">
7128 <webidl> [NoInterfaceObject] interface Application {
7130 readonly attribute <ref>ApplicationInformation</ref> appInfo;
7132 readonly attribute <ref>ApplicationContextId</ref> contextId;
7134 void exit() raises(<ref>WebAPIException</ref>);
7136 void hide() raises(<ref>WebAPIException</ref>);
7138 <ref>RequestedApplicationControl</ref> getRequestedAppControl() raises(<ref>WebAPIException</ref>);
7142 This interface defines the current application's information and
7143 the basic operations (such as exit or hide) for the current application .
7149 <ExtendedAttributeList>
7150 <ExtendedAttribute name="NoInterfaceObject">
7151 <webidl>NoInterfaceObject</webidl>
7152 </ExtendedAttribute>
7153 </ExtendedAttributeList>
7154 <Attribute readonly="readonly" name="appInfo" id="::Application::Application::appInfo">
7155 <webidl> readonly attribute <ref>ApplicationInformation</ref> appInfo;</webidl>
7158 An attribute to store the application information for the current application.
7164 <Type name="ApplicationInformation"/>
7166 <Attribute readonly="readonly" name="contextId" id="::Application::Application::contextId">
7167 <webidl> readonly attribute <ref>ApplicationContextId</ref> contextId;</webidl>
7170 An attribute to store the ID of a running application.
7176 <Type name="ApplicationContextId"/>
7178 <Operation name="exit" id="::Application::Application::exit">
7179 <webidl> void exit() raises(<ref>WebAPIException</ref>);</webidl>
7182 Exits the current application.
7187 <Code> var app = tizen.application.getCurrentApplication();
7195 <RaiseException name="WebAPIException">
7198 with error type UnknownError, if any other error occurs.
7204 <Operation name="hide" id="::Application::Application::hide">
7205 <webidl> void hide() raises(<ref>WebAPIException</ref>);</webidl>
7208 Hides the current application.
7213 <Code> var app = tizen.application.getCurrentApplication();
7221 <RaiseException name="WebAPIException">
7224 with error type UnknownError, if any other error occurs.
7230 <Operation name="getRequestedAppControl" id="::Application::Application::getRequestedAppControl">
7231 <webidl> <ref>RequestedApplicationControl</ref> getRequestedAppControl() raises(<ref>WebAPIException</ref>);</webidl>
7234 Gets the requested application control passed to the current application.
7238 Gets the requested application control that contains the application control
7239 passed by the <em>launchAppControl()</em> method from the calling application.
7240 The requested application control contains the reason the application
7241 was launched and what it has to perform. For example, an application
7242 might be launched to display an image on a page by other
7243 application's request. In all of these cases, the application is
7244 responsible for checking the contents of the application control and responding
7245 appropriately when it is launched.
7251 <Code> var reqAppControl = tizen.application.getCurrentApplication().getRequestedAppControl();
7253 if (reqAppControl) {
7254 console.log("Requester AppID : " + reqAppControl.callerAppId);
7258 <Type name="RequestedApplicationControl">
7261 RequestedApplicationControl The details of an requested application control
7267 <RaiseException name="WebAPIException">
7270 with error type UnknownError, if the application control cannot be retrieved because of an unknown error.
7277 <Interface name="ApplicationInformation" id="::Application::ApplicationInformation">
7278 <webidl> [NoInterfaceObject] interface ApplicationInformation {
7280 readonly attribute <ref>ApplicationId</ref> id;
7282 readonly attribute DOMString name;
7284 readonly attribute DOMString iconPath;
7286 readonly attribute DOMString version;
7288 readonly attribute boolean show;
7290 readonly attribute DOMString[] categories;
7292 readonly attribute Date installDate;
7294 readonly attribute long size raises(<ref>WebAPIException</ref>);
7296 readonly attribute <ref>PackageId</ref> packageId;
7300 This interface defines the general information available to an installed application.
7306 <ExtendedAttributeList>
7307 <ExtendedAttribute name="NoInterfaceObject">
7308 <webidl>NoInterfaceObject</webidl>
7309 </ExtendedAttribute>
7310 </ExtendedAttributeList>
7311 <Attribute readonly="readonly" name="id" id="::Application::ApplicationInformation::id">
7312 <webidl> readonly attribute <ref>ApplicationId</ref> id;</webidl>
7315 An attribute to store the identifier of an application for application management.
7321 <Type name="ApplicationId"/>
7323 <Attribute readonly="readonly" name="name" id="::Application::ApplicationInformation::name">
7324 <webidl> readonly attribute DOMString name;</webidl>
7327 An attribute to store the name of an application.
7333 <Type type="DOMString"/>
7335 <Attribute readonly="readonly" name="iconPath" id="::Application::ApplicationInformation::iconPath">
7336 <webidl> readonly attribute DOMString iconPath;</webidl>
7339 An attribute to store the icon path of an application.
7345 <Type type="DOMString"/>
7347 <Attribute readonly="readonly" name="version" id="::Application::ApplicationInformation::version">
7348 <webidl> readonly attribute DOMString version;</webidl>
7351 An attribute to store the version of an application.
7357 <Type type="DOMString"/>
7359 <Attribute readonly="readonly" name="show" id="::Application::ApplicationInformation::show">
7360 <webidl> readonly attribute boolean show;</webidl>
7363 An attribute that determines whether the application information should
7364 be shown (such as in the menus) or not.
7370 <Type type="boolean"/>
7372 <Attribute readonly="readonly" name="categories" id="::Application::ApplicationInformation::categories">
7373 <webidl> readonly attribute DOMString[] categories;</webidl>
7376 An array of attributes to store the categories that the app belongs to.
7383 <Type type="DOMString"/>
7386 <Attribute readonly="readonly" name="installDate" id="::Application::ApplicationInformation::installDate">
7387 <webidl> readonly attribute Date installDate;</webidl>
7390 An attribute to store the application install/update time.
7398 <Attribute readonly="readonly" name="size" id="::Application::ApplicationInformation::size">
7399 <webidl> readonly attribute long size raises(<ref>WebAPIException</ref>);</webidl>
7402 An attribute to store the application size (installed space).
7411 http://tizen.org/privilege/application.info
7416 <RaiseException name="WebAPIException">
7419 with error type SecurityError, if this attribute is not allowed.
7425 <Attribute readonly="readonly" name="packageId" id="::Application::ApplicationInformation::packageId">
7426 <webidl> readonly attribute <ref>PackageId</ref> packageId;</webidl>
7429 An attribute to store the package ID of application.
7435 <Type name="PackageId"/>
7438 <Interface name="ApplicationContext" id="::Application::ApplicationContext">
7439 <webidl> [NoInterfaceObject] interface ApplicationContext {
7441 readonly attribute <ref>ApplicationContextId</ref> id;
7443 readonly attribute <ref>ApplicationId</ref> appId;
7448 This interface defines the information available about a running
7455 <ExtendedAttributeList>
7456 <ExtendedAttribute name="NoInterfaceObject">
7457 <webidl>NoInterfaceObject</webidl>
7458 </ExtendedAttribute>
7459 </ExtendedAttributeList>
7460 <Attribute readonly="readonly" name="id" id="::Application::ApplicationContext::id">
7461 <webidl> readonly attribute <ref>ApplicationContextId</ref> id;</webidl>
7464 An attribute to store the ID of a running application.
7470 <Type name="ApplicationContextId"/>
7472 <Attribute readonly="readonly" name="appId" id="::Application::ApplicationContext::appId">
7473 <webidl> readonly attribute <ref>ApplicationId</ref> appId;</webidl>
7476 An attribute to store the ID of an installed application.
7482 <Type name="ApplicationId"/>
7485 <Interface name="ApplicationControlData" id="::Application::ApplicationControlData">
7486 <webidl> [Constructor(DOMString key, DOMString[] value)]
7487 interface ApplicationControlData {
7489 attribute DOMString key;
7491 attribute DOMString[] value;
7496 This interface defines a key/value pair used to pass data
7497 between applications through the <em>ApplicationControl </em>interface.
7502 <Code> var appControlData = new tizen.ApplicationControlData("image", [imagedata1]);
7505 <ExtendedAttributeList>
7506 <ExtendedAttribute name="Constructor">
7507 <webidl>Constructor(DOMString key, DOMString[] value)</webidl>
7509 <Argument name="key">
7510 <Type type="DOMString"/>
7512 <Argument name="value">
7514 <Type type="DOMString"/>
7518 </ExtendedAttribute>
7519 </ExtendedAttributeList>
7520 <Attribute name="key" id="::Application::ApplicationControlData::key">
7521 <webidl> attribute DOMString key;</webidl>
7524 An attribute to store the name of a key.
7530 <Type type="DOMString"/>
7532 <Attribute name="value" id="::Application::ApplicationControlData::value">
7533 <webidl> attribute DOMString[] value;</webidl>
7536 An attribute to store the value associated with a key.
7543 <Type type="DOMString"/>
7547 <Interface name="ApplicationControl" id="::Application::ApplicationControl">
7548 <webidl> [Constructor(DOMString operation, optional DOMString? uri,
7549 optional DOMString? mime, optional DOMString? category,
7550 optional <ref>ApplicationControlData</ref>[]? data)]
7551 interface ApplicationControl {
7553 attribute DOMString operation;
7555 attribute DOMString? uri;
7557 attribute DOMString? mime;
7559 attribute DOMString? category;
7561 attribute <ref>ApplicationControlData</ref>[] data;
7566 This interface consists of an operation, URI, MIME type,
7567 and data. It describes an action to be performed by other applications
7568 and is passed to launch other applications.
7569 If the system gets the application control request, it finds
7570 the corresponding application to be launched with the delivered application control
7571 and launches the selected application.
7576 <Code> var appControl =
7577 new tizen.ApplicationControl(
7578 "http://tizen.org/appcontrol/operation/view",
7580 "image/jpeg",
7582 [new tizen.ApplicationControlData("images",
7583 [imagedata1, imagedata2])] );
7586 <ExtendedAttributeList>
7587 <ExtendedAttribute name="Constructor">
7588 <webidl>Constructor(DOMString operation, optional DOMString? uri,
7589 optional DOMString? mime, optional DOMString? category,
7590 optional <ref>ApplicationControlData</ref>[]? data)</webidl>
7592 <Argument name="operation">
7593 <Type type="DOMString"/>
7595 <Argument optional="optional" name="uri">
7596 <Type type="DOMString" nullable="nullable"/>
7598 <Argument optional="optional" name="mime">
7599 <Type type="DOMString" nullable="nullable"/>
7601 <Argument optional="optional" name="category">
7602 <Type type="DOMString" nullable="nullable"/>
7604 <Argument optional="optional" name="data">
7605 <Type type="array" nullable="nullable">
7606 <Type name="ApplicationControlData"/>
7610 </ExtendedAttribute>
7611 </ExtendedAttributeList>
7612 <Attribute name="operation" id="::Application::ApplicationControl::operation">
7613 <webidl> attribute DOMString operation;</webidl>
7616 An attribute to store the string that defines the action to be
7617 performed by an application control.
7623 <Type type="DOMString"/>
7625 <Attribute name="uri" id="::Application::ApplicationControl::uri">
7626 <webidl> attribute DOMString? uri;</webidl>
7629 An attribute to store the URI needed by application control.
7635 <Type type="DOMString" nullable="nullable"/>
7637 <Attribute name="mime" id="::Application::ApplicationControl::mime">
7638 <webidl> attribute DOMString? mime;</webidl>
7641 An attribute to store the MIME type of a content.
7647 <Type type="DOMString" nullable="nullable"/>
7649 <Attribute name="category" id="::Application::ApplicationControl::category">
7650 <webidl> attribute DOMString? category;</webidl>
7653 An attribute to store the category of the application to be launched.
7659 <Type type="DOMString" nullable="nullable"/>
7661 <Attribute name="data" id="::Application::ApplicationControl::data">
7662 <webidl> attribute <ref>ApplicationControlData</ref>[] data;</webidl>
7665 An array of attributes to store the data needed for an application control.
7672 <Type name="ApplicationControlData"/>
7676 <Interface name="RequestedApplicationControl" id="::Application::RequestedApplicationControl">
7677 <webidl> [NoInterfaceObject] interface RequestedApplicationControl {
7679 readonly attribute <ref>ApplicationControl</ref> appControl;
7681 readonly attribute <ref>ApplicationId</ref> callerAppId;
7683 void replyResult(optional <ref>ApplicationControlData</ref>[]? data) raises(<ref>WebAPIException</ref>);
7685 void replyFailure() raises(<ref>WebAPIException</ref>);
7690 This interface has an application control information requested and passed
7691 from other application and is passed to launch other applications. The newly
7692 launched application can get the requested application control through <em>getRequestedAppControl()</em> method, and send the results
7693 to the calling application through the <em>replyResult()</em> method after performing the
7694 required action requested the calling application.
7699 <Code> var reqAppControl = tizen.application.getCurrentApplication().getRequestedAppControl();
7700 if (reqAppControl) {
7701 console.log("Requester AppID : " + reqAppControl.callerAppId);
7703 var appControl = reqAppControl.appControl;
7704 if (appControl.operation == "http://tizen.org/appcontrol/operation/pick") {
7705 var data = new tizen.ApplicationControlData("http://tizen.org/appcontrol/data/selected", ["Image1.jpg"]);
7706 reqAppControl.replyResult([data]);
7711 <ExtendedAttributeList>
7712 <ExtendedAttribute name="NoInterfaceObject">
7713 <webidl>NoInterfaceObject</webidl>
7714 </ExtendedAttribute>
7715 </ExtendedAttributeList>
7716 <Attribute readonly="readonly" name="appControl" id="::Application::RequestedApplicationControl::appControl">
7717 <webidl> readonly attribute <ref>ApplicationControl</ref> appControl;</webidl>
7720 An attribute to store the application control object that describes caller application's request.
7721 It contains the information that the calling application passed to <em>launchAppControl</em>.
7727 <Type name="ApplicationControl"/>
7729 <Attribute readonly="readonly" name="callerAppId" id="::Application::RequestedApplicationControl::callerAppId">
7730 <webidl> readonly attribute <ref>ApplicationId</ref> callerAppId;</webidl>
7733 An attribute to store the caller application's ID
7739 <Type name="ApplicationId"/>
7741 <Operation name="replyResult" id="::Application::RequestedApplicationControl::replyResult">
7742 <webidl> void replyResult(optional <ref>ApplicationControlData</ref>[]? data) raises(<ref>WebAPIException</ref>);</webidl>
7745 Sends the results to the caller application.
7753 <Argument optional="optional" name="data">
7756 An array of ApplicationControlData objects.
7759 <Type type="array" nullable="nullable">
7760 <Type name="ApplicationControlData"/>
7765 <RaiseException name="WebAPIException">
7768 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
7771 with error type NotFoundError, if the caller app is not alive or there is no response from the caller app
7774 with error type UnknownError, if the reply request fails because of an unknown error
7780 <Operation name="replyFailure" id="::Application::RequestedApplicationControl::replyFailure">
7781 <webidl> void replyFailure() raises(<ref>WebAPIException</ref>);</webidl>
7784 Notifies the calling application that the application failed
7785 to perform the requested action.
7794 <RaiseException name="WebAPIException">
7797 with error type NotFoundError, if the caller app is not alive or there is no response from the caller app
7800 with error type UnknownError, if the reply request fails because of an unknown error
7807 <Interface name="ApplicationCertificate" id="::Application::ApplicationCertificate">
7808 <webidl> [NoInterfaceObject] interface ApplicationCertificate {
7810 readonly attribute DOMString type;
7812 readonly attribute DOMString value;
7817 This interface defines the certificate information of an installed application.
7823 <ExtendedAttributeList>
7824 <ExtendedAttribute name="NoInterfaceObject">
7825 <webidl>NoInterfaceObject</webidl>
7826 </ExtendedAttribute>
7827 </ExtendedAttributeList>
7828 <Attribute readonly="readonly" name="type" id="::Application::ApplicationCertificate::type">
7829 <webidl> readonly attribute DOMString type;</webidl>
7832 An attribute to store the type of the application certificate.
7838 <Type type="DOMString"/>
7840 <Attribute readonly="readonly" name="value" id="::Application::ApplicationCertificate::value">
7841 <webidl> readonly attribute DOMString value;</webidl>
7844 An attribute to store the value of the application certificate.
7850 <Type type="DOMString"/>
7853 <Interface name="ApplicationMetaData" id="::Application::ApplicationMetaData">
7854 <webidl> [NoInterfaceObject] interface ApplicationMetaData {
7856 readonly attribute DOMString key;
7858 readonly attribute DOMString value;
7863 This interface defines the meta data of an installed application.
7869 <ExtendedAttributeList>
7870 <ExtendedAttribute name="NoInterfaceObject">
7871 <webidl>NoInterfaceObject</webidl>
7872 </ExtendedAttribute>
7873 </ExtendedAttributeList>
7874 <Attribute readonly="readonly" name="key" id="::Application::ApplicationMetaData::key">
7875 <webidl> readonly attribute DOMString key;</webidl>
7878 An attribute to store the key of the application meta data.
7884 <Type type="DOMString"/>
7886 <Attribute readonly="readonly" name="value" id="::Application::ApplicationMetaData::value">
7887 <webidl> readonly attribute DOMString value;</webidl>
7890 An attribute to store the value of the application meta data.
7896 <Type type="DOMString"/>
7899 <Interface name="ApplicationInformationArraySuccessCallback" id="::Application::ApplicationInformationArraySuccessCallback">
7900 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ApplicationInformationArraySuccessCallback {
7901 void onsuccess(<ref>ApplicationInformation</ref>[] informationArray);
7905 This interface invokes the success callback that is invoked when the installed application list is retrieved.
7909 This callback interface specifies a success method with an array of
7910 <em>ApplicationInformation </em>objects as an input parameter. It is used in <em>ApplicationManager.getAppsInfo()</em>.
7917 <ExtendedAttributeList>
7918 <ExtendedAttribute name="Callback" value="FunctionOnly">
7919 <webidl>Callback</webidl>
7920 </ExtendedAttribute>
7921 <ExtendedAttribute name="NoInterfaceObject">
7922 <webidl> NoInterfaceObject</webidl>
7923 </ExtendedAttribute>
7924 </ExtendedAttributeList>
7925 <Operation name="onsuccess" id="::Application::ApplicationInformationArraySuccessCallback::onsuccess">
7926 <webidl> void onsuccess(<ref>ApplicationInformation</ref>[] informationArray);</webidl>
7929 Called when the asynchronous call completes successfully.
7937 <Argument name="informationArray">
7940 A list of installed applications.
7944 <Type name="ApplicationInformation"/>
7950 <Interface name="FindAppControlSuccessCallback" id="::Application::FindAppControlSuccessCallback">
7951 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface FindAppControlSuccessCallback {
7952 void onsuccess(<ref>ApplicationInformation</ref>[] informationArray, <ref>ApplicationControl</ref> appControl);
7956 This interface specified a success callback that is invoked when system finished searching applications which is matched by specific application control .
7960 This callback interface specifies a success method with an array of
7961 <em>ApplicationInformation </em>objects and application control as an input parameter.
7962 It is used in <em>ApplicationManager.findAppControl()</em>.
7969 <ExtendedAttributeList>
7970 <ExtendedAttribute name="Callback" value="FunctionOnly">
7971 <webidl>Callback</webidl>
7972 </ExtendedAttribute>
7973 <ExtendedAttribute name="NoInterfaceObject">
7974 <webidl> NoInterfaceObject</webidl>
7975 </ExtendedAttribute>
7976 </ExtendedAttributeList>
7977 <Operation name="onsuccess" id="::Application::FindAppControlSuccessCallback::onsuccess">
7978 <webidl> void onsuccess(<ref>ApplicationInformation</ref>[] informationArray, <ref>ApplicationControl</ref> appControl);</webidl>
7981 Called when the asynchronous call completes successfully.
7989 <Argument name="informationArray">
7992 A list of installed applications.
7996 <Type name="ApplicationInformation"/>
7999 <Argument name="appControl">
8002 The application control which were passed on <em>ApplicationManager.findAppControl()</em>.
8005 <Type name="ApplicationControl"/>
8010 <Interface name="ApplicationContextArraySuccessCallback" id="::Application::ApplicationContextArraySuccessCallback">
8011 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ApplicationContextArraySuccessCallback {
8012 void onsuccess(<ref>ApplicationContext</ref>[] contexts);
8016 This callback interface that specifies the success callback that is invoked when the list of running applications is retrieved.
8020 This callback interface specifies a success method with
8021 an array of <em>ApplicationContext </em>objects as an input parameter. It is used in <em>ApplicationManager.getAppsContext()</em>.
8028 <ExtendedAttributeList>
8029 <ExtendedAttribute name="Callback" value="FunctionOnly">
8030 <webidl>Callback</webidl>
8031 </ExtendedAttribute>
8032 <ExtendedAttribute name="NoInterfaceObject">
8033 <webidl> NoInterfaceObject</webidl>
8034 </ExtendedAttribute>
8035 </ExtendedAttributeList>
8036 <Operation name="onsuccess" id="::Application::ApplicationContextArraySuccessCallback::onsuccess">
8037 <webidl> void onsuccess(<ref>ApplicationContext</ref>[] contexts);</webidl>
8040 Called when <em>ApplicationManager.getAppsContext() </em>completes successfully.
8048 <Argument name="contexts">
8051 A list of running applications.
8055 <Type name="ApplicationContext"/>
8061 <Interface name="ApplicationControlDataArrayReplyCallback" id="::Application::ApplicationControlDataArrayReplyCallback">
8062 <webidl> [Callback, NoInterfaceObject] interface ApplicationControlDataArrayReplyCallback {
8063 void onsuccess(optional <ref>ApplicationControlData</ref>[]? data);
8069 This callback interface specifies success callbacks that are invoked as a reply from the requested application control within the application control requester.
8073 This callback interface specifies two methods:
8077 <em>onsuccess()</em> - Invoked by the callee application calls <em>RequestedApplicationControl.replyResult()</em>. </li>
8079 <em>onfailure()</em> - Invoked if the callee application calls <em>RequestedApplicationControl.replyFailure()</em>. </li>
8086 <ExtendedAttributeList>
8087 <ExtendedAttribute name="Callback">
8088 <webidl>Callback</webidl>
8089 </ExtendedAttribute>
8090 <ExtendedAttribute name="NoInterfaceObject">
8091 <webidl> NoInterfaceObject</webidl>
8092 </ExtendedAttribute>
8093 </ExtendedAttributeList>
8094 <Operation name="onsuccess" id="::Application::ApplicationControlDataArrayReplyCallback::onsuccess">
8095 <webidl> void onsuccess(optional <ref>ApplicationControlData</ref>[]? data);</webidl>
8098 Called when the callee application calls <em>RequestedApplicationControl.replyResult()</em>.
8106 <Argument optional="optional" name="data">
8109 An array of <em>ApplicationControlData </em>objects.
8112 <Type type="array" nullable="nullable">
8113 <Type name="ApplicationControlData"/>
8118 <Operation name="onfailure" id="::Application::ApplicationControlDataArrayReplyCallback::onfailure">
8119 <webidl> void onfailure();</webidl>
8122 Called when the callee application calls <em>RequestedApplicationControl.replyFailure()</em>.
8132 <Interface name="ApplicationInformationEventCallback" id="::Application::ApplicationInformationEventCallback">
8133 <webidl> [Callback, NoInterfaceObject] interface ApplicationInformationEventCallback {
8134 void oninstalled(<ref>ApplicationInformation</ref> info);
8136 void onupdated(<ref>ApplicationInformation</ref> info);
8138 void onuninstalled(<ref>ApplicationId</ref> id);
8142 The callback interface to specify for subscribing for notification of changes in the list of installed
8143 applications on a device.
8147 This callback interface specifies methods that will be invoked when
8148 an application is installed, updated, or uninstalled.
8155 <ExtendedAttributeList>
8156 <ExtendedAttribute name="Callback">
8157 <webidl>Callback</webidl>
8158 </ExtendedAttribute>
8159 <ExtendedAttribute name="NoInterfaceObject">
8160 <webidl> NoInterfaceObject</webidl>
8161 </ExtendedAttribute>
8162 </ExtendedAttributeList>
8163 <Operation name="oninstalled" id="::Application::ApplicationInformationEventCallback::oninstalled">
8164 <webidl> void oninstalled(<ref>ApplicationInformation</ref> info);</webidl>
8167 Called when an application is installed.
8175 <Argument name="info">
8178 The application information of the installed application.
8181 <Type name="ApplicationInformation"/>
8185 <Operation name="onupdated" id="::Application::ApplicationInformationEventCallback::onupdated">
8186 <webidl> void onupdated(<ref>ApplicationInformation</ref> info);</webidl>
8189 Called when an application is updated.
8197 <Argument name="info">
8200 The application information of the updated application.
8203 <Type name="ApplicationInformation"/>
8207 <Operation name="onuninstalled" id="::Application::ApplicationInformationEventCallback::onuninstalled">
8208 <webidl> void onuninstalled(<ref>ApplicationId</ref> id);</webidl>
8211 Called when an application is uninstalled.
8219 <Argument name="id">
8222 The ID of the uninstalled application.
8225 <Type name="ApplicationId"/>
8231 <Module name="Bluetooth" id="::Bluetooth">
8232 <webidl>module Bluetooth {
8233 typedef DOMString BluetoothAddress;
8235 typedef DOMString BluetoothUUID;
8237 enum BluetoothSocketState { "CLOSED", "OPEN" };
8239 enum BluetoothProfileType { "HEALTH" };
8241 enum BluetoothHealthChannelType { "RELIABLE", "STREAMING" };
8243 [NoInterfaceObject] interface BluetoothManagerObject {
8244 readonly attribute <ref>BluetoothManager</ref> bluetooth;
8246 <ref>Tizen</ref> implements <ref>BluetoothManagerObject</ref>;
8248 [NoInterfaceObject] interface BluetoothManager {
8249 readonly attribute <ref>BluetoothClassDeviceMajor</ref> deviceMajor;
8250 readonly attribute <ref>BluetoothClassDeviceMinor</ref> deviceMinor;
8251 readonly attribute <ref>BluetoothClassDeviceService</ref> deviceService;
8252 <ref>BluetoothAdapter</ref> getDefaultAdapter() raises(<ref>WebAPIException</ref>);
8256 [NoInterfaceObject] interface BluetoothAdapter {
8257 readonly attribute DOMString name;
8258 readonly attribute <ref>BluetoothAddress</ref> address;
8259 readonly attribute boolean powered;
8260 readonly attribute boolean visible;
8262 void setName(DOMString name,
8263 optional <ref>SuccessCallback</ref>? successCallback,
8264 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8266 void setPowered(boolean state,
8267 optional <ref>SuccessCallback</ref>? successCallback,
8268 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8270 void setVisible(boolean mode,
8271 optional <ref>SuccessCallback</ref>? successCallback,
8272 optional <ref>ErrorCallback</ref>? errorCallback,
8273 optional unsigned short? timeout) raises(<ref>WebAPIException</ref>);
8275 void setChangeListener(<ref>BluetoothAdapterChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);
8277 void unsetChangeListener() raises(<ref>WebAPIException</ref>);
8279 void discoverDevices(<ref>BluetoothDiscoverDevicesSuccessCallback</ref> successCallback,
8280 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8282 void stopDiscovery(optional <ref>SuccessCallback</ref>? successCallback,
8283 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8285 void getKnownDevices(<ref>BluetoothDeviceArraySuccessCallback</ref> successCallback,
8286 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8291 void getDevice(<ref>BluetoothAddress</ref> address,
8292 <ref>BluetoothDeviceSuccessCallback</ref> successCallback,
8293 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8298 void createBonding(<ref>BluetoothAddress</ref> address,
8299 <ref>BluetoothDeviceSuccessCallback</ref> successCallback,
8300 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8302 void destroyBonding(<ref>BluetoothAddress</ref> address,
8303 optional <ref>SuccessCallback</ref>? successCallback,
8304 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8308 void registerRFCOMMServiceByUUID(<ref>BluetoothUUID</ref> uuid,
8310 <ref>BluetoothServiceSuccessCallback</ref> successCallback,
8311 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8313 <ref>BluetoothProfileHandler</ref> getBluetoothProfileHandler(<ref>BluetoothProfileType</ref> profileType) raises(<ref>WebAPIException</ref>);
8316 [NoInterfaceObject] interface BluetoothDevice {
8317 readonly attribute DOMString name;
8318 readonly attribute <ref>BluetoothAddress</ref> address;
8319 readonly attribute <ref>BluetoothClass</ref> deviceClass;
8320 readonly attribute boolean isBonded;
8321 readonly attribute boolean isTrusted;
8322 readonly attribute boolean isConnected;
8323 readonly attribute <ref>BluetoothUUID</ref>[] uuids;
8325 void connectToServiceByUUID(<ref>BluetoothUUID</ref> uuid,
8326 <ref>BluetoothSocketSuccessCallback</ref> successCallback,
8327 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8329 [NoInterfaceObject] interface BluetoothSocket {
8330 readonly attribute <ref>BluetoothUUID</ref> uuid;
8331 readonly attribute <ref>BluetoothSocketState</ref> state;
8332 readonly attribute <ref>BluetoothDevice</ref> peer;
8333 [TreatNonCallableAsNull] attribute <ref>SuccessCallback</ref>? onmessage raises(<ref>WebAPIException</ref>);
8334 [TreatNonCallableAsNull] attribute <ref>SuccessCallback</ref>? onclose raises(<ref>WebAPIException</ref>);
8335 unsigned long writeData(byte[] data) raises(<ref>WebAPIException</ref>);
8338 byte[] readData() raises(<ref>WebAPIException</ref>);
8341 void close() raises(<ref>WebAPIException</ref>);
8344 [NoInterfaceObject] interface BluetoothClass {
8345 readonly attribute octet major;
8347 readonly attribute octet minor;
8349 readonly attribute unsigned short [] services ;
8351 boolean hasService(unsigned short service) raises(<ref>WebAPIException</ref>);
8354 [NoInterfaceObject] interface BluetoothClassDeviceMajor {
8356 const octet MISC = 0x00;
8357 const octet COMPUTER = 0x01;
8358 const octet PHONE = 0x02;
8359 const octet NETWORK = 0x03;
8360 const octet AUDIO_VIDEO = 0x04;
8361 const octet PERIPHERAL = 0x05;
8362 const octet IMAGING = 0x06;
8363 const octet WEARABLE = 0x07;
8364 const octet TOY = 0x08;
8365 const octet HEALTH = 0x09;
8366 const octet UNCATEGORIZED = 0x1F;
8369 [NoInterfaceObject] interface BluetoothClassDeviceMinor {
8370 const octet COMPUTER_UNCATEGORIZED = 0x00;
8371 const octet COMPUTER_DESKTOP = 0x01;
8372 const octet COMPUTER_SERVER = 0x02;
8373 const octet COMPUTER_LAPTOP = 0x03;
8374 const octet COMPUTER_HANDHELD_PC_OR_PDA = 0x04;
8375 const octet COMPUTER_PALM_PC_OR_PDA = 0x05;
8376 const octet COMPUTER_WEARABLE = 0x06;
8378 const octet PHONE_UNCATEGORIZED = 0x00;
8379 const octet PHONE_CELLULAR = 0x01;
8380 const octet PHONE_CORDLESS = 0x02;
8381 const octet PHONE_SMARTPHONE = 0x03;
8382 const octet PHONE_MODEM_OR_GATEWAY = 0x04;
8383 const octet PHONE_ISDN = 0x05;
8385 const octet AV_UNRECOGNIZED = 0x00;
8386 const octet AV_WEARABLE_HEADSET = 0x01;
8387 const octet AV_HANDSFREE = 0x02;
8388 const octet AV_MICROPHONE = 0x04;
8389 const octet AV_LOUDSPEAKER = 0x05;
8390 const octet AV_HEADPHONES = 0x06;
8391 const octet AV_PORTABLE_AUDIO = 0x07;
8392 const octet AV_CAR_AUDIO = 0x08;
8393 const octet AV_SETTOP_BOX = 0x09;
8394 const octet AV_HIFI = 0x0a;
8395 const octet AV_VCR = 0x0b;
8396 const octet AV_VIDEO_CAMERA = 0x0c;
8397 const octet AV_CAMCORDER = 0x0d;
8398 const octet AV_MONITOR = 0x0e;
8399 const octet AV_DISPLAY_AND_LOUDSPEAKER = 0x0f;
8400 const octet AV_VIDEO_CONFERENCING = 0x10;
8401 const octet AV_GAMING_TOY = 0x12;
8403 const octet PERIPHERAL_UNCATEGORIZED = 0;
8404 const octet PERIPHERAL_KEYBOARD = 0x10;
8405 const octet PERIPHERAL_POINTING_DEVICE = 0x20;
8406 const octet PERIPHERAL_KEYBOARD_AND_POINTING_DEVICE = 0x30;
8407 const octet PERIPHERAL_JOYSTICK = 0x01;
8408 const octet PERIPHERAL_GAMEPAD = 0x02;
8409 const octet PERIPHERAL_REMOTE_CONTROL = 0x03;
8410 const octet PERIPHERAL_SENSING_DEVICE = 0x04;
8411 const octet PERIPHERAL_DEGITIZER_TABLET = 0x05;
8412 const octet PERIPHERAL_CARD_READER = 0x06;
8413 const octet PERIPHERAL_DIGITAL_PEN = 0x07;
8414 const octet PERIPHERAL_HANDHELD_SCANNER = 0x08;
8415 const octet PERIPHERAL_HANDHELD_INPUT_DEVICE = 0x09;
8417 const octet IMAGING_UNCATEGORIZED = 0x00;
8418 const octet IMAGING_DISPLAY = 0x04;
8419 const octet IMAGING_CAMERA = 0x08;
8420 const octet IMAGING_SCANNER = 0x10;
8421 const octet IMAGING_PRINTER = 0x20;
8423 const octet WEARABLE_WRITST_WATCH = 0x01;
8424 const octet WEARABLE_PAGER = 0x02;
8425 const octet WEARABLE_JACKET = 0x03;
8426 const octet WEARABLE_HELMET = 0x04;
8427 const octet WEARABLE_GLASSES = 0x05;
8429 const octet TOY_ROBOT = 0x01;
8430 const octet TOY_VEHICLE = 0x02;
8431 const octet TOY_DOLL = 0x03;
8432 const octet TOY_CONTROLLER = 0x04;
8433 const octet TOY_GAME = 0x05;
8435 const octet HEALTH_UNDEFINED = 0x00;
8436 const octet HEALTH_BLOOD_PRESSURE_MONITOR = 0x01;
8437 const octet HEALTH_THERMOMETER = 0x02;
8438 const octet HEALTH_WEIGHING_SCALE = 0x03;
8439 const octet HEALTH_GLUCOSE_METER = 0x04;
8440 const octet HEALTH_PULSE_OXIMETER = 0x05;
8441 const octet HEALTH_PULSE_RATE_MONITOR = 0x06;
8442 const octet HEALTH_DATA_DISPLAY = 0x07;
8443 const octet HEALTH_STEP_COUNTER = 0x08;
8444 const octet HEALTH_BODY_COMPOSITION_ANALYZER = 0x09;
8445 const octet HEALTH_PEAK_FLOW_MONITOR = 0x0a;
8446 const octet HEALTH_MEDICATION_MONITOR = 0x0b;
8447 const octet HEALTH_KNEE_PROSTHESIS = 0x0c;
8448 const octet HEALTH_ANKLE_PROSTHESIS = 0x0d;
8451 [NoInterfaceObject] interface BluetoothClassDeviceService {
8452 const unsigned short LIMITED_DISCOVERABILITY = 0x0001;
8453 const unsigned short POSITIONING = 0x0008;
8454 const unsigned short NETWORKING = 0x0010;
8455 const unsigned short RENDERING = 0x0020;
8456 const unsigned short CAPTURING = 0x0040;
8457 const unsigned short OBJECT_TRANSFER = 0x0080;
8458 const unsigned short AUDIO = 0x0100;
8459 const unsigned short TELEPHONY = 0x0200;
8460 const unsigned short INFORMATION = 0x0400;
8463 [NoInterfaceObject] interface BluetoothServiceHandler {
8464 readonly attribute <ref>BluetoothUUID</ref> uuid;
8465 readonly attribute DOMString name;
8466 readonly attribute boolean isConnected;
8467 [TreatNonCallableAsNull] attribute <ref>BluetoothSocketSuccessCallback</ref>? onconnect raises(<ref>WebAPIException</ref>);
8469 void unregister(optional <ref>SuccessCallback</ref>? successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8472 [NoInterfaceObject] interface BluetoothProfileHandler {
8474 readonly attribute <ref>BluetoothProfileType</ref> profileType;
8479 [NoInterfaceObject] interface BluetoothHealthProfileHandler : <ref>BluetoothProfileHandler</ref> {
8481 void registerSinkApplication(unsigned short dataType, DOMString name, <ref>BluetoothHealthApplicationSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8483 void connectToSource(<ref>BluetoothDevice</ref> peer, <ref>BluetoothHealthApplication</ref> application, <ref>BluetoothHealthChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8488 [NoInterfaceObject] interface BluetoothHealthApplication {
8490 readonly attribute unsigned short dataType;
8492 readonly attribute DOMString name;
8494 [TreatNonCallableAsNull] attribute <ref>BluetoothHealthChannelSuccessCallback</ref>? onconnect raises(<ref>WebAPIException</ref>);
8496 void unregister(optional <ref>SuccessCallback</ref>? successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8501 [NoInterfaceObject] interface BluetoothHealthChannel {
8503 readonly attribute <ref>BluetoothDevice</ref> peer;
8505 readonly attribute <ref>BluetoothHealthChannelType</ref> channelType;
8507 readonly attribute <ref>BluetoothHealthApplication</ref> application;
8509 readonly attribute boolean isConnected;
8511 void close() raises(<ref>WebAPIException</ref>);
8513 unsigned long sendData(byte[] data) raises(<ref>WebAPIException</ref>);
8515 void setListener(<ref>BluetoothHealthChannelChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);
8517 void unsetListener() raises(<ref>WebAPIException</ref>);
8522 [Callback, NoInterfaceObject] interface BluetoothAdapterChangeCallback {
8523 void onstatechanged(boolean powered);
8524 void onnamechanged(DOMString name);
8525 void onvisibilitychanged(boolean visible);
8528 [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothDeviceSuccessCallback {
8529 void onsuccess(<ref>BluetoothDevice</ref> device);
8532 [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothDeviceArraySuccessCallback {
8533 void onsuccess(<ref>BluetoothDevice</ref>[] devices);
8536 [Callback, NoInterfaceObject] interface BluetoothDiscoverDevicesSuccessCallback {
8538 void ondevicefound(<ref>BluetoothDevice</ref> device);
8539 void ondevicedisappeared(<ref>BluetoothAddress</ref> address);
8540 void onfinished(<ref>BluetoothDevice</ref>[] foundDevices);
8543 [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothSocketSuccessCallback {
8544 void onsuccess(<ref>BluetoothSocket</ref> socket);
8547 [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothServiceSuccessCallback {
8548 void onsuccess(<ref>BluetoothServiceHandler</ref> handler);
8551 [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothHealthApplicationSuccessCallback {
8552 void onsuccess(<ref>BluetoothHealthApplication</ref> application);
8556 [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothHealthChannelSuccessCallback {
8557 void onsuccess(<ref>BluetoothHealthChannel</ref> channel);
8560 [Callback, NoInterfaceObject] interface BluetoothHealthChannelChangeCallback {
8561 void onmessage(byte[] data);
8569 This specification defines interfaces and methods to manage Bluetooth.
8573 The following Bluetooth functionalities are provided:
8577 Controls local Bluetooth device, that is, turn Bluetooth on/off, etc. </li>
8579 Sets visibility </li>
8581 Discovers nearby Bluetooth devices (Device discovery). </li>
8583 Gets bonded devices information. </li>
8585 Controls bonding. </li>
8587 Connects to a service on a remote device and exchanges data. </li>
8589 Registers a service (RFCOMM) on a local device, which can be consumed by remote devices to exchange data. </li>
8592 For more information on the Bluetooth features, see <a href="../../org.tizen.web.appprogramming/html/guide/communication_guide/bluetooth.htm">Bluetooth Guide</a>.
8598 <def-api-feature identifier="http://tizen.org/feature/network.bluetooth">
8602 To guarantee this application running on a device with Bluetooth feature, define below in the config file:
8608 <Typedef name="BluetoothAddress" id="::Bluetooth::BluetoothAddress">
8609 <webidl> typedef DOMString BluetoothAddress;</webidl>
8612 The address of a Bluetooth device.
8618 <Type type="DOMString"/>
8620 <Typedef name="BluetoothUUID" id="::Bluetooth::BluetoothUUID">
8621 <webidl> typedef DOMString BluetoothUUID;</webidl>
8624 The UUID of a Bluetooth service.
8630 <Type type="DOMString"/>
8632 <Enum name="BluetoothSocketState" id="::Bluetooth::BluetoothSocketState">
8633 <webidl> enum BluetoothSocketState { "CLOSED", "OPEN" };</webidl>
8636 The Bluetooth socket state.
8642 <EnumValue stringvalue="CLOSED">
8643 <webidl> "CLOSED</webidl>
8645 <EnumValue stringvalue="OPEN">
8646 <webidl> "OPEN</webidl>
8649 <Enum name="BluetoothProfileType" id="::Bluetooth::BluetoothProfileType">
8650 <webidl> enum BluetoothProfileType { "HEALTH" };</webidl>
8653 The Bluetooth profile.
8659 <EnumValue stringvalue="HEALTH">
8660 <webidl> "HEALTH</webidl>
8663 <Enum name="BluetoothHealthChannelType" id="::Bluetooth::BluetoothHealthChannelType">
8664 <webidl> enum BluetoothHealthChannelType { "RELIABLE", "STREAMING" };</webidl>
8667 The channel type of health device profile.
8673 <EnumValue stringvalue="RELIABLE">
8674 <webidl> "RELIABLE</webidl>
8676 <EnumValue stringvalue="STREAMING">
8677 <webidl> "STREAMING</webidl>
8680 <Interface name="BluetoothManagerObject" id="::Bluetooth::BluetoothManagerObject">
8681 <webidl> [NoInterfaceObject] interface BluetoothManagerObject {
8682 readonly attribute <ref>BluetoothManager</ref> bluetooth;
8686 This interface defines what is instantiated by the <em>Tizen</em> object from the Tizen platform.
8690 There is a <em>tizen.bluetooth</em> object that allows access to the Bluetooth API.
8697 <ExtendedAttributeList>
8698 <ExtendedAttribute name="NoInterfaceObject">
8699 <webidl>NoInterfaceObject</webidl>
8700 </ExtendedAttribute>
8701 </ExtendedAttributeList>
8702 <Attribute readonly="readonly" name="bluetooth" id="::Bluetooth::BluetoothManagerObject::bluetooth">
8703 <webidl> readonly attribute <ref>BluetoothManager</ref> bluetooth;</webidl>
8704 <Type name="BluetoothManager"/>
8707 <Implements name1="Tizen" name2="BluetoothManagerObject">
8708 <webidl> <ref>Tizen</ref> implements <ref>BluetoothManagerObject</ref>;</webidl>
8710 <Interface name="BluetoothManager" id="::Bluetooth::BluetoothManager">
8711 <webidl> [NoInterfaceObject] interface BluetoothManager {
8712 readonly attribute <ref>BluetoothClassDeviceMajor</ref> deviceMajor;
8713 readonly attribute <ref>BluetoothClassDeviceMinor</ref> deviceMinor;
8714 readonly attribute <ref>BluetoothClassDeviceService</ref> deviceService;
8715 <ref>BluetoothAdapter</ref> getDefaultAdapter() raises(<ref>WebAPIException</ref>);
8719 This interface provides access to the <em>BluetoothAdapter</em> object.
8725 <ExtendedAttributeList>
8726 <ExtendedAttribute name="NoInterfaceObject">
8727 <webidl>NoInterfaceObject</webidl>
8728 </ExtendedAttribute>
8729 </ExtendedAttributeList>
8730 <Attribute readonly="readonly" name="deviceMajor" id="::Bluetooth::BluetoothManager::deviceMajor">
8731 <webidl> readonly attribute <ref>BluetoothClassDeviceMajor</ref> deviceMajor;</webidl>
8734 An attribute to access to a major device class identifiers of Bluetooth class of device (CoD).
8740 <Type name="BluetoothClassDeviceMajor"/>
8742 <Attribute readonly="readonly" name="deviceMinor" id="::Bluetooth::BluetoothManager::deviceMinor">
8743 <webidl> readonly attribute <ref>BluetoothClassDeviceMinor</ref> deviceMinor;</webidl>
8746 An attribute to access to a minor device class identifiers of Bluetooth class of device (CoD).
8752 <Type name="BluetoothClassDeviceMinor"/>
8754 <Attribute readonly="readonly" name="deviceService" id="::Bluetooth::BluetoothManager::deviceService">
8755 <webidl> readonly attribute <ref>BluetoothClassDeviceService</ref> deviceService;</webidl>
8758 Accessor to major service class identifiers of Bluetooth class of device (CoD).
8764 <Type name="BluetoothClassDeviceService"/>
8766 <Operation name="getDefaultAdapter" id="::Bluetooth::BluetoothManager::getDefaultAdapter">
8767 <webidl> <ref>BluetoothAdapter</ref> getDefaultAdapter() raises(<ref>WebAPIException</ref>);</webidl>
8770 Gets the default local Bluetooth adapter.
8779 http://tizen.org/privilege/bluetooth.gap
8782 var adapter = tizen.bluetooth.getDefaultAdapter() ;
8784 console.log (err.name +": " + err.message);
8788 <Type name="BluetoothAdapter">
8791 BluetoothAdapter The local <em>BluetoothAdapter </em>object.
8797 <RaiseException name="WebAPIException">
8800 with error type SecurityError, if the application does not have the privilege to call this method.
8803 with error type NotSupportedError, if this feature is not supported.
8806 with error type UnknownError, if any other error occurs.
8813 <Interface name="BluetoothAdapter" id="::Bluetooth::BluetoothAdapter">
8814 <webidl> [NoInterfaceObject] interface BluetoothAdapter {
8815 readonly attribute DOMString name;
8816 readonly attribute <ref>BluetoothAddress</ref> address;
8817 readonly attribute boolean powered;
8818 readonly attribute boolean visible;
8820 void setName(DOMString name,
8821 optional <ref>SuccessCallback</ref>? successCallback,
8822 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8824 void setPowered(boolean state,
8825 optional <ref>SuccessCallback</ref>? successCallback,
8826 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8828 void setVisible(boolean mode,
8829 optional <ref>SuccessCallback</ref>? successCallback,
8830 optional <ref>ErrorCallback</ref>? errorCallback,
8831 optional unsigned short? timeout) raises(<ref>WebAPIException</ref>);
8833 void setChangeListener(<ref>BluetoothAdapterChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);
8835 void unsetChangeListener() raises(<ref>WebAPIException</ref>);
8837 void discoverDevices(<ref>BluetoothDiscoverDevicesSuccessCallback</ref> successCallback,
8838 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8840 void stopDiscovery(optional <ref>SuccessCallback</ref>? successCallback,
8841 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8843 void getKnownDevices(<ref>BluetoothDeviceArraySuccessCallback</ref> successCallback,
8844 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8849 void getDevice(<ref>BluetoothAddress</ref> address,
8850 <ref>BluetoothDeviceSuccessCallback</ref> successCallback,
8851 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8856 void createBonding(<ref>BluetoothAddress</ref> address,
8857 <ref>BluetoothDeviceSuccessCallback</ref> successCallback,
8858 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8860 void destroyBonding(<ref>BluetoothAddress</ref> address,
8861 optional <ref>SuccessCallback</ref>? successCallback,
8862 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8866 void registerRFCOMMServiceByUUID(<ref>BluetoothUUID</ref> uuid,
8868 <ref>BluetoothServiceSuccessCallback</ref> successCallback,
8869 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8871 <ref>BluetoothProfileHandler</ref> getBluetoothProfileHandler(<ref>BluetoothProfileType</ref> profileType) raises(<ref>WebAPIException</ref>);
8876 This interface provides access to control the device's Bluetooth adapter.
8880 This interface offers methods to control local Bluetooth behavior, such as:
8884 Turning on/off Bluetooth radio </li>
8886 Changing device visibility </li>
8888 Scanning for remote devices </li>
8890 Accessing known devices </li>
8892 Registering a service in the device service database </li>
8899 <ExtendedAttributeList>
8900 <ExtendedAttribute name="NoInterfaceObject">
8901 <webidl>NoInterfaceObject</webidl>
8902 </ExtendedAttribute>
8903 </ExtendedAttributeList>
8904 <Attribute readonly="readonly" name="name" id="::Bluetooth::BluetoothAdapter::name">
8905 <webidl> readonly attribute DOMString name;</webidl>
8908 An attribute to store the readable name of the Bluetooth adapter.
8914 // Access adapter name
8915 var adapter = tizen.bluetooth.getDefaultAdapter();
8916 console.log ("Bluetooth adapter name: " + adapter.name);
8919 <Type type="DOMString"/>
8921 <Attribute readonly="readonly" name="address" id="::Bluetooth::BluetoothAdapter::address">
8922 <webidl> readonly attribute <ref>BluetoothAddress</ref> address;</webidl>
8925 An attribute to store the unique hardware address of the Bluetooth adapter, also known as the MAC address.
8930 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
8931 console.log("Bluetooth device address: " + adapter.address);
8934 <Type name="BluetoothAddress"/>
8936 <Attribute readonly="readonly" name="powered" id="::Bluetooth::BluetoothAdapter::powered">
8937 <webidl> readonly attribute boolean powered;</webidl>
8940 An attribute to indicate the current state of the Bluetooth adapter.
8941 This attribute holds one of the following 2 values:
8946 <var>true</var> - If Bluetooth adapter is currently on </li>
8948 <var>false</var> - If Bluetooth adapter is currently off </li>
8954 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
8955 console.log("Bluetooth state: " + (adapter.powered ? "On" : "Off"));
8958 <Type type="boolean"/>
8960 <Attribute readonly="readonly" name="visible" id="::Bluetooth::BluetoothAdapter::visible">
8961 <webidl> readonly attribute boolean visible;</webidl>
8964 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.
8969 <Code> // Queries current visible state
8970 var adapter = tizen.bluetooth.getDefaultAdapter();
8971 console.log ("Bluetooth Visibility: " + (adapter.visible ? "On" : "Off"));
8974 <Type type="boolean"/>
8976 <Operation name="setName" id="::Bluetooth::BluetoothAdapter::setName">
8977 <webidl> void setName(DOMString name,
8978 optional <ref>SuccessCallback</ref>? successCallback,
8979 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
8982 Sets the local Bluetooth adapter name.
8986 Sends a request to Bluetooth hardware to change the name of the local Bluetooth adapter to <em>name</em>.
8989 The ErrorCallback is launched with these error types:
8993 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
8995 ServiceNotAvailableError: If a Bluetooth device is turned off. </li>
8997 UnknownError: In any other error case. </li>
9007 http://tizen.org/privilege/bluetooth.admin
9009 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9011 function changeName(newName)
9013 if(adapter.name != newName) {
9014 // initiate change name
9015 adapter.setName(newName, function() {
9016 console.log("Adapter name changed to " + adapter.name);
9019 console.log("Failed to change name: " + e.message);
9024 changeName("myDevice");
9029 <Argument name="name">
9035 <Type type="DOMString"/>
9037 <Argument optional="optional" name="successCallback">
9040 The method to invoke when the asynchronous call completes successfully.
9043 <Type name="SuccessCallback" nullable="nullable"/>
9045 <Argument optional="optional" name="errorCallback">
9048 The method to invoke when an error occurs.
9051 <Type name="ErrorCallback" nullable="nullable"/>
9055 <RaiseException name="WebAPIException">
9058 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
9061 with error type SecurityError, if the application does not have the privilege to call this method.
9064 with error type NotSupportedError, if this feature is not supported.
9070 <Operation name="setPowered" id="::Bluetooth::BluetoothAdapter::setPowered">
9071 <webidl> void setPowered(boolean state,
9072 optional <ref>SuccessCallback</ref>? successCallback,
9073 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
9076 Sets the state of a Bluetooth adapter to on or off by sending a request to Bluetooth hardware to change the power state.
9077 For most Bluetooth actions, the Bluetooth adapter must be powered on.
9081 The ErrorCallback is launched with these error names:
9085 ServiceNotAvailableError - If a Bluetooth device is busy. </li>
9087 UnknownError - If any other error occurs. </li>
9097 http://tizen.org/privilege/bluetooth.admin
9099 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9103 // If adapter is not powered on
9104 if(!adapter.powered) {
9105 // Initiates power on
9106 adapter.setPowered(true, function() {
9107 console.log("Bluetooth powered on success.");
9110 console.log("Failed to power on Bluetooth: " + e.message);
9118 if(adapter.powered) {
9119 // Initiates power off
9120 adapter.setPowered(false, function() {
9121 console.log("Bluetooth powered off successfully.");
9124 console.log("Failed to power off Bluetooth: " + e.message);
9132 <Argument name="state">
9135 The state to set: <var>true</var> to power on Bluetooth, <var>false</var> to power it off.
9138 <Type type="boolean"/>
9140 <Argument optional="optional" name="successCallback">
9143 The method to invoke on successful Bluetooth activation/deactivation.
9146 <Type name="SuccessCallback" nullable="nullable"/>
9148 <Argument optional="optional" name="errorCallback">
9151 The method to invoke on failure of a Bluetooth activation/deactivation.
9154 <Type name="ErrorCallback" nullable="nullable"/>
9158 <RaiseException name="WebAPIException">
9161 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
9164 with error type SecurityError, if the application does not have the privilege to call this method.
9167 with error type NotSupportedError, if this feature is not supported.
9173 <Operation name="setVisible" id="::Bluetooth::BluetoothAdapter::setVisible">
9174 <webidl> void setVisible(boolean mode,
9175 optional <ref>SuccessCallback</ref>? successCallback,
9176 optional <ref>ErrorCallback</ref>? errorCallback,
9177 optional unsigned short? timeout) raises(<ref>WebAPIException</ref>);</webidl>
9180 Sets the local device visibility by sending a request to a Bluetooth hardware to change the device visible state to <em>mode</em>.
9181 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.
9185 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.
9188 The ErrorCallback is launched with these error types:
9192 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
9194 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
9196 UnknownError - If any other error case occurs. </li>
9206 http://tizen.org/privilege/bluetoothmanager
9208 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9212 if (adapter.visible == false) {
9214 adapter.setVisible(true,
9215 function() { console.log ('Device is visible to other devices for 3 minutes.'); },
9216 function(e) { console.log ('Error: ' + e.message + '(' + e.name + ')'); });
9219 console.log("Device is already in discoverable mode.");
9225 if (adapter.visible) {
9227 adapter.setVisible(false,
9228 function() { console.log('Device is in-visible now.'); },
9229 function(e) { console.log ('Error: ' + e.message + '(' + e.name + ')'); });
9232 console.log("Device is already in invisible mode.");
9239 <Argument name="mode">
9242 The boolean value to set visibility.
9243 It can either be set to: <var>true</var> - to show the device or <var>false</var> - to hide the device.
9246 <Type type="boolean"/>
9248 <Argument optional="optional" name="successCallback">
9251 The method to invoke when an asynchronous call completes successfully.
9254 <Type name="SuccessCallback" nullable="nullable"/>
9256 <Argument optional="optional" name="errorCallback">
9259 The method to invoke when an error occurs.
9262 <Type name="ErrorCallback" nullable="nullable"/>
9264 <Argument optional="optional" name="timeout">
9267 The visible timeout in seconds, used only when <em>mode</em> is <var>true</var>.
9270 <Type type="unsigned short" nullable="nullable"/>
9274 <RaiseException name="WebAPIException">
9277 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
9280 with error type SecurityError, if the application does not have the privilege to call this method.
9283 with error type NotSupportedError, if this feature is not supported.
9289 <Operation name="setChangeListener" id="::Bluetooth::BluetoothAdapter::setChangeListener">
9290 <webidl> void setChangeListener(<ref>BluetoothAdapterChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);</webidl>
9293 Sets the listener to receive notifications about changes of Bluetooth adapter.
9298 <Code> var changeListener = {
9299 onstatechanged: function(powered) {
9300 console.log ("Power state is changed into: " + powered);
9302 onnamechanged: function(name) {
9303 console.log("Name is changed to: " + name);
9305 onvisibilitychanged: function(visible) {
9306 console.log("Visibility is changed into: " + visible);
9310 var adapter = tizen.bluetooth.getDefaultAdapter();
9311 adapter.setChangeListener(changeListener);
9316 <Argument name="listener">
9319 The Bluetooth Adapter event listener to set.
9322 <Type name="BluetoothAdapterChangeCallback"/>
9326 <RaiseException name="WebAPIException">
9329 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
9332 with error type SecurityError, if this functionality is not allowed.
9335 with error type UnknownError, if any other error occurs.
9341 <Operation name="unsetChangeListener" id="::Bluetooth::BluetoothAdapter::unsetChangeListener">
9342 <webidl> void unsetChangeListener() raises(<ref>WebAPIException</ref>);</webidl>
9345 Unsets the listener, so stop receiving notifications about changes of Bluetooth adapter.
9350 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9352 var changeListener = {
9353 onstatechanged: function(powered) {
9354 console.log ("Power state is changed into: " + powered);
9356 adapter.unsetChangeListener();
9358 onnamechanged: function(name) {
9359 console.log("Name is changed to: " + name);
9361 onvisibilitychanged: function(visible) {
9362 console.log("Visibility is changed into: " + visible);
9366 adapter.setChangeListener(changeListener);
9372 <RaiseException name="WebAPIException">
9375 with error type SecurityError, if this functionality is not allowed.
9378 with error type UnknownError, if any other error occurs.
9384 <Operation name="discoverDevices" id="::Bluetooth::BluetoothAdapter::discoverDevices">
9385 <webidl> void discoverDevices(<ref>BluetoothDiscoverDevicesSuccessCallback</ref> successCallback,
9386 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
9389 Discovers nearby Bluetooth devices if any, that is, devices within proximity to the local device.
9393 This method initiates the device discovery process. Depending on the progress of this process the following methods are invoked:
9397 <em>BluetoothDiscoverDevicesSuccessCallback.onstarted()</em> - when a discovery process starts successfully. </li>
9399 <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>
9401 <em>BluetoothDiscoverDevicesSuccessCallback.ondevicedisappeared()</em> - when a device goes out of proximity and this method is invoked with the address of the device. </li>
9403 <em>BluetoothDiscoverDevicesSuccessCallback.onfinished()</em> - when a discovery process is completed. </li>
9406 A discovery process can be canceled anytime, by calling <em>stopDiscovery() </em>on the <em>BluetoothAdapter</em>.
9409 The ErrorCallback is launched with these error types:
9413 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
9415 UnknownError - If any other error occurs. </li>
9425 http://tizen.org/privilege/bluetooth.gap
9427 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9429 function startDiscovery() {
9431 var discoverDevicesSuccessCallback = {
9432 onstarted: function() {
9433 console.log ("Device discovery started...");
9435 ondevicefound: function(device) {
9436 console.log("Found device - name: " + device.name + ", Address: "+ device.address);
9438 ondevicedisappeared: function(address) {
9439 console.log("Device disappeared: " + address);
9441 onfinished: function(devices) {
9442 console.log("Found Devices");
9443 for (var i = 0; i < devices.length; i++) {
9444 console.log("Name: " + devices[i].name + ", Address: " + devices[i].address);
9446 console.log("Total: " + devices.length);
9450 // Starts searching for nearby devices, for about 12 sec.
9451 adapter.discoverDevices(discoverDevicesSuccessCallback, function(e){
9452 console.log ("Failed to search devices: " + e.message + "(" + e.name + ")");
9456 function onSetPoweredError(e) {
9457 console.log ("Could not turn on device, reason: " + e.message + "(" + e.name + ")");
9460 adapter.setPowered(true, startDiscovery, onSetPoweredError);
9465 <Argument name="successCallback">
9468 The method to invoke when an asynchronous call completes successfully.
9471 <Type name="BluetoothDiscoverDevicesSuccessCallback"/>
9473 <Argument optional="optional" name="errorCallback">
9476 The method to invoke when an error occurs.
9479 <Type name="ErrorCallback" nullable="nullable"/>
9483 <RaiseException name="WebAPIException">
9486 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
9489 with error type SecurityError, if the application does not have the privilege to call this method.
9492 with error type NotSupportedError, if this feature is not supported.
9498 <Operation name="stopDiscovery" id="::Bluetooth::BluetoothAdapter::stopDiscovery">
9499 <webidl> void stopDiscovery(optional <ref>SuccessCallback</ref>? successCallback,
9500 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
9503 Stops an active device discovery session.
9507 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.
9510 The ErrorCallback is launched with these error types:
9514 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
9516 UnknownError - If any other error occurs. </li>
9526 http://tizen.org/privilege/bluetooth.gap
9528 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9530 // Calls this method whenever user finds one of the device
9531 function cancelDiscovery() {
9532 adapter.stopDiscovery(function() {
9533 console.log("Stop discovery success.");
9536 console.log("Error while stopDiscovery:" + e.message);
9540 function startDiscovery() {
9542 var discoverDevicesSuccessCallback = {
9543 onstarted: function() {
9544 console.log ("Device discovery started...") ;
9546 ondevicefound: function(device) {
9547 console.log("Found device - name: " + device.name + ", Address: "+ device.address);
9548 // Shows the device to user to check if this is the device user is looking for.
9549 // For example, add this to list view.
9553 ondevicedisappeared: function(address) {
9554 console.log("Device disappeared: " + address);
9555 // Removes from list, as it is no longer valid.
9557 onfinished: function(devices) {
9558 console.log("Found Devices");
9559 for (var i = 0; i < devices.length; i++) {
9560 console.log("Name: " + devices[i].name + ", Address: " + devices[i].address);
9562 console.log("Total: " + devices.length);
9566 // Starts searching for nearby devices, for about 12 sec.
9567 adapter.discoverDevices(discoverDevicesSuccessCallback, function(e){
9568 console.log ("Failed to search devices: " + e.message + "(" + e.name + ")");
9572 function onSetPoweredError(e) {
9573 console.log ("Could not turn on device, reason: " + e.message + "(" + e.name + ")");
9576 adapter.setPowered(true, startDiscovery, onSetPoweredError);
9581 <Argument optional="optional" name="successCallback">
9584 The method to invoke when an asynchronous call completes successfully.
9587 <Type name="SuccessCallback" nullable="nullable"/>
9589 <Argument optional="optional" name="errorCallback">
9592 The method to invoke when an error occurs.
9595 <Type name="ErrorCallback" nullable="nullable"/>
9599 <RaiseException name="WebAPIException">
9602 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
9605 with error type SecurityError, if the application does not have the privilege to call this method.
9608 with error type NotSupportedError, if this feature is not supported.
9614 <Operation name="getKnownDevices" id="::Bluetooth::BluetoothAdapter::getKnownDevices">
9615 <webidl> void getKnownDevices(<ref>BluetoothDeviceArraySuccessCallback</ref> successCallback,
9616 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
9619 Gets all the known devices that have information stored in the local Bluetooth adapter.
9623 A known device is one of the following:
9627 a bonded device </li>
9629 a device found in last inquiry process </li>
9632 On success, it returns the list of currently known devices through <em>BluetoothDeviceArraySuccessCallback</em>.
9635 The ErrorCallback is launched with these error types:
9639 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
9641 UnknownError - If any other error occurs. </li>
9651 http://tizen.org/privilege/bluetooth.gap
9653 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9655 function onGotDevices(devices) {
9656 console.log("Devices");
9657 for (var i = 0; i < devices.length; i++) {
9658 console.log(" Name: " + devices[i].name + ", Address: " + devices[i].address);
9660 console.log("Total: " + devices.length);
9663 function onError(e) {
9664 console.log ("Error: " + e.message);
9667 function onBluetoothsetPowered() {
9668 adapter.getKnownDevices(onGotDevices, onError);
9671 // Turns on Bluetooth
9672 adapter.setPowered(true, onBluetoothsetPowered);
9677 <Argument name="successCallback">
9680 The method to invoke at retrieval of a list of Bluetooth devices that were bonded (paired) to the local Bluetooth adapter.
9683 <Type name="BluetoothDeviceArraySuccessCallback"/>
9685 <Argument optional="optional" name="errorCallback">
9688 The method to invoke in case of failure in finding any bonded devices.
9691 <Type name="ErrorCallback" nullable="nullable"/>
9695 <RaiseException name="WebAPIException">
9698 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter
9701 with error type SecurityError, if the application does not have the privilege to call this method.
9704 with error type NotSupportedError, if this feature is not supported.
9710 <Operation name="getDevice" id="::Bluetooth::BluetoothAdapter::getDevice">
9711 <webidl> void getDevice(<ref>BluetoothAddress</ref> address,
9712 <ref>BluetoothDeviceSuccessCallback</ref> successCallback,
9713 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
9716 Gets the <em>BluetoothDevice</em> object for a given device hardware address.
9720 This method returns device information stored in the local Bluetooth adapter for the specified device <em>address</em> through
9721 BluetoothDeviceSuccessCallback.
9722 A valid hardware address must be passed, such as "35:F4:59:D1:7A:03".
9725 The ErrorCallback is launched with these error types:
9729 NotFoundError - If there is no device with the given address. </li>
9731 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
9733 UnknownError - If any other error occurs. </li>
9743 http://tizen.org/privilege/bluetooth.gap
9745 <Code> function gotDeviceInfo(device) {
9746 console.log("Device Name: " + device.name);
9747 console.log("Device Address: " + device.address);
9748 console.log("Device Class: " + device.deviceClass.major);
9749 console.log("Is Bonded: " + (device.isBonded ? "Yes" : "No"));
9752 function onError(e) {
9753 console.log ("Could not get device info:" + e.message);
9756 var adapter = tizen.bluetooth.getDefaultAdapter();
9757 adapter.getDevice("35:F4:59:D1:7A:03", gotDeviceInfo, onError);
9762 <Argument name="address">
9765 The address of a remote Bluetooth device to get.
9768 <Type name="BluetoothAddress"/>
9770 <Argument name="successCallback">
9773 The method to invoke when an asynchronous call completes successfully.
9776 <Type name="BluetoothDeviceSuccessCallback"/>
9778 <Argument optional="optional" name="errorCallback">
9781 The method to invoke when an error occurs.
9784 <Type name="ErrorCallback" nullable="nullable"/>
9788 <RaiseException name="WebAPIException">
9791 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter
9794 with error type SecurityError, if the application does not have the privilege to call this method.
9797 with error type NotSupportedError, if this feature is not supported.
9803 <Operation name="createBonding" id="::Bluetooth::BluetoothAdapter::createBonding">
9804 <webidl> void createBonding(<ref>BluetoothAddress</ref> address,
9805 <ref>BluetoothDeviceSuccessCallback</ref> successCallback,
9806 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
9809 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.
9813 If the bonding process is successful, the device information is sent in <em>successCallback</em>.
9816 The ErrorCallback is launched with these error types:
9820 NotFoundError - If there is no device with the given address. </li>
9822 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
9824 UnknownError - If any other error occurs. </li>
9834 http://tizen.org/privilege/bluetooth.gap
9836 <Code> function onBondingSuccess(device) {
9837 console.log("Device Name:" + device.name);
9838 console.log("Device Address:" + device.address);
9839 console.log("Device Service UUIDs:" + device.uuids.join("\n"));
9842 function onError(e) {
9843 console.log ("Could not create bonding, reason:" + e.message);
9846 var adapter = tizen.bluetooth.getDefaultAdapter();
9847 adapter.createBonding("35:F4:59:D1:7A:03", onBondingSuccess, onError);
9852 <Argument name="address">
9855 The MAC address of remote Bluetooth address to bond with.
9858 <Type name="BluetoothAddress"/>
9860 <Argument name="successCallback">
9863 The method to invoke when an asynchronous call completes successfully.
9866 <Type name="BluetoothDeviceSuccessCallback"/>
9868 <Argument optional="optional" name="errorCallback">
9871 The method to invoke when an error occurs.
9874 <Type name="ErrorCallback" nullable="nullable"/>
9878 <RaiseException name="WebAPIException">
9881 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
9884 with error type SecurityError, if the application does not have the privilege to call this method.
9887 with error type NotSupportedError, if this feature is not supported.
9893 <Operation name="destroyBonding" id="::Bluetooth::BluetoothAdapter::destroyBonding">
9894 <webidl> void destroyBonding(<ref>BluetoothAddress</ref> address,
9895 optional <ref>SuccessCallback</ref>? successCallback,
9896 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
9899 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.
9903 The ErrorCallback is launched with these error types:
9907 NotFoundError - If there is no device with the given address. </li>
9909 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
9911 UnknownError - If any other error occurs. </li>
9921 http://tizen.org/privilege/bluetooth.gap
9923 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9925 function gotDevice(device) {
9926 if (device.isBonded) {
9927 // Initiates destroying bonding
9928 adapter.destroyBonding(device.address, function() {
9929 console.log("Succeeded to destroy the bond success with:" + device.address);
9932 console.log("Failed to destroy the bond with " + device.address + ", reason: " + e.message);
9937 var deviceAddress = "35:F4:59:D1:7A:03";
9938 adapter.getDevice(deviceAddress, gotDevice, function(e) {
9939 console.log("Failed to get device info for " + deviceAddress + ", reason: " + e.message);
9945 <Argument name="address">
9948 The address of a bonded device.
9951 <Type name="BluetoothAddress"/>
9953 <Argument optional="optional" name="successCallback">
9956 The method to invoke when an asynchronous call completes successfully.
9959 <Type name="SuccessCallback" nullable="nullable"/>
9961 <Argument optional="optional" name="errorCallback">
9964 The method to invoke when an error occurs.
9967 <Type name="ErrorCallback" nullable="nullable"/>
9971 <RaiseException name="WebAPIException">
9974 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter
9977 with error type SecurityError, if the application does not have the privilege to call this method.
9980 with error type NotSupportedError, if this feature is not supported.
9986 <Operation name="registerRFCOMMServiceByUUID" id="::Bluetooth::BluetoothAdapter::registerRFCOMMServiceByUUID">
9987 <webidl> void registerRFCOMMServiceByUUID(<ref>BluetoothUUID</ref> uuid,
9989 <ref>BluetoothServiceSuccessCallback</ref> successCallback,
9990 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
9993 Registers a service record in the device service record database with the specified <em>uuid</em>, <em>name</em>.
9997 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.
9998 The service handler can be used to be notified on client connections or to unregister the service.
9999 User interaction is mandatory to connect to a registered service.
10002 If any client(remote device) connects to this service, then <em>BluetoothServiceHandler.onconnect()</em> is invoked with <em>BluetoothSocket</em> object.
10005 <em>BluetoothServiceHandler.unregister()</em> can be used to unregister the service record from the device service database and stop listening for client connections.
10008 The ErrorCallback is launched with these error types:
10012 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
10014 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
10016 UnknownError - If any other error occurs. </li>
10026 http://tizen.org/privilege/bluetooth.spp
10028 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10029 // Holds currently registered service record
10030 var chatServiceHandler = null;
10031 // Holds currently open socket
10032 var serviceSocket = null;
10034 function chatServiceSuccessCb(recordHandler) {
10035 console.log("Chat service registration succeeds!");
10036 chatServiceHandler = recordHandler;
10037 recordHandler.onconnect = function(socket) {
10038 console.log("Client connected: " + socket.peer.name + "," + socket.peer.address);
10039 serviceSocket = socket;
10040 // Messages received from remote device
10041 socket.onmessage = function() {
10042 var data = socket.readData();
10043 // Handles message code goes here
10047 socket.onclose = function() {
10048 console.log('The socket is closed.');
10049 serviceSocket = null;
10054 function publishChatService()
10056 var CHAT_SERVICE_UUID = "5BCE9431-6C75-32AB-AFE0-2EC108A30860";
10057 adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCb,
10060 console.log( "Could not register service record, Error: " + e.message);
10064 function unregisterChatService()
10066 if (chatServiceHandler != null) {
10067 chatServiceHandler.unregister(function() {
10068 console.log("Chat service is unregistered");
10069 chatServiceHandler = null;
10071 console.log("Failed to unregister service: " + e.message);
10077 <Type type="void"/>
10079 <Argument name="uuid">
10082 The UUID of the service, to which clients connects.
10085 <Type name="BluetoothUUID"/>
10087 <Argument name="name">
10090 The Name of a service.
10093 <Type type="DOMString"/>
10095 <Argument name="successCallback">
10098 The method to invoke on successful service registration.
10101 <Type name="BluetoothServiceSuccessCallback"/>
10103 <Argument optional="optional" name="errorCallback">
10106 The method to invoke when an error occurs.
10109 <Type name="ErrorCallback" nullable="nullable"/>
10113 <RaiseException name="WebAPIException">
10116 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
10119 with error type SecurityError, if the application does not have the privilege to call this method.
10122 with error type NotSupportedError, if this feature is not supported.
10128 <Operation name="getBluetoothProfileHandler" id="::Bluetooth::BluetoothAdapter::getBluetoothProfileHandler">
10129 <webidl> <ref>BluetoothProfileHandler</ref> getBluetoothProfileHandler(<ref>BluetoothProfileType</ref> profileType) raises(<ref>WebAPIException</ref>);</webidl>
10132 Gets the profile handler for the given type.
10137 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10138 var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
10141 <Type name="BluetoothProfileHandler"/>
10143 <Argument name="profileType">
10146 The type of Bluetooth Profile.
10149 <Type name="BluetoothProfileType"/>
10153 <RaiseException name="WebAPIException">
10156 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
10159 with error type NotSupportedError, if this feature is not supported.
10162 with error type UnknownError, if any other error occurs.
10169 <Interface name="BluetoothDevice" id="::Bluetooth::BluetoothDevice">
10170 <webidl> [NoInterfaceObject] interface BluetoothDevice {
10171 readonly attribute DOMString name;
10172 readonly attribute <ref>BluetoothAddress</ref> address;
10173 readonly attribute <ref>BluetoothClass</ref> deviceClass;
10174 readonly attribute boolean isBonded;
10175 readonly attribute boolean isTrusted;
10176 readonly attribute boolean isConnected;
10177 readonly attribute <ref>BluetoothUUID</ref>[] uuids;
10179 void connectToServiceByUUID(<ref>BluetoothUUID</ref> uuid,
10180 <ref>BluetoothSocketSuccessCallback</ref> successCallback,
10181 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
10185 This interface represents a remote Bluetooth device.
10189 A <em>BluetoothDevice</em> object can be retrieved using one of the following APIs:
10193 BluetoothAdapter.getDevice() </li>
10195 BluetoothAdapter.getKnownDevices() </li>
10197 BluetoothAdapter.discoverDevices() </li>
10199 BluetoothAdapter.createBonding() </li>
10206 <ExtendedAttributeList>
10207 <ExtendedAttribute name="NoInterfaceObject">
10208 <webidl>NoInterfaceObject</webidl>
10209 </ExtendedAttribute>
10210 </ExtendedAttributeList>
10211 <Attribute readonly="readonly" name="name" id="::Bluetooth::BluetoothDevice::name">
10212 <webidl> readonly attribute DOMString name;</webidl>
10215 An attribute to store the readable name of this remote device.
10220 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10221 adapter.getDevice("11:22:33:44:55:66", function(device) {
10222 console.log("Device Name: " + device.name);
10226 <Type type="DOMString"/>
10228 <Attribute readonly="readonly" name="address" id="::Bluetooth::BluetoothDevice::address">
10229 <webidl> readonly attribute <ref>BluetoothAddress</ref> address;</webidl>
10232 An attribute to store the hardware address of this remote device.
10237 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10238 adapter.getDevice("11:22:33:44:55:66", function(device) {
10239 console.log("Device Address: " + device.address);
10243 <Type name="BluetoothAddress"/>
10245 <Attribute readonly="readonly" name="deviceClass" id="::Bluetooth::BluetoothDevice::deviceClass">
10246 <webidl> readonly attribute <ref>BluetoothClass</ref> deviceClass;</webidl>
10249 An attribute to indicate a device class, which represents the type of the device and the services it provides.
10254 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10255 adapter.getDevice("11:22:33:44:55:66", function(device) {
10256 console.log("Device Major Class: " + device.deviceClass.major);
10260 <Type name="BluetoothClass"/>
10262 <Attribute readonly="readonly" name="isBonded" id="::Bluetooth::BluetoothDevice::isBonded">
10263 <webidl> readonly attribute boolean isBonded;</webidl>
10266 An attribute to check the bond state of this remote device with the local device.
10271 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10272 adapter.getDevice("11:22:33:44:55:66", function(device) {
10273 console.log("Is bonded: " + (device.isBonded ? "Yes" : "No"));
10277 <Type type="boolean"/>
10279 <Attribute readonly="readonly" name="isTrusted" id="::Bluetooth::BluetoothDevice::isTrusted">
10280 <webidl> readonly attribute boolean isTrusted;</webidl>
10283 An attribute to check whether the local device recognizes this remote device as a trusted device or not.
10288 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10289 adapter.getDevice("11:22:33:44:55:66", function(device) {
10290 console.log("Is trusted: " + (device.isTrusted ? "Yes" : "No"));
10294 <Type type="boolean"/>
10296 <Attribute readonly="readonly" name="isConnected" id="::Bluetooth::BluetoothDevice::isConnected">
10297 <webidl> readonly attribute boolean isConnected;</webidl>
10300 An attribute to check the connection state of this remote device with the local device.
10305 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10306 adapter.getDevice("11:22:33:44:55:66", function(device) {
10307 console.log("Is connected: " + (device.isConnected ? "Yes" : "No"));
10311 <Type type="boolean"/>
10313 <Attribute readonly="readonly" name="uuids" id="::Bluetooth::BluetoothDevice::uuids">
10314 <webidl> readonly attribute <ref>BluetoothUUID</ref>[] uuids;</webidl>
10317 An attribute to store the list of 128 bit service UUIDs available on this remote device.
10322 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10323 var CHAT_SERVICE_UUID = "5BCE9431-6C75-32AB-AFE0-2EC108A30860";
10324 adapter.getDevice("11:22:33:44:55:66", function(device) {
10325 var uuids = device.uuids;
10326 var services = "";
10327 for (var i = 0; i < uuids.length; i++) {
10328 services += uuids[i] + "\n";
10330 console.log ("Services found: " + services);
10331 if (uuids.indexOf(CHAT_SERVICE_UUID) != -1) {
10332 // Connects to service
10333 device.connectToServiceByUUID(CHAT_SERVICE_UUID, function(socket) {
10335 // Connected to service, handle socket
10338 console.log("Could not connect to chat service !!!. Error: " + e.message);
10344 <Type type="array">
10345 <Type name="BluetoothUUID"/>
10348 <Operation name="connectToServiceByUUID" id="::Bluetooth::BluetoothDevice::connectToServiceByUUID">
10349 <webidl> void connectToServiceByUUID(<ref>BluetoothUUID</ref> uuid,
10350 <ref>BluetoothSocketSuccessCallback</ref> successCallback,
10351 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
10354 Connects to a specified service identified by <em>uuid</em> on this remote device.
10358 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.
10361 The ErrorCallback is launched with these error types:
10365 NotFoundError - If there is no service with the specified <em>uuid</em>. </li>
10367 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
10369 UnknownError - If any other error occurs. </li>
10379 http://tizen.org/privilege/bluetooth.spp
10381 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10382 var clientSocket = null;
10384 // Calls a method that is invoked when user wants to send a message to a remote device
10385 function sendMessage(msg) {
10386 // Validates socket state, if everything is ok.
10387 if (clientSocket != null && clientSocket.state == "OPEN") {
10388 // Sends the message
10389 clientSocket.writeData(msg);
10393 // Calls a method that is invoked when a socket is open
10394 function onSocketConnected(socket) {
10395 clientSocket = socket;
10396 console.log("Opening a socket successfully!!!");
10397 socket.onmessage = function () {
10398 var data = socket.readData();
10399 var recvmsg = "";
10400 for (var i = 0; i < data.length; i++)
10402 recvmsg += String.fromCharCode(data[i]);
10404 console.log("server msg >> " + recvmsg);
10407 socket.onclose = function() {
10408 console.log("socket disconnected.");
10412 function onDeviceReady(device) {
10413 // Validates device and service uuid
10414 if (device.uuids.indexOf("5BCE9431-6C75-32AB-AFE0-2EC108A30860") != -1) {
10416 device.connectToServiceByUUID("5BCE9431-6C75-32AB-AFE0-2EC108A30860", onSocketConnected, function(e) {
10417 console.log ("Error connecting to service. Reason: " + e.message);
10421 console.log ("Chat service is not supported by this device");
10425 function onSetPowered() {
10426 // Gets the BluetoothDevice object
10427 adapter.getDevice("35:F4:59:D1:7A:03", onDeviceReady, function(e) { console.log("Error: " + e.message); });
10430 adapter.setPowered(true, onSetPowered, function(e) {console.log ("Could not turn on Bluetooth adapter. reason: " + e.message); });
10433 <Type type="void"/>
10435 <Argument name="uuid">
10438 The 128 bit unique identifier, which represents the service record on the device.
10441 <Type name="BluetoothUUID"/>
10443 <Argument name="successCallback">
10446 The method to invoke when an asynchronous call completes successfully.
10449 <Type name="BluetoothSocketSuccessCallback"/>
10451 <Argument optional="optional" name="errorCallback">
10454 The method to invoke when opening of a socket fails.
10457 <Type name="ErrorCallback" nullable="nullable"/>
10461 <RaiseException name="WebAPIException">
10464 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter
10467 with error type SecurityError, if the application does not have the privilege to call this method.
10470 with error type NotSupportedError, if this feature is not supported.
10477 <Interface name="BluetoothSocket" id="::Bluetooth::BluetoothSocket">
10478 <webidl> [NoInterfaceObject] interface BluetoothSocket {
10479 readonly attribute <ref>BluetoothUUID</ref> uuid;
10480 readonly attribute <ref>BluetoothSocketState</ref> state;
10481 readonly attribute <ref>BluetoothDevice</ref> peer;
10482 [TreatNonCallableAsNull] attribute <ref>SuccessCallback</ref>? onmessage raises(<ref>WebAPIException</ref>);
10483 [TreatNonCallableAsNull] attribute <ref>SuccessCallback</ref>? onclose raises(<ref>WebAPIException</ref>);
10484 unsigned long writeData(byte[] data) raises(<ref>WebAPIException</ref>);
10487 byte[] readData() raises(<ref>WebAPIException</ref>);
10490 void close() raises(<ref>WebAPIException</ref>);
10494 This interface represents the Bluetooth socket.
10498 The socket object is created by <em>BluetoothDevice.connectToServiceByUUID()</em> or <em>BluetoothAdapter.registerRFCOMMServiceByUUID()</em>.
10505 <ExtendedAttributeList>
10506 <ExtendedAttribute name="NoInterfaceObject">
10507 <webidl>NoInterfaceObject</webidl>
10508 </ExtendedAttribute>
10509 </ExtendedAttributeList>
10510 <Attribute readonly="readonly" name="uuid" id="::Bluetooth::BluetoothSocket::uuid">
10511 <webidl> readonly attribute <ref>BluetoothUUID</ref> uuid;</webidl>
10514 An attribute to store the service UUID to which this socket is connected.
10520 <Type name="BluetoothUUID"/>
10522 <Attribute readonly="readonly" name="state" id="::Bluetooth::BluetoothSocket::state">
10523 <webidl> readonly attribute <ref>BluetoothSocketState</ref> state;</webidl>
10526 An attribute to indicate the socket state.
10532 <Type name="BluetoothSocketState"/>
10534 <Attribute readonly="readonly" name="peer" id="::Bluetooth::BluetoothSocket::peer">
10535 <webidl> readonly attribute <ref>BluetoothDevice</ref> peer;</webidl>
10538 The peer device to which this socket is connected.
10544 <Type name="BluetoothDevice"/>
10546 <Attribute name="onmessage" id="::Bluetooth::BluetoothSocket::onmessage">
10547 <webidl> [TreatNonCallableAsNull] attribute <ref>SuccessCallback</ref>? onmessage raises(<ref>WebAPIException</ref>);</webidl>
10550 The success callback to be invoked when an incoming message is received from the peer.
10551 By default, this attribute is set to null.
10557 <ExtendedAttributeList>
10558 <ExtendedAttribute name="TreatNonCallableAsNull">
10559 <webidl>TreatNonCallableAsNull</webidl>
10560 </ExtendedAttribute>
10561 </ExtendedAttributeList>
10562 <Type name="SuccessCallback" nullable="nullable"/>
10564 <RaiseException name="WebAPIException">
10567 with error type TypeMismatchError, if any input attribute is not compatible with the expected type for this attribute.
10573 <Attribute name="onclose" id="::Bluetooth::BluetoothSocket::onclose">
10574 <webidl> [TreatNonCallableAsNull] attribute <ref>SuccessCallback</ref>? onclose raises(<ref>WebAPIException</ref>);</webidl>
10577 The success callback to be invoked when the socket is closed.
10578 By default, this attribute is set to null.
10584 <ExtendedAttributeList>
10585 <ExtendedAttribute name="TreatNonCallableAsNull">
10586 <webidl>TreatNonCallableAsNull</webidl>
10587 </ExtendedAttribute>
10588 </ExtendedAttributeList>
10589 <Type name="SuccessCallback" nullable="nullable"/>
10591 <RaiseException name="WebAPIException">
10594 with error type TypeMismatchError, if any input attribute is not compatible with the expected type for this attribute.
10600 <Operation name="writeData" id="::Bluetooth::BluetoothSocket::writeData">
10601 <webidl> unsigned long writeData(byte[] data) raises(<ref>WebAPIException</ref>);</webidl>
10604 Writes data as a sequence of bytes onto the socket and returns the number of bytes actually written.
10613 http://tizen.org/privilege/bluetooth.spp
10616 var adapter = tizen.bluetooth.getDefaultAdapter();
10618 function onSocketConnected(socket) {
10619 console.log ("Opened connection to remote device");
10620 socket.onmessage = function () {
10621 console.log ("Message received: " + socket.readData());
10624 socket.onclose = function() {
10625 console.log("Socket closed with " + socket.peer.name);
10628 // Sends data to peer.
10629 var textmsg = "Test";
10630 var sendtextmsg = new Array();
10631 for (var i = 0; i < textmsg.length; i++)
10633 sendtextmsg[i] = textmsg.charCodeAt(i);
10635 socket.writeData (sendtextmsg);
10638 function onSocketError(e) {
10639 console.log ("Error connecting to service. Reason: " + e.message);
10642 function onDeviceReady(device) {
10643 // Validates device and service uuid
10644 if (device.uuids.indexOf("5BCE9431-6C75-32AB-AFE0-2EC108A30860") != -1) {
10646 device.connectToServiceByUUID("5BCE9431-6C75-32AB-AFE0-2EC108A30860", onSocketConnected, onSocketError );
10649 function onSetPowered() {
10650 // Gets the BluetoothDevice object
10651 adapter.getDevice("35:F4:59:D1:7A:03", onDeviceReady, function(e) { console.log("Error: " + e.message); });
10654 adapter.setPowered(true, onSetPowered, function(e) {console.log ("Could not turn on Bluetooth adapter. reason: " + e.message); });
10657 <Type type="unsigned long">
10660 unsigned long The number of bytes actually sent.
10665 <Argument name="data">
10671 <Type type="array">
10672 <Type type="byte"/>
10677 <RaiseException name="WebAPIException">
10680 with error type TypeMismatchError, if any input parameters not compatible with the expected type for that parameter.
10683 with error type SecurityError, if the application does not have the privilege to call this method.
10686 with error type NotSupportedError, if this feature is not supported.
10689 with error type UnknownError, if any other error occurs.
10695 <Operation name="readData" id="::Bluetooth::BluetoothSocket::readData">
10696 <webidl> byte[] readData() raises(<ref>WebAPIException</ref>);</webidl>
10699 Reads data from the socket.
10703 This method should be called only in the <em>BluetoothSocket.onmessage</em> handler, that is, when data is ready on the socket.
10713 http://tizen.org/privilege/bluetooth.spp
10715 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10717 function onError(e) {
10718 console.log ("Error connecting to service. Reason: " + e.message);
10721 function onSocketConnected(socket) {
10722 console.log ("Opening socket success!!!");
10724 socket.onmessage = function() {
10725 // Has got a message from peer, reads it
10726 var data = socket.readData();
10729 // Code to evaluate message goes here
10733 socket.onclose = function() {
10734 console.log("Socket closed with " + socket.peer.name);
10738 function onDeviceReady(device) {
10739 // Validates device and service uuid
10740 if (device.uuids.indexOf("5BCE9431-6C75-32AB-AFE0-2EC108A30860") != -1) {
10742 device.connectToServiceByUUID("5BCE9431-6C75-32AB-AFE0-2EC108A30860", onSocketConnected, onError);
10745 function onSetPowered() {
10746 // Gets the BluetoothDevice object
10747 adapter.getDevice("35:F4:59:D1:7A:03", onDeviceReady, function(e) { console.log("Error: " + e.message); });
10750 adapter.setPowered(true, onSetPowered, function(e) {console.log ("Could not turn on Bluetooth adapter. reason: " + e.message); });
10753 <Type type="array">
10756 byte[] The sequence of bytes successfully read.
10759 <Type type="byte"/>
10763 <RaiseException name="WebAPIException">
10766 with error type SecurityError, if the application does not have the privilege to call this method.
10769 with error type NotSupportedError, if this feature is not supported.
10772 with error type UnknownError, if any other error occurs.
10778 <Operation name="close" id="::Bluetooth::BluetoothSocket::close">
10779 <webidl> void close() raises(<ref>WebAPIException</ref>);</webidl>
10786 <b>BluetoothSocket.state</b> changes to <var>CLOSED</var>, and <em>BluetoothSocket.onclose()</em> is invoked on success.
10796 http://tizen.org/privilege/bluetooth.spp
10799 <Type type="void"/>
10802 <RaiseException name="WebAPIException">
10805 with error type NotSupportedError, if this feature is not supported.
10808 with error type SecurityError, if the application does not have the privilege to call this method.
10811 with error type UnknownError, if any other error occurs.
10818 <Interface name="BluetoothClass" id="::Bluetooth::BluetoothClass">
10819 <webidl> [NoInterfaceObject] interface BluetoothClass {
10820 readonly attribute octet major;
10822 readonly attribute octet minor;
10824 readonly attribute unsigned short [] services ;
10826 boolean hasService(unsigned short service) raises(<ref>WebAPIException</ref>);
10830 This interface represents Bluetooth Class of Device/Service(CoD).
10834 Bluetooth device class describes the characteristics and capabilities of a device.
10837 Bluetooth CoD is a 24 bit integer created by the union of three components:
10841 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>
10843 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>
10845 Zero or more <b>Major Service Classes</b>(bits 13-23) - Represents the services supported by the device. </li>
10848 The Major and Minor classes are intended to define a general family of devices with which any particular implementation wishes to be associated.
10849 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.
10856 <ExtendedAttributeList>
10857 <ExtendedAttribute name="NoInterfaceObject">
10858 <webidl>NoInterfaceObject</webidl>
10859 </ExtendedAttribute>
10860 </ExtendedAttributeList>
10861 <Attribute readonly="readonly" name="major" id="::Bluetooth::BluetoothClass::major">
10862 <webidl> readonly attribute octet major;</webidl>
10865 The major device class and it refers to the <em>BluetoothClassDeviceMajor</em> interface for the list of possible
10871 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10873 function evaluateDevice(address) {
10874 adapter.getDevice(address, function(device) {
10875 if (device.deviceClass.major == tizen.bluetooth.deviceMajor.COMPUTER) {
10876 // Shows computer icon for this device
10877 console.log("Device is computer");
10878 } else if (device.deviceClass.major == tizen.bluetooth.deviceMajor.PHONE) {
10879 // Shows phone icon
10880 console.log("Device is a Phone");
10883 console.log("Couldn't get any device with the given address: " + e.message);
10887 evaluateDevice("11:22:33:44:55:66");
10891 <Type type="octet"/>
10893 <Attribute readonly="readonly" name="minor" id="::Bluetooth::BluetoothClass::minor">
10894 <webidl> readonly attribute octet minor;</webidl>
10897 The minor device class and it refer to the <em>BluetoothClassDeviceMinor</em> interface for the list of possible values.
10903 <Type type="octet"/>
10905 <Attribute readonly="readonly" name="services" id="::Bluetooth::BluetoothClass::services">
10906 <webidl> readonly attribute unsigned short [] services ;</webidl>
10909 The services provided by this device and it refers to the <em>BluetoothClassDeviceService</em> interface for the list of possible
10916 <Type type="array">
10917 <Type type="unsigned short"/>
10920 <Operation name="hasService" id="::Bluetooth::BluetoothClass::hasService">
10921 <webidl> boolean hasService(unsigned short service) raises(<ref>WebAPIException</ref>);</webidl>
10924 Checks whether the given service exists in the <em>services</em>.
10933 http://tizen.org/privilege/bluetooth.gap
10935 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10936 adapter.getDevice("12:34:56:78:9A:BC", function(device) {
10937 if (device.deviceClass.hasService(tizen.bluetooth.deviceService.POSITIONING)) {
10938 console.log("Device supports Positioning service");
10941 console.log("Couldn't get device for given address: " + e.message);
10945 <Type type="boolean"/>
10947 <Argument name="service">
10950 The service to check.
10953 <Type type="unsigned short"/>
10957 <RaiseException name="WebAPIException">
10960 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
10963 with error type NotSupportedError, if this feature is not supported.
10966 with error type SecurityError, if the application does not have the privilege to call this method.
10969 with error type UnknownError, if any other error occurs.
10976 <Interface name="BluetoothClassDeviceMajor" id="::Bluetooth::BluetoothClassDeviceMajor">
10977 <webidl> [NoInterfaceObject] interface BluetoothClassDeviceMajor {
10979 const octet MISC = 0x00;
10980 const octet COMPUTER = 0x01;
10981 const octet PHONE = 0x02;
10982 const octet NETWORK = 0x03;
10983 const octet AUDIO_VIDEO = 0x04;
10984 const octet PERIPHERAL = 0x05;
10985 const octet IMAGING = 0x06;
10986 const octet WEARABLE = 0x07;
10987 const octet TOY = 0x08;
10988 const octet HEALTH = 0x09;
10989 const octet UNCATEGORIZED = 0x1F;
10993 This interface holds the identifiers for major device classes of Bluetooth CoD.
10999 <ExtendedAttributeList>
11000 <ExtendedAttribute name="NoInterfaceObject">
11001 <webidl>NoInterfaceObject</webidl>
11002 </ExtendedAttribute>
11003 </ExtendedAttributeList>
11004 <Const name="MISC" value="0x00" id="::Bluetooth::BluetoothClassDeviceMajor::MISC">
11005 <webidl> const octet MISC = 0x00;</webidl>
11006 <Type type="octet"/>
11008 <Const name="COMPUTER" value="0x01" id="::Bluetooth::BluetoothClassDeviceMajor::COMPUTER">
11009 <webidl> const octet COMPUTER = 0x01;</webidl>
11010 <Type type="octet"/>
11012 <Const name="PHONE" value="0x02" id="::Bluetooth::BluetoothClassDeviceMajor::PHONE">
11013 <webidl> const octet PHONE = 0x02;</webidl>
11014 <Type type="octet"/>
11016 <Const name="NETWORK" value="0x03" id="::Bluetooth::BluetoothClassDeviceMajor::NETWORK">
11017 <webidl> const octet NETWORK = 0x03;</webidl>
11018 <Type type="octet"/>
11020 <Const name="AUDIO_VIDEO" value="0x04" id="::Bluetooth::BluetoothClassDeviceMajor::AUDIO_VIDEO">
11021 <webidl> const octet AUDIO_VIDEO = 0x04;</webidl>
11022 <Type type="octet"/>
11024 <Const name="PERIPHERAL" value="0x05" id="::Bluetooth::BluetoothClassDeviceMajor::PERIPHERAL">
11025 <webidl> const octet PERIPHERAL = 0x05;</webidl>
11026 <Type type="octet"/>
11028 <Const name="IMAGING" value="0x06" id="::Bluetooth::BluetoothClassDeviceMajor::IMAGING">
11029 <webidl> const octet IMAGING = 0x06;</webidl>
11030 <Type type="octet"/>
11032 <Const name="WEARABLE" value="0x07" id="::Bluetooth::BluetoothClassDeviceMajor::WEARABLE">
11033 <webidl> const octet WEARABLE = 0x07;</webidl>
11034 <Type type="octet"/>
11036 <Const name="TOY" value="0x08" id="::Bluetooth::BluetoothClassDeviceMajor::TOY">
11037 <webidl> const octet TOY = 0x08;</webidl>
11038 <Type type="octet"/>
11040 <Const name="HEALTH" value="0x09" id="::Bluetooth::BluetoothClassDeviceMajor::HEALTH">
11041 <webidl> const octet HEALTH = 0x09;</webidl>
11042 <Type type="octet"/>
11044 <Const name="UNCATEGORIZED" value="0x1F" id="::Bluetooth::BluetoothClassDeviceMajor::UNCATEGORIZED">
11045 <webidl> const octet UNCATEGORIZED = 0x1F;</webidl>
11046 <Type type="octet"/>
11049 <Interface name="BluetoothClassDeviceMinor" id="::Bluetooth::BluetoothClassDeviceMinor">
11050 <webidl> [NoInterfaceObject] interface BluetoothClassDeviceMinor {
11051 const octet COMPUTER_UNCATEGORIZED = 0x00;
11052 const octet COMPUTER_DESKTOP = 0x01;
11053 const octet COMPUTER_SERVER = 0x02;
11054 const octet COMPUTER_LAPTOP = 0x03;
11055 const octet COMPUTER_HANDHELD_PC_OR_PDA = 0x04;
11056 const octet COMPUTER_PALM_PC_OR_PDA = 0x05;
11057 const octet COMPUTER_WEARABLE = 0x06;
11059 const octet PHONE_UNCATEGORIZED = 0x00;
11060 const octet PHONE_CELLULAR = 0x01;
11061 const octet PHONE_CORDLESS = 0x02;
11062 const octet PHONE_SMARTPHONE = 0x03;
11063 const octet PHONE_MODEM_OR_GATEWAY = 0x04;
11064 const octet PHONE_ISDN = 0x05;
11066 const octet AV_UNRECOGNIZED = 0x00;
11067 const octet AV_WEARABLE_HEADSET = 0x01;
11068 const octet AV_HANDSFREE = 0x02;
11069 const octet AV_MICROPHONE = 0x04;
11070 const octet AV_LOUDSPEAKER = 0x05;
11071 const octet AV_HEADPHONES = 0x06;
11072 const octet AV_PORTABLE_AUDIO = 0x07;
11073 const octet AV_CAR_AUDIO = 0x08;
11074 const octet AV_SETTOP_BOX = 0x09;
11075 const octet AV_HIFI = 0x0a;
11076 const octet AV_VCR = 0x0b;
11077 const octet AV_VIDEO_CAMERA = 0x0c;
11078 const octet AV_CAMCORDER = 0x0d;
11079 const octet AV_MONITOR = 0x0e;
11080 const octet AV_DISPLAY_AND_LOUDSPEAKER = 0x0f;
11081 const octet AV_VIDEO_CONFERENCING = 0x10;
11082 const octet AV_GAMING_TOY = 0x12;
11084 const octet PERIPHERAL_UNCATEGORIZED = 0;
11085 const octet PERIPHERAL_KEYBOARD = 0x10;
11086 const octet PERIPHERAL_POINTING_DEVICE = 0x20;
11087 const octet PERIPHERAL_KEYBOARD_AND_POINTING_DEVICE = 0x30;
11088 const octet PERIPHERAL_JOYSTICK = 0x01;
11089 const octet PERIPHERAL_GAMEPAD = 0x02;
11090 const octet PERIPHERAL_REMOTE_CONTROL = 0x03;
11091 const octet PERIPHERAL_SENSING_DEVICE = 0x04;
11092 const octet PERIPHERAL_DEGITIZER_TABLET = 0x05;
11093 const octet PERIPHERAL_CARD_READER = 0x06;
11094 const octet PERIPHERAL_DIGITAL_PEN = 0x07;
11095 const octet PERIPHERAL_HANDHELD_SCANNER = 0x08;
11096 const octet PERIPHERAL_HANDHELD_INPUT_DEVICE = 0x09;
11098 const octet IMAGING_UNCATEGORIZED = 0x00;
11099 const octet IMAGING_DISPLAY = 0x04;
11100 const octet IMAGING_CAMERA = 0x08;
11101 const octet IMAGING_SCANNER = 0x10;
11102 const octet IMAGING_PRINTER = 0x20;
11104 const octet WEARABLE_WRITST_WATCH = 0x01;
11105 const octet WEARABLE_PAGER = 0x02;
11106 const octet WEARABLE_JACKET = 0x03;
11107 const octet WEARABLE_HELMET = 0x04;
11108 const octet WEARABLE_GLASSES = 0x05;
11110 const octet TOY_ROBOT = 0x01;
11111 const octet TOY_VEHICLE = 0x02;
11112 const octet TOY_DOLL = 0x03;
11113 const octet TOY_CONTROLLER = 0x04;
11114 const octet TOY_GAME = 0x05;
11116 const octet HEALTH_UNDEFINED = 0x00;
11117 const octet HEALTH_BLOOD_PRESSURE_MONITOR = 0x01;
11118 const octet HEALTH_THERMOMETER = 0x02;
11119 const octet HEALTH_WEIGHING_SCALE = 0x03;
11120 const octet HEALTH_GLUCOSE_METER = 0x04;
11121 const octet HEALTH_PULSE_OXIMETER = 0x05;
11122 const octet HEALTH_PULSE_RATE_MONITOR = 0x06;
11123 const octet HEALTH_DATA_DISPLAY = 0x07;
11124 const octet HEALTH_STEP_COUNTER = 0x08;
11125 const octet HEALTH_BODY_COMPOSITION_ANALYZER = 0x09;
11126 const octet HEALTH_PEAK_FLOW_MONITOR = 0x0a;
11127 const octet HEALTH_MEDICATION_MONITOR = 0x0b;
11128 const octet HEALTH_KNEE_PROSTHESIS = 0x0c;
11129 const octet HEALTH_ANKLE_PROSTHESIS = 0x0d;
11133 This interface holds the identifiers for minor device classes of Bluetooth CoD.
11139 <ExtendedAttributeList>
11140 <ExtendedAttribute name="NoInterfaceObject">
11141 <webidl>NoInterfaceObject</webidl>
11142 </ExtendedAttribute>
11143 </ExtendedAttributeList>
11144 <Const name="COMPUTER_UNCATEGORIZED" value="0x00" id="::Bluetooth::BluetoothClassDeviceMinor::COMPUTER_UNCATEGORIZED">
11145 <webidl> const octet COMPUTER_UNCATEGORIZED = 0x00;</webidl>
11146 <Type type="octet"/>
11148 <Const name="COMPUTER_DESKTOP" value="0x01" id="::Bluetooth::BluetoothClassDeviceMinor::COMPUTER_DESKTOP">
11149 <webidl> const octet COMPUTER_DESKTOP = 0x01;</webidl>
11150 <Type type="octet"/>
11152 <Const name="COMPUTER_SERVER" value="0x02" id="::Bluetooth::BluetoothClassDeviceMinor::COMPUTER_SERVER">
11153 <webidl> const octet COMPUTER_SERVER = 0x02;</webidl>
11154 <Type type="octet"/>
11156 <Const name="COMPUTER_LAPTOP" value="0x03" id="::Bluetooth::BluetoothClassDeviceMinor::COMPUTER_LAPTOP">
11157 <webidl> const octet COMPUTER_LAPTOP = 0x03;</webidl>
11158 <Type type="octet"/>
11160 <Const name="COMPUTER_HANDHELD_PC_OR_PDA" value="0x04" id="::Bluetooth::BluetoothClassDeviceMinor::COMPUTER_HANDHELD_PC_OR_PDA">
11161 <webidl> const octet COMPUTER_HANDHELD_PC_OR_PDA = 0x04;</webidl>
11162 <Type type="octet"/>
11164 <Const name="COMPUTER_PALM_PC_OR_PDA" value="0x05" id="::Bluetooth::BluetoothClassDeviceMinor::COMPUTER_PALM_PC_OR_PDA">
11165 <webidl> const octet COMPUTER_PALM_PC_OR_PDA = 0x05;</webidl>
11166 <Type type="octet"/>
11168 <Const name="COMPUTER_WEARABLE" value="0x06" id="::Bluetooth::BluetoothClassDeviceMinor::COMPUTER_WEARABLE">
11169 <webidl> const octet COMPUTER_WEARABLE = 0x06;</webidl>
11170 <Type type="octet"/>
11172 <Const name="PHONE_UNCATEGORIZED" value="0x00" id="::Bluetooth::BluetoothClassDeviceMinor::PHONE_UNCATEGORIZED">
11173 <webidl> const octet PHONE_UNCATEGORIZED = 0x00;</webidl>
11174 <Type type="octet"/>
11176 <Const name="PHONE_CELLULAR" value="0x01" id="::Bluetooth::BluetoothClassDeviceMinor::PHONE_CELLULAR">
11177 <webidl> const octet PHONE_CELLULAR = 0x01;</webidl>
11178 <Type type="octet"/>
11180 <Const name="PHONE_CORDLESS" value="0x02" id="::Bluetooth::BluetoothClassDeviceMinor::PHONE_CORDLESS">
11181 <webidl> const octet PHONE_CORDLESS = 0x02;</webidl>
11182 <Type type="octet"/>
11184 <Const name="PHONE_SMARTPHONE" value="0x03" id="::Bluetooth::BluetoothClassDeviceMinor::PHONE_SMARTPHONE">
11185 <webidl> const octet PHONE_SMARTPHONE = 0x03;</webidl>
11186 <Type type="octet"/>
11188 <Const name="PHONE_MODEM_OR_GATEWAY" value="0x04" id="::Bluetooth::BluetoothClassDeviceMinor::PHONE_MODEM_OR_GATEWAY">
11189 <webidl> const octet PHONE_MODEM_OR_GATEWAY = 0x04;</webidl>
11190 <Type type="octet"/>
11192 <Const name="PHONE_ISDN" value="0x05" id="::Bluetooth::BluetoothClassDeviceMinor::PHONE_ISDN">
11193 <webidl> const octet PHONE_ISDN = 0x05;</webidl>
11194 <Type type="octet"/>
11196 <Const name="AV_UNRECOGNIZED" value="0x00" id="::Bluetooth::BluetoothClassDeviceMinor::AV_UNRECOGNIZED">
11197 <webidl> const octet AV_UNRECOGNIZED = 0x00;</webidl>
11198 <Type type="octet"/>
11200 <Const name="AV_WEARABLE_HEADSET" value="0x01" id="::Bluetooth::BluetoothClassDeviceMinor::AV_WEARABLE_HEADSET">
11201 <webidl> const octet AV_WEARABLE_HEADSET = 0x01;</webidl>
11202 <Type type="octet"/>
11204 <Const name="AV_HANDSFREE" value="0x02" id="::Bluetooth::BluetoothClassDeviceMinor::AV_HANDSFREE">
11205 <webidl> const octet AV_HANDSFREE = 0x02;</webidl>
11206 <Type type="octet"/>
11208 <Const name="AV_MICROPHONE" value="0x04" id="::Bluetooth::BluetoothClassDeviceMinor::AV_MICROPHONE">
11209 <webidl> const octet AV_MICROPHONE = 0x04;</webidl>
11210 <Type type="octet"/>
11212 <Const name="AV_LOUDSPEAKER" value="0x05" id="::Bluetooth::BluetoothClassDeviceMinor::AV_LOUDSPEAKER">
11213 <webidl> const octet AV_LOUDSPEAKER = 0x05;</webidl>
11214 <Type type="octet"/>
11216 <Const name="AV_HEADPHONES" value="0x06" id="::Bluetooth::BluetoothClassDeviceMinor::AV_HEADPHONES">
11217 <webidl> const octet AV_HEADPHONES = 0x06;</webidl>
11218 <Type type="octet"/>
11220 <Const name="AV_PORTABLE_AUDIO" value="0x07" id="::Bluetooth::BluetoothClassDeviceMinor::AV_PORTABLE_AUDIO">
11221 <webidl> const octet AV_PORTABLE_AUDIO = 0x07;</webidl>
11222 <Type type="octet"/>
11224 <Const name="AV_CAR_AUDIO" value="0x08" id="::Bluetooth::BluetoothClassDeviceMinor::AV_CAR_AUDIO">
11225 <webidl> const octet AV_CAR_AUDIO = 0x08;</webidl>
11226 <Type type="octet"/>
11228 <Const name="AV_SETTOP_BOX" value="0x09" id="::Bluetooth::BluetoothClassDeviceMinor::AV_SETTOP_BOX">
11229 <webidl> const octet AV_SETTOP_BOX = 0x09;</webidl>
11230 <Type type="octet"/>
11232 <Const name="AV_HIFI" value="0x0a" id="::Bluetooth::BluetoothClassDeviceMinor::AV_HIFI">
11233 <webidl> const octet AV_HIFI = 0x0a;</webidl>
11234 <Type type="octet"/>
11236 <Const name="AV_VCR" value="0x0b" id="::Bluetooth::BluetoothClassDeviceMinor::AV_VCR">
11237 <webidl> const octet AV_VCR = 0x0b;</webidl>
11238 <Type type="octet"/>
11240 <Const name="AV_VIDEO_CAMERA" value="0x0c" id="::Bluetooth::BluetoothClassDeviceMinor::AV_VIDEO_CAMERA">
11241 <webidl> const octet AV_VIDEO_CAMERA = 0x0c;</webidl>
11242 <Type type="octet"/>
11244 <Const name="AV_CAMCORDER" value="0x0d" id="::Bluetooth::BluetoothClassDeviceMinor::AV_CAMCORDER">
11245 <webidl> const octet AV_CAMCORDER = 0x0d;</webidl>
11246 <Type type="octet"/>
11248 <Const name="AV_MONITOR" value="0x0e" id="::Bluetooth::BluetoothClassDeviceMinor::AV_MONITOR">
11249 <webidl> const octet AV_MONITOR = 0x0e;</webidl>
11250 <Type type="octet"/>
11252 <Const name="AV_DISPLAY_AND_LOUDSPEAKER" value="0x0f" id="::Bluetooth::BluetoothClassDeviceMinor::AV_DISPLAY_AND_LOUDSPEAKER">
11253 <webidl> const octet AV_DISPLAY_AND_LOUDSPEAKER = 0x0f;</webidl>
11254 <Type type="octet"/>
11256 <Const name="AV_VIDEO_CONFERENCING" value="0x10" id="::Bluetooth::BluetoothClassDeviceMinor::AV_VIDEO_CONFERENCING">
11257 <webidl> const octet AV_VIDEO_CONFERENCING = 0x10;</webidl>
11258 <Type type="octet"/>
11260 <Const name="AV_GAMING_TOY" value="0x12" id="::Bluetooth::BluetoothClassDeviceMinor::AV_GAMING_TOY">
11261 <webidl> const octet AV_GAMING_TOY = 0x12;</webidl>
11262 <Type type="octet"/>
11264 <Const name="PERIPHERAL_UNCATEGORIZED" value="0" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_UNCATEGORIZED">
11265 <webidl> const octet PERIPHERAL_UNCATEGORIZED = 0;</webidl>
11266 <Type type="octet"/>
11268 <Const name="PERIPHERAL_KEYBOARD" value="0x10" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_KEYBOARD">
11269 <webidl> const octet PERIPHERAL_KEYBOARD = 0x10;</webidl>
11270 <Type type="octet"/>
11272 <Const name="PERIPHERAL_POINTING_DEVICE" value="0x20" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_POINTING_DEVICE">
11273 <webidl> const octet PERIPHERAL_POINTING_DEVICE = 0x20;</webidl>
11274 <Type type="octet"/>
11276 <Const name="PERIPHERAL_KEYBOARD_AND_POINTING_DEVICE" value="0x30" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_KEYBOARD_AND_POINTING_DEVICE">
11277 <webidl> const octet PERIPHERAL_KEYBOARD_AND_POINTING_DEVICE = 0x30;</webidl>
11278 <Type type="octet"/>
11280 <Const name="PERIPHERAL_JOYSTICK" value="0x01" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_JOYSTICK">
11281 <webidl> const octet PERIPHERAL_JOYSTICK = 0x01;</webidl>
11282 <Type type="octet"/>
11284 <Const name="PERIPHERAL_GAMEPAD" value="0x02" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_GAMEPAD">
11285 <webidl> const octet PERIPHERAL_GAMEPAD = 0x02;</webidl>
11286 <Type type="octet"/>
11288 <Const name="PERIPHERAL_REMOTE_CONTROL" value="0x03" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_REMOTE_CONTROL">
11289 <webidl> const octet PERIPHERAL_REMOTE_CONTROL = 0x03;</webidl>
11290 <Type type="octet"/>
11292 <Const name="PERIPHERAL_SENSING_DEVICE" value="0x04" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_SENSING_DEVICE">
11293 <webidl> const octet PERIPHERAL_SENSING_DEVICE = 0x04;</webidl>
11294 <Type type="octet"/>
11296 <Const name="PERIPHERAL_DEGITIZER_TABLET" value="0x05" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_DEGITIZER_TABLET">
11297 <webidl> const octet PERIPHERAL_DEGITIZER_TABLET = 0x05;</webidl>
11298 <Type type="octet"/>
11300 <Const name="PERIPHERAL_CARD_READER" value="0x06" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_CARD_READER">
11301 <webidl> const octet PERIPHERAL_CARD_READER = 0x06;</webidl>
11302 <Type type="octet"/>
11304 <Const name="PERIPHERAL_DIGITAL_PEN" value="0x07" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_DIGITAL_PEN">
11305 <webidl> const octet PERIPHERAL_DIGITAL_PEN = 0x07;</webidl>
11306 <Type type="octet"/>
11308 <Const name="PERIPHERAL_HANDHELD_SCANNER" value="0x08" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_HANDHELD_SCANNER">
11309 <webidl> const octet PERIPHERAL_HANDHELD_SCANNER = 0x08;</webidl>
11310 <Type type="octet"/>
11312 <Const name="PERIPHERAL_HANDHELD_INPUT_DEVICE" value="0x09" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_HANDHELD_INPUT_DEVICE">
11313 <webidl> const octet PERIPHERAL_HANDHELD_INPUT_DEVICE = 0x09;</webidl>
11314 <Type type="octet"/>
11316 <Const name="IMAGING_UNCATEGORIZED" value="0x00" id="::Bluetooth::BluetoothClassDeviceMinor::IMAGING_UNCATEGORIZED">
11317 <webidl> const octet IMAGING_UNCATEGORIZED = 0x00;</webidl>
11318 <Type type="octet"/>
11320 <Const name="IMAGING_DISPLAY" value="0x04" id="::Bluetooth::BluetoothClassDeviceMinor::IMAGING_DISPLAY">
11321 <webidl> const octet IMAGING_DISPLAY = 0x04;</webidl>
11322 <Type type="octet"/>
11324 <Const name="IMAGING_CAMERA" value="0x08" id="::Bluetooth::BluetoothClassDeviceMinor::IMAGING_CAMERA">
11325 <webidl> const octet IMAGING_CAMERA = 0x08;</webidl>
11326 <Type type="octet"/>
11328 <Const name="IMAGING_SCANNER" value="0x10" id="::Bluetooth::BluetoothClassDeviceMinor::IMAGING_SCANNER">
11329 <webidl> const octet IMAGING_SCANNER = 0x10;</webidl>
11330 <Type type="octet"/>
11332 <Const name="IMAGING_PRINTER" value="0x20" id="::Bluetooth::BluetoothClassDeviceMinor::IMAGING_PRINTER">
11333 <webidl> const octet IMAGING_PRINTER = 0x20;</webidl>
11334 <Type type="octet"/>
11336 <Const name="WEARABLE_WRITST_WATCH" value="0x01" id="::Bluetooth::BluetoothClassDeviceMinor::WEARABLE_WRITST_WATCH">
11337 <webidl> const octet WEARABLE_WRITST_WATCH = 0x01;</webidl>
11338 <Type type="octet"/>
11340 <Const name="WEARABLE_PAGER" value="0x02" id="::Bluetooth::BluetoothClassDeviceMinor::WEARABLE_PAGER">
11341 <webidl> const octet WEARABLE_PAGER = 0x02;</webidl>
11342 <Type type="octet"/>
11344 <Const name="WEARABLE_JACKET" value="0x03" id="::Bluetooth::BluetoothClassDeviceMinor::WEARABLE_JACKET">
11345 <webidl> const octet WEARABLE_JACKET = 0x03;</webidl>
11346 <Type type="octet"/>
11348 <Const name="WEARABLE_HELMET" value="0x04" id="::Bluetooth::BluetoothClassDeviceMinor::WEARABLE_HELMET">
11349 <webidl> const octet WEARABLE_HELMET = 0x04;</webidl>
11350 <Type type="octet"/>
11352 <Const name="WEARABLE_GLASSES" value="0x05" id="::Bluetooth::BluetoothClassDeviceMinor::WEARABLE_GLASSES">
11353 <webidl> const octet WEARABLE_GLASSES = 0x05;</webidl>
11354 <Type type="octet"/>
11356 <Const name="TOY_ROBOT" value="0x01" id="::Bluetooth::BluetoothClassDeviceMinor::TOY_ROBOT">
11357 <webidl> const octet TOY_ROBOT = 0x01;</webidl>
11358 <Type type="octet"/>
11360 <Const name="TOY_VEHICLE" value="0x02" id="::Bluetooth::BluetoothClassDeviceMinor::TOY_VEHICLE">
11361 <webidl> const octet TOY_VEHICLE = 0x02;</webidl>
11362 <Type type="octet"/>
11364 <Const name="TOY_DOLL" value="0x03" id="::Bluetooth::BluetoothClassDeviceMinor::TOY_DOLL">
11365 <webidl> const octet TOY_DOLL = 0x03;</webidl>
11366 <Type type="octet"/>
11368 <Const name="TOY_CONTROLLER" value="0x04" id="::Bluetooth::BluetoothClassDeviceMinor::TOY_CONTROLLER">
11369 <webidl> const octet TOY_CONTROLLER = 0x04;</webidl>
11370 <Type type="octet"/>
11372 <Const name="TOY_GAME" value="0x05" id="::Bluetooth::BluetoothClassDeviceMinor::TOY_GAME">
11373 <webidl> const octet TOY_GAME = 0x05;</webidl>
11374 <Type type="octet"/>
11376 <Const name="HEALTH_UNDEFINED" value="0x00" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_UNDEFINED">
11377 <webidl> const octet HEALTH_UNDEFINED = 0x00;</webidl>
11378 <Type type="octet"/>
11380 <Const name="HEALTH_BLOOD_PRESSURE_MONITOR" value="0x01" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_BLOOD_PRESSURE_MONITOR">
11381 <webidl> const octet HEALTH_BLOOD_PRESSURE_MONITOR = 0x01;</webidl>
11382 <Type type="octet"/>
11384 <Const name="HEALTH_THERMOMETER" value="0x02" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_THERMOMETER">
11385 <webidl> const octet HEALTH_THERMOMETER = 0x02;</webidl>
11386 <Type type="octet"/>
11388 <Const name="HEALTH_WEIGHING_SCALE" value="0x03" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_WEIGHING_SCALE">
11389 <webidl> const octet HEALTH_WEIGHING_SCALE = 0x03;</webidl>
11390 <Type type="octet"/>
11392 <Const name="HEALTH_GLUCOSE_METER" value="0x04" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_GLUCOSE_METER">
11393 <webidl> const octet HEALTH_GLUCOSE_METER = 0x04;</webidl>
11394 <Type type="octet"/>
11396 <Const name="HEALTH_PULSE_OXIMETER" value="0x05" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_PULSE_OXIMETER">
11397 <webidl> const octet HEALTH_PULSE_OXIMETER = 0x05;</webidl>
11398 <Type type="octet"/>
11400 <Const name="HEALTH_PULSE_RATE_MONITOR" value="0x06" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_PULSE_RATE_MONITOR">
11401 <webidl> const octet HEALTH_PULSE_RATE_MONITOR = 0x06;</webidl>
11402 <Type type="octet"/>
11404 <Const name="HEALTH_DATA_DISPLAY" value="0x07" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_DATA_DISPLAY">
11405 <webidl> const octet HEALTH_DATA_DISPLAY = 0x07;</webidl>
11406 <Type type="octet"/>
11408 <Const name="HEALTH_STEP_COUNTER" value="0x08" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_STEP_COUNTER">
11409 <webidl> const octet HEALTH_STEP_COUNTER = 0x08;</webidl>
11410 <Type type="octet"/>
11412 <Const name="HEALTH_BODY_COMPOSITION_ANALYZER" value="0x09" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_BODY_COMPOSITION_ANALYZER">
11413 <webidl> const octet HEALTH_BODY_COMPOSITION_ANALYZER = 0x09;</webidl>
11414 <Type type="octet"/>
11416 <Const name="HEALTH_PEAK_FLOW_MONITOR" value="0x0a" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_PEAK_FLOW_MONITOR">
11417 <webidl> const octet HEALTH_PEAK_FLOW_MONITOR = 0x0a;</webidl>
11418 <Type type="octet"/>
11420 <Const name="HEALTH_MEDICATION_MONITOR" value="0x0b" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_MEDICATION_MONITOR">
11421 <webidl> const octet HEALTH_MEDICATION_MONITOR = 0x0b;</webidl>
11422 <Type type="octet"/>
11424 <Const name="HEALTH_KNEE_PROSTHESIS" value="0x0c" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_KNEE_PROSTHESIS">
11425 <webidl> const octet HEALTH_KNEE_PROSTHESIS = 0x0c;</webidl>
11426 <Type type="octet"/>
11428 <Const name="HEALTH_ANKLE_PROSTHESIS" value="0x0d" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_ANKLE_PROSTHESIS">
11429 <webidl> const octet HEALTH_ANKLE_PROSTHESIS = 0x0d;</webidl>
11430 <Type type="octet"/>
11433 <Interface name="BluetoothClassDeviceService" id="::Bluetooth::BluetoothClassDeviceService">
11434 <webidl> [NoInterfaceObject] interface BluetoothClassDeviceService {
11435 const unsigned short LIMITED_DISCOVERABILITY = 0x0001;
11436 const unsigned short POSITIONING = 0x0008;
11437 const unsigned short NETWORKING = 0x0010;
11438 const unsigned short RENDERING = 0x0020;
11439 const unsigned short CAPTURING = 0x0040;
11440 const unsigned short OBJECT_TRANSFER = 0x0080;
11441 const unsigned short AUDIO = 0x0100;
11442 const unsigned short TELEPHONY = 0x0200;
11443 const unsigned short INFORMATION = 0x0400;
11447 This interface holds identifiers for the major service classes of Bluetooth CoD.
11453 <ExtendedAttributeList>
11454 <ExtendedAttribute name="NoInterfaceObject">
11455 <webidl>NoInterfaceObject</webidl>
11456 </ExtendedAttribute>
11457 </ExtendedAttributeList>
11458 <Const name="LIMITED_DISCOVERABILITY" value="0x0001" id="::Bluetooth::BluetoothClassDeviceService::LIMITED_DISCOVERABILITY">
11459 <webidl> const unsigned short LIMITED_DISCOVERABILITY = 0x0001;</webidl>
11460 <Type type="unsigned short"/>
11462 <Const name="POSITIONING" value="0x0008" id="::Bluetooth::BluetoothClassDeviceService::POSITIONING">
11463 <webidl> const unsigned short POSITIONING = 0x0008;</webidl>
11464 <Type type="unsigned short"/>
11466 <Const name="NETWORKING" value="0x0010" id="::Bluetooth::BluetoothClassDeviceService::NETWORKING">
11467 <webidl> const unsigned short NETWORKING = 0x0010;</webidl>
11468 <Type type="unsigned short"/>
11470 <Const name="RENDERING" value="0x0020" id="::Bluetooth::BluetoothClassDeviceService::RENDERING">
11471 <webidl> const unsigned short RENDERING = 0x0020;</webidl>
11472 <Type type="unsigned short"/>
11474 <Const name="CAPTURING" value="0x0040" id="::Bluetooth::BluetoothClassDeviceService::CAPTURING">
11475 <webidl> const unsigned short CAPTURING = 0x0040;</webidl>
11476 <Type type="unsigned short"/>
11478 <Const name="OBJECT_TRANSFER" value="0x0080" id="::Bluetooth::BluetoothClassDeviceService::OBJECT_TRANSFER">
11479 <webidl> const unsigned short OBJECT_TRANSFER = 0x0080;</webidl>
11480 <Type type="unsigned short"/>
11482 <Const name="AUDIO" value="0x0100" id="::Bluetooth::BluetoothClassDeviceService::AUDIO">
11483 <webidl> const unsigned short AUDIO = 0x0100;</webidl>
11484 <Type type="unsigned short"/>
11486 <Const name="TELEPHONY" value="0x0200" id="::Bluetooth::BluetoothClassDeviceService::TELEPHONY">
11487 <webidl> const unsigned short TELEPHONY = 0x0200;</webidl>
11488 <Type type="unsigned short"/>
11490 <Const name="INFORMATION" value="0x0400" id="::Bluetooth::BluetoothClassDeviceService::INFORMATION">
11491 <webidl> const unsigned short INFORMATION = 0x0400;</webidl>
11492 <Type type="unsigned short"/>
11495 <Interface name="BluetoothServiceHandler" id="::Bluetooth::BluetoothServiceHandler">
11496 <webidl> [NoInterfaceObject] interface BluetoothServiceHandler {
11497 readonly attribute <ref>BluetoothUUID</ref> uuid;
11498 readonly attribute DOMString name;
11499 readonly attribute boolean isConnected;
11500 [TreatNonCallableAsNull] attribute <ref>BluetoothSocketSuccessCallback</ref>? onconnect raises(<ref>WebAPIException</ref>);
11502 void unregister(optional <ref>SuccessCallback</ref>? successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
11506 This interface provides methods to handle Bluetooth service.
11512 <ExtendedAttributeList>
11513 <ExtendedAttribute name="NoInterfaceObject">
11514 <webidl>NoInterfaceObject</webidl>
11515 </ExtendedAttribute>
11516 </ExtendedAttributeList>
11517 <Attribute readonly="readonly" name="uuid" id="::Bluetooth::BluetoothServiceHandler::uuid">
11518 <webidl> readonly attribute <ref>BluetoothUUID</ref> uuid;</webidl>
11521 The UUID of the service.
11527 <Type name="BluetoothUUID"/>
11529 <Attribute readonly="readonly" name="name" id="::Bluetooth::BluetoothServiceHandler::name">
11530 <webidl> readonly attribute DOMString name;</webidl>
11533 The name of the service.
11539 <Type type="DOMString"/>
11541 <Attribute readonly="readonly" name="isConnected" id="::Bluetooth::BluetoothServiceHandler::isConnected">
11542 <webidl> readonly attribute boolean isConnected;</webidl>
11545 An attribute to check whether any remote devices is using this service or not.
11551 <Type type="boolean"/>
11553 <Attribute name="onconnect" id="::Bluetooth::BluetoothServiceHandler::onconnect">
11554 <webidl> [TreatNonCallableAsNull] attribute <ref>BluetoothSocketSuccessCallback</ref>? onconnect raises(<ref>WebAPIException</ref>);</webidl>
11557 The success callback to be invoked when a remote device is connected to this service.
11558 By default, this attribute is set to null.
11564 <ExtendedAttributeList>
11565 <ExtendedAttribute name="TreatNonCallableAsNull">
11566 <webidl>TreatNonCallableAsNull</webidl>
11567 </ExtendedAttribute>
11568 </ExtendedAttributeList>
11569 <Type name="BluetoothSocketSuccessCallback" nullable="nullable"/>
11571 <RaiseException name="WebAPIException">
11574 with error type TypeMismatchError, if any input attribute is not compatible with the expected type for this attribute.
11580 <Operation name="unregister" id="::Bluetooth::BluetoothServiceHandler::unregister">
11581 <webidl> void unregister(optional <ref>SuccessCallback</ref>? successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
11584 Unregisters a service record from the Bluetooth services record database and stops listening for new connections to this service.
11588 The ErrorCallback is launched with these error types:
11592 UnknownError - If any other error occurs. </li>
11602 http://tizen.org/privilege/bluetooth.spp
11604 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
11605 var chatServiceHandler = null;
11607 function chatServiceSuccessCb(handler) {
11608 console.log("Chat service registration was successful!");
11610 chatServiceHandler = handler;
11611 handler.onconnect = function(socket) {
11612 console.log("Client is connected: " + socket.peer.name + "," + socket.peer.address);
11613 socket.onmessage = function() {
11614 var data = socket.readData();
11615 // Handle message code goes here
11620 socket.onclose = function() {
11621 console.log('The socket is closed.');
11626 function publishChatService()
11628 var CHAT_SERVICE_UUID = "5BCE9431-6C75-32AB-AFE0-2EC108A30860";
11629 adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCb,
11632 console.log( "Could not register service record, Error: " + e.message);
11636 function unRegisterChatService()
11638 if (chatServiceHandler != null) {
11639 chatServiceHandler.unregister(function() {
11640 chatServiceHandler = null;
11641 console.log("Chat service is unregistered.");
11644 console.log ("Error: " + e.message);
11650 <Type type="void"/>
11652 <Argument optional="optional" name="successCallback">
11655 The method to be invoked when the record is removed successfully from the service records database.
11658 <Type name="SuccessCallback" nullable="nullable"/>
11660 <Argument optional="optional" name="errorCallback">
11663 The method to be invoked in case of failure (to unregister).
11666 <Type name="ErrorCallback" nullable="nullable"/>
11670 <RaiseException name="WebAPIException">
11673 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
11676 with error type SecurityError, if the application does not have the privilege to call this method.
11679 with error type NotSupportedError, if this feature is not supported.
11686 <Interface name="BluetoothProfileHandler" id="::Bluetooth::BluetoothProfileHandler">
11687 <webidl> [NoInterfaceObject] interface BluetoothProfileHandler {
11689 readonly attribute <ref>BluetoothProfileType</ref> profileType;
11694 This interface represents the Bluetooth profile handler.
11700 <ExtendedAttributeList>
11701 <ExtendedAttribute name="NoInterfaceObject">
11702 <webidl>NoInterfaceObject</webidl>
11703 </ExtendedAttribute>
11704 </ExtendedAttributeList>
11705 <Attribute readonly="readonly" name="profileType" id="::Bluetooth::BluetoothProfileHandler::profileType">
11706 <webidl> readonly attribute <ref>BluetoothProfileType</ref> profileType;</webidl>
11709 The type of Bluetooth profile.
11715 <Type name="BluetoothProfileType"/>
11718 <Interface name="BluetoothHealthProfileHandler" id="::Bluetooth::BluetoothHealthProfileHandler">
11719 <webidl> [NoInterfaceObject] interface BluetoothHealthProfileHandler : <ref>BluetoothProfileHandler</ref> {
11721 void registerSinkApplication(unsigned short dataType, DOMString name, <ref>BluetoothHealthApplicationSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
11723 void connectToSource(<ref>BluetoothDevice</ref> peer, <ref>BluetoothHealthApplication</ref> application, <ref>BluetoothHealthChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
11728 This interface represents the handler of Bluetooth health device profile.
11729 The BluetoothHealthProfileHandler object is created by <em>BluetoothAdapter.getBluetoothProfileHandler()</em>.
11735 <ExtendedAttributeList>
11736 <ExtendedAttribute name="NoInterfaceObject">
11737 <webidl>NoInterfaceObject</webidl>
11738 </ExtendedAttribute>
11739 </ExtendedAttributeList>
11740 <InterfaceInheritance>
11741 <Name name="BluetoothProfileHandler"/>
11742 </InterfaceInheritance>
11743 <Operation name="registerSinkApplication" id="::Bluetooth::BluetoothHealthProfileHandler::registerSinkApplication">
11744 <webidl> void registerSinkApplication(unsigned short dataType, DOMString name, <ref>BluetoothHealthApplicationSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
11747 Registers an application for the Sink role.
11751 The ErrorCallback is launched with these error types:
11755 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
11757 UnknownError - If any other error occurs. </li>
11767 http://tizen.org/privilege/bluetooth.health
11769 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
11770 var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
11772 function healthRegisterSuccess(app) {
11773 console.log("Registered application: " + app.name);
11776 function healthRegisterError(e) {
11777 console.log("Failed to register application: " + e.message);
11780 healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
11783 <Type type="void"/>
11785 <Argument name="dataType">
11788 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.
11791 <Type type="unsigned short"/>
11793 <Argument name="name">
11796 The friendly name associated with sink application.
11799 <Type type="DOMString"/>
11801 <Argument name="successCallback">
11804 The method to invoke when a sink application is registered successfully.
11807 <Type name="BluetoothHealthApplicationSuccessCallback"/>
11809 <Argument optional="optional" name="errorCallback">
11812 The method to invoke when an error occurs.
11815 <Type name="ErrorCallback" nullable="nullable"/>
11819 <RaiseException name="WebAPIException">
11822 with error type SecurityError, if the application does not have the privilege to call this method.
11825 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
11828 with error type NotSupportedError, if this feature is not supported.
11834 <Operation name="connectToSource" id="::Bluetooth::BluetoothHealthProfileHandler::connectToSource">
11835 <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>
11838 Connect to the health device which acts as the Source role.
11842 The ErrorCallback is launched with these error types:
11846 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
11848 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
11850 UnknownError - If any other error occurs. </li>
11860 http://tizen.org/privilege/bluetooth.health
11862 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
11863 var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
11864 var registerHealthApp = null;
11866 function healthConnectSuccess(channel) {
11867 console.log("Health device is connected");
11870 function healthConnectError(e) {
11871 console.log("Failed to connect to source: " + e.message);
11874 function gotDeviceInfo(device) {
11875 healthProfileHandler.connectToSource(device, registerHealthApp, healthConnectSuccess, healthConnectError);
11878 function healthRegisterSuccess(app) {
11879 console.log("Registered application: " + app.name);
11880 registerHealthApp = app;
11881 var peer = adapter.getDevice("35:F4:59:D1:7A:03", gotDeviceInfo);
11884 function healthRegisterError(e) {
11885 console.log("Failed to register application: " + e.message);
11888 healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
11891 <Type type="void"/>
11893 <Argument name="peer">
11896 The remote device which acts as the Source role.
11899 <Type name="BluetoothDevice"/>
11901 <Argument name="application">
11904 The registered application for the Sink role.
11907 <Type name="BluetoothHealthApplication"/>
11909 <Argument name="successCallback">
11912 The method to invoke when a connection is established successfully.
11915 <Type name="BluetoothHealthChannelSuccessCallback"/>
11917 <Argument optional="optional" name="errorCallback">
11920 The method to invoke when an error occurs.
11923 <Type name="ErrorCallback" nullable="nullable"/>
11927 <RaiseException name="WebAPIException">
11930 with error type SecurityError, if the application does not have the privilege to call this method.
11933 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
11936 with error type NotSupportedError, if this feature is not supported.
11943 <Interface name="BluetoothHealthApplication" id="::Bluetooth::BluetoothHealthApplication">
11944 <webidl> [NoInterfaceObject] interface BluetoothHealthApplication {
11946 readonly attribute unsigned short dataType;
11948 readonly attribute DOMString name;
11950 [TreatNonCallableAsNull] attribute <ref>BluetoothHealthChannelSuccessCallback</ref>? onconnect raises(<ref>WebAPIException</ref>);
11952 void unregister(optional <ref>SuccessCallback</ref>? successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
11957 This interface represents the Bluetooth health application.
11963 <ExtendedAttributeList>
11964 <ExtendedAttribute name="NoInterfaceObject">
11965 <webidl>NoInterfaceObject</webidl>
11966 </ExtendedAttribute>
11967 </ExtendedAttributeList>
11968 <Attribute readonly="readonly" name="dataType" id="::Bluetooth::BluetoothHealthApplication::dataType">
11969 <webidl> readonly attribute unsigned short dataType;</webidl>
11972 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.
11978 <Type type="unsigned short"/>
11980 <Attribute readonly="readonly" name="name" id="::Bluetooth::BluetoothHealthApplication::name">
11981 <webidl> readonly attribute DOMString name;</webidl>
11984 The friendly name associated with sink application.
11990 <Type type="DOMString"/>
11992 <Attribute name="onconnect" id="::Bluetooth::BluetoothHealthApplication::onconnect">
11993 <webidl> [TreatNonCallableAsNull] attribute <ref>BluetoothHealthChannelSuccessCallback</ref>? onconnect raises(<ref>WebAPIException</ref>);</webidl>
11996 The callback invoked when a health device is connected through this application.
11997 By default, this attribute is set to null.
12003 <ExtendedAttributeList>
12004 <ExtendedAttribute name="TreatNonCallableAsNull">
12005 <webidl>TreatNonCallableAsNull</webidl>
12006 </ExtendedAttribute>
12007 </ExtendedAttributeList>
12008 <Type name="BluetoothHealthChannelSuccessCallback" nullable="nullable"/>
12010 <RaiseException name="WebAPIException">
12013 with error type TypeMismatchError, if an input attribute is not compatible with the expected type for this attribute.
12019 <Operation name="unregister" id="::Bluetooth::BluetoothHealthApplication::unregister">
12020 <webidl> void unregister(optional <ref>SuccessCallback</ref>? successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
12023 Unregisters this application.
12027 The ErrorCallback is launched with these error types:
12031 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
12033 UnknownError - If any other error occurs. </li>
12043 http://tizen.org/privilege/bluetooth.health
12045 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
12046 var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
12047 var healthApp = null;
12049 function healthRegisterSuccess(app) {
12050 console.log("Registered application: " + app.name);
12052 healthApp.onconnect = function(channel) {
12053 console.log("Connected!!");
12057 function healthRegisterError(e) {
12058 console.log("Failed to register application: " + e.message);
12061 function startSink() {
12063 healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
12065 console.log("Error: " + e.message);
12069 function stopSink() {
12071 if(healthApp != null) {
12072 healthApp.unregister(function() {
12074 console.log("Health application is unregistered.");
12077 console.log ("Error: " + e.message);
12081 console.log("Error: " + err.message);
12086 <Type type="void"/>
12088 <Argument optional="optional" name="successCallback">
12091 The method to invoke when a sink application is registered successfully.
12094 <Type name="SuccessCallback" nullable="nullable"/>
12096 <Argument optional="optional" name="errorCallback">
12099 The method to invoke when an error occurs.
12102 <Type name="ErrorCallback" nullable="nullable"/>
12106 <RaiseException name="WebAPIException">
12109 with error type SecurityError, if the application does not have the privilege to call this method.
12112 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
12115 with error type NotSupportedError, if this feature is not supported.
12122 <Interface name="BluetoothHealthChannel" id="::Bluetooth::BluetoothHealthChannel">
12123 <webidl> [NoInterfaceObject] interface BluetoothHealthChannel {
12125 readonly attribute <ref>BluetoothDevice</ref> peer;
12127 readonly attribute <ref>BluetoothHealthChannelType</ref> channelType;
12129 readonly attribute <ref>BluetoothHealthApplication</ref> application;
12131 readonly attribute boolean isConnected;
12133 void close() raises(<ref>WebAPIException</ref>);
12135 unsigned long sendData(byte[] data) raises(<ref>WebAPIException</ref>);
12137 void setListener(<ref>BluetoothHealthChannelChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);
12139 void unsetListener() raises(<ref>WebAPIException</ref>);
12144 This interface represents the Bluetooth health channel.
12150 <ExtendedAttributeList>
12151 <ExtendedAttribute name="NoInterfaceObject">
12152 <webidl>NoInterfaceObject</webidl>
12153 </ExtendedAttribute>
12154 </ExtendedAttributeList>
12155 <Attribute readonly="readonly" name="peer" id="::Bluetooth::BluetoothHealthChannel::peer">
12156 <webidl> readonly attribute <ref>BluetoothDevice</ref> peer;</webidl>
12159 The remote device to which this channel is connected.
12165 <Type name="BluetoothDevice"/>
12167 <Attribute readonly="readonly" name="channelType" id="::Bluetooth::BluetoothHealthChannel::channelType">
12168 <webidl> readonly attribute <ref>BluetoothHealthChannelType</ref> channelType;</webidl>
12171 The type of of this channel.
12177 <Type name="BluetoothHealthChannelType"/>
12179 <Attribute readonly="readonly" name="application" id="::Bluetooth::BluetoothHealthChannel::application">
12180 <webidl> readonly attribute <ref>BluetoothHealthApplication</ref> application;</webidl>
12183 The health application which is used to communicate with the remote device.
12189 <Type name="BluetoothHealthApplication"/>
12191 <Attribute readonly="readonly" name="isConnected" id="::Bluetooth::BluetoothHealthChannel::isConnected">
12192 <webidl> readonly attribute boolean isConnected;</webidl>
12195 An attrbitue to check whether any remote device is connected or not.
12201 <Type type="boolean"/>
12203 <Operation name="close" id="::Bluetooth::BluetoothHealthChannel::close">
12204 <webidl> void close() raises(<ref>WebAPIException</ref>);</webidl>
12207 Close the connected channel.
12208 <em>BluetoothHealthChannel.isConnected</em> is changed to <var>false</var> and <em>BluetoothHealthChannelChangeCallback.onclose</em> is invoked when this channel is closed successfully.
12217 http://tizen.org/privilege/bluetooth.health
12219 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
12220 var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
12222 function healthRegisterSuccess(app) {
12223 console.log("Registered application: " + app.name);
12224 app.onconnect = function(channel) {;
12225 console.log("Health device is connected");
12230 function healthRegisterError(e) {
12231 console.log("Failed to register application: " + e.message);
12234 healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
12237 <Type type="void"/>
12240 <RaiseException name="WebAPIException">
12243 with error type SecurityError, if the application does not have the privilege to call this method.
12246 with error type ServiceNotAvailableError - If a Bluetooth device is turned off.
12249 with error type UnknownError, if any other error occurs.
12252 with error type NotSupportedError, if this feature is not supported.
12258 <Operation name="sendData" id="::Bluetooth::BluetoothHealthChannel::sendData">
12259 <webidl> unsigned long sendData(byte[] data) raises(<ref>WebAPIException</ref>);</webidl>
12262 Send data and returns the number of bytes actually written.
12271 http://tizen.org/privilege/bluetooth.health
12273 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
12274 var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
12276 function healthRegisterSuccess(app) {
12277 console.log("Registered application: " + app.name);
12278 app.onconnect = function(channel) {
12279 console.log("Health device is connected");
12280 channel.sendData(dataToSend);
12284 function healthRegisterError(e) {
12285 console.log("Failed to register application: " + e.message);
12288 healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
12291 <Type type="unsigned long">
12294 unsigned long The number of bytes actually sent.
12299 <Argument name="data">
12305 <Type type="array">
12306 <Type type="byte"/>
12311 <RaiseException name="WebAPIException">
12314 with error type SecurityError, if the application does not have the privilege to call this method.
12317 with error type ServiceNotAvailableError - If a Bluetooth device is turned off.
12320 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
12323 with error type UnknownError, if any other error occurs.
12326 with error type NotSupportedError, if this feature is not supported.
12332 <Operation name="setListener" id="::Bluetooth::BluetoothHealthChannel::setListener">
12333 <webidl> void setListener(<ref>BluetoothHealthChannelChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);</webidl>
12336 Sets the listener to receive notifications.
12345 http://tizen.org/privilege/bluetooth.health
12347 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
12348 var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
12350 var channelCallback = {
12351 onmessage: function(data) {
12352 console.log("data is received")
12354 onclose: function() {
12355 console.log("channel is closed");
12359 function healthRegisterSuccess(app) {
12360 console.log("Registered application: " + app.name);
12361 app.onconnect = function(channel) {;
12362 console.log("Health device is connected");
12363 channel.setListener(channelCallback);
12367 function healthRegisterError(e) {
12368 console.log("Failed to register application: " + e.message);
12371 healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
12374 <Type type="void"/>
12376 <Argument name="listener">
12379 The event listener of Bluetooth health channel.
12382 <Type name="BluetoothHealthChannelChangeCallback"/>
12386 <RaiseException name="WebAPIException">
12389 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
12392 with error type SecurityError, if the application does not have the privilege to call this method.
12395 with error type UnknownError, if any other error occurs.
12401 <Operation name="unsetListener" id="::Bluetooth::BluetoothHealthChannel::unsetListener">
12402 <webidl> void unsetListener() raises(<ref>WebAPIException</ref>);</webidl>
12405 Unsets the listener, so stop receiving notifications.
12414 http://tizen.org/privilege/bluetooth.health
12416 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
12417 var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
12418 var connectedChannel = null;
12420 var channelCallback = {
12421 onmessage: function(data) {
12422 console.log("data is received")
12424 onclose: function() {
12425 console.log("channel is closed");
12426 connectedChannel.unsetListener();
12430 function healthRegisterSuccess(app) {
12431 console.log("Registered application: " + app.name);
12432 app.onconnect = function(channel) {;
12433 console.log("Health device is connected");
12434 connectedChannel = channel;
12435 connectedChannel.setListener(channelCallback);
12439 function healthRegisterError(e) {
12440 console.log("Failed to register application: " + e.message);
12443 healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
12446 <Type type="void"/>
12449 <RaiseException name="WebAPIException">
12452 with error type SecurityError, if the application does not have the privilege to call this method.
12455 with error type UnknownError, if any other error occurs.
12462 <Interface name="BluetoothAdapterChangeCallback" id="::Bluetooth::BluetoothAdapterChangeCallback">
12463 <webidl> [Callback, NoInterfaceObject] interface BluetoothAdapterChangeCallback {
12464 void onstatechanged(boolean powered);
12465 void onnamechanged(DOMString name);
12466 void onvisibilitychanged(boolean visible);
12470 This interface specifies a set of methods to be invoked when the changes of Bluetooth adapter occur.
12476 <ExtendedAttributeList>
12477 <ExtendedAttribute name="Callback">
12478 <webidl>Callback</webidl>
12479 </ExtendedAttribute>
12480 <ExtendedAttribute name="NoInterfaceObject">
12481 <webidl> NoInterfaceObject</webidl>
12482 </ExtendedAttribute>
12483 </ExtendedAttributeList>
12484 <Operation name="onstatechanged" id="::Bluetooth::BluetoothAdapterChangeCallback::onstatechanged">
12485 <webidl> void onstatechanged(boolean powered);</webidl>
12488 The method to be invoked when the power state is changed.
12494 <Type type="void"/>
12496 <Argument name="powered">
12499 The power state of local Bluetooth: <var>true</var> means power-on, <var>false</var> means power-off.
12502 <Type type="boolean"/>
12506 <Operation name="onnamechanged" id="::Bluetooth::BluetoothAdapterChangeCallback::onnamechanged">
12507 <webidl> void onnamechanged(DOMString name);</webidl>
12510 The method to be invoked when the name is changed.
12516 <Type type="void"/>
12518 <Argument name="name">
12521 The name of local Bluetooth.
12524 <Type type="DOMString"/>
12528 <Operation name="onvisibilitychanged" id="::Bluetooth::BluetoothAdapterChangeCallback::onvisibilitychanged">
12529 <webidl> void onvisibilitychanged(boolean visible);</webidl>
12532 The method to be invoked when the visibility is changed.
12538 <Type type="void"/>
12540 <Argument name="visible">
12543 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.
12546 <Type type="boolean"/>
12551 <Interface name="BluetoothDeviceSuccessCallback" id="::Bluetooth::BluetoothDeviceSuccessCallback">
12552 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothDeviceSuccessCallback {
12553 void onsuccess(<ref>BluetoothDevice</ref> device);
12557 This interface implements the success callback <em>BluetoothAdapter.getDevice() </em>and <em>BluetoothAdapter.createBonding()</em>.
12563 <ExtendedAttributeList>
12564 <ExtendedAttribute name="Callback" value="FunctionOnly">
12565 <webidl>Callback</webidl>
12566 </ExtendedAttribute>
12567 <ExtendedAttribute name="NoInterfaceObject">
12568 <webidl> NoInterfaceObject</webidl>
12569 </ExtendedAttribute>
12570 </ExtendedAttributeList>
12571 <Operation name="onsuccess" id="::Bluetooth::BluetoothDeviceSuccessCallback::onsuccess">
12572 <webidl> void onsuccess(<ref>BluetoothDevice</ref> device);</webidl>
12575 The method to be invoked on success.
12581 <Type type="void"/>
12583 <Argument name="device">
12586 The BluetoothDevice object.
12589 <Type name="BluetoothDevice"/>
12594 <Interface name="BluetoothDeviceArraySuccessCallback" id="::Bluetooth::BluetoothDeviceArraySuccessCallback">
12595 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothDeviceArraySuccessCallback {
12596 void onsuccess(<ref>BluetoothDevice</ref>[] devices);
12600 The success callback for <em>BluetoothAdapter.getKnownDevices()</em>.
12606 <ExtendedAttributeList>
12607 <ExtendedAttribute name="Callback" value="FunctionOnly">
12608 <webidl>Callback</webidl>
12609 </ExtendedAttribute>
12610 <ExtendedAttribute name="NoInterfaceObject">
12611 <webidl> NoInterfaceObject</webidl>
12612 </ExtendedAttribute>
12613 </ExtendedAttributeList>
12614 <Operation name="onsuccess" id="::Bluetooth::BluetoothDeviceArraySuccessCallback::onsuccess">
12615 <webidl> void onsuccess(<ref>BluetoothDevice</ref>[] devices);</webidl>
12618 The method to be invoked when device information is ready.
12624 <Type type="void"/>
12626 <Argument name="devices">
12629 List of devices known to local Bluetooth adapter. Each element is a BluetoothDevice.
12632 <Type type="array">
12633 <Type name="BluetoothDevice"/>
12639 <Interface name="BluetoothDiscoverDevicesSuccessCallback" id="::Bluetooth::BluetoothDiscoverDevicesSuccessCallback">
12640 <webidl> [Callback, NoInterfaceObject] interface BluetoothDiscoverDevicesSuccessCallback {
12642 void ondevicefound(<ref>BluetoothDevice</ref> device);
12643 void ondevicedisappeared(<ref>BluetoothAddress</ref> address);
12644 void onfinished(<ref>BluetoothDevice</ref>[] foundDevices);
12648 The success callback for <em>BluetoothAdapter.discoverDevices()</em>.
12654 <ExtendedAttributeList>
12655 <ExtendedAttribute name="Callback">
12656 <webidl>Callback</webidl>
12657 </ExtendedAttribute>
12658 <ExtendedAttribute name="NoInterfaceObject">
12659 <webidl> NoInterfaceObject</webidl>
12660 </ExtendedAttribute>
12661 </ExtendedAttributeList>
12662 <Operation name="onstarted" id="::Bluetooth::BluetoothDiscoverDevicesSuccessCallback::onstarted">
12663 <webidl> void onstarted();</webidl>
12666 The method to be invoked at the beginning of a device discovery process for finding the nearby Bluetooth device.
12672 <Type type="void"/>
12675 <Operation name="ondevicefound" id="::Bluetooth::BluetoothDiscoverDevicesSuccessCallback::ondevicefound">
12676 <webidl> void ondevicefound(<ref>BluetoothDevice</ref> device);</webidl>
12679 The method to be invoked when a new device is discovered in the process of inquiry/discovery.
12685 <Type type="void"/>
12687 <Argument name="device">
12693 <Type name="BluetoothDevice"/>
12697 <Operation name="ondevicedisappeared" id="::Bluetooth::BluetoothDiscoverDevicesSuccessCallback::ondevicedisappeared">
12698 <webidl> void ondevicedisappeared(<ref>BluetoothAddress</ref> address);</webidl>
12701 The method to be invoked when a device is lost from proximity.
12702 After that, this device is no longer visible.
12708 <Type type="void"/>
12710 <Argument name="address">
12713 The address of the device that is no longer in range or visible.
12716 <Type name="BluetoothAddress"/>
12720 <Operation name="onfinished" id="::Bluetooth::BluetoothDiscoverDevicesSuccessCallback::onfinished">
12721 <webidl> void onfinished(<ref>BluetoothDevice</ref>[] foundDevices);</webidl>
12724 The method to be invoked when the device discovery process has finished.
12730 <Type type="void"/>
12732 <Argument name="foundDevices">
12735 The array of devices found in this discovery session. </p></description>
12737 <Type type="array">
12738 <Type name="BluetoothDevice"/>
12744 <Interface name="BluetoothSocketSuccessCallback" id="::Bluetooth::BluetoothSocketSuccessCallback">
12745 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothSocketSuccessCallback {
12746 void onsuccess(<ref>BluetoothSocket</ref> socket);
12750 The success method for <em>BluetoothDevice.connectToServiceByUUID()</em>.
12756 <ExtendedAttributeList>
12757 <ExtendedAttribute name="Callback" value="FunctionOnly">
12758 <webidl>Callback</webidl>
12759 </ExtendedAttribute>
12760 <ExtendedAttribute name="NoInterfaceObject">
12761 <webidl> NoInterfaceObject</webidl>
12762 </ExtendedAttribute>
12763 </ExtendedAttributeList>
12764 <Operation name="onsuccess" id="::Bluetooth::BluetoothSocketSuccessCallback::onsuccess">
12765 <webidl> void onsuccess(<ref>BluetoothSocket</ref> socket);</webidl>
12768 The method to be invoked when the connection to a service is ready.
12774 <Type type="void"/>
12776 <Argument name="socket">
12779 The socket to connect to the specified service on a remote device.
12782 <Type name="BluetoothSocket"/>
12787 <Interface name="BluetoothServiceSuccessCallback" id="::Bluetooth::BluetoothServiceSuccessCallback">
12788 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothServiceSuccessCallback {
12789 void onsuccess(<ref>BluetoothServiceHandler</ref> handler);
12793 This interface implements the success callback for <em>BluetoothAdapter.registerRFCOMMServiceByUUID()</em>.
12799 <ExtendedAttributeList>
12800 <ExtendedAttribute name="Callback" value="FunctionOnly">
12801 <webidl>Callback</webidl>
12802 </ExtendedAttribute>
12803 <ExtendedAttribute name="NoInterfaceObject">
12804 <webidl> NoInterfaceObject</webidl>
12805 </ExtendedAttribute>
12806 </ExtendedAttributeList>
12807 <Operation name="onsuccess" id="::Bluetooth::BluetoothServiceSuccessCallback::onsuccess">
12808 <webidl> void onsuccess(<ref>BluetoothServiceHandler</ref> handler);</webidl>
12811 The method to be invoked when registering a service with the local device is successful.
12817 <Type type="void"/>
12819 <Argument name="handler">
12822 Bluetooth service handler.
12825 <Type name="BluetoothServiceHandler"/>
12830 <Interface name="BluetoothHealthApplicationSuccessCallback" id="::Bluetooth::BluetoothHealthApplicationSuccessCallback">
12831 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothHealthApplicationSuccessCallback {
12832 void onsuccess(<ref>BluetoothHealthApplication</ref> application);
12836 The success method for <em>BluetoothHealthProfileHandler.registerSinkApplication()</em>.
12842 <ExtendedAttributeList>
12843 <ExtendedAttribute name="Callback" value="FunctionOnly">
12844 <webidl>Callback</webidl>
12845 </ExtendedAttribute>
12846 <ExtendedAttribute name="NoInterfaceObject">
12847 <webidl> NoInterfaceObject</webidl>
12848 </ExtendedAttribute>
12849 </ExtendedAttributeList>
12850 <Operation name="onsuccess" id="::Bluetooth::BluetoothHealthApplicationSuccessCallback::onsuccess">
12851 <webidl> void onsuccess(<ref>BluetoothHealthApplication</ref> application);</webidl>
12854 The method to be invoked when the application is registered successfully.
12860 <Type type="void"/>
12862 <Argument name="application">
12865 The registered health application.
12868 <Type name="BluetoothHealthApplication"/>
12873 <Interface name="BluetoothHealthChannelSuccessCallback" id="::Bluetooth::BluetoothHealthChannelSuccessCallback">
12874 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothHealthChannelSuccessCallback {
12875 void onsuccess(<ref>BluetoothHealthChannel</ref> channel);
12879 The success method for <em>BluetoothHealthProfileHandler.connectToSource()</em> and the event callback for <em>BluetoothHealthApplication.onconnect</em>.
12885 <ExtendedAttributeList>
12886 <ExtendedAttribute name="Callback" value="FunctionOnly">
12887 <webidl>Callback</webidl>
12888 </ExtendedAttribute>
12889 <ExtendedAttribute name="NoInterfaceObject">
12890 <webidl> NoInterfaceObject</webidl>
12891 </ExtendedAttribute>
12892 </ExtendedAttributeList>
12893 <Operation name="onsuccess" id="::Bluetooth::BluetoothHealthChannelSuccessCallback::onsuccess">
12894 <webidl> void onsuccess(<ref>BluetoothHealthChannel</ref> channel);</webidl>
12897 The method to be invoked when a connection is established.
12903 <Type type="void"/>
12905 <Argument name="channel">
12908 The connected health channel.
12911 <Type name="BluetoothHealthChannel"/>
12916 <Interface name="BluetoothHealthChannelChangeCallback" id="::Bluetooth::BluetoothHealthChannelChangeCallback">
12917 <webidl> [Callback, NoInterfaceObject] interface BluetoothHealthChannelChangeCallback {
12918 void onmessage(byte[] data);
12924 This interface specifies a set of methods to be invoked when the changes of heath channel occur.
12930 <ExtendedAttributeList>
12931 <ExtendedAttribute name="Callback">
12932 <webidl>Callback</webidl>
12933 </ExtendedAttribute>
12934 <ExtendedAttribute name="NoInterfaceObject">
12935 <webidl> NoInterfaceObject</webidl>
12936 </ExtendedAttribute>
12937 </ExtendedAttributeList>
12938 <Operation name="onmessage" id="::Bluetooth::BluetoothHealthChannelChangeCallback::onmessage">
12939 <webidl> void onmessage(byte[] data);</webidl>
12942 The method to be invoked when the message is received.
12948 <Type type="void"/>
12950 <Argument name="data">
12956 <Type type="array">
12957 <Type type="byte"/>
12962 <Operation name="onclose" id="::Bluetooth::BluetoothHealthChannelChangeCallback::onclose">
12963 <webidl> void onclose();</webidl>
12966 The method to be invoked when the health channel is closed.
12972 <Type type="void"/>
12977 <Module name="Bookmark" id="::Bookmark">
12978 <webidl>module Bookmark {
12980 typedef (<ref>BookmarkItem</ref> or <ref>BookmarkFolder</ref>) Bookmark;
12983 [NoInterfaceObject] interface BookmarkManagerObject {
12984 readonly attribute <ref>BookmarkManager</ref> bookmark;
12986 <ref>Tizen</ref> implements <ref>BookmarkManagerObject</ref>;
12989 [NoInterfaceObject] interface BookmarkManager {
12991 <ref>Bookmark</ref>[] get(optional <ref>BookmarkFolder</ref>? parentFolder, optional boolean? recursive) raises(<ref>WebAPIException</ref>);
12993 void add(<ref>Bookmark</ref> bookmark, optional <ref>BookmarkFolder</ref>? parentFolder) raises(<ref>WebAPIException</ref>);
12995 void remove(optional <ref>Bookmark</ref>? bookmark) raises(<ref>WebAPIException</ref>);
13000 [Constructor(DOMString title, DOMString url)]
13002 interface BookmarkItem {
13004 readonly attribute <ref>BookmarkFolder</ref>? parent;
13006 readonly attribute DOMString title;
13008 readonly attribute DOMString url;
13012 [Constructor(DOMString title)]
13014 interface BookmarkFolder {
13016 readonly attribute <ref>BookmarkFolder</ref>? parent;
13018 readonly attribute DOMString title;
13024 This API provides interfaces and methods for accessing Bookmark.
13025 This API provides functionality to get, add, and remove bookmarks.
13029 For more information on the Bookmark features, see <a href="../../org.tizen.web.appprogramming/html/guide/social_guide/bookmark.htm">Bookmark Guide</a>.
13036 <Typedef name="Bookmark" id="::Bookmark::Bookmark">
13037 <webidl> typedef (<ref>BookmarkItem</ref> or <ref>BookmarkFolder</ref>) Bookmark;</webidl>
13040 A bookmark, which could be either a <em>BookmarkItem </em>or a <em>BookmarkFolder</em>.
13046 <Type type="union">
13047 <Type name="BookmarkItem"/>
13048 <Type name="BookmarkFolder"/>
13051 <Interface name="BookmarkManagerObject" id="::Bookmark::BookmarkManagerObject">
13052 <webidl> [NoInterfaceObject] interface BookmarkManagerObject {
13053 readonly attribute <ref>BookmarkManager</ref> bookmark;
13057 Defines what is instantiated by the Tizen object from the Tizen Platform.
13061 There will be a <em>tizen.bookmark </em>object that allows to access the functionality of the Bookmark API.
13068 <ExtendedAttributeList>
13069 <ExtendedAttribute name="NoInterfaceObject">
13070 <webidl>NoInterfaceObject</webidl>
13071 </ExtendedAttribute>
13072 </ExtendedAttributeList>
13073 <Attribute readonly="readonly" name="bookmark" id="::Bookmark::BookmarkManagerObject::bookmark">
13074 <webidl> readonly attribute <ref>BookmarkManager</ref> bookmark;</webidl>
13075 <Type name="BookmarkManager"/>
13078 <Implements name1="Tizen" name2="BookmarkManagerObject">
13079 <webidl> <ref>Tizen</ref> implements <ref>BookmarkManagerObject</ref>;</webidl>
13081 <Interface name="BookmarkManager" id="::Bookmark::BookmarkManager">
13082 <webidl> [NoInterfaceObject] interface BookmarkManager {
13084 <ref>Bookmark</ref>[] get(optional <ref>BookmarkFolder</ref>? parentFolder, optional boolean? recursive) raises(<ref>WebAPIException</ref>);
13086 void add(<ref>Bookmark</ref> bookmark, optional <ref>BookmarkFolder</ref>? parentFolder) raises(<ref>WebAPIException</ref>);
13088 void remove(optional <ref>Bookmark</ref>? bookmark) raises(<ref>WebAPIException</ref>);
13093 This interface provides access to the bookmark folder and bookmark item.
13097 It provides access to the API functionalities through the <em>tizen.bookmark </em>interface.
13104 <ExtendedAttributeList>
13105 <ExtendedAttribute name="NoInterfaceObject">
13106 <webidl>NoInterfaceObject</webidl>
13107 </ExtendedAttribute>
13108 </ExtendedAttributeList>
13109 <Operation name="get" id="::Bookmark::BookmarkManager::get">
13110 <webidl> <ref>Bookmark</ref>[] get(optional <ref>BookmarkFolder</ref>? parentFolder, optional boolean? recursive) raises(<ref>WebAPIException</ref>);</webidl>
13113 Gets all bookmark items and bookmark folders.
13117 If no parentFolder is passed, or the parentFolder contains <var>null</var>, it is considered as the default bookmark folder(The root bookmark folder).
13118 In this case, the return will contain bookmarks under the root bookmark folder.
13125 http://tizen.org/privilege/bookmark.read
13131 // retrieve bookmarks from the root bookmark folder recursively
13132 var allBookmarks = tizen.bookmark.get(null, true);
13134 console.log (err.name +": " + err.message);
13138 <Type type="array">
13141 Bookmark[] Array of Bookmarks.
13144 <Type name="Bookmark"/>
13147 <Argument optional="optional" name="parentFolder">
13150 The parent bookmark folder to retrieve the result bookmarks.
13153 <Type name="BookmarkFolder" nullable="nullable"/>
13155 <Argument optional="optional" name="recursive">
13158 The flag indicating whether sub-bookmarks are also retrieved recursively or not<br/> (The default value is <em>false</em>).
13161 <Type type="boolean" nullable="nullable"/>
13165 <RaiseException name="WebAPIException">
13168 with error type NotFoundError, if the parentFolder parameter isn't found in bookmark database.
13171 with error type TypeMismatchError, if an input parameter is not compatible with the expected type for that parameter.
13174 with error type SecurityError, if the application does not have the privilege to call this method.
13177 with error type UnknownError, if any other error occurs.
13183 <Operation name="add" id="::Bookmark::BookmarkManager::add">
13184 <webidl> void add(<ref>Bookmark</ref> bookmark, optional <ref>BookmarkFolder</ref>? parentFolder) raises(<ref>WebAPIException</ref>);</webidl>
13187 Adds a bookmark item or a bookmark folder.
13191 If no parentFolder is passed, or the parentFolder contains <var>null</var>, it is considered as the default bookmark folder(The root bookmark folder).
13192 In this case, the bookmark is added under the root bookmark folder.
13199 http://tizen.org/privilege/bookmark.write
13205 // add a bookmark item to root bookmark folder.
13206 tizen.bookmark.add(new tizen.BookmarkItem("tizen", "https://www.tizen.org"));
13208 console.log (err.name +": " + err.message);
13212 <Type type="void"/>
13214 <Argument name="bookmark">
13217 The bookmark to be added.
13220 <Type name="Bookmark"/>
13222 <Argument optional="optional" name="parentFolder">
13225 The parent folder of a bookmark to be added.
13228 <Type name="BookmarkFolder" nullable="nullable"/>
13232 <RaiseException name="WebAPIException">
13235 with error type NotFoundError, if a parentFolder parameter isn't found in bookmark database.
13238 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.
13241 with error type TypeMismatchError, if an input parameter is not compatible with the expected type for that parameter.
13244 with error type SecurityError, if the application does not have the privilege to call this method.
13247 with error type UnknownError, if any other error occurs.
13253 <Operation name="remove" id="::Bookmark::BookmarkManager::remove">
13254 <webidl> void remove(optional <ref>Bookmark</ref>? bookmark) raises(<ref>WebAPIException</ref>);</webidl>
13257 Removes a bookmark item or a bookmark folder.
13261 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).
13262 In this case, all the bookmarks will be removed.
13269 http://tizen.org/privilege/bookmark.write
13275 // remove all the bookmark folders and items
13276 tizen.bookmark.remove();
13278 console.log (err.name +": " + err.message);
13282 <Type type="void"/>
13284 <Argument optional="optional" name="bookmark">
13287 The bookmark to be removed.
13290 <Type name="Bookmark" nullable="nullable"/>
13294 <RaiseException name="WebAPIException">
13297 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
13300 with error type SecurityError, if the application does not have the privilege to call this method.
13303 with error type UnknownError, if any other error occurs.
13310 <Interface name="BookmarkItem" id="::Bookmark::BookmarkItem">
13311 <webidl> [Constructor(DOMString title, DOMString url)]
13313 interface BookmarkItem {
13315 readonly attribute <ref>BookmarkFolder</ref>? parent;
13317 readonly attribute DOMString title;
13319 readonly attribute DOMString url;
13324 This interface implements the <em>BookmarkItem </em>object.
13330 <ExtendedAttributeList>
13331 <ExtendedAttribute name="Constructor">
13332 <webidl>Constructor(DOMString title, DOMString url)</webidl>
13335 // create a bookmark item
13336 var tizen = new tizen.BookmarkItem("tizen", "https://www.tizen.org");
13338 console.log (err.name +": " + err.message);
13343 <Argument name="title">
13344 <Type type="DOMString"/>
13346 <Argument name="url">
13347 <Type type="DOMString"/>
13350 </ExtendedAttribute>
13351 </ExtendedAttributeList>
13352 <Attribute readonly="readonly" name="parent" id="::Bookmark::BookmarkItem::parent">
13353 <webidl> readonly attribute <ref>BookmarkFolder</ref>? parent;</webidl>
13356 The parent bookmark folder.
13360 This attribute is meaningful when this object is successfully added or retrieved.
13361 If this BookmarkItem is not added yet, its value is set to undefined.
13364 If the parent bookmark folder indicates the root bookmark folder, the value will be <var>null</var>.
13371 <Type name="BookmarkFolder" nullable="nullable"/>
13373 <Attribute readonly="readonly" name="title" id="::Bookmark::BookmarkItem::title">
13374 <webidl> readonly attribute DOMString title;</webidl>
13377 The title of the bookmark.
13383 <Type type="DOMString"/>
13385 <Attribute readonly="readonly" name="url" id="::Bookmark::BookmarkItem::url">
13386 <webidl> readonly attribute DOMString url;</webidl>
13389 The uri of the bookmark.
13395 <Type type="DOMString"/>
13398 <Interface name="BookmarkFolder" id="::Bookmark::BookmarkFolder">
13399 <webidl> [Constructor(DOMString title)]
13401 interface BookmarkFolder {
13403 readonly attribute <ref>BookmarkFolder</ref>? parent;
13405 readonly attribute DOMString title;
13410 This interface implements the <em>BookmarkFolder </em>object.
13416 <ExtendedAttributeList>
13417 <ExtendedAttribute name="Constructor">
13418 <webidl>Constructor(DOMString title)</webidl>
13421 // create a bookmark folder
13422 var folder = new tizen.BookmarkFolder("folder");
13424 console.log (err.name +": " + err.message);
13429 <Argument name="title">
13430 <Type type="DOMString"/>
13433 </ExtendedAttribute>
13434 </ExtendedAttributeList>
13435 <Attribute readonly="readonly" name="parent" id="::Bookmark::BookmarkFolder::parent">
13436 <webidl> readonly attribute <ref>BookmarkFolder</ref>? parent;</webidl>
13439 The parent bookmark folder.
13443 This attribute is meaningful when this object is successfully added or retrieved.
13444 If this BookmarkFolder is not added yet, its value is set to undefined.
13447 If the parent bookmark folder indicates the root bookmark folder, the value will be <var>null</var>.
13454 <Type name="BookmarkFolder" nullable="nullable"/>
13456 <Attribute readonly="readonly" name="title" id="::Bookmark::BookmarkFolder::title">
13457 <webidl> readonly attribute DOMString title;</webidl>
13460 The title of the bookmark folder.
13466 <Type type="DOMString"/>
13470 <Module name="Calendar" id="::Calendar">
13471 <webidl>module Calendar {
13472 typedef DOMString CalendarId;
13474 typedef DOMString CalendarTaskId;
13476 typedef (<ref>CalendarEventId</ref> or <ref>CalendarTaskId</ref>) CalendarItemId;
13478 enum CalendarType { "EVENT", "TASK" };
13480 enum CalendarTextFormat { "ICALENDAR_20", "VCALENDAR_10" };
13482 enum AlarmMethod { "SOUND", "DISPLAY" };
13485 enum RecurrenceRuleFrequency { "DAILY", "WEEKLY", "MONTHLY", "YEARLY" };
13487 enum ByDayValue { "MO", "TU", "WE", "TH", "FR", "SA", "SU" };
13489 enum EventAvailability { "BUSY", "FREE" };
13491 enum AttendeeType { "INDIVIDUAL", "GROUP", "RESOURCE", "ROOM", "UNKNOWN" };
13493 enum AttendeeStatus { "PENDING", "ACCEPTED", "DECLINED", "TENTATIVE", "DELEGATED", "COMPLETED", "IN_PROCESS" };
13495 enum AttendeeRole { "REQ_PARTICIPANT", "OPT_PARTICIPANT", "NON_PARTICIPANT", "CHAIR" };
13497 enum CalendarItemPriority { "HIGH", "MEDIUM", "LOW" };
13499 enum CalendarItemVisibility { "PUBLIC", "PRIVATE", "CONFIDENTIAL" };
13501 enum CalendarItemStatus { "TENTATIVE", "CONFIRMED", "CANCELLED", "NEEDS_ACTION", "IN_PROCESS", "COMPLETED" };
13503 [NoInterfaceObject] interface CalendarManagerObject{
13504 readonly attribute <ref>CalendarManager</ref> calendar;
13506 <ref>Tizen</ref> implements <ref>CalendarManagerObject</ref>;
13508 [NoInterfaceObject] interface CalendarManager {
13509 void getCalendars(<ref>CalendarType</ref> type,
13510 <ref>CalendarArraySuccessCallback</ref> successCallback,
13511 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
13513 <ref>Calendar</ref> getUnifiedCalendar(<ref>CalendarType</ref> type) raises(<ref>WebAPIException</ref>);
13515 <ref>Calendar</ref> getDefaultCalendar(<ref>CalendarType</ref> type) raises(<ref>WebAPIException</ref>);
13517 <ref>Calendar</ref> getCalendar(<ref>CalendarType</ref> type, <ref>CalendarId</ref> id) raises(<ref>WebAPIException</ref>);
13520 [NoInterfaceObject] interface Calendar {
13522 readonly attribute <ref>CalendarId</ref> id;
13524 readonly attribute DOMString name;
13526 <ref>CalendarItem</ref> get(<ref>CalendarItemId</ref> id) raises(<ref>WebAPIException</ref>);
13528 void add(<ref>CalendarItem</ref> item) raises(<ref>WebAPIException</ref>);
13530 void addBatch(<ref>CalendarItem</ref>[] items,
13531 optional <ref>CalendarItemArraySuccessCallback</ref>? successCallback,
13532 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
13534 void update(<ref>CalendarItem</ref> item,
13535 optional boolean? updateAllInstances) raises(<ref>WebAPIException</ref>);
13537 void updateBatch(<ref>CalendarItem</ref>[] items,
13538 optional <ref>SuccessCallback</ref>? successCallback,
13539 optional <ref>ErrorCallback</ref>? errorCallback,
13540 optional boolean? updateAllInstances) raises(<ref>WebAPIException</ref>);
13542 void remove(<ref>CalendarItemId</ref> id) raises(<ref>WebAPIException</ref>);
13544 void removeBatch(<ref>CalendarItemId</ref>[] ids,
13545 optional <ref>SuccessCallback</ref>? successCallback,
13546 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
13548 void find(<ref>CalendarItemArraySuccessCallback</ref> successCallback,
13549 optional <ref>ErrorCallback</ref>? errorCallback,
13550 optional <ref>AbstractFilter</ref>? filter,
13551 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);
13553 long addChangeListener(<ref>CalendarChangeCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);
13555 void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
13558 dictionary CalendarItemInit {
13559 DOMString description;
13562 <ref>TZDate</ref> startDate;
13563 <ref>TimeDuration</ref> duration;
13564 DOMString location;
13565 <ref>SimpleCoordinates</ref> geolocation;
13566 DOMString organizer;
13567 <ref>CalendarItemVisibility</ref> visibility;
13568 <ref>CalendarItemStatus</ref> status;
13569 <ref>CalendarItemPriority</ref> priority;
13570 <ref>CalendarAlarm</ref>[] alarms;
13571 DOMString[] categories;
13572 <ref>CalendarAttendee</ref>[] attendees;
13575 dictionary CalendarTaskInit: <ref>CalendarItemInit</ref> {
13576 <ref>TZDate</ref> dueDate;
13577 <ref>TZDate</ref> completedDate;
13581 dictionary CalendarEventInit: <ref>CalendarItemInit</ref> {
13582 <ref>TZDate</ref> endDate;
13583 <ref>EventAvailability</ref> availability;
13584 <ref>CalendarRecurrenceRule</ref> recurrenceRule;
13587 [NoInterfaceObject] interface CalendarItem {
13588 readonly attribute <ref>CalendarItemId</ref>? id;
13590 readonly attribute <ref>CalendarId</ref>? calendarId;
13592 readonly attribute <ref>TZDate</ref>? lastModificationDate;
13594 attribute DOMString? description setraises(<ref>WebAPIException</ref>);
13596 attribute DOMString? summary setraises(<ref>WebAPIException</ref>);
13598 attribute boolean isAllDay setraises(<ref>WebAPIException</ref>);
13600 attribute <ref>TZDate</ref>? startDate setraises(<ref>WebAPIException</ref>);
13602 attribute <ref>TimeDuration</ref>? duration setraises(<ref>WebAPIException</ref>);
13604 attribute DOMString? location setraises(<ref>WebAPIException</ref>);
13606 attribute <ref>SimpleCoordinates</ref>? geolocation setraises(<ref>WebAPIException</ref>);
13608 attribute DOMString? organizer setraises(<ref>WebAPIException</ref>);
13610 attribute <ref>CalendarItemVisibility</ref> visibility setraises(<ref>WebAPIException</ref>);
13612 attribute <ref>CalendarItemStatus</ref> status setraises(<ref>WebAPIException</ref>);
13614 attribute <ref>CalendarItemPriority</ref> priority setraises(<ref>WebAPIException</ref>);
13616 attribute <ref>CalendarAlarm</ref>[] alarms setraises(<ref>WebAPIException</ref>);
13618 attribute DOMString[] categories setraises(<ref>WebAPIException</ref>);
13620 attribute <ref>CalendarAttendee</ref>[] attendees setraises(<ref>WebAPIException</ref>);
13622 DOMString convertToString(<ref>CalendarTextFormat</ref> format) raises(<ref>WebAPIException</ref>);
13624 <ref>CalendarItem</ref> clone() raises(<ref>WebAPIException</ref>);
13627 [Constructor(optional <ref>CalendarTaskInit</ref>? taskInitDict),
13628 Constructor(DOMString stringRepresentation, <ref>CalendarTextFormat</ref> format)]
13629 interface CalendarTask : <ref>CalendarItem</ref> {
13630 attribute <ref>TZDate</ref>? dueDate setraises(<ref>WebAPIException</ref>);
13632 attribute <ref>TZDate</ref>? completedDate setraises(<ref>WebAPIException</ref>);
13634 attribute unsigned short progress setraises(<ref>WebAPIException</ref>);
13637 [Constructor(optional <ref>CalendarEventInit</ref>? eventInitDict),
13638 Constructor(DOMString stringRepresentation, <ref>CalendarTextFormat</ref> format)]
13639 interface CalendarEvent : <ref>CalendarItem</ref> {
13640 readonly attribute boolean isDetached;
13642 attribute <ref>TZDate</ref>? endDate setraises(<ref>WebAPIException</ref>);
13644 attribute <ref>EventAvailability</ref> availability setraises(<ref>WebAPIException</ref>);
13646 attribute <ref>CalendarRecurrenceRule</ref>? recurrenceRule setraises(<ref>WebAPIException</ref>);
13648 void expandRecurrence(<ref>TZDate</ref> startDate,
13649 <ref>TZDate</ref> endDate,
13650 <ref>CalendarEventArraySuccessCallback</ref> successCallback,
13651 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
13654 dictionary CalendarAttendeeInit {
13656 <ref>AttendeeRole</ref> role;
13657 <ref>AttendeeStatus</ref> status;
13659 <ref>AttendeeType</ref> type;
13661 DOMString delegatorURI;
13662 DOMString delegateURI;
13663 <ref>ContactRef</ref> contactRef;
13666 [Constructor(DOMString uri, optional <ref>CalendarAttendeeInit</ref>? attendeeInitDict)]
13667 interface CalendarAttendee
13669 attribute DOMString uri;
13671 attribute DOMString? name;
13673 attribute <ref>AttendeeRole</ref> role;
13675 attribute <ref>AttendeeStatus</ref> status;
13677 attribute boolean RSVP;
13679 attribute <ref>AttendeeType</ref> type;
13681 attribute DOMString? group;
13683 attribute DOMString? delegatorURI;
13685 attribute DOMString? delegateURI;
13687 attribute <ref>ContactRef</ref>? contactRef;
13690 dictionary CalendarRecurrenceRuleInit {
13692 <ref>TZDate</ref> untilDate;
13693 long occurrenceCount;
13694 <ref>ByDayValue</ref>[] daysOfTheWeek;
13695 short[] setPositions;
13696 <ref>TZDate</ref>[] exceptions;
13699 [Constructor(<ref>RecurrenceRuleFrequency</ref> frequency, optional <ref>CalendarRecurrenceRuleInit</ref>? ruleInitDict)]
13700 interface CalendarRecurrenceRule
13702 attribute <ref>RecurrenceRuleFrequency</ref> frequency;
13704 attribute unsigned short interval;
13706 attribute <ref>TZDate</ref>? untilDate;
13708 attribute long occurrenceCount;
13710 attribute <ref>ByDayValue</ref>[] daysOfTheWeek;
13712 attribute short[] setPositions;
13714 attribute <ref>TZDate</ref>[] exceptions;
13717 [Constructor(DOMString uid, optional DOMString? rid)]
13718 interface CalendarEventId {
13719 attribute DOMString uid;
13721 attribute DOMString? rid;
13724 [Constructor(<ref>TZDate</ref> absoluteDate, <ref>AlarmMethod</ref> method, optional DOMString? description),
13725 Constructor(<ref>TimeDuration</ref> before, <ref>AlarmMethod</ref> method, optional DOMString? description)]
13726 interface CalendarAlarm {
13727 attribute <ref>TZDate</ref>? absoluteDate setraises(<ref>WebAPIException</ref>);
13729 attribute <ref>TimeDuration</ref>? before setraises(<ref>WebAPIException</ref>);
13731 attribute <ref>AlarmMethod</ref> method setraises(<ref>WebAPIException</ref>);
13733 attribute DOMString? description;
13736 [Callback=FunctionOnly, NoInterfaceObject]
13737 interface CalendarEventArraySuccessCallback {
13738 void onsuccess(<ref>CalendarEvent</ref>[] events);
13741 [Callback=FunctionOnly, NoInterfaceObject]
13742 interface CalendarItemArraySuccessCallback {
13743 void onsuccess(<ref>CalendarItem</ref>[] items);
13746 [Callback=FunctionOnly, NoInterfaceObject]
13747 interface CalendarArraySuccessCallback {
13748 void onsuccess(<ref>Calendar</ref>[] calendars);
13751 [Callback, NoInterfaceObject] interface CalendarChangeCallback {
13752 void onitemsadded(<ref>CalendarItem</ref>[] items);
13754 void onitemsupdated(<ref>CalendarItem</ref>[] items);
13756 void onitemsremoved(<ref>CalendarItemId</ref>[] ids);
13761 This API provides interfaces and methods for users to manage their schedule.
13762 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.
13766 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>.
13769 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.
13772 For more information on the Calendar features, see <a href="../../org.tizen.web.appprogramming/html/guide/social_guide/calendar.htm">Calendar Guide</a>.
13779 <Typedef name="CalendarId" id="::Calendar::CalendarId">
13780 <webidl> typedef DOMString CalendarId;</webidl>
13783 An attribute to identify the calendar.
13789 <Type type="DOMString"/>
13791 <Typedef name="CalendarTaskId" id="::Calendar::CalendarTaskId">
13792 <webidl> typedef DOMString CalendarTaskId;</webidl>
13795 An attribute to identify a calendar task.
13801 <Type type="DOMString"/>
13803 <Typedef name="CalendarItemId" id="::Calendar::CalendarItemId">
13804 <webidl> typedef (<ref>CalendarEventId</ref> or <ref>CalendarTaskId</ref>) CalendarItemId;</webidl>
13807 A calendar item identifier, which can either be a <em>CalendarEventId </em>or a <em>CalendarTaskId</em>.
13813 <Type type="union">
13814 <Type name="CalendarEventId"/>
13815 <Type name="CalendarTaskId"/>
13818 <Enum name="CalendarType" id="::Calendar::CalendarType">
13819 <webidl> enum CalendarType { "EVENT", "TASK" };</webidl>
13822 An enumerator that indicates the type of a calendar.
13826 The following types are supported:
13830 EVENT - if a calendar contains events (VEVENT objects) </li>
13832 TASK - if a calendar contains tasks (VTODO objects) </li>
13839 <EnumValue stringvalue="EVENT">
13840 <webidl> "EVENT</webidl>
13842 <EnumValue stringvalue="TASK">
13843 <webidl> "TASK</webidl>
13846 <Enum name="CalendarTextFormat" id="::Calendar::CalendarTextFormat">
13847 <webidl> enum CalendarTextFormat { "ICALENDAR_20", "VCALENDAR_10" };</webidl>
13850 An enumerator that indicates the type of textual format of a Calendar.
13854 The following values are supported:
13858 ICALENDAR_20 - if the textual format is iCalendar v2.0 </li>
13860 VCALENDAR_10 - if the textual format is vCalendar v1.0 </li>
13867 <EnumValue stringvalue="ICALENDAR_20">
13868 <webidl> "ICALENDAR_20</webidl>
13870 <EnumValue stringvalue="VCALENDAR_10">
13871 <webidl> "VCALENDAR_10</webidl>
13874 <Enum name="AlarmMethod" id="::Calendar::AlarmMethod">
13875 <webidl> enum AlarmMethod { "SOUND", "DISPLAY" };</webidl>
13878 An enumerator that indicates the type of an alarm.
13882 The following values are supported:
13886 SOUND - if sound is played to alert the user </li>
13888 DISPLAY - if display on screen without any sound is used to alert the user </li>
13895 <EnumValue stringvalue="SOUND">
13896 <webidl> "SOUND</webidl>
13898 <EnumValue stringvalue="DISPLAY">
13899 <webidl> "DISPLAY</webidl>
13902 <Enum name="RecurrenceRuleFrequency" id="::Calendar::RecurrenceRuleFrequency">
13903 <webidl> enum RecurrenceRuleFrequency { "DAILY", "WEEKLY", "MONTHLY", "YEARLY" };</webidl>
13906 An enumerator that indicates the type of frequency for the recurrence of an event.
13910 Only the following values are valid for this attribute:
13914 DAILY - if the event occurs daily </li>
13916 WEEKLY - if the event occurs weekly </li>
13918 MONTHLY - if the event occurs monthly </li>
13920 YEARLY - if the event occurs yearly </li>
13927 <EnumValue stringvalue="DAILY">
13928 <webidl> "DAILY</webidl>
13930 <EnumValue stringvalue="WEEKLY">
13931 <webidl> "WEEKLY</webidl>
13933 <EnumValue stringvalue="MONTHLY">
13934 <webidl> "MONTHLY</webidl>
13936 <EnumValue stringvalue="YEARLY">
13937 <webidl> "YEARLY</webidl>
13940 <Enum name="ByDayValue" id="::Calendar::ByDayValue">
13941 <webidl> enum ByDayValue { "MO", "TU", "WE", "TH", "FR", "SA", "SU" };</webidl>
13944 An enumerator that indicates the values for <em>CalendarRecurrenceRule.daysOfWeek</em>.
13948 "MO" to "SU" correspond to "Monday" to "Sunday".
13955 <EnumValue stringvalue="MO">
13956 <webidl> "MO</webidl>
13958 <EnumValue stringvalue="TU">
13959 <webidl> "TU</webidl>
13961 <EnumValue stringvalue="WE">
13962 <webidl> "WE</webidl>
13964 <EnumValue stringvalue="TH">
13965 <webidl> "TH</webidl>
13967 <EnumValue stringvalue="FR">
13968 <webidl> "FR</webidl>
13970 <EnumValue stringvalue="SA">
13971 <webidl> "SA</webidl>
13973 <EnumValue stringvalue="SU">
13974 <webidl> "SU</webidl>
13977 <Enum name="EventAvailability" id="::Calendar::EventAvailability">
13978 <webidl> enum EventAvailability { "BUSY", "FREE" };</webidl>
13981 An enumerator that indicates the availability of time for an event.
13985 The following values are supported:
13989 FREE - if the specified time slot is vacant </li>
13991 BUSY - if the specified time slot is not vacant </li>
13993 BUSY-UNAVAILABLE - if the specified time slot is not vacant and can not be scheduled </li>
13995 BUSY-TENTATIVE - if the specified time slot is not vacant because one or more events have been tentatively scheduled for that interval </li>
14002 <EnumValue stringvalue="BUSY">
14003 <webidl> "BUSY</webidl>
14005 <EnumValue stringvalue="FREE">
14006 <webidl> "FREE</webidl>
14009 <Enum name="AttendeeType" id="::Calendar::AttendeeType">
14010 <webidl> enum AttendeeType { "INDIVIDUAL", "GROUP", "RESOURCE", "ROOM", "UNKNOWN" };</webidl>
14013 An enumerator that indicates the type of attendee.
14017 At least the following values must be supported:
14021 INDIVIDUAL - Individual </li>
14023 GROUP - Group of individuals </li>
14025 RESOURCE - Physical resource </li>
14027 ROOM - Room resource </li>
14029 UNKNOWN - Unknown </li>
14036 <EnumValue stringvalue="INDIVIDUAL">
14037 <webidl> "INDIVIDUAL</webidl>
14039 <EnumValue stringvalue="GROUP">
14040 <webidl> "GROUP</webidl>
14042 <EnumValue stringvalue="RESOURCE">
14043 <webidl> "RESOURCE</webidl>
14045 <EnumValue stringvalue="ROOM">
14046 <webidl> "ROOM</webidl>
14048 <EnumValue stringvalue="UNKNOWN">
14049 <webidl> "UNKNOWN</webidl>
14052 <Enum name="AttendeeStatus" id="::Calendar::AttendeeStatus">
14053 <webidl> enum AttendeeStatus { "PENDING", "ACCEPTED", "DECLINED", "TENTATIVE", "DELEGATED", "COMPLETED", "IN_PROCESS" };</webidl>
14056 An enumerator that indicates the attendance status of a participant.
14060 At least the following values must be supported:
14064 PENDING - if the participant has not yet responded to the event </li>
14066 ACCEPTED - if the participant has accepted the event </li>
14068 DECLINED - if the participant has declined the event </li>
14070 TENTATIVE - if the participant has tentatively accepted the event </li>
14072 DELEGATED - if the participant has delegated attendance to another participant </li>
14074 COMPLETED - if the participant's event has been completed </li>
14076 IN_PROCESS - if the participant's event is currently in process </li>
14083 <EnumValue stringvalue="PENDING">
14084 <webidl> "PENDING</webidl>
14086 <EnumValue stringvalue="ACCEPTED">
14087 <webidl> "ACCEPTED</webidl>
14089 <EnumValue stringvalue="DECLINED">
14090 <webidl> "DECLINED</webidl>
14092 <EnumValue stringvalue="TENTATIVE">
14093 <webidl> "TENTATIVE</webidl>
14095 <EnumValue stringvalue="DELEGATED">
14096 <webidl> "DELEGATED</webidl>
14098 <EnumValue stringvalue="COMPLETED">
14099 <webidl> "COMPLETED</webidl>
14101 <EnumValue stringvalue="IN_PROCESS">
14102 <webidl> "IN_PROCESS</webidl>
14105 <Enum name="AttendeeRole" id="::Calendar::AttendeeRole">
14106 <webidl> enum AttendeeRole { "REQ_PARTICIPANT", "OPT_PARTICIPANT", "NON_PARTICIPANT", "CHAIR" };</webidl>
14109 An enumerator that indicates the role of an attendee.
14113 At least the following values must be supported:
14117 REQ_PARTICIPANT - if the participation of an attendee is mandatory </li>
14119 OPT_PARTICIPANT - if the participation of an attendee is optional </li>
14121 NON_PARTICIPANT - if the attendee is not a participant but is copied for information purposes </li>
14123 CHAIR - if the attendee is the chairperson of the event. </li>
14130 <EnumValue stringvalue="REQ_PARTICIPANT">
14131 <webidl> "REQ_PARTICIPANT</webidl>
14133 <EnumValue stringvalue="OPT_PARTICIPANT">
14134 <webidl> "OPT_PARTICIPANT</webidl>
14136 <EnumValue stringvalue="NON_PARTICIPANT">
14137 <webidl> "NON_PARTICIPANT</webidl>
14139 <EnumValue stringvalue="CHAIR">
14140 <webidl> "CHAIR</webidl>
14143 <Enum name="CalendarItemPriority" id="::Calendar::CalendarItemPriority">
14144 <webidl> enum CalendarItemPriority { "HIGH", "MEDIUM", "LOW" };</webidl>
14147 An enumerator that indicates the priority of a calendar item.
14151 The following values are supported:
14155 HIGH - if item priority is high </li>
14157 MEDIUM - if item priority is medium </li>
14159 LOW - if item priority is low </li>
14166 <EnumValue stringvalue="HIGH">
14167 <webidl> "HIGH</webidl>
14169 <EnumValue stringvalue="MEDIUM">
14170 <webidl> "MEDIUM</webidl>
14172 <EnumValue stringvalue="LOW">
14173 <webidl> "LOW</webidl>
14176 <Enum name="CalendarItemVisibility" id="::Calendar::CalendarItemVisibility">
14177 <webidl> enum CalendarItemVisibility { "PUBLIC", "PRIVATE", "CONFIDENTIAL" };</webidl>
14180 An enumerator that indicates the visibility type of a calendar item.
14184 The following values are supported:
14188 PUBLIC - if item visibility is public </li>
14190 PRIVATE - if item visibility is private </li>
14192 CONFIDENTIAL - if item visibility is confidential </li>
14199 <EnumValue stringvalue="PUBLIC">
14200 <webidl> "PUBLIC</webidl>
14202 <EnumValue stringvalue="PRIVATE">
14203 <webidl> "PRIVATE</webidl>
14205 <EnumValue stringvalue="CONFIDENTIAL">
14206 <webidl> "CONFIDENTIAL</webidl>
14209 <Enum name="CalendarItemStatus" id="::Calendar::CalendarItemStatus">
14210 <webidl> enum CalendarItemStatus { "TENTATIVE", "CONFIRMED", "CANCELLED", "NEEDS_ACTION", "IN_PROCESS", "COMPLETED" };</webidl>
14213 An enumerator that indicates the status of a calendar item.
14217 For an event, the possible values are:
14221 TENTATIVE - if the event is tentative </li>
14223 CONFIRMED - if the event is confirmed </li>
14225 CANCELLED - if the event is cancelled </li>
14228 For a task, the possible values are:
14232 NEEDS_ACTION - if the task needs action </li>
14234 IN_PROCESS - if the task is in process or being worked on </li>
14236 COMPLETED - if the task has been completed </li>
14238 CANCELLED - if the task has been cancelled </li>
14245 <EnumValue stringvalue="TENTATIVE">
14246 <webidl> "TENTATIVE</webidl>
14248 <EnumValue stringvalue="CONFIRMED">
14249 <webidl> "CONFIRMED</webidl>
14251 <EnumValue stringvalue="CANCELLED">
14252 <webidl> "CANCELLED</webidl>
14254 <EnumValue stringvalue="NEEDS_ACTION">
14255 <webidl> "NEEDS_ACTION</webidl>
14257 <EnumValue stringvalue="IN_PROCESS">
14258 <webidl> "IN_PROCESS</webidl>
14260 <EnumValue stringvalue="COMPLETED">
14261 <webidl> "COMPLETED</webidl>
14264 <Interface name="CalendarManagerObject" id="::Calendar::CalendarManagerObject">
14265 <webidl> [NoInterfaceObject] interface CalendarManagerObject{
14266 readonly attribute <ref>CalendarManager</ref> calendar;
14270 This interface gives access to the Calendar API from the <em>tizen.calendar </em>object.
14276 <ExtendedAttributeList>
14277 <ExtendedAttribute name="NoInterfaceObject">
14278 <webidl>NoInterfaceObject</webidl>
14279 </ExtendedAttribute>
14280 </ExtendedAttributeList>
14281 <Attribute readonly="readonly" name="calendar" id="::Calendar::CalendarManagerObject::calendar">
14282 <webidl> readonly attribute <ref>CalendarManager</ref> calendar;</webidl>
14283 <Type name="CalendarManager"/>
14286 <Implements name1="Tizen" name2="CalendarManagerObject">
14287 <webidl> <ref>Tizen</ref> implements <ref>CalendarManagerObject</ref>;</webidl>
14289 <Interface name="CalendarManager" id="::Calendar::CalendarManager">
14290 <webidl> [NoInterfaceObject] interface CalendarManager {
14291 void getCalendars(<ref>CalendarType</ref> type,
14292 <ref>CalendarArraySuccessCallback</ref> successCallback,
14293 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
14295 <ref>Calendar</ref> getUnifiedCalendar(<ref>CalendarType</ref> type) raises(<ref>WebAPIException</ref>);
14297 <ref>Calendar</ref> getDefaultCalendar(<ref>CalendarType</ref> type) raises(<ref>WebAPIException</ref>);
14299 <ref>Calendar</ref> getCalendar(<ref>CalendarType</ref> type, <ref>CalendarId</ref> id) raises(<ref>WebAPIException</ref>);
14303 This interface provides methods to access calendars and attributes for calendars.
14304 Once a calendar object is obtained, it is possible to add, remove, or update the information it contains through the Calendar interface methods.
14310 <ExtendedAttributeList>
14311 <ExtendedAttribute name="NoInterfaceObject">
14312 <webidl>NoInterfaceObject</webidl>
14313 </ExtendedAttribute>
14314 </ExtendedAttributeList>
14315 <Operation name="getCalendars" id="::Calendar::CalendarManager::getCalendars">
14316 <webidl> void getCalendars(<ref>CalendarType</ref> type,
14317 <ref>CalendarArraySuccessCallback</ref> successCallback,
14318 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
14321 Gets an array of Calendar objects.
14325 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.
14328 If no Calendar object is available, the <em>successCallback()</em> is invoked with an empty array.
14331 The errorCallback is launched with these error types:
14335 InvalidValuesError - if any of the input parameters contain an invalid value. </li>
14337 UnknownError - if any other error occurs. </li>
14347 http://tizen.org/privilege/calendar.read
14349 <Code> var calendar;
14351 function eventFoundCallback(events) {
14352 // The event has been successfully found
14353 // Changes the summary
14354 events[0].summary = 'HTML6 Webinar';
14355 calendar.update(events[0]);
14356 console.log('First event was updated!');
14359 // Defines the error callback for all the asynchronous calls
14360 function errorCallback(response) {
14361 console.log( 'The following error occurred: ' + response.name);
14364 // Defines the success callback for retrieving the list of calendars
14365 function calendarListCallback(calendars) {
14366 if(calendars.length > 0) {
14367 calendar = calendars[0];
14368 console.log('The calendar id is ' + calendar.id + ' and name ' + calendar.name);
14370 var ev = new tizen.CalendarEvent({description:'HTML5 Introduction',
14371 summary:'HTML5 Webinar',
14372 startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
14373 duration: new tizen.TimeDuration(1, "HOURS"),
14374 location:'Huesca'});
14377 // The event has been successfully added
14378 // Checks if the added event can be retrieved from the calendar
14379 // If the calendar was empty, only the item added through add() should be returned
14380 var filter = new tizen.AttributeFilter('summary', 'CONTAINS', 'HTML5');
14381 calendar.find(eventFoundCallback, errorCallback, filter);
14385 // Gets a list of available calendars
14386 tizen.calendar.getCalendars("EVENT", calendarListCallback, errorCallback);
14389 <Type type="void"/>
14391 <Argument name="type">
14394 The type of calendar.
14397 <Type name="CalendarType"/>
14399 <Argument name="successCallback">
14402 The method to invoke when the invocation ends successfully.
14405 <Type name="CalendarArraySuccessCallback"/>
14407 <Argument optional="optional" name="errorCallback">
14410 The method to invoke when an error occurs.
14413 <Type name="ErrorCallback" nullable="nullable"/>
14417 <RaiseException name="WebAPIException">
14420 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14423 with error type SecurityError, if the application does not have the privilege to call this method.
14426 with error type NotSupportedError, if this feature is not supported.
14432 <Operation name="getUnifiedCalendar" id="::Calendar::CalendarManager::getUnifiedCalendar">
14433 <webidl> <ref>Calendar</ref> getUnifiedCalendar(<ref>CalendarType</ref> type) raises(<ref>WebAPIException</ref>);</webidl>
14436 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>.
14440 If an item is added to the unified calendar, it will be saved in the default calendar.
14450 http://tizen.org/privilege/calendar.read
14452 <Code> var unifiedCalendar;
14454 // Defines the error callback for all the asynchronous calls
14455 function errorCallback(response) {
14456 console.log( 'The following error occurred: ' + response.name);
14459 function eventFoundCallback(events) {
14460 // The event has been successfully found
14461 // Changes the summary
14462 events[0].summary = 'HTML6 Webinar';
14463 unifiedCalendar.update(events[0]);
14464 console.log('First event was updated!');
14467 // Gets the unified calendar
14468 unifiedCalendar = tizen.calendar.getUnifiedCalendar("EVENT");
14470 var ev = new tizen.CalendarEvent({description:'HTML5 Introduction',
14471 summary:'HTML5 Webinar ',
14472 startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
14473 duration: new tizen.TimeDuration(1, "HOURS"),
14474 location:'Huesca'});
14476 unifiedCalendar.add(ev);
14478 // The event has been added
14479 // Checks if the added event can be retrieved from the calendar
14480 // If the calendar was empty, only the item added through add() should be returned
14481 var filter = new tizen.AttributeFilter('summary', 'CONTAINS', 'HTML5');
14482 unifiedCalendar.find(eventFoundCallback, errorCallback, filter);
14486 <Type name="Calendar">
14489 Calendar The unified Calendar object.
14494 <Argument name="type">
14497 The type of a calendar.
14500 <Type name="CalendarType"/>
14504 <RaiseException name="WebAPIException">
14507 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14510 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
14513 with error type SecurityError, if the application does not have the privilege to call this method.
14516 with error type NotSupportedError, if this feature is not supported.
14519 with error type UnknownError, if any other error occurs.
14525 <Operation name="getDefaultCalendar" id="::Calendar::CalendarManager::getDefaultCalendar">
14526 <webidl> <ref>Calendar</ref> getDefaultCalendar(<ref>CalendarType</ref> type) raises(<ref>WebAPIException</ref>);</webidl>
14529 Gets the default calendar, which is used for new items.
14538 http://tizen.org/privilege/calendar.read
14540 <Code> var myCalendar;
14542 // Defines the error callback for all the asynchronous calls
14543 function errorCallback(response) {
14544 console.log( 'The following error occurred: ' + response.name);
14547 function eventFoundCallback(events) {
14548 // The event has been successfully found
14549 // Changes the summary
14550 events[0].summary = 'HTML6 Webinar';
14551 myCalendar.update(events[0]);
14552 console.log('First event was updated!');
14555 // Gets the default calendar
14556 myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
14558 var ev = new tizen.CalendarEvent({description:'HTML5 Introduction',
14559 summary:'HTML5 Webinar ',
14560 startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
14561 duration: new tizen.TimeDuration(1, "HOURS"),
14562 location:'Huesca'});
14564 myCalendar.add(ev);
14566 // The event has been added
14567 // Checks if the added event can be retrieved from the calendar
14568 // If the calendar was empty, only the item added through add() should be returned
14569 var filter = new tizen.AttributeFilter('summary', 'CONTAINS', 'HTML5');
14570 myCalendar.find(eventFoundCallback, errorCallback, filter);
14574 <Type name="Calendar">
14577 Calendar The default Calendar object.
14582 <Argument name="type">
14585 The type of a calendar.
14588 <Type name="CalendarType"/>
14592 <RaiseException name="WebAPIException">
14595 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14598 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
14601 with error type SecurityError, if the application does not have the privilege to call this method.
14604 with error type NotSupportedError, if this feature is not supported.
14607 with error type UnknownError, if any other error occurs.
14613 <Operation name="getCalendar" id="::Calendar::CalendarManager::getCalendar">
14614 <webidl> <ref>Calendar</ref> getCalendar(<ref>CalendarType</ref> type, <ref>CalendarId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
14617 Gets the calendar with the specified identifier and type.
14626 http://tizen.org/privilege/calendar.read
14628 <Code> var calendarId; // calendarId supposed to be initialized
14630 var calendar = tizen.calendar.getCalendar("EVENT", calendarId);
14631 console.log("Successfully retrieved event calendar with id: " + calendarId);
14633 console.log("Error: " + err.name);
14637 <Type name="Calendar">
14640 Calendar The matching Calendar object.
14645 <Argument name="type">
14648 The type of a calendar.
14651 <Type name="CalendarType"/>
14653 <Argument name="id">
14656 The calendar identifier.
14659 <Type name="CalendarId"/>
14663 <RaiseException name="WebAPIException">
14666 with error type NotFoundError, if there is no calendar with the given identifier.
14669 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14672 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
14675 with error type SecurityError, if the application does not have the privilege to call this method.
14678 with error type NotSupportedError, if this feature is not supported.
14681 with error type UnknownError, if any other error occurs.
14688 <Interface name="Calendar" id="::Calendar::Calendar">
14689 <webidl> [NoInterfaceObject] interface Calendar {
14691 readonly attribute <ref>CalendarId</ref> id;
14693 readonly attribute DOMString name;
14695 <ref>CalendarItem</ref> get(<ref>CalendarItemId</ref> id) raises(<ref>WebAPIException</ref>);
14697 void add(<ref>CalendarItem</ref> item) raises(<ref>WebAPIException</ref>);
14699 void addBatch(<ref>CalendarItem</ref>[] items,
14700 optional <ref>CalendarItemArraySuccessCallback</ref>? successCallback,
14701 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
14703 void update(<ref>CalendarItem</ref> item,
14704 optional boolean? updateAllInstances) raises(<ref>WebAPIException</ref>);
14706 void updateBatch(<ref>CalendarItem</ref>[] items,
14707 optional <ref>SuccessCallback</ref>? successCallback,
14708 optional <ref>ErrorCallback</ref>? errorCallback,
14709 optional boolean? updateAllInstances) raises(<ref>WebAPIException</ref>);
14711 void remove(<ref>CalendarItemId</ref> id) raises(<ref>WebAPIException</ref>);
14713 void removeBatch(<ref>CalendarItemId</ref>[] ids,
14714 optional <ref>SuccessCallback</ref>? successCallback,
14715 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
14717 void find(<ref>CalendarItemArraySuccessCallback</ref> successCallback,
14718 optional <ref>ErrorCallback</ref>? errorCallback,
14719 optional <ref>AbstractFilter</ref>? filter,
14720 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);
14722 long addChangeListener(<ref>CalendarChangeCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);
14724 void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
14728 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.
14732 This interface offers the following methods to manage events in a calendar:
14736 Finding items using a key-value filter. </li>
14738 Adding items to a specific calendar using <em>add() </em>/ <em>addBatch() </em>methods. </li>
14740 Updating existing items using <em>update() </em>/ <em>updateBatch()</em> methods. </li>
14742 Deleting existing items using <em>remove()</em> / <em>removeBatch() </em>methods. </li>
14744 Tracking calendar changes using <em>addChangeListener()</em> / <em>removeChangeListener() </em>methods. </li>
14751 <ExtendedAttributeList>
14752 <ExtendedAttribute name="NoInterfaceObject">
14753 <webidl>NoInterfaceObject</webidl>
14754 </ExtendedAttribute>
14755 </ExtendedAttributeList>
14756 <Attribute readonly="readonly" name="id" id="::Calendar::Calendar::id">
14757 <webidl> readonly attribute <ref>CalendarId</ref> id;</webidl>
14760 An attribute to uniquely identify a calendar.
14766 <Type name="CalendarId"/>
14768 <Attribute readonly="readonly" name="name" id="::Calendar::Calendar::name">
14769 <webidl> readonly attribute DOMString name;</webidl>
14772 An attribute to assign a readable (descriptive) name for a calendar, such as work, personal, etc.
14777 <Code> // Gets the default calendar and show its name
14778 var calendar = tizen.calendar.getDefaultCalendar("EVENT");
14779 console.log('The calendar name is ' + calendar.name);
14782 <Type type="DOMString"/>
14784 <Operation name="get" id="::Calendar::Calendar::get">
14785 <webidl> <ref>CalendarItem</ref> get(<ref>CalendarItemId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
14788 Gets the calendar item with the specified identifier.
14797 http://tizen.org/privilege/calendar.read
14799 <Code> var myCalendar; // Calendar supposed to be initialized
14800 var itemId; // Calendar item identifier
14802 var item = myCalendar.get(itemId);
14803 console.log("Successfully retrieved item with id: " + itemId);
14805 console.log("Error: " + err.name);
14809 <Type name="CalendarItem">
14812 CalendarItem The matching <em>CalendarItem </em>object.
14817 <Argument name="id">
14820 The Calendar item identifier.
14823 <Type name="CalendarItemId"/>
14827 <RaiseException name="WebAPIException">
14830 with error type NotFoundError, if there is no calendar item with the given identifier.
14833 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14836 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
14839 with error type SecurityError, if the application does not have the privilege to call this method.
14842 with error type NotSupportedError, if this feature is not supported.
14845 with error type UnknownError, if any other error occurs.
14851 <Operation name="add" id="::Calendar::Calendar::add">
14852 <webidl> void add(<ref>CalendarItem</ref> item) raises(<ref>WebAPIException</ref>);</webidl>
14855 Adds an item to the calendar synchronously.
14859 If the item is successfully inserted in the calendar, the <em>CalendarItem </em>will have its identifier (id attribute) set when the method returns.
14862 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.
14872 http://tizen.org/privilege/calendar.write
14874 <Code> // Gets the default calendar
14875 var calendar = tizen.calendar.getDefaultCalendar("EVENT");
14877 var ev = new tizen.CalendarEvent({description:'HTML5 Introduction',
14878 summary:'HTML5 Webinar ',
14879 startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
14880 duration: new tizen.TimeDuration(1, "HOURS"),
14881 location:'Huesca'});
14884 console.log('Event added with uid ' + ev.id.uid);
14887 <Type type="void"/>
14889 <Argument name="item">
14892 The calendar item to be added.
14895 <Type name="CalendarItem"/>
14899 <RaiseException name="WebAPIException">
14902 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14905 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
14908 with error type SecurityError, if the application does not have the privilege to call this method.
14911 with error type NotSupportedError, if the feature is not supported.
14914 with error type UnknownError, if any other error occurs.
14920 <Operation name="addBatch" id="::Calendar::Calendar::addBatch">
14921 <webidl> void addBatch(<ref>CalendarItem</ref>[] items,
14922 optional <ref>CalendarItemArraySuccessCallback</ref>? successCallback,
14923 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
14926 Adds an array of items to the calendar asynchronously.
14930 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).
14933 The <em>errorCallback()</em> is launched with these error types:
14937 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>
14939 UnknownError - if any other error occurs. </li>
14942 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.
14952 http://tizen.org/privilege/calendar.write
14954 <Code> // Defines the error callback.
14955 function errorCallback(response) {
14956 console.log( 'The following error occurred: ' + response.name);
14959 function addEventsSuccess(events) {
14960 console.log("Successfully added " + events.length + " events!");
14963 // Gets the default calendar
14964 var calendar = tizen.calendar.getDefaultCalendar("EVENT");
14966 var ev = new tizen.CalendarEvent({description:'HTML5 Introduction',
14967 summary:'HTML5 Webinar ',
14968 startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
14969 duration: new tizen.TimeDuration(1, "HOURS"),
14970 location:'Huesca'});
14972 calendar.addBatch([ev], addEventsSuccess, errorCallback);
14975 <Type type="void"/>
14977 <Argument name="items">
14980 The list of calendar items to add.
14983 <Type type="array">
14984 <Type name="CalendarItem"/>
14987 <Argument optional="optional" name="successCallback">
14990 The method to call when the invocation ends successfully.
14993 <Type name="CalendarItemArraySuccessCallback" nullable="nullable"/>
14995 <Argument optional="optional" name="errorCallback">
14998 The method to invoke when the request fails.
15001 <Type name="ErrorCallback" nullable="nullable"/>
15005 <RaiseException name="WebAPIException">
15008 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
15011 with error type SecurityError, if the application does not have the privilege to call this method.
15014 with error type NotSupportedError, if the feature is not supported.
15020 <Operation name="update" id="::Calendar::Calendar::update">
15021 <webidl> void update(<ref>CalendarItem</ref> item,
15022 optional boolean? updateAllInstances) raises(<ref>WebAPIException</ref>);</webidl>
15025 Updates an existing item in the calendar synchronously with the one specified in the argument.
15029 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>.
15039 http://tizen.org/privilege/calendar.write
15041 <Code> var myCalendar;
15043 // Defines the error callback.
15044 function errorCallback(response) {
15045 console.log( 'The following error occurred: ' + response.name);
15048 // Defines the event success callback.
15049 function eventSearchSuccessCallback(events) {
15050 events[0].description = 'New Description';
15051 // Updates the first existing event.
15052 myCalendar.update(events[0]);
15053 console.log("The first item description was updated!");
15056 // Gets the default calendar
15057 myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
15059 // Finds all events in a Calendar
15060 myCalendar.find(eventSearchSuccessCallback, errorCallback);
15063 <Type type="void"/>
15065 <Argument name="item">
15068 The Item object to update.
15071 <Type name="CalendarItem"/>
15073 <Argument optional="optional" name="updateAllInstances">
15076 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.
15079 <Type type="boolean" nullable="nullable"/>
15083 <RaiseException name="WebAPIException">
15086 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
15089 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
15092 with error type SecurityError, if the application does not have the privilege to call this method.
15095 with error type NotSupportedError, if the feature is not supported.
15098 with error type UnknownError, if any other error occurs.
15104 <Operation name="updateBatch" id="::Calendar::Calendar::updateBatch">
15105 <webidl> void updateBatch(<ref>CalendarItem</ref>[] items,
15106 optional <ref>SuccessCallback</ref>? successCallback,
15107 optional <ref>ErrorCallback</ref>? errorCallback,
15108 optional boolean? updateAllInstances) raises(<ref>WebAPIException</ref>);</webidl>
15111 Updates an array of existing items in the calendar asynchronously with the specified values in the argument.
15115 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.
15118 The <em>errorCallback() </em>is launched with these error types:
15122 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>
15124 UnknownError - if any other error occurs. </li>
15134 http://tizen.org/privilege/calendar.write
15136 <Code> var myCalendar;
15138 // Defines the error callback.
15139 function errorCallback(response) {
15140 console.log( 'The following error occurred: ' + response.name);
15143 // Defines the success callback
15144 function updateEventsSuccess() {
15145 console.log("Successfully updated !" );
15148 // Defines the event success callback.
15149 function eventSearchSuccessCallback(events) {
15150 events[0].description = 'New Description 1';
15151 events[1].description = 'New Description 2';
15152 // Update the first two existing events.
15153 myCalendar.updateBatch(events.slice(0,2), updateEventsSuccess, errorCallback);
15156 // Gets the default calendar
15157 myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
15159 // Finds all events in Calendar
15160 myCalendar.find(eventSearchSuccessCallback, errorCallback);
15163 <Type type="void"/>
15165 <Argument name="items">
15168 The list of calendar item objects to update.
15171 <Type type="array">
15172 <Type name="CalendarItem"/>
15175 <Argument optional="optional" name="successCallback">
15178 The method to invoke when the <em>updateEvents() </em>request succeeds.
15181 <Type name="SuccessCallback" nullable="nullable"/>
15183 <Argument optional="optional" name="errorCallback">
15186 The method to invoke when the <em>updateEvents() </em>request fails.
15189 <Type name="ErrorCallback" nullable="nullable"/>
15191 <Argument optional="optional" name="updateAllInstances">
15194 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.
15197 <Type type="boolean" nullable="nullable"/>
15201 <RaiseException name="WebAPIException">
15204 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
15207 with error type SecurityError, if the application does not have the privilege to call this method.
15210 with error type NotSupportedError, if the feature is not supported.
15216 <Operation name="remove" id="::Calendar::Calendar::remove">
15217 <webidl> void remove(<ref>CalendarItemId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
15220 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.
15229 http://tizen.org/privilege/calendar.write
15232 <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.
15234 <Code> var myCalendar;
15236 // Defines the error callback.
15237 function errorCallback(response) {
15238 console.log( 'The following error occurred: ' + response.name);
15241 // Defines the event success callback.
15242 function eventSearchSuccessCallback(events) {
15243 // Deletes the first existing event.
15244 myCalendar.remove(events[0].id);
15245 console.log('The first event was removed');
15248 // Gets default calendar
15249 myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
15251 // Finds all events in Calendar
15252 myCalendar.find(eventSearchSuccessCallback, errorCallback);
15255 <Type type="void"/>
15257 <Argument name="id">
15260 The identifier (ID attribute) of the item object to delete.
15263 <Type name="CalendarItemId"/>
15267 <RaiseException name="WebAPIException">
15270 with error type NotFoundError, if the identifier does not match any item in the calendar.
15273 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
15276 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
15279 with error type SecurityError, if the application does not have the privilege to call this method.
15282 with error type NotSupportedError, if the feature is not supported.
15285 with error type UnknownError, if the item could not be removed because of an unknown error.
15291 <Operation name="removeBatch" id="::Calendar::Calendar::removeBatch">
15292 <webidl> void removeBatch(<ref>CalendarItemId</ref>[] ids,
15293 optional <ref>SuccessCallback</ref>? successCallback,
15294 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
15297 Removes several items from the calendar asynchronously depending on the specified identifiers.
15301 The errorCallback is launched with these error types:
15305 NotFoundError - if an identifier in the <em>ids </em>parameter does not correspond to the ID attribute of an item in the calendar. </li>
15307 InvalidValuesError - if any of the input parameters contain an invalid value. </li>
15309 UnknownError - if any other error occurs. </li>
15319 http://tizen.org/privilege/calendar.write
15322 <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.
15324 <Code> var myCalendar;
15326 // Defines the error callback.
15327 function errorCallback(response) {
15328 console.log( 'The following error occurred: ' + response.name);
15331 // Defines the removeBatch callback
15332 function removeBatchCallback() {
15333 console.log("Requested events were successfully removed.");
15336 // Defines the event search success callback.
15337 function eventSearchSuccessCallback(events) {
15338 // Deletes the first two existing events.
15339 myCalendar.removeBatch([events[0].id, events[1].id],
15340 removeBatchCallback,
15344 // Gets default calendar
15345 myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
15347 // Retrieves all events in Calendar
15348 myCalendar.find(eventSearchSuccessCallback, errorCallback);
15351 <Type type="void"/>
15353 <Argument name="ids">
15356 The identifiers (<em>id </em>attribute) of the items to delete.
15359 <Type type="array">
15360 <Type name="CalendarItemId"/>
15363 <Argument optional="optional" name="successCallback">
15366 The method to invoke when the <em>removeBatch()</em> request succeeds.
15369 <Type name="SuccessCallback" nullable="nullable"/>
15371 <Argument optional="optional" name="errorCallback">
15374 The method to invoke when the <em>removeBatch()</em> request fails.
15377 <Type name="ErrorCallback" nullable="nullable"/>
15381 <RaiseException name="WebAPIException">
15384 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
15387 with error type SecurityError, if the application does not have the privilege to call this method.
15390 with error type NotSupportedError, if the feature is not supported.
15396 <Operation name="find" id="::Calendar::Calendar::find">
15397 <webidl> void find(<ref>CalendarItemArraySuccessCallback</ref> successCallback,
15398 optional <ref>ErrorCallback</ref>? errorCallback,
15399 optional <ref>AbstractFilter</ref>? filter,
15400 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);</webidl>
15403 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.
15407 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>.
15408 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>.
15409 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.
15412 The errorCallback is launched with these error types:
15416 InvalidValuesError - if any of the input parameters contain an invalid value. </li>
15418 UnknownError - if any other error occurs. </li>
15421 <b>Filter specific remarks:</b> </p>
15424 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>
15426 For event filtering based on the identifier, the identifier type should be CalendarEventID (<em>uid</em> and <em>rid</em>).
15427 If no recurrence ID is given, the filter will match both the parent event and all its detached instances. </li>
15437 http://tizen.org/privilege/calendar.read
15439 <Code> // Defines the error callback.
15440 function errorCallback(response) {
15441 console.log( 'The following error occurred: ' + response.name);
15444 // Defines the event search success callback.
15445 function eventSearchSuccessCallback(events) {
15446 console.log(events.length + ' results found.');
15449 // Gets default calendar
15450 var calendar = tizen.calendar.getDefaultCalendar("EVENT");
15452 // Finds all events the calendar that contain in the summary the string Tizen.
15453 var filter = new tizen.AttributeFilter('summary', 'CONTAINS', 'Tizen');
15455 // The events returned by the find() query will be sorted by ascending summary
15456 var sortingMode = new tizen.SortMode('summary', 'ASC');
15458 calendar.find(eventSearchSuccessCallback, errorCallback, filter, sortingMode);
15461 <Type type="void"/>
15463 <Argument name="successCallback">
15466 The method to call when the invocation ends successfully.
15469 <Type name="CalendarItemArraySuccessCallback"/>
15471 <Argument optional="optional" name="errorCallback">
15474 The method to call when an error occurs.
15477 <Type name="ErrorCallback" nullable="nullable"/>
15479 <Argument optional="optional" name="filter">
15482 The supplied data used to filter the results of the <em>find() </em>method.
15485 <Type name="AbstractFilter" nullable="nullable"/>
15487 <Argument optional="optional" name="sortMode">
15490 The sort order in which the items return.
15493 <Type name="SortMode" nullable="nullable"/>
15497 <RaiseException name="WebAPIException">
15500 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
15503 with error type SecurityError, if the application does not have the privilege to call this method.
15506 with error type NotSupportedError, if the feature is not supported.
15512 <Operation name="addChangeListener" id="::Calendar::Calendar::addChangeListener">
15513 <webidl> long addChangeListener(<ref>CalendarChangeCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);</webidl>
15516 Adds a listener to receive notifications about calendar changes.
15520 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.
15530 http://tizen.org/privilege/calendar.read
15532 <Code> var watcherId = 0; // watcher identifier
15533 var calendar; // This example assumes calendar is initialized
15536 onitemsadded: function(items) {
15537 console.log(items.length + ' items were added');
15539 onitemsupdated: function(items) {
15540 console.log(items.length + ' items were updated');
15542 onitemsremoved: function(ids) {
15543 console.log(ids.length + ' items were removed');
15547 // Registers to be notified when the calendar changes
15548 watcherId = calendar.addChangeListener(watcher);
15554 long The identifier used to clear the watch subscription.
15559 <Argument name="successCallback">
15562 The methods to invoke on receiving calendar change notifications.
15565 <Type name="CalendarChangeCallback"/>
15569 <RaiseException name="WebAPIException">
15572 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
15575 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
15578 with error type SecurityError, if the application does not have the privilege to call this method.
15581 with error type NotSupportedError, if the feature is not supported.
15584 with error type UnknownError, if any other error occurs.
15590 <Operation name="removeChangeListener" id="::Calendar::Calendar::removeChangeListener">
15591 <webidl> void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);</webidl>
15594 Unsubscribes from receiving notification for a calendar item changes.
15598 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.
15608 http://tizen.org/privilege/calendar.read
15610 <Code> var watcherId = 0; // watcher identifier
15611 var calendar; // This example assumes calendar is initialized
15613 // Receives calendar changes
15615 onitemsadded: function(items) {
15616 console.log(items.length + ' items were added');
15618 onitemsupdated: function(items) {
15619 console.log(evitemsents.length + ' items were updated');
15621 onitemsremoved: function(ids) {
15622 console.log(ids.length + ' items were removed');
15626 // Registers to be notified when the calendar changes
15627 watcherId = calendar.addChangeListener(watcher);
15629 // Cancels the watch operation
15630 calendar.removeChangeListener(watcherId);
15633 <Type type="void"/>
15635 <Argument name="watchId">
15638 Subscription Identifier.
15641 <Type type="long"/>
15645 <RaiseException name="WebAPIException">
15648 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
15651 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
15654 with error type SecurityError, if the application does not have the privilege to call this method.
15657 with error type NotSupportedError, if the feature is not supported.
15660 with error type UnknownError if any other error occurs.
15667 <Dictionary name="CalendarItemInit" id="::Calendar::CalendarItemInit">
15668 <webidl> dictionary CalendarItemInit {
15669 DOMString description;
15672 <ref>TZDate</ref> startDate;
15673 <ref>TimeDuration</ref> duration;
15674 DOMString location;
15675 <ref>SimpleCoordinates</ref> geolocation;
15676 DOMString organizer;
15677 <ref>CalendarItemVisibility</ref> visibility;
15678 <ref>CalendarItemStatus</ref> status;
15679 <ref>CalendarItemPriority</ref> priority;
15680 <ref>CalendarAlarm</ref>[] alarms;
15681 DOMString[] categories;
15682 <ref>CalendarAttendee</ref>[] attendees;
15686 A dictionary that is used for creating calendar items.
15690 These attributes are shared by both calendar events and tasks.
15697 <DictionaryMember name="description" id="::Calendar::CalendarItemInit::description">
15698 <webidl> DOMString description;</webidl>
15699 <Type type="DOMString"/>
15700 </DictionaryMember>
15701 <DictionaryMember name="summary" id="::Calendar::CalendarItemInit::summary">
15702 <webidl> DOMString summary;</webidl>
15703 <Type type="DOMString"/>
15704 </DictionaryMember>
15705 <DictionaryMember name="isAllDay" id="::Calendar::CalendarItemInit::isAllDay">
15706 <webidl> boolean isAllDay;</webidl>
15707 <Type type="boolean"/>
15708 </DictionaryMember>
15709 <DictionaryMember name="startDate" id="::Calendar::CalendarItemInit::startDate">
15710 <webidl> <ref>TZDate</ref> startDate;</webidl>
15711 <Type name="TZDate"/>
15712 </DictionaryMember>
15713 <DictionaryMember name="duration" id="::Calendar::CalendarItemInit::duration">
15714 <webidl> <ref>TimeDuration</ref> duration;</webidl>
15715 <Type name="TimeDuration"/>
15716 </DictionaryMember>
15717 <DictionaryMember name="location" id="::Calendar::CalendarItemInit::location">
15718 <webidl> DOMString location;</webidl>
15719 <Type type="DOMString"/>
15720 </DictionaryMember>
15721 <DictionaryMember name="geolocation" id="::Calendar::CalendarItemInit::geolocation">
15722 <webidl> <ref>SimpleCoordinates</ref> geolocation;</webidl>
15723 <Type name="SimpleCoordinates"/>
15724 </DictionaryMember>
15725 <DictionaryMember name="organizer" id="::Calendar::CalendarItemInit::organizer">
15726 <webidl> DOMString organizer;</webidl>
15727 <Type type="DOMString"/>
15728 </DictionaryMember>
15729 <DictionaryMember name="visibility" id="::Calendar::CalendarItemInit::visibility">
15730 <webidl> <ref>CalendarItemVisibility</ref> visibility;</webidl>
15731 <Type name="CalendarItemVisibility"/>
15732 </DictionaryMember>
15733 <DictionaryMember name="status" id="::Calendar::CalendarItemInit::status">
15734 <webidl> <ref>CalendarItemStatus</ref> status;</webidl>
15735 <Type name="CalendarItemStatus"/>
15736 </DictionaryMember>
15737 <DictionaryMember name="priority" id="::Calendar::CalendarItemInit::priority">
15738 <webidl> <ref>CalendarItemPriority</ref> priority;</webidl>
15739 <Type name="CalendarItemPriority"/>
15740 </DictionaryMember>
15741 <DictionaryMember name="alarms" id="::Calendar::CalendarItemInit::alarms">
15742 <webidl> <ref>CalendarAlarm</ref>[] alarms;</webidl>
15743 <Type type="array">
15744 <Type name="CalendarAlarm"/>
15746 </DictionaryMember>
15747 <DictionaryMember name="categories" id="::Calendar::CalendarItemInit::categories">
15748 <webidl> DOMString[] categories;</webidl>
15749 <Type type="array">
15750 <Type type="DOMString"/>
15752 </DictionaryMember>
15753 <DictionaryMember name="attendees" id="::Calendar::CalendarItemInit::attendees">
15754 <webidl> <ref>CalendarAttendee</ref>[] attendees;</webidl>
15755 <Type type="array">
15756 <Type name="CalendarAttendee"/>
15758 </DictionaryMember>
15760 <Dictionary name="CalendarTaskInit" id="::Calendar::CalendarTaskInit">
15761 <webidl> dictionary CalendarTaskInit: <ref>CalendarItemInit</ref> {
15762 <ref>TZDate</ref> dueDate;
15763 <ref>TZDate</ref> completedDate;
15768 A dictionary that is used for creating calendar tasks.
15772 It also provides an interface for specifying task attributes upon task creation (in the <em>CalendarTask </em>constructor).
15775 All the attributes are optional and are undefined by default.
15782 <DictionaryInheritance>
15783 <Name name="CalendarItemInit"/>
15784 </DictionaryInheritance>
15785 <DictionaryMember name="dueDate" id="::Calendar::CalendarTaskInit::dueDate">
15786 <webidl> <ref>TZDate</ref> dueDate;</webidl>
15787 <Type name="TZDate"/>
15788 </DictionaryMember>
15789 <DictionaryMember name="completedDate" id="::Calendar::CalendarTaskInit::completedDate">
15790 <webidl> <ref>TZDate</ref> completedDate;</webidl>
15791 <Type name="TZDate"/>
15792 </DictionaryMember>
15793 <DictionaryMember name="progress" id="::Calendar::CalendarTaskInit::progress">
15794 <webidl> short progress;</webidl>
15795 <Type type="short"/>
15796 </DictionaryMember>
15798 <Dictionary name="CalendarEventInit" id="::Calendar::CalendarEventInit">
15799 <webidl> dictionary CalendarEventInit: <ref>CalendarItemInit</ref> {
15800 <ref>TZDate</ref> endDate;
15801 <ref>EventAvailability</ref> availability;
15802 <ref>CalendarRecurrenceRule</ref> recurrenceRule;
15806 A dictionary that is used for creating calendar events.
15810 Provides an interface for specifying event attributes upon event creation (in the <em>CalendarEvent </em>constructor).
15813 All the attributes are optional and are undefined by default.
15820 <DictionaryInheritance>
15821 <Name name="CalendarItemInit"/>
15822 </DictionaryInheritance>
15823 <DictionaryMember name="endDate" id="::Calendar::CalendarEventInit::endDate">
15824 <webidl> <ref>TZDate</ref> endDate;</webidl>
15825 <Type name="TZDate"/>
15826 </DictionaryMember>
15827 <DictionaryMember name="availability" id="::Calendar::CalendarEventInit::availability">
15828 <webidl> <ref>EventAvailability</ref> availability;</webidl>
15829 <Type name="EventAvailability"/>
15830 </DictionaryMember>
15831 <DictionaryMember name="recurrenceRule" id="::Calendar::CalendarEventInit::recurrenceRule">
15832 <webidl> <ref>CalendarRecurrenceRule</ref> recurrenceRule;</webidl>
15833 <Type name="CalendarRecurrenceRule"/>
15834 </DictionaryMember>
15836 <Interface name="CalendarItem" id="::Calendar::CalendarItem">
15837 <webidl> [NoInterfaceObject] interface CalendarItem {
15838 readonly attribute <ref>CalendarItemId</ref>? id;
15840 readonly attribute <ref>CalendarId</ref>? calendarId;
15842 readonly attribute <ref>TZDate</ref>? lastModificationDate;
15844 attribute DOMString? description setraises(<ref>WebAPIException</ref>);
15846 attribute DOMString? summary setraises(<ref>WebAPIException</ref>);
15848 attribute boolean isAllDay setraises(<ref>WebAPIException</ref>);
15850 attribute <ref>TZDate</ref>? startDate setraises(<ref>WebAPIException</ref>);
15852 attribute <ref>TimeDuration</ref>? duration setraises(<ref>WebAPIException</ref>);
15854 attribute DOMString? location setraises(<ref>WebAPIException</ref>);
15856 attribute <ref>SimpleCoordinates</ref>? geolocation setraises(<ref>WebAPIException</ref>);
15858 attribute DOMString? organizer setraises(<ref>WebAPIException</ref>);
15860 attribute <ref>CalendarItemVisibility</ref> visibility setraises(<ref>WebAPIException</ref>);
15862 attribute <ref>CalendarItemStatus</ref> status setraises(<ref>WebAPIException</ref>);
15864 attribute <ref>CalendarItemPriority</ref> priority setraises(<ref>WebAPIException</ref>);
15866 attribute <ref>CalendarAlarm</ref>[] alarms setraises(<ref>WebAPIException</ref>);
15868 attribute DOMString[] categories setraises(<ref>WebAPIException</ref>);
15870 attribute <ref>CalendarAttendee</ref>[] attendees setraises(<ref>WebAPIException</ref>);
15872 DOMString convertToString(<ref>CalendarTextFormat</ref> format) raises(<ref>WebAPIException</ref>);
15874 <ref>CalendarItem</ref> clone() raises(<ref>WebAPIException</ref>);
15878 This is a parent interface that is used to create Calendar events and tasks.
15879 These attributes are shared by both events and tasks.
15885 <ExtendedAttributeList>
15886 <ExtendedAttribute name="NoInterfaceObject">
15887 <webidl>NoInterfaceObject</webidl>
15888 </ExtendedAttribute>
15889 </ExtendedAttributeList>
15890 <Attribute readonly="readonly" name="id" id="::Calendar::CalendarItem::id">
15891 <webidl> readonly attribute <ref>CalendarItemId</ref>? id;</webidl>
15894 An attribute to persistently and uniquely identify an item in implementation.
15898 Includes a UID and a possible recurrence ID that is needed to identify a particular instance of a recurring event.
15901 By default, this attribute is set to null.
15908 <Type name="CalendarItemId" nullable="nullable"/>
15910 <Attribute readonly="readonly" name="calendarId" id="::Calendar::CalendarItem::calendarId">
15911 <webidl> readonly attribute <ref>CalendarId</ref>? calendarId;</webidl>
15914 An attribute to identify the calendar in which this item is saved.
15918 By default, this attribute is set to null.
15925 <Type name="CalendarId" nullable="nullable"/>
15927 <Attribute readonly="readonly" name="lastModificationDate" id="::Calendar::CalendarItem::lastModificationDate">
15928 <webidl> readonly attribute <ref>TZDate</ref>? lastModificationDate;</webidl>
15931 An attribute to identify the last modified date and time of an item.
15935 This attribute is automatically populated and cannot be edited by the client.
15936 (See RFC 5545 - Section 3.8.7.3).
15943 <Type name="TZDate" nullable="nullable"/>
15945 <Attribute name="description" id="::Calendar::CalendarItem::description">
15946 <webidl> attribute DOMString? description setraises(<ref>WebAPIException</ref>);</webidl>
15949 An attribute to store the textual descriptions of an item.
15953 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.
15954 (See RFC 5545 - Section 3.8.1.5).
15957 The default value is an empty string.
15963 <Code> event.description = 'Tizen Codefest';
15966 <Type type="DOMString" nullable="nullable"/>
15968 <RaiseException name="WebAPIException"/>
15971 <Attribute name="summary" id="::Calendar::CalendarItem::summary">
15972 <webidl> attribute DOMString? summary setraises(<ref>WebAPIException</ref>);</webidl>
15975 An attribute to store a short summary or subject for an item.
15976 (See RFC 5545 - Section 3.8.1.12)
15980 The default value is an empty string.
15986 <Code> event.summary = 'Launching the Tizen reference implementation';
15989 <Type type="DOMString" nullable="nullable"/>
15991 <RaiseException name="WebAPIException"/>
15994 <Attribute name="isAllDay" id="::Calendar::CalendarItem::isAllDay">
15995 <webidl> attribute boolean isAllDay setraises(<ref>WebAPIException</ref>);</webidl>
15998 An attribute that behaves like a flag to indicate whether an event is an all-day event or not.
16002 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.
16005 The default value for this attribute is <var>false</var>.
16011 <Code> event.isAllDay = true; // All-Day event
16014 <Type type="boolean"/>
16016 <RaiseException name="WebAPIException"/>
16019 <Attribute name="startDate" id="::Calendar::CalendarItem::startDate">
16020 <webidl> attribute <ref>TZDate</ref>? startDate setraises(<ref>WebAPIException</ref>);</webidl>
16023 An attribute to store the start date/time for an item.
16024 (see RFC 5545 - Section 3.8.2.4).
16028 The default value for this attribute is <var>null</var>.
16031 <em>startDate</em> must be specified in the same time zone as <em>endDate / dueDate</em> if provided.
16039 This attribute is precise to the second. Milliseconds are ignored.
16042 <Code> // 2010-04-30 09:00
16043 event.startDate = new tizen.TZDate(2010, 3, 30, 9, 0);
16046 <Type name="TZDate" nullable="nullable"/>
16048 <RaiseException name="WebAPIException"/>
16051 <Attribute name="duration" id="::Calendar::CalendarItem::duration">
16052 <webidl> attribute <ref>TimeDuration</ref>? duration setraises(<ref>WebAPIException</ref>);</webidl>
16055 An attribute to denote the duration of the calendar component.
16056 (See RFC 5545 - Section 3.8.2.5).
16060 By default, this attribute is set to <var>null</var>.
16063 <em>duration</em> and <em>endDate / dueDate</em> are mutually exclusive, hence, only one of them can be non-null.
16066 This attribute is precise to the second. Milliseconds are ignored.
16070 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.
16075 <Code> // 1 hour meeting
16076 event.duration = new tizen.TimeDuration(1, "HOURS");
16079 <Type name="TimeDuration" nullable="nullable"/>
16081 <RaiseException name="WebAPIException"/>
16084 <Attribute name="location" id="::Calendar::CalendarItem::location">
16085 <webidl> attribute DOMString? location setraises(<ref>WebAPIException</ref>);</webidl>
16088 An attribute to store the location or the intended venue for the activity defined by the calendar item.
16089 (See RFC 5545 - Section 3.8.1.7)
16093 The default value for this attribute is an empty string.
16099 <Code> event.location = 'Huesca';
16102 <Type type="DOMString" nullable="nullable"/>
16104 <RaiseException name="WebAPIException"/>
16107 <Attribute name="geolocation" id="::Calendar::CalendarItem::geolocation">
16108 <webidl> attribute <ref>SimpleCoordinates</ref>? geolocation setraises(<ref>WebAPIException</ref>);</webidl>
16111 An attribute to store the global position latitude and longitude of the location where the event is planned to take place.
16112 (See RFC 5545 - Section 3.8.1.6).
16117 <Code> event.geolocation = new tizen.SimpleCoordinates(60.175, 24.934);
16120 <Type name="SimpleCoordinates" nullable="nullable"/>
16122 <RaiseException name="WebAPIException"/>
16125 <Attribute name="organizer" id="::Calendar::CalendarItem::organizer">
16126 <webidl> attribute DOMString? organizer setraises(<ref>WebAPIException</ref>);</webidl>
16129 An attribute to store the name of the person who organized this event.
16130 (See RFC 5545 - Section 3.8.4.3).
16134 By default, this attribute is initialized to an empty string.
16140 <Code> event.organizer = 'Mr. Jones';
16143 <Type type="DOMString" nullable="nullable"/>
16145 <RaiseException name="WebAPIException"/>
16148 <Attribute name="visibility" id="::Calendar::CalendarItem::visibility">
16149 <webidl> attribute <ref>CalendarItemVisibility</ref> visibility setraises(<ref>WebAPIException</ref>);</webidl>
16152 An attribute to mark the visibility (secrecy) level of the item.
16153 (See RFC 5545 - Section 3.8.1.3).
16157 The default value is <var>PUBLIC</var>.
16164 <Type name="CalendarItemVisibility"/>
16166 <RaiseException name="WebAPIException"/>
16169 <Attribute name="status" id="::Calendar::CalendarItem::status">
16170 <webidl> attribute <ref>CalendarItemStatus</ref> status setraises(<ref>WebAPIException</ref>);</webidl>
16173 An attribute to store the overall confirmation status for a calendar component.
16174 (See RFC 5545 - Section 3.8.1.11).
16178 For an event, the default value is <var>CONFIRMED</var>. For a task, the default value is <var>NEEDS_ACTION</var>.
16184 <Code> event.status = "TENTATIVE";
16187 <Type name="CalendarItemStatus"/>
16189 <RaiseException name="WebAPIException"/>
16192 <Attribute name="priority" id="::Calendar::CalendarItem::priority">
16193 <webidl> attribute <ref>CalendarItemPriority</ref> priority setraises(<ref>WebAPIException</ref>);</webidl>
16196 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.
16197 (See RFC 5545 - Section 3.8.1.9).
16201 The default value for this attribute is <var>LOW </var>priority.
16204 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:
16218 <Code> task.priority = "HIGH";
16221 <Type name="CalendarItemPriority"/>
16223 <RaiseException name="WebAPIException"/>
16226 <Attribute name="alarms" id="::Calendar::CalendarItem::alarms">
16227 <webidl> attribute <ref>CalendarAlarm</ref>[] alarms setraises(<ref>WebAPIException</ref>);</webidl>
16230 An attribute array to lists the alarms (or reminders) associated to an item.
16235 <Code> ev.startDate = new tizen.TZDate(2011, 2, 11, 8, 0, 0);
16236 // Gives a sound notification 30 minutes before the item's start time
16237 var alarm = new tizen.CalendarAlarm(new tizen.TimeDuration(30, "MINS"),
16238 "SOUND");
16239 ev.alarms = [alarm];
16242 <Type type="array">
16243 <Type name="CalendarAlarm"/>
16246 <RaiseException name="WebAPIException"/>
16249 <Attribute name="categories" id="::Calendar::CalendarItem::categories">
16250 <webidl> attribute DOMString[] categories setraises(<ref>WebAPIException</ref>);</webidl>
16253 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.
16254 (See RFC 5545 - Section 3.8.1.2).
16258 Examples of categories are personal, work, vacation, travel, etc.
16261 By default, this attribute is set to an empty array.
16267 <Code> event.categories = ['Personal'];
16270 <Type type="array">
16271 <Type type="DOMString"/>
16274 <RaiseException name="WebAPIException"/>
16277 <Attribute name="attendees" id="::Calendar::CalendarItem::attendees">
16278 <webidl> attribute <ref>CalendarAttendee</ref>[] attendees setraises(<ref>WebAPIException</ref>);</webidl>
16281 An attribute array that lists the people attending an event.
16282 (See RFC 5545 - Section 3.8.4.3).
16286 By default, this attribute is set to an empty array.
16292 <Code> var attendee = new tizen.CalendarAttendee('mailto:bob@domain.com',
16293 {role: "CHAIR", RSVP: true});
16294 event.attendees = [attendee];
16297 <Type type="array">
16298 <Type name="CalendarAttendee"/>
16301 <RaiseException name="WebAPIException"/>
16304 <Operation name="convertToString" id="::Calendar::CalendarItem::convertToString">
16305 <webidl> DOMString convertToString(<ref>CalendarTextFormat</ref> format) raises(<ref>WebAPIException</ref>);</webidl>
16308 Converts the calendar item to a string format that will be generated and returned synchronously.
16309 The export format is set using the format parameter.
16318 http://tizen.org/privilege/calendar.read
16320 <Code> // Defines the event search success callback.
16321 function eventSearchSuccessCallback(events) {
16322 // Converts the first event to iCalendar 2.0 format (default)
16323 var vevent = events[0].convertToString("ICALENDAR_20");
16324 console.log('iCalendar 2.0 representation of the event is: ' + vevent);
16327 function errorCallback(response) {
16328 console.log( 'The following error occurred: ' + response.name);
16331 // Gets the default calendar
16332 var myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
16334 // Finds all events in the first calendar that contain in the summary the string Tizen.
16335 var filter = new tizen.AttributeFilter('summary', 'CONTAINS', 'Tizen');
16336 myCalendar.find(eventSearchSuccessCallback, errorCallback, filter);
16339 <Type type="DOMString">
16342 DOMString The representation of the Calendar item.
16347 <Argument name="format">
16350 The format to use for exporting.
16353 <Type name="CalendarTextFormat"/>
16357 <RaiseException name="WebAPIException">
16360 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
16363 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
16366 with error type SecurityError, if the application does not have the privilege to call this method.
16369 with error type NotSupportedError, if the feature is not supported.
16372 with error type UnknownError, if any other error occurs.
16378 <Operation name="clone" id="::Calendar::CalendarItem::clone">
16379 <webidl> <ref>CalendarItem</ref> clone() raises(<ref>WebAPIException</ref>);</webidl>
16382 Clones the <em>CalendarItem </em>object, detached from any calendar.
16386 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.
16396 http://tizen.org/privilege/calendar.read
16398 <Code> // Gets default calendar.
16399 var calendar = tizen.calendar.getDefaultCalendar();
16401 var html5seminar = new tizen.CalendarEvent({startDate: new tizen.TZDate(2012, 3, 4),
16402 duration: new tizen.TimeDuration(3, "DAYS"),
16403 summary: "HTML5 Seminar"});
16405 calendar.add(html5seminar);
16406 var tizenseminar = html5seminar.clone();
16407 tizenseminar.summary = "Tizen Seminar";
16408 calendar.add(tizenseminar);
16411 <Type name="CalendarItem">
16414 CalendarItem The new clone of the <em>CalendarItem </em>object.
16420 <RaiseException name="WebAPIException">
16423 with error type SecurityError, if the application does not have the privilege to call this method.
16426 with error type NotSupportedError, if the feature is not supported.
16429 with error type UnknownError if any other error occurs.
16436 <Interface name="CalendarTask" id="::Calendar::CalendarTask">
16437 <webidl> [Constructor(optional <ref>CalendarTaskInit</ref>? taskInitDict),
16438 Constructor(DOMString stringRepresentation, <ref>CalendarTextFormat</ref> format)]
16439 interface CalendarTask : <ref>CalendarItem</ref> {
16440 attribute <ref>TZDate</ref>? dueDate setraises(<ref>WebAPIException</ref>);
16442 attribute <ref>TZDate</ref>? completedDate setraises(<ref>WebAPIException</ref>);
16444 attribute unsigned short progress setraises(<ref>WebAPIException</ref>);
16448 An interface that implements the <em>CalendarTask </em>object.
16454 <ExtendedAttributeList>
16455 <ExtendedAttribute name="Constructor">
16456 <webidl>Constructor(optional <ref>CalendarTaskInit</ref>? taskInitDict)</webidl>
16458 <Argument optional="optional" name="taskInitDict">
16459 <Type name="CalendarTaskInit" nullable="nullable"/>
16462 </ExtendedAttribute>
16463 <ExtendedAttribute name="Constructor">
16464 <webidl> Constructor(DOMString stringRepresentation, <ref>CalendarTextFormat</ref> format)</webidl>
16466 <Argument name="stringRepresentation">
16467 <Type type="DOMString"/>
16469 <Argument name="format">
16470 <Type name="CalendarTextFormat"/>
16473 </ExtendedAttribute>
16474 </ExtendedAttributeList>
16475 <InterfaceInheritance>
16476 <Name name="CalendarItem"/>
16477 </InterfaceInheritance>
16478 <Attribute name="dueDate" id="::Calendar::CalendarTask::dueDate">
16479 <webidl> attribute <ref>TZDate</ref>? dueDate setraises(<ref>WebAPIException</ref>);</webidl>
16482 An attribute to store the due date and time for completing a task. (See RFC 5545 - Section 3.8.2.3).
16486 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.
16489 This attribute is precise to the second. Milliseconds are ignored.
16492 The default value is <var>null</var>. If no value is provided, the task doesn't have a due date.
16498 <Code> task.dueDate = new tizen.TZDate(2011, 2, 11);
16501 <Type name="TZDate" nullable="nullable"/>
16503 <RaiseException name="WebAPIException"/>
16506 <Attribute name="completedDate" id="::Calendar::CalendarTask::completedDate">
16507 <webidl> attribute <ref>TZDate</ref>? completedDate setraises(<ref>WebAPIException</ref>);</webidl>
16510 An attribute to record the date and time when an task is completed.
16511 (See RFC 5545 - Section 3.8.2.1).
16515 This attribute is precise to the second. Milliseconds are ignored.
16518 The default value is <var>null</var>. If no value is provided, the task is not completed yet.
16524 <Code> task.completedDate = new tizen.TZDate(2011, 2, 11);
16527 <Type name="TZDate" nullable="nullable"/>
16529 <RaiseException name="WebAPIException"/>
16532 <Attribute name="progress" id="::Calendar::CalendarTask::progress">
16533 <webidl> attribute unsigned short progress setraises(<ref>WebAPIException</ref>);</webidl>
16536 An attribute to denote the percent of completion of a task.
16540 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.
16543 Integer values in between indicate the percent partially complete.
16544 (See RFC 5545 - Section 3.8.1.8).
16547 The default value is <var>0</var>, implies that the task has not been started.
16553 <Code> task.progress = 50; // 50% done
16556 <Type type="unsigned short"/>
16558 <RaiseException name="WebAPIException"/>
16562 <Interface name="CalendarEvent" id="::Calendar::CalendarEvent">
16563 <webidl> [Constructor(optional <ref>CalendarEventInit</ref>? eventInitDict),
16564 Constructor(DOMString stringRepresentation, <ref>CalendarTextFormat</ref> format)]
16565 interface CalendarEvent : <ref>CalendarItem</ref> {
16566 readonly attribute boolean isDetached;
16568 attribute <ref>TZDate</ref>? endDate setraises(<ref>WebAPIException</ref>);
16570 attribute <ref>EventAvailability</ref> availability setraises(<ref>WebAPIException</ref>);
16572 attribute <ref>CalendarRecurrenceRule</ref>? recurrenceRule setraises(<ref>WebAPIException</ref>);
16574 void expandRecurrence(<ref>TZDate</ref> startDate,
16575 <ref>TZDate</ref> endDate,
16576 <ref>CalendarEventArraySuccessCallback</ref> successCallback,
16577 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
16581 An interface that implements the <em>calendarEvent </em>object.
16586 <Code> // Gets the default calendar
16587 var calendar = tizen.calendar.getDefaultCalendar("EVENT");
16590 var ev = new tizen.CalendarEvent("BEGIN:VCALENDAR\r\n" +
16591 "BEGIN:VEVENT\r\n" +
16592 "DTSTAMP:19970901T1300Z\r\n" +
16593 "DTSTART:19970903T163000Z\r\n" +
16594 "DTEND:19970903T190000Z\r\n" +
16595 "SUMMARY:Annual Employee Review\r\n" +
16596 "CATEGORIES:BUSINESS,HUMAN RESOURCES\r\n" +
16597 "END:VEVENT\r\n" +
16598 "END:VCALENDAR", "ICALENDAR_20");
16601 console.log('Event added with UID ' + ev.id.uid);
16603 console.log("Failed to add VEVENT to the calendar, error: " + err.name);
16607 <ExtendedAttributeList>
16608 <ExtendedAttribute name="Constructor">
16609 <webidl>Constructor(optional <ref>CalendarEventInit</ref>? eventInitDict)</webidl>
16611 <Argument optional="optional" name="eventInitDict">
16612 <Type name="CalendarEventInit" nullable="nullable"/>
16615 </ExtendedAttribute>
16616 <ExtendedAttribute name="Constructor">
16617 <webidl> Constructor(DOMString stringRepresentation, <ref>CalendarTextFormat</ref> format)</webidl>
16619 <Argument name="stringRepresentation">
16620 <Type type="DOMString"/>
16622 <Argument name="format">
16623 <Type name="CalendarTextFormat"/>
16626 </ExtendedAttribute>
16627 </ExtendedAttributeList>
16628 <InterfaceInheritance>
16629 <Name name="CalendarItem"/>
16630 </InterfaceInheritance>
16631 <Attribute readonly="readonly" name="isDetached" id="::Calendar::CalendarEvent::isDetached">
16632 <webidl> readonly attribute boolean isDetached;</webidl>
16635 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.
16641 <Type type="boolean"/>
16643 <Attribute name="endDate" id="::Calendar::CalendarEvent::endDate">
16644 <webidl> attribute <ref>TZDate</ref>? endDate setraises(<ref>WebAPIException</ref>);</webidl>
16647 An attribute to store the end date/time of an event.
16651 (see RFC 5545 - Section 3.8.2.2).
16654 This <em>endDate</em> must be in the same time zone as the <em>startDate</em>.
16655 Note that <em>duration</em> and <em>endDate</em> are mutually exclusive, only one of them can be non-null.
16658 This attribute is precise to the second. Milliseconds are ignored.
16661 The default value for this attribute is <var>null</var>.
16667 <Code> // 2010-04-30 09:00
16668 event.endDate = new tizen.TZDate(2010, 3, 30, 9, 0);
16671 <Type name="TZDate" nullable="nullable"/>
16673 <RaiseException name="WebAPIException"/>
16676 <Attribute name="availability" id="::Calendar::CalendarEvent::availability">
16677 <webidl> attribute <ref>EventAvailability</ref> availability setraises(<ref>WebAPIException</ref>);</webidl>
16680 An attribute to indicate the availability of a person for an event.
16681 (See RFC 5545 - Section 3.2.9).
16685 The default value is <var>BUSY</var>.
16692 <Type name="EventAvailability"/>
16694 <RaiseException name="WebAPIException"/>
16697 <Attribute name="recurrenceRule" id="::Calendar::CalendarEvent::recurrenceRule">
16698 <webidl> attribute <ref>CalendarRecurrenceRule</ref>? recurrenceRule setraises(<ref>WebAPIException</ref>);</webidl>
16701 An attribute to denote the recurrence rule for the event.
16705 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.
16708 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.
16709 (See RFC 5545, Section 3.3.10.)
16715 <Code> // Repeats daily for 7 days
16716 var rule = new tizen.CalendarRecurrenceRule("DAILY", {occurrenceCount: 7});
16717 event.recurrenceRule = rule;
16720 <Type name="CalendarRecurrenceRule" nullable="nullable"/>
16722 <RaiseException name="WebAPIException"/>
16725 <Operation name="expandRecurrence" id="::Calendar::CalendarEvent::expandRecurrence">
16726 <webidl> void expandRecurrence(<ref>TZDate</ref> startDate,
16727 <ref>TZDate</ref> endDate,
16728 <ref>CalendarEventArraySuccessCallback</ref> successCallback,
16729 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
16732 Expands a recurring event and returns asynchronously the list of instances occurring in a given time interval (inclusive).
16736 This method takes into consideration all the parameters of the event recurrence rule to generate the instances occurring in a given time interval.
16739 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.
16742 The errorCallback is launched with these error types:
16746 InvalidValuesError - if the event in operation is not recurring. </li>
16748 UnknownError - if any other error occurs. </li>
16758 http://tizen.org/privilege/calendar.read
16760 <Code> // eventId should be set to ID of event obtained with the find function.
16762 // Defines the error callback.
16763 function errorCallback(response) {
16764 console.log( 'The following error occurred: ' + response.name);
16767 // Defines the event expanding success callback.
16768 function eventExpandingSuccessCallback(events) {
16769 console.log(events.length + ' event instances were returned.');
16772 var calendar = tizen.calendar.getDefaultCalendar();
16773 var event = calendar.get(eventId);
16775 if (event.recurrenceRule != null) {
16776 // This is a recurring event. Expand all the instances during August 2011.
16777 event.expandRecurrence(new tizen.TZDate(2011, 7, 1),
16778 new tizen.TZDate(2011, 7, 31),
16779 eventExpandingSuccessCallback,
16784 <Type type="void"/>
16786 <Argument name="startDate">
16789 The start date/ time of an event(inclusive).
16792 <Type name="TZDate"/>
16794 <Argument name="endDate">
16797 The end date/ time of an event (inclusive).
16800 <Type name="TZDate"/>
16802 <Argument name="successCallback">
16805 The method to call when the invocation ends successfully.
16808 <Type name="CalendarEventArraySuccessCallback"/>
16810 <Argument optional="optional" name="errorCallback">
16813 The method to call when an error occurs.
16816 <Type name="ErrorCallback" nullable="nullable"/>
16820 <RaiseException name="WebAPIException">
16823 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
16826 with error type SecurityError, if the application does not have the privilege to call this method.
16829 with error type NotSupportedError, if the feature is not supported.
16836 <Dictionary name="CalendarAttendeeInit" id="::Calendar::CalendarAttendeeInit">
16837 <webidl> dictionary CalendarAttendeeInit {
16839 <ref>AttendeeRole</ref> role;
16840 <ref>AttendeeStatus</ref> status;
16842 <ref>AttendeeType</ref> type;
16844 DOMString delegatorURI;
16845 DOMString delegateURI;
16846 <ref>ContactRef</ref> contactRef;
16850 The properties of a <em>CalendarAttendee</em>, to pass to its constructor.
16854 See <em>CalendarAttendee </em>interface for more information about the members.
16861 <DictionaryMember name="name" id="::Calendar::CalendarAttendeeInit::name">
16862 <webidl> DOMString name;</webidl>
16863 <Type type="DOMString"/>
16864 </DictionaryMember>
16865 <DictionaryMember name="role" id="::Calendar::CalendarAttendeeInit::role">
16866 <webidl> <ref>AttendeeRole</ref> role;</webidl>
16867 <Type name="AttendeeRole"/>
16868 </DictionaryMember>
16869 <DictionaryMember name="status" id="::Calendar::CalendarAttendeeInit::status">
16870 <webidl> <ref>AttendeeStatus</ref> status;</webidl>
16871 <Type name="AttendeeStatus"/>
16872 </DictionaryMember>
16873 <DictionaryMember name="RSVP" id="::Calendar::CalendarAttendeeInit::RSVP">
16874 <webidl> boolean RSVP;</webidl>
16875 <Type type="boolean"/>
16876 </DictionaryMember>
16877 <DictionaryMember name="type" id="::Calendar::CalendarAttendeeInit::type">
16878 <webidl> <ref>AttendeeType</ref> type;</webidl>
16879 <Type name="AttendeeType"/>
16880 </DictionaryMember>
16881 <DictionaryMember name="group" id="::Calendar::CalendarAttendeeInit::group">
16882 <webidl> DOMString? group;</webidl>
16883 <Type type="DOMString" nullable="nullable"/>
16884 </DictionaryMember>
16885 <DictionaryMember name="delegatorURI" id="::Calendar::CalendarAttendeeInit::delegatorURI">
16886 <webidl> DOMString delegatorURI;</webidl>
16887 <Type type="DOMString"/>
16888 </DictionaryMember>
16889 <DictionaryMember name="delegateURI" id="::Calendar::CalendarAttendeeInit::delegateURI">
16890 <webidl> DOMString delegateURI;</webidl>
16891 <Type type="DOMString"/>
16892 </DictionaryMember>
16893 <DictionaryMember name="contactRef" id="::Calendar::CalendarAttendeeInit::contactRef">
16894 <webidl> <ref>ContactRef</ref> contactRef;</webidl>
16895 <Type name="ContactRef"/>
16896 </DictionaryMember>
16898 <Interface name="CalendarAttendee" id="::Calendar::CalendarAttendee">
16899 <webidl> [Constructor(DOMString uri, optional <ref>CalendarAttendeeInit</ref>? attendeeInitDict)]
16900 interface CalendarAttendee
16902 attribute DOMString uri;
16904 attribute DOMString? name;
16906 attribute <ref>AttendeeRole</ref> role;
16908 attribute <ref>AttendeeStatus</ref> status;
16910 attribute boolean RSVP;
16912 attribute <ref>AttendeeType</ref> type;
16914 attribute DOMString? group;
16916 attribute DOMString? delegatorURI;
16918 attribute DOMString? delegateURI;
16920 attribute <ref>ContactRef</ref>? contactRef;
16924 This interface implements the <em>CalendarAttendee </em>object that contains information about an event attendee.
16928 By default, each of the attributes of this interface are undefined.
16931 (For more details, see RFC 5545, Section 3.8.4.1.)
16937 <Code> var attendee = new tizen.CalendarAttendee('mailto:bob@domain.com',
16938 {role: "CHAIR", RSVP: true});
16939 event.attendees = [attendee];
16942 <ExtendedAttributeList>
16943 <ExtendedAttribute name="Constructor">
16944 <webidl>Constructor(DOMString uri, optional <ref>CalendarAttendeeInit</ref>? attendeeInitDict)</webidl>
16946 <Argument name="uri">
16947 <Type type="DOMString"/>
16949 <Argument optional="optional" name="attendeeInitDict">
16950 <Type name="CalendarAttendeeInit" nullable="nullable"/>
16953 </ExtendedAttribute>
16954 </ExtendedAttributeList>
16955 <Attribute name="uri" id="::Calendar::CalendarAttendee::uri">
16956 <webidl> attribute DOMString uri;</webidl>
16959 An attribute to store the URI for the attendee.
16963 This is often an email in the form 'mailto:name@domain.com'.
16970 <Type type="DOMString"/>
16972 <Attribute name="name" id="::Calendar::CalendarAttendee::name">
16973 <webidl> attribute DOMString? name;</webidl>
16976 An attribute to store the name of an attendee.
16982 <Type type="DOMString" nullable="nullable"/>
16984 <Attribute name="role" id="::Calendar::CalendarAttendee::role">
16985 <webidl> attribute <ref>AttendeeRole</ref> role;</webidl>
16988 An attribute to denote the role of the attendee.
16992 (See RFC 5545, Section 3.2.16.)
16995 The default value is <var>REQ_PARTICIPANT</var>.
17002 <Type name="AttendeeRole"/>
17004 <Attribute name="status" id="::Calendar::CalendarAttendee::status">
17005 <webidl> attribute <ref>AttendeeStatus</ref> status;</webidl>
17008 An attribute to store the participant's attendance status.
17009 (See RFC 5545, Section 3.2.12.)
17013 The default value is <var>PENDING</var>.
17020 <Type name="AttendeeStatus"/>
17022 <Attribute name="RSVP" id="::Calendar::CalendarAttendee::RSVP">
17023 <webidl> attribute boolean RSVP;</webidl>
17026 An attribute to store the attendee's participation status reply (RSVP).
17027 (See RFC 5545, Section 3.2.17.)
17031 By default, this attribute is set to <var>FALSE</var>.
17038 <Type type="boolean"/>
17040 <Attribute name="type" id="::Calendar::CalendarAttendee::type">
17041 <webidl> attribute <ref>AttendeeType</ref> type;</webidl>
17044 An attribute to indicate the type of a participant.
17045 (See RFC 5545, Section 3.2.3.)
17049 The default value is <var>INDIVIDUAL</var>.
17056 <Type name="AttendeeType"/>
17058 <Attribute name="group" id="::Calendar::CalendarAttendee::group">
17059 <webidl> attribute DOMString? group;</webidl>
17062 An attribute to store the participant's group or list membership.
17063 (See RFC 5545, Section 3.2.11.)
17069 <Type type="DOMString" nullable="nullable"/>
17071 <Attribute name="delegatorURI" id="::Calendar::CalendarAttendee::delegatorURI">
17072 <webidl> attribute DOMString? delegatorURI;</webidl>
17075 An attribute to store the URI of the person who has delegated their participation to this attendee.
17076 (See RFC 5545, Section 3.2.4.)
17082 <Type type="DOMString" nullable="nullable"/>
17084 <Attribute name="delegateURI" id="::Calendar::CalendarAttendee::delegateURI">
17085 <webidl> attribute DOMString? delegateURI;</webidl>
17088 An attribute to stores the URI of the attendee to whom the person has delegated his participation.
17089 (See RFC 5545, Section 3.2.5.)
17095 <Type type="DOMString" nullable="nullable"/>
17097 <Attribute name="contactRef" id="::Calendar::CalendarAttendee::contactRef">
17098 <webidl> attribute <ref>ContactRef</ref>? contactRef;</webidl>
17101 An attribute to store the participant's reference in the Contact API.
17105 If the contact is not resolved, this attribute will be set to<var> null</var>.
17106 For more information, see the <a href="../../org.tizen.web.device.apireference/tizen/contact.html">Contact API</a>.
17113 <Type name="ContactRef" nullable="nullable"/>
17116 <Dictionary name="CalendarRecurrenceRuleInit" id="::Calendar::CalendarRecurrenceRuleInit">
17117 <webidl> dictionary CalendarRecurrenceRuleInit {
17119 <ref>TZDate</ref> untilDate;
17120 long occurrenceCount;
17121 <ref>ByDayValue</ref>[] daysOfTheWeek;
17122 short[] setPositions;
17123 <ref>TZDate</ref>[] exceptions;
17127 The properties of a <em>CalendarRecurrenceRule</em> to pass to its constructor.
17131 For more information about the members, see <em>CalendarRecurrenceRule </em>interface.
17138 <DictionaryMember name="interval" id="::Calendar::CalendarRecurrenceRuleInit::interval">
17139 <webidl> short interval;</webidl>
17140 <Type type="short"/>
17141 </DictionaryMember>
17142 <DictionaryMember name="untilDate" id="::Calendar::CalendarRecurrenceRuleInit::untilDate">
17143 <webidl> <ref>TZDate</ref> untilDate;</webidl>
17144 <Type name="TZDate"/>
17145 </DictionaryMember>
17146 <DictionaryMember name="occurrenceCount" id="::Calendar::CalendarRecurrenceRuleInit::occurrenceCount">
17147 <webidl> long occurrenceCount;</webidl>
17148 <Type type="long"/>
17149 </DictionaryMember>
17150 <DictionaryMember name="daysOfTheWeek" id="::Calendar::CalendarRecurrenceRuleInit::daysOfTheWeek">
17151 <webidl> <ref>ByDayValue</ref>[] daysOfTheWeek;</webidl>
17152 <Type type="array">
17153 <Type name="ByDayValue"/>
17155 </DictionaryMember>
17156 <DictionaryMember name="setPositions" id="::Calendar::CalendarRecurrenceRuleInit::setPositions">
17157 <webidl> short[] setPositions;</webidl>
17158 <Type type="array">
17159 <Type type="short"/>
17161 </DictionaryMember>
17162 <DictionaryMember name="exceptions" id="::Calendar::CalendarRecurrenceRuleInit::exceptions">
17163 <webidl> <ref>TZDate</ref>[] exceptions;</webidl>
17164 <Type type="array">
17165 <Type name="TZDate"/>
17167 </DictionaryMember>
17169 <Interface name="CalendarRecurrenceRule" id="::Calendar::CalendarRecurrenceRule">
17170 <webidl> [Constructor(<ref>RecurrenceRuleFrequency</ref> frequency, optional <ref>CalendarRecurrenceRuleInit</ref>? ruleInitDict)]
17171 interface CalendarRecurrenceRule
17173 attribute <ref>RecurrenceRuleFrequency</ref> frequency;
17175 attribute unsigned short interval;
17177 attribute <ref>TZDate</ref>? untilDate;
17179 attribute long occurrenceCount;
17181 attribute <ref>ByDayValue</ref>[] daysOfTheWeek;
17183 attribute short[] setPositions;
17185 attribute <ref>TZDate</ref>[] exceptions;
17189 This interface implements the<em> CalendarRecurrenceRule </em>object, which contains information about the recurrence of an event.
17190 (See RFC 5545, Section 3.3.10.)
17195 <Code> // Repeats daily for 7 days
17196 var rule = new tizen.CalendarRecurrenceRule("DAILY", {occurrenceCount:7});
17197 event.recurrenceRule = rule;
17200 <ExtendedAttributeList>
17201 <ExtendedAttribute name="Constructor">
17202 <webidl>Constructor(<ref>RecurrenceRuleFrequency</ref> frequency, optional <ref>CalendarRecurrenceRuleInit</ref>? ruleInitDict)</webidl>
17204 <Argument name="frequency">
17205 <Type name="RecurrenceRuleFrequency"/>
17207 <Argument optional="optional" name="ruleInitDict">
17208 <Type name="CalendarRecurrenceRuleInit" nullable="nullable"/>
17211 </ExtendedAttribute>
17212 </ExtendedAttributeList>
17213 <Attribute name="frequency" id="::Calendar::CalendarRecurrenceRule::frequency">
17214 <webidl> attribute <ref>RecurrenceRuleFrequency</ref> frequency;</webidl>
17217 An attribute to store the frequency of a recurrence rule.
17221 This property corresponds to <em>FREQ</em> in RFC 5545.
17228 <Type name="RecurrenceRuleFrequency"/>
17230 <Attribute name="interval" id="::Calendar::CalendarRecurrenceRule::interval">
17231 <webidl> attribute unsigned short interval;</webidl>
17234 An attribute to specify how often the recurrence rule repeats over the unit of time indicated by its frequency.
17238 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.
17241 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.
17244 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>.
17247 This property corresponds to <em>INTERVAL</em> in RFC 5545.
17254 <Type type="unsigned short"/>
17256 <Attribute name="untilDate" id="::Calendar::CalendarRecurrenceRule::untilDate">
17257 <webidl> attribute <ref>TZDate</ref>? untilDate;</webidl>
17260 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).
17264 By default, this attribute is set to <var>null</var>, meaning that the event recurs infinitely, unless <em>occurrenceCount </em>is set.
17267 This attribute is precise to the second. Milliseconds are ignored.
17270 This property corresponds to <em>UNTIL</em> in RFC 5545.
17277 <Type name="TZDate" nullable="nullable"/>
17279 <Attribute name="occurrenceCount" id="::Calendar::CalendarRecurrenceRule::occurrenceCount">
17280 <webidl> attribute long occurrenceCount;</webidl>
17283 An attribute to indicate the number of occurrences of a recurring event.
17287 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).
17290 By default, this attribute is set to <var>-1</var>, meaning that the event recurs infinitely, unless <em>untilDate </em>is set.
17293 This property corresponds to <em>COUNT</em> in RFC 5545.
17300 <Type type="long"/>
17302 <Attribute name="daysOfTheWeek" id="::Calendar::CalendarRecurrenceRule::daysOfTheWeek">
17303 <webidl> attribute <ref>ByDayValue</ref>[] daysOfTheWeek;</webidl>
17306 An attribute to store the days of the week associated with the recurrence rule.
17310 This property value is valid only for recurrence rules with a frequency type of <em>WEEKLY</em>, <em>MONTHLY</em>, and <em>YEARLY</em>.
17313 This property corresponds to <em>BYDAY</em> in RFC 5545.
17316 By default, this attribute is set to an empty array.
17323 <Type type="array">
17324 <Type name="ByDayValue"/>
17327 <Attribute name="setPositions" id="::Calendar::CalendarRecurrenceRule::setPositions">
17328 <webidl> attribute short[] setPositions;</webidl>
17331 An attribute to store a list of ordinal numbers that filters which recurrences to include in the recurrence rule's frequency.
17335 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.
17338 Values can be from 1 to 366 or -366 to -1.
17339 Negative values indicate counting backwards from the end of the recurrence rule's frequency (week, month, or year).
17342 This attribute must only be used in conjunction with another BYxxx rule part (such as <em>daysOfTheWeek</em>).
17345 This property corresponds to <em>BYSETPOS</em> in RFC 5545.
17348 By default, this attribute is set to an empty array.
17355 <Type type="array">
17356 <Type type="short"/>
17359 <Attribute name="exceptions" id="::Calendar::CalendarRecurrenceRule::exceptions">
17360 <webidl> attribute <ref>TZDate</ref>[] exceptions;</webidl>
17363 An attribute to list date/time exceptions for the recurring event.
17364 (See RFC 5545, Section 3.8.5.1.)
17368 This attribute is precise to the second. Milliseconds are ignored.
17371 This property corresponds to <em>EXDATE</em> in RFC 5545.
17374 By default, this attribute is set to an empty array.
17381 <Type type="array">
17382 <Type name="TZDate"/>
17386 <Interface name="CalendarEventId" id="::Calendar::CalendarEventId">
17387 <webidl> [Constructor(DOMString uid, optional DOMString? rid)]
17388 interface CalendarEventId {
17389 attribute DOMString uid;
17391 attribute DOMString? rid;
17395 This interface contains a UID and an optional recurrence ID attribute to identify calendar events.
17399 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.
17406 <ExtendedAttributeList>
17407 <ExtendedAttribute name="Constructor">
17408 <webidl>Constructor(DOMString uid, optional DOMString? rid)</webidl>
17410 <Argument name="uid">
17411 <Type type="DOMString"/>
17413 <Argument optional="optional" name="rid">
17414 <Type type="DOMString" nullable="nullable"/>
17417 </ExtendedAttribute>
17418 </ExtendedAttributeList>
17419 <Attribute name="uid" id="::Calendar::CalendarEventId::uid">
17420 <webidl> attribute DOMString uid;</webidl>
17423 An attribute to persistently, and uniquely identify a calendar event.
17427 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.
17430 See RFC 5545 (section 3.8.4.7) for more details about this parameter and algorithms to guarantee assignment of unique values.
17431 This value is assigned by the platform when the <em>add()</em> method is successfully invoked.
17438 <Type type="DOMString"/>
17440 <Attribute name="rid" id="::Calendar::CalendarEventId::rid">
17441 <webidl> attribute DOMString? rid;</webidl>
17444 An attribute to store the recurrence ID of a <em>CalendarEvent </em>instance.
17448 This attribute is used in conjunction with the <em>uid</em> property to identify a specific instance of a recurring event.
17451 The parent of a recurrence instance has its <em>rid</em> set to <var>null</var>.
17454 By default, this attribute is set to <var>null</var>.
17455 (See RFC 5545 (section 3.8.4.4) for more details about this parameter.)
17462 <Type type="DOMString" nullable="nullable"/>
17465 <Interface name="CalendarAlarm" id="::Calendar::CalendarAlarm">
17466 <webidl> [Constructor(<ref>TZDate</ref> absoluteDate, <ref>AlarmMethod</ref> method, optional DOMString? description),
17467 Constructor(<ref>TimeDuration</ref> before, <ref>AlarmMethod</ref> method, optional DOMString? description)]
17468 interface CalendarAlarm {
17469 attribute <ref>TZDate</ref>? absoluteDate setraises(<ref>WebAPIException</ref>);
17471 attribute <ref>TimeDuration</ref>? before setraises(<ref>WebAPIException</ref>);
17473 attribute <ref>AlarmMethod</ref> method setraises(<ref>WebAPIException</ref>);
17475 attribute DOMString? description;
17479 An interface that contains information related to an event alarm or reminder.
17484 <Code> // Creates a sound alarm 30 minutes before the event's start time
17485 var alarm = new tizen.CalendarAlarm(new tizen.TimeDuration(30, "MINS"), "SOUND");
17488 <ExtendedAttributeList>
17489 <ExtendedAttribute name="Constructor">
17490 <webidl>Constructor(<ref>TZDate</ref> absoluteDate, <ref>AlarmMethod</ref> method, optional DOMString? description)</webidl>
17492 <Argument name="absoluteDate">
17493 <Type name="TZDate"/>
17495 <Argument name="method">
17496 <Type name="AlarmMethod"/>
17498 <Argument optional="optional" name="description">
17499 <Type type="DOMString" nullable="nullable"/>
17502 </ExtendedAttribute>
17503 <ExtendedAttribute name="Constructor">
17504 <webidl> Constructor(<ref>TimeDuration</ref> before, <ref>AlarmMethod</ref> method, optional DOMString? description)</webidl>
17506 <Argument name="before">
17507 <Type name="TimeDuration"/>
17509 <Argument name="method">
17510 <Type name="AlarmMethod"/>
17512 <Argument optional="optional" name="description">
17513 <Type type="DOMString" nullable="nullable"/>
17516 </ExtendedAttribute>
17517 </ExtendedAttributeList>
17518 <Attribute name="absoluteDate" id="::Calendar::CalendarAlarm::absoluteDate">
17519 <webidl> attribute <ref>TZDate</ref>? absoluteDate setraises(<ref>WebAPIException</ref>);</webidl>
17522 An attribute to record the absolute date and time when an alarm should be triggered.
17526 <em>absoluteDate </em>and <em>before </em>are mutually exclusive.
17529 This attribute is precise to the second. Milliseconds are ignored.
17536 <Type name="TZDate" nullable="nullable"/>
17538 <RaiseException name="WebAPIException"/>
17541 <Attribute name="before" id="::Calendar::CalendarAlarm::before">
17542 <webidl> attribute <ref>TimeDuration</ref>? before setraises(<ref>WebAPIException</ref>);</webidl>
17545 An attribute to store the duration before an event starts on which the alarm should be triggered.
17549 The duration should be positive.
17552 <em>absoluteDate </em>and <em>before </em>are mutually exclusive.
17555 This attribute is precise to the second. Milliseconds are ignored.
17562 <Type name="TimeDuration" nullable="nullable"/>
17564 <RaiseException name="WebAPIException"/>
17567 <Attribute name="method" id="::Calendar::CalendarAlarm::method">
17568 <webidl> attribute <ref>AlarmMethod</ref> method setraises(<ref>WebAPIException</ref>);</webidl>
17571 An attribute to denote the notification method used by an alarm.
17577 <Type name="AlarmMethod"/>
17579 <RaiseException name="WebAPIException"/>
17582 <Attribute name="description" id="::Calendar::CalendarAlarm::description">
17583 <webidl> attribute DOMString? description;</webidl>
17586 An attribute to store the description of an alarm.
17590 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.
17593 The default value is an empty string.
17600 <Type type="DOMString" nullable="nullable"/>
17603 <Interface name="CalendarEventArraySuccessCallback" id="::Calendar::CalendarEventArraySuccessCallback">
17604 <webidl> [Callback=FunctionOnly, NoInterfaceObject]
17605 interface CalendarEventArraySuccessCallback {
17606 void onsuccess(<ref>CalendarEvent</ref>[] events);
17610 An interface that implements the success callback used in the asynchronous operation for retrieving a list of calendar events.
17616 <ExtendedAttributeList>
17617 <ExtendedAttribute name="Callback" value="FunctionOnly">
17618 <webidl>Callback</webidl>
17619 </ExtendedAttribute>
17620 <ExtendedAttribute name="NoInterfaceObject">
17621 <webidl> NoInterfaceObject</webidl>
17622 </ExtendedAttribute>
17623 </ExtendedAttributeList>
17624 <Operation name="onsuccess" id="::Calendar::CalendarEventArraySuccessCallback::onsuccess">
17625 <webidl> void onsuccess(<ref>CalendarEvent</ref>[] events);</webidl>
17628 Called when the list of calendar events is retrieved successfully.
17634 <Type type="void"/>
17636 <Argument name="events">
17639 The array of <em>CalendarEvent </em>objects.
17642 <Type type="array">
17643 <Type name="CalendarEvent"/>
17649 <Interface name="CalendarItemArraySuccessCallback" id="::Calendar::CalendarItemArraySuccessCallback">
17650 <webidl> [Callback=FunctionOnly, NoInterfaceObject]
17651 interface CalendarItemArraySuccessCallback {
17652 void onsuccess(<ref>CalendarItem</ref>[] items);
17656 This interface implements the success callback used in the asynchronous operation for retrieving a list of calendar items.
17662 <ExtendedAttributeList>
17663 <ExtendedAttribute name="Callback" value="FunctionOnly">
17664 <webidl>Callback</webidl>
17665 </ExtendedAttribute>
17666 <ExtendedAttribute name="NoInterfaceObject">
17667 <webidl> NoInterfaceObject</webidl>
17668 </ExtendedAttribute>
17669 </ExtendedAttributeList>
17670 <Operation name="onsuccess" id="::Calendar::CalendarItemArraySuccessCallback::onsuccess">
17671 <webidl> void onsuccess(<ref>CalendarItem</ref>[] items);</webidl>
17674 Called when the list of calendar items is retrieved successfully.
17680 <Type type="void"/>
17682 <Argument name="items">
17685 The array of <em>CalendarItem </em>objects.
17688 <Type type="array">
17689 <Type name="CalendarItem"/>
17695 <Interface name="CalendarArraySuccessCallback" id="::Calendar::CalendarArraySuccessCallback">
17696 <webidl> [Callback=FunctionOnly, NoInterfaceObject]
17697 interface CalendarArraySuccessCallback {
17698 void onsuccess(<ref>Calendar</ref>[] calendars);
17702 This interface implements the success callback used in the asynchronous operation to get a list of calendars using the <em>getCalendars()</em> method.
17708 <ExtendedAttributeList>
17709 <ExtendedAttribute name="Callback" value="FunctionOnly">
17710 <webidl>Callback</webidl>
17711 </ExtendedAttribute>
17712 <ExtendedAttribute name="NoInterfaceObject">
17713 <webidl> NoInterfaceObject</webidl>
17714 </ExtendedAttribute>
17715 </ExtendedAttributeList>
17716 <Operation name="onsuccess" id="::Calendar::CalendarArraySuccessCallback::onsuccess">
17717 <webidl> void onsuccess(<ref>Calendar</ref>[] calendars);</webidl>
17720 Called when the array of <em>Calendar </em>objects is retrieved successfully.
17726 <Type type="void"/>
17728 <Argument name="calendars">
17731 The array of <em>Calendar </em>objects.
17734 <Type type="array">
17735 <Type name="Calendar"/>
17741 <Interface name="CalendarChangeCallback" id="::Calendar::CalendarChangeCallback">
17742 <webidl> [Callback, NoInterfaceObject] interface CalendarChangeCallback {
17743 void onitemsadded(<ref>CalendarItem</ref>[] items);
17745 void onitemsupdated(<ref>CalendarItem</ref>[] items);
17747 void onitemsremoved(<ref>CalendarItemId</ref>[] ids);
17751 This interface specifies a set of methods that will be invoked every time a calendar change occurs (calendar item addition/update/removal).
17757 <ExtendedAttributeList>
17758 <ExtendedAttribute name="Callback">
17759 <webidl>Callback</webidl>
17760 </ExtendedAttribute>
17761 <ExtendedAttribute name="NoInterfaceObject">
17762 <webidl> NoInterfaceObject</webidl>
17763 </ExtendedAttribute>
17764 </ExtendedAttributeList>
17765 <Operation name="onitemsadded" id="::Calendar::CalendarChangeCallback::onitemsadded">
17766 <webidl> void onitemsadded(<ref>CalendarItem</ref>[] items);</webidl>
17769 Called when items are added to the calendar.
17775 <Type type="void"/>
17777 <Argument name="items">
17780 The list of items that were added.
17783 <Type type="array">
17784 <Type name="CalendarItem"/>
17789 <Operation name="onitemsupdated" id="::Calendar::CalendarChangeCallback::onitemsupdated">
17790 <webidl> void onitemsupdated(<ref>CalendarItem</ref>[] items);</webidl>
17793 Called when items are updated in the calendar.
17799 <Type type="void"/>
17801 <Argument name="items">
17804 The list of items that were updated.
17807 <Type type="array">
17808 <Type name="CalendarItem"/>
17813 <Operation name="onitemsremoved" id="::Calendar::CalendarChangeCallback::onitemsremoved">
17814 <webidl> void onitemsremoved(<ref>CalendarItemId</ref>[] ids);</webidl>
17817 Called when item are removed from the calendar.
17823 <Type type="void"/>
17825 <Argument name="ids">
17828 The list of identifiers for the items that were removed.
17831 <Type type="array">
17832 <Type name="CalendarItemId"/>
17839 <Module name="Callhistory" id="::Callhistory">
17840 <webidl>module Callhistory {
17841 [NoInterfaceObject] interface CallHistoryObject {
17842 readonly attribute <ref>CallHistory</ref> callhistory;
17845 <ref>Tizen</ref> implements <ref>CallHistoryObject</ref>;
17847 [NoInterfaceObject] interface RemoteParty {
17848 readonly attribute DOMString? remoteParty;
17850 readonly attribute <ref>PersonId</ref>? personId;
17854 [NoInterfaceObject] interface CallHistoryEntry {
17856 readonly attribute DOMString uid;
17858 readonly attribute DOMString type;
17860 readonly attribute DOMString[]? features;
17862 readonly attribute <ref>RemoteParty</ref>[] remoteParties;
17864 readonly attribute Date startTime;
17866 readonly attribute unsigned long duration;
17868 attribute DOMString direction;
17871 [NoInterfaceObject] interface CallHistory {
17873 void find(<ref>CallHistoryEntryArraySuccessCallback</ref> successCallback,
17874 optional <ref>ErrorCallback</ref>? errorCallback,
17875 optional <ref>AbstractFilter</ref>? filter,
17876 optional <ref>SortMode</ref>? sortMode,
17877 optional unsigned long? limit,
17878 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);
17880 void remove(<ref>CallHistoryEntry</ref> entry) raises(<ref>WebAPIException</ref>);
17882 void removeBatch(<ref>CallHistoryEntry</ref>[] entries,
17883 optional <ref>SuccessCallback</ref>? successCallback,
17884 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
17886 void removeAll(optional <ref>SuccessCallback</ref>? successCallback,
17887 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
17889 long addChangeListener(<ref>CallHistoryChangeCallback</ref> observer) raises(<ref>WebAPIException</ref>);
17891 void removeChangeListener(long handle) raises(<ref>WebAPIException</ref>);
17894 [Callback=FunctionOnly, NoInterfaceObject] interface CallHistoryEntryArraySuccessCallback {
17895 void onsuccess(<ref>CallHistoryEntry</ref>[] entries);
17898 [Callback, NoInterfaceObject]
17899 interface CallHistoryChangeCallback {
17900 void onadded(<ref>CallHistoryEntry</ref>[] newItems);
17902 void onchanged(<ref>CallHistoryEntry</ref>[] changedItems);
17904 void onremoved(DOMString[] removedItems);
17909 This API provides interfaces and methods for retrieving information from the call history.
17913 For more information on the Callhistory features, see <a href="../../org.tizen.web.appprogramming/html/guide/social_guide/call.htm">Call History Guide</a>.
17919 <def-api-feature identifier="http://tizen.org/feature/network.telephony">
17923 To guarantee this application running on a device with Telephony feature, define below in the config file:
17929 <Interface name="CallHistoryObject" id="::Callhistory::CallHistoryObject">
17930 <webidl> [NoInterfaceObject] interface CallHistoryObject {
17931 readonly attribute <ref>CallHistory</ref> callhistory;
17935 This interface defines what is instantiated by the <em>Tizen </em>object from the Tizen Platform.
17936 The <em>tizen.callhistory<em> object allows access to the CallHistory API.
17937 </em></em> </brief>
17942 <ExtendedAttributeList>
17943 <ExtendedAttribute name="NoInterfaceObject">
17944 <webidl>NoInterfaceObject</webidl>
17945 </ExtendedAttribute>
17946 </ExtendedAttributeList>
17947 <Attribute readonly="readonly" name="callhistory" id="::Callhistory::CallHistoryObject::callhistory">
17948 <webidl> readonly attribute <ref>CallHistory</ref> callhistory;</webidl>
17949 <Type name="CallHistory"/>
17952 <Implements name1="Tizen" name2="CallHistoryObject">
17953 <webidl> <ref>Tizen</ref> implements <ref>CallHistoryObject</ref>;</webidl>
17956 The CallHistory interface is available from the <em>Tizen </em>object through the <em>Window </em>object.
17963 <Interface name="RemoteParty" id="::Callhistory::RemoteParty">
17964 <webidl> [NoInterfaceObject] interface RemoteParty {
17965 readonly attribute DOMString? remoteParty;
17967 readonly attribute <ref>PersonId</ref>? personId;
17972 This interface represents remote parties.
17978 <ExtendedAttributeList>
17979 <ExtendedAttribute name="NoInterfaceObject">
17980 <webidl>NoInterfaceObject</webidl>
17981 </ExtendedAttribute>
17982 </ExtendedAttributeList>
17983 <Attribute readonly="readonly" name="remoteParty" id="::Callhistory::RemoteParty::remoteParty">
17984 <webidl> readonly attribute DOMString? remoteParty;</webidl>
17987 An attribute to store the remote party identifier (RPID).
17988 The RPID is a unique identifier used by a service with call capability. It also includes phone numbers.
17989 Contacts are also defined per service, so an RPID can be resolved to a Contact.
17990 A <var>null </var>value means that the remote is hidden (private number).
17996 <Type type="DOMString" nullable="nullable"/>
17998 <Attribute readonly="readonly" name="personId" id="::Callhistory::RemoteParty::personId">
17999 <webidl> readonly attribute <ref>PersonId</ref>? personId;</webidl>
18002 An attribute to store the identifier of the person that the raw contact belongs to.
18006 If the contact cannot be resolved, the value is <var>null</var>.
18007 See <a href="../../org.tizen.web.device.apireference/tizen/contact.html">Contact API</a> for more information.
18014 <Type name="PersonId" nullable="nullable"/>
18017 <Interface name="CallHistoryEntry" id="::Callhistory::CallHistoryEntry">
18018 <webidl> [NoInterfaceObject] interface CallHistoryEntry {
18020 readonly attribute DOMString uid;
18022 readonly attribute DOMString type;
18024 readonly attribute DOMString[]? features;
18026 readonly attribute <ref>RemoteParty</ref>[] remoteParties;
18028 readonly attribute Date startTime;
18030 readonly attribute unsigned long duration;
18032 attribute DOMString direction;
18036 This interface represents the subset of properties of calls, which become a call record in the call history after the call ends.
18042 <ExtendedAttributeList>
18043 <ExtendedAttribute name="NoInterfaceObject">
18044 <webidl>NoInterfaceObject</webidl>
18045 </ExtendedAttribute>
18046 </ExtendedAttributeList>
18047 <Attribute readonly="readonly" name="uid" id="::Callhistory::CallHistoryEntry::uid">
18048 <webidl> readonly attribute DOMString uid;</webidl>
18051 An attribute to store the unique identifier of a call record.
18057 <Type type="DOMString"/>
18059 <Attribute readonly="readonly" name="type" id="::Callhistory::CallHistoryEntry::type">
18060 <webidl> readonly attribute DOMString type;</webidl>
18063 An attribute to store the service type of the call saved to call history.
18067 The following values are the supported:
18071 TEL - for all protocols with phone number addressing (PSTN, GSM, CDMA, LTE, etc.) </li>
18073 XMPP - for generic XMPP calls </li>
18075 SIP - for generic SIP calls </li>
18082 <Type type="DOMString"/>
18084 <Attribute readonly="readonly" name="features" id="::Callhistory::CallHistoryEntry::features">
18085 <webidl> readonly attribute DOMString[]? features;</webidl>
18088 An attributes to store the features associated with the call service saved to call history.
18089 The following values are the supported:
18094 CALL - for all call types </li>
18096 VOICECALL - for voice-only calls </li>
18098 VIDEOCALL - for audio and video channel support in the call </li>
18100 EMERGENCYCALL - to denote an emergency call </li>
18107 <Type type="array" nullable="nullable">
18108 <Type type="DOMString"/>
18111 <Attribute readonly="readonly" name="remoteParties" id="::Callhistory::CallHistoryEntry::remoteParties">
18112 <webidl> readonly attribute <ref>RemoteParty</ref>[] remoteParties;</webidl>
18115 An attributes to store the remote parties participating in the call.
18121 <Type type="array">
18122 <Type name="RemoteParty"/>
18125 <Attribute readonly="readonly" name="startTime" id="::Callhistory::CallHistoryEntry::startTime">
18126 <webidl> readonly attribute Date startTime;</webidl>
18129 An attribute to store the start time of the call.
18130 This attribute is the moment when media channels come up. The exact meaning is defined by the back-end.
18136 <Type type="Date"/>
18138 <Attribute readonly="readonly" name="duration" id="::Callhistory::CallHistoryEntry::duration">
18139 <webidl> readonly attribute unsigned long duration;</webidl>
18142 An attribute to store the duration of the call in seconds.
18143 This attribute is the duration from media channels coming up to the moment when media channels tear down on the same call service.
18144 If the call is migrated to another service, another call history entry is used.
18145 The exact meaning is defined by the back-end.
18151 <Type type="unsigned long"/>
18153 <Attribute name="direction" id="::Callhistory::CallHistoryEntry::direction">
18154 <webidl> attribute DOMString direction;</webidl>
18157 An attribute to indicate whether the call was dialed, received, missed, blocked or rejected.
18158 The following values are the supported:
18163 DIALED - for dialed calls </li>
18165 RECEIVED - for received calls </li>
18167 MISSEDNEW - for missed calls not seen yet </li>
18169 MISSED - for missed calls </li>
18171 BLOCKED - for blocked calls </li>
18173 REJECTED - for rejected calls </li>
18180 <Type type="DOMString"/>
18183 <Interface name="CallHistory" id="::Callhistory::CallHistory">
18184 <webidl> [NoInterfaceObject] interface CallHistory {
18186 void find(<ref>CallHistoryEntryArraySuccessCallback</ref> successCallback,
18187 optional <ref>ErrorCallback</ref>? errorCallback,
18188 optional <ref>AbstractFilter</ref>? filter,
18189 optional <ref>SortMode</ref>? sortMode,
18190 optional unsigned long? limit,
18191 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);
18193 void remove(<ref>CallHistoryEntry</ref> entry) raises(<ref>WebAPIException</ref>);
18195 void removeBatch(<ref>CallHistoryEntry</ref>[] entries,
18196 optional <ref>SuccessCallback</ref>? successCallback,
18197 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18199 void removeAll(optional <ref>SuccessCallback</ref>? successCallback,
18200 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18202 long addChangeListener(<ref>CallHistoryChangeCallback</ref> observer) raises(<ref>WebAPIException</ref>);
18204 void removeChangeListener(long handle) raises(<ref>WebAPIException</ref>);
18208 This interface manages call history.
18209 Apps can read or delete call history (depending on permission).
18210 Modifying call history is allowed for certain attributes, like direction.
18211 Adding call history is owned by the back-end. Filtering is supported for all fields of <em>CallHistoryEntry</em>.
18217 <ExtendedAttributeList>
18218 <ExtendedAttribute name="NoInterfaceObject">
18219 <webidl>NoInterfaceObject</webidl>
18220 </ExtendedAttribute>
18221 </ExtendedAttributeList>
18222 <Operation name="find" id="::Callhistory::CallHistory::find">
18223 <webidl> void find(<ref>CallHistoryEntryArraySuccessCallback</ref> successCallback,
18224 optional <ref>ErrorCallback</ref>? errorCallback,
18225 optional <ref>AbstractFilter</ref>? filter,
18226 optional <ref>SortMode</ref>? sortMode,
18227 optional unsigned long? limit,
18228 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);</webidl>
18231 Finds and returns call history.
18235 The <em>errorCallback()</em> is launched with these error types:
18239 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
18241 UnknownError - If any other error occurs. </li>
18251 http://tizen.org/privilege/callhistory.read
18253 <Code> // Defines success callback
18254 function onSuccess(results) {
18255 console.log(results.length + " call history item(s) found!");
18256 for (var i=0; i<results.length; i++) {
18257 console.log(i + ". " + results[i].toString()); // process the CallHistoryEntry
18261 // Defines error callback
18262 function onError(error) {
18263 console.log("Query failed" + error.name);
18266 // Defines filter: list CS calls, most recent first
18267 var filter = new tizen.AttributeFilter("type", "EXACTLY", "TEL");
18269 // Defines sort mode: descending on call start time.
18270 var sortMode = new tizen.SortMode("startTime", "DESC");
18272 // Makes the query and wire up the callbacks
18273 tizen.callhistory.find(onSuccess,
18278 var numberfilter = new tizen.AttributeFilter(
18279 "remoteParties.remoteParty",
18280 "EXACTLY",
18281 "123456789");
18283 // Creates a composite filter for time constraints
18284 var y2009Filter = new tizen.AttributeRangeFilter(
18285 "startTime",
18286 new Date(2009, 0, 1),
18287 new Date(2010, 0, 1));
18289 var y2011Filter = new tizen.AttributeRangeFilter(
18290 "startTime",
18291 new Date(2011, 0, 1),
18292 new Date(2012, 0, 1));
18294 var datefilter = new tizen.CompositeFilter("UNION", [y2009Filter, y2011Filter]);
18296 // Creates a filter to find all video calls (including cellular, skype, etc)
18297 // The filter matches exactly any features from the "features" array
18298 var tfilter = new tizen.AttributeFilter("features", "EXACTLY", "VIDEOCALL");
18300 // Creates composite filter
18301 var ifilter = new tizen.CompositeFilter("INTERSECTION",
18302 [numberFilter, dateFilter, tfilter]);
18304 // Makes the query and wire up the callbacks; reuse sortMode
18305 tizen.callhistory.find(onSuccess,
18312 <Type type="void"/>
18314 <Argument name="successCallback">
18317 A handler for query result set.
18320 <Type name="CallHistoryEntryArraySuccessCallback"/>
18322 <Argument optional="optional" name="errorCallback">
18325 The method to call when an error occurs.
18328 <Type name="ErrorCallback" nullable="nullable"/>
18330 <Argument optional="optional" name="filter">
18333 A filter defined on <em>CallHistoryEntry </em>attributes. It can be a composite filter.
18336 <Type name="AbstractFilter" nullable="nullable"/>
18338 <Argument optional="optional" name="sortMode">
18341 The sort order in which call history are return.
18344 <Type name="SortMode" nullable="nullable"/>
18346 <Argument optional="optional" name="limit">
18349 The maximum limit of query result (It is the same meaning as SQL LIMIT).
18350 If limit is 0, query result is no limit.
18353 <Type type="unsigned long" nullable="nullable"/>
18355 <Argument optional="optional" name="offset">
18358 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.
18361 <Type type="unsigned long" nullable="nullable"/>
18365 <RaiseException name="WebAPIException">
18368 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
18371 with error type SecurityError, if this functionality is not allowed.
18374 with error type NotSupportedError, if the feature is not supported.
18380 <Operation name="remove" id="::Callhistory::CallHistory::remove">
18381 <webidl> void remove(<ref>CallHistoryEntry</ref> entry) raises(<ref>WebAPIException</ref>);</webidl>
18384 Removes a call history synchronously.
18393 http://tizen.org/privilege/callhistory.write
18395 <Code> // Defines success callback
18396 function onSuccess(results) {
18397 if (results.length > 0)
18398 tizen.callhistory.remove(results[0]);
18401 // Defines error callback
18402 function onError(error) {
18403 console.log("Query failed" + error.name);
18406 // Makes the query and wires up the callbacks
18407 tizen.callhistory.find(onSuccess, onError);
18411 <Type type="void"/>
18413 <Argument name="entry">
18416 Call history entry to be deleted.
18419 <Type name="CallHistoryEntry"/>
18423 <RaiseException name="WebAPIException">
18426 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
18429 with error type InvalidValuesError, if any input parameter contains invalid values.
18432 with error type SecurityError, if the application does not have the privilege to call this method.
18435 with error type NotSupportedError, if the feature is not supported.
18438 with error type UnknownError, if any other error occurs.
18444 <Operation name="removeBatch" id="::Callhistory::CallHistory::removeBatch">
18445 <webidl> void removeBatch(<ref>CallHistoryEntry</ref>[] entries,
18446 optional <ref>SuccessCallback</ref>? successCallback,
18447 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
18450 Removes a list of call history asynchronously.
18454 The <em>errorCallback()</em> is launched with these error types:
18458 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
18460 UnknownError - If any other error occurs. </li>
18470 http://tizen.org/privilege/callhistory.write
18472 <Code> // Defines success callback
18473 function onSuccess(results) {
18474 tizen.callhistory.removeBatch(results);
18477 // Defines error callback
18478 function onError(error) {
18479 console.log("Query failed" + error.name);
18482 // Makes the query and wires up the callbacks
18483 tizen.callhistory.find(onSuccess, onError);
18487 <Type type="void"/>
18489 <Argument name="entries">
18492 A list of call history entries to delete.
18495 <Type type="array">
18496 <Type name="CallHistoryEntry"/>
18499 <Argument optional="optional" name="successCallback">
18502 A generic success handler.
18505 <Type name="SuccessCallback" nullable="nullable"/>
18507 <Argument optional="optional" name="errorCallback">
18513 <Type name="ErrorCallback" nullable="nullable"/>
18517 <RaiseException name="WebAPIException">
18520 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
18523 with error type SecurityError, if the application does not have the privilege to call this method.
18526 with error type NotSupportedError, if this feature is not supported.
18532 <Operation name="removeAll" id="::Callhistory::CallHistory::removeAll">
18533 <webidl> void removeAll(optional <ref>SuccessCallback</ref>? successCallback,
18534 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
18537 Removes all call history asynchronously.
18541 The <em>errorCallback()</em> is launched with these error types:
18545 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
18547 UnknownError - If any other error occurs. </li>
18557 http://tizen.org/privilege/callhistory.write
18560 <Type type="void"/>
18562 <Argument optional="optional" name="successCallback">
18565 A generic success handler.
18568 <Type name="SuccessCallback" nullable="nullable"/>
18570 <Argument optional="optional" name="errorCallback">
18576 <Type name="ErrorCallback" nullable="nullable"/>
18580 <RaiseException name="WebAPIException">
18583 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
18586 with error type SecurityError, if this functionality is not allowed.
18589 with error type NotSupportedError, if this feature is not supported.
18595 <Operation name="addChangeListener" id="::Callhistory::CallHistory::addChangeListener">
18596 <webidl> long addChangeListener(<ref>CallHistoryChangeCallback</ref> observer) raises(<ref>WebAPIException</ref>);</webidl>
18599 Adds a listener to register for callback to observe call history changes.
18608 http://tizen.org/privilege/callhistory.read
18610 <Code> var onListenerCB = {
18611 onadded: function(newItems) {
18612 console.log("New Item added");
18613 for (var i in newItems) {
18614 console.log("Item " + i + " startTime: " + newItems[i].startTime);
18617 onchanged: function(changedItems) {
18618 console.log("Items changed");
18619 for (var i in changedItems) {
18620 console.log("Item " + i + " direction: " + changedItems[i].direction);
18623 onremoved: function(removedItems) {
18624 console.log("Items removed");
18625 for(var i in removedItems) {
18626 console.log("Item " + i + " : " + removedItems[i]);
18631 // Registers a call history callback
18632 var handle = tizen.callhistory.addChangeListener(onListenerCB);
18634 // Unregisters a previously registered listener
18635 tizen.callhistory.removeChangeListener(handle);
18637 console.log("Exception - code: " + error.name + " message: " + error.message);
18645 long A handle which can be used for unregistering.
18650 <Argument name="observer">
18653 A callback for handling the list of new or changed or <em>CallHistoryEntry </em>objects in the call history.
18656 <Type name="CallHistoryChangeCallback"/>
18660 <RaiseException name="WebAPIException">
18663 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
18666 with error type InvalidValuesError, if any input parameter contains invalid values.
18669 with error type SecurityError, if the application does not have the privilege to call this method.
18672 with error type NotSupportedError, if the feature is not supported.
18675 with error type UnknownError, if any other error occurs.
18681 <Operation name="removeChangeListener" id="::Callhistory::CallHistory::removeChangeListener">
18682 <webidl> void removeChangeListener(long handle) raises(<ref>WebAPIException</ref>);</webidl>
18685 Removes a listener to unregister a previously registered listener.
18694 http://tizen.org/privilege/callhistory.read
18697 <Type type="void"/>
18699 <Argument name="handle">
18702 The previously obtained listener handle.
18705 <Type type="long"/>
18709 <RaiseException name="WebAPIException">
18712 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
18715 with error type InvalidValuesError, if any input parameter contains invalid values.
18718 with error type SecurityError, if the application does not have the privilege to call this method.
18721 with error type NotSupportedError, if the feature is not supported.
18724 with error type UnknownError, if any other error occurs.
18731 <Interface name="CallHistoryEntryArraySuccessCallback" id="::Callhistory::CallHistoryEntryArraySuccessCallback">
18732 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface CallHistoryEntryArraySuccessCallback {
18733 void onsuccess(<ref>CallHistoryEntry</ref>[] entries);
18737 This is a callback interface of <em>CallHistory </em>operations.
18738 For example code, see <em>CallHistory </em>interface.
18744 <ExtendedAttributeList>
18745 <ExtendedAttribute name="Callback" value="FunctionOnly">
18746 <webidl>Callback</webidl>
18747 </ExtendedAttribute>
18748 <ExtendedAttribute name="NoInterfaceObject">
18749 <webidl> NoInterfaceObject</webidl>
18750 </ExtendedAttribute>
18751 </ExtendedAttributeList>
18752 <Operation name="onsuccess" id="::Callhistory::CallHistoryEntryArraySuccessCallback::onsuccess">
18753 <webidl> void onsuccess(<ref>CallHistoryEntry</ref>[] entries);</webidl>
18756 Called when the queries on call history have been successfully completed.
18762 <Type type="void"/>
18764 <Argument name="entries">
18767 An array of <em>CallHistoryEntry </em>objects, representing the result set of the query over the call history.
18770 <Type type="array">
18771 <Type name="CallHistoryEntry"/>
18777 <Interface name="CallHistoryChangeCallback" id="::Callhistory::CallHistoryChangeCallback">
18778 <webidl> [Callback, NoInterfaceObject]
18779 interface CallHistoryChangeCallback {
18780 void onadded(<ref>CallHistoryEntry</ref>[] newItems);
18782 void onchanged(<ref>CallHistoryEntry</ref>[] changedItems);
18784 void onremoved(DOMString[] removedItems);
18788 This is a callback interface of a<em> CallHistory </em>operations.
18789 For example code, see <em>CallHistory </em>interface.
18795 <ExtendedAttributeList>
18796 <ExtendedAttribute name="Callback">
18797 <webidl>Callback</webidl>
18798 </ExtendedAttribute>
18799 <ExtendedAttribute name="NoInterfaceObject">
18800 <webidl> NoInterfaceObject</webidl>
18801 </ExtendedAttribute>
18802 </ExtendedAttributeList>
18803 <Operation name="onadded" id="::Callhistory::CallHistoryChangeCallback::onadded">
18804 <webidl> void onadded(<ref>CallHistoryEntry</ref>[] newItems);</webidl>
18807 Called when a new call history item is added.
18813 <Type type="void"/>
18815 <Argument name="newItems">
18818 An array of <em>CallHistoryEntry </em>objects, representing the new items added to call history.
18821 <Type type="array">
18822 <Type name="CallHistoryEntry"/>
18827 <Operation name="onchanged" id="::Callhistory::CallHistoryChangeCallback::onchanged">
18828 <webidl> void onchanged(<ref>CallHistoryEntry</ref>[] changedItems);</webidl>
18831 Called when the call history have been changed.
18837 <Type type="void"/>
18839 <Argument name="changedItems">
18842 An array of <em>CallHistoryEntry </em>objects, representing the changed items in call history.
18845 <Type type="array">
18846 <Type name="CallHistoryEntry"/>
18851 <Operation name="onremoved" id="::Callhistory::CallHistoryChangeCallback::onremoved">
18852 <webidl> void onremoved(DOMString[] removedItems);</webidl>
18855 Called when the call history have been removed.
18861 <Type type="void"/>
18863 <Argument name="removedItems">
18866 An array of an uid of <em>CallHistoryEntry </em>objects, representing the removed items in call history.
18869 <Type type="array">
18870 <Type type="DOMString"/>
18877 <Module name="Contact" id="::Contact">
18878 <webidl>module Contact {
18880 typedef DOMString AddressBookId;
18882 typedef DOMString ContactId;
18884 typedef DOMString PersonId;
18886 typedef DOMString ContactGroupId;
18888 enum ContactTextFormat {"VCARD_30"};
18890 [NoInterfaceObject] interface ContactManagerObject {
18891 readonly attribute <ref>ContactManager</ref> contact;
18893 <ref>Tizen</ref> implements <ref>ContactManagerObject</ref>;
18895 [NoInterfaceObject] interface ContactManager {
18897 void getAddressBooks(<ref>AddressBookArraySuccessCallback</ref> successCallback,
18898 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18900 <ref>AddressBook</ref> getUnifiedAddressBook() raises(<ref>WebAPIException</ref>);
18902 <ref>AddressBook</ref> getDefaultAddressBook() raises(<ref>WebAPIException</ref>);
18904 <ref>AddressBook</ref> getAddressBook(<ref>AddressBookId</ref> addressBookId) raises(<ref>WebAPIException</ref>);
18906 <ref>Person</ref> get(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);
18908 void update(<ref>Person</ref> person) raises(<ref>WebAPIException</ref>);
18910 void updateBatch(<ref>Person</ref>[] persons,
18911 optional <ref>SuccessCallback</ref>? successCallback,
18912 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18914 void remove(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);
18916 void removeBatch(<ref>PersonId</ref>[] personIds,
18917 optional <ref>SuccessCallback</ref>? successCallback,
18918 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18920 void find(<ref>PersonArraySuccessCallback</ref> successCallback,
18921 optional <ref>ErrorCallback</ref>? errorCallback,
18922 optional <ref>AbstractFilter</ref>? filter,
18923 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);
18925 long addChangeListener(<ref>PersonsChangeCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);
18927 void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
18930 [NoInterfaceObject] interface AddressBook {
18932 readonly attribute <ref>AddressBookId</ref>? id;
18934 readonly attribute DOMString name;
18936 readonly attribute boolean readOnly;
18938 <ref>Contact</ref> get(<ref>ContactId</ref> id) raises(<ref>WebAPIException</ref>);
18940 void add(<ref>Contact</ref> contact) raises(<ref>WebAPIException</ref>);
18942 void addBatch(<ref>Contact</ref>[] contacts,
18943 optional <ref>ContactArraySuccessCallback</ref>? successCallback,
18944 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18946 void update(<ref>Contact</ref> contact) raises(<ref>WebAPIException</ref>);
18948 void updateBatch(<ref>Contact</ref>[] contacts,
18949 optional <ref>SuccessCallback</ref>? successCallback,
18950 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18952 void remove(<ref>ContactId</ref> id) raises(<ref>WebAPIException</ref>);
18954 void removeBatch(<ref>ContactId</ref>[] ids,
18955 optional <ref>SuccessCallback</ref>? successCallback,
18956 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18958 void find(<ref>ContactArraySuccessCallback</ref> successCallback,
18959 optional <ref>ErrorCallback</ref>? errorCallback,
18960 optional <ref>AbstractFilter</ref>? filter,
18961 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);
18963 long addChangeListener(<ref>AddressBookChangeCallback</ref> successCallback,
18964 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18966 void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
18968 <ref>ContactGroup</ref> getGroup(<ref>ContactGroupId</ref> groupId) raises(<ref>WebAPIException</ref>);
18970 void addGroup(<ref>ContactGroup</ref> group) raises(<ref>WebAPIException</ref>);
18972 void updateGroup(<ref>ContactGroup</ref> group) raises(<ref>WebAPIException</ref>);
18974 void removeGroup(<ref>ContactGroupId</ref> groupId) raises(<ref>WebAPIException</ref>);
18976 <ref>ContactGroup</ref>[] getGroups() raises(<ref>WebAPIException</ref>);
18979 [NoInterfaceObject] interface Person {
18980 readonly attribute <ref>PersonId</ref> id;
18982 readonly attribute DOMString displayName;
18984 readonly attribute long contactCount;
18986 readonly attribute boolean hasPhoneNumber;
18988 readonly attribute boolean hasEmail;
18990 attribute boolean isFavorite;
18992 attribute DOMString? photoURI;
18994 attribute DOMString? ringtoneURI;
18996 attribute <ref>ContactId</ref> displayContactId;
18998 void link(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);
19000 <ref>Person</ref> unlink(<ref>ContactId</ref> contactId) raises(<ref>WebAPIException</ref>);
19003 dictionary ContactInit {
19004 <ref>ContactName</ref> name;
19005 <ref>ContactAddress</ref>[] addresses;
19006 DOMString photoURI;
19007 <ref>ContactPhoneNumber</ref>[] phoneNumbers;
19008 <ref>ContactEmailAddress</ref>[] emails;
19010 <ref>ContactAnniversary</ref>[] anniversaries;
19011 <ref>ContactOrganization</ref>[] organizations;
19013 <ref>ContactWebSite</ref>[] urls;
19014 DOMString ringtoneURI;
19015 <ref>ContactGroupId</ref>[] groupIds;
19018 [Constructor(optional <ref>ContactInit</ref>? ContactInitDict),
19019 Constructor(DOMString stringRepresentation)]
19020 interface Contact {
19021 readonly attribute <ref>ContactId</ref>? id;
19023 readonly attribute <ref>PersonId</ref>? personId;
19025 readonly attribute <ref>AddressBookId</ref>? addressBookId;
19027 readonly attribute Date? lastUpdated;
19029 readonly attribute boolean isFavorite;
19031 attribute <ref>ContactName</ref>? name setraises(<ref>WebAPIException</ref>);
19033 attribute <ref>ContactAddress</ref>[] addresses setraises(<ref>WebAPIException</ref>);
19035 attribute DOMString? photoURI setraises(<ref>WebAPIException</ref>);
19037 attribute <ref>ContactPhoneNumber</ref>[] phoneNumbers setraises(<ref>WebAPIException</ref>);
19039 attribute <ref>ContactEmailAddress</ref>[] emails setraises(<ref>WebAPIException</ref>);
19041 attribute Date? birthday setraises(<ref>WebAPIException</ref>);
19043 attribute <ref>ContactAnniversary</ref>[] anniversaries setraises(<ref>WebAPIException</ref>);
19045 attribute <ref>ContactOrganization</ref>[] organizations setraises(<ref>WebAPIException</ref>);
19047 attribute DOMString[] notes setraises(<ref>WebAPIException</ref>);
19049 attribute <ref>ContactWebSite</ref>[] urls setraises(<ref>WebAPIException</ref>);
19051 attribute DOMString? ringtoneURI setraises(<ref>WebAPIException</ref>);
19053 attribute <ref>ContactGroupId</ref>[] groupIds setraises(<ref>WebAPIException</ref>);
19055 DOMString convertToString(optional <ref>ContactTextFormat</ref>? format) raises(<ref>WebAPIException</ref>);
19057 <ref>Contact</ref> clone() raises(<ref>WebAPIException</ref>);
19060 [Constructor(<ref>AddressBookId</ref> addressBookId, <ref>ContactId</ref> contactId)]
19061 interface ContactRef {
19062 attribute <ref>AddressBookId</ref> addressBookId;
19064 attribute <ref>ContactId</ref> contactId;
19067 dictionary ContactNameInit {
19070 DOMString firstName;
19071 DOMString middleName;
19072 DOMString lastName;
19073 DOMString[] nicknames;
19074 DOMString phoneticFirstName;
19075 DOMString phoneticLastName;
19078 [Constructor(optional <ref>ContactNameInit</ref>? nameInitDict)]
19079 interface ContactName {
19080 attribute DOMString? prefix;
19082 attribute DOMString? suffix;
19084 attribute DOMString? firstName;
19086 attribute DOMString? middleName;
19088 attribute DOMString? lastName;
19090 attribute DOMString[] nicknames;
19092 attribute DOMString? phoneticFirstName;
19094 attribute DOMString? phoneticLastName;
19096 readonly attribute DOMString? displayName;
19099 dictionary ContactOrganizationInit {
19101 DOMString department;
19107 [Constructor(optional <ref>ContactOrganizationInit</ref>? orgInitDict)]
19108 interface ContactOrganization {
19109 attribute DOMString? name;
19111 attribute DOMString? department;
19113 attribute DOMString? title;
19115 attribute DOMString? role;
19117 attribute DOMString? logoURI;
19120 [Constructor(DOMString url, optional DOMString type)]
19121 interface ContactWebSite
19123 attribute DOMString url;
19125 attribute DOMString type;
19128 [Constructor(Date date, optional DOMString? label)]
19129 interface ContactAnniversary
19131 attribute Date date;
19133 attribute DOMString? label;
19136 dictionary ContactAddressInit
19141 DOMString streetAddress;
19142 DOMString additionalInformation;
19143 DOMString postalCode;
19148 [Constructor(optional <ref>ContactAddressInit</ref>? addressInitDict)]
19149 interface ContactAddress
19151 attribute DOMString? country;
19153 attribute DOMString? region;
19155 attribute DOMString? city;
19157 attribute DOMString? streetAddress;
19159 attribute DOMString? additionalInformation;
19161 attribute DOMString? postalCode;
19163 attribute boolean isDefault;
19165 attribute DOMString[] types;
19168 [Constructor(DOMString number, optional DOMString[] types, optional boolean isDefault)]
19169 interface ContactPhoneNumber
19171 attribute DOMString number;
19173 attribute boolean isDefault;
19175 attribute DOMString[] types;
19178 [Constructor(DOMString email, optional DOMString[] types, optional boolean isDefault)]
19179 interface ContactEmailAddress
19181 attribute DOMString email;
19183 attribute boolean isDefault;
19185 attribute DOMString[] types;
19188 [Constructor(DOMString name, optional DOMString? ringtoneURI, optional DOMString? photoURI)]
19189 interface ContactGroup
19191 readonly attribute <ref>ContactGroupId</ref>? id;
19193 readonly attribute <ref>AddressBookId</ref>? addressBookId;
19195 attribute DOMString name;
19197 attribute DOMString? ringtoneURI;
19199 attribute DOMString? photoURI;
19201 readonly attribute DOMString readOnly;
19204 [Callback=FunctionOnly, NoInterfaceObject] interface PersonArraySuccessCallback {
19205 void onsuccess(<ref>Person</ref>[] persons);
19208 [Callback=FunctionOnly, NoInterfaceObject] interface ContactArraySuccessCallback {
19209 void onsuccess(<ref>Contact</ref>[] contacts);
19212 [Callback=FunctionOnly, NoInterfaceObject] interface AddressBookArraySuccessCallback {
19213 void onsuccess(<ref>AddressBook</ref>[] addressbooks);
19216 [Callback, NoInterfaceObject] interface AddressBookChangeCallback {
19217 void oncontactsadded(<ref>Contact</ref>[] contacts);
19219 void oncontactsupdated(<ref>Contact</ref>[] contacts);
19221 void oncontactsremoved(<ref>ContactId</ref>[] contactIds);
19224 [Callback, NoInterfaceObject] interface PersonsChangeCallback {
19225 void onpersonsadded(<ref>Person</ref>[] persons);
19227 void onpersonsupdated(<ref>Person</ref>[] persons);
19229 void onpersonsremoved(<ref>PersonId</ref>[] personIds);
19234 This API is for managing Address Books.
19238 A contact is a set of information that describes a contact. The contact contains information, such as phone numbers,
19239 e-mail addresses, etc.
19242 <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.
19245 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.
19248 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.
19251 For more information on the Contact features, see <a href="../../org.tizen.web.appprogramming/html/guide/social_guide/contact.htm">Contact Guide</a>.
19258 <Typedef name="AddressBookId" id="::Contact::AddressBookId">
19259 <webidl> typedef DOMString AddressBookId;</webidl>
19262 The address book identifier.
19268 <Type type="DOMString"/>
19270 <Typedef name="ContactId" id="::Contact::ContactId">
19271 <webidl> typedef DOMString ContactId;</webidl>
19274 The contact identifier.
19280 <Type type="DOMString"/>
19282 <Typedef name="PersonId" id="::Contact::PersonId">
19283 <webidl> typedef DOMString PersonId;</webidl>
19286 The person identifier.
19292 <Type type="DOMString"/>
19294 <Typedef name="ContactGroupId" id="::Contact::ContactGroupId">
19295 <webidl> typedef DOMString ContactGroupId;</webidl>
19298 The group identifier.
19304 <Type type="DOMString"/>
19306 <Enum name="ContactTextFormat" id="::Contact::ContactTextFormat">
19307 <webidl> enum ContactTextFormat {"VCARD_30"};</webidl>
19310 An enumerator that indicates the contact format that is used for export. * The possible values are:
19315 VCARD_30 - vCard v3.0 format </li>
19318 Currently, vCard v3.0 is the only format supported by the Tizen platform.
19325 <EnumValue stringvalue="VCARD_30">
19326 <webidl>"VCARD_30</webidl>
19329 <Interface name="ContactManagerObject" id="::Contact::ContactManagerObject">
19330 <webidl> [NoInterfaceObject] interface ContactManagerObject {
19331 readonly attribute <ref>ContactManager</ref> contact;
19335 Defines what is instantiated by the <em>Tizen </em>object from the Tizen Platform.
19339 There is a <em>tizen.contact </em>object that allows access to the Contact API functionality.
19346 <ExtendedAttributeList>
19347 <ExtendedAttribute name="NoInterfaceObject">
19348 <webidl>NoInterfaceObject</webidl>
19349 </ExtendedAttribute>
19350 </ExtendedAttributeList>
19351 <Attribute readonly="readonly" name="contact" id="::Contact::ContactManagerObject::contact">
19352 <webidl> readonly attribute <ref>ContactManager</ref> contact;</webidl>
19353 <Type name="ContactManager"/>
19356 <Implements name1="Tizen" name2="ContactManagerObject">
19357 <webidl> <ref>Tizen</ref> implements <ref>ContactManagerObject</ref>;</webidl>
19359 <Interface name="ContactManager" id="::Contact::ContactManager">
19360 <webidl> [NoInterfaceObject] interface ContactManager {
19362 void getAddressBooks(<ref>AddressBookArraySuccessCallback</ref> successCallback,
19363 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
19365 <ref>AddressBook</ref> getUnifiedAddressBook() raises(<ref>WebAPIException</ref>);
19367 <ref>AddressBook</ref> getDefaultAddressBook() raises(<ref>WebAPIException</ref>);
19369 <ref>AddressBook</ref> getAddressBook(<ref>AddressBookId</ref> addressBookId) raises(<ref>WebAPIException</ref>);
19371 <ref>Person</ref> get(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);
19373 void update(<ref>Person</ref> person) raises(<ref>WebAPIException</ref>);
19375 void updateBatch(<ref>Person</ref>[] persons,
19376 optional <ref>SuccessCallback</ref>? successCallback,
19377 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
19379 void remove(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);
19381 void removeBatch(<ref>PersonId</ref>[] personIds,
19382 optional <ref>SuccessCallback</ref>? successCallback,
19383 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
19385 void find(<ref>PersonArraySuccessCallback</ref> successCallback,
19386 optional <ref>ErrorCallback</ref>? errorCallback,
19387 optional <ref>AbstractFilter</ref>? filter,
19388 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);
19390 long addChangeListener(<ref>PersonsChangeCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);
19392 void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
19396 This interface provides access to the API functionality.
19400 This interface offers a method to retrieve the address books objects.
19401 The address book objects can be manipulated with the provided functionalities to add, remove, and update the contained information.
19408 <ExtendedAttributeList>
19409 <ExtendedAttribute name="NoInterfaceObject">
19410 <webidl>NoInterfaceObject</webidl>
19411 </ExtendedAttribute>
19412 </ExtendedAttributeList>
19413 <Operation name="getAddressBooks" id="::Contact::ContactManager::getAddressBooks">
19414 <webidl> void getAddressBooks(<ref>AddressBookArraySuccessCallback</ref> successCallback,
19415 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
19418 Gets the available address books.
19422 If the operation completes successfully, the successCallback must
19423 be invoked with the phone address book and the SIM address book (if any).
19424 Other address books present in the device should also be returned.
19427 If no address book is present, the <em>successCallback</em> will be invoked with an empty array.
19430 The errorCallback is launched with these error types:
19434 InvalidValuesError - If the event given in argument is not a recurring event. </li>
19436 UnknownError - If any other error occurs while trying to get the address books. </li>
19446 http://tizen.org/privilege/contact.read
19448 <Code> var addressbook;
19450 // Define the error callback for all the asynchronous calls
19451 function errorCB(err) {
19452 console.log( 'The following error occurred: ' + err.name);
19455 function contactsFoundCB(contacts) {
19456 // The contact has been successfully found
19457 // Let's try to change the first name
19458 contacts[0].name.firstName = 'Jeffrey Ross';
19460 addressbook.update(contacts[0]);
19462 console.log( 'The following error occurred while updating: ' + err.name);
19464 console.log('First contact was updated');
19467 // Define the success callback for retrieving all the
19469 function addressBooksCB(addressbooks) {
19470 if(addressbooks.length > 0) {
19471 addressbook = addressbooks[0];
19472 console.log('The addressbook type is ' + addressbook.type +
19473 ' and name ' + addressbook.name);
19475 var contact = new tizen.Contact(
19476 {name: new tizen.ContactName({firstName:'Jeffrey',
19478 nicknames:['joey ramone']}),
19479 emails:[new tizen.ContactEmailAddress('user@domain.com')],
19480 phoneNumbers:[new tizen.ContactPhoneNumber('123456789')]});
19482 addressbook.add(contact);
19484 // The contact has been successfully added
19485 // Checks whether the added contact can be retrieved from the address book or not.
19486 // If the address book is empty, only the item added through saveContact
19487 // should be returned
19488 var filter = new tizen.AttributeFilter('name.firstName', 'CONTAINS', 'Jeffrey');
19490 addressbook.find(contactsFoundCB, errorCB, filter);
19492 console.log( 'The following error occurred while finding: ' + err.name);
19497 // Get a list of available address books.
19498 tizen.contact.getAddressBooks(addressBooksCB, errorCB);
19501 <Type type="void"/>
19503 <Argument name="successCallback">
19506 The method to call when the invocation ends successfully.
19509 <Type name="AddressBookArraySuccessCallback"/>
19511 <Argument optional="optional" name="errorCallback">
19514 The method to call when an error occurs.
19517 <Type name="ErrorCallback" nullable="nullable"/>
19521 <RaiseException name="WebAPIException">
19524 with error type TypeMismatchError, if any input parameter
19525 is not compatible with the expected type for that parameter.
19528 with error type SecurityError, if the application does not have the privilege to call this method.
19531 with error type NotSupportedError, if the feature
19538 <Operation name="getUnifiedAddressBook" id="::Contact::ContactManager::getUnifiedAddressBook">
19539 <webidl> <ref>AddressBook</ref> getUnifiedAddressBook() raises(<ref>WebAPIException</ref>);</webidl>
19542 Gets the aggregation of all address books.
19546 The unified address book is a logical address book that represents an aggregation of all address books
19547 that are obtained by getAddressBooks() and contains all contacts in the address books.
19548 Note that the unified address book does not have an address book ID
19549 and it is set to <var>null</var>.
19559 http://tizen.org/privilege/contact.read
19561 <Code> var addressbook;
19563 // Define the error callback
19564 function errorCB(err) {
19565 console.log( 'The following error occurred: ' + err.name);
19568 function contactsFoundCB(contacts) {
19569 // The contact has been successfully found
19570 // Let's try to change the first name
19571 contacts[0].name.firstName = 'Jeffrey Ross';
19573 addressbook.update(contacts[0]);
19574 console.log('First contact was updated');
19576 console.log( 'The following error occurred while updating: ' + err.name);
19580 // Get unified address book.
19581 addressbook = tizen.contact.getUnifiedAddressBook();
19583 // Add a new contact
19584 var contact = new tizen.Contact(
19585 {name: new tizen.ContactName({firstName:'Jeffrey',
19587 nicknames:['joey ramone']}),
19588 emails:[new tizen.ContactEmailAddress('user@domain.com')],
19589 phoneNumbers:[new tizen.ContactPhoneNumber('123456789')]});
19592 addressbook.add(contact);
19594 console.log( 'The following error occurred while adding: ' + err.name);
19597 // The contact has been successfully added
19598 // Let's try to check if we can retrieve the added
19599 // contact from the address book. If the address book
19600 // was empty only the item added through saveContact should
19602 var filter = new tizen.AttributeFiilter('name.firstName', 'CONTAINS', 'Jeffrey');
19604 addressbook.find(contactsFoundCB, errorCB, filter);
19606 console.log( 'The following error occurred while finding: ' + err.name);
19610 <Type name="AddressBook">
19613 AddressBook The unified AddressBook object.
19619 <RaiseException name="WebAPIException">
19622 with error type SecurityError, if the application does not have the privilege to call this method.
19625 with error type NotSupportedError, if the feature
19629 with error type UnknownError in any other error case.
19635 <Operation name="getDefaultAddressBook" id="::Contact::ContactManager::getDefaultAddressBook">
19636 <webidl> <ref>AddressBook</ref> getDefaultAddressBook() raises(<ref>WebAPIException</ref>);</webidl>
19639 Gets the default address book.
19643 The default address book is the appointed addressbook from platform or operator.
19644 This is one of addressBooks and it has the address book ID.
19647 If the operation completes successfully, it must return the
19648 default address book.
19658 http://tizen.org/privilege/contact.read
19660 <Code> var addressbook;
19662 // Define the error callback
19663 function errorCB(err) {
19664 console.log( 'The following error occurred: ' + err.name);
19667 function contactsFoundCB(contacts) {
19668 // The contact has been successfully found
19669 // Let's try to change the first name
19670 contacts[0].name.firstName = 'Jeffrey Ross';
19672 addressbook.update(contacts[0]);
19673 console.log('First contact was updated');
19675 console.log( 'The following error occurred while updating: ' + err.name);
19679 // Get default address book.
19680 addressbook = tizen.contact.getDefaultAddressBook();
19682 // Add a new contact
19683 var contact = new tizen.Contact(
19684 {name: new tizen.ContactName({firstName:'Jeffrey',
19686 nicknames:['joey ramone']}),
19687 emails:[new tizen.ContactEmailAddress('user@domain.com')],
19688 phoneNumbers:[new tizen.ContactPhoneNumber('123456789')]});
19691 addressbook.add(contact);
19693 console.log( 'The following error occurred while adding: ' + err.name);
19696 // The contact has been successfully added
19697 // Checks whether the added contact can be retrieved from the address book or not.
19698 // If the address book is empty, only the item added
19699 // through em>saveContact /em>should be returned
19700 var filter = new tizen.AttributeFiilter('name.firstName', 'CONTAINS', 'Jeffrey');
19702 addressbook.find(contactsFoundCB, errorCB, filter);
19704 console.log( 'The following error occurred while finding: ' + err.name);
19708 <Type name="AddressBook">
19711 AddressBook The default AddressBook object.
19717 <RaiseException name="WebAPIException">
19720 with error type SecurityError, if the application does not have the privilege to call this method.
19723 with error type NotSupportedError, if the feature
19727 with error type UnknownError in any other error case.
19733 <Operation name="getAddressBook" id="::Contact::ContactManager::getAddressBook">
19734 <webidl> <ref>AddressBook</ref> getAddressBook(<ref>AddressBookId</ref> addressBookId) raises(<ref>WebAPIException</ref>);</webidl>
19737 Gets the address book with the specified identifier.
19741 If the operation completes successfully, it must return the
19742 address book with the specified identifier.
19752 http://tizen.org/privilege/contact.read
19754 <Code> var contactRef; // ContactRef supposed to be initialized
19756 // Retrieves the Contact corresponding to a given ContactRef.
19757 var addressBook = tizen.contact.getAddressBook(contactRef.addressBookId);
19758 var contact = addressBook.get(contactRef.contactId);
19759 console.log("Successfully resolved contact with id: " + contactRef.contactId);
19761 console.log("Error: " + err.name);
19765 <Type name="AddressBook">
19768 AddressBook The matching AddressBook object.
19773 <Argument name="addressBookId">
19776 The address book identifier.
19779 <Type name="AddressBookId"/>
19783 <RaiseException name="WebAPIException">
19786 with error type NotFoundError, if there is no address book
19787 with the given identifier.
19790 with error type TypeMismatchError, if any input parameter
19791 is not compatible with the expected type for that parameter.
19794 with error type InvalidValuesError, if any of the input
19795 parameters contain an invalid value.
19798 with error type SecurityError, if the application does not have the privilege to call this method.
19801 with error type NotSupportedError, if the feature
19805 with error type UnknownError in any other error case.
19811 <Operation name="get" id="::Contact::ContactManager::get">
19812 <webidl> <ref>Person</ref> get(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);</webidl>
19815 Gets the person with the specified identifier.
19819 If the operation completes successfully, it must return the
19820 person with the specified identifier.
19830 http://tizen.org/privilege/contact.read
19832 <Code> var contactRef; // ContactRef supposed to be initialized
19834 // Retrieves the Person corresponding to a Contact.
19835 var addressBook = tizen.contact.getAddressBook(contactRef.addressBookId);
19836 var contact = addressBook.get(contactRef.contactId);
19837 var person = tizen.contact.get(contact.personId);
19838 console.log("Successfully resolved person with id: " + contact.personId);
19840 console.log("Error: " + err.name);
19844 <Type name="Person">
19847 Person The matching Person object.
19852 <Argument name="personId">
19855 The Person identifier.
19858 <Type name="PersonId"/>
19862 <RaiseException name="WebAPIException">
19865 with error type NotFoundError, if there is no person
19866 with the given identifier.
19869 with error type TypeMismatchError, if any input parameter
19870 is not compatible with the expected type for that parameter.
19873 with error type InvalidValuesError, if any of the input
19874 parameters contain an invalid value.
19877 with error type SecurityError, if the application does not have the privilege to call this method.
19880 with error type NotSupportedError, if the feature
19884 with error type UnknownError in any other error case.
19890 <Operation name="update" id="::Contact::ContactManager::update">
19891 <webidl> void update(<ref>Person</ref> person) raises(<ref>WebAPIException</ref>);</webidl>
19894 Updates a person in the address book synchronously.
19903 http://tizen.org/privilege/contact.write
19905 <Code> // Define the error callback
19906 function errorCB(err) {
19907 console.log( 'The following error occurred: ' + err.name);
19910 function personsFoundCB(persons) {
19911 // The person has been successfully found
19912 // Let's try to change the isFavorite attribute
19913 persons[0].isFavorite = true;
19915 tizen.contact.update(persons[0]);
19916 console.log('First person was updated');
19918 console.log( 'The following error occurred while updating: ' + err.name);
19923 tizen.contact.find(personsFoundCB, errorCB);
19925 console.log( 'The following error occurred while finding: ' + err.name);
19929 <Type type="void"/>
19931 <Argument name="person">
19934 The person object to be updated.
19937 <Type name="Person"/>
19941 <RaiseException name="WebAPIException">
19944 with error type NotFoundError, if the identifier does not match.
19947 with error type TypeMismatchError, if any input parameter
19948 is not compatible with the expected type for that parameter.
19951 with error type InvalidValuesError, if any input parameter
19952 contains invalid values.
19955 with error type SecurityError, if the application does not have the privilege to call this method.
19958 with error type NotSupportedError, if the feature
19962 with error type UnknownError, if the person could not be updated
19963 to an unknown error.
19969 <Operation name="updateBatch" id="::Contact::ContactManager::updateBatch">
19970 <webidl> void updateBatch(<ref>Person</ref>[] persons,
19971 optional <ref>SuccessCallback</ref>? successCallback,
19972 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
19975 Updates several existing persons in the contact DB asynchronously.
19979 The <em>errorCallback()</em> is launched with these error types:
19983 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>
19985 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
19987 UnknownError - If any other error occurs, while trying to add the persons. </li>
19990 If the details of any persons cannot be updated, the error callback function that was passed in the invocation will be called.
20000 http://tizen.org/privilege/contact.write
20002 <Code> // Define the error callback for all the asynchronous calls
20003 function errorCB(err) {
20004 console.log('The following error occurred: ' + err.name);
20007 function personsUpdatedCB() {
20008 console.log('Contacts were updated');
20011 function personsFoundCB(persons) {
20012 // The person has been successfully found
20013 for(var i = 0; i < persons.length; i++) {
20014 persons[i].isFavorite = true;
20017 tizen.contact.updateBatch(persons, personsUpdatedCB, errorCB);
20019 console.log('The following error occurred while updating: ' + err.name);
20024 tizen.contact.find(personsFoundCB, errorCB);
20026 console.log('The following error occurred while finding: ' + err.name);
20030 <Type type="void"/>
20032 <Argument name="persons">
20035 A list of Person objects to be saved in the terminal storage.
20038 <Type type="array">
20039 <Type name="Person"/>
20042 <Argument optional="optional" name="successCallback">
20045 The method to call when the invocation ends successfully.
20048 <Type name="SuccessCallback" nullable="nullable"/>
20050 <Argument optional="optional" name="errorCallback">
20053 The method to call when the request to update the details of a person fail.
20056 <Type name="ErrorCallback" nullable="nullable"/>
20060 <RaiseException name="WebAPIException">
20063 with error type TypeMismatchError, if the input parameter
20064 is not compatible with the expected type for that parameter.
20067 with error type SecurityError, if the application does not have the privilege to call this method.
20070 with error type NotSupportedError, if this feature is not supported.
20076 <Operation name="remove" id="::Contact::ContactManager::remove">
20077 <webidl> void remove(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);</webidl>
20080 Removes a person from the contact DB synchronously.
20084 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.
20094 http://tizen.org/privilege/contact.write
20096 <Code> // Define the error callback
20097 function errorCB(err) {
20098 console.log('The following error occurred: ' + err.name);
20101 function personsFoundCB(persons) {
20102 // The person has been successfully found
20103 if(persons.length > 0) {
20105 tizen.contact.remove(persons[0].id);
20106 console.log('First person was removed');
20108 console.log('The following error occurred while removing: ' + err.name);
20111 console.log( 'No persons.');
20116 tizen.contact.find(personsFoundCB, errorCB);
20118 console.log( 'The following error occurred while finding: ' + err.name);
20122 <Type type="void"/>
20124 <Argument name="personId">
20127 An identifier (ID attribute) of the Person object to delete.
20130 <Type name="PersonId"/>
20134 <RaiseException name="WebAPIException">
20137 with error type NotFoundError, if the identifier does not match
20141 with error type TypeMismatchError, if any input parameter
20142 is not compatible with the expected type for that parameter.
20145 with error type InvalidValuesError, if any input parameter
20146 contains invalid values.
20149 with error type SecurityError, if the application does not have the privilege to call this method.
20152 with error type NotSupportedError, if the feature
20156 with error type UnknownError, if the person could not be removed
20157 to an unknown error.
20163 <Operation name="removeBatch" id="::Contact::ContactManager::removeBatch">
20164 <webidl> void removeBatch(<ref>PersonId</ref>[] personIds,
20165 optional <ref>SuccessCallback</ref>? successCallback,
20166 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
20169 Removes persons from contact DB asynchronously.
20173 Removes the persons that correspond to the specified identifiers as well as the contacts related to them.
20176 The <em>errorCallback() </em>is launched with these error types:
20180 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>
20182 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
20184 UnknownError - If any other error occurs while trying to remove the persons. </li>
20194 http://tizen.org/privilege/contact.write
20196 <Code> // Define the error callback
20197 function errorCB(err) {
20198 console.log( 'The following error occurred: ' + err.name);
20201 function personsRemovedCB() {
20202 console.log('Contacts were removed');
20205 function personsFoundCB(persons) {
20206 // The person has been successfully found
20207 if(persons.length > 2) {
20209 tizen.contact.removeBatch([persons[0].id, persons[1].id], personsRemovedCB, errorCB);
20211 console.log( 'The following error occurred while removing: ' + err.name);
20214 console.log( 'Not enough persons.');
20219 tizen.contact.find(personsFoundCB, errorCB);
20221 console.log( 'The following error occurred while finding: ' + err.name);
20225 <Type type="void"/>
20227 <Argument name="personIds">
20230 A list of identifiers (id attribute) for the Person objects to delete.
20233 <Type type="array">
20234 <Type name="PersonId"/>
20237 <Argument optional="optional" name="successCallback">
20240 The method to call when the invocation ends successfully.
20243 <Type name="SuccessCallback" nullable="nullable"/>
20245 <Argument optional="optional" name="errorCallback">
20248 The method to call when the request to delete persons fails.
20251 <Type name="ErrorCallback" nullable="nullable"/>
20255 <RaiseException name="WebAPIException">
20258 with error type TypeMismatchError, if any input parameter
20259 is not compatible with the expected type for that parameter.
20262 with error type SecurityError, if the application does not have the privilege to call this method.
20265 with error type NotSupportedError, if the feature
20272 <Operation name="find" id="::Contact::ContactManager::find">
20273 <webidl> void find(<ref>PersonArraySuccessCallback</ref> successCallback,
20274 optional <ref>ErrorCallback</ref>? errorCallback,
20275 optional <ref>AbstractFilter</ref>? filter,
20276 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);</webidl>
20279 Gets an array of all <em>Person </em>objects from the contact DB or the ones that match the optionally supplied filter.
20283 If the filter is passed and contains valid values, only those values in the
20284 address book that match the filter criteria as specified in the AbstractFilter
20285 interface will be returned in the successCallback. If no filter is passed, the filter
20286 contains any invalid values, the filter is <var>null </var> or undefined, then
20287 the implementation must return the full list of contact items
20288 in the successCallback. If no persons are available in the contact DB or no
20289 person matches the filter criteria, the successCallback will be invoked
20290 with an empty array.
20293 The <em>errorCallback() </em>is launched with these error types:
20297 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
20299 UnknownError - If any other error occurs while trying to retrieve the persons. </li>
20309 http://tizen.org/privilege/contact.read
20311 <Code> // Define the error callback.
20312 function errorCB(err) {
20313 console.log( 'The following error occurred: ' + err.name);
20316 // Define the person search success callback.
20317 function personsFoundCB(persons) {
20318 console.log(persons.length + ' results found.');
20321 // Finds all the persons in the contact DB that have the word Ramone in their display name
20322 var filter = new tizen.AttributeFilter('displayName', 'CONTAINS', 'Ramone');
20324 // The persons returned by the find() query will be sorted in the ascending order of their display name.
20325 var sortingMode = new tizen.SortMode('displayName', 'ASC');
20327 tizen.contact.find(personsFoundCB, errorCB,
20328 filter, sortingMode);
20330 console.log( 'The following error occurred while finding: ' + err.name);
20334 <Type type="void"/>
20336 <Argument name="successCallback">
20339 The method to call when the invocation ends successfully.
20342 <Type name="PersonArraySuccessCallback"/>
20344 <Argument optional="optional" name="errorCallback">
20347 The method to call when an error occurs.
20350 <Type name="ErrorCallback" nullable="nullable"/>
20352 <Argument optional="optional" name="filter">
20355 A filter to select which persons are returned.
20358 <Type name="AbstractFilter" nullable="nullable"/>
20360 <Argument optional="optional" name="sortMode">
20363 A variable to determine the sort order in which the persons are returned.
20366 <Type name="SortMode" nullable="nullable"/>
20370 <RaiseException name="WebAPIException">
20373 with error type TypeMismatchError, if any input parameter
20374 is not compatible with the expected type for that parameter.
20377 with error type SecurityError, if the application does not have the privilege to call this method.
20380 with error type NotSupportedError, if the feature
20387 <Operation name="addChangeListener" id="::Contact::ContactManager::addChangeListener">
20388 <webidl> long addChangeListener(<ref>PersonsChangeCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);</webidl>
20391 Subscribes to receive notifications about persons' changes.
20395 When executed, the implementation must immediately return a subscription identifier that identifies
20396 the watch operation. After returning the identifier, the watch operation is started
20407 http://tizen.org/privilege/contact.read
20409 <Code> var watcherId = 0; // watcher identifier
20412 onpersonsadded: function(persons) {
20413 console.log(persons.length + ' persons were added');
20415 onpersonsupdated: function(persons) {
20416 console.log(persons.length + ' persons were updated');
20418 onpersonsremoved: function(ids) {
20419 console.log(ids.length + ' persons were deleted');
20423 // registers to be notified when the persons' changes
20424 watcherId = tizen.contact.addChangeListener(watcher);
20430 long Identifier used to clear the watch subscription.
20435 <Argument name="successCallback">
20438 Contains the methods for different types of change notifications.
20441 <Type name="PersonsChangeCallback"/>
20445 <RaiseException name="WebAPIException">
20448 with error type TypeMismatchError, if any input parameter
20449 is not compatible with the expected type for that parameter.
20452 with error type InvalidValuesError, if any of the input parameters
20453 contain an invalid value.
20456 with error type SecurityError, if the application does not have the privilege to call this method.
20459 with error type NotSupportedError, if the feature
20463 with error type UnknownError in any other case.
20469 <Operation name="removeChangeListener" id="::Contact::ContactManager::removeChangeListener">
20470 <webidl> void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);</webidl>
20473 Unsubscribes a persons' changes watch operation.
20477 If the watchId argument is valid and corresponds to a subscription already in
20478 place, the watch process must immediately stop and no further callbacks MUST be
20479 invoked. If the watchId argument is not valid or does not correspond to a
20480 valid subscription, the method should return without any further action.
20490 http://tizen.org/privilege/contact.read
20492 <Code> var watcherId = 0; // watcher identifier
20494 // Receives persons' changes
20496 onpersonsadded: function(persons) {
20497 console.log(persons.length + ' persons were added');
20499 onpersonsupdated: function(persons) {
20500 console.log(persons.length + ' persons were updated');
20502 onpersonsremoved: function(ids) {
20503 console.log(ids.length + ' persons were removed');
20507 // Cancel the watch operation
20508 function cancelWatch() {
20509 tizen.contact.removeChangeListener(watcherId);
20512 // registers to be notified when the persons' changes
20513 watcherId = tizen.contact.addChangeListener(watcher);
20516 <Type type="void"/>
20518 <Argument name="watchId">
20521 A subscription Identifier.
20524 <Type type="long"/>
20528 <RaiseException name="WebAPIException">
20531 with error type TypeMismatchError, if any input parameter
20532 is not compatible with the expected type for that parameter.
20535 with error type InvalidValuesError, if any of the input
20536 parameters contain an invalid value.
20539 with error type NotFoundError, if there is no listener
20540 with the given identifier.
20543 with error type SecurityError, if the application does not have the privilege to call this method.
20546 with error type NotSupportedError, if the feature
20550 with error type UnknownError in any other error case.
20557 <Interface name="AddressBook" id="::Contact::AddressBook">
20558 <webidl> [NoInterfaceObject] interface AddressBook {
20560 readonly attribute <ref>AddressBookId</ref>? id;
20562 readonly attribute DOMString name;
20564 readonly attribute boolean readOnly;
20566 <ref>Contact</ref> get(<ref>ContactId</ref> id) raises(<ref>WebAPIException</ref>);
20568 void add(<ref>Contact</ref> contact) raises(<ref>WebAPIException</ref>);
20570 void addBatch(<ref>Contact</ref>[] contacts,
20571 optional <ref>ContactArraySuccessCallback</ref>? successCallback,
20572 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
20574 void update(<ref>Contact</ref> contact) raises(<ref>WebAPIException</ref>);
20576 void updateBatch(<ref>Contact</ref>[] contacts,
20577 optional <ref>SuccessCallback</ref>? successCallback,
20578 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
20580 void remove(<ref>ContactId</ref> id) raises(<ref>WebAPIException</ref>);
20582 void removeBatch(<ref>ContactId</ref>[] ids,
20583 optional <ref>SuccessCallback</ref>? successCallback,
20584 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
20586 void find(<ref>ContactArraySuccessCallback</ref> successCallback,
20587 optional <ref>ErrorCallback</ref>? errorCallback,
20588 optional <ref>AbstractFilter</ref>? filter,
20589 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);
20591 long addChangeListener(<ref>AddressBookChangeCallback</ref> successCallback,
20592 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
20594 void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
20596 <ref>ContactGroup</ref> getGroup(<ref>ContactGroupId</ref> groupId) raises(<ref>WebAPIException</ref>);
20598 void addGroup(<ref>ContactGroup</ref> group) raises(<ref>WebAPIException</ref>);
20600 void updateGroup(<ref>ContactGroup</ref> group) raises(<ref>WebAPIException</ref>);
20602 void removeGroup(<ref>ContactGroupId</ref> groupId) raises(<ref>WebAPIException</ref>);
20604 <ref>ContactGroup</ref>[] getGroups() raises(<ref>WebAPIException</ref>);
20608 This interface provides methods to manage an address book.
20612 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:
20616 <em>get()</em> - To get contacts that have a specific ID </li>
20618 <em>find()</em> - To find contacts using filters </li>
20620 <em>add() </em>or <em>addBatch()</em> - To add contacts to a specific address book </li>
20622 <em>update() </em>or <em>updateBatch()</em> - To update contacts in a specific address book </li>
20624 <em>remove() </em>or <em>removeBatch() </em> - To remove existing contacts </li>
20626 <em>addChangeListener() </em>or <em>removeChangeListener() </em> - To watch for address book changes </li>
20629 This interface also offers methods to manipulate groups within the address book, such as:
20633 <em>getGroup()</em> - To get a group having specific ID </li>
20635 <em>getGroups()</em> - To get groups in a specific address book </li>
20637 <em>addGroup() </em> - To add groups to a specific address book </li>
20639 <em>updateGroup() </em> - To update groups in a specific address book </li>
20641 <em>removeGroup() </em> - To remove existing groups </li>
20648 <ExtendedAttributeList>
20649 <ExtendedAttribute name="NoInterfaceObject">
20650 <webidl>NoInterfaceObject</webidl>
20651 </ExtendedAttribute>
20652 </ExtendedAttributeList>
20653 <Attribute readonly="readonly" name="id" id="::Contact::AddressBook::id">
20654 <webidl> readonly attribute <ref>AddressBookId</ref>? id;</webidl>
20657 An attribute to uniquely identify the address book.
20661 The value of this attribute shall be <var>null </var> if the address book
20662 is the unified address book.
20669 <Type name="AddressBookId" nullable="nullable"/>
20671 <Attribute readonly="readonly" name="name" id="::Contact::AddressBook::name">
20672 <webidl> readonly attribute DOMString name;</webidl>
20675 The address book descriptive name.
20681 <Type type="DOMString"/>
20683 <Attribute readonly="readonly" name="readOnly" id="::Contact::AddressBook::readOnly">
20684 <webidl> readonly attribute boolean readOnly;</webidl>
20687 An attribute to indicate if the address book is read-only.
20691 Some on line address books cannot be edited and will have this
20692 flag set to <var>true</var>.
20699 <Type type="boolean"/>
20701 <Operation name="get" id="::Contact::AddressBook::get">
20702 <webidl> <ref>Contact</ref> get(<ref>ContactId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
20705 Gets the contact with the specified identifier.
20709 If the operation completes successfully, it must return the
20710 contact with the specified identifier.
20720 http://tizen.org/privilege/contact.read
20722 <Code> var contactRef; // ContactRef supposed to be initialized
20724 // Retrieves the Contact corresponding to a given ContactRef.
20725 var addressBook = tizen.contact.getAddressBook(contactRef.addressBookId);
20726 var contact = addressBook.get(contactRef.contactId);
20727 console.log("Successfully resolved contact with id: " + contactRef.contactId);
20729 console.log("Error: " + err.name);
20733 <Type name="Contact">
20736 Contact The matching Contact object.
20741 <Argument name="id">
20744 A contact identifier.
20747 <Type name="ContactId"/>
20751 <RaiseException name="WebAPIException">
20754 with error type NotFoundError, if there is no contact
20755 with the given identifier.
20758 with error type TypeMismatchError, if any input parameter
20759 is not compatible with the expected type for that parameter.
20762 with error type InvalidValuesError, if any of the input
20763 parameters contain an invalid value.
20766 with error type SecurityError, if the application does not have the privilege to call this method.
20769 with error type NotSupportedError, if the feature
20773 with error type UnknownError in any other error case.
20779 <Operation name="add" id="::Contact::AddressBook::add">
20780 <webidl> void add(<ref>Contact</ref> contact) raises(<ref>WebAPIException</ref>);</webidl>
20783 Adds a contact to the address book synchronously.
20787 If the contact is successfully inserted in the addressbook, the Contact object
20788 will have its identifier (id attribute) set when the function returns.
20789 This operation is done successfully, new person object is also generated automatically.
20792 If you wish to update an
20793 existing contact, call the update() method instead. If you wish to add a copy
20794 of an existing Contact object, call Contact.clone() method first and pass the
20795 clone to the add() method.
20798 The contact shall be added to default address book if the address book
20799 is the unified address book.
20809 http://tizen.org/privilege/contact.write
20811 <Code> var addressbook;
20813 // Get default address book
20814 addressbook = tizen.contact.getDefaultAddressBook();
20817 var contact = new tizen.Contact({name: new tizen.ContactName({firstName:'Jeffrey',
20819 nicknames:['joey ramone']}),
20820 emails:[new tizen.ContactEmailAddress('user@domain.com')],
20821 phoneNumbers:[new tizen.ContactPhoneNumber('123456789')]});
20822 addressbook.add(contact);
20823 console.log('Contact added with id ' + contact.id);
20825 console.log( 'The following error occurred while adding: ' + err.name);
20829 <Type type="void"/>
20831 <Argument name="contact">
20834 A contact to be added.
20837 <Type name="Contact"/>
20841 <RaiseException name="WebAPIException">
20844 with error type TypeMismatchError, if any input parameter
20845 is not compatible with the expected type for that parameter.
20848 with error type InvalidValuesError, if any input parameter
20849 contains invalid values.
20852 with error type SecurityError, if the application does not have the privilege to call this method.
20855 with error type NotSupportedError, if the feature
20859 with error type UnknownError, if any other error occurs while trying to insert the contact.
20865 <Operation name="addBatch" id="::Contact::AddressBook::addBatch">
20866 <webidl> void addBatch(<ref>Contact</ref>[] contacts,
20867 optional <ref>ContactArraySuccessCallback</ref>? successCallback,
20868 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
20871 Adds several contacts to the address book asynchronously.
20875 If all the contacts are successfully added to the address book,
20876 the success callback will be invoked, passing the list of Contact objects
20877 that were added, with their identifier set (id attribute).
20880 The <em>errorCallback()</em> is launched with these error types:
20884 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>
20886 UnknownError - If any other error occurs, while trying to add the contacts. </li>
20889 If you wish to update an
20890 existing contact, call the update() method instead. If you wish to add a copy
20891 of an existing Contact object, call Contact.clone() method first and pass the
20892 clone to the add() method.
20895 If any of the contacts cannot be added, the error callback
20896 function that was passed in the invocation will be called.
20899 The contacts shall be added to local phone address book if the address book
20900 is the default address book.
20910 http://tizen.org/privilege/contact.write
20912 <Code> var addressbook;
20914 // Define the error callback
20915 function errorCB(err) {
20916 console.log( 'The following error occurred: ' + err.name);
20919 // Define the add contact success callback
20920 function contactsAddedCB(contacts) {
20921 console.log( contacts.length + ' contact(s) were successfully added to an Address Book' );
20924 // Get default address book
20925 addressbook = tizen.contact.getDefaultAddressBook();
20927 var c1 = new tizen.Contact({name: new tizen.ContactName({firstName:'Jeffrey',
20929 nicknames:['joey ramone']}),
20930 emails:[new tizen.ContactEmailAddress('user1@domain.com')],
20931 phoneNumbers:[new tizen.ContactPhoneNumber('123456789')]});
20933 var c2 = new tizen.Contact({name: new tizen.ContactName({firstName:'Elton',
20935 nicknames:['El']}),
20936 emails:[new tizen.ContactEmailAddress('user2@domain.com')],
20937 phoneNumbers:[new tizen.ContactPhoneNumber('987654321')]});
20940 addressbook.addBatch([c1, c2], contactsAddedCB, errorCB);
20942 console.log( 'The following error occurred while adding: ' + err.name);
20946 <Type type="void"/>
20948 <Argument name="contacts">
20951 A list of contacts to add.
20954 <Type type="array">
20955 <Type name="Contact"/>
20958 <Argument optional="optional" name="successCallback">
20961 The method to call when the invocation ends successfully.
20964 <Type name="ContactArraySuccessCallback" nullable="nullable"/>
20966 <Argument optional="optional" name="errorCallback">
20969 The method to call when the request fails.
20972 <Type name="ErrorCallback" nullable="nullable"/>
20976 <RaiseException name="WebAPIException">
20979 with error type TypeMismatchError, if the input parameter
20980 is not compatible with the expected type for that parameter.
20983 with error type SecurityError, if the application does not have the privilege to call this method.
20986 with error type NotSupportedError, if this feature is not supported.
20992 <Operation name="update" id="::Contact::AddressBook::update">
20993 <webidl> void update(<ref>Contact</ref> contact) raises(<ref>WebAPIException</ref>);</webidl>
20996 Updates a contact in the address book synchronously.
21005 http://tizen.org/privilege/contact.write
21007 <Code> var addressbook;
21009 // Define the error callback
21010 function errorCB(err) {
21011 console.log( 'The following error occurred: ' + err.name);
21014 function contactsFoundCB(contacts) {
21015 // The contact has been successfully found
21016 // Let's try to change the first name
21017 contacts[0].name.firstName = 'Christopher';
21019 addressbook.update(contacts[0]);
21020 console.log('First contact was updated');
21022 console.log( 'The following error occurred while updating: ' + err.name);
21026 // Get default address book.
21027 addressbook = tizen.contact.getDefaultAddressBook();
21029 var filter = new tizen.AttributeFilter('name.firstName', 'CONTAINS', 'Chris');
21031 addressbook.find(contactsFoundCB, errorCB, filter);
21033 console.log( 'The following error occurred while finding: ' + err.name);
21037 <Type type="void"/>
21039 <Argument name="contact">
21042 A contact object to update.
21045 <Type name="Contact"/>
21049 <RaiseException name="WebAPIException">
21052 with error type NotFoundError, if the identifier does not match.
21055 with error type TypeMismatchError, if any input parameter
21056 is not compatible with the expected type for that parameter.
21059 with error type InvalidValuesError, if any input parameter
21060 contains invalid values.
21063 with error type SecurityError, if the application does not have the privilege to call this method.
21066 with error type NotSupportedError, if the feature
21070 with error type UnknownError, if the contact could not be updated
21071 to an unknown error.
21077 <Operation name="updateBatch" id="::Contact::AddressBook::updateBatch">
21078 <webidl> void updateBatch(<ref>Contact</ref>[] contacts,
21079 optional <ref>SuccessCallback</ref>? successCallback,
21080 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
21083 Updates several existing contacts in the address book asynchronously.
21087 The <em>errorCallback()</em> is launched with these error types:
21091 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>
21093 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
21095 UnknownError - If any other error occurs, while trying to add the contacts. </li>
21098 If any of the contacts could not be updated, the error callback
21099 function that was passed in the invocation will be called.
21109 http://tizen.org/privilege/contact.write
21111 <Code> var addressbook;
21113 // Define the error callback for all the asynchronous calls
21114 function errorCB(err) {
21115 console.log('The following error occurred: ' + err.name);
21118 function contactsUpdatedCB() {
21119 console.log('Contacts were updated');
21122 function contactsFoundCB(contacts) {
21123 // The contact has been successfully found
21124 for(var i = 0; i < contacts.length; i++) {
21125 contacts[i].name.firstName = 'Christopher';
21128 addressbook.updateBatch(contacts, contactsUpdatedCB, errorCB);
21130 console.log('The following error occurred while updating: ' + err.name);
21134 // Get default address book.
21135 addressbook = tizen.contact.getDefaultAddressBook();
21137 var filter = new tizen.AttributeFilter('name.firstName', 'CONTAINS', 'Chris');
21139 addressbook.find(contactsFoundCB, errorCB, filter);
21141 console.log('The following error occurred while finding: ' + err.name);
21145 <Type type="void"/>
21147 <Argument name="contacts">
21150 A list of contact objects to be saved in the terminal storage.
21153 <Type type="array">
21154 <Type name="Contact"/>
21157 <Argument optional="optional" name="successCallback">
21160 The method to call when the invocation ends successfully.
21163 <Type name="SuccessCallback" nullable="nullable"/>
21165 <Argument optional="optional" name="errorCallback">
21168 The method to call when the request to update contacts fails.
21171 <Type name="ErrorCallback" nullable="nullable"/>
21175 <RaiseException name="WebAPIException">
21178 with error type TypeMismatchError, if the input parameter
21179 is not compatible with the expected type for that parameter.
21182 with error type SecurityError, if the application does not have the privilege to call this method.
21185 with error type NotSupportedError, if this feature is not supported.
21191 <Operation name="remove" id="::Contact::AddressBook::remove">
21192 <webidl> void remove(<ref>ContactId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
21195 Removes a contact from the address book synchronously.
21199 Removes the contact in the address book that corresponds to the specified
21200 identifier. This function will throw an exception if it failed to
21201 remove the specified contact.
21211 http://tizen.org/privilege/contact.write
21213 <Code> var addressbook;
21215 // Define the error callback
21216 function errorCB(err) {
21217 console.log('The following error occurred: ' + err.name);
21220 function contactsFoundCB(contacts) {
21221 // The contact has been successfully found
21222 if(contacts.length > 0) {
21224 addressbook.remove(contacts[0].id);
21225 console.log('First contact was removed');
21227 console.log('The following error occurred while removing: ' + err.name);
21230 console.log( 'No contacts.');
21234 // Get default address book.
21235 addressbook = tizen.contact.getDefaultAddressBook();
21237 var filter = new tizen.AttributeFilter('name.firstName', 'CONTAINS', 'Chris');
21239 addressbook.find(contactsFoundCB, errorCB, filter);
21241 console.log( 'The following error occurred while finding: ' + err.name);
21245 <Type type="void"/>
21247 <Argument name="id">
21250 An identifier (id attribute) of the contact object to delete.
21253 <Type name="ContactId"/>
21257 <RaiseException name="WebAPIException">
21260 with error type NotFoundError, if the identifier does not match
21261 any contact in the address book.
21264 with error type TypeMismatchError, if any input parameter
21265 is not compatible with the expected type for that parameter.
21268 with error type InvalidValuesError, if any input parameter
21269 contains invalid values.
21272 with error type SecurityError, if the application does not have the privilege to call this method.
21275 with error type NotSupportedError, if the feature
21279 with error type UnknownError, if the contact could not be removed
21280 to an unknown error.
21286 <Operation name="removeBatch" id="::Contact::AddressBook::removeBatch">
21287 <webidl> void removeBatch(<ref>ContactId</ref>[] ids,
21288 optional <ref>SuccessCallback</ref>? successCallback,
21289 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
21292 Removes several contacts from the address book asynchronously.
21296 The <em>errorCallback()</em> is launched with these error types:
21300 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>
21302 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
21304 UnknownError - If any other error occurs while trying to remove the contacts. </li>
21314 http://tizen.org/privilege/contact.write
21316 <Code> var addressbook;
21318 // Define the error callback
21319 function errorCB(err) {
21320 console.log( 'The following error occurred: ' + err.name);
21323 function contactsRemovedCB() {
21324 console.log('Contacts were removed');
21327 function contactsFoundCB(contacts) {
21328 // The contact has been successfully found
21329 if(contacts.length > 2) {
21331 addressbook.removeBatch([contacts[0].id, contacts[1].id], contactsRemovedCB, errorCB);
21333 console.log( 'The following error occurred while removing: ' + err.name);
21336 console.log( 'Not enough contacts.');
21340 // Get default address book.
21341 addressbook = tizen.contact.getDefaultAddressBook();
21343 var filter = new tizen.AttributeFilter('name.firstName', 'CONTAINS', 'Chris');
21345 addressbook.find(contactsFoundCB, errorCB, filter);
21347 console.log( 'The following error occurred while finding: ' + err.name);
21351 <Type type="void"/>
21353 <Argument name="ids">
21356 A list of identifiers (id attribute) for the contact objects to be deleted.
21359 <Type type="array">
21360 <Type name="ContactId"/>
21363 <Argument optional="optional" name="successCallback">
21366 The method to call when the invocation ends successfully.
21369 <Type name="SuccessCallback" nullable="nullable"/>
21371 <Argument optional="optional" name="errorCallback">
21374 The method to call when the request to delete contacts fails.
21377 <Type name="ErrorCallback" nullable="nullable"/>
21381 <RaiseException name="WebAPIException">
21384 with error type TypeMismatchError, if any input parameter
21385 is not compatible with the expected type for that parameter.
21388 with error type SecurityError, if the application does not have the privilege to call this method.
21391 with error type NotSupportedError, if the feature
21398 <Operation name="find" id="::Contact::AddressBook::find">
21399 <webidl> void find(<ref>ContactArraySuccessCallback</ref> successCallback,
21400 optional <ref>ErrorCallback</ref>? errorCallback,
21401 optional <ref>AbstractFilter</ref>? filter,
21402 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);</webidl>
21405 Finds an array of all Contact objects from the specified address book or an array of
21406 Contact objects that match the optionally supplied filter.
21410 If the filter is passed and contains valid values, only those values in the
21411 address book that match the filter criteria as specified in the AbstractFilter
21412 interface will be returned in the successCallback. If no filter is passed, the filter
21413 contains any invalid values, the filter is <var>null</var> or undefined, then
21414 the implementation MUST return the full list of contact items
21415 in the successCallback. If no contacts are available in the address book or no
21416 contact matches the filter criteria, the successCallback will be invoked
21417 with an empty array.
21420 The <em>errorCallback() </em>is launched with these error types:
21424 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
21426 UnknownError - If any other error occurs while trying to retrieve the contacts. </li>
21436 http://tizen.org/privilege/contact.read
21438 <Code> var addressbook;
21440 // Define the error callback.
21441 function errorCB(err) {
21442 console.log( 'The following error occurred: ' + err.name);
21445 // Define the contact search success callback.
21446 function contactsFoundCB(contacts) {
21447 console.log(contacts.length + ' results found.');
21450 // Get default address book
21451 addressbook = tizen.contact.getDefaultAddressBook();
21453 // Find all contacts in the address book that have "Ramone" in the nick name.
21454 var filter = new tizen.AttributeFilter('name.nicknames', 'CONTAINS', 'Ramone');
21456 // The contacts returned by the find() query will be sorted by
21457 // ascending last name.
21458 var sortingMode = new tizen.SortMode('name.lastName', 'ASC');
21460 addressbook.find(contactsFoundCB, errorCB,
21461 filter, sortingModes);
21463 console.log( 'The following error occurred while finding: ' + err.name);
21467 <Type type="void"/>
21469 <Argument name="successCallback">
21472 The method to call when the invocation ends successfully.
21475 <Type name="ContactArraySuccessCallback"/>
21477 <Argument optional="optional" name="errorCallback">
21480 The method to call when an error occurs.
21483 <Type name="ErrorCallback" nullable="nullable"/>
21485 <Argument optional="optional" name="filter">
21488 A filter used to select which contacts are returned.
21491 <Type name="AbstractFilter" nullable="nullable"/>
21493 <Argument optional="optional" name="sortMode">
21496 A variable to determine the sort order in which the contacts are returned.
21499 <Type name="SortMode" nullable="nullable"/>
21503 <RaiseException name="WebAPIException">
21506 with error type TypeMismatchError, if any input parameter
21507 is not compatible with the expected type for that parameter.
21510 with error type SecurityError, if the application does not have the privilege to call this method.
21513 with error type NotSupportedError, if the feature
21520 <Operation name="addChangeListener" id="::Contact::AddressBook::addChangeListener">
21521 <webidl> long addChangeListener(<ref>AddressBookChangeCallback</ref> successCallback,
21522 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
21525 Subscribes to receive notifications about address book changes.
21529 When executed, the implementation must immediately return a subscription identifier that identifies
21530 the watch operation. After returning the identifier, the watch operation is started
21541 http://tizen.org/privilege/contact.read
21543 <Code> var watcherId = 0; // watcher identifier
21544 var addressbook; // This example assumes addressbook is initialized
21547 oncontactsadded: function(contacts) {
21548 console.log(contacts.length + ' contacts were added');
21550 oncontactsupdated: function(contacts) {
21551 console.log(contacts.length + ' contacts were updated');
21553 oncontactsremoved: function(ids) {
21554 console.log(ids.length + ' contacts were deleted');
21558 // Registers to be notified when the address book changes
21559 watcherId = addressbook.addChangeListener(watcher);
21565 long An identifier used to clear the watch subscription.
21570 <Argument name="successCallback">
21573 The method to call when different types of address book change notifications are received.
21576 <Type name="AddressBookChangeCallback"/>
21578 <Argument optional="optional" name="errorCallback">
21581 The method to call if address book changes cannot be watched.
21584 <Type name="ErrorCallback" nullable="nullable"/>
21588 <RaiseException name="WebAPIException">
21591 with error type TypeMismatchError, if any input parameter
21592 is not compatible with the expected type for that parameter.
21595 with error type InvalidValuesError, if any of the input parameters
21596 contain an invalid value.
21599 with error type SecurityError, if the application does not have the privilege to call this method.
21602 with error type NotSupportedError, if the feature
21606 with error type UnknownError in any other case.
21612 <Operation name="removeChangeListener" id="::Contact::AddressBook::removeChangeListener">
21613 <webidl> void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);</webidl>
21616 Unsubscribes an address book changes watch operation.
21620 If the watchId argument is valid and corresponds to a subscription already in
21621 place, the watch process MUST immediately stop and no further callbacks MUST be
21622 invoked. If the watchId argument is not valid or does not correspond to a
21623 valid subscription, the method should return without any further action.
21633 http://tizen.org/privilege/contact.read
21635 <Code> var watcherId = 0; // watcher identifier
21636 var addressbook; // This example assumes addressbook is initialized
21638 // Receives address book changes
21640 oncontactsadded: function(contacts) {
21641 console.log(contacts.length + ' contacts were added');
21643 oncontactsupdated: function(contacts) {
21644 console.log(contacts.length + ' contacts were updated');
21646 oncontactsremoved: function(ids) {
21647 console.log(ids.length + ' contacts were removed');
21651 // Cancel the watch operation
21652 function cancelWatch() {
21653 addressbook.removeChangeListener(watcherId);
21656 // registers to be notified when the address book changes
21657 watcherId = addressbook.addChangeListener(watcher);
21660 <Type type="void"/>
21662 <Argument name="watchId">
21665 A subscription identifier.
21668 <Type type="long"/>
21672 <RaiseException name="WebAPIException">
21675 with error type TypeMismatchError, if any input parameter
21676 is not compatible with the expected type for that parameter.
21679 with error type InvalidValuesError, if any of the input
21680 parameters contain an invalid value.
21683 with error type NotFoundError, if there is no listener
21684 with the given identifier.
21687 with error type SecurityError, if the application does not have the privilege to call this method.
21690 with error type NotSupportedError, if the feature
21694 with error type UnknownError in any other error case.
21700 <Operation name="getGroup" id="::Contact::AddressBook::getGroup">
21701 <webidl> <ref>ContactGroup</ref> getGroup(<ref>ContactGroupId</ref> groupId) raises(<ref>WebAPIException</ref>);</webidl>
21704 Gets the group with the specified identifier.
21708 If the operation completes successfully, it must return the
21709 group with the given identifier.
21719 http://tizen.org/privilege/contact.read
21722 // Retrieves the Person corresponding to a Contact.
21723 var addressBook = tizen.contact.getAddressBook(contactRef.addressBookId);
21724 var contact = addressBook.get(contactRef.contactId);
21725 var group = addressBook.getGroup(contact.groupIds[0].id);
21726 console.log("Successfully resolved group with id: " + contact.groupIds[0].id);
21728 console.log("Error: " + err.name);
21732 <Type name="ContactGroup">
21735 ContactGroup The matching ContactGroup object.
21740 <Argument name="groupId">
21743 A group identifier.
21746 <Type name="ContactGroupId"/>
21750 <RaiseException name="WebAPIException">
21753 with error type NotFoundError, if there is no contact
21754 with the given identifier.
21757 with error type TypeMismatchError, if any input parameter
21758 is not compatible with the expected type for that parameter.
21761 with error type InvalidValuesError, if any of the input
21762 parameters contain an invalid value.
21765 with error type SecurityError, if the application does not have the privilege to call this method.
21768 with error type NotSupportedError, if the feature
21772 with error type UnknownError in any other error case.
21778 <Operation name="addGroup" id="::Contact::AddressBook::addGroup">
21779 <webidl> void addGroup(<ref>ContactGroup</ref> group) raises(<ref>WebAPIException</ref>);</webidl>
21782 Adds a group to the address book.
21786 If the group is successfully inserted in the addressbook, the Group object
21787 will have its identifier (id attribute) set when the function returns.
21790 The group shall be added to local phone address book if the address book
21791 is the default address book.
21801 http://tizen.org/privilege/contact.write
21803 <Code> var addressbook;
21805 // Get address book
21806 var addressbooks = tizen.contact.getAddressBooks();
21807 addressbook = addressbooks[0];
21810 var group = new tizen.ContactGroup('Company');
21811 addressbook.addGroup(group);
21812 console.log('Group added with id ' + group.id);
21814 console.log( 'The following error occurred while adding: ' + err.name);
21818 <Type type="void"/>
21820 <Argument name="group">
21823 A ContactGroup object to be added.
21826 <Type name="ContactGroup"/>
21830 <RaiseException name="WebAPIException">
21833 with error type TypeMismatchError, if any input parameter
21834 is not compatible with the expected type for that parameter.
21837 with error type InvalidValuesError, if any input parameter
21838 contains invalid values.
21841 with error type SecurityError, if the application does not have the privilege to call this method.
21844 with error type NotSupportedError, if the feature
21848 with error type UnknownError, if any other error occurs while trying to insert the contact.
21854 <Operation name="updateGroup" id="::Contact::AddressBook::updateGroup">
21855 <webidl> void updateGroup(<ref>ContactGroup</ref> group) raises(<ref>WebAPIException</ref>);</webidl>
21858 Updates a group in the address book.
21867 http://tizen.org/privilege/contact.write
21869 <Code> var addressbook;
21871 // Get address book.
21872 var addressbooks = tizen.contact.getAddressBooks();
21873 addressbook = addressbooks[0];
21876 groups = addressbook.getGroups();
21877 groups[0].name = 'Friends';
21878 addressbook.updateGroup(groups[0]);
21879 console.log('First group was updated');
21881 console.log( 'The following error occurred while adding: ' + err.name);
21885 <Type type="void"/>
21887 <Argument name="group">
21890 A ContactGroup object to be updated.
21893 <Type name="ContactGroup"/>
21897 <RaiseException name="WebAPIException">
21900 with error type TypeMismatchError, if any input parameter
21901 is not compatible with the expected type for that parameter.
21904 with error type InvalidValuesError, if any input parameter
21905 contains invalid values.
21908 with error type SecurityError, if the application does not have the privilege to call this method.
21911 with error type NotSupportedError, if the feature
21915 with error type UnknownError, if the group could not be updated
21916 to an unknown error.
21922 <Operation name="removeGroup" id="::Contact::AddressBook::removeGroup">
21923 <webidl> void removeGroup(<ref>ContactGroupId</ref> groupId) raises(<ref>WebAPIException</ref>);</webidl>
21926 Removes a group from the address book.
21930 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.
21940 http://tizen.org/privilege/contact.write
21942 <Code> var addressbook;
21944 // Get default address book.
21945 var addressbooks = tizen.contact.getAddressBooks();
21946 addressbook = addressbooks[0];
21949 groups = addressbook.getGroups();
21950 addressbook.removeGroup(groups[0].id);
21951 console.log('First group was removed');
21953 console.log( 'The following error occurred while finding: ' + err.name);
21957 <Type type="void"/>
21959 <Argument name="groupId">
21962 An identifier (id attribute) of the ContactGroup object to be deleted.
21965 <Type name="ContactGroupId"/>
21969 <RaiseException name="WebAPIException">
21972 with error type NotFoundError, if the identifier does not match
21973 any contact in the address book.
21976 with error type TypeMismatchError, if any input parameter
21977 is not compatible with the expected type for that parameter.
21980 with error type InvalidValuesError, if any input parameter
21981 contains invalid values.
21984 with error type SecurityError, if the application does not have the privilege to call this method.
21987 with error type NotSupportedError, if the feature
21991 with error type UnknownError, if the group could not be removed
21992 to an unknown error.
21998 <Operation name="getGroups" id="::Contact::AddressBook::getGroups">
21999 <webidl> <ref>ContactGroup</ref>[] getGroups() raises(<ref>WebAPIException</ref>);</webidl>
22002 Gets an array of all ContactGroup objects from the specified address book.
22011 http://tizen.org/privilege/contact.read
22013 <Code> var addressbook;
22015 // Get default address book.
22016 var addressbooks = tizen.contact.getAddressBooks();
22017 addressbook = addressbooks[0];
22020 groups = addressbook.getGroups();
22021 console.log('Number of groups is ' + groups.length);
22023 console.log( 'The following error occurred while finding: ' + err.name);
22027 <Type type="array">
22030 ContactGroup[] The array of ContactGroup object from this address book.
22033 <Type name="ContactGroup"/>
22037 <RaiseException name="WebAPIException">
22040 with error type NotFoundError, if the identifier does not match
22041 any contact in the address book.
22044 with error type TypeMismatchError, if any input parameter
22045 is not compatible with the expected type for that parameter.
22048 with error type InvalidValuesError, if any input parameter
22049 contains invalid values.
22052 with error type SecurityError, if the application does not have the privilege to call this method.
22055 with error type NotSupportedError, if the feature
22059 with error type UnknownError, if the group could not be retrieved due
22060 to an unknown error.
22067 <Interface name="Person" id="::Contact::Person">
22068 <webidl> [NoInterfaceObject] interface Person {
22069 readonly attribute <ref>PersonId</ref> id;
22071 readonly attribute DOMString displayName;
22073 readonly attribute long contactCount;
22075 readonly attribute boolean hasPhoneNumber;
22077 readonly attribute boolean hasEmail;
22079 attribute boolean isFavorite;
22081 attribute DOMString? photoURI;
22083 attribute DOMString? ringtoneURI;
22085 attribute <ref>ContactId</ref> displayContactId;
22087 void link(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);
22089 <ref>Person</ref> unlink(<ref>ContactId</ref> contactId) raises(<ref>WebAPIException</ref>);
22099 <ExtendedAttributeList>
22100 <ExtendedAttribute name="NoInterfaceObject">
22101 <webidl>NoInterfaceObject</webidl>
22102 </ExtendedAttribute>
22103 </ExtendedAttributeList>
22104 <Attribute readonly="readonly" name="id" id="::Contact::Person::id">
22105 <webidl> readonly attribute <ref>PersonId</ref> id;</webidl>
22108 The identifier of the person.
22114 <Type name="PersonId"/>
22116 <Attribute readonly="readonly" name="displayName" id="::Contact::Person::displayName">
22117 <webidl> readonly attribute DOMString displayName;</webidl>
22120 An attribute to identify a person by storing the display name in a string.
22121 It is selected from the contacts' display names.
22127 <Type type="DOMString"/>
22129 <Attribute readonly="readonly" name="contactCount" id="::Contact::Person::contactCount">
22130 <webidl> readonly attribute long contactCount;</webidl>
22133 An attribute to count the number of the contacts that belong to a person.
22139 <Type type="long"/>
22141 <Attribute readonly="readonly" name="hasPhoneNumber" id="::Contact::Person::hasPhoneNumber">
22142 <webidl> readonly attribute boolean hasPhoneNumber;</webidl>
22145 An attribute to indicate if a person has a phone number.
22151 <Type type="boolean"/>
22153 <Attribute readonly="readonly" name="hasEmail" id="::Contact::Person::hasEmail">
22154 <webidl> readonly attribute boolean hasEmail;</webidl>
22157 An attribute to indicate if the person has an email addresses.
22163 <Type type="boolean"/>
22165 <Attribute name="isFavorite" id="::Contact::Person::isFavorite">
22166 <webidl> attribute boolean isFavorite;</webidl>
22169 An attribute to indicate whether the contact is a favorite or not.
22173 Indicates if the person was marked as <em>Favorite</em> or not.
22176 By default, this attribute is set to <var>false</var>.
22183 <Type type="boolean"/>
22185 <Attribute name="photoURI" id="::Contact::Person::photoURI">
22186 <webidl> attribute DOMString? photoURI;</webidl>
22189 The URI of a picture of a person.
22193 This attribute is used to store a URI that points to an image that can represent the
22194 person object. This attribute only contains a local file URI.
22195 Person's photoURI is bounded to linked contacts' valid photoURI.
22196 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
22199 By default, this attribute is set to <var>null</var>.
22206 <Type type="DOMString" nullable="nullable"/>
22208 <Attribute name="ringtoneURI" id="::Contact::Person::ringtoneURI">
22209 <webidl> attribute DOMString? ringtoneURI;</webidl>
22212 An attribute to specify and store the URI of a custom ringtone for a contact.
22216 By default, this attribute is initialized to <var>null</var>.
22217 This attribute only contains a local file URI.
22224 <Type type="DOMString" nullable="nullable"/>
22226 <Attribute name="displayContactId" id="::Contact::Person::displayContactId">
22227 <webidl> attribute <ref>ContactId</ref> displayContactId;</webidl>
22230 The ID of a contact that represents information of the person.
22234 The contact, this value is indicating, is used to show detailed information of the person.
22241 <Type name="ContactId"/>
22243 <Operation name="link" id="::Contact::Person::link">
22244 <webidl> void link(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);</webidl>
22247 Aggregates another person to this person.
22251 Person is a meta object which aggregates contacts and to make a person, user should combine related contacts.
22252 For this operation, link method is provided.
22253 If "Person A" is linked to "Person B", contacts related to "Person A" are aggregated to "Person B".
22254 After this function returns, the target "Person A" is removed from DB.
22264 http://tizen.org/privilege/contact.write
22266 <Code> // Define the error callback for all the asynchronous calls
22267 function errorCB(err) {
22268 console.log( 'The following error occurred: ' + err.name);
22271 function personsFoundCB(persons) {
22272 // The persons has been successfully found
22274 persons[0].link(persons[1].id);
22275 console.log('Second person was merged to the first person.');
22277 console.log( 'The following error occurred while updating: ' + err.name);
22282 tizen.contact.find(personsFoundCB, errorCB);
22284 console.log( 'The following error occurred while adding: ' + err.name);
22288 <Type type="void"/>
22290 <Argument name="personId">
22293 The ID of person to be merged.
22296 <Type name="PersonId"/>
22300 <RaiseException name="WebAPIException">
22303 with error type TypeMismatchError, if any input parameter
22304 is not compatible with the expected type for that parameter.
22307 with error type InvalidValuesError, if any input parameter
22308 contains invalid values.
22311 with error type SecurityError, if the application does not have the privilege to call this method.
22314 with error type NotSupportedError, if the feature
22318 with error type UnknownError, if any other error occurs while trying to insert the contact.
22324 <Operation name="unlink" id="::Contact::Person::unlink">
22325 <webidl> <ref>Person</ref> unlink(<ref>ContactId</ref> contactId) raises(<ref>WebAPIException</ref>);</webidl>
22328 Separates a contact from this person.
22332 Person is aggregated contacts and if a user wants to detach one contact from person, unlink method is provided.
22333 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.
22334 This function returns a newly created Person object that indicates the separated contact.
22344 http://tizen.org/privilege/contact.write
22346 <Code> var myPersonId = '1'; //ID of modified
22348 var addressbook; // Default addressbook
22349 var person; // Existing person obtained from addressbook
22350 var newPerson; // New person, which will be created during unlink
22352 // Define the error callback.
22353 function errorCB(err) {
22354 console.log( 'The following error occurred: ' + err.name);
22357 // Define the contact search success callback.
22358 function contactsFoundCB(contacts) {
22359 if (contacts.length > 1) {
22361 // unlink first contact
22362 newPerson = person.unlink(contacts[0].id);
22364 console.log( 'The following error occurred while unlink: ' + err.name);
22367 console.log( 'Not enough contacts ');
22373 person = tizen.contact.get(myPersonId);
22375 // Get default address book
22376 addressbook = tizen.contact.getDefaultAddressBook();
22378 // Find all contacts in the default address book that personId
22379 // is exactly myPersonId
22380 var filter = new tizen.AttributeFilter('personId', 'EXACTLY', myPersonId);
22382 addressbook.find(contactsFoundCB, errorCB, filter);
22384 console.log( 'The following error occurred while processing: ' + err.name);
22388 <Type name="Person"/>
22390 <Argument name="contactId">
22393 The ID of contact to unlink.
22396 <Type name="ContactId"/>
22400 <RaiseException name="WebAPIException">
22403 with error type TypeMismatchError, if any input parameter
22404 is not compatible with the expected type for that parameter.
22407 with error type InvalidValuesError, if any input parameter
22408 contains invalid values.
22411 with error type SecurityError, if the application does not have the privilege to call this method.
22414 with error type NotSupportedError, if the feature
22418 with error type UnknownError, if any other error occurs while trying to insert the contact.
22425 <Dictionary name="ContactInit" id="::Contact::ContactInit">
22426 <webidl> dictionary ContactInit {
22427 <ref>ContactName</ref> name;
22428 <ref>ContactAddress</ref>[] addresses;
22429 DOMString photoURI;
22430 <ref>ContactPhoneNumber</ref>[] phoneNumbers;
22431 <ref>ContactEmailAddress</ref>[] emails;
22433 <ref>ContactAnniversary</ref>[] anniversaries;
22434 <ref>ContactOrganization</ref>[] organizations;
22436 <ref>ContactWebSite</ref>[] urls;
22437 DOMString ringtoneURI;
22438 <ref>ContactGroupId</ref>[] groupIds;
22442 Provides a dictionary for specifying contact attributes upon contact creation.
22446 This dictionary is used to input parameters when contacts are created.
22453 <DictionaryMember name="name" id="::Contact::ContactInit::name">
22454 <webidl> <ref>ContactName</ref> name;</webidl>
22455 <Type name="ContactName"/>
22456 </DictionaryMember>
22457 <DictionaryMember name="addresses" id="::Contact::ContactInit::addresses">
22458 <webidl> <ref>ContactAddress</ref>[] addresses;</webidl>
22459 <Type type="array">
22460 <Type name="ContactAddress"/>
22462 </DictionaryMember>
22463 <DictionaryMember name="photoURI" id="::Contact::ContactInit::photoURI">
22464 <webidl> DOMString photoURI;</webidl>
22465 <Type type="DOMString"/>
22466 </DictionaryMember>
22467 <DictionaryMember name="phoneNumbers" id="::Contact::ContactInit::phoneNumbers">
22468 <webidl> <ref>ContactPhoneNumber</ref>[] phoneNumbers;</webidl>
22469 <Type type="array">
22470 <Type name="ContactPhoneNumber"/>
22472 </DictionaryMember>
22473 <DictionaryMember name="emails" id="::Contact::ContactInit::emails">
22474 <webidl> <ref>ContactEmailAddress</ref>[] emails;</webidl>
22475 <Type type="array">
22476 <Type name="ContactEmailAddress"/>
22478 </DictionaryMember>
22479 <DictionaryMember name="birthday" id="::Contact::ContactInit::birthday">
22480 <webidl> Date birthday;</webidl>
22481 <Type type="Date"/>
22482 </DictionaryMember>
22483 <DictionaryMember name="anniversaries" id="::Contact::ContactInit::anniversaries">
22484 <webidl> <ref>ContactAnniversary</ref>[] anniversaries;</webidl>
22485 <Type type="array">
22486 <Type name="ContactAnniversary"/>
22488 </DictionaryMember>
22489 <DictionaryMember name="organizations" id="::Contact::ContactInit::organizations">
22490 <webidl> <ref>ContactOrganization</ref>[] organizations;</webidl>
22491 <Type type="array">
22492 <Type name="ContactOrganization"/>
22494 </DictionaryMember>
22495 <DictionaryMember name="notes" id="::Contact::ContactInit::notes">
22496 <webidl> DOMString[] notes;</webidl>
22497 <Type type="array">
22498 <Type type="DOMString"/>
22500 </DictionaryMember>
22501 <DictionaryMember name="urls" id="::Contact::ContactInit::urls">
22502 <webidl> <ref>ContactWebSite</ref>[] urls;</webidl>
22503 <Type type="array">
22504 <Type name="ContactWebSite"/>
22506 </DictionaryMember>
22507 <DictionaryMember name="ringtoneURI" id="::Contact::ContactInit::ringtoneURI">
22508 <webidl> DOMString ringtoneURI;</webidl>
22509 <Type type="DOMString"/>
22510 </DictionaryMember>
22511 <DictionaryMember name="groupIds" id="::Contact::ContactInit::groupIds">
22512 <webidl> <ref>ContactGroupId</ref>[] groupIds;</webidl>
22513 <Type type="array">
22514 <Type name="ContactGroupId"/>
22516 </DictionaryMember>
22518 <Interface name="Contact" id="::Contact::Contact">
22519 <webidl> [Constructor(optional <ref>ContactInit</ref>? ContactInitDict),
22520 Constructor(DOMString stringRepresentation)]
22521 interface Contact {
22522 readonly attribute <ref>ContactId</ref>? id;
22524 readonly attribute <ref>PersonId</ref>? personId;
22526 readonly attribute <ref>AddressBookId</ref>? addressBookId;
22528 readonly attribute Date? lastUpdated;
22530 readonly attribute boolean isFavorite;
22532 attribute <ref>ContactName</ref>? name setraises(<ref>WebAPIException</ref>);
22534 attribute <ref>ContactAddress</ref>[] addresses setraises(<ref>WebAPIException</ref>);
22536 attribute DOMString? photoURI setraises(<ref>WebAPIException</ref>);
22538 attribute <ref>ContactPhoneNumber</ref>[] phoneNumbers setraises(<ref>WebAPIException</ref>);
22540 attribute <ref>ContactEmailAddress</ref>[] emails setraises(<ref>WebAPIException</ref>);
22542 attribute Date? birthday setraises(<ref>WebAPIException</ref>);
22544 attribute <ref>ContactAnniversary</ref>[] anniversaries setraises(<ref>WebAPIException</ref>);
22546 attribute <ref>ContactOrganization</ref>[] organizations setraises(<ref>WebAPIException</ref>);
22548 attribute DOMString[] notes setraises(<ref>WebAPIException</ref>);
22550 attribute <ref>ContactWebSite</ref>[] urls setraises(<ref>WebAPIException</ref>);
22552 attribute DOMString? ringtoneURI setraises(<ref>WebAPIException</ref>);
22554 attribute <ref>ContactGroupId</ref>[] groupIds setraises(<ref>WebAPIException</ref>);
22556 DOMString convertToString(optional <ref>ContactTextFormat</ref>? format) raises(<ref>WebAPIException</ref>);
22558 <ref>Contact</ref> clone() raises(<ref>WebAPIException</ref>);
22562 This interface is used to create a <em>Contact </em>object.
22567 <Code> // Get the default address book
22568 var addressbook = tizen.contact.getDefaultAddressBook();
22570 var contact = null;
22573 contact = new tizen.Contact(
22574 "BEGIN:VCARD\n"+
22575 "VERSION:3.0\n"+
22576 "N:Gump;Forrest\n"+
22577 "FN:Forrest Gump\n"+
22578 "ORG:Bubba Gump Shrimp Co.\n"+
22579 "TITLE:Shrimp Man\n"+
22580 "TEL;WORK:(111) 555-1212\n"+
22581 "TEL;HOME:(404) 555-1212\n"+
22582 "EMAIL;WORK;PREF:forrestgump@example.com\n"+
22583 "END:VCARD");
22585 console.log( 'The following error occurred while converting: ' + err.name);
22590 addressbook.add(contact);
22591 console.log('Contact was added with ID ' + contact.id);
22594 console.log( 'The following error occurred while adding: ' + err.name);
22598 <ExtendedAttributeList>
22599 <ExtendedAttribute name="Constructor">
22600 <webidl>Constructor(optional <ref>ContactInit</ref>? ContactInitDict)</webidl>
22602 <Argument optional="optional" name="ContactInitDict">
22603 <Type name="ContactInit" nullable="nullable"/>
22606 </ExtendedAttribute>
22607 <ExtendedAttribute name="Constructor">
22608 <webidl> Constructor(DOMString stringRepresentation)</webidl>
22610 <Argument name="stringRepresentation">
22611 <Type type="DOMString"/>
22614 </ExtendedAttribute>
22615 </ExtendedAttributeList>
22616 <Attribute readonly="readonly" name="id" id="::Contact::Contact::id">
22617 <webidl> readonly attribute <ref>ContactId</ref>? id;</webidl>
22620 An attribute to identify a raw contact.
22624 By default, this attribute is set to <var>null</var>.
22631 <Type name="ContactId" nullable="nullable"/>
22633 <Attribute readonly="readonly" name="personId" id="::Contact::Contact::personId">
22634 <webidl> readonly attribute <ref>PersonId</ref>? personId;</webidl>
22637 The identifier of the person corresponding to the raw contact.
22641 By default, this attribute is set to <var>null</var>.
22648 <Type name="PersonId" nullable="nullable"/>
22650 <Attribute readonly="readonly" name="addressBookId" id="::Contact::Contact::addressBookId">
22651 <webidl> readonly attribute <ref>AddressBookId</ref>? addressBookId;</webidl>
22654 The identifier of the address book that corresponds to the raw contact.
22655 By default, this attribute is set to <var>null</var>.
22661 <Type name="AddressBookId" nullable="nullable"/>
22663 <Attribute readonly="readonly" name="lastUpdated" id="::Contact::Contact::lastUpdated">
22664 <webidl> readonly attribute Date? lastUpdated;</webidl>
22667 The timestamp for the last update of a contact.
22671 Specifies revision information about the contact.
22674 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.
22675 For more details, see RFC 2426, Section 3.6.4.
22682 <Type type="Date" nullable="nullable"/>
22684 <Attribute readonly="readonly" name="isFavorite" id="::Contact::Contact::isFavorite">
22685 <webidl> readonly attribute boolean isFavorite;</webidl>
22688 An attribute to indicate whether a contact is favorite or not.
22692 This value is associated with the <em>isFavorite</em> attribute of Person that this contact indicates.
22695 By default, this attribute is set to <var>false</var>.
22701 <Code> if (contact.isFavorite) {
22706 <Type type="boolean"/>
22708 <Attribute name="name" id="::Contact::Contact::name">
22709 <webidl> attribute <ref>ContactName</ref>? name setraises(<ref>WebAPIException</ref>);</webidl>
22712 An attribute to store the name of a contact.
22718 <Type name="ContactName" nullable="nullable"/>
22720 <RaiseException name="WebAPIException"/>
22723 <Attribute name="addresses" id="::Contact::Contact::addresses">
22724 <webidl> attribute <ref>ContactAddress</ref>[] addresses setraises(<ref>WebAPIException</ref>);</webidl>
22727 The contact addresses.
22731 By default, this attribute is set to an empty array.
22737 <Code> var contactInit = {};
22738 var contactAddr = new tizen.ContactAddres({streetAddress:'Gran Via, 32',
22739 postalCode:'50013',
22742 contactInit.addresses = [contactAddr];
22745 <Type type="array">
22746 <Type name="ContactAddress"/>
22749 <RaiseException name="WebAPIException"/>
22752 <Attribute name="photoURI" id="::Contact::Contact::photoURI">
22753 <webidl> attribute DOMString? photoURI setraises(<ref>WebAPIException</ref>);</webidl>
22756 The URI to the picture of the contact.
22760 This attribute is used to store a URI that points to an image that can represent the
22761 contact object. This attribute only contains a local file URI.
22762 See RFC 2426, Section 3.1.4.
22765 By default, this attribute is set to <var>null</var>.
22771 <Code> var contactInit = {};
22772 contactInit.photoURI = 'file:///opt/media/Downloads/mypicture.jpg';
22775 <Type type="DOMString" nullable="nullable"/>
22777 <RaiseException name="WebAPIException"/>
22780 <Attribute name="phoneNumbers" id="::Contact::Contact::phoneNumbers">
22781 <webidl> attribute <ref>ContactPhoneNumber</ref>[] phoneNumbers setraises(<ref>WebAPIException</ref>);</webidl>
22784 The telephone numbers of the contact.
22788 By default, this attribute is set to empty array.
22794 <Code> var contactInit = {};
22795 var phoneNumber = new tizen.ContactPhoneNumber('123456789');
22796 contactInit.phoneNumbers = [phoneNumber];
22799 <Type type="array">
22800 <Type name="ContactPhoneNumber"/>
22803 <RaiseException name="WebAPIException"/>
22806 <Attribute name="emails" id="::Contact::Contact::emails">
22807 <webidl> attribute <ref>ContactEmailAddress</ref>[] emails setraises(<ref>WebAPIException</ref>);</webidl>
22810 The email addresses of the contact.
22814 By default, this attribute is set to empty array.
22820 <Code> var contactInit = {};
22821 var email = new tizen.ContactEmailAddress('deedee@ramones.com');
22822 contactInit.emails = [email];
22825 <Type type="array">
22826 <Type name="ContactEmailAddress"/>
22829 <RaiseException name="WebAPIException"/>
22832 <Attribute name="birthday" id="::Contact::Contact::birthday">
22833 <webidl> attribute Date? birthday setraises(<ref>WebAPIException</ref>);</webidl>
22836 The birthday of the contact.
22840 Defines specify the birthday of the contact (see RFC 2426 -
22844 By default, this attribute is set to <var>null</var>.
22850 <Code> var contactInit = {};
22851 contactInit.birthday = new Date(1996, 4, 15);
22854 <Type type="Date" nullable="nullable"/>
22856 <RaiseException name="WebAPIException"/>
22859 <Attribute name="anniversaries" id="::Contact::Contact::anniversaries">
22860 <webidl> attribute <ref>ContactAnniversary</ref>[] anniversaries setraises(<ref>WebAPIException</ref>);</webidl>
22863 The list of anniversaries for the contact.
22867 Defines specify arbitrary anniversaries for the contact (in addition to the birthday).
22870 By default, this attribute is set to empty array.
22876 <Code> var contactInit = {};
22877 var marriage_anniv = new tizen.ContactAnniversary(new Date(1976, 11, 2), 'Marriage');
22878 contactInit.anniversaries = [marriage_anniv];
22881 <Type type="array">
22882 <Type name="ContactAnniversary"/>
22885 <RaiseException name="WebAPIException"/>
22888 <Attribute name="organizations" id="::Contact::Contact::organizations">
22889 <webidl> attribute <ref>ContactOrganization</ref>[] organizations setraises(<ref>WebAPIException</ref>);</webidl>
22892 The organizations the contact belongs to.
22896 Contains information related to the contact's company or organization.
22899 For more details, see RFC 2426, Section 3.5.
22906 <Type type="array">
22907 <Type name="ContactOrganization"/>
22910 <RaiseException name="WebAPIException"/>
22913 <Attribute name="notes" id="::Contact::Contact::notes">
22914 <webidl> attribute DOMString[] notes setraises(<ref>WebAPIException</ref>);</webidl>
22917 The notes associated to the contact.
22921 To specify supplemental information or a comment related to the contact.
22924 For more details, see RFC 2426, Section 3.6.2.
22931 <Type type="array">
22932 <Type type="DOMString"/>
22935 <RaiseException name="WebAPIException"/>
22938 <Attribute name="urls" id="::Contact::Contact::urls">
22939 <webidl> attribute <ref>ContactWebSite</ref>[] urls setraises(<ref>WebAPIException</ref>);</webidl>
22942 The URLs associated to the contact.
22946 By default, this attribute is initialized to an empty array.
22949 In case multiple URLs are available, the first one is the default one.
22950 For more details, see RFC 2426, Section 3.6.8.
22957 <Type type="array">
22958 <Type name="ContactWebSite"/>
22961 <RaiseException name="WebAPIException"/>
22964 <Attribute name="ringtoneURI" id="::Contact::Contact::ringtoneURI">
22965 <webidl> attribute DOMString? ringtoneURI setraises(<ref>WebAPIException</ref>);</webidl>
22968 The URI to the custom ringtone for the contact.
22972 To specify a custom ringtone for the contact.
22975 By default, this attribute is initialized to <var>null</var>.
22976 This attribute only contains a local file URI scheme;
22977 For more details, see RFC 2426, Section 3.6.6.
22984 <Type type="DOMString" nullable="nullable"/>
22986 <RaiseException name="WebAPIException"/>
22989 <Attribute name="groupIds" id="::Contact::Contact::groupIds">
22990 <webidl> attribute <ref>ContactGroupId</ref>[] groupIds setraises(<ref>WebAPIException</ref>);</webidl>
22993 The groups the contact belongs to.
22997 To associate groups to the contact.
23000 By default, this attribute is initialized to an empty array.
23003 In a case where multiple categories are available, the first one is the default one.
23004 See RFC 2426, Section 3.6.1.
23011 <Type type="array">
23012 <Type name="ContactGroupId"/>
23015 <RaiseException name="WebAPIException"/>
23018 <Operation name="convertToString" id="::Contact::Contact::convertToString">
23019 <webidl> DOMString convertToString(optional <ref>ContactTextFormat</ref>? format) raises(<ref>WebAPIException</ref>);</webidl>
23022 Converts the Contact item to a string format.
23026 A textual representation for the contact will be generated and returned synchronously.
23027 The export format is set via the format parameter.
23033 <Code> var addressbook;
23035 // Define the error callback.
23036 function errorCB(err) {
23037 console.log( 'The following error occurred: ' + err.name);
23040 // Define the contact find success callback.
23041 function contactsFoundCB(contacts) {
23043 // Convert the first contact to vCard 3.0 format
23044 var vcard = contacts[0].convertToString("VCARD_30");
23045 console.log('textual representation of the contact is: ' + vcard);
23047 console.log( 'The following error occurred while converting: ' + err.name);
23051 // Get the default address book
23052 addressbook = tizen.contact.getDefaultAddressBook();
23054 // Find all contact in the address book whose first name contains the string 'Chris'.
23055 var filter = new tizen.AttributeFilter('firstName', 'CONTAINS', 'Chris');
23057 addressbook.find(contactsFoundCB, errorCB, filter);
23059 console.log( 'The following error occurred while finding: ' + err.name);
23063 <Type type="DOMString">
23066 DOMString The string representation of the Contact item.
23071 <Argument optional="optional" name="format">
23074 Format to use for export. If this value is <var>null</var> or empty, it converts to platform default format.
23077 <Type name="ContactTextFormat" nullable="nullable"/>
23081 <RaiseException name="WebAPIException">
23084 with error type TypeMismatchError, if any input parameter
23085 is not compatible with the expected type for that parameter.
23088 with error type SecurityError, if the functionality
23092 with error type NotSupportedError, if the feature
23096 with error type UnknownError in any other error case.
23102 <Operation name="clone" id="::Contact::Contact::clone">
23103 <webidl> <ref>Contact</ref> clone() raises(<ref>WebAPIException</ref>);</webidl>
23107 Creates a clone of the Contact object, detached from any address book.
23110 The Contact object returned by the <var>clone()</var> method will have its identifier
23111 set to <var>null</var> and will be detached from any address book.
23117 <Code> // Get default address book.
23118 var addressbook = tizen.contact.getDefaultAddressBook();
23120 var bob = new tizen.Contact();
23121 bob.name = new tizen.ContactName({firstName:'Bob',
23122 lastName:'Smith'});
23123 addressbook.add(bob);
23124 var alice = bob.clone();
23125 contact.name.firstName = "Alice"; // Bob's wife
23126 addressbook.add(alice);
23129 <Type name="Contact">
23132 Contact A new clone of the Contact object.
23138 <RaiseException name="WebAPIException">
23141 with error type SecurityError, if the functionality
23145 with error type NotSupportedError, if the feature
23149 with error type UnknownError in any other error case.
23156 <Interface name="ContactRef" id="::Contact::ContactRef">
23157 <webidl> [Constructor(<ref>AddressBookId</ref> addressBookId, <ref>ContactId</ref> contactId)]
23158 interface ContactRef {
23159 attribute <ref>AddressBookId</ref> addressBookId;
23161 attribute <ref>ContactId</ref> contactId;
23165 The fully-defined contact reference.
23169 It contains both the identifier of the address book which the contact is in, and
23170 the contact identifier within this address book.
23173 This interface is used by other APIs to uniquely and globally identify contacts.
23180 <ExtendedAttributeList>
23181 <ExtendedAttribute name="Constructor">
23182 <webidl>Constructor(<ref>AddressBookId</ref> addressBookId, <ref>ContactId</ref> contactId)</webidl>
23184 <Argument name="addressBookId">
23185 <Type name="AddressBookId"/>
23187 <Argument name="contactId">
23188 <Type name="ContactId"/>
23191 </ExtendedAttribute>
23192 </ExtendedAttributeList>
23193 <Attribute name="addressBookId" id="::Contact::ContactRef::addressBookId">
23194 <webidl> attribute <ref>AddressBookId</ref> addressBookId;</webidl>
23197 The address book identifier.
23203 <Type name="AddressBookId"/>
23205 <Attribute name="contactId" id="::Contact::ContactRef::contactId">
23206 <webidl> attribute <ref>ContactId</ref> contactId;</webidl>
23209 The contact identifier inside the address book.
23215 <Type name="ContactId"/>
23218 <Dictionary name="ContactNameInit" id="::Contact::ContactNameInit">
23219 <webidl> dictionary ContactNameInit {
23222 DOMString firstName;
23223 DOMString middleName;
23224 DOMString lastName;
23225 DOMString[] nicknames;
23226 DOMString phoneticFirstName;
23227 DOMString phoneticLastName;
23231 The properties of a ContactName, to pass to the ContactName constructor.
23235 See ContactName interface for more information about the members.
23242 <DictionaryMember name="prefix" id="::Contact::ContactNameInit::prefix">
23243 <webidl> DOMString prefix;</webidl>
23244 <Type type="DOMString"/>
23245 </DictionaryMember>
23246 <DictionaryMember name="suffix" id="::Contact::ContactNameInit::suffix">
23247 <webidl> DOMString suffix;</webidl>
23248 <Type type="DOMString"/>
23249 </DictionaryMember>
23250 <DictionaryMember name="firstName" id="::Contact::ContactNameInit::firstName">
23251 <webidl> DOMString firstName;</webidl>
23252 <Type type="DOMString"/>
23253 </DictionaryMember>
23254 <DictionaryMember name="middleName" id="::Contact::ContactNameInit::middleName">
23255 <webidl> DOMString middleName;</webidl>
23256 <Type type="DOMString"/>
23257 </DictionaryMember>
23258 <DictionaryMember name="lastName" id="::Contact::ContactNameInit::lastName">
23259 <webidl> DOMString lastName;</webidl>
23260 <Type type="DOMString"/>
23261 </DictionaryMember>
23262 <DictionaryMember name="nicknames" id="::Contact::ContactNameInit::nicknames">
23263 <webidl> DOMString[] nicknames;</webidl>
23264 <Type type="array">
23265 <Type type="DOMString"/>
23267 </DictionaryMember>
23268 <DictionaryMember name="phoneticFirstName" id="::Contact::ContactNameInit::phoneticFirstName">
23269 <webidl> DOMString phoneticFirstName;</webidl>
23270 <Type type="DOMString"/>
23271 </DictionaryMember>
23272 <DictionaryMember name="phoneticLastName" id="::Contact::ContactNameInit::phoneticLastName">
23273 <webidl> DOMString phoneticLastName;</webidl>
23274 <Type type="DOMString"/>
23275 </DictionaryMember>
23277 <Interface name="ContactName" id="::Contact::ContactName">
23278 <webidl> [Constructor(optional <ref>ContactNameInit</ref>? nameInitDict)]
23279 interface ContactName {
23280 attribute DOMString? prefix;
23282 attribute DOMString? suffix;
23284 attribute DOMString? firstName;
23286 attribute DOMString? middleName;
23288 attribute DOMString? lastName;
23290 attribute DOMString[] nicknames;
23292 attribute DOMString? phoneticFirstName;
23294 attribute DOMString? phoneticLastName;
23296 readonly attribute DOMString? displayName;
23300 This interface contains all information related to a contact name.
23306 <ExtendedAttributeList>
23307 <ExtendedAttribute name="Constructor">
23308 <webidl>Constructor(optional <ref>ContactNameInit</ref>? nameInitDict)</webidl>
23310 <Argument optional="optional" name="nameInitDict">
23311 <Type name="ContactNameInit" nullable="nullable"/>
23314 </ExtendedAttribute>
23315 </ExtendedAttributeList>
23316 <Attribute name="prefix" id="::Contact::ContactName::prefix">
23317 <webidl> attribute DOMString? prefix;</webidl>
23320 The name prefix of a contact.
23324 By default, this attribute is initialized to
23325 <var>null</var>. See also RFC 2426, Section 3.1.1.
23331 <Code> contact.name.prefix = "Dr.";
23334 <Type type="DOMString" nullable="nullable"/>
23336 <Attribute name="suffix" id="::Contact::ContactName::suffix">
23337 <webidl> attribute DOMString? suffix;</webidl>
23340 The name suffix of a contact.
23344 By default, this attribute is initialized to
23345 <var>null</var>. See also RFC 2426, Section 3.1.1.
23351 <Code> contact.name.suffix = "Jr.";
23354 <Type type="DOMString" nullable="nullable"/>
23356 <Attribute name="firstName" id="::Contact::ContactName::firstName">
23357 <webidl> attribute DOMString? firstName;</webidl>
23360 The first (given) name of a contact.
23364 By default, this attribute is initialized to
23365 <var>null</var>. See also RFC 2426, Section 3.1.1.
23371 <Code> contact.name.firstName = 'Douglas';
23374 <Type type="DOMString" nullable="nullable"/>
23376 <Attribute name="middleName" id="::Contact::ContactName::middleName">
23377 <webidl> attribute DOMString? middleName;</webidl>
23380 The middle name of a contact.
23384 By default, this attribute is initialized to
23385 <var>null</var>. See also RFC 2426, Section 3.1.1.
23391 <Code> contact.name.middleName = 'Glenn';
23394 <Type type="DOMString" nullable="nullable"/>
23396 <Attribute name="lastName" id="::Contact::ContactName::lastName">
23397 <webidl> attribute DOMString? lastName;</webidl>
23400 The last (family) name of a contact.
23404 By default, this attribute is initialized to
23405 <var>null</var>. See also RFC 2426, Section 3.1.1.
23411 <Code> contact.name.lastName = 'Colvin';
23414 <Type type="DOMString" nullable="nullable"/>
23416 <Attribute name="nicknames" id="::Contact::ContactName::nicknames">
23417 <webidl> attribute DOMString[] nicknames;</webidl>
23420 The nicknames of a contact.
23424 The nickname is a name used instead of, or in addition to, the given name of a contact,
23425 place, or thing. It can also be used to specify a familiar form of a proper name.
23428 By default, this attribute is initialized to an empty array.
23431 In case multiple nicknames are available the first one is the default.
23432 See RFC 2426, Section 3.1.3.
23438 <Code> contact.name.nickNames = ['Dee Dee'];
23441 <Type type="array">
23442 <Type type="DOMString"/>
23445 <Attribute name="phoneticFirstName" id="::Contact::ContactName::phoneticFirstName">
23446 <webidl> attribute DOMString? phoneticFirstName;</webidl>
23449 The phonetic first name of a contact.
23453 Describes how the first name should be
23454 pronounced. This is very important in
23455 some languages, such as Japanese, because the
23456 same 'Kanji' may have several pronunciations.
23459 By default, this attribute is set to <var>null</var>.
23466 <Type type="DOMString" nullable="nullable"/>
23468 <Attribute name="phoneticLastName" id="::Contact::ContactName::phoneticLastName">
23469 <webidl> attribute DOMString? phoneticLastName;</webidl>
23472 The phonetic last name of a contact.
23476 Describes how the last name should be
23477 pronounced. This is very important in
23478 some languages, such as Japanese, because the
23479 same 'Kanji' may have several pronunciations.
23482 By default, this attribute is set to <var>null</var>.
23489 <Type type="DOMString" nullable="nullable"/>
23491 <Attribute readonly="readonly" name="displayName" id="::Contact::ContactName::displayName">
23492 <webidl> readonly attribute DOMString? displayName;</webidl>
23495 The display name of a contact.
23499 The string which can be displayed to identify the contact. It is composed of the first
23500 and last names if available, otherwise, it will fall back to the most adequate
23501 field available to identify the contact (such as nickname).
23504 By default, this attribute is set to <var>null</var>. Initially, once a contact is added to an address book, this value is composed.
23511 <Type type="DOMString" nullable="nullable"/>
23514 <Dictionary name="ContactOrganizationInit" id="::Contact::ContactOrganizationInit">
23515 <webidl> dictionary ContactOrganizationInit {
23517 DOMString department;
23524 The properties of a ContactOrganization, to pass to the ContactOrganization constructor.
23528 See ContactOrganization interface for information about members.
23535 <DictionaryMember name="name" id="::Contact::ContactOrganizationInit::name">
23536 <webidl> DOMString name;</webidl>
23537 <Type type="DOMString"/>
23538 </DictionaryMember>
23539 <DictionaryMember name="department" id="::Contact::ContactOrganizationInit::department">
23540 <webidl> DOMString department;</webidl>
23541 <Type type="DOMString"/>
23542 </DictionaryMember>
23543 <DictionaryMember name="title" id="::Contact::ContactOrganizationInit::title">
23544 <webidl> DOMString title;</webidl>
23545 <Type type="DOMString"/>
23546 </DictionaryMember>
23547 <DictionaryMember name="role" id="::Contact::ContactOrganizationInit::role">
23548 <webidl> DOMString role;</webidl>
23549 <Type type="DOMString"/>
23550 </DictionaryMember>
23551 <DictionaryMember name="logoURI" id="::Contact::ContactOrganizationInit::logoURI">
23552 <webidl> DOMString logoURI;</webidl>
23553 <Type type="DOMString"/>
23554 </DictionaryMember>
23556 <Interface name="ContactOrganization" id="::Contact::ContactOrganization">
23557 <webidl> [Constructor(optional <ref>ContactOrganizationInit</ref>? orgInitDict)]
23558 interface ContactOrganization {
23559 attribute DOMString? name;
23561 attribute DOMString? department;
23563 attribute DOMString? title;
23565 attribute DOMString? role;
23567 attribute DOMString? logoURI;
23571 This interface contains the information about the organization or
23572 company that a contact belongs to.
23576 By default, each of the attributes of this interface are <var>null</var>.
23579 For more details, see RFC 2426, Section 3.5.
23585 <Code> var organization = new tizen.ContactOrganization({name: "Intel", role: "SW Engineer"});
23588 <ExtendedAttributeList>
23589 <ExtendedAttribute name="Constructor">
23590 <webidl>Constructor(optional <ref>ContactOrganizationInit</ref>? orgInitDict)</webidl>
23592 <Argument optional="optional" name="orgInitDict">
23593 <Type name="ContactOrganizationInit" nullable="nullable"/>
23596 </ExtendedAttribute>
23597 </ExtendedAttributeList>
23598 <Attribute name="name" id="::Contact::ContactOrganization::name">
23599 <webidl> attribute DOMString? name;</webidl>
23602 The name of an organization.
23606 For more details, see RFC 2426, Section 3.5.5.
23613 <Type type="DOMString" nullable="nullable"/>
23615 <Attribute name="department" id="::Contact::ContactOrganization::department">
23616 <webidl> attribute DOMString? department;</webidl>
23619 The organizational unit name.
23623 For more details, see RFC 2426, Section 3.5.5.
23630 <Type type="DOMString" nullable="nullable"/>
23632 <Attribute name="title" id="::Contact::ContactOrganization::title">
23633 <webidl> attribute DOMString? title;</webidl>
23640 To specify the job title, functional position or function (such as 'Director,
23641 Research and Development').
23644 For more details, see RFC 2426, Section 3.5.1.
23651 <Type type="DOMString" nullable="nullable"/>
23653 <Attribute name="role" id="::Contact::ContactOrganization::role">
23654 <webidl> attribute DOMString? role;</webidl>
23657 An attribute to store the role, occupation, or business category
23658 (such as 'Programmer').
23662 For more details, see RFC 2426, Section 3.5.2.
23669 <Type type="DOMString" nullable="nullable"/>
23671 <Attribute name="logoURI" id="::Contact::ContactOrganization::logoURI">
23672 <webidl> attribute DOMString? logoURI;</webidl>
23675 The URI to the logo of a company.
23679 To specify a graphic image of a logo associated with an organization.
23680 This attribute only contains file URI Scheme;
23681 remote pictures could be loaded to local with Download API.
23682 For more details, see RFC 2426, Section 3.5.3.
23689 <Type type="DOMString" nullable="nullable"/>
23692 <Interface name="ContactWebSite" id="::Contact::ContactWebSite">
23693 <webidl> [Constructor(DOMString url, optional DOMString type)]
23694 interface ContactWebSite
23696 attribute DOMString url;
23698 attribute DOMString type;
23702 The ContactWebSite object that contains the URL and the type of web site.
23706 For more details, see RFC 2426, Section 3.6.8.
23712 <Code> var contactInit = {}
23713 var blog = new tizen.ContactWebSite('http://www.domain.com', 'BLOG');
23714 contactInit.urls = [blog];
23717 <ExtendedAttributeList>
23718 <ExtendedAttribute name="Constructor">
23719 <webidl>Constructor(DOMString url, optional DOMString type)</webidl>
23721 <Argument name="url">
23722 <Type type="DOMString"/>
23724 <Argument optional="optional" name="type">
23725 <Type type="DOMString"/>
23728 </ExtendedAttribute>
23729 </ExtendedAttributeList>
23730 <Attribute name="url" id="::Contact::ContactWebSite::url">
23731 <webidl> attribute DOMString url;</webidl>
23734 The URL for the contact's web site.
23740 <Type type="DOMString"/>
23742 <Attribute name="type" id="::Contact::ContactWebSite::type">
23743 <webidl> attribute DOMString type;</webidl>
23746 The type of web site.
23750 At least the following values must be supported:
23754 HOMEPAGE - Indicates a home page. </li>
23756 BLOG - Indicates a blog. </li>
23759 By default, this attribute is set to HOMEPAGE.
23766 <Type type="DOMString"/>
23769 <Interface name="ContactAnniversary" id="::Contact::ContactAnniversary">
23770 <webidl> [Constructor(Date date, optional DOMString? label)]
23771 interface ContactAnniversary
23773 attribute Date date;
23775 attribute DOMString? label;
23779 This interface implements the <em>ContactAnniversary </em>object that contains the date and description of an anniversary.
23784 <Code> var contactInit = {}
23785 var marriage_anniv = new tizen.ContactAnniversary(new Date(1976, 11, 2), 'Marriage');
23786 contactInit.anniversaries = [marriage_anniv];
23789 <ExtendedAttributeList>
23790 <ExtendedAttribute name="Constructor">
23791 <webidl>Constructor(Date date, optional DOMString? label)</webidl>
23793 <Argument name="date">
23794 <Type type="Date"/>
23796 <Argument optional="optional" name="label">
23797 <Type type="DOMString" nullable="nullable"/>
23800 </ExtendedAttribute>
23801 </ExtendedAttributeList>
23802 <Attribute name="date" id="::Contact::ContactAnniversary::date">
23803 <webidl> attribute Date date;</webidl>
23806 The date of an anniversary.
23812 <Type type="Date"/>
23814 <Attribute name="label" id="::Contact::ContactAnniversary::label">
23815 <webidl> attribute DOMString? label;</webidl>
23818 The text describing an anniversary.
23822 By default, this attribute is set to <var>null</var>.
23829 <Type type="DOMString" nullable="nullable"/>
23832 <Dictionary name="ContactAddressInit" id="::Contact::ContactAddressInit">
23833 <webidl> dictionary ContactAddressInit
23838 DOMString streetAddress;
23839 DOMString additionalInformation;
23840 DOMString postalCode;
23846 The properties of a ContactAddress to pass to the ContactAddress constructor.
23850 See ContactAddress interface for more information about the members.
23857 <DictionaryMember name="country" id="::Contact::ContactAddressInit::country">
23858 <webidl> DOMString country;</webidl>
23859 <Type type="DOMString"/>
23860 </DictionaryMember>
23861 <DictionaryMember name="region" id="::Contact::ContactAddressInit::region">
23862 <webidl> DOMString region;</webidl>
23863 <Type type="DOMString"/>
23864 </DictionaryMember>
23865 <DictionaryMember name="city" id="::Contact::ContactAddressInit::city">
23866 <webidl> DOMString city;</webidl>
23867 <Type type="DOMString"/>
23868 </DictionaryMember>
23869 <DictionaryMember name="streetAddress" id="::Contact::ContactAddressInit::streetAddress">
23870 <webidl> DOMString streetAddress;</webidl>
23871 <Type type="DOMString"/>
23872 </DictionaryMember>
23873 <DictionaryMember name="additionalInformation" id="::Contact::ContactAddressInit::additionalInformation">
23874 <webidl> DOMString additionalInformation;</webidl>
23875 <Type type="DOMString"/>
23876 </DictionaryMember>
23877 <DictionaryMember name="postalCode" id="::Contact::ContactAddressInit::postalCode">
23878 <webidl> DOMString postalCode;</webidl>
23879 <Type type="DOMString"/>
23880 </DictionaryMember>
23881 <DictionaryMember name="isDefault" id="::Contact::ContactAddressInit::isDefault">
23882 <webidl> boolean isDefault;</webidl>
23883 <Type type="boolean"/>
23884 </DictionaryMember>
23885 <DictionaryMember name="types" id="::Contact::ContactAddressInit::types">
23886 <webidl> DOMString[] types;</webidl>
23887 <Type type="array">
23888 <Type type="DOMString"/>
23890 </DictionaryMember>
23892 <Interface name="ContactAddress" id="::Contact::ContactAddress">
23893 <webidl> [Constructor(optional <ref>ContactAddressInit</ref>? addressInitDict)]
23894 interface ContactAddress
23896 attribute DOMString? country;
23898 attribute DOMString? region;
23900 attribute DOMString? city;
23902 attribute DOMString? streetAddress;
23904 attribute DOMString? additionalInformation;
23906 attribute DOMString? postalCode;
23908 attribute boolean isDefault;
23910 attribute DOMString[] types;
23914 This interface contains a set of attributes that represent a particular point
23915 on the Earth's surface.
23919 Except isDefault and types attributes, each of the attributes of this interface are set to <var>null</var> by default.
23922 For more details, see RFC 2426, Section 3.2.1.
23928 <Code> var contactInit = {};
23929 var contactAddress = new tizen.ContactAddress({streetAddress:'Gran Via, 32',
23930 postalCode:'50013', city:'Zaragoza',
23931 country:'ES', types:['WORK']});
23932 contactInit.contactAddress = [contactAddress];
23935 <ExtendedAttributeList>
23936 <ExtendedAttribute name="Constructor">
23937 <webidl>Constructor(optional <ref>ContactAddressInit</ref>? addressInitDict)</webidl>
23939 <Argument optional="optional" name="addressInitDict">
23940 <Type name="ContactAddressInit" nullable="nullable"/>
23943 </ExtendedAttribute>
23944 </ExtendedAttributeList>
23945 <Attribute name="country" id="::Contact::ContactAddress::country">
23946 <webidl> attribute DOMString? country;</webidl>
23949 The country of the address.
23953 It is recommended that the country is specified
23954 using the two-letter [ISO 3166-1] code.
23961 <Type type="DOMString" nullable="nullable"/>
23963 <Attribute name="region" id="::Contact::ContactAddress::region">
23964 <webidl> attribute DOMString? region;</webidl>
23967 The name of a country subdivision.
23971 For example, State (United States) or Province (Spain).
23978 <Type type="DOMString" nullable="nullable"/>
23980 <Attribute name="city" id="::Contact::ContactAddress::city">
23981 <webidl> attribute DOMString? city;</webidl>
23984 The name of the locality. For example, the city, county, town, or village.
23990 <Type type="DOMString" nullable="nullable"/>
23992 <Attribute name="streetAddress" id="::Contact::ContactAddress::streetAddress">
23993 <webidl> attribute DOMString? streetAddress;</webidl>
23996 The street address, for example, building number and street name/number.
24002 <Type type="DOMString" nullable="nullable"/>
24004 <Attribute name="additionalInformation" id="::Contact::ContactAddress::additionalInformation">
24005 <webidl> attribute DOMString? additionalInformation;</webidl>
24008 An attribute to capture any other address details that are required for an accurate address.
24009 For example, floor number, apartment number, suite name, the name of an office occupant, etc.
24015 <Type type="DOMString" nullable="nullable"/>
24017 <Attribute name="postalCode" id="::Contact::ContactAddress::postalCode">
24018 <webidl> attribute DOMString? postalCode;</webidl>
24021 The postal code of the location (also known as the zip code in the US).
24027 <Type type="DOMString" nullable="nullable"/>
24029 <Attribute name="isDefault" id="::Contact::ContactAddress::isDefault">
24030 <webidl> attribute boolean isDefault;</webidl>
24033 The default state of an address.
24037 Indicates if the address was marked as <em>default</em> or not for the contact.
24038 The only one among addresses for a person can have default property,
24039 so that this attribute might be changed without explicit modification
24040 according to the policy of platform.
24043 It deals with the 'pref' TYPE on RFC 2426, Section 3.2.1
24046 By default, this attribute is set to <var>false</var>.
24053 <Type type="boolean"/>
24055 <Attribute name="types" id="::Contact::ContactAddress::types">
24056 <webidl> attribute DOMString[] types;</webidl>
24059 The case insensitive list of address types.
24063 For more details, see RFC 2426, Section 3.2.1.
24066 At least the following values must be supported:
24070 WORK - Indicates a work address </li>
24072 HOME - Indicates a home address </li>
24075 By default, this attribute is set to HOME.
24082 <Type type="array">
24083 <Type type="DOMString"/>
24087 <Interface name="ContactPhoneNumber" id="::Contact::ContactPhoneNumber">
24088 <webidl> [Constructor(DOMString number, optional DOMString[] types, optional boolean isDefault)]
24089 interface ContactPhoneNumber
24091 attribute DOMString number;
24093 attribute boolean isDefault;
24095 attribute DOMString[] types;
24099 The ContactPhoneNumber object that contains the number and the type of phone number.
24103 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.
24104 At searching by phoneNumber, matchflag "CONTAINS" provides a result set which is retrieved from normalized phoneNumber as searching value.
24107 For more details, see RFC 2426, Section 3.3.1
24113 <Code> var contactInit = {};
24114 var phoneNumber = new tizen.ContactPhoneNumber('123456789', ['WORK','VOICE'], true);
24115 contactInit.phoneNumbers = [phoneNumber];
24118 <ExtendedAttributeList>
24119 <ExtendedAttribute name="Constructor">
24120 <webidl>Constructor(DOMString number, optional DOMString[] types, optional boolean isDefault)</webidl>
24122 <Argument name="number">
24123 <Type type="DOMString"/>
24125 <Argument optional="optional" name="types">
24126 <Type type="array">
24127 <Type type="DOMString"/>
24130 <Argument optional="optional" name="isDefault">
24131 <Type type="boolean"/>
24134 </ExtendedAttribute>
24135 </ExtendedAttributeList>
24136 <Attribute name="number" id="::Contact::ContactPhoneNumber::number">
24137 <webidl> attribute DOMString number;</webidl>
24140 The full phone number.
24146 <Type type="DOMString"/>
24148 <Attribute name="isDefault" id="::Contact::ContactPhoneNumber::isDefault">
24149 <webidl> attribute boolean isDefault;</webidl>
24152 The default state of the phone number.
24156 Indicates if the phone number was marked as <em>default</em> or not for the contact.
24157 The only one among phone numbers for a person can have default property,
24158 so that this attribute might be changed without explicit modification
24159 according to the policy of platform.
24162 It deals with the 'pref' TYPE on RFC 2426, Section 3.3.1
24165 By default, this attribute is set to false.
24172 <Type type="boolean"/>
24174 <Attribute name="types" id="::Contact::ContactPhoneNumber::types">
24175 <webidl> attribute DOMString[] types;</webidl>
24178 The case insensitive list of phone types, as defined in RFC 2426.
24182 Specifies the intended use of the phone number.
24185 At least the following values must be supported:
24189 <var>WORK</var> - Indicates a work number </li>
24191 <var>HOME</var> - Indicates a home number </li>
24193 <var>VOICE</var> - Indicates a voice number (Default) </li>
24195 <var>FAX</var> - Indicates a facsimile number </li>
24197 <var>MSG</var> - Indicates a messaging service on the number </li>
24199 <var>CELL</var> - Indicates a cellular number </li>
24201 <var>PAGER</var> - Indicates a pager number </li>
24203 <var>BBS</var> - Indicates a bulletin board service number </li>
24205 <var>MODEM</var> - Indicates a MODEM number </li>
24207 <var>CAR</var> - Indicates a car-phone number </li>
24209 <var>ISDN</var> - Indicates an ISDN number </li>
24211 <var>VIDEO</var> - Indicates a video-phone number </li>
24213 <var>PCS</var> - Personal Communication Standard </li>
24220 <Type type="array">
24221 <Type type="DOMString"/>
24225 <Interface name="ContactEmailAddress" id="::Contact::ContactEmailAddress">
24226 <webidl> [Constructor(DOMString email, optional DOMString[] types, optional boolean isDefault)]
24227 interface ContactEmailAddress
24229 attribute DOMString email;
24231 attribute boolean isDefault;
24233 attribute DOMString[] types;
24237 The ContactEmailAddress object that contains the email address and the type of email address.
24241 For more details, see RFC 2426, Section 3.3.2.
24247 <Code> var contactInit = {};
24248 var email = new tizen.ContactEmailAddress('user@domain.com', ['WORK']);
24249 contactInit.emails = [email];
24252 <ExtendedAttributeList>
24253 <ExtendedAttribute name="Constructor">
24254 <webidl>Constructor(DOMString email, optional DOMString[] types, optional boolean isDefault)</webidl>
24256 <Argument name="email">
24257 <Type type="DOMString"/>
24259 <Argument optional="optional" name="types">
24260 <Type type="array">
24261 <Type type="DOMString"/>
24264 <Argument optional="optional" name="isDefault">
24265 <Type type="boolean"/>
24268 </ExtendedAttribute>
24269 </ExtendedAttributeList>
24270 <Attribute name="email" id="::Contact::ContactEmailAddress::email">
24271 <webidl> attribute DOMString email;</webidl>
24274 The full email address.
24280 <Type type="DOMString"/>
24282 <Attribute name="isDefault" id="::Contact::ContactEmailAddress::isDefault">
24283 <webidl> attribute boolean isDefault;</webidl>
24286 The default state of an email address.
24290 Indicates if the email address was marked as <em>default</em> or not for the contact.
24291 The only one among email addresses for a person can have default property,
24292 so that this attribute might be changed without explicit modification
24293 according to the policy of platform.
24296 It deals with the 'pref' TYPE on RFC 2426, Section 3.3.2
24299 By default, this attribute is set to false.
24306 <Type type="boolean"/>
24308 <Attribute name="types" id="::Contact::ContactEmailAddress::types">
24309 <webidl> attribute DOMString[] types;</webidl>
24312 The case insensitive list of email types.
24316 Specifies the intended use of the email address.
24319 At least the following values must be supported:
24323 WORK - Indicates a work email </li>
24325 HOME - Indicates a home email </li>
24327 MOBILE - Indicates a mobile email </li>
24330 By default, this attribute is set to WORK.
24337 <Type type="array">
24338 <Type type="DOMString"/>
24342 <Interface name="ContactGroup" id="::Contact::ContactGroup">
24343 <webidl> [Constructor(DOMString name, optional DOMString? ringtoneURI, optional DOMString? photoURI)]
24344 interface ContactGroup
24346 readonly attribute <ref>ContactGroupId</ref>? id;
24348 readonly attribute <ref>AddressBookId</ref>? addressBookId;
24350 attribute DOMString name;
24352 attribute DOMString? ringtoneURI;
24354 attribute DOMString? photoURI;
24356 readonly attribute DOMString readOnly;
24365 <Code> var addressbook = null;
24368 // Define the error callback for all the asynchronous calls
24369 function errorCB(err) {
24370 console.log( 'The following error occurred: ' + err.name);
24373 // Define the success callback for retrieving all the
24375 function addressBooksCB(addressbooks) {
24376 addressbook = addressbooks[0];
24378 group = new tizen.ContactGroup('Family', 'file://opt/media/Downloads/ring.mp3');
24380 console.log( 'The following error occurred while converting: ' + err.name);
24385 addressbook.addGroup(group);
24386 console.log('Group was added with ID ' + group.id);
24389 console.log( 'The following error occurred while adding: ' + err.name);
24393 tizen.contact.getAddressBooks(addressBooksCB, errorCB);
24397 <ExtendedAttributeList>
24398 <ExtendedAttribute name="Constructor">
24399 <webidl>Constructor(DOMString name, optional DOMString? ringtoneURI, optional DOMString? photoURI)</webidl>
24401 <Argument name="name">
24402 <Type type="DOMString"/>
24404 <Argument optional="optional" name="ringtoneURI">
24405 <Type type="DOMString" nullable="nullable"/>
24407 <Argument optional="optional" name="photoURI">
24408 <Type type="DOMString" nullable="nullable"/>
24411 </ExtendedAttribute>
24412 </ExtendedAttributeList>
24413 <Attribute readonly="readonly" name="id" id="::Contact::ContactGroup::id">
24414 <webidl> readonly attribute <ref>ContactGroupId</ref>? id;</webidl>
24417 The identifier of a group.
24421 By default, this attribute is set to <var>null</var>.
24428 <Type name="ContactGroupId" nullable="nullable"/>
24430 <Attribute readonly="readonly" name="addressBookId" id="::Contact::ContactGroup::addressBookId">
24431 <webidl> readonly attribute <ref>AddressBookId</ref>? addressBookId;</webidl>
24434 The identifier of the address book that the group belongs to.
24438 By default, this attribute is set to <var>null</var>.
24445 <Type name="AddressBookId" nullable="nullable"/>
24447 <Attribute name="name" id="::Contact::ContactGroup::name">
24448 <webidl> attribute DOMString name;</webidl>
24451 The name of a group.
24457 <Type type="DOMString"/>
24459 <Attribute name="ringtoneURI" id="::Contact::ContactGroup::ringtoneURI">
24460 <webidl> attribute DOMString? ringtoneURI;</webidl>
24463 The URI to the custom ringtone for a group.
24467 To specify a custom ringtone for a group.
24470 By default, this attribute is initialized to <var>null</var>.
24471 This attribute only contains a local file URI.
24478 <Type type="DOMString" nullable="nullable"/>
24480 <Attribute name="photoURI" id="::Contact::ContactGroup::photoURI">
24481 <webidl> attribute DOMString? photoURI;</webidl>
24484 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.
24488 By default, this attribute is set to <var>null</var>.
24495 <Type type="DOMString" nullable="nullable"/>
24497 <Attribute readonly="readonly" name="readOnly" id="::Contact::ContactGroup::readOnly">
24498 <webidl> readonly attribute DOMString readOnly;</webidl>
24501 The flag indicating if the group can be modified / removed or not.
24502 Some groups cannot be edited if this flag sets to <var>true</var>.
24506 By default, this attribute is set to false.
24513 <Type type="DOMString"/>
24516 <Interface name="PersonArraySuccessCallback" id="::Contact::PersonArraySuccessCallback">
24517 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface PersonArraySuccessCallback {
24518 void onsuccess(<ref>Person</ref>[] persons);
24522 The success callback that is used for retrieving
24527 The success callback that takes an array of persons as an input
24528 argument. It is used in the asynchronous operation to
24529 get or save a list of persons.
24536 <ExtendedAttributeList>
24537 <ExtendedAttribute name="Callback" value="FunctionOnly">
24538 <webidl>Callback</webidl>
24539 </ExtendedAttribute>
24540 <ExtendedAttribute name="NoInterfaceObject">
24541 <webidl> NoInterfaceObject</webidl>
24542 </ExtendedAttribute>
24543 </ExtendedAttributeList>
24544 <Operation name="onsuccess" id="::Contact::PersonArraySuccessCallback::onsuccess">
24545 <webidl> void onsuccess(<ref>Person</ref>[] persons);</webidl>
24548 The method invoked when a list of persons is retrieved successfully.
24554 <Type type="void"/>
24556 <Argument name="persons">
24562 <Type type="array">
24563 <Type name="Person"/>
24569 <Interface name="ContactArraySuccessCallback" id="::Contact::ContactArraySuccessCallback">
24570 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ContactArraySuccessCallback {
24571 void onsuccess(<ref>Contact</ref>[] contacts);
24575 The success callback that is used for saving and retrieving
24576 a list of contacts.
24580 The success callback that takes an array of contacts as an input
24581 argument. It is used in the asynchronous operation to
24582 get or save a list of contacts.
24589 <ExtendedAttributeList>
24590 <ExtendedAttribute name="Callback" value="FunctionOnly">
24591 <webidl>Callback</webidl>
24592 </ExtendedAttribute>
24593 <ExtendedAttribute name="NoInterfaceObject">
24594 <webidl> NoInterfaceObject</webidl>
24595 </ExtendedAttribute>
24596 </ExtendedAttributeList>
24597 <Operation name="onsuccess" id="::Contact::ContactArraySuccessCallback::onsuccess">
24598 <webidl> void onsuccess(<ref>Contact</ref>[] contacts);</webidl>
24601 The method invoked when a list of contacts is retrieved successfully.
24607 <Type type="void"/>
24609 <Argument name="contacts">
24613 The Contacts that were successfully saved must have their identifiers set.
24616 <Type type="array">
24617 <Type name="Contact"/>
24623 <Interface name="AddressBookArraySuccessCallback" id="::Contact::AddressBookArraySuccessCallback">
24624 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface AddressBookArraySuccessCallback {
24625 void onsuccess(<ref>AddressBook</ref>[] addressbooks);
24629 The success callback when retrieving a list of AddressBooks.
24633 The success callback that takes an array of AddressBooks as an input
24634 argument. It is used in the asynchronous operation to
24642 <ExtendedAttributeList>
24643 <ExtendedAttribute name="Callback" value="FunctionOnly">
24644 <webidl>Callback</webidl>
24645 </ExtendedAttribute>
24646 <ExtendedAttribute name="NoInterfaceObject">
24647 <webidl> NoInterfaceObject</webidl>
24648 </ExtendedAttribute>
24649 </ExtendedAttributeList>
24650 <Operation name="onsuccess" id="::Contact::AddressBookArraySuccessCallback::onsuccess">
24651 <webidl> void onsuccess(<ref>AddressBook</ref>[] addressbooks);</webidl>
24654 The method invoked when a list of address books is retrieved successfully.
24660 <Type type="void"/>
24662 <Argument name="addressbooks">
24665 The address books to retrieve.
24668 <Type type="array">
24669 <Type name="AddressBook"/>
24675 <Interface name="AddressBookChangeCallback" id="::Contact::AddressBookChangeCallback">
24676 <webidl> [Callback, NoInterfaceObject] interface AddressBookChangeCallback {
24677 void oncontactsadded(<ref>Contact</ref>[] contacts);
24679 void oncontactsupdated(<ref>Contact</ref>[] contacts);
24681 void oncontactsremoved(<ref>ContactId</ref>[] contactIds);
24685 The interface for specifying the methods to be called for address book
24686 change notifications.
24690 This interface specifies a set of functions that will be invoked every time an address
24691 book change occurs (contact addition/update/deletion).
24698 <ExtendedAttributeList>
24699 <ExtendedAttribute name="Callback">
24700 <webidl>Callback</webidl>
24701 </ExtendedAttribute>
24702 <ExtendedAttribute name="NoInterfaceObject">
24703 <webidl> NoInterfaceObject</webidl>
24704 </ExtendedAttribute>
24705 </ExtendedAttributeList>
24706 <Operation name="oncontactsadded" id="::Contact::AddressBookChangeCallback::oncontactsadded">
24707 <webidl> void oncontactsadded(<ref>Contact</ref>[] contacts);</webidl>
24710 The method invoked when contacts are added to the address book.
24716 <Type type="void"/>
24718 <Argument name="contacts">
24721 A list of contacts to add.
24724 <Type type="array">
24725 <Type name="Contact"/>
24730 <Operation name="oncontactsupdated" id="::Contact::AddressBookChangeCallback::oncontactsupdated">
24731 <webidl> void oncontactsupdated(<ref>Contact</ref>[] contacts);</webidl>
24734 The method invoked when contacts are updated in the address book.
24740 <Type type="void"/>
24742 <Argument name="contacts">
24745 A list of contacts to update.
24748 <Type type="array">
24749 <Type name="Contact"/>
24754 <Operation name="oncontactsremoved" id="::Contact::AddressBookChangeCallback::oncontactsremoved">
24755 <webidl> void oncontactsremoved(<ref>ContactId</ref>[] contactIds);</webidl>
24758 The method invoked when contacts are deleted from the address book.
24764 <Type type="void"/>
24766 <Argument name="contactIds">
24769 A list of identifiers for the contacts to delete.
24772 <Type type="array">
24773 <Type name="ContactId"/>
24779 <Interface name="PersonsChangeCallback" id="::Contact::PersonsChangeCallback">
24780 <webidl> [Callback, NoInterfaceObject] interface PersonsChangeCallback {
24781 void onpersonsadded(<ref>Person</ref>[] persons);
24783 void onpersonsupdated(<ref>Person</ref>[] persons);
24785 void onpersonsremoved(<ref>PersonId</ref>[] personIds);
24789 The interface for specifying the methods to be called for change notifications.
24793 This interface specifies a set of functions that will be invoked every time person's
24794 list change occurs (person addition/update/deletion).
24801 <ExtendedAttributeList>
24802 <ExtendedAttribute name="Callback">
24803 <webidl>Callback</webidl>
24804 </ExtendedAttribute>
24805 <ExtendedAttribute name="NoInterfaceObject">
24806 <webidl> NoInterfaceObject</webidl>
24807 </ExtendedAttribute>
24808 </ExtendedAttributeList>
24809 <Operation name="onpersonsadded" id="::Contact::PersonsChangeCallback::onpersonsadded">
24810 <webidl> void onpersonsadded(<ref>Person</ref>[] persons);</webidl>
24813 The method invoked when persons are added to the person list.
24819 <Type type="void"/>
24821 <Argument name="persons">
24824 A list of persons to add.
24827 <Type type="array">
24828 <Type name="Person"/>
24833 <Operation name="onpersonsupdated" id="::Contact::PersonsChangeCallback::onpersonsupdated">
24834 <webidl> void onpersonsupdated(<ref>Person</ref>[] persons);</webidl>
24837 The method invoked when persons are updated in the person list.
24843 <Type type="void"/>
24845 <Argument name="persons">
24848 A list of persons to update.
24851 <Type type="array">
24852 <Type name="Person"/>
24857 <Operation name="onpersonsremoved" id="::Contact::PersonsChangeCallback::onpersonsremoved">
24858 <webidl> void onpersonsremoved(<ref>PersonId</ref>[] personIds);</webidl>
24861 The method invoked when persons are deleted from the person list.
24867 <Type type="void"/>
24869 <Argument name="personIds">
24872 A list of identifiers for the persons to delete.
24875 <Type type="array">
24876 <Type name="PersonId"/>
24883 <Module name="Content" id="::Content">
24884 <webidl>module Content {
24886 enum ContentDirectoryStorageType { "INTERNAL", "EXTERNAL" };
24888 enum ContentType { "IMAGE", "VIDEO", "AUDIO", "OTHER" };
24890 enum AudioContentLyricsType { "SYNCHRONIZED", "UNSYNCHRONIZED" };
24892 enum ImageContentOrientation { "NORMAL", "FLIP_HORIZONTAL", "ROTATE_180", "FLIP_VERTICAL", "TRANSPOSE", "ROTATE_90", "TRANSVERSE", "ROTATE_270" };
24894 typedef DOMString ContentId;
24896 typedef DOMString ContentDirectoryId;
24898 [NoInterfaceObject] interface ContentManagerObject {
24899 readonly attribute <ref>ContentManager</ref> content;
24901 <ref>Tizen</ref> implements <ref>ContentManagerObject</ref>;
24903 [NoInterfaceObject] interface ContentManager {
24905 void update(<ref>Content</ref> content) raises(<ref>WebAPIException</ref>);
24907 void updateBatch(<ref>Content</ref>[] contents,
24908 optional <ref>SuccessCallback</ref>? successCallback,
24909 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
24911 void getDirectories(<ref>ContentDirectoryArraySuccessCallback</ref> successCallback,
24912 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
24914 void find(<ref>ContentArraySuccessCallback</ref> successCallback,
24915 optional <ref>ErrorCallback</ref>? errorCallback,
24916 optional <ref>ContentDirectoryId</ref>? directoryId,
24917 optional <ref>AbstractFilter</ref>? filter,
24918 optional <ref>SortMode</ref>? sortMode,
24919 optional unsigned long? count,
24920 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);
24923 void scanFile(DOMString contentURI,
24924 optional <ref>ContentScanSuccessCallback</ref>? successCallback,
24925 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
24927 void setChangeListener(<ref>ContentChangeCallback</ref> changeCallback) raises(<ref>WebAPIException</ref>);
24929 void unsetChangeListener() raises(<ref>WebAPIException</ref>);
24933 [Callback=FunctionOnly, NoInterfaceObject] interface ContentArraySuccessCallback {
24934 void onsuccess(<ref>Content</ref>[] contents);
24937 [Callback=FunctionOnly, NoInterfaceObject] interface ContentDirectoryArraySuccessCallback {
24938 void onsuccess(<ref>ContentDirectory</ref>[] directories);
24941 [Callback=FunctionOnly, NoInterfaceObject] interface ContentScanSuccessCallback {
24942 void onsuccess(DOMString contentURI);
24945 [Callback, NoInterfaceObject] interface ContentChangeCallback {
24946 void oncontentadded(<ref>Content</ref> content);
24948 void oncontentupdated(<ref>Content</ref> content);
24950 void oncontentremoved(<ref>ContentId</ref> id);
24954 [NoInterfaceObject] interface ContentDirectory {
24956 readonly attribute <ref>ContentDirectoryId</ref> id;
24958 readonly attribute DOMString directoryURI;
24960 readonly attribute DOMString title;
24962 readonly attribute <ref>ContentDirectoryStorageType</ref> storageType;
24964 readonly attribute Date? modifiedDate;
24968 [NoInterfaceObject] interface Content {
24970 readonly attribute DOMString[] editableAttributes;
24972 readonly attribute <ref>ContentId</ref> id;
24974 attribute DOMString name;
24976 readonly attribute <ref>ContentType</ref> type;
24978 readonly attribute DOMString mimeType;
24980 readonly attribute DOMString title;
24982 readonly attribute DOMString contentURI;
24984 readonly attribute DOMString[]? thumbnailURIs;
24986 readonly attribute Date? releaseDate;
24988 readonly attribute Date? modifiedDate;
24990 readonly attribute unsigned long size;
24992 attribute DOMString? description;
24994 attribute unsigned long rating;
24997 [NoInterfaceObject] interface VideoContent : <ref>Content</ref> {
24999 attribute <ref>SimpleCoordinates</ref>? geolocation;
25001 readonly attribute DOMString? album;
25003 readonly attribute DOMString[]? artists;
25005 readonly attribute unsigned long duration;
25007 readonly attribute unsigned long width;
25009 readonly attribute unsigned long height;
25014 [NoInterfaceObject] interface AudioContentLyrics {
25016 readonly attribute <ref>AudioContentLyricsType</ref> type;
25018 readonly attribute unsigned long[] timestamps;
25020 readonly attribute DOMString[] texts;
25023 [NoInterfaceObject] interface AudioContent : <ref>Content</ref> {
25025 readonly attribute DOMString? album;
25027 readonly attribute DOMString[]? genres;
25029 readonly attribute DOMString[]? artists;
25031 readonly attribute DOMString[]? composers;
25033 readonly attribute <ref>AudioContentLyrics</ref>? lyrics;
25035 readonly attribute DOMString? copyright;
25037 readonly attribute unsigned long bitrate;
25039 readonly attribute unsigned short? trackNumber;
25041 readonly attribute unsigned long duration;
25045 [NoInterfaceObject] interface ImageContent : <ref>Content</ref> {
25047 attribute <ref>SimpleCoordinates</ref>? geolocation;
25049 readonly attribute unsigned long width;
25051 readonly attribute unsigned long height;
25053 attribute <ref>ImageContentOrientation</ref> orientation;
25059 This API provides functionality to discover contents such as images, videos, music, or other.
25063 It is possible to search for specific contents using filters.
25064 The API also supports setting attributes of specific contents.
25067 For more information on the Content features, see <a href="../../org.tizen.web.appprogramming/html/guide/content_guide/mediacontent.htm">Content Guide</a>.
25074 <Enum name="ContentDirectoryStorageType" id="::Content::ContentDirectoryStorageType">
25075 <webidl> enum ContentDirectoryStorageType { "INTERNAL", "EXTERNAL" };</webidl>
25079 Defines whether a content directory is stored on internal or external storage (such as a removable memory card).
25086 <EnumValue stringvalue="INTERNAL">
25087 <webidl> "INTERNAL</webidl>
25089 <EnumValue stringvalue="EXTERNAL">
25090 <webidl> "EXTERNAL</webidl>
25093 <Enum name="ContentType" id="::Content::ContentType">
25094 <webidl> enum ContentType { "IMAGE", "VIDEO", "AUDIO", "OTHER" };</webidl>
25098 Defines the type of content such as image, video, audio and other.
25105 "OTHER" type is added since 2.1.
25108 <EnumValue stringvalue="IMAGE">
25109 <webidl> "IMAGE</webidl>
25111 <EnumValue stringvalue="VIDEO">
25112 <webidl> "VIDEO</webidl>
25114 <EnumValue stringvalue="AUDIO">
25115 <webidl> "AUDIO</webidl>
25117 <EnumValue stringvalue="OTHER">
25118 <webidl> "OTHER</webidl>
25121 <Enum name="AudioContentLyricsType" id="::Content::AudioContentLyricsType">
25122 <webidl> enum AudioContentLyricsType { "SYNCHRONIZED", "UNSYNCHRONIZED" };</webidl>
25126 Defines whether the lyric supplied with an audio file is time-synchronized or not.
25133 <EnumValue stringvalue="SYNCHRONIZED">
25134 <webidl> "SYNCHRONIZED</webidl>
25136 <EnumValue stringvalue="UNSYNCHRONIZED">
25137 <webidl> "UNSYNCHRONIZED</webidl>
25140 <Enum name="ImageContentOrientation" id="::Content::ImageContentOrientation">
25141 <webidl> enum ImageContentOrientation { "NORMAL", "FLIP_HORIZONTAL", "ROTATE_180", "FLIP_VERTICAL", "TRANSPOSE", "ROTATE_90", "TRANSVERSE", "ROTATE_270" };</webidl>
25145 Defines an orientation of an image.
25152 <EnumValue stringvalue="NORMAL">
25153 <webidl> "NORMAL</webidl>
25155 <EnumValue stringvalue="FLIP_HORIZONTAL">
25156 <webidl> "FLIP_HORIZONTAL</webidl>
25158 <EnumValue stringvalue="ROTATE_180">
25159 <webidl> "ROTATE_180</webidl>
25161 <EnumValue stringvalue="FLIP_VERTICAL">
25162 <webidl> "FLIP_VERTICAL</webidl>
25164 <EnumValue stringvalue="TRANSPOSE">
25165 <webidl> "TRANSPOSE</webidl>
25167 <EnumValue stringvalue="ROTATE_90">
25168 <webidl> "ROTATE_90</webidl>
25170 <EnumValue stringvalue="TRANSVERSE">
25171 <webidl> "TRANSVERSE</webidl>
25173 <EnumValue stringvalue="ROTATE_270">
25174 <webidl> "ROTATE_270</webidl>
25177 <Typedef name="ContentId" id="::Content::ContentId">
25178 <webidl> typedef DOMString ContentId;</webidl>
25181 Content identifier.
25187 <Type type="DOMString"/>
25189 <Typedef name="ContentDirectoryId" id="::Content::ContentDirectoryId">
25190 <webidl> typedef DOMString ContentDirectoryId;</webidl>
25193 Content directory identifier.
25199 <Type type="DOMString"/>
25201 <Interface name="ContentManagerObject" id="::Content::ContentManagerObject">
25202 <webidl> [NoInterfaceObject] interface ContentManagerObject {
25203 readonly attribute <ref>ContentManager</ref> content;
25207 Defines what is instantiated by the Tizen object.
25211 There is a <em>tizen.content </em>object that allows accessing the functionality of the Content module.
25218 <ExtendedAttributeList>
25219 <ExtendedAttribute name="NoInterfaceObject">
25220 <webidl>NoInterfaceObject</webidl>
25221 </ExtendedAttribute>
25222 </ExtendedAttributeList>
25223 <Attribute readonly="readonly" name="content" id="::Content::ContentManagerObject::content">
25224 <webidl> readonly attribute <ref>ContentManager</ref> content;</webidl>
25225 <Type name="ContentManager"/>
25228 <Implements name1="Tizen" name2="ContentManagerObject">
25229 <webidl> <ref>Tizen</ref> implements <ref>ContentManagerObject</ref>;</webidl>
25231 <Interface name="ContentManager" id="::Content::ContentManager">
25232 <webidl> [NoInterfaceObject] interface ContentManager {
25234 void update(<ref>Content</ref> content) raises(<ref>WebAPIException</ref>);
25236 void updateBatch(<ref>Content</ref>[] contents,
25237 optional <ref>SuccessCallback</ref>? successCallback,
25238 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
25240 void getDirectories(<ref>ContentDirectoryArraySuccessCallback</ref> successCallback,
25241 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
25243 void find(<ref>ContentArraySuccessCallback</ref> successCallback,
25244 optional <ref>ErrorCallback</ref>? errorCallback,
25245 optional <ref>ContentDirectoryId</ref>? directoryId,
25246 optional <ref>AbstractFilter</ref>? filter,
25247 optional <ref>SortMode</ref>? sortMode,
25248 optional unsigned long? count,
25249 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);
25252 void scanFile(DOMString contentURI,
25253 optional <ref>ContentScanSuccessCallback</ref>? successCallback,
25254 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
25256 void setChangeListener(<ref>ContentChangeCallback</ref> changeCallback) raises(<ref>WebAPIException</ref>);
25258 void unsetChangeListener() raises(<ref>WebAPIException</ref>);
25263 This interface provides operations to retrieve and manipulate contents.
25269 <ExtendedAttributeList>
25270 <ExtendedAttribute name="NoInterfaceObject">
25271 <webidl>NoInterfaceObject</webidl>
25272 </ExtendedAttribute>
25273 </ExtendedAttributeList>
25274 <Operation name="update" id="::Content::ContentManager::update">
25275 <webidl> void update(<ref>Content</ref> content) raises(<ref>WebAPIException</ref>);</webidl>
25278 Updates attributes of the content in content database synchronously.
25282 When an application has changed some attributes of a content, this method allows
25283 writing it back to the content database.
25293 http://tizen.org/privilege/content.write
25296 The <em>editableAttributes </em>in <em>Content </em>interface indicates
25297 the attributes that can be changed.
25298 This API does not support updating the metadata of a file.
25300 <Code> // Assume the content is a Content object as a result of find method.
25301 // Check the description is editable, and then set a description.
25302 if (content.editableAttributes.indexOf("description") >= 0) {
25303 content.description = "Sample content";
25305 tizen.content.update(content);
25308 <Type type="void"/>
25310 <Argument name="content">
25313 The content to update.
25316 <Type name="Content"/>
25320 <RaiseException name="WebAPIException">
25323 with error type TypeMismatchError, if any input parameter
25324 is not compatible with the expected type for that parameter.
25327 with error type InvalidValuesError, if any of the input parameters
25328 contain an invalid value.
25331 with error type SecurityError, if the application does not have the privilege to call this method.
25334 with error type UnknownError in any other error case.
25340 <Operation name="updateBatch" id="::Content::ContentManager::updateBatch">
25341 <webidl> void updateBatch(<ref>Content</ref>[] contents,
25342 optional <ref>SuccessCallback</ref>? successCallback,
25343 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
25346 Updates a batch of content attributes in the content database synchronously.
25350 When an application has changed any attributes in array of content, this method allows writing them
25351 back to the content database.
25354 The errorCallback can be launched with any of these error types:
25358 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
25360 UnknownError: In any other error case. </li>
25370 http://tizen.org/privilege/content.write
25373 The <em>editableAttributes </em>in <em>Content </em>interface indicates
25374 the attributes that can be changed.
25375 This API does not support updating the metadata of a file.
25377 <Code> // The following example increases rating of an content by 1
25379 function errorCB(err) {
25380 console.log( 'The following error occurred: ' + err.name);
25383 function successCB() {
25384 console.log('Attributes set successfully');
25387 // Assume the content is a Content object as a result of find method.
25388 // Check the rating is editable, and then increase by 1.
25389 if (content.editableAttributes.indexOf("rating") >= 0) {
25392 tizen.content.updateBatch([content], successCB, errorCB);
25395 <Type type="void"/>
25397 <Argument name="contents">
25400 Array of content to change.
25403 <Type type="array">
25404 <Type name="Content"/>
25407 <Argument optional="optional" name="successCallback">
25410 Function called when attributes have been changed.
25413 <Type name="SuccessCallback" nullable="nullable"/>
25415 <Argument optional="optional" name="errorCallback">
25418 Function called when an error has occurred.
25421 <Type name="ErrorCallback" nullable="nullable"/>
25425 <RaiseException name="WebAPIException">
25428 with error type TypeMismatchError, if the input parameter
25429 is not compatible with the expected type for that parameter.
25432 with error type SecurityError, if the application does not have the privilege to call this method.
25438 <Operation name="getDirectories" id="::Content::ContentManager::getDirectories">
25439 <webidl> void getDirectories(<ref>ContentDirectoryArraySuccessCallback</ref> successCallback,
25440 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
25443 Gets a list of content directory.
25447 This method returns (via callback) a list of content directory objects. To obtain a list of contents
25448 in a specific directory, use find() method with the directory ID.
25451 The errorCallback is launched with this error type:
25455 UnknownError: In any other error case. </li>
25461 <Code> // The following example retrieves content directories in the storage.
25463 function errorCB(err) {
25464 console.log( 'The following error occurred: ' + err.name);
25467 function printDirectory(directory, index, directories) {
25468 console.log('directoryURI: ' + directory.directoryURI + ' Title: ' + directory.title);
25470 function getDirectoriesCB(directories) {
25471 directories.forEach(printDirectory);
25474 tizen.content.getDirectories(getDirectoriesCB, errorCB);
25477 <Type type="void"/>
25479 <Argument name="successCallback">
25482 Function called when content directories have been retrieved successfully.
25485 <Type name="ContentDirectoryArraySuccessCallback"/>
25487 <Argument optional="optional" name="errorCallback">
25490 Function called when an error has occurred.
25493 <Type name="ErrorCallback" nullable="nullable"/>
25497 <RaiseException name="WebAPIException">
25500 with error type TypeMismatchError, if the input parameter
25501 is not compatible with the expected type for that parameter.
25507 <Operation name="find" id="::Content::ContentManager::find">
25508 <webidl> void find(<ref>ContentArraySuccessCallback</ref> successCallback,
25509 optional <ref>ErrorCallback</ref>? errorCallback,
25510 optional <ref>ContentDirectoryId</ref>? directoryId,
25511 optional <ref>AbstractFilter</ref>? filter,
25512 optional <ref>SortMode</ref>? sortMode,
25513 optional unsigned long? count,
25514 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);</webidl>
25517 Finds contents that satisfy the conditions set by a filter.
25521 This method allows searching based on a supplied filter. For more detail on AbstractFilter, see
25522 <a href="../../org.tizen.web.device.apireference/tizen/tizen.html#::Tizen::AbstractFilter">Tizen</a> module. The filter allows precise searching such
25523 as "return all songs by artist U2, ordered by name".
25526 The errorCallback can be launched with these error types:
25530 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
25532 UnknownError: In any other error case. </li>
25542 http://tizen.org/privilege/content.read
25544 <Code> // The following example retrieves all songs from the album "The Joshua Tree", by artist "U2", ordered by the track number.
25547 var sortMode = new tizen.SortMode("trackNumber", "ASC");
25548 var artistFilter = new tizen.AttributeFilter("artists", "EXACTLY", "U2");
25549 var albumFilter = new tizen.AttributeFilter("album", "EXACTLY", "The Joshua Tree");
25550 var filter = new tizen.CompositeFilter("INTERSECTION", [albumFilter, artistFilter]);
25552 function errorCB(err) {
25553 console.log( 'The following error occurred: ' + err.name);
25556 function printContent(content, index, contents) {
25557 console.log('Track: ' + content.trackNumber + ' Title: ' + content.title + 'Duration: ' + content.duration + 'URL: ' + content.contentURI + 'MIME: ' + content.mimeType);
25560 function findCB(contents) {
25561 console.log('The Joshua Tree by U2:');
25562 contents.forEach(printContent);
25563 // Increase the offset as much as the count and then find content again.
25564 if (contents.length == count) {
25566 tizen.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
25570 tizen.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
25574 <Type type="void"/>
25576 <Argument name="successCallback">
25579 Function called when a content have been retrieved.
25582 <Type name="ContentArraySuccessCallback"/>
25584 <Argument optional="optional" name="errorCallback">
25587 Function called when an error has occurred.
25590 <Type name="ErrorCallback" nullable="nullable"/>
25592 <Argument optional="optional" name="directoryId">
25595 Directory ID that is use to select content to retrieve in a specified directory.
25598 <Type name="ContentDirectoryId" nullable="nullable"/>
25600 <Argument optional="optional" name="filter">
25603 Filter that is used to select content to retrieve.
25606 <Type name="AbstractFilter" nullable="nullable"/>
25608 <Argument optional="optional" name="sortMode">
25611 Used to determine the sort order in which the content are returned.
25614 <Type name="SortMode" nullable="nullable"/>
25616 <Argument optional="optional" name="count">
25619 Maximum amount of content to return.
25622 <Type type="unsigned long" nullable="nullable"/>
25624 <Argument optional="optional" name="offset">
25627 Offset of the result set.
25630 <Type type="unsigned long" nullable="nullable"/>
25634 <RaiseException name="WebAPIException">
25637 with error type TypeMismatchError, if the input parameter
25638 is not compatible with the expected type for that parameter.
25641 with error type SecurityError, if the application does not have the privilege to call this method.
25644 with error type NotSupportedError, if this feature is not supported.
25650 <Operation name="scanFile" id="::Content::ContentManager::scanFile">
25651 <webidl> void scanFile(DOMString contentURI,
25652 optional <ref>ContentScanSuccessCallback</ref>? successCallback,
25653 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
25656 Scan a file to create or update a content in the content database.
25660 When an application creates or updates a content, this method allows scan it
25661 to insert or update the content in the content database.
25671 http://tizen.org/privilege/content.write
25673 <Code> // The following example scan 'tizen.jpg' in media directory
25675 function errorCB(err) {
25676 console.log( 'The following error occurred: ' + err.name);
25679 function successCB(path) {
25680 console.log('scanning is completed');
25683 var path = "file:///opt/usr/media/tizen.jpg";
25684 tizen.content.scanFile(path, successCB, errorCB);
25688 <Type type="void"/>
25690 <Argument name="contentURI">
25693 The URI of content to scan.
25696 <Type type="DOMString"/>
25698 <Argument optional="optional" name="successCallback">
25701 Function called when scanning has been completed.
25704 <Type name="ContentScanSuccessCallback" nullable="nullable"/>
25706 <Argument optional="optional" name="errorCallback">
25709 Function called when an error has occurred.
25712 <Type name="ErrorCallback" nullable="nullable"/>
25716 <RaiseException name="WebAPIException">
25719 with error type TypeMismatchError, if any input parameter
25720 is not compatible with the expected type for that parameter.
25723 with error type InvalidValuesError, if any of the input parameters
25724 contain an invalid value.
25727 with error type SecurityError, if the application does not have the privilege to call this method.
25730 with error type UnknownError in any other error case.
25736 <Operation name="setChangeListener" id="::Content::ContentManager::setChangeListener">
25737 <webidl> void setChangeListener(<ref>ContentChangeCallback</ref> changeCallback) raises(<ref>WebAPIException</ref>);</webidl>
25740 Sets a listener to receive notifications about content changes.
25749 http://tizen.org/privilege/content.read
25751 <Code> var listener= {
25752 oncontentadded: function(content) {
25753 console.log(content.contentURI + ' content is added');
25755 oncontentupdated: function(content) {
25756 console.log(content.contentURI + ' content is updated');
25758 oncontentremoved: function(id) {
25759 console.log(id + ' is removed');
25763 // Registers to be notified when the content changes
25764 tizen.content.setChangeListener(listener);
25768 <Type type="void"/>
25770 <Argument name="changeCallback">
25773 A callback to be invoked for receiving content change notification.
25776 <Type name="ContentChangeCallback"/>
25780 <RaiseException name="WebAPIException">
25783 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
25786 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
25789 with error type SecurityError, if the application does not have the privilege to call this method.
25792 with error type UnknownError, if any other error occurs.
25798 <Operation name="unsetChangeListener" id="::Content::ContentManager::unsetChangeListener">
25799 <webidl> void unsetChangeListener() raises(<ref>WebAPIException</ref>);</webidl>
25802 Unsets the listener to unsubscribes from receiving notification for any content changes.
25811 http://tizen.org/privilege/content.read
25813 <Code> tizen.content.unsetChangeListener();
25817 <Type type="void"/>
25820 <RaiseException name="WebAPIException">
25823 with error type SecurityError, if the application does not have the privilege to call this method.
25826 with error type UnknownError if any other error occurs.
25833 <Interface name="ContentArraySuccessCallback" id="::Content::ContentArraySuccessCallback">
25834 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ContentArraySuccessCallback {
25835 void onsuccess(<ref>Content</ref>[] contents);
25839 The callback function used to return a list of content objects.
25845 <ExtendedAttributeList>
25846 <ExtendedAttribute name="Callback" value="FunctionOnly">
25847 <webidl>Callback</webidl>
25848 </ExtendedAttribute>
25849 <ExtendedAttribute name="NoInterfaceObject">
25850 <webidl> NoInterfaceObject</webidl>
25851 </ExtendedAttribute>
25852 </ExtendedAttributeList>
25853 <Operation name="onsuccess" id="::Content::ContentArraySuccessCallback::onsuccess">
25854 <webidl> void onsuccess(<ref>Content</ref>[] contents);</webidl>
25857 Called when the list of content is retrieved successfully.
25863 <Type type="void"/>
25865 <Argument name="contents">
25868 The array of <em>Content </em>objects.
25871 <Type type="array">
25872 <Type name="Content"/>
25878 <Interface name="ContentDirectoryArraySuccessCallback" id="::Content::ContentDirectoryArraySuccessCallback">
25879 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ContentDirectoryArraySuccessCallback {
25880 void onsuccess(<ref>ContentDirectory</ref>[] directories);
25884 The callback function used to return a list of ContentDirectory objects.
25890 <ExtendedAttributeList>
25891 <ExtendedAttribute name="Callback" value="FunctionOnly">
25892 <webidl>Callback</webidl>
25893 </ExtendedAttribute>
25894 <ExtendedAttribute name="NoInterfaceObject">
25895 <webidl> NoInterfaceObject</webidl>
25896 </ExtendedAttribute>
25897 </ExtendedAttributeList>
25898 <Operation name="onsuccess" id="::Content::ContentDirectoryArraySuccessCallback::onsuccess">
25899 <webidl> void onsuccess(<ref>ContentDirectory</ref>[] directories);</webidl>
25902 Called when the list of directory is retrieved successfully.
25908 <Type type="void"/>
25910 <Argument name="directories">
25913 The array of <em>ContentDirectory </em>objects.
25916 <Type type="array">
25917 <Type name="ContentDirectory"/>
25923 <Interface name="ContentScanSuccessCallback" id="::Content::ContentScanSuccessCallback">
25924 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ContentScanSuccessCallback {
25925 void onsuccess(DOMString contentURI);
25929 The callback function used to return a content to scan has been completed.
25935 <ExtendedAttributeList>
25936 <ExtendedAttribute name="Callback" value="FunctionOnly">
25937 <webidl>Callback</webidl>
25938 </ExtendedAttribute>
25939 <ExtendedAttribute name="NoInterfaceObject">
25940 <webidl> NoInterfaceObject</webidl>
25941 </ExtendedAttribute>
25942 </ExtendedAttributeList>
25943 <Operation name="onsuccess" id="::Content::ContentScanSuccessCallback::onsuccess">
25944 <webidl> void onsuccess(DOMString contentURI);</webidl>
25947 Called when the scanning has been completed.
25953 <Type type="void"/>
25955 <Argument name="contentURI">
25958 The URI of <em>Content </em>objects.
25961 <Type type="DOMString"/>
25966 <Interface name="ContentChangeCallback" id="::Content::ContentChangeCallback">
25967 <webidl> [Callback, NoInterfaceObject] interface ContentChangeCallback {
25968 void oncontentadded(<ref>Content</ref> content);
25970 void oncontentupdated(<ref>Content</ref> content);
25972 void oncontentremoved(<ref>ContentId</ref> id);
25976 This interface specifies a set of methods that are invoked every time a content change occurs.
25982 <ExtendedAttributeList>
25983 <ExtendedAttribute name="Callback">
25984 <webidl>Callback</webidl>
25985 </ExtendedAttribute>
25986 <ExtendedAttribute name="NoInterfaceObject">
25987 <webidl> NoInterfaceObject</webidl>
25988 </ExtendedAttribute>
25989 </ExtendedAttributeList>
25990 <Operation name="oncontentadded" id="::Content::ContentChangeCallback::oncontentadded">
25991 <webidl> void oncontentadded(<ref>Content</ref> content);</webidl>
25994 Called when content is added.
26000 <Type type="void"/>
26002 <Argument name="content">
26005 The content to add.
26008 <Type name="Content"/>
26012 <Operation name="oncontentupdated" id="::Content::ContentChangeCallback::oncontentupdated">
26013 <webidl> void oncontentupdated(<ref>Content</ref> content);</webidl>
26016 Called when content is updated.
26022 <Type type="void"/>
26024 <Argument name="content">
26027 The content to update.
26030 <Type name="Content"/>
26034 <Operation name="oncontentremoved" id="::Content::ContentChangeCallback::oncontentremoved">
26035 <webidl> void oncontentremoved(<ref>ContentId</ref> id);</webidl>
26038 Called when content is removed.
26044 <Type type="void"/>
26046 <Argument name="id">
26049 The id of content to remove.
26052 <Type name="ContentId"/>
26057 <Interface name="ContentDirectory" id="::Content::ContentDirectory">
26058 <webidl> [NoInterfaceObject] interface ContentDirectory {
26060 readonly attribute <ref>ContentDirectoryId</ref> id;
26062 readonly attribute DOMString directoryURI;
26064 readonly attribute DOMString title;
26066 readonly attribute <ref>ContentDirectoryStorageType</ref> storageType;
26068 readonly attribute Date? modifiedDate;
26073 This interface that provides access to properties of a content directory.
26079 <ExtendedAttributeList>
26080 <ExtendedAttribute name="NoInterfaceObject">
26081 <webidl>NoInterfaceObject</webidl>
26082 </ExtendedAttribute>
26083 </ExtendedAttributeList>
26084 <Attribute readonly="readonly" name="id" id="::Content::ContentDirectory::id">
26085 <webidl> readonly attribute <ref>ContentDirectoryId</ref> id;</webidl>
26088 The opaque content directory identifier.
26094 <Type name="ContentDirectoryId"/>
26096 <Attribute readonly="readonly" name="directoryURI" id="::Content::ContentDirectory::directoryURI">
26097 <webidl> readonly attribute DOMString directoryURI;</webidl>
26100 The directory path on the device.
26106 <Type type="DOMString"/>
26108 <Attribute readonly="readonly" name="title" id="::Content::ContentDirectory::title">
26109 <webidl> readonly attribute DOMString title;</webidl>
26112 The directory name.
26118 <Type type="DOMString"/>
26120 <Attribute readonly="readonly" name="storageType" id="::Content::ContentDirectory::storageType">
26121 <webidl> readonly attribute <ref>ContentDirectoryStorageType</ref> storageType;</webidl>
26124 The type of a device storage.
26130 <Type name="ContentDirectoryStorageType"/>
26132 <Attribute readonly="readonly" name="modifiedDate" id="::Content::ContentDirectory::modifiedDate">
26133 <webidl> readonly attribute Date? modifiedDate;</webidl>
26136 The last modified date for a directory.
26142 <Type type="Date" nullable="nullable"/>
26145 <Interface name="Content" id="::Content::Content">
26146 <webidl> [NoInterfaceObject] interface Content {
26148 readonly attribute DOMString[] editableAttributes;
26150 readonly attribute <ref>ContentId</ref> id;
26152 attribute DOMString name;
26154 readonly attribute <ref>ContentType</ref> type;
26156 readonly attribute DOMString mimeType;
26158 readonly attribute DOMString title;
26160 readonly attribute DOMString contentURI;
26162 readonly attribute DOMString[]? thumbnailURIs;
26164 readonly attribute Date? releaseDate;
26166 readonly attribute Date? modifiedDate;
26168 readonly attribute unsigned long size;
26170 attribute DOMString? description;
26172 attribute unsigned long rating;
26176 This interface provides access to properties of a content.
26182 <ExtendedAttributeList>
26183 <ExtendedAttribute name="NoInterfaceObject">
26184 <webidl>NoInterfaceObject</webidl>
26185 </ExtendedAttribute>
26186 </ExtendedAttributeList>
26187 <Attribute readonly="readonly" name="editableAttributes" id="::Content::Content::editableAttributes">
26188 <webidl> readonly attribute DOMString[] editableAttributes;</webidl>
26191 The list of attributes that can be editable to the local backend using update or updateBatch method.
26197 <Type type="array">
26198 <Type type="DOMString"/>
26201 <Attribute readonly="readonly" name="id" id="::Content::Content::id">
26202 <webidl> readonly attribute <ref>ContentId</ref> id;</webidl>
26205 The opaque content identifier.
26211 <Type name="ContentId"/>
26213 <Attribute name="name" id="::Content::Content::name">
26214 <webidl> attribute DOMString name;</webidl>
26217 The content name. The initial value is the file name of the content.
26223 <Type type="DOMString"/>
26225 <Attribute readonly="readonly" name="type" id="::Content::Content::type">
26226 <webidl> readonly attribute <ref>ContentType</ref> type;</webidl>
26235 <Type name="ContentType"/>
26237 <Attribute readonly="readonly" name="mimeType" id="::Content::Content::mimeType">
26238 <webidl> readonly attribute DOMString mimeType;</webidl>
26241 The content MIME type.
26247 <Type type="DOMString"/>
26249 <Attribute readonly="readonly" name="title" id="::Content::Content::title">
26250 <webidl> readonly attribute DOMString title;</webidl>
26259 <Type type="DOMString"/>
26261 <Attribute readonly="readonly" name="contentURI" id="::Content::Content::contentURI">
26262 <webidl> readonly attribute DOMString contentURI;</webidl>
26265 The URI to access the content.
26271 <Type type="DOMString"/>
26273 <Attribute readonly="readonly" name="thumbnailURIs" id="::Content::Content::thumbnailURIs">
26274 <webidl> readonly attribute DOMString[]? thumbnailURIs;</webidl>
26277 The array of content thumbnails URIs.
26283 <Type type="array" nullable="nullable">
26284 <Type type="DOMString"/>
26287 <Attribute readonly="readonly" name="releaseDate" id="::Content::Content::releaseDate">
26288 <webidl> readonly attribute Date? releaseDate;</webidl>
26291 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.
26297 <Type type="Date" nullable="nullable"/>
26299 <Attribute readonly="readonly" name="modifiedDate" id="::Content::Content::modifiedDate">
26300 <webidl> readonly attribute Date? modifiedDate;</webidl>
26303 The last modified date for a content.
26309 <Type type="Date" nullable="nullable"/>
26311 <Attribute readonly="readonly" name="size" id="::Content::Content::size">
26312 <webidl> readonly attribute unsigned long size;</webidl>
26315 The file size of the content in bytes.
26321 <Type type="unsigned long"/>
26323 <Attribute name="description" id="::Content::Content::description">
26324 <webidl> attribute DOMString? description;</webidl>
26327 The content description.
26333 <Type type="DOMString" nullable="nullable"/>
26335 <Attribute name="rating" id="::Content::Content::rating">
26336 <webidl> attribute unsigned long rating;</webidl>
26339 The content rating and this value can vary from <var>0 </var>to <var>10</var>.
26345 <Type type="unsigned long"/>
26348 <Interface name="VideoContent" id="::Content::VideoContent">
26349 <webidl> [NoInterfaceObject] interface VideoContent : <ref>Content</ref> {
26351 attribute <ref>SimpleCoordinates</ref>? geolocation;
26353 readonly attribute DOMString? album;
26355 readonly attribute DOMString[]? artists;
26357 readonly attribute unsigned long duration;
26359 readonly attribute unsigned long width;
26361 readonly attribute unsigned long height;
26366 This interface extends a basic <em>Content </em>object with video-specific attributes.
26372 <ExtendedAttributeList>
26373 <ExtendedAttribute name="NoInterfaceObject">
26374 <webidl>NoInterfaceObject</webidl>
26375 </ExtendedAttribute>
26376 </ExtendedAttributeList>
26377 <InterfaceInheritance>
26378 <Name name="Content"/>
26379 </InterfaceInheritance>
26380 <Attribute name="geolocation" id="::Content::VideoContent::geolocation">
26381 <webidl> attribute <ref>SimpleCoordinates</ref>? geolocation;</webidl>
26384 The geographical location where the video was made.
26390 <Type name="SimpleCoordinates" nullable="nullable"/>
26392 <Attribute readonly="readonly" name="album" id="::Content::VideoContent::album">
26393 <webidl> readonly attribute DOMString? album;</webidl>
26396 The album name to which the video belongs.
26402 <Type type="DOMString" nullable="nullable"/>
26404 <Attribute readonly="readonly" name="artists" id="::Content::VideoContent::artists">
26405 <webidl> readonly attribute DOMString[]? artists;</webidl>
26408 The list of artists who created the video.
26414 <Type type="array" nullable="nullable">
26415 <Type type="DOMString"/>
26418 <Attribute readonly="readonly" name="duration" id="::Content::VideoContent::duration">
26419 <webidl> readonly attribute unsigned long duration;</webidl>
26422 The video duration in milliseconds.
26428 <Type type="unsigned long"/>
26430 <Attribute readonly="readonly" name="width" id="::Content::VideoContent::width">
26431 <webidl> readonly attribute unsigned long width;</webidl>
26434 The width of a video in pixels.
26440 <Type type="unsigned long"/>
26442 <Attribute readonly="readonly" name="height" id="::Content::VideoContent::height">
26443 <webidl> readonly attribute unsigned long height;</webidl>
26446 The height of the video in pixels.
26452 <Type type="unsigned long"/>
26455 <Interface name="AudioContentLyrics" id="::Content::AudioContentLyrics">
26456 <webidl> [NoInterfaceObject] interface AudioContentLyrics {
26458 readonly attribute <ref>AudioContentLyricsType</ref> type;
26460 readonly attribute unsigned long[] timestamps;
26462 readonly attribute DOMString[] texts;
26466 This interface provides lyrics for music.
26472 <ExtendedAttributeList>
26473 <ExtendedAttribute name="NoInterfaceObject">
26474 <webidl>NoInterfaceObject</webidl>
26475 </ExtendedAttribute>
26476 </ExtendedAttributeList>
26477 <Attribute readonly="readonly" name="type" id="::Content::AudioContentLyrics::type">
26478 <webidl> readonly attribute <ref>AudioContentLyricsType</ref> type;</webidl>
26481 The type of lyrics, that is, whether they are synchronized with the music or not.
26487 <Type name="AudioContentLyricsType"/>
26489 <Attribute readonly="readonly" name="timestamps" id="::Content::AudioContentLyrics::timestamps">
26490 <webidl> readonly attribute unsigned long[] timestamps;</webidl>
26493 The array of timestamps in milliseconds for lyrics.
26497 If the lyrics are not synchronized (if there is no time information for the lyrics) the array is undefined.
26504 <Type type="array">
26505 <Type type="unsigned long"/>
26508 <Attribute readonly="readonly" name="texts" id="::Content::AudioContentLyrics::texts">
26509 <webidl> readonly attribute DOMString[] texts;</webidl>
26512 The array of lyric snippets.
26516 If the lyrics are not synchronized, the array has only one member with full lyrics.
26523 <Type type="array">
26524 <Type type="DOMString"/>
26528 <Interface name="AudioContent" id="::Content::AudioContent">
26529 <webidl> [NoInterfaceObject] interface AudioContent : <ref>Content</ref> {
26531 readonly attribute DOMString? album;
26533 readonly attribute DOMString[]? genres;
26535 readonly attribute DOMString[]? artists;
26537 readonly attribute DOMString[]? composers;
26539 readonly attribute <ref>AudioContentLyrics</ref>? lyrics;
26541 readonly attribute DOMString? copyright;
26543 readonly attribute unsigned long bitrate;
26545 readonly attribute unsigned short? trackNumber;
26547 readonly attribute unsigned long duration;
26552 This interface extends a basic <em>Content </em>object with audio-specific attributes.
26558 <ExtendedAttributeList>
26559 <ExtendedAttribute name="NoInterfaceObject">
26560 <webidl>NoInterfaceObject</webidl>
26561 </ExtendedAttribute>
26562 </ExtendedAttributeList>
26563 <InterfaceInheritance>
26564 <Name name="Content"/>
26565 </InterfaceInheritance>
26566 <Attribute readonly="readonly" name="album" id="::Content::AudioContent::album">
26567 <webidl> readonly attribute DOMString? album;</webidl>
26570 The album name to which the audio belongs.
26576 <Type type="DOMString" nullable="nullable"/>
26578 <Attribute readonly="readonly" name="genres" id="::Content::AudioContent::genres">
26579 <webidl> readonly attribute DOMString[]? genres;</webidl>
26582 The list of genres to which the audio belongs.
26588 <Type type="array" nullable="nullable">
26589 <Type type="DOMString"/>
26592 <Attribute readonly="readonly" name="artists" id="::Content::AudioContent::artists">
26593 <webidl> readonly attribute DOMString[]? artists;</webidl>
26596 The list of artists who created the audio.
26602 <Type type="array" nullable="nullable">
26603 <Type type="DOMString"/>
26606 <Attribute readonly="readonly" name="composers" id="::Content::AudioContent::composers">
26607 <webidl> readonly attribute DOMString[]? composers;</webidl>
26610 The list of composers for the music.
26616 <Type type="array" nullable="nullable">
26617 <Type type="DOMString"/>
26620 <Attribute readonly="readonly" name="lyrics" id="::Content::AudioContent::lyrics">
26621 <webidl> readonly attribute <ref>AudioContentLyrics</ref>? lyrics;</webidl>
26624 The lyrics of a song in an audio file.
26630 <Type name="AudioContentLyrics" nullable="nullable"/>
26632 <Attribute readonly="readonly" name="copyright" id="::Content::AudioContent::copyright">
26633 <webidl> readonly attribute DOMString? copyright;</webidl>
26636 The copyright information.
26642 <Type type="DOMString" nullable="nullable"/>
26644 <Attribute readonly="readonly" name="bitrate" id="::Content::AudioContent::bitrate">
26645 <webidl> readonly attribute unsigned long bitrate;</webidl>
26648 The audio bitrate in bits per second. By default, this value is 0.
26654 <Type type="unsigned long"/>
26656 <Attribute readonly="readonly" name="trackNumber" id="::Content::AudioContent::trackNumber">
26657 <webidl> readonly attribute unsigned short? trackNumber;</webidl>
26660 The track number if the audio belongs to an album.
26666 <Type type="unsigned short" nullable="nullable"/>
26668 <Attribute readonly="readonly" name="duration" id="::Content::AudioContent::duration">
26669 <webidl> readonly attribute unsigned long duration;</webidl>
26672 The audio duration in milliseconds.
26678 <Type type="unsigned long"/>
26681 <Interface name="ImageContent" id="::Content::ImageContent">
26682 <webidl> [NoInterfaceObject] interface ImageContent : <ref>Content</ref> {
26684 attribute <ref>SimpleCoordinates</ref>? geolocation;
26686 readonly attribute unsigned long width;
26688 readonly attribute unsigned long height;
26690 attribute <ref>ImageContentOrientation</ref> orientation;
26695 This interface extends a basic <em>Content </em>object with image-specific attributes.
26701 <ExtendedAttributeList>
26702 <ExtendedAttribute name="NoInterfaceObject">
26703 <webidl>NoInterfaceObject</webidl>
26704 </ExtendedAttribute>
26705 </ExtendedAttributeList>
26706 <InterfaceInheritance>
26707 <Name name="Content"/>
26708 </InterfaceInheritance>
26709 <Attribute name="geolocation" id="::Content::ImageContent::geolocation">
26710 <webidl> attribute <ref>SimpleCoordinates</ref>? geolocation;</webidl>
26713 The geographical location where the image has been made.
26719 <Type name="SimpleCoordinates" nullable="nullable"/>
26721 <Attribute readonly="readonly" name="width" id="::Content::ImageContent::width">
26722 <webidl> readonly attribute unsigned long width;</webidl>
26725 The width of an image in pixels.
26731 <Type type="unsigned long"/>
26733 <Attribute readonly="readonly" name="height" id="::Content::ImageContent::height">
26734 <webidl> readonly attribute unsigned long height;</webidl>
26737 The height of an image in pixels.
26743 <Type type="unsigned long"/>
26745 <Attribute name="orientation" id="::Content::ImageContent::orientation">
26746 <webidl> attribute <ref>ImageContentOrientation</ref> orientation;</webidl>
26749 The image orientation.
26755 <Type name="ImageContentOrientation"/>
26759 <Module name="DataControl" id="::DataControl">
26760 <webidl>module DataControl {
26761 enum DataType { "MAP", "SQL"};
26763 [NoInterfaceObject] interface DataControlManagerObject {
26764 readonly attribute <ref>DataControlManager</ref> datacontrol;
26766 <ref>Tizen</ref> implements <ref>DataControlManagerObject</ref>;
26769 [NoInterfaceObject] interface DataControlManager {
26770 <ref>DataControlConsumerObject</ref> getDataControlConsumer(DOMString providerId, DOMString dataId, <ref>DataType</ref> type) raises(<ref>WebAPIException</ref>);
26774 [NoInterfaceObject] interface DataControlConsumerObject {
26775 readonly attribute <ref>DataType</ref> type;
26776 readonly attribute DOMString providerId;
26777 readonly attribute DOMString dataId;
26781 [NoInterfaceObject] interface SQLDataControlConsumer : <ref>DataControlConsumerObject</ref> {
26782 void insert(unsigned long reqId, <ref>RowData</ref> insertionData,
26783 optional <ref>DataControlInsertSuccessCallback</ref>? successCallback,
26784 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26786 void update(unsigned long reqId, <ref>RowData</ref> updateData, DOMString where,
26787 optional <ref>DataControlSuccessCallback</ref>? successCallback,
26788 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26790 void remove(unsigned long reqId, DOMString where,
26791 optional <ref>DataControlSuccessCallback</ref>? successCallback,
26792 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26795 void select(unsigned long reqId, DOMString[] columns, DOMString where,
26796 <ref>DataControlSelectSuccessCallback</ref> successCallback, optional <ref>DataControlErrorCallback</ref>? errorCallback,
26797 optional unsigned long? page, optional unsigned long? maxNumberPerPage) raises(<ref>WebAPIException</ref>);
26800 [NoInterfaceObject] interface MappedDataControlConsumer : <ref>DataControlConsumerObject</ref> {
26801 void addValue(unsigned long reqId, DOMString key, DOMString value,
26802 optional <ref>DataControlSuccessCallback</ref>? successCallback,
26803 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26805 void removeValue(unsigned long reqId, DOMString key, DOMString value,
26806 <ref>DataControlSuccessCallback</ref> successCallback,
26807 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26809 void getValue(unsigned long reqId, DOMString key,
26810 <ref>DataControlGetValueSuccessCallback</ref> successCallback,
26811 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26813 void updateValue(unsigned long reqId, DOMString key, DOMString oldValue, DOMString newValue,
26814 <ref>DataControlSuccessCallback</ref> successCallback,
26815 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26819 [Callback=FunctionOnly, NoInterfaceObject] interface DataControlSuccessCallback {
26820 void onsuccess(unsigned long reqId);
26824 [Callback=FunctionOnly, NoInterfaceObject] interface DataControlErrorCallback {
26825 void onerror(unsigned long reqId, <ref>WebAPIError</ref> error);
26829 [Callback=FunctionOnly, NoInterfaceObject] interface DataControlInsertSuccessCallback {
26830 void onsuccess(unsigned long reqId, long insertRowId);
26835 [Callback=FunctionOnly, NoInterfaceObject] interface DataControlSelectSuccessCallback {
26836 void onsuccess(<ref>RowData</ref>[] rows, unsigned long reqId);
26840 [Callback=FunctionOnly, NoInterfaceObject] interface DataControlGetValueSuccessCallback {
26841 void onsuccess(DOMString[] values, unsigned long reqid);
26845 dictionary RowData {
26846 DOMString[] columns;
26847 DOMString[] values;
26852 This specification defines a DataControl API for applications.
26856 The DataControl functionality provides a way to access specific data that is exported by other applications.
26859 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.
26866 <Enum name="DataType" id="::DataControl::DataType">
26867 <webidl> enum DataType { "MAP", "SQL"};</webidl>
26876 <EnumValue stringvalue="MAP">
26877 <webidl> "MAP</webidl>
26879 <EnumValue stringvalue="SQL">
26880 <webidl> "SQL</webidl>
26883 <Interface name="DataControlManagerObject" id="::DataControl::DataControlManagerObject">
26884 <webidl> [NoInterfaceObject] interface DataControlManagerObject {
26885 readonly attribute <ref>DataControlManager</ref> datacontrol;
26889 Defines what is instantiated in the <em>Tizen</em> object.
26893 There is a <em>tizen.datacontrol</em> object that allows access to the
26901 <ExtendedAttributeList>
26902 <ExtendedAttribute name="NoInterfaceObject">
26903 <webidl>NoInterfaceObject</webidl>
26904 </ExtendedAttribute>
26905 </ExtendedAttributeList>
26906 <Attribute readonly="readonly" name="datacontrol" id="::DataControl::DataControlManagerObject::datacontrol">
26907 <webidl> readonly attribute <ref>DataControlManager</ref> datacontrol;</webidl>
26908 <Type name="DataControlManager"/>
26911 <Implements name1="Tizen" name2="DataControlManagerObject">
26912 <webidl> <ref>Tizen</ref> implements <ref>DataControlManagerObject</ref>;</webidl>
26914 <Interface name="DataControlManager" id="::DataControl::DataControlManager">
26915 <webidl> [NoInterfaceObject] interface DataControlManager {
26916 <ref>DataControlConsumerObject</ref> getDataControlConsumer(DOMString providerId, DOMString dataId, <ref>DataType</ref> type) raises(<ref>WebAPIException</ref>);
26920 This interface provides access to the <em>DataControlManager </em>object.
26926 <ExtendedAttributeList>
26927 <ExtendedAttribute name="NoInterfaceObject">
26928 <webidl>NoInterfaceObject</webidl>
26929 </ExtendedAttribute>
26930 </ExtendedAttributeList>
26931 <Operation name="getDataControlConsumer" id="::DataControl::DataControlManager::getDataControlConsumer">
26932 <webidl> <ref>DataControlConsumerObject</ref> getDataControlConsumer(DOMString providerId, DOMString dataId, <ref>DataType</ref> type) raises(<ref>WebAPIException</ref>);</webidl>
26935 Gets <em>DataControlConsumerObject</em> with a given DataType.
26944 http://tizen.org/privilege/datacontrol.consumer
26946 <Code> //The data provider, a native application, should be pre-installed and launched.
26947 //The same provider id should be defined for the use of this API between a native application(provider) and a web application(consumer).
26948 //In this example, DictionaryDataControlProvider native sample application is used as a data control provider.
26950 //Gets SQL type DataControlConsumerObject
26952 var globalSQLConsumer = tizen.datacontrol.getDataControlConsumer(
26953 "http://tizen.org/datacontrol/provider/DictionaryDataControlProvider", "Dictionary", "SQL");
26955 console.log (err.name +": " + err.message);
26957 // Gets MAP type DataControlConsumerObject
26959 globalMappedConsumer = tizen.datacontrol.getDataControlConsumer(
26960 "http://tizen.org/datacontrol/provider/DictionaryDataControlProvider", "Dictionary", "MAP");
26962 console.log (err.name +": " + err.message);
26966 <Type name="DataControlConsumerObject">
26969 DataControlConsumerObject The local <em>DataControlConsumerObject</em>.
26974 <Argument name="providerId">
26977 A provider ID to use and it should be shared between DataControl provider and DataControl consumer.
26980 <Type type="DOMString"/>
26982 <Argument name="dataId">
26985 A string for identifying a specific data.
26988 <Type type="DOMString"/>
26990 <Argument name="type">
26993 The DataType to use.
26996 <Type name="DataType"/>
27000 <RaiseException name="WebAPIException">
27003 with error type TypeMismatchError, if parameter type is mismatched.
27006 with error type SecurityError, if the application does not have the privilege to call this method.
27009 with error type UnknownError, if any other error occurs.
27016 <Interface name="DataControlConsumerObject" id="::DataControl::DataControlConsumerObject">
27017 <webidl> [NoInterfaceObject] interface DataControlConsumerObject {
27018 readonly attribute <ref>DataType</ref> type;
27019 readonly attribute DOMString providerId;
27020 readonly attribute DOMString dataId;
27024 This interface provides common attributes for other derived DataControlCunsumerObject.
27030 <ExtendedAttributeList>
27031 <ExtendedAttribute name="NoInterfaceObject">
27032 <webidl>NoInterfaceObject</webidl>
27033 </ExtendedAttribute>
27034 </ExtendedAttributeList>
27035 <Attribute readonly="readonly" name="type" id="::DataControl::DataControlConsumerObject::type">
27036 <webidl> readonly attribute <ref>DataType</ref> type;</webidl>
27039 An attribute to store the DataType.
27045 <Type name="DataType"/>
27047 <Attribute readonly="readonly" name="providerId" id="::DataControl::DataControlConsumerObject::providerId">
27048 <webidl> readonly attribute DOMString providerId;</webidl>
27051 An attribute to hold a provider identifier of the application whom it shares the DataControl with.
27052 This attribute should be known to users who want to interact with application to provide.
27058 <Type type="DOMString"/>
27060 <Attribute readonly="readonly" name="dataId" id="::DataControl::DataControlConsumerObject::dataId">
27061 <webidl> readonly attribute DOMString dataId;</webidl>
27064 The dataId identifies specific data, usually a database table to process(insert, delete, update).
27065 The string consists of one or more components, separated by a slash('/').
27071 <Type type="DOMString"/>
27074 <Interface name="SQLDataControlConsumer" id="::DataControl::SQLDataControlConsumer">
27075 <webidl> [NoInterfaceObject] interface SQLDataControlConsumer : <ref>DataControlConsumerObject</ref> {
27076 void insert(unsigned long reqId, <ref>RowData</ref> insertionData,
27077 optional <ref>DataControlInsertSuccessCallback</ref>? successCallback,
27078 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
27080 void update(unsigned long reqId, <ref>RowData</ref> updateData, DOMString where,
27081 optional <ref>DataControlSuccessCallback</ref>? successCallback,
27082 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
27084 void remove(unsigned long reqId, DOMString where,
27085 optional <ref>DataControlSuccessCallback</ref>? successCallback,
27086 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
27089 void select(unsigned long reqId, DOMString[] columns, DOMString where,
27090 <ref>DataControlSelectSuccessCallback</ref> successCallback, optional <ref>DataControlErrorCallback</ref>? errorCallback,
27091 optional unsigned long? page, optional unsigned long? maxNumberPerPage) raises(<ref>WebAPIException</ref>);
27095 This interface defines SQL data type operatiors.
27101 <ExtendedAttributeList>
27102 <ExtendedAttribute name="NoInterfaceObject">
27103 <webidl>NoInterfaceObject</webidl>
27104 </ExtendedAttribute>
27105 </ExtendedAttributeList>
27106 <InterfaceInheritance>
27107 <Name name="DataControlConsumerObject"/>
27108 </InterfaceInheritance>
27109 <Operation name="insert" id="::DataControl::SQLDataControlConsumer::insert">
27110 <webidl> void insert(unsigned long reqId, <ref>RowData</ref> insertionData,
27111 optional <ref>DataControlInsertSuccessCallback</ref>? successCallback,
27112 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
27115 Inserts new rows into a table owned by an SQL-type data control provider.
27124 http://tizen.org/privilege/datacontrol.consumer
27126 <Code> function successcb(id)
27128 console.log("ok : reqid "+ id);
27131 function errorcb(id, error)
27133 console.log("error id : " + id + ", error msg : " + error.message);
27138 columns : ["WORD", "WORD_DESC"] ,
27139 values : ["'tizen1'", "'tizen2'"]
27141 // Defines globalReqId before
27142 // Increases globalReqId for uniqueness
27144 globalSQLConsumer.insert(globalReqId, rowData, successcb, errorcb);
27146 console.log (err.name +": " + err.message);
27150 <Type type="void"/>
27152 <Argument name="reqId">
27155 A unique identifier for the current operation.<br/>So a developer should increase <em>reqId </em>value to ensure it is unique for each method.
27158 <Type type="unsigned long"/>
27160 <Argument name="insertionData">
27163 The data on columns and values to insert.
27166 <Type name="RowData"/>
27168 <Argument optional="optional" name="successCallback">
27171 The method to invoke when the asynchronous call completes successfully.
27174 <Type name="DataControlInsertSuccessCallback" nullable="nullable"/>
27176 <Argument optional="optional" name="errorCallback">
27179 The method to invoke when an error occurs.
27182 <Type name="DataControlErrorCallback" nullable="nullable"/>
27186 <RaiseException name="WebAPIException">
27189 with error type TypeMismatchError, if parameter type is not compatible with the expected type for that parameter.
27192 with error type InvalidValuesError, if the passed parameter is not available on data provider side or platform or if an SQL query with invalid parameters has been made.
27195 with error type IOError, if a DB operation has failed.
27198 with error type SecurityError, if the application does not have the privilege to call this method.
27201 with error type UnknownError, if any other error occurs.
27207 <Operation name="update" id="::DataControl::SQLDataControlConsumer::update">
27208 <webidl> void update(unsigned long reqId, <ref>RowData</ref> updateData, DOMString where,
27209 optional <ref>DataControlSuccessCallback</ref>? successCallback,
27210 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
27213 Updates values of a table owned by an SQL-type data control provider.
27222 http://tizen.org/privilege/datacontrol.consumer
27224 <Code> function successcb(id)
27226 console.log("ok : reqid " + id);
27229 function errorcb(id, error)
27231 console.log("error id : " + id + ", error msg : " + error.message);
27236 columns : ["WORD", "WORD_DESC"] ,
27237 values : ["'tizen1'", "'samsung platform!'"]
27239 // Defines globalReqId before
27240 // Increases globalReqId for uniqueness
27242 globalSQLConsumer.update(globalReqId, rowData, "WORD='tizen1'", successcb, errorcb);
27244 console.log (err.name +": " + err.message);
27248 <Type type="void"/>
27250 <Argument name="reqId">
27253 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.
27256 <Type type="unsigned long"/>
27258 <Argument name="updateData">
27261 The data on columns and values to update.
27264 <Type name="RowData"/>
27266 <Argument name="where">
27269 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>.
27272 <Type type="DOMString"/>
27274 <Argument optional="optional" name="successCallback">
27277 The method to invoke when the asynchronous call completes successfully.
27280 <Type name="DataControlSuccessCallback" nullable="nullable"/>
27282 <Argument optional="optional" name="errorCallback">
27285 The method to invoke when an error occurs.
27288 <Type name="DataControlErrorCallback" nullable="nullable"/>
27292 <RaiseException name="WebAPIException">
27295 with error type TypeMismatchError, if parameter type is not compatible with the expected type for that parameter.
27298 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.
27301 with error type IOError, if a DB operation has failed.
27304 with error type SecurityError, if the application does not have the privilege to call this method.
27307 with error type UnknownError, if any other error occurs.
27313 <Operation name="remove" id="::DataControl::SQLDataControlConsumer::remove">
27314 <webidl> void remove(unsigned long reqId, DOMString where,
27315 optional <ref>DataControlSuccessCallback</ref>? successCallback,
27316 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
27319 Delete rows from a table that is owned by an SQL-type data control provider.
27328 http://tizen.org/privilege/datacontrol.consumer
27330 <Code> function successcb(id)
27332 console.log("ok : reqid " + id);
27335 function errorcb(id, error)
27337 console.log("error id : " + id + ", error msg : " + error.message);
27341 // Defines globalReqId before
27342 // Increases globalReqId for uniqueness
27344 globalSQLConsumer.remove(globalReqId, "WORD='tizen1'", successcb, errorcb);
27346 console.log (err.name +": " + err.message);
27350 <Type type="void"/>
27352 <Argument name="reqId">
27355 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.
27358 <Type type="unsigned long"/>
27360 <Argument name="where">
27363 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>.
27366 <Type type="DOMString"/>
27368 <Argument optional="optional" name="successCallback">
27371 The method to invoke when the asynchronous call completes successfully.
27374 <Type name="DataControlSuccessCallback" nullable="nullable"/>
27376 <Argument optional="optional" name="errorCallback">
27379 The method to invoke when an error occurs.
27382 <Type name="DataControlErrorCallback" nullable="nullable"/>
27386 <RaiseException name="WebAPIException">
27389 with error type TypeMismatchError, if parameter type is not compatible with the expected type for that parameter.
27392 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.
27395 with error type IOError, if a DB operation has failed.
27398 with error type SecurityError, if the application does not have the privilege to call this method.
27401 with error type UnknownError, if any other error occurs.
27407 <Operation name="select" id="::DataControl::SQLDataControlConsumer::select">
27408 <webidl> void select(unsigned long reqId, DOMString[] columns, DOMString where,
27409 <ref>DataControlSelectSuccessCallback</ref> successCallback, optional <ref>DataControlErrorCallback</ref>? errorCallback,
27410 optional unsigned long? page, optional unsigned long? maxNumberPerPage) raises(<ref>WebAPIException</ref>);</webidl>
27413 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.
27422 http://tizen.org/privilege/datacontrol.consumer
27424 <Code> function getValueSuccessCB(result, id)
27426 var length = result.length;
27427 for (var i = 0; i < length; i++)
27430 for (j = 0; j < result[i].columns.length; j++)
27432 console.log("column: " + result[i].columns[j] + ", value: " + result[i].values[j]);
27437 function errorcb(id, error)
27439 console.log("error id : " + id + ", error msg : " + error.message);
27443 // Defines globalReqId before
27444 // Increases globalReqId for uniqueness
27445 var array = ["WORD", "WORD_DESC" ];
27447 globalSQLConsumer.select(globalReqId, array, "WORD='tizen1'", getValueSuccessCB, errorcb);
27450 console.log (err.name +": " + err.message);
27456 <Type type="void"/>
27458 <Argument name="reqId">
27461 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.
27464 <Type type="unsigned long"/>
27466 <Argument name="columns">
27469 The columns to select.
27472 <Type type="array">
27473 <Type type="DOMString"/>
27476 <Argument name="where">
27479 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>.
27482 <Type type="DOMString"/>
27484 <Argument name="successCallback">
27487 The method to invoke when the asynchronous call completes successfully.
27490 <Type name="DataControlSelectSuccessCallback"/>
27492 <Argument optional="optional" name="errorCallback">
27495 The method to invoke when an error occurs.
27498 <Type name="DataControlErrorCallback" nullable="nullable"/>
27500 <Argument optional="optional" name="page">
27503 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.
27506 <Type type="unsigned long" nullable="nullable"/>
27508 <Argument optional="optional" name="maxNumberPerPage">
27511 The maximum number of rows on a page.
27514 <Type type="unsigned long" nullable="nullable"/>
27518 <RaiseException name="WebAPIException">
27521 with error type TypeMismatchError, if parameter type is not compatible with the expected type for that parameter.
27524 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.
27527 with error type IOError, if a DB operation has failed.
27530 with error type SecurityError, if the application does not have the privilege to call this method.
27533 with error type UnknownError, if any other error occurs.
27540 <Interface name="MappedDataControlConsumer" id="::DataControl::MappedDataControlConsumer">
27541 <webidl> [NoInterfaceObject] interface MappedDataControlConsumer : <ref>DataControlConsumerObject</ref> {
27542 void addValue(unsigned long reqId, DOMString key, DOMString value,
27543 optional <ref>DataControlSuccessCallback</ref>? successCallback,
27544 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
27546 void removeValue(unsigned long reqId, DOMString key, DOMString value,
27547 <ref>DataControlSuccessCallback</ref> successCallback,
27548 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
27550 void getValue(unsigned long reqId, DOMString key,
27551 <ref>DataControlGetValueSuccessCallback</ref> successCallback,
27552 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
27554 void updateValue(unsigned long reqId, DOMString key, DOMString oldValue, DOMString newValue,
27555 <ref>DataControlSuccessCallback</ref> successCallback,
27556 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
27560 This interface defines MAP data type operators.
27566 <ExtendedAttributeList>
27567 <ExtendedAttribute name="NoInterfaceObject">
27568 <webidl>NoInterfaceObject</webidl>
27569 </ExtendedAttribute>
27570 </ExtendedAttributeList>
27571 <InterfaceInheritance>
27572 <Name name="DataControlConsumerObject"/>
27573 </InterfaceInheritance>
27574 <Operation name="addValue" id="::DataControl::MappedDataControlConsumer::addValue">
27575 <webidl> void addValue(unsigned long reqId, DOMString key, DOMString value,
27576 optional <ref>DataControlSuccessCallback</ref>? successCallback,
27577 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
27580 Adds the value associated with the specified key to a key-values map owned by MAP-type data control provider.
27589 http://tizen.org/privilege/datacontrol.consumer
27592 function successcb(id)
27594 console.log("ok : reqid " + id);
27597 function errorcb(id, error)
27599 console.log("error id : " + id + ", error msg : " + error.message);
27603 // Defines globalReqId before
27604 // Increases globalReqId for uniqueness
27606 globalMappedConsumer.addValue(globalReqId, "tizen", "samsung", successcb, errorcb);
27608 console.log (err.name +": " + err.message);
27612 <Type type="void"/>
27614 <Argument name="reqId">
27617 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.
27620 <Type type="unsigned long"/>
27622 <Argument name="key">
27625 The key to search a mapped data.
27628 <Type type="DOMString"/>
27630 <Argument name="value">
27633 The value to add into values array mapped by the key.
27636 <Type type="DOMString"/>
27638 <Argument optional="optional" name="successCallback">
27641 The method to invoke when the asynchronous call completes successfully.
27644 <Type name="DataControlSuccessCallback" nullable="nullable"/>
27646 <Argument optional="optional" name="errorCallback">
27649 The method to invoke when an error occurs.
27652 <Type name="DataControlErrorCallback" nullable="nullable"/>
27656 <RaiseException name="WebAPIException">
27659 with error type TypeMismatchError, if parameter type is not compatible with the expected type for that parameter.
27662 with error type InvalidValuesError, if the passed parameter is not available on data provider side or platform.
27665 with error type IOError, if a DB operation has failed.
27668 with error type SecurityError, if the application does not have the privilege to call this method.
27671 with error type UnknownError, if any other error occurs.
27677 <Operation name="removeValue" id="::DataControl::MappedDataControlConsumer::removeValue">
27678 <webidl> void removeValue(unsigned long reqId, DOMString key, DOMString value,
27679 <ref>DataControlSuccessCallback</ref> successCallback,
27680 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
27683 Removes the value associated with the specified key from a key-values map owned by MAP-type data control provider.
27692 http://tizen.org/privilege/datacontrol.consumer
27694 <Code> function successcb(id)
27696 console.log("ok : reqid " + id);
27699 function errorcb(id, error)
27701 console.log("error id : " + id + ", error msg : " + error.message);
27706 // Defines globalReqId before
27707 // Increases globalReqId for uniqueness
27709 globalMappedConsumer.removeValue(globalReqId, "tizen", "intel", successcb, errorcb);
27711 console.log (err.name +": " + err.message);
27715 <Type type="void"/>
27717 <Argument name="reqId">
27720 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.
27723 <Type type="unsigned long"/>
27725 <Argument name="key">
27728 The key to search a mapped data.
27731 <Type type="DOMString"/>
27733 <Argument name="value">
27736 The value to remove from a values array mapped by the key.
27739 <Type type="DOMString"/>
27741 <Argument name="successCallback">
27744 The method to invoke when the asynchronous call completes successfully.
27747 <Type name="DataControlSuccessCallback"/>
27749 <Argument optional="optional" name="errorCallback">
27752 The method to invoke when an error occurs.
27755 <Type name="DataControlErrorCallback" nullable="nullable"/>
27759 <RaiseException name="WebAPIException">
27762 with error type TypeMismatchError, if parameter type is not compatible with the expected type for that parameter.
27765 with error type InvalidValuesError, if the passed parameter is not available in data provider side or platform.
27768 with error type IOError, if a DB operation has failed.
27771 with error type NotFoundError, if the key cannot be found.
27774 with error type SecurityError, if the application does not have the privilege to call this method.
27777 with error type UnknownError, if any other error occurs.
27783 <Operation name="getValue" id="::DataControl::MappedDataControlConsumer::getValue">
27784 <webidl> void getValue(unsigned long reqId, DOMString key,
27785 <ref>DataControlGetValueSuccessCallback</ref> successCallback,
27786 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
27789 Gets value associated with the specified key, from a key-values map owned by MAP-type data control provider.
27798 http://tizen.org/privilege/datacontrol.consumer
27800 <Code> function getValueSuccessCB(result, id)
27802 console.log(result.length + ":" + result[0]);
27805 function errorcb(id, error)
27807 console.log("error id : " + id + ", error msg : " + error.message);
27811 // Defines globalReqId before
27812 // Increases globalReqId for uniqueness
27814 globalMappedConsumer.getValue(globalReqId, "tizen", getValueSuccessCB, errorcb);
27816 console.log (err.name +": " + err.message);
27820 <Type type="void"/>
27822 <Argument name="reqId">
27825 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.
27828 <Type type="unsigned long"/>
27830 <Argument name="key">
27833 The key to search a mapped data.
27836 <Type type="DOMString"/>
27838 <Argument name="successCallback">
27841 The method to invoke when the asynchronous call completes successfully.
27844 <Type name="DataControlGetValueSuccessCallback"/>
27846 <Argument optional="optional" name="errorCallback">
27849 The method to invoke when an error occurs.
27852 <Type name="DataControlErrorCallback" nullable="nullable"/>
27856 <RaiseException name="WebAPIException">
27859 with error type TypeMismatchError, if parameter type is not compatible with the expected type for that parameter.
27862 with error type InvalidValuesError, if the passed parameter is not available on data provider side or platform.
27865 with error type IOError, if a DB operation has failed.
27868 with error type NotFoundError, if the key cannot be found.
27871 with error type SecurityError, if the application does not have the privilege to call this method.
27874 with error type UnknownError, if any other error occurs.
27880 <Operation name="updateValue" id="::DataControl::MappedDataControlConsumer::updateValue">
27881 <webidl> void updateValue(unsigned long reqId, DOMString key, DOMString oldValue, DOMString newValue,
27882 <ref>DataControlSuccessCallback</ref> successCallback,
27883 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
27886 Sets the value associated with the specified key with a new value.
27895 http://tizen.org/privilege/datacontrol.consumer
27898 function successcb(id)
27900 console.log("ok : reqid " + id);
27903 function errorcb(id, error)
27905 console.log("error id : " + id + ", error msg : " + error.message);
27909 // Defines globalReqId before
27910 // Increases globalReqId for uniqueness
27912 globalMappedConsumer.updateValue(globalReqId, "tizen", "samsung", "intel", successcb, errorcb);
27914 console.log (err.name +": " + err.message);
27918 <Type type="void"/>
27920 <Argument name="reqId">
27923 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.
27926 <Type type="unsigned long"/>
27928 <Argument name="key">
27931 The key to search a mapped data.
27934 <Type type="DOMString"/>
27936 <Argument name="oldValue">
27939 The value to update in values array mapped by the key.
27942 <Type type="DOMString"/>
27944 <Argument name="newValue">
27947 The new value to replace in values array mapped by the key.
27950 <Type type="DOMString"/>
27952 <Argument name="successCallback">
27955 The method to invoke when the asynchronous call completes successfully.
27958 <Type name="DataControlSuccessCallback"/>
27960 <Argument optional="optional" name="errorCallback">
27963 The method to invoke when an error occurs.
27966 <Type name="DataControlErrorCallback" nullable="nullable"/>
27970 <RaiseException name="WebAPIException">
27973 with error type TypeMismatchError, if parameter type is not compatible with the expected type for that parameter.
27976 with error type InvalidValuesError, if the passed parameter is not available on data provider side or platform.
27979 with error type IOError, if a DB operation has failed.
27982 with error type NotFoundError, if the key cannot be found.
27985 with error type SecurityError, if the application does not have the privilege to call this method.
27988 with error type UnknownError, if any other error occurs.
27995 <Interface name="DataControlSuccessCallback" id="::DataControl::DataControlSuccessCallback">
27996 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface DataControlSuccessCallback {
27997 void onsuccess(unsigned long reqId);
28001 This interface provides a SuccessCallback for DataControlConsumerObject.
28007 <ExtendedAttributeList>
28008 <ExtendedAttribute name="Callback" value="FunctionOnly">
28009 <webidl>Callback</webidl>
28010 </ExtendedAttribute>
28011 <ExtendedAttribute name="NoInterfaceObject">
28012 <webidl> NoInterfaceObject</webidl>
28013 </ExtendedAttribute>
28014 </ExtendedAttributeList>
28015 <Operation name="onsuccess" id="::DataControl::DataControlSuccessCallback::onsuccess">
28016 <webidl> void onsuccess(unsigned long reqId);</webidl>
28017 <Type type="void"/>
28019 <Argument name="reqId">
28020 <Type type="unsigned long"/>
28025 <Interface name="DataControlErrorCallback" id="::DataControl::DataControlErrorCallback">
28026 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface DataControlErrorCallback {
28027 void onerror(unsigned long reqId, <ref>WebAPIError</ref> error);
28031 This interface provides a ErrorCallback for DataControlConsumerObject.
28037 <ExtendedAttributeList>
28038 <ExtendedAttribute name="Callback" value="FunctionOnly">
28039 <webidl>Callback</webidl>
28040 </ExtendedAttribute>
28041 <ExtendedAttribute name="NoInterfaceObject">
28042 <webidl> NoInterfaceObject</webidl>
28043 </ExtendedAttribute>
28044 </ExtendedAttributeList>
28045 <Operation name="onerror" id="::DataControl::DataControlErrorCallback::onerror">
28046 <webidl> void onerror(unsigned long reqId, <ref>WebAPIError</ref> error);</webidl>
28047 <Type type="void"/>
28049 <Argument name="reqId">
28050 <Type type="unsigned long"/>
28052 <Argument name="error">
28053 <Type name="WebAPIError"/>
28058 <Interface name="DataControlInsertSuccessCallback" id="::DataControl::DataControlInsertSuccessCallback">
28059 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface DataControlInsertSuccessCallback {
28060 void onsuccess(unsigned long reqId, long insertRowId);
28064 This interface provides a SuccessCallback for SQLDataControlConsumer.insert().
28070 <ExtendedAttributeList>
28071 <ExtendedAttribute name="Callback" value="FunctionOnly">
28072 <webidl>Callback</webidl>
28073 </ExtendedAttribute>
28074 <ExtendedAttribute name="NoInterfaceObject">
28075 <webidl> NoInterfaceObject</webidl>
28076 </ExtendedAttribute>
28077 </ExtendedAttributeList>
28078 <Operation name="onsuccess" id="::DataControl::DataControlInsertSuccessCallback::onsuccess">
28079 <webidl> void onsuccess(unsigned long reqId, long insertRowId);</webidl>
28088 <Type type="void"/>
28090 <Argument name="reqId">
28093 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.
28096 <Type type="unsigned long"/>
28098 <Argument name="insertRowId">
28101 The inserted row ID set by the data control provider if the specified providerResult is <var>true</var>, else <var>-1</var>.
28104 <Type type="long"/>
28109 <Interface name="DataControlSelectSuccessCallback" id="::DataControl::DataControlSelectSuccessCallback">
28110 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface DataControlSelectSuccessCallback {
28111 void onsuccess(<ref>RowData</ref>[] rows, unsigned long reqId);
28115 This interface provides a SuccessCallback for SQLDataControlConsumer.select().
28121 <ExtendedAttributeList>
28122 <ExtendedAttribute name="Callback" value="FunctionOnly">
28123 <webidl>Callback</webidl>
28124 </ExtendedAttribute>
28125 <ExtendedAttribute name="NoInterfaceObject">
28126 <webidl> NoInterfaceObject</webidl>
28127 </ExtendedAttribute>
28128 </ExtendedAttributeList>
28129 <Operation name="onsuccess" id="::DataControl::DataControlSelectSuccessCallback::onsuccess">
28130 <webidl> void onsuccess(<ref>RowData</ref>[] rows, unsigned long reqId);</webidl>
28139 <Type type="void"/>
28141 <Argument name="rows">
28144 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>.
28147 <Type type="array">
28148 <Type name="RowData"/>
28151 <Argument name="reqId">
28154 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.
28157 <Type type="unsigned long"/>
28162 <Interface name="DataControlGetValueSuccessCallback" id="::DataControl::DataControlGetValueSuccessCallback">
28163 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface DataControlGetValueSuccessCallback {
28164 void onsuccess(DOMString[] values, unsigned long reqid);
28168 This interface provides a SuccessCallback for MapDataControlConsumer.getValue().
28174 <ExtendedAttributeList>
28175 <ExtendedAttribute name="Callback" value="FunctionOnly">
28176 <webidl>Callback</webidl>
28177 </ExtendedAttribute>
28178 <ExtendedAttribute name="NoInterfaceObject">
28179 <webidl> NoInterfaceObject</webidl>
28180 </ExtendedAttribute>
28181 </ExtendedAttributeList>
28182 <Operation name="onsuccess" id="::DataControl::DataControlGetValueSuccessCallback::onsuccess">
28183 <webidl> void onsuccess(DOMString[] values, unsigned long reqid);</webidl>
28184 <Type type="void"/>
28186 <Argument name="values">
28187 <Type type="array">
28188 <Type type="DOMString"/>
28191 <Argument name="reqid">
28192 <Type type="unsigned long"/>
28197 <Dictionary name="RowData" id="::DataControl::RowData">
28198 <webidl> dictionary RowData {
28199 DOMString[] columns;
28200 DOMString[] values;
28204 The dictionary represents RowData holding 1 row of SQL selection results from another application.
28210 <DictionaryMember name="columns" id="::DataControl::RowData::columns">
28211 <webidl> DOMString[] columns;</webidl>
28214 An attribute to hold column names to select, update, and insert.
28220 <Type type="array">
28221 <Type type="DOMString"/>
28223 </DictionaryMember>
28224 <DictionaryMember name="values" id="::DataControl::RowData::values">
28225 <webidl> DOMString[] values;</webidl>
28228 An attribute to hold values of columns to select, update, and insert.
28234 <Type type="array">
28235 <Type type="DOMString"/>
28237 </DictionaryMember>
28240 <Module name="DataSynchronization" id="::DataSynchronization">
28241 <webidl>module DataSynchronization {
28243 typedef DOMString SyncProfileId;
28245 enum SyncMode { "MANUAL", "PERIODIC", "PUSH" };
28247 enum SyncType { "TWO_WAY", "SLOW", "ONE_WAY_FROM_CLIENT", "REFRESH_FROM_CLIENT", "ONE_WAY_FROM_SERVER", "REFRESH_FROM_SERVER" };
28249 enum SyncInterval { "5_MINUTES", "15_MINUTES", "1_HOUR", "4_HOURS", "12_HOURS", "1_DAY", "1_WEEK", "1_MONTH" };
28251 enum SyncServiceType { "CONTACT", "EVENT" };
28253 enum SyncStatus { "SUCCESS", "FAIL", "STOP", "NONE" };
28255 [NoInterfaceObject] interface DataSynchronizationManagerObject {
28256 readonly attribute <ref>DataSynchronizationManager</ref> datasync;
28259 <ref>Tizen</ref> implements <ref>DataSynchronizationManagerObject</ref>;
28261 [Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode),
28262 Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode, <ref>SyncType</ref> type),
28263 Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode, <ref>SyncInterval</ref> interval)]
28264 interface SyncInfo {
28265 attribute DOMString url;
28267 attribute DOMString id;
28269 attribute DOMString password;
28271 attribute <ref>SyncMode</ref> mode;
28273 attribute <ref>SyncType</ref>? type;
28275 attribute <ref>SyncInterval</ref>? interval;
28278 [Constructor(boolean enable, <ref>SyncServiceType</ref> serviceType, DOMString serverDatabaseUri, optional DOMString? id, optional DOMString? password)]
28279 interface SyncServiceInfo {
28280 attribute boolean enable;
28282 attribute <ref>SyncServiceType</ref> serviceType;
28284 attribute DOMString serverDatabaseUri;
28286 attribute DOMString? id;
28288 attribute DOMString? password;
28291 [Constructor(DOMString profileName, <ref>SyncInfo</ref> syncInfo, optional <ref>SyncServiceInfo</ref>[]? serviceInfo)]
28292 interface SyncProfileInfo {
28293 readonly attribute <ref>SyncProfileId</ref> profileId;
28295 attribute DOMString profileName;
28297 attribute <ref>SyncInfo</ref> syncInfo;
28299 attribute <ref>SyncServiceInfo</ref>[]? serviceInfo;
28302 [NoInterfaceObject] interface SyncStatistics {
28303 readonly attribute <ref>SyncStatus</ref> syncStatus;
28305 readonly attribute <ref>SyncServiceType</ref> serviceType;
28307 readonly attribute Date lastSyncTime;
28309 readonly attribute unsigned long serverToClientTotal;
28311 readonly attribute unsigned long serverToClientAdded;
28313 readonly attribute unsigned long serverToClientUpdated;
28315 readonly attribute unsigned long serverToClientRemoved;
28317 readonly attribute unsigned long clientToServerTotal;
28319 readonly attribute unsigned long clientToServerAdded;
28321 readonly attribute unsigned long clientToServerUpdated;
28323 readonly attribute unsigned long clientToServerRemoved;
28326 [NoInterfaceObject] interface DataSynchronizationManager {
28327 void add(<ref>SyncProfileInfo</ref> profile) raises(<ref>WebAPIException</ref>);
28329 void update(<ref>SyncProfileInfo</ref> profile) raises(<ref>WebAPIException</ref>);
28331 void remove(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);
28333 long getMaxProfilesNum() raises(<ref>WebAPIException</ref>);
28335 unsigned long getProfilesNum() raises(<ref>WebAPIException</ref>);
28337 <ref>SyncProfileInfo</ref> get(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);
28339 <ref>SyncProfileInfo</ref>[] getAll() raises(<ref>WebAPIException</ref>);
28341 void startSync(<ref>SyncProfileId</ref> profileId, optional <ref>SyncProgressCallback</ref>? progressCallback) raises(<ref>WebAPIException</ref>);
28343 void stopSync(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);
28345 <ref>SyncStatistics</ref>[] getLastSyncStatistics(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);
28348 [Callback, NoInterfaceObject] interface SyncProgressCallback {
28349 void onprogress(<ref>SyncProfileId</ref> profileId, <ref>SyncServiceType</ref> serviceType, boolean isFromServer, unsigned long totalPerService, unsigned long syncedPerService);
28351 void oncompleted(<ref>SyncProfileId</ref> profileId);
28353 void onstopped(<ref>SyncProfileId</ref> profileId);
28355 void onfailed(<ref>SyncProfileId</ref> profileId, <ref>WebAPIError</ref> error);
28360 This API provides methods to synchronize contact and event data to the server using the OMA DS 1.2 protocol.
28361 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>.
28367 <Typedef name="SyncProfileId" id="::DataSynchronization::SyncProfileId">
28368 <webidl> typedef DOMString SyncProfileId;</webidl>
28371 An attribute to uniquely identify a sync profile.
28377 <Type type="DOMString"/>
28379 <Enum name="SyncMode" id="::DataSynchronization::SyncMode">
28380 <webidl> enum SyncMode { "MANUAL", "PERIODIC", "PUSH" };</webidl>
28383 An enumerator that indicates the supported synchronization modes.
28387 The following values are supported:
28391 MANUAL - Indicates that the synchronization starts by manual trigger. The sync type should be specified. The default value is <em>TWO_WAY</em>. </li>
28393 PERIODIC - Indicates that the synchronization starts automatically by a preset period. The sync interval should be provided. </li>
28395 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>
28402 <EnumValue stringvalue="MANUAL">
28403 <webidl> "MANUAL</webidl>
28405 <EnumValue stringvalue="PERIODIC">
28406 <webidl> "PERIODIC</webidl>
28408 <EnumValue stringvalue="PUSH">
28409 <webidl> "PUSH</webidl>
28412 <Enum name="SyncType" id="::DataSynchronization::SyncType">
28413 <webidl> enum SyncType { "TWO_WAY", "SLOW", "ONE_WAY_FROM_CLIENT", "REFRESH_FROM_CLIENT", "ONE_WAY_FROM_SERVER", "REFRESH_FROM_SERVER" };</webidl>
28416 An enumerator that indicates the supported synchronization types.
28420 The following values are supported:
28424 TWO_WAY - Indicates a normal sync type in which the client and the server exchange information about modified data in these devices. </li>
28426 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>
28428 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>
28430 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>
28432 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>
28434 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>
28441 <EnumValue stringvalue="TWO_WAY">
28442 <webidl> "TWO_WAY</webidl>
28444 <EnumValue stringvalue="SLOW">
28445 <webidl> "SLOW</webidl>
28447 <EnumValue stringvalue="ONE_WAY_FROM_CLIENT">
28448 <webidl> "ONE_WAY_FROM_CLIENT</webidl>
28450 <EnumValue stringvalue="REFRESH_FROM_CLIENT">
28451 <webidl> "REFRESH_FROM_CLIENT</webidl>
28453 <EnumValue stringvalue="ONE_WAY_FROM_SERVER">
28454 <webidl> "ONE_WAY_FROM_SERVER</webidl>
28456 <EnumValue stringvalue="REFRESH_FROM_SERVER">
28457 <webidl> "REFRESH_FROM_SERVER</webidl>
28460 <Enum name="SyncInterval" id="::DataSynchronization::SyncInterval">
28461 <webidl> enum SyncInterval { "5_MINUTES", "15_MINUTES", "1_HOUR", "4_HOURS", "12_HOURS", "1_DAY", "1_WEEK", "1_MONTH" };</webidl>
28464 An enumerator that indicates the supported synchronization intervals.
28468 The following values are supported:
28472 5_MINUTES - Indicates a time period of 5 minutes. </li>
28474 15_MINUTES - Indicates a time period of 15 minutes. </li>
28476 1_HOUR - Indicates a time period of 1 hour. </li>
28478 4_HOURS - Indicates a time period of 4 hours. </li>
28480 12_HOURS - Indicates a time period of 12 hours. </li>
28482 1_DAY - Indicates a time period of 1 day. </li>
28484 1_WEEK - Indicates a time period of 1 week. </li>
28486 1_MONTH - Indicates a time period of 1 month. </li>
28493 <EnumValue stringvalue="5_MINUTES">
28494 <webidl> "5_MINUTES</webidl>
28496 <EnumValue stringvalue="15_MINUTES">
28497 <webidl> "15_MINUTES</webidl>
28499 <EnumValue stringvalue="1_HOUR">
28500 <webidl> "1_HOUR</webidl>
28502 <EnumValue stringvalue="4_HOURS">
28503 <webidl> "4_HOURS</webidl>
28505 <EnumValue stringvalue="12_HOURS">
28506 <webidl> "12_HOURS</webidl>
28508 <EnumValue stringvalue="1_DAY">
28509 <webidl> "1_DAY</webidl>
28511 <EnumValue stringvalue="1_WEEK">
28512 <webidl> "1_WEEK</webidl>
28514 <EnumValue stringvalue="1_MONTH">
28515 <webidl> "1_MONTH</webidl>
28518 <Enum name="SyncServiceType" id="::DataSynchronization::SyncServiceType">
28519 <webidl> enum SyncServiceType { "CONTACT", "EVENT" };</webidl>
28522 An enumerator that indicates the supported synchronization service type of the device.
28526 The following values are supported:
28530 CONTACT - Indicates the device contact records. </li>
28532 EVENT - Indicates the device calendar event records. </li>
28539 <EnumValue stringvalue="CONTACT">
28540 <webidl> "CONTACT</webidl>
28542 <EnumValue stringvalue="EVENT">
28543 <webidl> "EVENT</webidl>
28546 <Enum name="SyncStatus" id="::DataSynchronization::SyncStatus">
28547 <webidl> enum SyncStatus { "SUCCESS", "FAIL", "STOP", "NONE" };</webidl>
28550 An enumerator that indicates the last sync statuses.
28554 The following values are supported:
28558 SUCCESS - Indicates the sync is successful. </li>
28560 FAIL - Indicates the sync has failed. </li>
28562 STOP - Indicates the sync has been stopped by user's action. </li>
28564 NONE - Indicates the sync was never performed. </li>
28571 <EnumValue stringvalue="SUCCESS">
28572 <webidl> "SUCCESS</webidl>
28574 <EnumValue stringvalue="FAIL">
28575 <webidl> "FAIL</webidl>
28577 <EnumValue stringvalue="STOP">
28578 <webidl> "STOP</webidl>
28580 <EnumValue stringvalue="NONE">
28581 <webidl> "NONE</webidl>
28584 <Interface name="DataSynchronizationManagerObject" id="::DataSynchronization::DataSynchronizationManagerObject">
28585 <webidl> [NoInterfaceObject] interface DataSynchronizationManagerObject {
28586 readonly attribute <ref>DataSynchronizationManager</ref> datasync;
28590 This interface defines the default data synchronization manager that is instantiated by the <em>Tizen </em>object.
28591 There will be a <em>tizen.datasync</em> object that allows access to the functionality of the DataSynchronization API.
28597 <ExtendedAttributeList>
28598 <ExtendedAttribute name="NoInterfaceObject">
28599 <webidl>NoInterfaceObject</webidl>
28600 </ExtendedAttribute>
28601 </ExtendedAttributeList>
28602 <Attribute readonly="readonly" name="datasync" id="::DataSynchronization::DataSynchronizationManagerObject::datasync">
28603 <webidl> readonly attribute <ref>DataSynchronizationManager</ref> datasync;</webidl>
28604 <Type name="DataSynchronizationManager"/>
28607 <Implements name1="Tizen" name2="DataSynchronizationManagerObject">
28608 <webidl> <ref>Tizen</ref> implements <ref>DataSynchronizationManagerObject</ref>;</webidl>
28610 <Interface name="SyncInfo" id="::DataSynchronization::SyncInfo">
28611 <webidl> [Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode),
28612 Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode, <ref>SyncType</ref> type),
28613 Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode, <ref>SyncInterval</ref> interval)]
28614 interface SyncInfo {
28615 attribute DOMString url;
28617 attribute DOMString id;
28619 attribute DOMString password;
28621 attribute <ref>SyncMode</ref> mode;
28623 attribute <ref>SyncType</ref>? type;
28625 attribute <ref>SyncInterval</ref>? interval;
28629 This interface defines the sync information.
28635 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.
28638 <ExtendedAttributeList>
28639 <ExtendedAttribute name="Constructor">
28640 <webidl>Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode)</webidl>
28642 <Argument name="url">
28643 <Type type="DOMString"/>
28645 <Argument name="id">
28646 <Type type="DOMString"/>
28648 <Argument name="password">
28649 <Type type="DOMString"/>
28651 <Argument name="mode">
28652 <Type name="SyncMode"/>
28655 </ExtendedAttribute>
28656 <ExtendedAttribute name="Constructor">
28657 <webidl> Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode, <ref>SyncType</ref> type)</webidl>
28659 <Argument name="url">
28660 <Type type="DOMString"/>
28662 <Argument name="id">
28663 <Type type="DOMString"/>
28665 <Argument name="password">
28666 <Type type="DOMString"/>
28668 <Argument name="mode">
28669 <Type name="SyncMode"/>
28671 <Argument name="type">
28672 <Type name="SyncType"/>
28675 </ExtendedAttribute>
28676 <ExtendedAttribute name="Constructor">
28677 <webidl> Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode, <ref>SyncInterval</ref> interval)</webidl>
28679 <Argument name="url">
28680 <Type type="DOMString"/>
28682 <Argument name="id">
28683 <Type type="DOMString"/>
28685 <Argument name="password">
28686 <Type type="DOMString"/>
28688 <Argument name="mode">
28689 <Type name="SyncMode"/>
28691 <Argument name="interval">
28692 <Type name="SyncInterval"/>
28695 </ExtendedAttribute>
28696 </ExtendedAttributeList>
28697 <Attribute name="url" id="::DataSynchronization::SyncInfo::url">
28698 <webidl> attribute DOMString url;</webidl>
28701 An attribute to store the URL of the sync server.
28707 <Type type="DOMString"/>
28709 <Attribute name="id" id="::DataSynchronization::SyncInfo::id">
28710 <webidl> attribute DOMString id;</webidl>
28713 An attribute to store the login ID for the sync server.
28717 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.
28724 <Type type="DOMString"/>
28726 <Attribute name="password" id="::DataSynchronization::SyncInfo::password">
28727 <webidl> attribute DOMString password;</webidl>
28730 An attribute to store the login password to the sync server.
28734 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.
28741 <Type type="DOMString"/>
28743 <Attribute name="mode" id="::DataSynchronization::SyncInfo::mode">
28744 <webidl> attribute <ref>SyncMode</ref> mode;</webidl>
28747 An attribute to store the sync mode.
28753 <Type name="SyncMode"/>
28755 <Attribute name="type" id="::DataSynchronization::SyncInfo::type">
28756 <webidl> attribute <ref>SyncType</ref>? type;</webidl>
28759 An attribute to store the sync type.
28763 This attribute is used when the sync mode is set to <em>MANUAL</em> option.
28770 <Type name="SyncType" nullable="nullable"/>
28772 <Attribute name="interval" id="::DataSynchronization::SyncInfo::interval">
28773 <webidl> attribute <ref>SyncInterval</ref>? interval;</webidl>
28776 An attribute to store the sync interval.
28780 This attribute is used when the sync mode is set to <em>PERIODIC</em> option.
28787 <Type name="SyncInterval" nullable="nullable"/>
28790 <Interface name="SyncServiceInfo" id="::DataSynchronization::SyncServiceInfo">
28791 <webidl> [Constructor(boolean enable, <ref>SyncServiceType</ref> serviceType, DOMString serverDatabaseUri, optional DOMString? id, optional DOMString? password)]
28792 interface SyncServiceInfo {
28793 attribute boolean enable;
28795 attribute <ref>SyncServiceType</ref> serviceType;
28797 attribute DOMString serverDatabaseUri;
28799 attribute DOMString? id;
28801 attribute DOMString? password;
28805 This interface defines the sync service information.
28811 <ExtendedAttributeList>
28812 <ExtendedAttribute name="Constructor">
28813 <webidl>Constructor(boolean enable, <ref>SyncServiceType</ref> serviceType, DOMString serverDatabaseUri, optional DOMString? id, optional DOMString? password)</webidl>
28815 <Argument name="enable">
28816 <Type type="boolean"/>
28818 <Argument name="serviceType">
28819 <Type name="SyncServiceType"/>
28821 <Argument name="serverDatabaseUri">
28822 <Type type="DOMString"/>
28824 <Argument optional="optional" name="id">
28825 <Type type="DOMString" nullable="nullable"/>
28827 <Argument optional="optional" name="password">
28828 <Type type="DOMString" nullable="nullable"/>
28831 </ExtendedAttribute>
28832 </ExtendedAttributeList>
28833 <Attribute name="enable" id="::DataSynchronization::SyncServiceInfo::enable">
28834 <webidl> attribute boolean enable;</webidl>
28837 An attribute to enable or disable a service category for sync.
28843 <Type type="boolean"/>
28845 <Attribute name="serviceType" id="::DataSynchronization::SyncServiceInfo::serviceType">
28846 <webidl> attribute <ref>SyncServiceType</ref> serviceType;</webidl>
28849 An attribute to indicate the sync service type.
28855 <Type name="SyncServiceType"/>
28857 <Attribute name="serverDatabaseUri" id="::DataSynchronization::SyncServiceInfo::serverDatabaseUri">
28858 <webidl> attribute DOMString serverDatabaseUri;</webidl>
28861 An attribute to store the sync service DB URI of the server.
28867 <Type type="DOMString"/>
28869 <Attribute name="id" id="::DataSynchronization::SyncServiceInfo::id">
28870 <webidl> attribute DOMString? id;</webidl>
28873 An attribute to store the sync service DB access ID to the server.
28877 This is used only when the server requires a separate access right to each DB.
28878 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.
28885 <Type type="DOMString" nullable="nullable"/>
28887 <Attribute name="password" id="::DataSynchronization::SyncServiceInfo::password">
28888 <webidl> attribute DOMString? password;</webidl>
28891 An attribute to store the sync service DB access password to the server.
28895 This is used only when the server requires a separate access right to each DB.
28896 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.
28903 <Type type="DOMString" nullable="nullable"/>
28906 <Interface name="SyncProfileInfo" id="::DataSynchronization::SyncProfileInfo">
28907 <webidl> [Constructor(DOMString profileName, <ref>SyncInfo</ref> syncInfo, optional <ref>SyncServiceInfo</ref>[]? serviceInfo)]
28908 interface SyncProfileInfo {
28909 readonly attribute <ref>SyncProfileId</ref> profileId;
28911 attribute DOMString profileName;
28913 attribute <ref>SyncInfo</ref> syncInfo;
28915 attribute <ref>SyncServiceInfo</ref>[]? serviceInfo;
28919 This interface defines the sync profile information, based on which the synchronization is performed.
28925 <ExtendedAttributeList>
28926 <ExtendedAttribute name="Constructor">
28927 <webidl>Constructor(DOMString profileName, <ref>SyncInfo</ref> syncInfo, optional <ref>SyncServiceInfo</ref>[]? serviceInfo)</webidl>
28929 <Argument name="profileName">
28930 <Type type="DOMString"/>
28932 <Argument name="syncInfo">
28933 <Type name="SyncInfo"/>
28935 <Argument optional="optional" name="serviceInfo">
28936 <Type type="array" nullable="nullable">
28937 <Type name="SyncServiceInfo"/>
28941 </ExtendedAttribute>
28942 </ExtendedAttributeList>
28943 <Attribute readonly="readonly" name="profileId" id="::DataSynchronization::SyncProfileInfo::profileId">
28944 <webidl> readonly attribute <ref>SyncProfileId</ref> profileId;</webidl>
28947 An attribute to store the unique identifier provided by the platform for a profile that has been successfully added.
28953 <Type name="SyncProfileId"/>
28955 <Attribute name="profileName" id="::DataSynchronization::SyncProfileInfo::profileName">
28956 <webidl> attribute DOMString profileName;</webidl>
28959 An attribute to store the profile name.
28965 <Type type="DOMString"/>
28967 <Attribute name="syncInfo" id="::DataSynchronization::SyncProfileInfo::syncInfo">
28968 <webidl> attribute <ref>SyncInfo</ref> syncInfo;</webidl>
28971 An attribute to store the sync info.
28977 <Type name="SyncInfo"/>
28979 <Attribute name="serviceInfo" id="::DataSynchronization::SyncProfileInfo::serviceInfo">
28980 <webidl> attribute <ref>SyncServiceInfo</ref>[]? serviceInfo;</webidl>
28983 An attribute to indicate the service info.
28989 <Type type="array" nullable="nullable">
28990 <Type name="SyncServiceInfo"/>
28994 <Interface name="SyncStatistics" id="::DataSynchronization::SyncStatistics">
28995 <webidl> [NoInterfaceObject] interface SyncStatistics {
28996 readonly attribute <ref>SyncStatus</ref> syncStatus;
28998 readonly attribute <ref>SyncServiceType</ref> serviceType;
29000 readonly attribute Date lastSyncTime;
29002 readonly attribute unsigned long serverToClientTotal;
29004 readonly attribute unsigned long serverToClientAdded;
29006 readonly attribute unsigned long serverToClientUpdated;
29008 readonly attribute unsigned long serverToClientRemoved;
29010 readonly attribute unsigned long clientToServerTotal;
29012 readonly attribute unsigned long clientToServerAdded;
29014 readonly attribute unsigned long clientToServerUpdated;
29016 readonly attribute unsigned long clientToServerRemoved;
29020 This interface defines the sync statistics for a profile service.
29026 <ExtendedAttributeList>
29027 <ExtendedAttribute name="NoInterfaceObject">
29028 <webidl>NoInterfaceObject</webidl>
29029 </ExtendedAttribute>
29030 </ExtendedAttributeList>
29031 <Attribute readonly="readonly" name="syncStatus" id="::DataSynchronization::SyncStatistics::syncStatus">
29032 <webidl> readonly attribute <ref>SyncStatus</ref> syncStatus;</webidl>
29035 An attribute to store the last sync status for a corresponding service category.
29041 <Type name="SyncStatus"/>
29043 <Attribute readonly="readonly" name="serviceType" id="::DataSynchronization::SyncStatistics::serviceType">
29044 <webidl> readonly attribute <ref>SyncServiceType</ref> serviceType;</webidl>
29047 An attribute to indicate the sync service type.
29053 <Type name="SyncServiceType"/>
29055 <Attribute readonly="readonly" name="lastSyncTime" id="::DataSynchronization::SyncStatistics::lastSyncTime">
29056 <webidl> readonly attribute Date lastSyncTime;</webidl>
29059 An attribute to store the last sync time.
29065 <Type type="Date"/>
29067 <Attribute readonly="readonly" name="serverToClientTotal" id="::DataSynchronization::SyncStatistics::serverToClientTotal">
29068 <webidl> readonly attribute unsigned long serverToClientTotal;</webidl>
29071 An attribute to indicate the total number of items sent from the server to the client direction.
29077 <Type type="unsigned long"/>
29079 <Attribute readonly="readonly" name="serverToClientAdded" id="::DataSynchronization::SyncStatistics::serverToClientAdded">
29080 <webidl> readonly attribute unsigned long serverToClientAdded;</webidl>
29083 An attribute to indicate the number of added items from the server to the client direction.
29089 <Type type="unsigned long"/>
29091 <Attribute readonly="readonly" name="serverToClientUpdated" id="::DataSynchronization::SyncStatistics::serverToClientUpdated">
29092 <webidl> readonly attribute unsigned long serverToClientUpdated;</webidl>
29095 An attribute to indicate the number of updated items from the server to the client direction.
29101 <Type type="unsigned long"/>
29103 <Attribute readonly="readonly" name="serverToClientRemoved" id="::DataSynchronization::SyncStatistics::serverToClientRemoved">
29104 <webidl> readonly attribute unsigned long serverToClientRemoved;</webidl>
29107 An attribute to indicate the number of removed items from the server to the client direction.
29113 <Type type="unsigned long"/>
29115 <Attribute readonly="readonly" name="clientToServerTotal" id="::DataSynchronization::SyncStatistics::clientToServerTotal">
29116 <webidl> readonly attribute unsigned long clientToServerTotal;</webidl>
29119 An attribute to indicate the total number of items from the client to the server direction.
29125 <Type type="unsigned long"/>
29127 <Attribute readonly="readonly" name="clientToServerAdded" id="::DataSynchronization::SyncStatistics::clientToServerAdded">
29128 <webidl> readonly attribute unsigned long clientToServerAdded;</webidl>
29131 An attribute to indicate the number of added items from the client to the server direction.
29137 <Type type="unsigned long"/>
29139 <Attribute readonly="readonly" name="clientToServerUpdated" id="::DataSynchronization::SyncStatistics::clientToServerUpdated">
29140 <webidl> readonly attribute unsigned long clientToServerUpdated;</webidl>
29143 An attribute to indicate the number of updated items from the client to the server direction.
29149 <Type type="unsigned long"/>
29151 <Attribute readonly="readonly" name="clientToServerRemoved" id="::DataSynchronization::SyncStatistics::clientToServerRemoved">
29152 <webidl> readonly attribute unsigned long clientToServerRemoved;</webidl>
29155 An attribute to indicate the number of removed items from the client to the server direction.
29161 <Type type="unsigned long"/>
29164 <Interface name="DataSynchronizationManager" id="::DataSynchronization::DataSynchronizationManager">
29165 <webidl> [NoInterfaceObject] interface DataSynchronizationManager {
29166 void add(<ref>SyncProfileInfo</ref> profile) raises(<ref>WebAPIException</ref>);
29168 void update(<ref>SyncProfileInfo</ref> profile) raises(<ref>WebAPIException</ref>);
29170 void remove(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);
29172 long getMaxProfilesNum() raises(<ref>WebAPIException</ref>);
29174 unsigned long getProfilesNum() raises(<ref>WebAPIException</ref>);
29176 <ref>SyncProfileInfo</ref> get(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);
29178 <ref>SyncProfileInfo</ref>[] getAll() raises(<ref>WebAPIException</ref>);
29180 void startSync(<ref>SyncProfileId</ref> profileId, optional <ref>SyncProgressCallback</ref>? progressCallback) raises(<ref>WebAPIException</ref>);
29182 void stopSync(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);
29184 <ref>SyncStatistics</ref>[] getLastSyncStatistics(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);
29188 This interface allows managing profiles and synchronizing data between the server and the client device based on the stored profile information.
29194 <ExtendedAttributeList>
29195 <ExtendedAttribute name="NoInterfaceObject">
29196 <webidl>NoInterfaceObject</webidl>
29197 </ExtendedAttribute>
29198 </ExtendedAttributeList>
29199 <Operation name="add" id="::DataSynchronization::DataSynchronizationManager::add">
29200 <webidl> void add(<ref>SyncProfileInfo</ref> profile) raises(<ref>WebAPIException</ref>);</webidl>
29203 Adds a sync profile.
29207 The profile ID is provided when the profile is successfully added.
29217 http://tizen.org/privilege/datasync
29219 <Code> // Creates a sync info
29220 var syncInfo = new tizen.SyncInfo("http://example.com/sync", "myId", "myPassword", "MANUAL", "TWO_WAY");
29222 // Syncs both contacts and events
29223 var contactInfo = new tizen.SyncServiceInfo(true, "CONTACT", "serverContact");
29224 var eventInfo = new tizen.SyncServiceInfo(true, "EVENT", "serverEvent");
29225 var serviceInfo = [contactInfo, eventInfo];
29227 // Adds a profile to sync
29228 var profile = new tizen.SyncProfileInfo("MyProfile", syncInfo, serviceInfo);
29229 tizen.datasync.add(profile);
29232 <Type type="void"/>
29234 <Argument name="profile">
29237 The sync profile information to add.
29240 <Type name="SyncProfileInfo"/>
29244 <RaiseException name="WebAPIException">
29247 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
29250 with error type QuotaExceededError, if the platform has already reached the maximum number of profiles.
29253 with error type NotSupportedError, if this feature is not supported.
29256 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
29259 with error type SecurityError, if the application does not have the privilege to call this method.
29262 with error type UnknownError, if any other error occurs.
29268 <Operation name="update" id="::DataSynchronization::DataSynchronizationManager::update">
29269 <webidl> void update(<ref>SyncProfileInfo</ref> profile) raises(<ref>WebAPIException</ref>);</webidl>
29272 Updates an existing sync profile.
29281 http://tizen.org/privilege/datasync
29283 <Code> // Retrieves and updates a profile
29284 var profile = tizen.datasync.get(profileId);
29286 profile.profileName = "newProfileName";
29288 tizen.datasync.update(profile);
29291 <Type type="void"/>
29293 <Argument name="profile">
29296 The sync profile information to update.
29299 <Type name="SyncProfileInfo"/>
29303 <RaiseException name="WebAPIException">
29306 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
29309 with error type NotSupportedError, if this feature is not supported.
29312 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
29315 with error type SecurityError, if the application does not have the privilege to call this method.
29318 with error type UnknownError, if any other error occurs.
29324 <Operation name="remove" id="::DataSynchronization::DataSynchronizationManager::remove">
29325 <webidl> void remove(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);</webidl>
29328 Removes an existing sync profile.
29337 http://tizen.org/privilege/datasync
29339 <Code> // Removes a profile
29340 tizen.datasync.remove(profileId);
29343 <Type type="void"/>
29345 <Argument name="profileId">
29348 The sync profile ID to remove.
29351 <Type name="SyncProfileId"/>
29355 <RaiseException name="WebAPIException">
29358 with error type NotFoundError, if the identifier does not match any saved profile.
29361 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
29364 with error type NotSupportedError, if this feature is not supported.
29367 with error type SecurityError, if the application does not have the privilege to call this method.
29370 with error type UnknownError, if any other error occurs.
29376 <Operation name="getMaxProfilesNum" id="::DataSynchronization::DataSynchronizationManager::getMaxProfilesNum">
29377 <webidl> long getMaxProfilesNum() raises(<ref>WebAPIException</ref>);</webidl>
29380 Gets the maximum number of supported sync profiles on a platform.
29381 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.
29390 http://tizen.org/privilege/datasync
29392 <Code> // Gets the maximum number of supported profiles on the platform
29393 var numMaxProfiles = tizen.datasync.getMaxProfilesNum();
29399 long The number of supported profiles on a platform.
29405 <RaiseException name="WebAPIException">
29408 with error type NotSupportedError, if this feature is not supported.
29411 with error type SecurityError, if the application does not have the privilege to call this method.
29414 with error type UnknownError, if any other error occurs.
29420 <Operation name="getProfilesNum" id="::DataSynchronization::DataSynchronizationManager::getProfilesNum">
29421 <webidl> unsigned long getProfilesNum() raises(<ref>WebAPIException</ref>);</webidl>
29424 Gets the current number of sync profiles on a device.
29433 http://tizen.org/privilege/datasync
29435 <Code> // Gets the present number of profiles on the device
29436 var numProfiles = tizen.datasync.getProfilesNum();
29439 <Type type="unsigned long">
29442 unsigned long The current number of profiles on a device.
29448 <RaiseException name="WebAPIException">
29451 with error type NotSupportedError, if this feature is not supported.
29454 with error type SecurityError, if the application does not have the privilege to call this method.
29457 with error type UnknownError, if any other error occurs.
29463 <Operation name="get" id="::DataSynchronization::DataSynchronizationManager::get">
29464 <webidl> <ref>SyncProfileInfo</ref> get(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);</webidl>
29467 Gets the <em>SyncProfileInfo</em> object from a given profile ID.
29471 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>.
29481 http://tizen.org/privilege/datasync
29483 <Code> // Gets the profile information with the given ID
29484 var profile = tizen.datasync.get(profileId);
29487 <Type name="SyncProfileInfo">
29490 SyncProfileInfo The profile information of the given ID.
29495 <Argument name="profileId">
29498 The ID to use to get the profile information.
29501 <Type name="SyncProfileId"/>
29505 <RaiseException name="WebAPIException">
29508 with error type NotFoundError, if the identifier does not match any profile saved.
29511 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
29514 with error type NotSupportedError, if this feature is not supported.
29517 with error type SecurityError, if the application does not have the privilege to call this method.
29520 with error type UnknownError, if any other error occurs.
29526 <Operation name="getAll" id="::DataSynchronization::DataSynchronizationManager::getAll">
29527 <webidl> <ref>SyncProfileInfo</ref>[] getAll() raises(<ref>WebAPIException</ref>);</webidl>
29530 Gets the information of all sync profiles saved in a device.
29534 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>.
29544 http://tizen.org/privilege/datasync
29546 <Code> // Gets the all profile information
29547 var profiles = tizen.datasync.getAll();
29550 <Type type="array">
29553 SyncProfileInfo[] The profile information array.
29556 <Type name="SyncProfileInfo"/>
29560 <RaiseException name="WebAPIException">
29563 with error type NotSupportedError, if this feature is not supported.
29566 with error type SecurityError, if the application does not have the privilege to call this method.
29569 with error type UnknownError, if any other error occurs.
29575 <Operation name="startSync" id="::DataSynchronization::DataSynchronizationManager::startSync">
29576 <webidl> void startSync(<ref>SyncProfileId</ref> profileId, optional <ref>SyncProgressCallback</ref>? progressCallback) raises(<ref>WebAPIException</ref>);</webidl>
29579 Starts a sync operation with a given profile ID.
29583 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.
29593 http://tizen.org/privilege/datasync
29595 <Code> var profileId; //profileId obtained from SyncProfileInfo
29596 var syncCallback = {
29597 onprogress: function(profileId, serviceType, isFromServer, totalPerType, syncedPerType) {
29598 console.log('Total: ' + totalPerType + ', synced: ' + syncedPerType + ' for the sync type: ' + serviceType);
29600 onfailed: function(profileId, error) {
29601 console.log('Failed with id: ' + profileId + ', error name: ' + error.name);
29605 // Starts the sync operation with the corresponding callbacks
29606 tizen.datasync.startSync(profileId, syncCallback);
29609 <Type type="void"/>
29611 <Argument name="profileId">
29614 The profile ID with which to initiate the sync operation.
29617 <Type name="SyncProfileId"/>
29619 <Argument optional="optional" name="progressCallback">
29622 The method to invoke when the sync operation progresses or an error occurs.
29625 <Type name="SyncProgressCallback" nullable="nullable"/>
29629 <RaiseException name="WebAPIException">
29632 with error type NotFoundError, if the identifier does not match any profile saved.
29635 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
29638 with error type NotSupportedError, if this feature is not supported.
29641 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
29644 with error type SecurityError, if the application does not have the privilege to call this method.
29647 with error type UnknownError, if any other error occurs.
29653 <Operation name="stopSync" id="::DataSynchronization::DataSynchronizationManager::stopSync">
29654 <webidl> void stopSync(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);</webidl>
29657 Stops an ongoing sync operation that is specified by the <em>profileId</em> parameter.
29666 http://tizen.org/privilege/datasync
29668 <Code> var profileId; //profileId obtained from SyncProfileInfo
29669 // Stops the ongoing sync operation
29670 tizen.datasync.stopSync(profileId);
29673 <Type type="void"/>
29675 <Argument name="profileId">
29678 The ID of the ongoing sync operation to stop.
29681 <Type name="SyncProfileId"/>
29685 <RaiseException name="WebAPIException">
29688 with error type NotFoundError, if the identifier does not match any profile saved.
29691 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
29694 with error type NotSupportedError, if this feature is not supported.
29697 with error type SecurityError, if the application does not have the privilege to call this method.
29700 with error type UnknownError, if any other error occurs.
29706 <Operation name="getLastSyncStatistics" id="::DataSynchronization::DataSynchronizationManager::getLastSyncStatistics">
29707 <webidl> <ref>SyncStatistics</ref>[] getLastSyncStatistics(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);</webidl>
29710 Gets the sync statistics of a given profile ID.
29719 http://tizen.org/privilege/datasync
29721 <Code> var profileId; //profileId obtained from SyncProfileInfo
29722 // Gets the sync statistics information with the given ID
29723 var statistics = tizen.datasync.getLastSyncStatistics(profileId);
29726 <Type type="array">
29729 SyncStatictics[] The sync statistics information of a given ID.
29732 <Type name="SyncStatistics"/>
29735 <Argument name="profileId">
29738 The ID to use to get the sync statistics.
29741 <Type name="SyncProfileId"/>
29745 <RaiseException name="WebAPIException">
29748 with error type NotFoundError, if the identifier does not match any profile saved.
29751 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
29754 with error type NotSupportedError, if this feature is not supported.
29757 with error type SecurityError, if the application does not have the privilege to call this method.
29760 with error type UnknownError, if any other error occurs.
29767 <Interface name="SyncProgressCallback" id="::DataSynchronization::SyncProgressCallback">
29768 <webidl> [Callback, NoInterfaceObject] interface SyncProgressCallback {
29769 void onprogress(<ref>SyncProfileId</ref> profileId, <ref>SyncServiceType</ref> serviceType, boolean isFromServer, unsigned long totalPerService, unsigned long syncedPerService);
29771 void oncompleted(<ref>SyncProfileId</ref> profileId);
29773 void onstopped(<ref>SyncProfileId</ref> profileId);
29775 void onfailed(<ref>SyncProfileId</ref> profileId, <ref>WebAPIError</ref> error);
29779 This interface defines progress notification callbacks for the ongoing sync operation.
29785 <ExtendedAttributeList>
29786 <ExtendedAttribute name="Callback">
29787 <webidl>Callback</webidl>
29788 </ExtendedAttribute>
29789 <ExtendedAttribute name="NoInterfaceObject">
29790 <webidl> NoInterfaceObject</webidl>
29791 </ExtendedAttribute>
29792 </ExtendedAttributeList>
29793 <Operation name="onprogress" id="::DataSynchronization::SyncProgressCallback::onprogress">
29794 <webidl> void onprogress(<ref>SyncProfileId</ref> profileId, <ref>SyncServiceType</ref> serviceType, boolean isFromServer, unsigned long totalPerService, unsigned long syncedPerService);</webidl>
29797 Called when a synchronization operation is started and progress is made.
29801 The frequency of this callback invocation is dependent on the platform implementation.
29802 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.
29809 <Type type="void"/>
29811 <Argument name="profileId">
29814 The ID of the corresponding sync operation.
29817 <Type name="SyncProfileId"/>
29819 <Argument name="serviceType">
29822 The sync service category type.
29825 <Type name="SyncServiceType"/>
29827 <Argument name="isFromServer">
29830 The direction of the operation.<br/> If the direction of operation is from the server to the client, then value is<var> true</var>.
29833 <Type type="boolean"/>
29835 <Argument name="totalPerService">
29838 The total number of records to synchronize for the current sync service type aggregating all operations.
29841 <Type type="unsigned long"/>
29843 <Argument name="syncedPerService">
29846 The number of synchronized records for the current sync service type aggregating all operations.
29849 <Type type="unsigned long"/>
29853 <Operation name="oncompleted" id="::DataSynchronization::SyncProgressCallback::oncompleted">
29854 <webidl> void oncompleted(<ref>SyncProfileId</ref> profileId);</webidl>
29857 Called when the sync operation has completed.
29863 <Type type="void"/>
29865 <Argument name="profileId">
29868 The ID of the corresponding sync operation.
29871 <Type name="SyncProfileId"/>
29875 <Operation name="onstopped" id="::DataSynchronization::SyncProgressCallback::onstopped">
29876 <webidl> void onstopped(<ref>SyncProfileId</ref> profileId);</webidl>
29879 Called when the sync operation is stopped by user.
29885 <Type type="void"/>
29887 <Argument name="profileId">
29890 The ID of the corresponding sync operation.
29893 <Type name="SyncProfileId"/>
29897 <Operation name="onfailed" id="::DataSynchronization::SyncProgressCallback::onfailed">
29898 <webidl> void onfailed(<ref>SyncProfileId</ref> profileId, <ref>WebAPIError</ref> error);</webidl>
29901 Called when the sync operation fails.
29907 <Type type="void"/>
29909 <Argument name="profileId">
29912 The ID of the corresponding sync operation.
29915 <Type name="SyncProfileId"/>
29917 <Argument name="error">
29920 The reason for the sync failure.
29923 <Type name="WebAPIError"/>
29929 <Module name="Download" id="::Download">
29930 <webidl>module Download {
29931 typedef object DownloadHTTPHeaderFields;
29933 enum DownloadState { "QUEUED", "DOWNLOADING", "PAUSED", "CANCELED", "COMPLETED", "FAILED" };
29935 enum DownloadNetworkType { "CELLULAR", "WIFI", "ALL" };
29937 [NoInterfaceObject] interface DownloadManagerObject {
29938 readonly attribute <ref>DownloadManager</ref> download;
29940 <ref>Tizen</ref> implements <ref>DownloadManagerObject</ref>;
29942 [Constructor(DOMString url, optional DOMString? destination, optional DOMString? fileName, optional <ref>DownloadNetworkType</ref>? networkType, optional <ref>DownloadHTTPHeaderFields</ref>? httpHeader)]
29943 interface DownloadRequest {
29944 attribute DOMString url;
29946 attribute DOMString? destination;
29948 attribute DOMString? fileName;
29950 attribute <ref>DownloadNetworkType</ref>? networkType;
29952 attribute <ref>DownloadHTTPHeaderFields</ref>? httpHeader;
29955 [NoInterfaceObject] interface DownloadManager {
29956 long start(<ref>DownloadRequest</ref> downloadRequest,
29957 optional <ref>DownloadCallback</ref>? downloadCallback) raises(<ref>WebAPIException</ref>);
29959 void cancel(long downloadId) raises(<ref>WebAPIException</ref>);
29961 void pause(long downloadId) raises(<ref>WebAPIException</ref>);
29963 void resume(long downloadId) raises(<ref>WebAPIException</ref>);
29965 <ref>DownloadState</ref> getState(long downloadId) raises(<ref>WebAPIException</ref>);
29967 <ref>DownloadRequest</ref> getDownloadRequest(long downloadId) raises(<ref>WebAPIException</ref>);
29969 DOMString getMIMEType(long downloadId) raises(<ref>WebAPIException</ref>);
29971 void setListener(long downloadId, <ref>DownloadCallback</ref> downloadCallback) raises(<ref>WebAPIException</ref>);
29974 [Callback, NoInterfaceObject] interface DownloadCallback {
29975 void onprogress(long downloadId, unsigned long long receivedSize, unsigned long long totalSize);
29977 void onpaused(long downloadId);
29979 void oncanceled(long downloadId);
29981 void oncompleted(long downloadId, DOMString fullPath);
29983 void onfailed(long downloadId, <ref>WebAPIError</ref> error);
29988 This API provides methods to asynchronously download the contents of a URL to a storage.
29992 For more information on the Download features, see <a href="../../org.tizen.web.appprogramming/html/guide/content_guide/download.htm">Download Guide</a>.
29998 <def-api-feature identifier="http://tizen.org/feature/network.wifi">
30002 To guarantee this application running on a device with Wi-Fi feature, define below in the config file:
30007 <def-api-feature identifier="http://tizen.org/feature/network.telephony">
30011 To guarantee this application running on a device with Cellular feature, define below in the config file:
30017 <Typedef name="DownloadHTTPHeaderFields" id="::Download::DownloadHTTPHeaderFields">
30018 <webidl> typedef object DownloadHTTPHeaderFields;</webidl>
30021 A set of HTTP header fields.
30025 The key / value type of each HTTP header field should be DOMString.
30032 <Type type="object"/>
30034 <Enum name="DownloadState" id="::Download::DownloadState">
30035 <webidl> enum DownloadState { "QUEUED", "DOWNLOADING", "PAUSED", "CANCELED", "COMPLETED", "FAILED" };</webidl>
30038 An enumerator to indicate the state of a download operation.
30042 The following values are supported:
30046 QUEUED - Indicates that the download operation is listed in a queue. </li>
30048 DOWNLOADING - Indicates that the download operation is in progress. </li>
30050 PAUSED - Indicates that the download operation is in a paused state by user request. </li>
30052 CANCELED - Indicates that the download operation is canceled by user request. </li>
30054 COMPLETED - Indicates that the download operation is in a completed state. </li>
30056 FAILED - Indicates that the download operation has failed due to some reasons. </li>
30063 <EnumValue stringvalue="QUEUED">
30064 <webidl> "QUEUED</webidl>
30066 <EnumValue stringvalue="DOWNLOADING">
30067 <webidl> "DOWNLOADING</webidl>
30069 <EnumValue stringvalue="PAUSED">
30070 <webidl> "PAUSED</webidl>
30072 <EnumValue stringvalue="CANCELED">
30073 <webidl> "CANCELED</webidl>
30075 <EnumValue stringvalue="COMPLETED">
30076 <webidl> "COMPLETED</webidl>
30078 <EnumValue stringvalue="FAILED">
30079 <webidl> "FAILED</webidl>
30082 <Enum name="DownloadNetworkType" id="::Download::DownloadNetworkType">
30083 <webidl> enum DownloadNetworkType { "CELLULAR", "WIFI", "ALL" };</webidl>
30086 An enumerator to indicate the network type.
30090 The following values are supported:
30094 CELLULAR - Indicates that the download operation is allowed in the cellular network only. </li>
30096 WIFI - Indicates that the download operation is allowed in the Wi-Fi network only. </li>
30098 ALL - Indicates that the download operation is allowed in all network types. </li>
30105 <EnumValue stringvalue="CELLULAR">
30106 <webidl> "CELLULAR</webidl>
30108 <EnumValue stringvalue="WIFI">
30109 <webidl> "WIFI</webidl>
30111 <EnumValue stringvalue="ALL">
30112 <webidl> "ALL</webidl>
30115 <Interface name="DownloadManagerObject" id="::Download::DownloadManagerObject">
30116 <webidl> [NoInterfaceObject] interface DownloadManagerObject {
30117 readonly attribute <ref>DownloadManager</ref> download;
30121 This interface defines the default download manager that is instantiated by the <em>Tizen </em>object.
30122 There will be a <em>tizen.download </em>object that allows access to the functionality of the Download API.
30128 <ExtendedAttributeList>
30129 <ExtendedAttribute name="NoInterfaceObject">
30130 <webidl>NoInterfaceObject</webidl>
30131 </ExtendedAttribute>
30132 </ExtendedAttributeList>
30133 <Attribute readonly="readonly" name="download" id="::Download::DownloadManagerObject::download">
30134 <webidl> readonly attribute <ref>DownloadManager</ref> download;</webidl>
30135 <Type name="DownloadManager"/>
30138 <Implements name1="Tizen" name2="DownloadManagerObject">
30139 <webidl> <ref>Tizen</ref> implements <ref>DownloadManagerObject</ref>;</webidl>
30141 <Interface name="DownloadRequest" id="::Download::DownloadRequest">
30142 <webidl> [Constructor(DOMString url, optional DOMString? destination, optional DOMString? fileName, optional <ref>DownloadNetworkType</ref>? networkType, optional <ref>DownloadHTTPHeaderFields</ref>? httpHeader)]
30143 interface DownloadRequest {
30144 attribute DOMString url;
30146 attribute DOMString? destination;
30148 attribute DOMString? fileName;
30150 attribute <ref>DownloadNetworkType</ref>? networkType;
30152 attribute <ref>DownloadHTTPHeaderFields</ref>? httpHeader;
30156 This interface defines the download request object.
30162 <ExtendedAttributeList>
30163 <ExtendedAttribute name="Constructor">
30164 <webidl>Constructor(DOMString url, optional DOMString? destination, optional DOMString? fileName, optional <ref>DownloadNetworkType</ref>? networkType, optional <ref>DownloadHTTPHeaderFields</ref>? httpHeader)</webidl>
30166 <Argument name="url">
30167 <Type type="DOMString"/>
30169 <Argument optional="optional" name="destination">
30170 <Type type="DOMString" nullable="nullable"/>
30172 <Argument optional="optional" name="fileName">
30173 <Type type="DOMString" nullable="nullable"/>
30175 <Argument optional="optional" name="networkType">
30176 <Type name="DownloadNetworkType" nullable="nullable"/>
30178 <Argument optional="optional" name="httpHeader">
30179 <Type name="DownloadHTTPHeaderFields" nullable="nullable"/>
30182 </ExtendedAttribute>
30183 </ExtendedAttributeList>
30184 <Attribute name="url" id="::Download::DownloadRequest::url">
30185 <webidl> attribute DOMString url;</webidl>
30188 An attribute to store the URL of the object to download.
30194 <Type type="DOMString"/>
30196 <Attribute name="destination" id="::Download::DownloadRequest::destination">
30197 <webidl> attribute DOMString? destination;</webidl>
30200 An attribute to store the folder path of the destination folder to which a requested file object will be downloaded.
30204 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>.
30207 The default value is an empty string.
30214 <Type type="DOMString" nullable="nullable"/>
30216 <Attribute name="fileName" id="::Download::DownloadRequest::fileName">
30217 <webidl> attribute DOMString? fileName;</webidl>
30220 An attribute to store the file name for the specified URL.
30224 If the file name is not given or an empty string, the original file name from URL is used.
30227 The default value is an empty string.
30234 <Type type="DOMString" nullable="nullable"/>
30236 <Attribute name="networkType" id="::Download::DownloadRequest::networkType">
30237 <webidl> attribute <ref>DownloadNetworkType</ref>? networkType;</webidl>
30240 An attribute to store the allowed network type.
30244 If the network type is not given, all network type are allowed.
30247 The default value is "ALL".
30254 <Type name="DownloadNetworkType" nullable="nullable"/>
30256 <Attribute name="httpHeader" id="::Download::DownloadRequest::httpHeader">
30257 <webidl> attribute <ref>DownloadHTTPHeaderFields</ref>? httpHeader;</webidl>
30260 An attribute to store extra HTTP header fields.
30264 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>
30266 The default value is an empty object.
30269 <Code> var req = new tizen.DownloadRequest("http://download.tizen.org/tools/README.txt");
30270 req.httpHeader["Pragma"] = "no-cache";
30271 req.httpHeader["Cookie"] = "version=1; Skin=new";
30272 req.httpHeader["X-Agent"] = "Tizen Sample App";
30278 <Type name="DownloadHTTPHeaderFields" nullable="nullable"/>
30281 <Interface name="DownloadManager" id="::Download::DownloadManager">
30282 <webidl> [NoInterfaceObject] interface DownloadManager {
30283 long start(<ref>DownloadRequest</ref> downloadRequest,
30284 optional <ref>DownloadCallback</ref>? downloadCallback) raises(<ref>WebAPIException</ref>);
30286 void cancel(long downloadId) raises(<ref>WebAPIException</ref>);
30288 void pause(long downloadId) raises(<ref>WebAPIException</ref>);
30290 void resume(long downloadId) raises(<ref>WebAPIException</ref>);
30292 <ref>DownloadState</ref> getState(long downloadId) raises(<ref>WebAPIException</ref>);
30294 <ref>DownloadRequest</ref> getDownloadRequest(long downloadId) raises(<ref>WebAPIException</ref>);
30296 DOMString getMIMEType(long downloadId) raises(<ref>WebAPIException</ref>);
30298 void setListener(long downloadId, <ref>DownloadCallback</ref> downloadCallback) raises(<ref>WebAPIException</ref>);
30302 This interface handles requests for downloading. Each step of download operation will be informed through callbacks.
30308 <ExtendedAttributeList>
30309 <ExtendedAttribute name="NoInterfaceObject">
30310 <webidl>NoInterfaceObject</webidl>
30311 </ExtendedAttribute>
30312 </ExtendedAttributeList>
30313 <Operation name="start" id="::Download::DownloadManager::start">
30314 <webidl> long start(<ref>DownloadRequest</ref> downloadRequest,
30315 optional <ref>DownloadCallback</ref>? downloadCallback) raises(<ref>WebAPIException</ref>);</webidl>
30318 Starts a download operation with the specified URL information.
30327 http://tizen.org/privilege/download
30329 <Code> var listener = {
30330 onprogress: function(id, receivedSize, totalSize) {
30331 console.log('Received with id: ' + id + ', ' + receivedSize + '/' + totalSize);
30333 onpaused: function(id) {
30334 console.log('Paused with id: ' + id);
30336 oncanceled: function(id) {
30337 console.log('Canceled with id: ' + id);
30339 oncompleted: function(id, fullPath) {
30340 console.log('Completed with id: ' + id + ', full path: ' + fullPath);
30342 onfailed: function(id, error) {
30343 console.log('Failed with id: ' + id + ', error name: ' + error.name);
30347 // Starts downloading of the file from the Web with the corresponding callbacks.
30348 var downloadRequest = new tizen.DownloadRequest("http://download.tizen.org/tools/README.txt", "documents");
30349 downloadId = tizen.download.start(downloadRequest, listener);
30355 long An identifier for each download operation.
30360 <Argument name="downloadRequest">
30363 The URL and destination information of the object to download.
30366 <Type name="DownloadRequest"/>
30368 <Argument optional="optional" name="downloadCallback">
30371 The method to invoke when the download state changes or an error occurs.
30374 <Type name="DownloadCallback" nullable="nullable"/>
30378 <RaiseException name="WebAPIException">
30381 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
30384 with error type NotSupportedError, if this feature is not supported.
30387 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
30390 with error type SecurityError, if the application does not have the privilege to call this method.
30393 with error type UnknownError if any other error occurs.
30399 <Operation name="cancel" id="::Download::DownloadManager::cancel">
30400 <webidl> void cancel(long downloadId) raises(<ref>WebAPIException</ref>);</webidl>
30403 Cancels an ongoing download operation that is specified by the <em>downloadId</em> parameter.
30408 <Code> // Cancels the ongoing download operation with the specified id.
30409 tizen.download.cancel(downloadId);
30412 <Type type="void"/>
30414 <Argument name="downloadId">
30417 The ID of the ongoing download operation to stop.
30420 <Type type="long"/>
30424 <RaiseException name="WebAPIException">
30427 with error type NotFoundError, if the identifier does not match any download operation in progress.
30430 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
30433 with error type NotSupportedError, if this feature is not supported.
30436 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
30439 with error type UnknownError, if any other error occurs.
30445 <Operation name="pause" id="::Download::DownloadManager::pause">
30446 <webidl> void pause(long downloadId) raises(<ref>WebAPIException</ref>);</webidl>
30449 Pauses an ongoing download operation that is specified by the <em>downloadId</em> parameter.
30450 The paused download operation can be resumed later by the <em>resume()</em> method.
30455 <Code> // Pauses the ongoing download operation with the specified id.
30456 tizen.download.pause(downloadId);
30459 <Type type="void"/>
30461 <Argument name="downloadId">
30464 The ID of the ongoing download operation to pause.
30467 <Type type="long"/>
30471 <RaiseException name="WebAPIException">
30474 with error type NotFoundError, if the identifier does not match any download operation in progress.
30477 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
30480 with error type NotSupportedError, if this feature is not supported.
30483 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
30486 with error type UnknownError, if any other error occurs.
30492 <Operation name="resume" id="::Download::DownloadManager::resume">
30493 <webidl> void resume(long downloadId) raises(<ref>WebAPIException</ref>);</webidl>
30496 Resumes a paused download operation that is specified by the <em>downloadId</em> parameter.
30501 <Code> // Resumes the paused download operation with the specified id.
30502 tizen.download.resume(downloadId);
30505 <Type type="void"/>
30507 <Argument name="downloadId">
30510 The ID of the paused download operation to be resume.
30513 <Type type="long"/>
30517 <RaiseException name="WebAPIException">
30520 with error type NotFoundError, if the identifier does not match any download operation in progress.
30523 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
30526 with error type NotSupportedError, if this feature is not supported.
30529 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
30532 with error type UnknownError, if any other error occurs.
30538 <Operation name="getState" id="::Download::DownloadManager::getState">
30539 <webidl> <ref>DownloadState</ref> getState(long downloadId) raises(<ref>WebAPIException</ref>);</webidl>
30542 Gets the download state of an operation synchronously with the specified ID.
30547 <Code> // Gets the state of the download operation with the given id.
30548 var state = tizen.download.getState(downloadId);
30551 <Type name="DownloadState">
30554 DownloadState The current download state of the specified ID.
30559 <Argument name="downloadId">
30562 The ID to get the current state of download operation.
30565 <Type type="long"/>
30569 <RaiseException name="WebAPIException">
30572 with error type NotFoundError, if the identifier does not match any download operation in progress.
30575 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
30578 with error type NotSupportedError, if this feature is not supported.
30581 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
30584 with error type UnknownError, if any other error occurs.
30590 <Operation name="getDownloadRequest" id="::Download::DownloadManager::getDownloadRequest">
30591 <webidl> <ref>DownloadRequest</ref> getDownloadRequest(long downloadId) raises(<ref>WebAPIException</ref>);</webidl>
30594 Gets the DownloadRequest object from a given id.
30599 <Code> // Gets the download request information with the given id.
30600 var downloadRequest = tizen.download.getDownloadRequest(downloadId);
30603 <Type name="DownloadRequest">
30606 DownloadRequest The download request information of the given id.
30611 <Argument name="downloadId">
30614 The ID to get the download request information.
30617 <Type type="long"/>
30621 <RaiseException name="WebAPIException">
30624 with error type NotFoundError, if the identifier does not match
30625 any download operation in progress.
30628 with error type TypeMismatchError, if the input parameter is not
30629 compatible with the expected type.
30632 with error type NotSupportedError, if this feature is not supported.
30635 with error type InvalidValuesError, if any of the input
30636 parameters contain an invalid value.
30639 with error type UnknownError in any other error case.
30645 <Operation name="getMIMEType" id="::Download::DownloadManager::getMIMEType">
30646 <webidl> DOMString getMIMEType(long downloadId) raises(<ref>WebAPIException</ref>);</webidl>
30649 Gets the MIME type of the downloaded file.
30652 This function will return a valid MIME type when the download operation has been started
30653 and successfully retrieved the file header.
30658 <Code> // Get the MIME type of the download operation with the given id.
30659 var MIMEtype = tizen.download.getMIMEType(downloadId);
30662 <Type type="DOMString">
30665 DOMString The MIME type of the downloaded file.
30670 <Argument name="downloadId">
30673 The ID to get the MIME type information.
30676 <Type type="long"/>
30680 <RaiseException name="WebAPIException">
30683 with error type NotFoundError, if the identifier does not match
30684 any download operation in progress.
30687 with error type TypeMismatchError, if the input parameter is not
30688 compatible with the expected type.
30691 with error type NotSupportedError, if this feature is not supported.
30694 with error type InvalidValuesError, if any of the input
30695 parameters contain an invalid value.
30698 with error type UnknownError in any other error case.
30704 <Operation name="setListener" id="::Download::DownloadManager::setListener">
30705 <webidl> void setListener(long downloadId, <ref>DownloadCallback</ref> downloadCallback) raises(<ref>WebAPIException</ref>);</webidl>
30708 Sets the download callback to the download operation of given id.
30709 It's possible to change or register the listener of download operation using the saved id.
30714 <Code> var listener = {
30715 onprogress: function(id, receivedSize, totalSize) {
30716 console.log('Received with id: ' + id + ', ' + receivedSize + '/' + totalSize);
30718 onpaused: function(id) {
30719 console.log('Paused with id: ' + id);
30721 oncanceled: function(id) {
30722 console.log('Canceled with id: ' + id);
30724 oncompleted: function(id, fileName) {
30725 console.log('Completed with id: ' + id + ', file name: ' + fileName);
30727 onfailed: function(id, error) {
30728 console.log('Failed with id: ' + id + ', error name: ' + error.name);
30732 // Start downloading the html file on the web with the corresponding callbacks.
30733 var downloadRequest = new tizen.DownloadRequest("http://download.tizen.org/tools/README.txt", "documents");
30734 downloadId = tizen.download.start(downloadRequest);
30736 // Add the listener.
30737 tizen.download.setListener(downloadId, listener);
30740 <Type type="void"/>
30742 <Argument name="downloadId">
30745 The ID to set the download callback.
30748 <Type type="long"/>
30750 <Argument name="downloadCallback">
30753 The method to invoke when the download state changes or an error occurs.
30756 <Type name="DownloadCallback"/>
30760 <RaiseException name="WebAPIException">
30763 with error type NotFoundError, if the identifier does not match
30764 any download operation in progress.
30767 with error type TypeMismatchError, if the input parameter is not
30768 compatible with the expected type.
30771 with error type NotSupportedError, if this feature is not supported.
30774 with error type InvalidValuesError, if any of the input
30775 parameters contain an invalid value.
30778 with error type UnknownError in any other error case.
30785 <Interface name="DownloadCallback" id="::Download::DownloadCallback">
30786 <webidl> [Callback, NoInterfaceObject] interface DownloadCallback {
30787 void onprogress(long downloadId, unsigned long long receivedSize, unsigned long long totalSize);
30789 void onpaused(long downloadId);
30791 void oncanceled(long downloadId);
30793 void oncompleted(long downloadId, DOMString fullPath);
30795 void onfailed(long downloadId, <ref>WebAPIError</ref> error);
30799 This interface defines notification callbacks for the download state change or progress.
30805 <ExtendedAttributeList>
30806 <ExtendedAttribute name="Callback">
30807 <webidl>Callback</webidl>
30808 </ExtendedAttribute>
30809 <ExtendedAttribute name="NoInterfaceObject">
30810 <webidl> NoInterfaceObject</webidl>
30811 </ExtendedAttribute>
30812 </ExtendedAttributeList>
30813 <Operation name="onprogress" id="::Download::DownloadCallback::onprogress">
30814 <webidl> void onprogress(long downloadId, unsigned long long receivedSize, unsigned long long totalSize);</webidl>
30817 Called when a download is successful and it called multiple times as the download progresses.
30818 The interval between <em>onprogress()</em> callback is platform-dependent. When the download is started, the <em>receivedSize </em>can be <var>0</var>.
30824 <Type type="void"/>
30826 <Argument name="downloadId">
30829 The ID of the corresponding download operation.
30832 <Type type="long"/>
30834 <Argument name="receivedSize">
30837 The size of data received in bytes.
30840 <Type type="unsigned long long"/>
30842 <Argument name="totalSize">
30845 The total size of data to receive in bytes.
30848 <Type type="unsigned long long"/>
30852 <Operation name="onpaused" id="::Download::DownloadCallback::onpaused">
30853 <webidl> void onpaused(long downloadId);</webidl>
30856 Called when the download operation is paused by the <em>pause() </em>method.
30862 <Type type="void"/>
30864 <Argument name="downloadId">
30867 The ID of the corresponding download operation.
30870 <Type type="long"/>
30874 <Operation name="oncanceled" id="::Download::DownloadCallback::oncanceled">
30875 <webidl> void oncanceled(long downloadId);</webidl>
30878 Called when download is canceled by the <em>cancel() </em>method.
30884 <Type type="void"/>
30886 <Argument name="downloadId">
30889 The ID of the corresponding download operation.
30892 <Type type="long"/>
30896 <Operation name="oncompleted" id="::Download::DownloadCallback::oncompleted">
30897 <webidl> void oncompleted(long downloadId, DOMString fullPath);</webidl>
30900 Called when the download operation is completed with the final full path.
30901 If the same file name already exists in the destination, it is changed according to the platform policy and delivered in this callback.
30907 <Type type="void"/>
30909 <Argument name="downloadId">
30912 The ID of the corresponding download operation.
30915 <Type type="long"/>
30917 <Argument name="fullPath">
30920 The final full path for the downloaded file.
30923 <Type type="DOMString"/>
30927 <Operation name="onfailed" id="::Download::DownloadCallback::onfailed">
30928 <webidl> void onfailed(long downloadId, <ref>WebAPIError</ref> error);</webidl>
30931 Called when the download operation fails.
30937 <Type type="void"/>
30939 <Argument name="downloadId">
30942 The ID of the corresponding download operation.
30945 <Type type="long"/>
30947 <Argument name="error">
30950 The reason for the download failure.
30953 <Type name="WebAPIError"/>
30959 <Module name="Filesystem" id="::Filesystem">
30960 <webidl>module Filesystem {
30961 enum FileMode { "r", "rw", "w", "a" };
30963 enum FileSystemStorageType { "INTERNAL", "EXTERNAL" };
30965 enum FileSystemStorageState { "MOUNTED", "REMOVED", "UNMOUNTABLE" };
30967 [NoInterfaceObject] interface FileSystemManagerObject {
30968 readonly attribute <ref>FileSystemManager</ref> filesystem;
30970 <ref>Tizen</ref> implements <ref>FileSystemManagerObject</ref>;
30972 [NoInterfaceObject] interface FileSystemManager {
30973 readonly attribute long maxPathLength;
30975 void resolve(DOMString location,
30976 <ref>FileSuccessCallback</ref> onsuccess,
30977 optional <ref>ErrorCallback</ref>? onerror,
30978 optional <ref>FileMode</ref>? mode) raises(<ref>WebAPIException</ref>);
30980 void getStorage(DOMString label,
30981 <ref>FileSystemStorageSuccessCallback</ref> onsuccess,
30982 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
30984 void listStorages(<ref>FileSystemStorageArraySuccessCallback</ref> onsuccess,
30985 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
30987 long addStorageStateChangeListener(<ref>FileSystemStorageSuccessCallback</ref> onsuccess,
30988 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
30990 void removeStorageStateChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
30993 [NoInterfaceObject] interface FileSystemStorage {
30994 readonly attribute DOMString label;
30996 readonly attribute <ref>FileSystemStorageType</ref> type;
30998 readonly attribute <ref>FileSystemStorageState</ref> state;
31001 [NoInterfaceObject] interface File {
31002 readonly attribute <ref>File</ref>? parent;
31004 readonly attribute boolean readOnly;
31006 readonly attribute boolean isFile;
31008 readonly attribute boolean isDirectory;
31010 readonly attribute Date? created;
31012 readonly attribute Date? modified;
31014 readonly attribute DOMString path;
31016 readonly attribute DOMString name;
31018 readonly attribute DOMString fullPath;
31020 readonly attribute unsigned long long fileSize;
31022 readonly attribute long length;
31024 DOMString toURI() raises(<ref>WebAPIException</ref>);
31026 void listFiles(<ref>FileArraySuccessCallback</ref> onsuccess,
31027 optional <ref>ErrorCallback</ref>? onerror,
31028 optional <ref>FileFilter</ref>? filter) raises(<ref>WebAPIException</ref>);
31030 void openStream(<ref>FileMode</ref> mode,
31031 <ref>FileStreamSuccessCallback</ref> onsuccess,
31032 optional <ref>ErrorCallback</ref>? onerror,
31033 optional DOMString? encoding) raises(<ref>WebAPIException</ref>);
31035 void readAsText(<ref>FileStringSuccessCallback</ref> onsuccess,
31036 optional <ref>ErrorCallback</ref>? onerror,
31037 optional DOMString? encoding) raises(<ref>WebAPIException</ref>);
31039 void copyTo(DOMString originFilePath,
31040 DOMString destinationFilePath,
31042 optional <ref>SuccessCallback</ref>? onsuccess,
31043 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
31045 void moveTo(DOMString originFilePath,
31046 DOMString destinationFilePath,
31048 optional <ref>SuccessCallback</ref>? onsuccess,
31049 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
31051 <ref>File</ref> createDirectory(DOMString dirPath) raises(<ref>WebAPIException</ref>);
31053 <ref>File</ref> createFile(DOMString relativeFilePath) raises(<ref>WebAPIException</ref>);
31055 <ref>File</ref> resolve(DOMString filePath) raises(<ref>WebAPIException</ref>);
31057 void deleteDirectory(DOMString directoryPath,
31059 optional <ref>SuccessCallback</ref>? onsuccess,
31060 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
31062 void deleteFile(DOMString filePath,
31063 optional <ref>SuccessCallback</ref>? onsuccess,
31064 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
31068 dictionary FileFilter {
31071 Date startModified;
31080 [NoInterfaceObject] interface FileStream {
31081 readonly attribute boolean eof;
31083 attribute long position setraises(<ref>WebAPIException</ref>);
31085 readonly attribute long bytesAvailable;
31089 DOMString read(long charCount) raises(<ref>WebAPIException</ref>);
31091 octet[] readBytes(long byteCount) raises(<ref>WebAPIException</ref>);
31093 DOMString readBase64(long byteCount) raises(<ref>WebAPIException</ref>);
31095 void write(DOMString stringData) raises(<ref>WebAPIException</ref>);
31097 void writeBytes(octet[] byteData) raises(<ref>WebAPIException</ref>);
31099 void writeBase64(DOMString base64Data) raises(<ref>WebAPIException</ref>);
31102 [Callback=FunctionOnly, NoInterfaceObject] interface FileSuccessCallback {
31103 void onsuccess(<ref>File</ref> file);
31106 [Callback=FunctionOnly, NoInterfaceObject] interface FileSystemStorageArraySuccessCallback {
31107 void onsuccess(<ref>FileSystemStorage</ref>[] storages);
31110 [Callback=FunctionOnly, NoInterfaceObject] interface FileSystemStorageSuccessCallback {
31111 void onsuccess(<ref>FileSystemStorage</ref> storage);
31114 [Callback=FunctionOnly, NoInterfaceObject] interface FileStringSuccessCallback {
31115 void onsuccess(DOMString fileStr);
31118 [Callback=FunctionOnly, NoInterfaceObject] interface FileStreamSuccessCallback {
31119 void onsuccess(<ref>FileStream</ref> filestream);
31122 [Callback=FunctionOnly, NoInterfaceObject] interface FileArraySuccessCallback {
31123 void onsuccess(<ref>File</ref>[] files);
31128 This API provides access to a device's filesystem.
31132 The filesystem is represented as an abstract collection of disjointed filesystem virtual
31133 root locations, each corresponding to a specific location in the device
31134 filesystem. The filesystem API exposes the hierarchies below these root
31135 locations as a single virtual filesystem, but provides no access to other
31136 parts of the device filesystem.
31139 Each virtual root has a string name. Each file or directory within the virtual
31140 filesystem is addressed using a fully-qualified path of the form:
31141 <em><root name>/<path></em> where <em><rootname></em> is
31142 the name of the virtual root and <em><path></em> is the path to the file or
31143 directory relative to that root.
31146 The following virtual roots MUST be supported:
31150 images: the images location </li>
31152 videos: the videos location </li>
31154 music: the sounds location </li>
31156 documents: the documents location </li>
31158 downloads: the location for downloaded items </li>
31160 ringtones: the location for ringtones (read-only location) </li>
31162 wgt-package: the widget package location (read-only location) </li>
31164 wgt-private: the widget private storage </li>
31166 wgt-private-tmp: the widget private volatile storage area </li>
31169 The file URI path is also supported. if you want to access other paths out of virtual root,
31170 for example '/tmp/', 'file:///tmp' could be used as location parameter.
31173 To access specific locations from those specified above, a file handle
31174 must be retrieved using the filesystem.resolve call.
31177 A file handle represents either a file or a directory. For a file, the
31178 isFile attribute is <em>true</em>. For a directory, the isDirectory attribute
31179 is <em>true</em>. A file can be opened for read and write operations, using a
31180 FileStream handle. A list of files and sub-directories can be obtained from a
31181 directory and a resolve method exists to resolve files or sub-directories
31182 more conveniently than processing directory listings.
31185 The implementation MUST support the use of the following
31186 characters in file names:
31190 Letters (azAZ) </li>
31192 Numbers (0-9) </li>
31196 Underscores ("_") </li>
31198 Hyphens ("-") </li>
31200 Periods (".") </li>
31203 The implementation MAY support additional characters in file names,
31204 depending on platform support.
31207 The implementation MAY forbid the use of additional characters in file
31208 names, depending on the platform. The use of the path separator "/"
31209 in file names MUST NOT be allowed. The "/" character is used as the (path)
31210 component separator.
31213 Some other file name and path characteristics are platform-dependent,
31214 for example, maximum path length, file name length, case sensitivity, additional
31215 character support, etc. Therefore, it is recommended that you avoid any dependency
31216 on aspects that cannot be supported across many platforms.
31219 When a path is used to interact with the underlying filesystem,
31220 the encoding used for the file path SHOULD be the platform default.
31223 For more information on the Filesystem features, see <a href="../../org.tizen.web.appprogramming/html/guide/io_guide/filesystem.htm">File System Guide</a>.
31230 <Enum name="FileMode" id="::Filesystem::FileMode">
31231 <webidl> enum FileMode { "r", "rw", "w", "a" };</webidl>
31234 The file mode provided when opening.
31238 Value "r" to obtain read-only access, "rw" to obtain read and write
31239 access, "w" to obtain write access and "a" for appending.
31246 <EnumValue stringvalue="r">
31247 <webidl> "r</webidl>
31249 <EnumValue stringvalue="rw">
31250 <webidl> "rw</webidl>
31252 <EnumValue stringvalue="w">
31253 <webidl> "w</webidl>
31255 <EnumValue stringvalue="a">
31256 <webidl> "a</webidl>
31259 <Enum name="FileSystemStorageType" id="::Filesystem::FileSystemStorageType">
31260 <webidl> enum FileSystemStorageType { "INTERNAL", "EXTERNAL" };</webidl>
31263 The type of storage.
31268 INTERNAL: Internal storage is storage that cannot be removed, such as a
31269 flash memory. </li>
31271 EXTERNAL: External storage is removable storage, such as a USB drive or
31272 memory cards. </li>
31279 <EnumValue stringvalue="INTERNAL">
31280 <webidl> "INTERNAL</webidl>
31282 <EnumValue stringvalue="EXTERNAL">
31283 <webidl> "EXTERNAL</webidl>
31286 <Enum name="FileSystemStorageState" id="::Filesystem::FileSystemStorageState">
31287 <webidl> enum FileSystemStorageState { "MOUNTED", "REMOVED", "UNMOUNTABLE" };</webidl>
31290 The state of the storage.
31295 MOUNTED: The device is mounted and can be browsed. </li>
31297 REMOVED: The device was removed. This states only applies to external drives. </li>
31299 UNMOUNTABLE: The device cannot be mounted due to an error. </li>
31306 <EnumValue stringvalue="MOUNTED">
31307 <webidl> "MOUNTED</webidl>
31309 <EnumValue stringvalue="REMOVED">
31310 <webidl> "REMOVED</webidl>
31312 <EnumValue stringvalue="UNMOUNTABLE">
31313 <webidl> "UNMOUNTABLE</webidl>
31316 <Interface name="FileSystemManagerObject" id="::Filesystem::FileSystemManagerObject">
31317 <webidl> [NoInterfaceObject] interface FileSystemManagerObject {
31318 readonly attribute <ref>FileSystemManager</ref> filesystem;
31322 Defines what is instantiated in the tizen object.
31326 There will be a tizen.filesystem object that allows accessing the
31327 functionality of the filesystem API.
31334 <ExtendedAttributeList>
31335 <ExtendedAttribute name="NoInterfaceObject">
31336 <webidl>NoInterfaceObject</webidl>
31337 </ExtendedAttribute>
31338 </ExtendedAttributeList>
31339 <Attribute readonly="readonly" name="filesystem" id="::Filesystem::FileSystemManagerObject::filesystem">
31340 <webidl> readonly attribute <ref>FileSystemManager</ref> filesystem;</webidl>
31341 <Type name="FileSystemManager"/>
31344 <Implements name1="Tizen" name2="FileSystemManagerObject">
31345 <webidl> <ref>Tizen</ref> implements <ref>FileSystemManagerObject</ref>;</webidl>
31347 <Interface name="FileSystemManager" id="::Filesystem::FileSystemManager">
31348 <webidl> [NoInterfaceObject] interface FileSystemManager {
31349 readonly attribute long maxPathLength;
31351 void resolve(DOMString location,
31352 <ref>FileSuccessCallback</ref> onsuccess,
31353 optional <ref>ErrorCallback</ref>? onerror,
31354 optional <ref>FileMode</ref>? mode) raises(<ref>WebAPIException</ref>);
31356 void getStorage(DOMString label,
31357 <ref>FileSystemStorageSuccessCallback</ref> onsuccess,
31358 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
31360 void listStorages(<ref>FileSystemStorageArraySuccessCallback</ref> onsuccess,
31361 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
31363 long addStorageStateChangeListener(<ref>FileSystemStorageSuccessCallback</ref> onsuccess,
31364 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
31366 void removeStorageStateChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
31370 The file system manager interface that provides access to the filesystem API.
31374 This manager exposes the filesystem base API, and provides functionality, such as
31375 determining root and default locations, resolving a given location
31376 into a file handle, and registering filesystem listeners for
31383 <Code> var documentsDir;
31384 function onsuccess(files) {
31385 for(var i = 0; i < files.length; i++) {
31386 console.log("File Name is " + files[i].name); // displays file name
31389 var testFile = documentsDir.createFile("test.txt");
31391 if (testFile != null) {
31392 testFile.openStream(
31395 fs.write("HelloWorld");
31398 console.log("Error " + e.message);
31399 }, "UTF-8"
31404 function onerror(error) {
31405 console.log("The error " + error.message + " occurred when listing the files in the selected folder");
31408 tizen.filesystem.resolve(
31411 documentsDir = dir;
31412 dir.listFiles(onsuccess, onerror);
31414 console.log("Error" + e.message);
31419 <ExtendedAttributeList>
31420 <ExtendedAttribute name="NoInterfaceObject">
31421 <webidl>NoInterfaceObject</webidl>
31422 </ExtendedAttribute>
31423 </ExtendedAttributeList>
31424 <Attribute readonly="readonly" name="maxPathLength" id="::Filesystem::FileSystemManager::maxPathLength">
31425 <webidl> readonly attribute long maxPathLength;</webidl>
31428 Contains the platform-dependent maximum path length.
31433 <Code> console.log("The maximum path length is " + tizen.filesystem.maxPathLength);
31436 <Type type="long"/>
31438 <Operation name="resolve" id="::Filesystem::FileSystemManager::resolve">
31439 <webidl> void resolve(DOMString location,
31440 <ref>FileSuccessCallback</ref> onsuccess,
31441 optional <ref>ErrorCallback</ref>? onerror,
31442 optional <ref>FileMode</ref>? mode) raises(<ref>WebAPIException</ref>);</webidl>
31445 Resolves a location to a file handle.
31449 It validates and resolves the given location to a file handle.
31450 If the operation completes successfully, the handle is returned
31451 in the FileSuccessCallback.
31452 A valid location is prefixed with a valid root or
31453 default location and must address an existing,
31454 accessible file or directory.
31457 A location can contain virtual path like (<var>documents/some_file.txt</var>)
31458 or it can be a file's URI (<var>file:///my_strange_path/some_file.png</var>).
31461 The list of root locations that MUST be supported by a compliant
31462 implementation are:
31466 documents: Describes the default folder in which text documents
31467 (such as pdf, doc...) are stored by default in the device. For example, in some
31468 platforms it corresponds to the "My Documents" folder. </li>
31470 images: Describes the default folder in which still images, like
31471 pictures (such as jpg, gif, png, etc.), are stored in the
31472 device by default. For example, in some platforms it corresponds to the "My Images"
31475 music: Describes the default folder in which sound clips (such as mp3,
31476 aac, etc.) are stored in the device by default. For example, in some platforms it
31477 corresponds to the "My Music" folder. </li>
31479 videos: Describes the default folder in which video clips (such as
31480 avi, mp4, etc.) are stored in the device by default. For example, in some platforms
31481 it corresponds to the "My Videos" folder. </li>
31483 downloads: Describes the default folder in which files downloaded
31484 (such as by a browser, e-mail client, etc.) are stored by default in the
31485 device. For example, in some platforms it corresponds to the "Downloads" folder.
31488 ringtones: Describes the default folder in which ringtones (such as mp3, etc)
31489 are stored by default in the device. </li>
31491 wgt-package: Describes the read-only folder in which the content of
31492 the widget file was extracted to. </li>
31494 wgt-private: Describes a private folder in which a widget can
31495 store information. This folder MUST be accessible only to the
31496 widget. Other widgets or applications MUST NOT access the
31497 information stored there. </li>
31499 wgt-private-tmp: Describes a temporary, private folder in which a widget
31500 can store data that is available during one widget execution
31501 cycle. Content of this folder MAY be removed from this directory
31502 when the widget is closed or the Web Runtime is restarted.
31503 This folder MUST be accessible only to the widget. Other
31504 widgets or applications MUST NOT have access to it. </li>
31507 The mode parameter specifies whether the resulting File object
31508 has read-only access ("r" access), read and write access ("rw" access),
31509 append access ("a" access), or write access ("w" access)
31510 to the root location containing directory tree.
31511 Permission for the requested access is obtained from the security framework.
31512 Once the resulting File object has access, access is inherited by
31513 any other File objects derived from this instance without any
31514 further reference to the security framework, as noted in
31515 descriptions of certain methods of File.
31518 The ErrorCallback is launched with these error types:
31522 InvalidValuesError: If any of the input parameters contain an invalid value.
31523 For example, the mode is not valid (that is not "r", "rw", "a", or "w"). </li>
31525 NotFoundError: The location input argument does not correspond to a valid location. </li>
31527 UnknownError: In any other error case. </li>
31537 http://tizen.org/privilege/filesystem.read
31539 <Code> tizen.filesystem.resolve(
31542 console.log("Mount point Name is " + dir.path);
31544 console.log("Error: " + e.message);
31549 <Type type="void"/>
31551 <Argument name="location">
31554 Location to resolve.
31557 <Type type="DOMString"/>
31559 <Argument name="onsuccess">
31562 Called when the location has been.
31563 successfully resolved, passing the newly created File object.
31566 <Type name="FileSuccessCallback"/>
31568 <Argument optional="optional" name="onerror">
31571 Called if an error occurred.
31574 <Type name="ErrorCallback" nullable="nullable"/>
31576 <Argument optional="optional" name="mode">
31579 Optional string of value "r" to obtain read-only access,
31580 "rw" to obtain read and write access, "a" to obtain append access,
31581 or "w" to obtain write access to all files and
31582 directories that can be reached from the File object passed
31583 to onsuccess. Defaults to "rw" if absent or <em>null</em>.
31586 <Type name="FileMode" nullable="nullable"/>
31590 <RaiseException name="WebAPIException">
31593 with error type TypeMismatchError, if the input parameter
31594 is not compatible with the expected type for that parameter.
31597 with error type SecurityError, if the application does not have the privilege to call this method.
31600 with error type NotSupportedError, if the feature is not supported.
31606 <Operation name="getStorage" id="::Filesystem::FileSystemManager::getStorage">
31607 <webidl> void getStorage(DOMString label,
31608 <ref>FileSystemStorageSuccessCallback</ref> onsuccess,
31609 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);</webidl>
31612 Gets information about a storage based on its label.
31616 Get storage information based on its label (example: "MyThumbDrive",
31617 "InternalFlash"). The onsuccess will receive as input argument the data
31618 structure containing additional information about the drive.
31621 The ErrorCallback is launched with these error types:
31625 NotFoundError: No drive was found with the given label. </li>
31627 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
31629 UnknownError: In any other error case. </li>
31639 http://tizen.org/privilege/filesystem.read
31641 <Code> function onStorage(storage) {
31645 function onStorageError(e) {
31646 console.log("Storage not found!" + e.message);
31649 tizen.filesystem.getStorage("music", onStorage, onStorageError);
31652 <Type type="void"/>
31654 <Argument name="label">
31660 <Type type="DOMString"/>
31662 <Argument name="onsuccess">
31665 Called when the list of storage is available,
31666 passing the storage list to the callback.
31669 <Type name="FileSystemStorageSuccessCallback"/>
31671 <Argument optional="optional" name="onerror">
31674 Called if an error occurred.
31677 <Type name="ErrorCallback" nullable="nullable"/>
31681 <RaiseException name="WebAPIException">
31684 with error type TypeMismatchError, if the input parameter
31685 is not compatible with the expected type for that parameter.
31688 with error type SecurityError, if the application does not have the privilege to call this method.
31691 with error type NotSupportedError, if the feature is not supported.
31697 <Operation name="listStorages" id="::Filesystem::FileSystemManager::listStorages">
31698 <webidl> void listStorages(<ref>FileSystemStorageArraySuccessCallback</ref> onsuccess,
31699 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);</webidl>
31702 Lists the available storages on the device.
31706 Get the list of available internal and external storage devices. The
31707 onsuccess will receive as input argument a list of the data
31708 structure containing additional information about each drive found.
31709 Can get storages would have a label named as 'internal0', virtual roots (images, documents,...), 'removable1', 'removable2'.
31710 'removable1' label would be used to resolve sdcard and 'removable2' label would be used to resolve usb host, if supported.
31711 The vfat filesystem used widly as sdcard filesystem is not case-sensitive.
31712 If you want to handle the file on sdcard, you need to consider case-sensitive filenames are regarded as same name.
31715 Labels can be different, depends on platform implementation.
31718 The ErrorCallback is launched with these error types:
31722 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
31724 UnknownError: In any other error case. </li>
31734 http://tizen.org/privilege/filesystem.read
31736 <Code> function alertForCorruptedRemovableDrives(storages) {
31737 for (var i = 0; i < storages.length; i++) {
31738 if (storages[i].type != "EXTERNAL")
31740 if (storages[i].state == "UNMOUNTABLE")
31741 console.log("External drive " + storages[i].label + " is corrupted.");
31745 tizen.filesystem.listStorages(alertForCorruptedRemovableDrives);
31748 <Type type="void"/>
31750 <Argument name="onsuccess">
31753 Called when the list of storage is available,
31754 passing the storage list to the callback.
31757 <Type name="FileSystemStorageArraySuccessCallback"/>
31759 <Argument optional="optional" name="onerror">
31762 Called if an error occurred.
31765 <Type name="ErrorCallback" nullable="nullable"/>
31769 <RaiseException name="WebAPIException">
31772 with error type TypeMismatchError, if the input parameter
31773 is not compatible with the expected type for that parameter.
31776 with error type SecurityError, if the application does not have the privilege to call this method.
31779 with error type NotSupportedError, if the feature is not supported.
31785 <Operation name="addStorageStateChangeListener" id="::Filesystem::FileSystemManager::addStorageStateChangeListener">
31786 <webidl> long addStorageStateChangeListener(<ref>FileSystemStorageSuccessCallback</ref> onsuccess,
31787 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);</webidl>
31790 Subscribes to notifications when a storage state changes.
31794 The most common usage for this method would be to watch notifications of
31795 additions and removals of external storages.
31798 When executed, the implementation MUST immediately return a subscription identifier that identifies
31799 the watch operation. After returning the identifier, the watch operation is started
31800 asynchronously. The onsuccess MUST be invoked every time
31801 a storage state changes. If the attempt fails, the onerror (if present)
31802 MUST be invoked with the relevant error type.
31805 The watch operation MUST continue until the removeStorageStateChangeListener() method is
31806 called with the corresponding subscription identifier.
31816 http://tizen.org/privilege/filesystem.write
31818 <Code> var watchID;
31819 function onStorageStateChanged(storage) {
31820 if (storage.state == "MOUNTED")
31821 console.log("Storage " + storage.label + " was added!");
31824 watchID = tizen.filesystem.addStorageStateChangeListener(onStorageStateChanged);
31830 long The identifier used to clear the watch subscription.
31835 <Argument name="onsuccess">
31838 To be invoked in every change on storage state.
31841 <Type name="FileSystemStorageSuccessCallback"/>
31843 <Argument optional="optional" name="onerror">
31846 To be invoked in case of error during the watch process.
31849 <Type name="ErrorCallback" nullable="nullable"/>
31853 <RaiseException name="WebAPIException">
31856 with error type TypeMismatchError, if any input parameter
31857 is not compatible with the expected type for that parameter.
31860 with error type SecurityError, if the application does not have the privilege to call this method.
31863 with error type NotSupportedError, if the feature is not supported.
31866 with error type UnknownError, if any other error case.
31872 <Operation name="removeStorageStateChangeListener" id="::Filesystem::FileSystemManager::removeStorageStateChangeListener">
31873 <webidl> void removeStorageStateChangeListener(long watchId) raises(<ref>WebAPIException</ref>);</webidl>
31876 Unsubscribes a storage watch operation.
31880 If the watchId argument is valid and corresponds to a subscription already in
31881 place, the watch process MUST immediately stop and no further callbacks MUST be
31892 http://tizen.org/privilege/filesystem.write
31894 <Code> var watchID;
31895 function onStorageStateChanged(storage) {
31896 if (storage.state == "MOUNTED")
31897 console.log("Storage " + storage.label + " was added!");
31898 tizen.filesystem.removeStorageStateChangeListener(watchID);
31901 watchID = tizen.filesystem.addStorageStateChangeListener(onStorageStateChanged);
31906 <Type type="void"/>
31908 <Argument name="watchId">
31911 Subscription Identifier.
31914 <Type type="long"/>
31918 <RaiseException name="WebAPIException">
31921 with error type TypeMismatchError, if any input parameter
31922 is not compatible with the expected type for that parameter.
31925 with error type InvalidValuesError, if any of the input
31926 parameters contain an invalid value.
31929 with error type SecurityError, if the application does not have the privilege to call this method.
31932 with error type NotSupportedError, if the feature is not supported.
31935 with error type UnknownError, if any other error case.
31938 with error type NotFoundError, if the watchId does not exist.
31945 <Interface name="FileSystemStorage" id="::Filesystem::FileSystemStorage">
31946 <webidl> [NoInterfaceObject] interface FileSystemStorage {
31947 readonly attribute DOMString label;
31949 readonly attribute <ref>FileSystemStorageType</ref> type;
31951 readonly attribute <ref>FileSystemStorageState</ref> state;
31955 The FileSystemStorage interface.
31959 This interface gives additional information about a storage, such as if the
31960 device is mounted, if it's a removable drive or not, or the device's name.
31961 To retrieve the mount point, the resolve() method should be used using
31962 the label as argument.
31969 <ExtendedAttributeList>
31970 <ExtendedAttribute name="NoInterfaceObject">
31971 <webidl>NoInterfaceObject</webidl>
31972 </ExtendedAttribute>
31973 </ExtendedAttributeList>
31974 <Attribute readonly="readonly" name="label" id="::Filesystem::FileSystemStorage::label">
31975 <webidl> readonly attribute DOMString label;</webidl>
31982 Used as input for functions like getStorage() and also used as 'location' parameter for File.resolve() and FileSystemManager.resolve().
31989 <Type type="DOMString"/>
31991 <Attribute readonly="readonly" name="type" id="::Filesystem::FileSystemStorage::type">
31992 <webidl> readonly attribute <ref>FileSystemStorageType</ref> type;</webidl>
31999 Defines whether the storage is internal or external.
32006 <Type name="FileSystemStorageType"/>
32008 <Attribute readonly="readonly" name="state" id="::Filesystem::FileSystemStorage::state">
32009 <webidl> readonly attribute <ref>FileSystemStorageState</ref> state;</webidl>
32016 Defines whether the storage is mounted or not.
32023 <Type name="FileSystemStorageState"/>
32026 <Interface name="File" id="::Filesystem::File">
32027 <webidl> [NoInterfaceObject] interface File {
32028 readonly attribute <ref>File</ref>? parent;
32030 readonly attribute boolean readOnly;
32032 readonly attribute boolean isFile;
32034 readonly attribute boolean isDirectory;
32036 readonly attribute Date? created;
32038 readonly attribute Date? modified;
32040 readonly attribute DOMString path;
32042 readonly attribute DOMString name;
32044 readonly attribute DOMString fullPath;
32046 readonly attribute unsigned long long fileSize;
32048 readonly attribute long length;
32050 DOMString toURI() raises(<ref>WebAPIException</ref>);
32052 void listFiles(<ref>FileArraySuccessCallback</ref> onsuccess,
32053 optional <ref>ErrorCallback</ref>? onerror,
32054 optional <ref>FileFilter</ref>? filter) raises(<ref>WebAPIException</ref>);
32056 void openStream(<ref>FileMode</ref> mode,
32057 <ref>FileStreamSuccessCallback</ref> onsuccess,
32058 optional <ref>ErrorCallback</ref>? onerror,
32059 optional DOMString? encoding) raises(<ref>WebAPIException</ref>);
32061 void readAsText(<ref>FileStringSuccessCallback</ref> onsuccess,
32062 optional <ref>ErrorCallback</ref>? onerror,
32063 optional DOMString? encoding) raises(<ref>WebAPIException</ref>);
32065 void copyTo(DOMString originFilePath,
32066 DOMString destinationFilePath,
32068 optional <ref>SuccessCallback</ref>? onsuccess,
32069 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
32071 void moveTo(DOMString originFilePath,
32072 DOMString destinationFilePath,
32074 optional <ref>SuccessCallback</ref>? onsuccess,
32075 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
32077 <ref>File</ref> createDirectory(DOMString dirPath) raises(<ref>WebAPIException</ref>);
32079 <ref>File</ref> createFile(DOMString relativeFilePath) raises(<ref>WebAPIException</ref>);
32081 <ref>File</ref> resolve(DOMString filePath) raises(<ref>WebAPIException</ref>);
32083 void deleteDirectory(DOMString directoryPath,
32085 optional <ref>SuccessCallback</ref>? onsuccess,
32086 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
32088 void deleteFile(DOMString filePath,
32089 optional <ref>SuccessCallback</ref>? onsuccess,
32090 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
32094 The file interface.
32098 This interface represents the file abstraction in use.
32099 A file handle represents a file
32100 if the isFile property is <em>true</em>, if the isFile property is <em>false</em>, the file
32101 handle represents a directory.
32102 If a file handle represents a directory, it can address files and directories.
32105 The file object permissions for the file object location and tree rooted
32106 at that location depends upon the mode defined in the resolve method.
32107 When a File object creates a child File object,
32108 the new File object inherits its access rights from
32109 the parent object without any reference to the security framework, as
32110 noted in certain methods of File.
32113 A file handle representing a file can be opened for I/O operations,
32114 such as reading and writing.
32117 A file handle representing a directory can be used for listing all
32118 files and directories rooted as the file handle location.
32124 <Code> function onsuccess(files) {
32125 for(var i = 0; i < files.length; i++) {
32126 // alerts each name of dir's contents
32127 console.log(files[i].name);
32131 function onerror(error) {
32132 console.log("The error " + error.message +
32133 " occurred when listing the files in the selected folder");
32136 // list directory contents
32137 dir.listFiles(onsuccess, onerror);
32140 <ExtendedAttributeList>
32141 <ExtendedAttribute name="NoInterfaceObject">
32142 <webidl>NoInterfaceObject</webidl>
32143 </ExtendedAttribute>
32144 </ExtendedAttributeList>
32145 <Attribute readonly="readonly" name="parent" id="::Filesystem::File::parent">
32146 <webidl> readonly attribute <ref>File</ref>? parent;</webidl>
32149 The parent directory handle.
32153 <em>null</em> if there is no parent directory.
32156 If there is no parent directory, this represents a root location.
32162 <Code> // list directory contents
32163 dir.listFiles(onsuccess, onerror);
32165 function onsuccess(files) {
32166 for(var i = 0; i < files.length; i++) {
32167 // prints the file parent, should contain the
32168 // same value for all the files in the loop
32169 console.log("All the files should have the same parent " +
32174 function onerror(error){
32175 console.log("The error " + error.message +
32176 " occurred when listing the files in the selected folder");
32180 <Type name="File" nullable="nullable"/>
32182 <Attribute readonly="readonly" name="readOnly" id="::Filesystem::File::readOnly">
32183 <webidl> readonly attribute boolean readOnly;</webidl>
32186 The file/directory access state in the filesystem.
32190 <em>true</em> if object has read-only access at its location.
32193 <em>false</em> if object has write access at its location.
32196 This attribute represents the actual state of a
32197 file or directory in the filesystem. Its value is not affected by
32198 the mode used in FileSystemManager.resolve that was used to
32199 create the File object from which this File object was obtained.
32205 <Code> // list directory contents
32206 dir.listFiles(onsuccess, onerror);
32208 function onsuccess(files) {
32209 for(var i = 0; i < files.length; i++) {
32210 if(files[i].readOnly)
32211 console.log("Cannot write to file " + files[i].name);
32213 console.log("Can write to file " + files[i].name);
32217 function onerror(error) {
32218 console.log("The error " + error.message + " occurred when listing the files in the selected folder");
32222 <Type type="boolean"/>
32224 <Attribute readonly="readonly" name="isFile" id="::Filesystem::File::isFile">
32225 <webidl> readonly attribute boolean isFile;</webidl>
32232 <em>true</em> if this handle is a file.
32233 <em>false</em> if this handle is a directory.
32240 <Type type="boolean"/>
32242 <Attribute readonly="readonly" name="isDirectory" id="::Filesystem::File::isDirectory">
32243 <webidl> readonly attribute boolean isDirectory;</webidl>
32250 <em>true</em> if this handle is a directory,
32251 <em>false</em> if this handle is a file.
32258 <Type type="boolean"/>
32260 <Attribute readonly="readonly" name="created" id="::Filesystem::File::created">
32261 <webidl> readonly attribute Date? created;</webidl>
32264 The creation timestamp of this file.
32268 This is the timestamp when the file was first created in the filesystem.
32269 Equivalent to the timestamp when a call to createFile() succeeds.
32272 If the platform does not support this attribute, it MUST
32276 It is unspecified and platform-dependent if the creation
32277 timestamp changes when a file is moved.
32284 <Type type="Date" nullable="nullable"/>
32286 <Attribute readonly="readonly" name="modified" id="::Filesystem::File::modified">
32287 <webidl> readonly attribute Date? modified;</webidl>
32290 The modification timestamp.
32294 The modification timestamp of this file. This is the timestamp
32295 of the most recent modification to the file, usually when the last
32296 write operation succeeded. Opening a file for reading does not change
32297 the modification timestamp.
32300 If the platform does not support this attribute, it MUST
32304 It is unspecified and platform-dependent if the modified
32305 timestamp changes when a file is moved.
32311 <Code> console.log(file.modified); // displays the modification timestamp
32314 <Type type="Date" nullable="nullable"/>
32316 <Attribute readonly="readonly" name="path" id="::Filesystem::File::path">
32317 <webidl> readonly attribute DOMString path;</webidl>
32320 The path of this file, excluding the file name.
32324 This is the path of this file, beginning with the name of the root containing the file,
32325 up to and including the directory containing the file, but excluding the file name.
32328 Except in a special case of the File representing the root itself, the last
32329 character is always the character '/'.
32332 For example, if a file is located at music/ramones/volume1/RockawayBeach.mp3,
32333 the path would be music/ramones/volume1/.
32336 For example, if a directory is located at music/ramones/volume1, the path would be
32340 For the virtual roots, the path is same as the name of the virtual root.
32341 For example, if the root is music, then the path is music. If the root is documents, then the path is documents.
32347 <Code> console.log(file.path); // should be 'music/' if the file is music/foo.mp3
32350 <Type type="DOMString"/>
32352 <Attribute readonly="readonly" name="name" id="::Filesystem::File::name">
32353 <webidl> readonly attribute DOMString name;</webidl>
32356 The file name, excluding any path components.
32360 This is the name of this file, excluding the root name and any other path components.
32363 For example, if a file is located at
32364 music/ramones/volume1/RockawayBeach.mp3, the name would be RockawayBeach.mp3.
32367 For example, if a directory is located at music/ramones/volume1, the
32368 name would be volume1.
32371 For the special case of the root itself, the name is an empty string.
32377 <Code> console.log(file.name); // should be foo.mp3 if the file path is music/foo.mp3
32380 <Type type="DOMString"/>
32382 <Attribute readonly="readonly" name="fullPath" id="::Filesystem::File::fullPath">
32383 <webidl> readonly attribute DOMString fullPath;</webidl>
32386 The full path of this file.
32390 The full path of this file, beginning with the name of the root containing the file,
32391 and including the name of the file or directory itself.
32394 For instance, for a file, if the file is located at
32395 music/ramones/volume1/RockawayBeach.mp3, then the fullPath is
32396 music/ramones/volume1/RockawayBeach.mp3.
32399 For a directory, if the directory is located at music/ramones/volume1, then the
32400 fullPath is music/ramones/volume1.
32403 For the special case of the root itself, if the root is music, then the fullPath is
32407 The fullPath is always equal to path + name.
32413 <Code> console.log(file.fullPath); // should be music/track1.mp3 if the file is music/track1.mp3
32416 <Type type="DOMString"/>
32418 <Attribute readonly="readonly" name="fileSize" id="::Filesystem::File::fileSize">
32419 <webidl> readonly attribute unsigned long long fileSize;</webidl>
32422 The size of this file, in bytes.
32426 If there's an attempt to read this attribute on a directory,
32427 <em>undefined</em> is returned. To retrieve the
32428 number of files and directories contained in the directory,
32429 use the length attribute, instead.
32435 <Code> console.log(file.fileSize); // displays the file size
32438 <Type type="unsigned long long"/>
32440 <Attribute readonly="readonly" name="length" id="::Filesystem::File::length">
32441 <webidl> readonly attribute long length;</webidl>
32444 The number of files and directories contained in this file handle.
32448 If there's an attempt to read this attribute on a file,
32449 <em>undefined</em> is returned. To retrieve the
32450 size of a file, use the fileSize attribute instead.
32456 <Code> console.log(file.length); // '3' if the directory contains two files and one sub-directory
32459 <Type type="long"/>
32461 <Operation name="toURI" id="::Filesystem::File::toURI">
32462 <webidl> DOMString toURI() raises(<ref>WebAPIException</ref>);</webidl>
32465 Returns a URI for the file.
32469 Returns a URI that can be used to identify this entry (such as using it
32470 as the src attribute on an HTML img element). The URI has no specific
32471 expiration, it should be valid at least as long as the file exists.
32474 When this method is invoked, the implementation MUST generate a URI.
32477 If that URI corresponds to any of the public virtual roots (that is
32478 images, videos, music, documents, and downloads) the URI
32479 MUST be globally unique and could be used by any widget.
32482 If that URI corresponds to a file located in any of the widget private
32483 areas (such as wgt-package, wgt-private, wgt-private-tmp). The generated
32484 URI MUST be unique for that file and for the widget making the request
32485 (such as including some derived from the widget id in the URI).
32486 These URIs MUST NOT be accessible to other widgets,
32487 apart from the one invoking this method.
32497 http://tizen.org/privilege/filesystem.read
32499 <Code> // 'file:///opt/usr/media/music/ramones/RockawayBeach.mp3' if the file is
32500 // music/ramones/RockawayBeach.mp3
32501 console.log(file.toURI());
32504 <Type type="DOMString">
32507 DOMString The URI that identifies the file or <em>null</em> if an error occurs.
32513 <RaiseException name="WebAPIException">
32516 with error type NotSupportedError, if the feature is not supported.
32519 with error type SecurityError, if the application does not have the privilege to call this method.
32522 with error type UnknownError in any other error situation.
32528 <Operation name="listFiles" id="::Filesystem::File::listFiles">
32529 <webidl> void listFiles(<ref>FileArraySuccessCallback</ref> onsuccess,
32530 optional <ref>ErrorCallback</ref>? onerror,
32531 optional <ref>FileFilter</ref>? filter) raises(<ref>WebAPIException</ref>);</webidl>
32534 Returns the list of all files in this directory.
32538 The list of files will be passed as a File[] in the onsuccess
32539 and contains directories and files. However, the directories "." and ".."
32540 MUST NOT be returned. Each File object part of the array MUST inherit
32541 all the access rights (that is one of the values in FileMode) from the File object in which
32542 this method was invoked.
32545 If the filter is passed and contains valid values, only those directories
32546 and files in the directory that match the filter criteria specified
32547 in the FileFilter interface MUST be returned in the onsuccess.
32548 If no filter is passed, the filter is <em>null</em> or undefined, or the filter contains invalid
32549 values, the implementation MUST return the full list of files in the directory.
32552 If the directory does not contain any files or directories, or
32553 the filter criteria is unmatched to any files or directories, the onsuccess will be
32554 invoked with an empty array.
32557 The ErrorCallback is launched with these error types:
32561 IOError: The operation is launched on a file (not a directory). </li>
32563 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
32565 UnknownError: In any other error case. </li>
32575 http://tizen.org/privilege/filesystem.read
32577 <Code> function onsuccess(files) {
32578 console.log("There are " + files.length + " in the selected folder");
32581 function onerror(error) {
32582 console.log("The error " + error.message + " occurred when listing the files in the selected folder");
32585 tizen.filesystem.resolve(
32586 "documents",
32588 dir.listFiles(onsuccess, onerror);
32590 console.log("Error " + e.message);
32595 <Type type="void"/>
32597 <Argument name="onsuccess">
32600 Called when the list operation has been successfully completed.
32603 <Type name="FileArraySuccessCallback"/>
32605 <Argument optional="optional" name="onerror">
32608 Called if an error occurred.
32611 <Type name="ErrorCallback" nullable="nullable"/>
32613 <Argument optional="optional" name="filter">
32616 Used to restrict the listed files.
32619 <Type name="FileFilter" nullable="nullable"/>
32623 <RaiseException name="WebAPIException">
32626 with error type TypeMismatchError, if the input parameter
32627 is not compatible with the expected type for that parameter.
32630 with error type SecurityError, if the application does not have the privilege to call this method.
32633 with error type NotSupportedError, if the feature is not supported.
32639 <Operation name="openStream" id="::Filesystem::File::openStream">
32640 <webidl> void openStream(<ref>FileMode</ref> mode,
32641 <ref>FileStreamSuccessCallback</ref> onsuccess,
32642 optional <ref>ErrorCallback</ref>? onerror,
32643 optional DOMString? encoding) raises(<ref>WebAPIException</ref>);</webidl>
32646 Opens the file in the given mode supporting the given
32651 This operation is performed asynchronously. If the file is opened
32652 successfully, the onsuccess is invoked with a FileStream
32653 that can be used for reading and writing the file, depending on the
32654 mode. The return FileStream instance includes a file pointer, which represents
32655 the current position in the file. The filepointer will, by default, be at the start of the file,
32656 except in the case of opening with append ("a") mode, in which case
32657 the filepointer points to the end of the file.
32660 The ErrorCallback is launched with these error types:
32664 InvalidValuesError: If any of the input parameters contains an invalid value. </li>
32666 IOError: The operation is launched on a directory (not a file), the file is not
32667 valid or it does not exist. </li>
32669 UnknownError: In any other error case. </li>
32679 http://tizen.org/privilege/filesystem.read
32681 <Code> var documentsDir;
32682 function onsuccess(files) {
32683 for(var i = 0; i < files.length; i++) {
32684 console.log("File Name is " + files[i].name); // displays file name
32687 var testFile = documentsDir.createFile("test.txt");
32688 if (testFile != null) {
32689 testFile.openStream(
32692 fs.write("HelloWorld");
32695 console.log("Error " + e.message);
32696 }, "UTF-8"
32701 function onerror(error) {
32702 console.log("The error " + error.message + " occurred when listing the files in the selected folder");
32705 tizen.filesystem.resolve(
32708 documentsDir = dir; dir.listFiles(onsuccess,onerror);
32710 console.log("Error" + e.message);
32715 <Type type="void"/>
32717 <Argument name="mode">
32720 The mode for opening a file:
32721 <b>"r"</b> for reading
32722 <b>"a"</b> for appending
32723 <b>"w"</b> for [over]writing
32724 <b>"rw"</b> for reading and writing
32727 <Type name="FileMode"/>
32729 <Argument name="onsuccess">
32732 Called when the file has been opened.
32735 <Type name="FileStreamSuccessCallback"/>
32737 <Argument optional="optional" name="onerror">
32740 Called if an error occurred.
32743 <Type name="ErrorCallback" nullable="nullable"/>
32745 <Argument optional="optional" name="encoding">
32748 The encoding for read/write operations on the file,
32749 at least the following encodings MUST be supported:
32750 "<a href="http://www.ietf.org/rfc/rfc2279.txt">UTF-8</a>" default encoding,
32751 "<a href="http://en.wikipedia.org/wiki/ISO/IEC_8859-1">ISO-8859-1</a>" latin1 encoding.
32752 If no encoding is passed by the developer, then the default platform encoding
32756 <Type type="DOMString" nullable="nullable"/>
32760 <RaiseException name="WebAPIException">
32763 with error type TypeMismatchError, if the input parameter
32764 is not compatible with the expected type for that parameter.
32767 with error type SecurityError, if the application does not have the privilege to call this method.
32770 with error type NotSupportedError, if the feature is not supported.
32776 <Operation name="readAsText" id="::Filesystem::File::readAsText">
32777 <webidl> void readAsText(<ref>FileStringSuccessCallback</ref> onsuccess,
32778 optional <ref>ErrorCallback</ref>? onerror,
32779 optional DOMString? encoding) raises(<ref>WebAPIException</ref>);</webidl>
32782 Reads the content of a file as a DOMString.
32786 If the operation is successfully executed, the onsuccess is
32787 invoked and a DOMString is passed as input parameter that represents
32788 the file content in the format determined by the encoding parameter.
32791 The ErrorCallback is launched with these error types:
32795 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
32797 IOError: The operation is launched on a directory (not a file), the file is not
32798 valid, or the file does not exist. </li>
32800 UnknownError: In any other error case. </li>
32810 http://tizen.org/privilege/filesystem.read
32812 <Code> function onsuccess(files) {
32813 for(var i = 0; i < files.length; i++) {
32814 console.log("File Name is " + files[i].name); // displays file name
32815 if (files[i].isDirectory == false)
32816 files[i].readAsText(
32818 console.log("The file content " + str);
32820 console.log("Error " + e.message);
32821 }, "UTF-8"
32826 function onerror(error) {
32827 console.log("The error " + error.message + " occurred when listing the files in the selected folder");
32831 tizen.filesystem.resolve(
32834 documentsDir = dir;
32835 dir.listFiles(onsuccess,onerror);
32837 console.log("Error" + e.message);
32842 <Type type="void"/>
32844 <Argument name="onsuccess">
32847 Called when the file has been successfully read.
32850 <Type name="FileStringSuccessCallback"/>
32852 <Argument optional="optional" name="onerror">
32855 If an error occurs while reading the file.
32858 <Type name="ErrorCallback" nullable="nullable"/>
32860 <Argument optional="optional" name="encoding">
32863 The encoding for read/write operations on the file,
32864 at least the following encodings MUST be supported:
32865 "<a href="http://www.ietf.org/rfc/rfc2279.txt">UTF-8</a>" default encoding,
32866 "<a href="http://en.wikipedia.org/wiki/ISO/IEC_8859-1">ISO-8859-1</a>" latin1 encoding.
32867 If no encoding is passed by the developer, then the default platform
32868 encoding MUST be used.
32871 <Type type="DOMString" nullable="nullable"/>
32875 <RaiseException name="WebAPIException">
32878 with error type TypeMismatchError, if the input parameter
32879 is not compatible with the expected type for that parameter.
32882 with error type SecurityError, if the application does not have the privilege to call this method.
32885 with error type NotSupportedError, if the feature is not supported.
32891 <Operation name="copyTo" id="::Filesystem::File::copyTo">
32892 <webidl> void copyTo(DOMString originFilePath,
32893 DOMString destinationFilePath,
32895 optional <ref>SuccessCallback</ref>? onsuccess,
32896 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);</webidl>
32899 Copies (and overwrites if possible and specified) a file or a
32900 directory from a specified location to another specified location.
32904 The copy of the file or directory identified by the originFilePath parameter
32905 MUST be created in the path passed in the destinationFilePath parameter.
32908 The file or directory to be copied MUST be under the Directory from which the method
32909 is invoked, otherwise the operation MUST NOT be performed.
32912 If the copy is performed successfully, the onsuccess is invoked.
32915 The ErrorCallback is launched with these error types:
32919 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
32921 NotFoundError: originFilePath does not correspond to a valid file or destinationPath is not a valid path. </li>
32923 IOError: The File in which the copyTo method is invoked is a file (not a directory),
32924 originFilePath corresponds to a file or directory in use by another process,
32925 overwrite parameter is <em>false</em> and destinationFilePath corresponds to an existing
32926 file or directory. </li>
32928 UnknownError: In any other error case. </li>
32938 http://tizen.org/privilege/filesystem.write
32940 <Code> var documentsDir;
32941 function onsuccess(files) {
32942 for(var i = 0; i < files.length; i++) {
32943 if (files[i].isDirectory == false) {
32944 documentsDir.copyTo(files[i].fullPath,
32945 "images/backup/" + files[i].name,
32947 function(){console.log("file copied");});
32952 function onerror(error) {
32953 console.log("The error " + error.message +
32954 " occurred when listing the files in the selected folder");
32957 tizen.filesystem.resolve(
32960 documentsDir = dir;
32961 dir.listFiles(onsuccess, onerror);
32963 console.log("Error" + e.message);
32968 <Type type="void"/>
32970 <Argument name="originFilePath">
32973 The origin full virtual file or directory path, it must be under the current directory.
32976 <Type type="DOMString"/>
32978 <Argument name="destinationFilePath">
32981 The new full virtual file path or directory path.
32984 <Type type="DOMString"/>
32986 <Argument name="overwrite">
32989 <em>true</em> enforces overwriting an existing file.
32992 <Type type="boolean"/>
32994 <Argument optional="optional" name="onsuccess">
32997 Called when the file has been copied.
33000 <Type name="SuccessCallback" nullable="nullable"/>
33002 <Argument optional="optional" name="onerror">
33005 Called if an error occurred.
33008 <Type name="ErrorCallback" nullable="nullable"/>
33012 <RaiseException name="WebAPIException">
33015 with error type TypeMismatchError, if the input parameter
33016 is not compatible with the expected type for that parameter.
33019 with error type SecurityError, if the application does not have the privilege to call this method.
33022 with error type NotSupportedError, if the feature is not supported.
33028 <Operation name="moveTo" id="::Filesystem::File::moveTo">
33029 <webidl> void moveTo(DOMString originFilePath,
33030 DOMString destinationFilePath,
33032 optional <ref>SuccessCallback</ref>? onsuccess,
33033 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);</webidl>
33036 Moves a file or a directory from a specified location to another.
33040 The file or directory will be moved (and will overwrite if possible and specified)
33041 atomically to the given path. This operation is different from
33042 instantiating copyTo and then deleting the original file, as on certain
33043 platforms, this operation does not require extra disk space.
33046 The file or directory identified by the originFilePath parameter
33047 MUST be moved to the path passed in the destinationFilePath parameter.
33050 The file to be moved MUST be under the Directory from which the method
33051 is invoked, otherwise the operation MUST NOT be performed.
33054 If the file or directory is moved successfully, the onsuccess is
33058 The ErrorCallback is launched with these error types:
33062 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
33064 NotFoundError: originFilePath does not correspond to a valid file or destinationPath is not a valid path. </li>
33066 IOError: The File in which the moveTo method is invoked is a file (not a directory),
33067 originFilePath corresponds to a file or directory in use by another process,
33068 overwrite parameter is <em>false</em> and destinationFilePath corresponds to an existing
33069 file or directory. </li>
33071 UnknownError: In any other error case. </li>
33081 http://tizen.org/privilege/filesystem.write
33083 <Code> var documentsDir;
33084 function onsuccess(files) {
33085 for(var i = 0; i < files.length; i++) {
33086 if (files[i].isDirectory == false) {
33087 documentsDir.moveTo(files[i].fullPath,
33088 "images/newFolder/" + files[i].name,
33090 function(){console.log("file moved");});
33095 function onerror(error) {
33096 console.log("The error " + error.message +
33097 " occurred during listing the files in the selected folder");
33100 tizen.filesystem.resolve(
33103 documentsDir = dir;
33104 dir.listFiles(onsuccess, onerror);
33106 console.log("Error" + e.message);
33111 <Type type="void"/>
33113 <Argument name="originFilePath">
33116 The origin full virtual file or directory path, it must be under the current directory.
33119 <Type type="DOMString"/>
33121 <Argument name="destinationFilePath">
33124 The new full virtual file path or directory path.
33127 <Type type="DOMString"/>
33129 <Argument name="overwrite">
33132 <em>true</em> enforces overwriting an existing file.
33135 <Type type="boolean"/>
33137 <Argument optional="optional" name="onsuccess">
33140 Called when the file has been moved.
33143 <Type name="SuccessCallback" nullable="nullable"/>
33145 <Argument optional="optional" name="onerror">
33148 Called if an error occurred.
33151 <Type name="ErrorCallback" nullable="nullable"/>
33155 <RaiseException name="WebAPIException">
33158 with error type TypeMismatchError, if the input parameter
33159 is not compatible with the expected type for that parameter.
33162 with error type SecurityError, if the application does not have the privilege to call this method.
33165 with error type NotSupportedError, if the feature is not supported.
33171 <Operation name="createDirectory" id="::Filesystem::File::createDirectory">
33172 <webidl> <ref>File</ref> createDirectory(DOMString dirPath) raises(<ref>WebAPIException</ref>);</webidl>
33175 Creates a new directory.
33179 A new directory will be created relative to the current
33180 directory that this operation is performed on. The implementation will attempt to
33181 create all necessary sub-directories specified in the dirPath, as well. The use of "."
33182 or ".." in path components is not supported.
33185 This operation can only be performed on file handlers that
33186 represent a directory (that is, <var>isDirectory == true</var>).
33189 If the directory is successfully created, it will be returned.
33192 In case the directory cannot be created, an error MUST be thrown
33193 with the appropriate error type.
33203 http://tizen.org/privilege/filesystem.write
33205 <Code> var dir; //Directory object obtained from filesystem API
33206 var newDir = dir.createDirectory("newDir");
33207 var anotherNewDir = dir.createDirectory("newDir1/subNewDir1");
33213 File The file handle of the new directory. The new File object
33214 will have "rw" access rights, as it inherits this from
33215 the File object on which the createDirectory() method is
33221 <Argument name="dirPath">
33224 The relative directory path, it should only contain
33225 characters supported by the underlying filesystem.
33228 <Type type="DOMString"/>
33232 <RaiseException name="WebAPIException">
33235 with error type IOError, if the dirPath already exists.
33238 with error type InvalidValuesError, if the dirPath does not contain a valid path.
33241 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
33244 with error type SecurityError, if the application does not have the privilege to call this method.
33247 with error type NotSupportedError, if the feature is not supported.
33250 with error type UnknownError in any other error case.
33256 <Operation name="createFile" id="::Filesystem::File::createFile">
33257 <webidl> <ref>File</ref> createFile(DOMString relativeFilePath) raises(<ref>WebAPIException</ref>);</webidl>
33260 Creates a new empty file in a specified location.
33264 A new empty file is created in the given path relative
33265 to the directory indicated by current 'File' object's 'path' attribute.
33266 The use of "." or ".." in path components is not supported.
33267 This operation can only be performed on file handlers that
33268 represent a directory (that is, <var>isDirectory == true</var>).
33271 If the file is successfully created, a file handler MUST
33272 be returned by this method.
33275 In case the file cannot be created, an error MUST be thrown
33276 with the appropriate error type.
33286 http://tizen.org/privilege/filesystem.write
33288 <Code> var newFile = dir.createFile("newFilePath");
33294 File The file handle of the new empty file. The new File object
33295 will have "rw" access rights, as it inherits this from
33296 the File object on which the createFile() method is
33302 <Argument name="relativeFilePath">
33305 The new file path, it should only contain characters supported by the underlying filesystem.
33308 <Type type="DOMString"/>
33312 <RaiseException name="WebAPIException">
33315 with error type IOError, if the filePath already exists.
33318 with error type InvalidValuesError, if the filePath contains an invalid value.
33321 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
33324 with error type SecurityError, if the application does not have the privilege to call this method.
33327 with error type NotSupportedError, if the feature is not supported.
33330 with error type UnknownError, in any other error case.
33336 <Operation name="resolve" id="::Filesystem::File::resolve">
33337 <webidl> <ref>File</ref> resolve(DOMString filePath) raises(<ref>WebAPIException</ref>);</webidl>
33340 Resolves an existing file or directory relative to
33341 the current directory this operation is performed on, and
33342 returns a file handle for it.
33346 The filePath is not allowed to contain the "." or ".." directories.
33349 The encoding of file paths is <a href="http://www.ietf.org/rfc/rfc2279.txt">UTF-8</a>.
33359 http://tizen.org/privilege/filesystem.read
33362 // Resolves helloWorld.doc file that is located in the
33363 // documents root location
33364 tizen.filesystem.resolve(
33366 function(dir){ file = dir.resolve("helloWorld.doc");},
33367 function(e){ console.log("Error" + e.message);},
33374 File The file handle of the file. The new File object will inherit its access
33375 rights from the File object on which this resolve() method
33381 <Argument name="filePath">
33384 The relative file/directory path/file URI to resolve.
33387 <Type type="DOMString"/>
33391 <RaiseException name="WebAPIException">
33394 with error type TypeMismatchError, if the input parameter
33395 is not compatible with the expected type for that parameter.
33398 with error type InvalidValuesError, if the file path contains an
33402 with error type IOError, if the method is executed in a File object
33403 that does not represent a directory (that is, isDirectory attribute is false).
33406 with error type NotFoundError, if a file does not exist for the passed
33410 with error type SecurityError, if the application does not have the privilege to call this method.
33413 with error type NotSupportedError, if the feature is not supported.
33416 with error type UnknownError in any other error case.
33422 <Operation name="deleteDirectory" id="::Filesystem::File::deleteDirectory">
33423 <webidl> void deleteDirectory(DOMString directoryPath,
33425 optional <ref>SuccessCallback</ref>? onsuccess,
33426 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);</webidl>
33429 Deletes a specified directory and directory tree if specified.
33433 This function attempts to asynchronously delete a directory or directory tree under the current
33437 If the recursive parameter is set to <em>true</em>, all the directories and files under the specified
33438 directory MUST be deleted. If the recursive parameter is set to false, the directory will
33439 only be deleted if it is empty, otherwise an IOError error type will be passed in onerror.
33442 The directory to be deleted MUST be under the Directory that the method
33443 is invoked from, otherwise the operation MUST NOT be performed.
33444 If the deletion is performed successfully, the onsuccess is invoked.
33447 The ErrorCallback is launched with these error types:
33451 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
33453 NotFoundError: The passed directory does not correspond to a valid directory. </li>
33455 IOError: The File in which the delete method is invoked
33456 is a file (not a directory), the directory is in use by another process
33457 or the directory is not empty and recursive argument is <em>false</em>.
33458 This code will be also used if a recursive deletion partially fails
33459 and any data deleted so far cannot be recovered. This may occur
33460 due to the lack of filesystem permissions or if any
33461 directories or files are opened by other processes. </li>
33463 UnknownError: In any other error case. </li>
33473 http://tizen.org/privilege/filesystem.write
33475 <Code> var documentsDir;
33476 function onsuccess(files) {
33477 for(var i = 0; i < files.length; i++) {
33478 if (files[i].isDirectory) {
33479 documentsDir.deleteDirectory(
33483 console.log("Directory Deleted");
33485 console.log("Error" + e.message);
33488 documentsDir.deleteFile(
33491 console.log("File Deleted");
33493 console.log("Error" + e.message);
33499 function onerror(error) {
33500 console.log("The error " + error.message + " occurred when listing the files in the selected folder");
33503 tizen.filesystem.resolve(
33506 documentsDir = dir;
33507 dir.listFiles(onsuccess,onerror);
33509 console.log("Error" + e.message);
33514 <Type type="void"/>
33516 <Argument name="directoryPath">
33519 The full virtual path to the directory to be deleted (must be under the current one).
33522 <Type type="DOMString"/>
33524 <Argument name="recursive">
33527 <em>true</em> means a recursive deletion. This
33528 will delete all data in all subdirectories. Use with caution.
33531 <Type type="boolean"/>
33533 <Argument optional="optional" name="onsuccess">
33536 Called if the directory is successfully deleted.
33539 <Type name="SuccessCallback" nullable="nullable"/>
33541 <Argument optional="optional" name="onerror">
33544 Called if an error occurred.
33547 <Type name="ErrorCallback" nullable="nullable"/>
33551 <RaiseException name="WebAPIException">
33554 with error type TypeMismatchError, if the input parameter
33555 is not compatible with the expected type for that parameter.
33558 with error type SecurityError, if the application does not have the privilege to call this method.
33561 with error type NotSupportedError, if the feature is not supported.
33567 <Operation name="deleteFile" id="::Filesystem::File::deleteFile">
33568 <webidl> void deleteFile(DOMString filePath,
33569 optional <ref>SuccessCallback</ref>? onsuccess,
33570 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);</webidl>
33573 Deletes a specified file.
33577 This function attempts to asynchronously delete a file under the current directory.
33580 The file to be deleted MUST be under the Directory from which the method
33581 is invoked, otherwise the operation MUST NOT be performed.
33584 If the deletion is performed successfully, the onsuccess is invoked.
33587 The ErrorCallback is launched with these error types:
33591 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
33593 NotFoundError: The file does not correspond to a valid file. </li>
33595 IOError: The file in which the delete method is invoked
33596 is a directory (not a file), the file is in use by another process,
33597 or there is no permission in the file system. </li>
33599 UnknownError: In any other error case. </li>
33609 http://tizen.org/privilege/filesystem.write
33611 <Code> function onsuccess(files) {
33612 for(var i = 0; i < files.length; i++) {
33613 if (files[i].isDirectory) {
33614 documentsDir.deleteDirectory(
33618 console.log("Directory Deleted");
33620 console.log("Error" + e.message);
33623 documentsDir.deleteFile(
33626 console.log("File Deleted");
33628 console.log("Error" + e.message);
33634 function onerror(error) {
33635 console.log("The error " + error.message + " occurred when listing the files in the selected folder");
33639 tizen.filesystem.resolve(
33642 documentsDir = dir;
33643 dir.listFiles(onsuccess,onerror);
33645 console.log("Error" + e.message);
33650 <Type type="void"/>
33652 <Argument name="filePath">
33655 The full virtual path to the file to be deleted (must be under the current directory).
33658 <Type type="DOMString"/>
33660 <Argument optional="optional" name="onsuccess">
33663 Called if the file is successfully deleted.
33666 <Type name="SuccessCallback" nullable="nullable"/>
33668 <Argument optional="optional" name="onerror">
33671 Called if an error occurred.
33674 <Type name="ErrorCallback" nullable="nullable"/>
33678 <RaiseException name="WebAPIException">
33681 with error type TypeMismatchError, if the input parameter
33682 is not compatible with the expected type for that parameter.
33685 with error type SecurityError, if the application does not have the privilege to call this method.
33688 with error type NotSupportedError, if the feature is not supported.
33695 <Dictionary name="FileFilter" id="::Filesystem::FileFilter">
33696 <webidl> dictionary FileFilter {
33699 Date startModified;
33709 Dictionary created to filter the items returned by the listFiles method.
33713 When this dictionary is passed in the listFiles method, the result-set of
33714 the listFiles method MUST only contain the file items entries that match
33715 the attribute values of the filter.
33716 The result set of the listFiles method does not guarantee any sort order.
33719 A file item only matches the FileFilter object if all the attributes of the file item match
33720 all the attribute values of the filter which are defined (that is, only matching values other
33721 than undefined or <em>null</em>). This is similar to an SQL "AND" operation.
33724 An attribute of the file entry matches the FileFilter attribute value in accordance with the
33729 For FileFilter attributes of type DOMString, an entry matches this value only if its
33730 corresponding attribute is an exact match. If the filter contains U+0025 'PERCENT SIGN' it is
33731 interpreted as a wildcard character and '%' matches any string of any length, including no
33732 length. If wildcards are used, the behavior is similar to the LIKE condition in SQL. To
33733 specify that a 'PERCENT SIGN' character is to be considered literally instead of interpreting it
33734 as a wildcard, developers may escape it with the backslash character (\).
33735 The matching is not case sensitive, such as "FOO" matches a "foo" or an "f%" filter.
33738 For File entry attributes of type Date, attributes start and end are included to allow
33739 filtering of File entries between two supplied dates. If either or both of these attributes are
33740 specified, the following rules apply:
33741 A) If both start and end dates are specified (that is, other than <em>null</em>), a File entry matches the
33742 filter if it's corresponding attribute is the same as either start or end or between the two
33743 supplied dates (that is, after start and before end).
33744 B) If only the start attribute contains a value (other than <em>null</em>), a File entry matches the
33745 filter if its corresponding attribute is later than or equal to the start one.
33746 C) If only the end date contains a value (other than <em>null</em>), a file matches the filter if its
33747 corresponding attribute is earlier than or equal to the end date.
33755 <DictionaryMember name="name" id="::Filesystem::FileFilter::name">
33756 <webidl> DOMString name;</webidl>
33759 Used for filtering the File name attribute.
33763 Files which name corresponds with this attribute
33764 (either exactly or with the specified wildcards) match
33765 this filtering criteria.
33772 <Type type="DOMString"/>
33773 </DictionaryMember>
33774 <DictionaryMember name="startModified" id="::Filesystem::FileFilter::startModified">
33775 <webidl> Date startModified;</webidl>
33778 Used for filtering the File modified attribute.
33782 Files with modified date later than this attribute or equal to it match
33783 the filtering criteria.
33790 <Type type="Date"/>
33791 </DictionaryMember>
33792 <DictionaryMember name="endModified" id="::Filesystem::FileFilter::endModified">
33793 <webidl> Date endModified;</webidl>
33796 Used for filtering the File created attribute.
33800 Files with modified date earlier than this attribute or equal to it
33801 match the filtering criteria.
33808 <Type type="Date"/>
33809 </DictionaryMember>
33810 <DictionaryMember name="startCreated" id="::Filesystem::FileFilter::startCreated">
33811 <webidl> Date startCreated;</webidl>
33814 Used for filtering the File created attribute.
33818 Files with created date later than this attribute or equal to it match
33819 the filtering criteria.
33826 <Type type="Date"/>
33827 </DictionaryMember>
33828 <DictionaryMember name="endCreated" id="::Filesystem::FileFilter::endCreated">
33829 <webidl> Date endCreated;</webidl>
33832 Used for filtering the File created attribute.
33836 Files with created date earlier than this attribute or equal to it
33837 match the filtering criteria.
33844 <Type type="Date"/>
33845 </DictionaryMember>
33847 <Interface name="FileStream" id="::Filesystem::FileStream">
33848 <webidl> [NoInterfaceObject] interface FileStream {
33849 readonly attribute boolean eof;
33851 attribute long position setraises(<ref>WebAPIException</ref>);
33853 readonly attribute long bytesAvailable;
33857 DOMString read(long charCount) raises(<ref>WebAPIException</ref>);
33859 octet[] readBytes(long byteCount) raises(<ref>WebAPIException</ref>);
33861 DOMString readBase64(long byteCount) raises(<ref>WebAPIException</ref>);
33863 void write(DOMString stringData) raises(<ref>WebAPIException</ref>);
33865 void writeBytes(octet[] byteData) raises(<ref>WebAPIException</ref>);
33867 void writeBase64(DOMString base64Data) raises(<ref>WebAPIException</ref>);
33875 A FileStream represents a handle to a File opened for read and/or
33876 write operations. Read and write operations are performed relative
33877 to a position attribute, which is a pointer that represents the current position in the file.
33880 A series of read/write methods are available that permit both binary and
33881 text to be processed.
33884 Once a file stream is closed, any operation attempted on this stream
33885 will result in a standard JavaScript error.
33888 The read/write operations in this interface do not throw any security
33889 exceptions as the access rights are expected to be granted through the initial
33890 resolve() method or through the openStream() method of the File interface.
33891 Therefore, all actions performed on a successfully resolved File and FileStream are
33892 expected to succeed. This avoids successive asynchronous calls and may potentially increase
33893 application for a user.
33900 <ExtendedAttributeList>
33901 <ExtendedAttribute name="NoInterfaceObject">
33902 <webidl>NoInterfaceObject</webidl>
33903 </ExtendedAttribute>
33904 </ExtendedAttributeList>
33905 <Attribute readonly="readonly" name="eof" id="::Filesystem::FileStream::eof">
33906 <webidl> readonly attribute boolean eof;</webidl>
33909 Indicates whether or not the current file pointer is at the end
33914 If <em>true</em>, this attribute indicates that the file pointer is at the end of the file.
33917 If <em>false</em>, this attribute indicates that the file pointer is not at the end of the file
33918 and may be anywhere within the file.
33924 <Code> if(stream.eof) {
33925 // file has been read completely
33929 <Type type="boolean"/>
33931 <Attribute name="position" id="::Filesystem::FileStream::position">
33932 <webidl> attribute long position setraises(<ref>WebAPIException</ref>);</webidl>
33935 Gets/sets stream position for reads/writes.
33939 The stream position is an offset of bytes from the start of
33940 the file stream. When invoking an operation that reads or
33941 writes from the stream, the operation will take place from the
33942 byte defined by this position attribute. If the read or write
33943 operation is successful, the position of the stream is advanced
33944 by the number of bytes read or written. If the read/write operation is not
33945 successful, the position of the stream is unchanged.
33951 <Code> console.log(stream.position); // displays current stream position
33952 // alters current stream position to the begin of the file,
33953 // like seek() in C
33954 stream.position = 0;
33957 <Type type="long"/>
33959 <RaiseException name="WebAPIException"/>
33962 <Attribute readonly="readonly" name="bytesAvailable" id="::Filesystem::FileStream::bytesAvailable">
33963 <webidl> readonly attribute long bytesAvailable;</webidl>
33966 Returns the number of bytes that are available for
33967 reading from the stream.
33971 The number of bytes available for reading is the maximum
33972 amount of bytes that can be read in the next read operation.
33973 It corresponds to the number of bytes available after the file pointer
33974 denoted by the position attribute.
33977 -1 if eof is <em>true</em>.
33983 <Code> console.log(stream.bytesAvailable); // displays the available bytes to be read
33986 <Type type="long"/>
33988 <Operation name="close" id="::Filesystem::FileStream::close">
33989 <webidl> void close();</webidl>
33992 Closes this FileStream.
33996 Flushes any pending buffered writes and closes the File. Always succeeds.
33997 Note that pending writes might not succeed.
34007 http://tizen.org/privilege/filesystem.read
34009 <Code> stream.close(); // closes this stream, no subsequent access to stream allowed
34012 <Type type="void"/>
34015 <Operation name="read" id="::Filesystem::FileStream::read">
34016 <webidl> DOMString read(long charCount) raises(<ref>WebAPIException</ref>);</webidl>
34019 Reads the specified number of characters from this FileStream.
34023 Reads the specified number of characters after the position file pointer and returns them as a string.
34024 The resulting string length might be shorter than charCount if eof
34035 http://tizen.org/privilege/filesystem.read
34037 <Code> var text = stream.read(file.fileSize);
34041 <Type type="DOMString">
34044 DOMString The result of read characters as a string.
34049 <Argument name="charCount">
34052 Number of characters being read.
34055 <Type type="long"/>
34059 <RaiseException name="WebAPIException">
34062 with error type IOError, if a read error occurs, such as the bytes in the stream
34063 cannot be decoded with the encoding in use.
34066 with error type TypeMismatchError, if the input parameter
34067 is not compatible with the expected type for that parameter.
34070 with error type InvalidValuesError, if any of the input
34071 parameters contain an invalid value.
34074 with error type SecurityError, if the application does not have the privilege to call this method.
34077 with error type NotSupportedError, if the feature is not supported.
34083 <Operation name="readBytes" id="::Filesystem::FileStream::readBytes">
34084 <webidl> octet[] readBytes(long byteCount) raises(<ref>WebAPIException</ref>);</webidl>
34087 Reads the specified number of bytes from this FileStream.
34096 http://tizen.org/privilege/filesystem.read
34098 <Code> // reads up to 256 bytes from the stream
34099 var raw = stream.readBytes(256);
34100 for(var i = 0; i < raw.length; i++) {
34101 // raw[i] contains the i-th byte of the current data chunk
34105 <Type type="array">
34108 octet[] The result of read bytes as a byte (or number) array.
34111 <Type type="octet"/>
34114 <Argument name="byteCount">
34117 Number of bytes being read.
34120 <Type type="long"/>
34124 <RaiseException name="WebAPIException">
34127 with error type IOError, if a read error occurs.
34130 with error type TypeMismatchError, if the input parameter
34131 is not compatible with the expected type for that parameter.
34134 with error type InvalidValuesError, if any of the input
34135 parameters contain an invalid value.
34138 with error type SecurityError, if the application does not have the privilege to call this method.
34141 with error type NotSupportedError, if the feature is not supported.
34147 <Operation name="readBase64" id="::Filesystem::FileStream::readBase64">
34148 <webidl> DOMString readBase64(long byteCount) raises(<ref>WebAPIException</ref>);</webidl>
34151 Reads the specified number of bytes from this FileStream, encoding
34152 the result in base64.
34161 http://tizen.org/privilege/filesystem.read
34163 <Code> // reads up to 256 bytes from the stream
34164 var base64 = stream.readBase64(256);
34167 <Type type="DOMString">
34170 DOMString The result of read bytes as base64 encoding string.
34175 <Argument name="byteCount">
34178 Number of bytes being read.
34181 <Type type="long"/>
34185 <RaiseException name="WebAPIException">
34188 with error type IOError, if a read error occurs.
34191 with error type TypeMismatchError, if the input parameter
34192 is not compatible with the expected type for that parameter.
34195 with error type InvalidValuesError, if any of the input
34196 parameters contain an invalid value.
34199 with error type SecurityError, if the application does not have the privilege to call this method.
34202 with error type NotSupportedError, if the feature is not supported.
34208 <Operation name="write" id="::Filesystem::FileStream::write">
34209 <webidl> void write(DOMString stringData) raises(<ref>WebAPIException</ref>);</webidl>
34212 Writes the specified DOMString to this FileStream.
34221 http://tizen.org/privilege/filesystem.write
34223 <Code> var text = "Hello world";
34224 stream.write(text);
34227 <Type type="void"/>
34229 <Argument name="stringData">
34232 The actual string to be written.
34235 <Type type="DOMString"/>
34239 <RaiseException name="WebAPIException">
34242 with error type IOError, if a write error occurs.
34245 with error type TypeMismatchError, if the input parameter
34246 is not compatible with the expected type for that parameter.
34249 with error type SecurityError, if the application does not have the privilege to call this method.
34252 with error type NotSupportedError, if the feature is not supported.
34258 <Operation name="writeBytes" id="::Filesystem::FileStream::writeBytes">
34259 <webidl> void writeBytes(octet[] byteData) raises(<ref>WebAPIException</ref>);</webidl>
34262 Writes the specified bytes to this FileStream.
34271 http://tizen.org/privilege/filesystem.write
34273 <Code> var bytes = in.readBytes(256);
34274 out.writeBytes(bytes); // writes the bytes read from in to out
34277 <Type type="void"/>
34279 <Argument name="byteData">
34282 The byte data array being written.
34285 <Type type="array">
34286 <Type type="octet"/>
34291 <RaiseException name="WebAPIException">
34294 with error type IOError, if a write error occurs.
34297 with error type TypeMismatchError, if the input parameter
34298 is not compatible with the expected type for that parameter.
34301 with error type SecurityError, if the application does not have the privilege to call this method.
34304 with error type NotSupportedError, if the feature is not supported.
34310 <Operation name="writeBase64" id="::Filesystem::FileStream::writeBase64">
34311 <webidl> void writeBase64(DOMString base64Data) raises(<ref>WebAPIException</ref>);</webidl>
34314 Converts the specified base64 DOMString to bytes and writes the
34315 result to this FileStream.
34324 http://tizen.org/privilege/filesystem.write
34326 <Code> var base64 = in.readBase64(256);
34327 out.writeBase64(base64); // writes the base64 data read from in to out
34330 <Type type="void"/>
34332 <Argument name="base64Data">
34335 The base64 data being written.
34338 <Type type="DOMString"/>
34342 <RaiseException name="WebAPIException">
34345 with error type IOError, if an error occurs during writeBase64.
34348 with error type TypeMismatchError, if the input parameter
34349 is not compatible with the expected type for that parameter.
34352 with error type SecurityError, if the application does not have the privilege to call this method.
34355 with error type NotSupportedError, if the feature is not supported.
34362 <Interface name="FileSuccessCallback" id="::Filesystem::FileSuccessCallback">
34363 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface FileSuccessCallback {
34364 void onsuccess(<ref>File</ref> file);
34368 The file system specific success callback.
34372 This callback interface specifies a success callback with
34373 a File object as input argument. It is used in asynchronous
34374 operations, such as FileSystemManager.resolve() and
34375 copying, moving, and deleting files.
34382 <ExtendedAttributeList>
34383 <ExtendedAttribute name="Callback" value="FunctionOnly">
34384 <webidl>Callback</webidl>
34385 </ExtendedAttribute>
34386 <ExtendedAttribute name="NoInterfaceObject">
34387 <webidl> NoInterfaceObject</webidl>
34388 </ExtendedAttribute>
34389 </ExtendedAttributeList>
34390 <Operation name="onsuccess" id="::Filesystem::FileSuccessCallback::onsuccess">
34391 <webidl> void onsuccess(<ref>File</ref> file);</webidl>
34394 The method invoked when the asynchronous call completes successfully.
34400 <Type type="void"/>
34402 <Argument name="file">
34405 The file resulting from the asynchronous call.
34408 <Type name="File"/>
34413 <Interface name="FileSystemStorageArraySuccessCallback" id="::Filesystem::FileSystemStorageArraySuccessCallback">
34414 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface FileSystemStorageArraySuccessCallback {
34415 void onsuccess(<ref>FileSystemStorage</ref>[] storages);
34419 The success callback to retrieve FileSystemStorage objects.
34423 This callback interface specifies a success callback with
34424 an array of FileSystemStorage objects as input argument. It is used in asynchronous
34425 operations, such as FileSystemManager.listStorages().
34432 <ExtendedAttributeList>
34433 <ExtendedAttribute name="Callback" value="FunctionOnly">
34434 <webidl>Callback</webidl>
34435 </ExtendedAttribute>
34436 <ExtendedAttribute name="NoInterfaceObject">
34437 <webidl> NoInterfaceObject</webidl>
34438 </ExtendedAttribute>
34439 </ExtendedAttributeList>
34440 <Operation name="onsuccess" id="::Filesystem::FileSystemStorageArraySuccessCallback::onsuccess">
34441 <webidl> void onsuccess(<ref>FileSystemStorage</ref>[] storages);</webidl>
34444 The method invoked when the asynchronous call completes successfully.
34450 <Type type="void"/>
34452 <Argument name="storages">
34455 List of available storage devices.
34458 <Type type="array">
34459 <Type name="FileSystemStorage"/>
34465 <Interface name="FileSystemStorageSuccessCallback" id="::Filesystem::FileSystemStorageSuccessCallback">
34466 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface FileSystemStorageSuccessCallback {
34467 void onsuccess(<ref>FileSystemStorage</ref> storage);
34471 The success callback to retrieve a FileSystemStorage object.
34475 This callback interface specifies a success callback with
34476 a FileSystmeStorage object as input argument. It is used in asynchronous
34477 operations, such as FileSystemManager.getStorage() and
34478 FileSystemManager.addStorageStateChangeListener().
34485 <ExtendedAttributeList>
34486 <ExtendedAttribute name="Callback" value="FunctionOnly">
34487 <webidl>Callback</webidl>
34488 </ExtendedAttribute>
34489 <ExtendedAttribute name="NoInterfaceObject">
34490 <webidl> NoInterfaceObject</webidl>
34491 </ExtendedAttribute>
34492 </ExtendedAttributeList>
34493 <Operation name="onsuccess" id="::Filesystem::FileSystemStorageSuccessCallback::onsuccess">
34494 <webidl> void onsuccess(<ref>FileSystemStorage</ref> storage);</webidl>
34497 The method invoked when the asynchronous call completes successfully.
34503 <Type type="void"/>
34505 <Argument name="storage">
34508 The storage device structure.
34511 <Type name="FileSystemStorage"/>
34516 <Interface name="FileStringSuccessCallback" id="::Filesystem::FileStringSuccessCallback">
34517 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface FileStringSuccessCallback {
34518 void onsuccess(DOMString fileStr);
34522 The success callback to read the content of a file as a DOMString.
34526 This callback interface specifies a success callback with
34527 a DOMString object as input argument. It is used in asynchronous
34528 operations, such as File.readAsText().
34535 <ExtendedAttributeList>
34536 <ExtendedAttribute name="Callback" value="FunctionOnly">
34537 <webidl>Callback</webidl>
34538 </ExtendedAttribute>
34539 <ExtendedAttribute name="NoInterfaceObject">
34540 <webidl> NoInterfaceObject</webidl>
34541 </ExtendedAttribute>
34542 </ExtendedAttributeList>
34543 <Operation name="onsuccess" id="::Filesystem::FileStringSuccessCallback::onsuccess">
34544 <webidl> void onsuccess(DOMString fileStr);</webidl>
34547 The method invoked when the asynchronous call completes successfully.
34553 <Type type="void"/>
34555 <Argument name="fileStr">
34558 The file represented as a DOMString resulting from the asynchronous call.
34561 <Type type="DOMString"/>
34566 <Interface name="FileStreamSuccessCallback" id="::Filesystem::FileStreamSuccessCallback">
34567 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface FileStreamSuccessCallback {
34568 void onsuccess(<ref>FileStream</ref> filestream);
34572 The success callback to open a file for raw access.
34576 This callback interface specifies a success callback with
34577 a FileStream object as input argument. It is used by asynchronous
34578 methods, such as File.openStream().
34585 <ExtendedAttributeList>
34586 <ExtendedAttribute name="Callback" value="FunctionOnly">
34587 <webidl>Callback</webidl>
34588 </ExtendedAttribute>
34589 <ExtendedAttribute name="NoInterfaceObject">
34590 <webidl> NoInterfaceObject</webidl>
34591 </ExtendedAttribute>
34592 </ExtendedAttributeList>
34593 <Operation name="onsuccess" id="::Filesystem::FileStreamSuccessCallback::onsuccess">
34594 <webidl> void onsuccess(<ref>FileStream</ref> filestream);</webidl>
34597 The method invoked when the File.openStream asynchronous call completes successfully.
34603 <Type type="void"/>
34605 <Argument name="filestream">
34608 The filestream to access file content.
34611 <Type name="FileStream"/>
34616 <Interface name="FileArraySuccessCallback" id="::Filesystem::FileArraySuccessCallback">
34617 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface FileArraySuccessCallback {
34618 void onsuccess(<ref>File</ref>[] files);
34622 The file system specific success callback for listing methods.
34626 This callback interface specifies a success callback with a function
34627 taking an array of File objects as input argument. It is used in asynchronous
34628 methods, such as File.listFiles().
34635 <ExtendedAttributeList>
34636 <ExtendedAttribute name="Callback" value="FunctionOnly">
34637 <webidl>Callback</webidl>
34638 </ExtendedAttribute>
34639 <ExtendedAttribute name="NoInterfaceObject">
34640 <webidl> NoInterfaceObject</webidl>
34641 </ExtendedAttribute>
34642 </ExtendedAttributeList>
34643 <Operation name="onsuccess" id="::Filesystem::FileArraySuccessCallback::onsuccess">
34644 <webidl> void onsuccess(<ref>File</ref>[] files);</webidl>
34647 The method invoked when the asynchronous call completes successfully.
34653 <Type type="void"/>
34655 <Argument name="files">
34658 The files resulting from the asynchronous call.
34661 <Type type="array">
34662 <Type name="File"/>
34669 <Module name="MessagePort" id="::MessagePort">
34670 <webidl>module MessagePort {
34672 [NoInterfaceObject] interface MessagePortManagerObject {
34673 readonly attribute <ref>MessagePortManager</ref> messageport;
34675 <ref>Tizen</ref> implements <ref>MessagePortManagerObject</ref>;
34677 [NoInterfaceObject] interface MessagePortManager {
34679 <ref>LocalMessagePort</ref> requestLocalMessagePort(DOMString localMessagePortName) raises(<ref>WebAPIException</ref>);
34681 <ref>LocalMessagePort</ref> requestTrustedLocalMessagePort(DOMString localMessagePortName) raises(<ref>WebAPIException</ref>);
34683 <ref>RemoteMessagePort</ref> requestRemoteMessagePort(<ref>ApplicationId</ref> appId, DOMString remoteMessagePortName) raises(<ref>WebAPIException</ref>);
34685 <ref>RemoteMessagePort</ref> requestTrustedRemoteMessagePort(<ref>ApplicationId</ref> appId, DOMString remoteMessagePortName) raises(<ref>WebAPIException</ref>);
34688 [NoInterfaceObject] interface LocalMessagePort {
34690 readonly attribute DOMString messagePortName;
34692 readonly attribute boolean isTrusted;
34694 long addMessagePortListener(<ref>MessagePortCallback</ref> listener) raises(<ref>WebAPIException</ref>);
34696 void removeMessagePortListener(long watchId) raises(<ref>WebAPIException</ref>);
34699 [NoInterfaceObject] interface RemoteMessagePort {
34701 readonly attribute DOMString messagePortName;
34703 readonly attribute <ref>ApplicationId</ref> appId;
34705 readonly attribute boolean isTrusted;
34707 void sendMessage(<ref>MessagePortDataItem</ref>[] data, optional <ref>LocalMessagePort</ref>? localMessagePort) raises(<ref>WebAPIException</ref>);
34710 dictionary MessagePortDataItem {
34715 [Callback=FunctionOnly, NoInterfaceObject] interface MessagePortCallback {
34716 void onreceived(<ref>MessagePortDataItem</ref>[] data, <ref>RemoteMessagePort</ref>? remoteMessagePort);
34721 This API provides the functionality for communicating with other applications.
34727 <Interface name="MessagePortManagerObject" id="::MessagePort::MessagePortManagerObject">
34728 <webidl> [NoInterfaceObject] interface MessagePortManagerObject {
34729 readonly attribute <ref>MessagePortManager</ref> messageport;
34733 The <em>MessagePortManagerObject</em> interface defines what is instantiated by the Tizen object from the Tizen Platform.
34737 There is a <em>tizen.messageport</em> object that allows access to the functionality of the Message Port API.
34744 <ExtendedAttributeList>
34745 <ExtendedAttribute name="NoInterfaceObject">
34746 <webidl>NoInterfaceObject</webidl>
34747 </ExtendedAttribute>
34748 </ExtendedAttributeList>
34749 <Attribute readonly="readonly" name="messageport" id="::MessagePort::MessagePortManagerObject::messageport">
34750 <webidl> readonly attribute <ref>MessagePortManager</ref> messageport;</webidl>
34751 <Type name="MessagePortManager"/>
34754 <Implements name1="Tizen" name2="MessagePortManagerObject">
34755 <webidl> <ref>Tizen</ref> implements <ref>MessagePortManagerObject</ref>;</webidl>
34757 <Interface name="MessagePortManager" id="::MessagePort::MessagePortManager">
34758 <webidl> [NoInterfaceObject] interface MessagePortManager {
34760 <ref>LocalMessagePort</ref> requestLocalMessagePort(DOMString localMessagePortName) raises(<ref>WebAPIException</ref>);
34762 <ref>LocalMessagePort</ref> requestTrustedLocalMessagePort(DOMString localMessagePortName) raises(<ref>WebAPIException</ref>);
34764 <ref>RemoteMessagePort</ref> requestRemoteMessagePort(<ref>ApplicationId</ref> appId, DOMString remoteMessagePortName) raises(<ref>WebAPIException</ref>);
34766 <ref>RemoteMessagePort</ref> requestTrustedRemoteMessagePort(<ref>ApplicationId</ref> appId, DOMString remoteMessagePortName) raises(<ref>WebAPIException</ref>);
34770 The <em>MessagePortManager</em> interface provides methods to request message port to communicate.
34776 <ExtendedAttributeList>
34777 <ExtendedAttribute name="NoInterfaceObject">
34778 <webidl>NoInterfaceObject</webidl>
34779 </ExtendedAttribute>
34780 </ExtendedAttributeList>
34781 <Operation name="requestLocalMessagePort" id="::MessagePort::MessagePortManager::requestLocalMessagePort">
34782 <webidl> <ref>LocalMessagePort</ref> requestLocalMessagePort(DOMString localMessagePortName) raises(<ref>WebAPIException</ref>);</webidl>
34785 Requests a LocalMessage Port instance to start receiving message from another application.
34790 <Code> // Requests the LocalMessagePort instance with the specified message port name
34791 var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
34794 <Type name="LocalMessagePort">
34797 LocalMessagePort The LocalMessagePort instance.
34802 <Argument name="localMessagePortName">
34805 The name of the local message port to retrieve.<br/>The LocalMessagePort instances are identical for the same message port name.
34808 <Type type="DOMString"/>
34812 <RaiseException name="WebAPIException">
34815 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
34818 with error type InvalidValuesError, if the input parameter contains an invalid value.
34821 with error type UnknownError, if any other error occurs.
34827 <Operation name="requestTrustedLocalMessagePort" id="::MessagePort::MessagePortManager::requestTrustedLocalMessagePort">
34828 <webidl> <ref>LocalMessagePort</ref> requestTrustedLocalMessagePort(DOMString localMessagePortName) raises(<ref>WebAPIException</ref>);</webidl>
34831 Requests a trusted LocalMessagePort instance to receive message from another application.
34835 Trusted local message port can communicate with applications that are signed with same certificate.
34841 <Code> // Requests the LocalMessagePort instance with the specified message port name
34842 var localMsgPort = tizen.messageport.requestTrustedLocalMessagePort('MessagePortB');
34845 <Type name="LocalMessagePort">
34848 LocalMessagePort The trusted LocalMessagePort instance.
34853 <Argument name="localMessagePortName">
34856 The name of local message port.<br/>The LocalMessagePort instances are identical for the same message port name.
34859 <Type type="DOMString"/>
34863 <RaiseException name="WebAPIException">
34866 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
34869 with error type InvalidValuesError, if the input parameter contains an invalid value.
34872 with error type UnknownError, if any other error occurs.
34878 <Operation name="requestRemoteMessagePort" id="::MessagePort::MessagePortManager::requestRemoteMessagePort">
34879 <webidl> <ref>RemoteMessagePort</ref> requestRemoteMessagePort(<ref>ApplicationId</ref> appId, DOMString remoteMessagePortName) raises(<ref>WebAPIException</ref>);</webidl>
34882 Requests a RemoteMessagePort instance to send message to another application.
34886 If the message port name and application ID is the same, the platform returns the same RemoteMessagePort instance.
34892 <Code> // Requests the RemoteMessagePort instance with the specified message port name
34893 var remoteMsgPort = tizen.messageport.requestRemoteMessagePort('6xaeuflskd.App1', 'MessagePortA');
34896 <Type name="RemoteMessagePort">
34899 RemoteMessagePort The RemoteMessagePort instance.
34904 <Argument name="appId">
34907 The ID of the application to send messages.
34910 <Type name="ApplicationId"/>
34912 <Argument name="remoteMessagePortName">
34915 The name of remote message port.
34918 <Type type="DOMString"/>
34922 <RaiseException name="WebAPIException">
34925 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
34928 with error type InvalidValuesError, if an input parameter contains an invalid value.
34931 with error type NotFoundError, if the port of the target application is not found.
34934 with error type UnknownError, if any other error occurs.
34940 <Operation name="requestTrustedRemoteMessagePort" id="::MessagePort::MessagePortManager::requestTrustedRemoteMessagePort">
34941 <webidl> <ref>RemoteMessagePort</ref> requestTrustedRemoteMessagePort(<ref>ApplicationId</ref> appId, DOMString remoteMessagePortName) raises(<ref>WebAPIException</ref>);</webidl>
34944 Requests a trusted RemoteMessagePort instance to receive message from another application.
34948 If the message port name and application ID is the same, the platform returns the same RemoteMessagePort instance.
34949 Trusted remote message port can communicate with applications that are signed with same certificate.
34955 <Code> // Requests the RemoteMessagePort instance with the specified message port name.
34956 var remoteMsgPort = tizen.messageport.requestTrustedRemoteMessagePort('6xauflskd.App1', 'MessagePortB');
34959 <Type name="RemoteMessagePort">
34962 RemoteMessagePort The trusted RemoteMessagePort instance.
34967 <Argument name="appId">
34970 The ID of the application to send messages.
34973 <Type name="ApplicationId"/>
34975 <Argument name="remoteMessagePortName">
34978 The name of remote message port.
34981 <Type type="DOMString"/>
34985 <RaiseException name="WebAPIException">
34988 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
34991 with error type InvalidValuesError, if an input parameter contains an invalid value.
34994 with error type NotFoundError, if the port of the target application is not found.
34997 with error type InvalidAccessError, if the target application is not signed with the same certification.
35000 with error type UnknownError, if any other error occurs
35007 <Interface name="LocalMessagePort" id="::MessagePort::LocalMessagePort">
35008 <webidl> [NoInterfaceObject] interface LocalMessagePort {
35010 readonly attribute DOMString messagePortName;
35012 readonly attribute boolean isTrusted;
35014 long addMessagePortListener(<ref>MessagePortCallback</ref> listener) raises(<ref>WebAPIException</ref>);
35016 void removeMessagePortListener(long watchId) raises(<ref>WebAPIException</ref>);
35020 The <em>LocalMessagePort</em> interface provides methods to receive data.
35026 <ExtendedAttributeList>
35027 <ExtendedAttribute name="NoInterfaceObject">
35028 <webidl>NoInterfaceObject</webidl>
35029 </ExtendedAttribute>
35030 </ExtendedAttributeList>
35031 <Attribute readonly="readonly" name="messagePortName" id="::MessagePort::LocalMessagePort::messagePortName">
35032 <webidl> readonly attribute DOMString messagePortName;</webidl>
35035 An attribute that stores the name of the message port name.
35041 <Type type="DOMString"/>
35043 <Attribute readonly="readonly" name="isTrusted" id="::MessagePort::LocalMessagePort::isTrusted">
35044 <webidl> readonly attribute boolean isTrusted;</webidl>
35047 An attribute that determines whether the message port is trusted or not.
35053 <Type type="boolean"/>
35055 <Operation name="addMessagePortListener" id="::MessagePort::LocalMessagePort::addMessagePortListener">
35056 <webidl> long addMessagePortListener(<ref>MessagePortCallback</ref> listener) raises(<ref>WebAPIException</ref>);</webidl>
35059 Adds a message port listener to receive messages from other applications.
35064 <Code> function onreceived(data, remoteMsgPort) {
35065 console.log('Received data to \'' + remoteMsgPort.messagePortName + '\'');
35068 var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
35069 var watchId = localMsgPort.addMessagePortListener(onreceived);
35075 long ID of the listener that is later used to remove the listener.
35080 <Argument name="listener">
35083 The method to invoke when a message is received.
35086 <Type name="MessagePortCallback"/>
35090 <RaiseException name="WebAPIException">
35093 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
35096 with error type InvalidValuesError, if the input parameter contains an invalid value.
35099 with error type UnknownError, if any other error occurs.
35105 <Operation name="removeMessagePortListener" id="::MessagePort::LocalMessagePort::removeMessagePortListener">
35106 <webidl> void removeMessagePortListener(long watchId) raises(<ref>WebAPIException</ref>);</webidl>
35109 Removes the message port listener.
35114 <Code> var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
35115 var watchId = localMsgPort.addMessagePortListener(onreceived);
35116 // Communication routines of your app...
35117 localMsgPort.removeMessagePortListener(watchId);
35120 <Type type="void"/>
35122 <Argument name="watchId">
35125 ID to identify the listener.
35128 <Type type="long"/>
35132 <RaiseException name="WebAPIException">
35135 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
35138 with error type InvalidValuesError, if the input parameter contains an invalid value.
35141 with error type NotFoundError, if the watch ID has not been found.
35144 with error type UnknownError, if any other error occurs.
35151 <Interface name="RemoteMessagePort" id="::MessagePort::RemoteMessagePort">
35152 <webidl> [NoInterfaceObject] interface RemoteMessagePort {
35154 readonly attribute DOMString messagePortName;
35156 readonly attribute <ref>ApplicationId</ref> appId;
35158 readonly attribute boolean isTrusted;
35160 void sendMessage(<ref>MessagePortDataItem</ref>[] data, optional <ref>LocalMessagePort</ref>? localMessagePort) raises(<ref>WebAPIException</ref>);
35164 The <em>RemoteMessagePort</em> interface provides methods to send messages.
35170 <ExtendedAttributeList>
35171 <ExtendedAttribute name="NoInterfaceObject">
35172 <webidl>NoInterfaceObject</webidl>
35173 </ExtendedAttribute>
35174 </ExtendedAttributeList>
35175 <Attribute readonly="readonly" name="messagePortName" id="::MessagePort::RemoteMessagePort::messagePortName">
35176 <webidl> readonly attribute DOMString messagePortName;</webidl>
35179 An attribute to store the message port name.
35185 <Type type="DOMString"/>
35187 <Attribute readonly="readonly" name="appId" id="::MessagePort::RemoteMessagePort::appId">
35188 <webidl> readonly attribute <ref>ApplicationId</ref> appId;</webidl>
35191 An attribute that store the application ID to connect with.
35197 <Type name="ApplicationId"/>
35199 <Attribute readonly="readonly" name="isTrusted" id="::MessagePort::RemoteMessagePort::isTrusted">
35200 <webidl> readonly attribute boolean isTrusted;</webidl>
35203 An attribute that determines whether the message port is trusted or not.
35209 <Type type="boolean"/>
35211 <Operation name="sendMessage" id="::MessagePort::RemoteMessagePort::sendMessage">
35212 <webidl> void sendMessage(<ref>MessagePortDataItem</ref>[] data, optional <ref>LocalMessagePort</ref>? localMessagePort) raises(<ref>WebAPIException</ref>);</webidl>
35215 Sends messages to the specified application.
35219 The sent messages will be ignored without any notice, unless the target application added one or more listeners to the target local message port.
35225 <Code> // Sends message
35226 var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
35227 var remoteMsgPort = tizen.messageport.requestRemoteMessagePort('6xaeuflskd.App1', 'MessagePortB');
35228 localMsgPort.addMessagePortListener(function(items, remoteport) {
35230 if(remoteport !== null) {
35231 remoteport.sendMessage([{key:'RESULT', value:'OK'}]);
35234 remoteMsgPort.sendMessage(
35236 { key:'CMD', value:'openWindow' },
35237 { key:'OPTION', value:'bx' }
35242 <Type type="void"/>
35244 <Argument name="data">
35247 Data array of data to send.
35250 <Type type="array">
35251 <Type name="MessagePortDataItem"/>
35254 <Argument optional="optional" name="localMessagePort">
35257 <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.
35258 </em></em> </p></description>
35260 <Type name="LocalMessagePort" nullable="nullable"/>
35264 <RaiseException name="WebAPIException">
35267 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
35270 with error type InvalidValuesError, if an input parameter contains an invalid value.
35273 with error type QuotaExceededError, if the size of message has exceeded the maximum limit.
35276 with error type UnknownError, if any other error occurs.
35283 <Dictionary name="MessagePortDataItem" id="::MessagePort::MessagePortDataItem">
35284 <webidl> dictionary MessagePortDataItem {
35290 A dictionary for specifying the data item that is transferred.
35296 <DictionaryMember name="key" id="::MessagePort::MessagePortDataItem::key">
35297 <webidl> DOMString key;</webidl>
35298 <Type type="DOMString"/>
35299 </DictionaryMember>
35300 <DictionaryMember name="value" id="::MessagePort::MessagePortDataItem::value">
35301 <webidl> DOMString value;</webidl>
35302 <Type type="DOMString"/>
35303 </DictionaryMember>
35305 <Interface name="MessagePortCallback" id="::MessagePort::MessagePortCallback">
35306 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface MessagePortCallback {
35307 void onreceived(<ref>MessagePortDataItem</ref>[] data, <ref>RemoteMessagePort</ref>? remoteMessagePort);
35311 This interface defines notification callbacks for receiving data from other applications.
35317 <ExtendedAttributeList>
35318 <ExtendedAttribute name="Callback" value="FunctionOnly">
35319 <webidl>Callback</webidl>
35320 </ExtendedAttribute>
35321 <ExtendedAttribute name="NoInterfaceObject">
35322 <webidl> NoInterfaceObject</webidl>
35323 </ExtendedAttribute>
35324 </ExtendedAttributeList>
35325 <Operation name="onreceived" id="::MessagePort::MessagePortCallback::onreceived">
35326 <webidl> void onreceived(<ref>MessagePortDataItem</ref>[] data, <ref>RemoteMessagePort</ref>? remoteMessagePort);</webidl>
35329 Called when data is received from other applications via the specified message port name.
35335 <Type type="void"/>
35337 <Argument name="data">
35340 An array of data received from another application.
35343 <Type type="array">
35344 <Type name="MessagePortDataItem"/>
35347 <Argument name="remoteMessagePort">
35350 The RemoteMessagePort port that can be used to reply for the received message.
35353 <Type name="RemoteMessagePort" nullable="nullable"/>
35359 <Module name="Messaging" id="::Messaging">
35360 <webidl>module Messaging {
35362 [NoInterfaceObject] interface MessageManagerObject {
35363 readonly attribute <ref>Messaging</ref> messaging;
35365 <ref>Tizen</ref> implements <ref>MessageManagerObject</ref>;
35367 enum MessageServiceTag {"messaging.sms", "messaging.mms", "messaging.email" };
35369 typedef DOMString MessageId;
35371 typedef DOMString MessageAttachmentId;
35373 typedef DOMString MessageConvId;
35375 typedef DOMString MessageFolderId;
35377 [Constructor(<ref>MessageServiceTag</ref> type, optional <ref>MessageInit</ref>? messageInitDict)]
35378 interface Message {
35380 readonly attribute <ref>MessageId</ref>? id;
35382 readonly attribute <ref>MessageConvId</ref>? conversationId;
35384 readonly attribute <ref>MessageFolderId</ref>? folderId;
35386 readonly attribute <ref>MessageServiceTag</ref> type;
35388 readonly attribute Date? timestamp;
35390 readonly attribute DOMString? from;
35392 attribute DOMString[] to setraises(<ref>WebAPIException</ref>);
35394 attribute DOMString[] cc setraises(<ref>WebAPIException</ref>);
35396 attribute DOMString[] bcc setraises(<ref>WebAPIException</ref>);
35398 attribute <ref>MessageBody</ref> body setraises(<ref>WebAPIException</ref>);
35400 attribute boolean isRead setraises(<ref>WebAPIException</ref>);
35402 readonly attribute boolean hasAttachment;
35404 attribute boolean isHighPriority setraises(<ref>WebAPIException</ref>);
35406 attribute DOMString subject setraises(<ref>WebAPIException</ref>);
35408 readonly attribute <ref>MessageId</ref>? inResponseTo setraises(<ref>WebAPIException</ref>);
35410 readonly attribute DOMString messageStatus;
35412 attribute <ref>MessageAttachment</ref>[] attachments setraises(<ref>WebAPIException</ref>);
35414 dictionary MessageInit
35425 DOMString plainBody;
35427 DOMString htmlBody;
35429 boolean isHighPriority;
35432 [NoInterfaceObject] interface MessageBody {
35434 readonly attribute <ref>MessageId</ref> messageId;
35436 readonly attribute boolean loaded;
35438 attribute DOMString plainBody setraises(<ref>WebAPIException</ref>);
35440 attribute DOMString htmlBody setraises(<ref>WebAPIException</ref>);
35442 attribute <ref>MessageAttachment</ref>[] inlineAttachments setraises(<ref>WebAPIException</ref>);
35445 [Constructor(DOMString filePath, optional DOMString? mimeType)]
35446 interface MessageAttachment {
35448 readonly attribute <ref>MessageAttachmentId</ref>? id;
35450 readonly attribute <ref>MessageId</ref>? messageId;
35452 readonly attribute DOMString? mimeType;
35454 readonly attribute DOMString? filePath;
35457 [NoInterfaceObject] interface Messaging {
35459 void getMessageServices(<ref>MessageServiceTag</ref> messageServiceType,
35460 <ref>MessageServiceArraySuccessCallback</ref> successCallback,
35461 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35464 [Callback=FunctionOnly, NoInterfaceObject] interface MessageServiceArraySuccessCallback {
35466 void onsuccess(<ref>MessageService</ref>[] services);
35471 [NoInterfaceObject] interface MessageService {
35473 readonly attribute DOMString id;
35475 readonly attribute <ref>MessageServiceTag</ref> type;
35477 readonly attribute DOMString name;
35479 void sendMessage(<ref>Message</ref> message,
35480 optional <ref>MessageRecipientsCallback</ref>? successCallback,
35481 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35483 void loadMessageBody(<ref>Message</ref> message,
35484 <ref>MessageBodySuccessCallback</ref> successCallback,
35485 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35487 void loadMessageAttachment(<ref>MessageAttachment</ref> attachment,
35488 <ref>MessageAttachmentSuccessCallback</ref> successCallback,
35489 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35491 long sync(optional <ref>SuccessCallback</ref>? successCallback,
35492 optional <ref>ErrorCallback</ref>? errorCallback,
35493 optional unsigned long? limit) raises(<ref>WebAPIException</ref>);
35495 long syncFolder(<ref>MessageFolder</ref> folder,
35496 optional <ref>SuccessCallback</ref>? successCallback,
35497 optional <ref>ErrorCallback</ref>? errorCallback,
35498 optional unsigned long? limit) raises(<ref>WebAPIException</ref>);
35500 void stopSync(long opId) raises(<ref>WebAPIException</ref>);
35502 readonly attribute <ref>MessageStorage</ref> messageStorage getraises(<ref>WebAPIException</ref>);
35505 [Callback=FunctionOnly, NoInterfaceObject] interface MessageRecipientsCallback {
35507 void onsuccess(DOMString[] recipients);
35511 [Callback=FunctionOnly, NoInterfaceObject] interface MessageBodySuccessCallback {
35513 void onsuccess(<ref>Message</ref> message);
35516 [Callback=FunctionOnly, NoInterfaceObject] interface MessageAttachmentSuccessCallback {
35518 void onsuccess(<ref>MessageAttachment</ref> attachment);
35521 [NoInterfaceObject] interface MessageStorage {
35523 void addDraftMessage(<ref>Message</ref> message,
35524 optional <ref>SuccessCallback</ref>? successCallback,
35525 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35527 void findMessages(<ref>AbstractFilter</ref> filter,
35528 <ref>MessageArraySuccessCallback</ref> successCallback,
35529 optional <ref>ErrorCallback</ref>? errorCallback,
35530 optional <ref>SortMode</ref>? sort,
35531 optional unsigned long? limit,
35532 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);
35534 void removeMessages(<ref>Message</ref>[] messages,
35535 optional <ref>SuccessCallback</ref>? successCallback,
35536 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35538 void updateMessages(<ref>Message</ref>[] messages,
35539 optional <ref>SuccessCallback</ref>? successCallback,
35540 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35542 void findConversations(<ref>AbstractFilter</ref> filter,
35543 <ref>MessageConversationArraySuccessCallback</ref> successCallback,
35544 optional <ref>ErrorCallback</ref>? errorCallback,
35545 optional <ref>SortMode</ref>? sort,
35546 optional unsigned long? limit,
35547 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);
35549 void removeConversations(<ref>MessageConversation</ref>[] conversations,
35550 optional <ref>SuccessCallback</ref>? successCallback,
35551 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35554 void findFolders(<ref>AbstractFilter</ref> filter,
35555 <ref>MessageFolderArraySuccessCallback</ref> successCallback,
35556 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35558 long addMessagesChangeListener(<ref>MessagesChangeCallback</ref> messagesChangeCallback,
35559 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);
35561 long addConversationsChangeListener(<ref>MessageConversationsChangeCallback</ref> conversationsChangeCallback,
35562 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);
35564 long addFoldersChangeListener(<ref>MessageFoldersChangeCallback</ref> foldersChangeCallback,
35565 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);
35567 void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
35570 [Callback=FunctionOnly, NoInterfaceObject] interface MessageArraySuccessCallback {
35572 void onsuccess(<ref>Message</ref>[] messages);
35575 [Callback=FunctionOnly, NoInterfaceObject] interface MessageConversationArraySuccessCallback {
35577 void onsuccess(<ref>MessageConversation</ref>[] conversations);
35580 [Callback=FunctionOnly, NoInterfaceObject] interface MessageFolderArraySuccessCallback {
35582 void onsuccess(<ref>MessageFolder</ref>[] folders);
35585 [Callback, NoInterfaceObject] interface MessagesChangeCallback {
35587 void messagesadded(<ref>Message</ref>[] addedMessages);
35589 void messagesupdated(<ref>Message</ref>[] updatedMessages);
35591 void messagesremoved(<ref>Message</ref>[] removedMessages);
35594 [Callback, NoInterfaceObject] interface MessageConversationsChangeCallback {
35596 void conversationsadded(<ref>MessageConversation</ref>[] addedConversations);
35598 void conversationsupdated(<ref>MessageConversation</ref>[] updatedConversations);
35600 void conversationsremoved(<ref>MessageConversation</ref>[] removedConversations);
35603 [Callback, NoInterfaceObject] interface MessageFoldersChangeCallback {
35605 void foldersadded(<ref>MessageFolder</ref>[] addedFolders);
35607 void foldersupdated(<ref>MessageFolder</ref>[] updatedFolders);
35609 void foldersremoved(<ref>MessageFolder</ref>[] removedFolders);
35612 [NoInterfaceObject] interface MessageConversation {
35614 readonly attribute <ref>MessageConvId</ref> id;
35616 readonly attribute <ref>MessageServiceTag</ref> type;
35618 readonly attribute Date timestamp;
35620 readonly attribute unsigned long messageCount;
35622 readonly attribute unsigned long unreadMessages;
35624 readonly attribute DOMString preview;
35626 readonly attribute DOMString subject;
35628 readonly attribute boolean isRead;
35630 readonly attribute DOMString from;
35632 readonly attribute DOMString[] to;
35634 readonly attribute DOMString[] cc;
35636 readonly attribute DOMString[] bcc;
35638 readonly attribute <ref>MessageId</ref> lastMessageId;
35641 [NoInterfaceObject] interface MessageFolder {
35643 readonly attribute <ref>MessageFolderId</ref> id;
35645 readonly attribute <ref>MessageFolderId</ref> parentId;
35647 readonly attribute DOMString serviceId;
35649 readonly attribute <ref>MessageServiceTag</ref> contentType;
35651 attribute DOMString name setraises(<ref>WebAPIException</ref>);
35653 readonly attribute DOMString path;
35655 readonly attribute DOMString type;
35657 attribute boolean synchronizable setraises(<ref>WebAPIException</ref>);
35663 This API provides interfaces and methods for managing SMS, MMS, and email messages.
35667 The Messaging API provides access to these capabilities:
35671 Sending messages through different technologies: SMS, MMS, and email messages. </li>
35673 Retrieving available message services. </li>
35675 Searching for messages. </li>
35677 Managing messages: update, delete, and add. </li>
35679 Subscribing to receive notifications of message storage modifications. </li>
35681 Fetching conversations and subscribing to conversation updates. </li>
35684 For more information on the Messaging features, see <a href="../../org.tizen.web.appprogramming/html/guide/communication_guide/messaging.htm">Messaging Guide</a>.
35690 <def-api-feature identifier="http://tizen.org/feature/network.telephony">
35694 To guarantee this application running on a device with SMS feature, define below in the config file:
35699 <def-api-feature identifier="http://tizen.org/feature/network.telephony.mms">
35703 To guarantee this application running on a device with MMS feature, define below in the config file:
35709 <Interface name="MessageManagerObject" id="::Messaging::MessageManagerObject">
35710 <webidl> [NoInterfaceObject] interface MessageManagerObject {
35711 readonly attribute <ref>Messaging</ref> messaging;
35715 This interface defines what is instantiated by the Tizen object.
35719 There is a <em>tizen.messaging </em>object that allows access to the Messaging API.
35726 <ExtendedAttributeList>
35727 <ExtendedAttribute name="NoInterfaceObject">
35728 <webidl>NoInterfaceObject</webidl>
35729 </ExtendedAttribute>
35730 </ExtendedAttributeList>
35731 <Attribute readonly="readonly" name="messaging" id="::Messaging::MessageManagerObject::messaging">
35732 <webidl> readonly attribute <ref>Messaging</ref> messaging;</webidl>
35733 <Type name="Messaging"/>
35736 <Implements name1="Tizen" name2="MessageManagerObject">
35737 <webidl> <ref>Tizen</ref> implements <ref>MessageManagerObject</ref>;</webidl>
35739 <Enum name="MessageServiceTag" id="::Messaging::MessageServiceTag">
35740 <webidl> enum MessageServiceTag {"messaging.sms", "messaging.mms", "messaging.email" };</webidl>
35743 The supported Messaging service tags.
35744 The following values are supported in this release:
35749 messaging.sms, for SMS services </li>
35751 messaging.mms, for MMS services </li>
35753 messaging.email, for email services </li>
35760 <EnumValue stringvalue="messaging.sms">
35761 <webidl>"messaging.sms</webidl>
35763 <EnumValue stringvalue="messaging.mms">
35764 <webidl> "messaging.mms</webidl>
35766 <EnumValue stringvalue="messaging.email">
35767 <webidl> "messaging.email</webidl>
35770 <Typedef name="MessageId" id="::Messaging::MessageId">
35771 <webidl> typedef DOMString MessageId;</webidl>
35774 The Message identifier.
35780 <Type type="DOMString"/>
35782 <Typedef name="MessageAttachmentId" id="::Messaging::MessageAttachmentId">
35783 <webidl> typedef DOMString MessageAttachmentId;</webidl>
35786 The MessageAttachment identifier within a message.
35792 <Type type="DOMString"/>
35794 <Typedef name="MessageConvId" id="::Messaging::MessageConvId">
35795 <webidl> typedef DOMString MessageConvId;</webidl>
35798 The MessageConversation identifier.
35804 <Type type="DOMString"/>
35806 <Typedef name="MessageFolderId" id="::Messaging::MessageFolderId">
35807 <webidl> typedef DOMString MessageFolderId;</webidl>
35810 The identifier of an email folder .
35816 <Type type="DOMString"/>
35818 <Interface name="Message" id="::Messaging::Message">
35819 <webidl> [Constructor(<ref>MessageServiceTag</ref> type, optional <ref>MessageInit</ref>? messageInitDict)]
35820 interface Message {
35822 readonly attribute <ref>MessageId</ref>? id;
35824 readonly attribute <ref>MessageConvId</ref>? conversationId;
35826 readonly attribute <ref>MessageFolderId</ref>? folderId;
35828 readonly attribute <ref>MessageServiceTag</ref> type;
35830 readonly attribute Date? timestamp;
35832 readonly attribute DOMString? from;
35834 attribute DOMString[] to setraises(<ref>WebAPIException</ref>);
35836 attribute DOMString[] cc setraises(<ref>WebAPIException</ref>);
35838 attribute DOMString[] bcc setraises(<ref>WebAPIException</ref>);
35840 attribute <ref>MessageBody</ref> body setraises(<ref>WebAPIException</ref>);
35842 attribute boolean isRead setraises(<ref>WebAPIException</ref>);
35844 readonly attribute boolean hasAttachment;
35846 attribute boolean isHighPriority setraises(<ref>WebAPIException</ref>);
35848 attribute DOMString subject setraises(<ref>WebAPIException</ref>);
35850 readonly attribute <ref>MessageId</ref>? inResponseTo setraises(<ref>WebAPIException</ref>);
35852 readonly attribute DOMString messageStatus;
35854 attribute <ref>MessageAttachment</ref>[] attachments setraises(<ref>WebAPIException</ref>);
35858 Defines the content and attributes of a message.
35862 This interface allows a web application to define the set of properties
35863 linked to a message.
35866 It also allows an application to retrieve the content of a
35867 message through <em>MessageStorage </em>methods. In these
35868 cases, the implementation can return, in some situations, only the meta-information
35869 of a message without the loaded body. In such situations, the method <em>MessageService.loadMessageBody() </em>should be used.
35875 <Code> // Define the success callback.
35876 var messageSentCallback = function(recipients) {
35877 console.log("Message sent successfully to " + recipients.length + " recipients.");
35880 // Define the error callback.
35881 function errorCallback(err) {
35882 console.log(err.name + " error: " + err.message);
35885 function serviceListCB(services) {
35886 if (services.length > 0) {
35887 var msg = new tizen.Message("messaging.sms", {plainBody: "Tizen first SMS message."});
35888 services[0].sendMessage(msg, messageSentCallback, errorCallback);
35892 tizen.messaging.getMessageServices("messaging.sms",
35897 <ExtendedAttributeList>
35898 <ExtendedAttribute name="Constructor">
35899 <webidl>Constructor(<ref>MessageServiceTag</ref> type, optional <ref>MessageInit</ref>? messageInitDict)</webidl>
35901 <Argument name="type">
35902 <Type name="MessageServiceTag"/>
35904 <Argument optional="optional" name="messageInitDict">
35905 <Type name="MessageInit" nullable="nullable"/>
35908 </ExtendedAttribute>
35909 </ExtendedAttributeList>
35910 <Attribute readonly="readonly" name="id" id="::Messaging::Message::id">
35911 <webidl> readonly attribute <ref>MessageId</ref>? id;</webidl>
35914 The message identifier.
35918 The ID is locally unique and persistent property, assigned by the device or the Web runtime (WRT).
35919 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>.
35922 By default, this attribute is set to <var>null</var>.
35929 <Type name="MessageId" nullable="nullable"/>
35931 <Attribute readonly="readonly" name="conversationId" id="::Messaging::Message::conversationId">
35932 <webidl> readonly attribute <ref>MessageConvId</ref>? conversationId;</webidl>
35935 The identifier of the conversation to which the message belongs.
35939 By default, this attribute is set to <var>null</var>.
35946 <Type name="MessageConvId" nullable="nullable"/>
35948 <Attribute readonly="readonly" name="folderId" id="::Messaging::Message::folderId">
35949 <webidl> readonly attribute <ref>MessageFolderId</ref>? folderId;</webidl>
35952 The identifier of the folder to which the message belongs.
35956 By default, this attribute is set to null.
35959 For SMS and MMS, <em>folderId </em>can be one of these values:
35976 <Type name="MessageFolderId" nullable="nullable"/>
35978 <Attribute readonly="readonly" name="type" id="::Messaging::Message::type">
35979 <webidl> readonly attribute <ref>MessageServiceTag</ref> type;</webidl>
35982 The type of a given message.
35988 <Type name="MessageServiceTag"/>
35990 <Attribute readonly="readonly" name="timestamp" id="::Messaging::Message::timestamp">
35991 <webidl> readonly attribute Date? timestamp;</webidl>
35994 The timestamp of a message.
35998 For a received message, the timestamps indicates the time at which a message is received.
35999 For a sent message, the timestamp indicates the time at which a message is sent.
36000 For a draft message, the timestamp indicates the time at which a message is added.
36001 By default, this attribute is set to <var>null</var>.
36008 <Type type="Date" nullable="nullable"/>
36010 <Attribute readonly="readonly" name="from" id="::Messaging::Message::from">
36011 <webidl> readonly attribute DOMString? from;</webidl>
36014 The source address (or source phone number) of a message.
36018 This property is set up by the device or the web runtime environment.
36019 By default, this attribute is set to null.
36026 <Type type="DOMString" nullable="nullable"/>
36028 <Attribute name="to" id="::Messaging::Message::to">
36029 <webidl> attribute DOMString[] to setraises(<ref>WebAPIException</ref>);</webidl>
36032 The destination of a message.
36038 <Type type="array">
36039 <Type type="DOMString"/>
36042 <RaiseException name="WebAPIException"/>
36045 <Attribute name="cc" id="::Messaging::Message::cc">
36046 <webidl> attribute DOMString[] cc setraises(<ref>WebAPIException</ref>);</webidl>
36049 The carbon copy address of a message.
36053 This property is used only for email messages.
36060 <Type type="array">
36061 <Type type="DOMString"/>
36064 <RaiseException name="WebAPIException"/>
36067 <Attribute name="bcc" id="::Messaging::Message::bcc">
36068 <webidl> attribute DOMString[] bcc setraises(<ref>WebAPIException</ref>);</webidl>
36071 The blind carbon copy (bcc) address of a message.
36075 This property is used only with email messages.
36082 <Type type="array">
36083 <Type type="DOMString"/>
36086 <RaiseException name="WebAPIException"/>
36089 <Attribute name="body" id="::Messaging::Message::body">
36090 <webidl> attribute <ref>MessageBody</ref> body setraises(<ref>WebAPIException</ref>);</webidl>
36093 An attribute to store the body of a message.
36099 <Type name="MessageBody"/>
36101 <RaiseException name="WebAPIException"/>
36104 <Attribute name="isRead" id="::Messaging::Message::isRead">
36105 <webidl> attribute boolean isRead setraises(<ref>WebAPIException</ref>);</webidl>
36108 An attribute to indicate the read state for a message.
36112 This property is set to <var>true</var> if the message has been read. Else it is set to <var>false</var>.
36119 <Type type="boolean"/>
36121 <RaiseException name="WebAPIException"/>
36124 <Attribute readonly="readonly" name="hasAttachment" id="::Messaging::Message::hasAttachment">
36125 <webidl> readonly attribute boolean hasAttachment;</webidl>
36128 An attribute to indicate whether an attachment(s) exists or not.
36132 It is set to <var>true</var> if a message has one or more attachments.
36135 This property is used only with email and MMS messages.(It is valid when body is loaded)
36142 <Type type="boolean"/>
36144 <Attribute name="isHighPriority" id="::Messaging::Message::isHighPriority">
36145 <webidl> attribute boolean isHighPriority setraises(<ref>WebAPIException</ref>);</webidl>
36148 An attribute to indicate the priority of a message.
36152 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.
36155 This property is used only with email messages.
36162 <Type type="boolean"/>
36164 <RaiseException name="WebAPIException"/>
36167 <Attribute name="subject" id="::Messaging::Message::subject">
36168 <webidl> attribute DOMString subject setraises(<ref>WebAPIException</ref>);</webidl>
36171 An attribute to store the subject of a message.
36175 This property is used only with email and MMS messages.
36182 <Type type="DOMString"/>
36184 <RaiseException name="WebAPIException"/>
36187 <Attribute readonly="readonly" name="inResponseTo" id="::Messaging::Message::inResponseTo">
36188 <webidl> readonly attribute <ref>MessageId</ref>? inResponseTo setraises(<ref>WebAPIException</ref>);</webidl>
36191 The identifier of the original message.
36195 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>.
36202 <Type name="MessageId" nullable="nullable"/>
36204 <RaiseException name="WebAPIException"/>
36207 <Attribute readonly="readonly" name="messageStatus" id="::Messaging::Message::messageStatus">
36208 <webidl> readonly attribute DOMString messageStatus;</webidl>
36211 The status of a given message.
36215 It can be one of these values:
36228 If the status of the current message does not correspond to any item from
36229 the list, an empty value is returned.
36236 <Type type="DOMString"/>
36238 <Attribute name="attachments" id="::Messaging::Message::attachments">
36239 <webidl> attribute <ref>MessageAttachment</ref>[] attachments setraises(<ref>WebAPIException</ref>);</webidl>
36242 The list of the message attachments.
36246 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).
36252 <Code> // Define the success callback.
36253 function serviceListCB(services) {
36254 if (services.length > 0) {
36255 var msg = new tizen.Message("messaging.email");
36256 msg.attachments = [new tizen.MessageAttachment("images/myimage.png", "image/png"),
36257 new tizen.MessageAttachment("documents/mydoc.pdf", "text/pdf")];
36261 tizen.messaging.getMessageServices("messaging.email", serviceListCB);
36266 <Type type="array">
36267 <Type name="MessageAttachment"/>
36270 <RaiseException name="WebAPIException"/>
36274 <Dictionary name="MessageInit" id="::Messaging::MessageInit">
36275 <webidl> dictionary MessageInit
36286 DOMString plainBody;
36288 DOMString htmlBody;
36290 boolean isHighPriority;
36294 Provides specific message attributes upon message creation.
36298 This interface is used to input parameters when messages are created using
36299 the Message constructor.
36302 All the attributes are optional and are <var>undefined </var>by default, unless otherwise stated in the parameter description.
36309 <DictionaryMember name="subject" id="::Messaging::MessageInit::subject">
36310 <webidl> DOMString subject;</webidl>
36313 The subject of a message.
36317 This property is used only with email and MMS messages.
36324 <Type type="DOMString"/>
36325 </DictionaryMember>
36326 <DictionaryMember name="to" id="::Messaging::MessageInit::to">
36327 <webidl> DOMString[] to;</webidl>
36330 The destination addresses (or phone numbers) of a message.
36336 <Type type="array">
36337 <Type type="DOMString"/>
36339 </DictionaryMember>
36340 <DictionaryMember name="cc" id="::Messaging::MessageInit::cc">
36341 <webidl> DOMString[] cc;</webidl>
36344 The carbon copy addresses of a message.
36348 This property is used only with email messages.
36355 <Type type="array">
36356 <Type type="DOMString"/>
36358 </DictionaryMember>
36359 <DictionaryMember name="bcc" id="::Messaging::MessageInit::bcc">
36360 <webidl> DOMString[] bcc;</webidl>
36363 The blind carbon copy addresses of a message.
36367 This property is used only with email messages.
36374 <Type type="array">
36375 <Type type="DOMString"/>
36377 </DictionaryMember>
36378 <DictionaryMember name="plainBody" id="::Messaging::MessageInit::plainBody">
36379 <webidl> DOMString plainBody;</webidl>
36382 The plain text representation of a message body.
36388 <Type type="DOMString"/>
36389 </DictionaryMember>
36390 <DictionaryMember name="htmlBody" id="::Messaging::MessageInit::htmlBody">
36391 <webidl> DOMString htmlBody;</webidl>
36394 The HTML representation of a message body.
36398 This property is used only with email messages.
36405 <Type type="DOMString"/>
36406 </DictionaryMember>
36407 <DictionaryMember name="isHighPriority" id="::Messaging::MessageInit::isHighPriority">
36408 <webidl> boolean isHighPriority;</webidl>
36411 The priority of a message.
36415 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.
36418 This property is used only with email messages.
36425 <Type type="boolean"/>
36426 </DictionaryMember>
36428 <Interface name="MessageBody" id="::Messaging::MessageBody">
36429 <webidl> [NoInterfaceObject] interface MessageBody {
36431 readonly attribute <ref>MessageId</ref> messageId;
36433 readonly attribute boolean loaded;
36435 attribute DOMString plainBody setraises(<ref>WebAPIException</ref>);
36437 attribute DOMString htmlBody setraises(<ref>WebAPIException</ref>);
36439 attribute <ref>MessageAttachment</ref>[] inlineAttachments setraises(<ref>WebAPIException</ref>);
36443 This interface describes a message body.
36447 Message body is comprised of a plain text, an HTML, and inline attachments.
36454 <ExtendedAttributeList>
36455 <ExtendedAttribute name="NoInterfaceObject">
36456 <webidl>NoInterfaceObject</webidl>
36457 </ExtendedAttribute>
36458 </ExtendedAttributeList>
36459 <Attribute readonly="readonly" name="messageId" id="::Messaging::MessageBody::messageId">
36460 <webidl> readonly attribute <ref>MessageId</ref> messageId;</webidl>
36463 The ID of a parent message.
36467 It holds the ID of the message containing this body.
36474 <Type name="MessageId"/>
36476 <Attribute readonly="readonly" name="loaded" id="::Messaging::MessageBody::loaded">
36477 <webidl> readonly attribute boolean loaded;</webidl>
36480 An attribute to indicate whether the message body has been loaded or not.
36484 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.
36485 The default value is <var>false</var>.
36492 <Type type="boolean"/>
36494 <Attribute name="plainBody" id="::Messaging::MessageBody::plainBody">
36495 <webidl> attribute DOMString plainBody setraises(<ref>WebAPIException</ref>);</webidl>
36498 The plain text representation of a message body.
36504 <Type type="DOMString"/>
36506 <RaiseException name="WebAPIException"/>
36509 <Attribute name="htmlBody" id="::Messaging::MessageBody::htmlBody">
36510 <webidl> attribute DOMString htmlBody setraises(<ref>WebAPIException</ref>);</webidl>
36513 The HTML representation of a message body.
36517 This attribute holds an empty string if the message does not have any HTML body content.
36518 This property is used only with email messages.
36525 <Type type="DOMString"/>
36527 <RaiseException name="WebAPIException"/>
36530 <Attribute name="inlineAttachments" id="::Messaging::MessageBody::inlineAttachments">
36531 <webidl> attribute <ref>MessageAttachment</ref>[] inlineAttachments setraises(<ref>WebAPIException</ref>);</webidl>
36534 The list of the inline attachments.
36538 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).
36541 To indicate where to show an inline attachment within the HTML body, a link of the following format should be provided:
36542 "<img src="The file name of a inline attachment">"
36543 This property is used only with email messages.
36549 <Code> // Define the success callback.
36550 function serviceListCB(services) {
36551 if (services.length > 0) {
36552 var msg = new tizen.Message("messaging.email");
36553 msg.body.htmlBody = "<html><body><img src='myimage.png'></body></html>";
36554 msg.body.inlineAttachments = [new tizen.MessageAttachment("images/myimage.png")];
36558 tizen.messaging.getMessageServices("messaging.email", serviceListCB);
36562 <Type type="array">
36563 <Type name="MessageAttachment"/>
36566 <RaiseException name="WebAPIException"/>
36570 <Interface name="MessageAttachment" id="::Messaging::MessageAttachment">
36571 <webidl> [Constructor(DOMString filePath, optional DOMString? mimeType)]
36572 interface MessageAttachment {
36574 readonly attribute <ref>MessageAttachmentId</ref>? id;
36576 readonly attribute <ref>MessageId</ref>? messageId;
36578 readonly attribute DOMString? mimeType;
36580 readonly attribute DOMString? filePath;
36584 This interface defines the content and attributes of a message attachment.
36590 <ExtendedAttributeList>
36591 <ExtendedAttribute name="Constructor">
36592 <webidl>Constructor(DOMString filePath, optional DOMString? mimeType)</webidl>
36594 <Argument name="filePath">
36595 <Type type="DOMString"/>
36597 <Argument optional="optional" name="mimeType">
36598 <Type type="DOMString" nullable="nullable"/>
36601 </ExtendedAttribute>
36602 </ExtendedAttributeList>
36603 <Attribute readonly="readonly" name="id" id="::Messaging::MessageAttachment::id">
36604 <webidl> readonly attribute <ref>MessageAttachmentId</ref>? id;</webidl>
36607 The ID of an attachment.
36611 It holds the identifier of the attachment within its parent message.
36614 By default, this attribute is set to <var>null</var>.
36621 <Type name="MessageAttachmentId" nullable="nullable"/>
36623 <Attribute readonly="readonly" name="messageId" id="::Messaging::MessageAttachment::messageId">
36624 <webidl> readonly attribute <ref>MessageId</ref>? messageId;</webidl>
36627 The ID of a parent message.
36631 By default, this attribute is set to <var>null</var>.
36638 <Type name="MessageId" nullable="nullable"/>
36640 <Attribute readonly="readonly" name="mimeType" id="::Messaging::MessageAttachment::mimeType">
36641 <webidl> readonly attribute DOMString? mimeType;</webidl>
36644 The attachment MIME type.
36648 It describes the MIME type of an attachment, for example; "text/html".
36651 By default, this attribute is set to <var>null</var>.
36658 <Type type="DOMString" nullable="nullable"/>
36660 <Attribute readonly="readonly" name="filePath" id="::Messaging::MessageAttachment::filePath">
36661 <webidl> readonly attribute DOMString? filePath;</webidl>
36664 The location path to a loaded attachment file.
36668 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.
36675 <Type type="DOMString" nullable="nullable"/>
36678 <Interface name="Messaging" id="::Messaging::Messaging">
36679 <webidl> [NoInterfaceObject] interface Messaging {
36681 void getMessageServices(<ref>MessageServiceTag</ref> messageServiceType,
36682 <ref>MessageServiceArraySuccessCallback</ref> successCallback,
36683 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
36687 This interface retrieves messaging services.
36691 Fetches all existing messaging services by type or a messaging service of a given type
36692 for concrete account.
36698 <Code> // Define the success callback.
36699 function serviceListCB(services) {
36700 if (services.length > 0) {
36701 var msg = new tizen.Message("messaging.sms");
36705 // Define error callback.
36706 function errorCallback(error) {
36707 console.log("Cannot get messaging service " + error.message);
36710 tizen.messaging.getMessageServices("messaging.sms", serviceListCB,
36714 <ExtendedAttributeList>
36715 <ExtendedAttribute name="NoInterfaceObject">
36716 <webidl>NoInterfaceObject</webidl>
36717 </ExtendedAttribute>
36718 </ExtendedAttributeList>
36719 <Operation name="getMessageServices" id="::Messaging::Messaging::getMessageServices">
36720 <webidl> void getMessageServices(<ref>MessageServiceTag</ref> messageServiceType,
36721 <ref>MessageServiceArraySuccessCallback</ref> successCallback,
36722 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
36725 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.
36729 The errorCallback is launched with these error types:
36733 InvalidValuesError - If any of the input parameters contain an invalid value, the encoding is not valid or onsuccess is null.
36734 Please note that to allow developers to ignore errors, errorCallback accepts null as a valid value. </li>
36736 UnknownError - In any other error case. </li>
36742 <Code> // Define the error callback.
36743 function errorCallback(error) {
36744 console.log("Cannot get messaging service " + error.message);
36747 // Define the success callback.
36748 function serviceListCB(services) {
36749 console.log("Found " + services.length + "email services");
36752 tizen.messaging.getMessageServices("messaging.email", serviceListCB,
36756 <Type type="void"/>
36758 <Argument name="messageServiceType">
36761 Type of the services to be retrieved.
36764 <Type name="MessageServiceTag"/>
36766 <Argument name="successCallback">
36769 The method invoked when the services are successfully retrieved.
36772 <Type name="MessageServiceArraySuccessCallback"/>
36774 <Argument optional="optional" name="errorCallback">
36777 The method invoked when an error occurs.
36780 <Type name="ErrorCallback" nullable="nullable"/>
36784 <RaiseException name="WebAPIException">
36787 with error type TypeMismatchError, if any input parameter
36788 is not compatible with the expected type for that parameter.
36791 with error type NotSupportedError, if this feature is not supported.
36798 <Interface name="MessageServiceArraySuccessCallback" id="::Messaging::MessageServiceArraySuccessCallback">
36799 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface MessageServiceArraySuccessCallback {
36801 void onsuccess(<ref>MessageService</ref>[] services);
36806 Defines callback(s) for retrieving message services.
36812 <ExtendedAttributeList>
36813 <ExtendedAttribute name="Callback" value="FunctionOnly">
36814 <webidl>Callback</webidl>
36815 </ExtendedAttribute>
36816 <ExtendedAttribute name="NoInterfaceObject">
36817 <webidl> NoInterfaceObject</webidl>
36818 </ExtendedAttribute>
36819 </ExtendedAttributeList>
36820 <Operation name="onsuccess" id="::Messaging::MessageServiceArraySuccessCallback::onsuccess">
36821 <webidl> void onsuccess(<ref>MessageService</ref>[] services);</webidl>
36824 Called when finding message services is successful.
36830 <Type type="void"/>
36832 <Argument name="services">
36835 Array of available <em>MessageService</em> objects on the device.
36838 <Type type="array">
36839 <Type name="MessageService"/>
36845 <Interface name="MessageService" id="::Messaging::MessageService">
36846 <webidl> [NoInterfaceObject] interface MessageService {
36848 readonly attribute DOMString id;
36850 readonly attribute <ref>MessageServiceTag</ref> type;
36852 readonly attribute DOMString name;
36854 void sendMessage(<ref>Message</ref> message,
36855 optional <ref>MessageRecipientsCallback</ref>? successCallback,
36856 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
36858 void loadMessageBody(<ref>Message</ref> message,
36859 <ref>MessageBodySuccessCallback</ref> successCallback,
36860 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
36862 void loadMessageAttachment(<ref>MessageAttachment</ref> attachment,
36863 <ref>MessageAttachmentSuccessCallback</ref> successCallback,
36864 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
36866 long sync(optional <ref>SuccessCallback</ref>? successCallback,
36867 optional <ref>ErrorCallback</ref>? errorCallback,
36868 optional unsigned long? limit) raises(<ref>WebAPIException</ref>);
36870 long syncFolder(<ref>MessageFolder</ref> folder,
36871 optional <ref>SuccessCallback</ref>? successCallback,
36872 optional <ref>ErrorCallback</ref>? errorCallback,
36873 optional unsigned long? limit) raises(<ref>WebAPIException</ref>);
36875 void stopSync(long opId) raises(<ref>WebAPIException</ref>);
36877 readonly attribute <ref>MessageStorage</ref> messageStorage getraises(<ref>WebAPIException</ref>);
36881 This interface allows a web application to manipulate and send messages and supports the message creating, sending, and fetching capabilities.
36885 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.
36888 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.
36891 The interface allows fetching of the message body for a given message using loadMessageBody() method.
36897 <Code> // Define the success callback.
36898 function messageSent(recipients) {
36899 console.log("The SMS has been sent");
36902 // Define the error callback.
36903 function messageFailed(error) {
36904 console.log("The SMS could not be sent " + error.message);
36907 // Define service error callback.
36908 function serviceErrorCB(error) {
36909 console.log("Cannot get messaging service " + error.message);
36912 // Define the success callback.
36913 function serviceListCB(services) {
36914 if (services.length > 0) {
36915 // SMS sending example
36916 var msg = new tizen.Message("messaging.sms", {plainBody:"I will arrive in 10 minutes.",
36917 to:["+34666666666"]});
36919 services[0].sendMessage(msg, messageSent, messageFailed);
36923 tizen.messaging.getMessageServices("messaging.sms",
36928 <ExtendedAttributeList>
36929 <ExtendedAttribute name="NoInterfaceObject">
36930 <webidl>NoInterfaceObject</webidl>
36931 </ExtendedAttribute>
36932 </ExtendedAttributeList>
36933 <Attribute readonly="readonly" name="id" id="::Messaging::MessageService::id">
36934 <webidl> readonly attribute DOMString id;</webidl>
36937 The unique identifier of this Messaging service.
36943 <Type type="DOMString"/>
36945 <Attribute readonly="readonly" name="type" id="::Messaging::MessageService::type">
36946 <webidl> readonly attribute <ref>MessageServiceTag</ref> type;</webidl>
36949 The tag supported by this messaging service.
36955 <Type name="MessageServiceTag"/>
36957 <Attribute readonly="readonly" name="name" id="::Messaging::MessageService::name">
36958 <webidl> readonly attribute DOMString name;</webidl>
36961 The messaging service name taken from the messaging service
36967 <Type type="DOMString"/>
36969 <Operation name="sendMessage" id="::Messaging::MessageService::sendMessage">
36970 <webidl> void sendMessage(<ref>Message</ref> message,
36971 optional <ref>MessageRecipientsCallback</ref>? successCallback,
36972 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
36975 Sends a specified message.
36979 For messaging technologies in which the message is sent individually to every recipient(such as SMS), individual notification must be supported as follows:
36982 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.
36983 These error types may be passed, depending on the error conditions:
36987 NetworkError - If the network connection is not accessible. </li>
36989 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
36991 UnknownError - If any other error occurs. </li>
36994 The error message contains the name of the recipient who has failed to receive the sent message.
36997 When the operation is fully completed (that is, the implementation has the
36998 result of the send operation for all recipients), the onsuccess()
36999 method of the successCallback will be invoked with an array of recipients who received
37000 the sent message, as input parameter.
37010 http://tizen.org/privilege/messaging.write
37012 <Code> // Define the success callback
37013 function messageSent(recipients) {
37014 for (var i = 0; i < recipients.length; i++) {
37015 console.log("The SMS has been sent to " + recipients[i]);
37019 // Define the error callback.
37020 function messageFailed(error) {
37021 console.log("The SMS could not be sent " + error.message);
37024 // Define the success callback.
37025 function serviceListCB(services) {
37026 if (services.length > 0) {
37027 // SMS sending example
37028 var msg = new tizen.Message("messaging.sms", {plainBody: "I will arrive in 10 minutes.",
37029 to: ["+34666666666", "+34888888888"]});
37031 services[0].sendMessage(msg, messageSent, messageFailed);
37034 tizen.messaging.getMessageServices("messaging.sms", serviceListCB);
37037 <Type type="void"/>
37039 <Argument name="message">
37042 The message to be sent.
37045 <Type name="Message"/>
37047 <Argument optional="optional" name="successCallback">
37050 The method to be invoked when the message is successfully sent.
37053 <Type name="MessageRecipientsCallback" nullable="nullable"/>
37055 <Argument optional="optional" name="errorCallback">
37058 The method to be invoked when the sending request has failed.
37061 <Type name="ErrorCallback" nullable="nullable"/>
37065 <RaiseException name="WebAPIException">
37068 with error type TypeMismatchError, if any input parameter
37069 is not compatible with the expected type for that parameter.
37072 with error type SecurityError, if the application does not have the privilege to call this method.
37075 with error type NotSupportedError, if this feature is not supported.
37081 <Operation name="loadMessageBody" id="::Messaging::MessageService::loadMessageBody">
37082 <webidl> void loadMessageBody(<ref>Message</ref> message,
37083 <ref>MessageBodySuccessCallback</ref> successCallback,
37084 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
37087 Loads the body for a specified message.
37091 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.
37092 If the message body is already loaded, the onsuccess() method of the successCallback will be invoked immediately.
37095 The errorCallback is launched with these error types:
37099 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
37101 UnknownError - If any other error occurs. </li>
37111 http://tizen.org/privilege/messaging.write
37113 <Code> // Assume messaging service is initialized.
37115 // Define the success body loaded callback.
37116 function successCallback(message) {
37117 console.log ("body for message: " + message.subject + "from: " + message.from + "loaded.");
37119 // Define error callback.
37120 function errorCallback(error) {
37121 console.log("Cannot load message body" + error.message);
37124 function messageQueryCallback(messages) {
37125 for (var i = 0; i < messages.length; i++) {
37126 var message = messages[i];
37127 if (!message.body.loaded) {
37128 service.loadMessageBody(message, successCallback, errorCallback);
37133 service.messageStorage.findMessages(new tizen.AttributeFilter("type", "EXACTLY", "messaging.email"), messageQueryCallback);
37136 <Type type="void"/>
37138 <Argument name="message">
37141 Message with the body to be loaded.
37144 <Type name="Message"/>
37146 <Argument name="successCallback">
37149 The method to be invoked when the message body is successfully loaded.
37152 <Type name="MessageBodySuccessCallback"/>
37154 <Argument optional="optional" name="errorCallback">
37157 The method to be invoked when the loading request fails.
37160 <Type name="ErrorCallback" nullable="nullable"/>
37164 <RaiseException name="WebAPIException">
37167 with error type TypeMismatchError, if any input parameter
37168 is not compatible with the expected type for that parameter.
37171 with error type SecurityError, if the application does not have the privilege to call this method.
37174 with error type NotSupportedError, if this feature is not supported.
37180 <Operation name="loadMessageAttachment" id="::Messaging::MessageService::loadMessageAttachment">
37181 <webidl> void loadMessageAttachment(<ref>MessageAttachment</ref> attachment,
37182 <ref>MessageAttachmentSuccessCallback</ref> successCallback,
37183 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
37186 Loads a specified message attachment.
37190 This method is used only for email services. If the message attachment is already loaded, the onsuccess() method of the successCallback is invoked immediately.
37193 The errorCallback is launched with these error types:
37197 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
37199 UnknownError - If any other error occurs. </li>
37209 http://tizen.org/privilege/messaging.write
37211 <Code> // Assume messaging service is initialized.
37213 // Define success body loaded callback
37214 function successCallback(attachment) {
37215 console.log("attachment" + attachment.id + "is loaded to:" + attachment.filePath);
37217 // Define error callback
37218 function errorCallback(error) {
37219 console.log("Cannot load message attachment" + error.message);
37222 function messagesFoundCB(messages) {
37223 for (var i = 0; i < messages.length; i++) {
37224 var message = messages[i];
37225 if (!message.attachments[0].loaded) {
37226 service.loadMessageAttachment(message.attachments[0], successCallback, errorCallback);
37231 service.messageStorage.findMessages(new tizen.AttributeFilter("hasAttachment", "EXACTLY", true), messagesFoundCB);
37234 <Type type="void"/>
37236 <Argument name="attachment">
37239 Message attachment to be loaded.
37242 <Type name="MessageAttachment"/>
37244 <Argument name="successCallback">
37247 The method to be invoked when the message attachment is successfully loaded.
37250 <Type name="MessageAttachmentSuccessCallback"/>
37252 <Argument optional="optional" name="errorCallback">
37255 The method to be invoked when the loading request fails.
37258 <Type name="ErrorCallback" nullable="nullable"/>
37262 <RaiseException name="WebAPIException">
37265 with error type TypeMismatchError, if any input parameter
37266 is not compatible with the expected type for that parameter.
37269 with error type SecurityError, if the application does not have the privilege to call this method.
37272 with error type NotSupportedError, if this feature is not supported.
37278 <Operation name="sync" id="::Messaging::MessageService::sync">
37279 <webidl> long sync(optional <ref>SuccessCallback</ref>? successCallback,
37280 optional <ref>ErrorCallback</ref>? errorCallback,
37281 optional unsigned long? limit) raises(<ref>WebAPIException</ref>);</webidl>
37284 Synchronizes the service content with an external mail server.
37288 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.
37291 The errorCallback is launched with these error types:
37295 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
37297 AbortError - If the operation has been stopped. </li>
37299 UnknownError - If any other error occurs. </li>
37309 http://tizen.org/privilege/messaging.write
37311 <Code> // Define the success callback.
37312 function serviceSynced() {
37313 console.log("New messages are fetched!");
37316 // Define the success callback.
37317 function servicesListSuccessCB(services) {
37318 services[0].sync(serviceSynced, null, 30);
37319 // Subscribe to MessageStorage notification
37321 tizen.messaging.getMessageServices("messaging.email", servicesListSuccessCB);
37327 long The identifier which can be used to stop this service operation.
37332 <Argument optional="optional" name="successCallback">
37335 The method to be invoked when all the actions are completed successfully.
37338 <Type name="SuccessCallback" nullable="nullable"/>
37340 <Argument optional="optional" name="errorCallback">
37343 The method to be invoked when the request fails.
37346 <Type name="ErrorCallback" nullable="nullable"/>
37348 <Argument optional="optional" name="limit">
37351 The maximum amount of messages retrieved within each folder.
37354 <Type type="unsigned long" nullable="nullable"/>
37358 <RaiseException name="WebAPIException">
37361 with error type TypeMismatchError, if any input parameter
37362 is not compatible with the expected type for that parameter.
37365 with error type SecurityError, if the application does not have the privilege to call this method.
37368 with error type NotSupportedError, if this feature is not supported.
37374 <Operation name="syncFolder" id="::Messaging::MessageService::syncFolder">
37375 <webidl> long syncFolder(<ref>MessageFolder</ref> folder,
37376 optional <ref>SuccessCallback</ref>? successCallback,
37377 optional <ref>ErrorCallback</ref>? errorCallback,
37378 optional unsigned long? limit) raises(<ref>WebAPIException</ref>);</webidl>
37381 Synchronizes the folder content with an external mail server.
37385 This method is used only for email services. This method performs the following actions:
37389 Exports local changes within a given folder from device to server. </li>
37391 Retrieves the list of available messages from within the given folder. </li>
37394 Messages that are retrieved from a given folder, even if synchronizable flag for this folder is not set.
37395 The backend is responsible in deciding which data is retrieved for every message. It can be:
37399 Message header details </li>
37401 Whole message body </li>
37404 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.
37407 The errorCallback is launched with these error types:
37411 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
37413 AbortError - If the operation is stopped. </li>
37415 UnknownError - If any other error occurs. </li>
37425 http://tizen.org/privilege/messaging.write
37427 <Code> var emailService; // Assume email service is initialized
37428 // Define the error callback.
37429 function errorCallback(err) {
37430 console.log(err.name + " error: " + err.message);
37432 function serviceCallback(services) {
37433 emailService = services[0];
37434 var filter = new tizen.AttributeFilter("serviceId", "EXACTLY", emailService.id);
37436 emailService.messageStorage.findFolders(filter, folderQueryCallback);
37439 // Define the success callback.
37440 function folderSynced() {
37441 console.log("New messages are fetched!");
37443 function folderQueryCallback(folders) {
37444 console.log(folders.length + " folders(s) found!");
37445 for (var i = 0; i < folders.length; i++) {
37446 emailService.syncFolder (folders[i], folderSynced, null, 30);
37450 tizen.messaging.getMessageServices("messaging.email", serviceCallback, errorCallback);
37456 long The identifier which can be used to stop this service operation.
37461 <Argument name="folder">
37464 The folder to be synchronized.
37467 <Type name="MessageFolder"/>
37469 <Argument optional="optional" name="successCallback">
37472 The method to be invoked when all actions are completed successfully.
37475 <Type name="SuccessCallback" nullable="nullable"/>
37477 <Argument optional="optional" name="errorCallback">
37480 The method to be invoked when the request fails.
37483 <Type name="ErrorCallback" nullable="nullable"/>
37485 <Argument optional="optional" name="limit">
37488 The maximum amount of messages retrieved within a given folder.
37491 <Type type="unsigned long" nullable="nullable"/>
37495 <RaiseException name="WebAPIException">
37498 with error type TypeMismatchError, if any input parameter
37499 is not compatible with the expected type for that parameter.
37502 with error type SecurityError, if the application does not have the privilege to call this method.
37505 with error type NotSupportedError, if this feature is not supported.
37511 <Operation name="stopSync" id="::Messaging::MessageService::stopSync">
37512 <webidl> void stopSync(long opId) raises(<ref>WebAPIException</ref>);</webidl>
37515 Stops sync() and syncFoler() operation.
37519 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.
37522 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.
37529 <Type type="void"/>
37531 <Argument name="opId">
37534 A service operation identifier.
37537 <Type type="long"/>
37541 <RaiseException name="WebAPIException">
37544 with error type TypeMismatchError, if any input parameter
37545 is not compatible with the expected type for that parameter.
37548 with error type InvalidValuesError, if any of the input parameters contains an invalid value.
37554 <Attribute readonly="readonly" name="messageStorage" id="::Messaging::MessageService::messageStorage">
37555 <webidl> readonly attribute <ref>MessageStorage</ref> messageStorage getraises(<ref>WebAPIException</ref>);</webidl>
37558 An attribute to access <em>MessageStorage </em>for this messaging service.
37562 If the backend does not support <em>MessageStorage </em>for this messaging service, a WebAPIException is raised with error type NotSupportedError.
37569 <Type name="MessageStorage"/>
37571 <RaiseException name="WebAPIException"/>
37575 <Interface name="MessageRecipientsCallback" id="::Messaging::MessageRecipientsCallback">
37576 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface MessageRecipientsCallback {
37578 void onsuccess(DOMString[] recipients);
37583 This interface specifies the methods to be called for the sendMessage() operation.
37589 <ExtendedAttributeList>
37590 <ExtendedAttribute name="Callback" value="FunctionOnly">
37591 <webidl>Callback</webidl>
37592 </ExtendedAttribute>
37593 <ExtendedAttribute name="NoInterfaceObject">
37594 <webidl> NoInterfaceObject</webidl>
37595 </ExtendedAttribute>
37596 </ExtendedAttributeList>
37597 <Operation name="onsuccess" id="::Messaging::MessageRecipientsCallback::onsuccess">
37598 <webidl> void onsuccess(DOMString[] recipients);</webidl>
37601 Called when the message sending is finished.
37607 <Type type="void"/>
37609 <Argument name="recipients">
37612 The recipients of the message.
37615 <Type type="array">
37616 <Type type="DOMString"/>
37622 <Interface name="MessageBodySuccessCallback" id="::Messaging::MessageBodySuccessCallback">
37623 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface MessageBodySuccessCallback {
37625 void onsuccess(<ref>Message</ref> message);
37629 This interface specifies a success callback function that takes a message as the input argument.
37630 It is used in the loadMessageBody() asynchronous operation.
37636 <ExtendedAttributeList>
37637 <ExtendedAttribute name="Callback" value="FunctionOnly">
37638 <webidl>Callback</webidl>
37639 </ExtendedAttribute>
37640 <ExtendedAttribute name="NoInterfaceObject">
37641 <webidl> NoInterfaceObject</webidl>
37642 </ExtendedAttribute>
37643 </ExtendedAttributeList>
37644 <Operation name="onsuccess" id="::Messaging::MessageBodySuccessCallback::onsuccess">
37645 <webidl> void onsuccess(<ref>Message</ref> message);</webidl>
37648 Called when the asynchronous query completes successfully.
37654 <Type type="void"/>
37656 <Argument name="message">
37659 The message containing the loaded body.
37662 <Type name="Message"/>
37667 <Interface name="MessageAttachmentSuccessCallback" id="::Messaging::MessageAttachmentSuccessCallback">
37668 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface MessageAttachmentSuccessCallback {
37670 void onsuccess(<ref>MessageAttachment</ref> attachment);
37674 This callback interface specifies a success callback function that takes the loaded attachment as the input argument.
37675 It is used in the loadMessageAttachment() asynchronous operation.
37681 <ExtendedAttributeList>
37682 <ExtendedAttribute name="Callback" value="FunctionOnly">
37683 <webidl>Callback</webidl>
37684 </ExtendedAttribute>
37685 <ExtendedAttribute name="NoInterfaceObject">
37686 <webidl> NoInterfaceObject</webidl>
37687 </ExtendedAttribute>
37688 </ExtendedAttributeList>
37689 <Operation name="onsuccess" id="::Messaging::MessageAttachmentSuccessCallback::onsuccess">
37690 <webidl> void onsuccess(<ref>MessageAttachment</ref> attachment);</webidl>
37693 Called when the asynchronous query completes successfully.
37699 <Type type="void"/>
37701 <Argument name="attachment">
37704 The loaded attachment.
37707 <Type name="MessageAttachment"/>
37712 <Interface name="MessageStorage" id="::Messaging::MessageStorage">
37713 <webidl> [NoInterfaceObject] interface MessageStorage {
37715 void addDraftMessage(<ref>Message</ref> message,
37716 optional <ref>SuccessCallback</ref>? successCallback,
37717 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
37719 void findMessages(<ref>AbstractFilter</ref> filter,
37720 <ref>MessageArraySuccessCallback</ref> successCallback,
37721 optional <ref>ErrorCallback</ref>? errorCallback,
37722 optional <ref>SortMode</ref>? sort,
37723 optional unsigned long? limit,
37724 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);
37726 void removeMessages(<ref>Message</ref>[] messages,
37727 optional <ref>SuccessCallback</ref>? successCallback,
37728 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
37730 void updateMessages(<ref>Message</ref>[] messages,
37731 optional <ref>SuccessCallback</ref>? successCallback,
37732 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
37734 void findConversations(<ref>AbstractFilter</ref> filter,
37735 <ref>MessageConversationArraySuccessCallback</ref> successCallback,
37736 optional <ref>ErrorCallback</ref>? errorCallback,
37737 optional <ref>SortMode</ref>? sort,
37738 optional unsigned long? limit,
37739 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);
37741 void removeConversations(<ref>MessageConversation</ref>[] conversations,
37742 optional <ref>SuccessCallback</ref>? successCallback,
37743 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
37746 void findFolders(<ref>AbstractFilter</ref> filter,
37747 <ref>MessageFolderArraySuccessCallback</ref> successCallback,
37748 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
37750 long addMessagesChangeListener(<ref>MessagesChangeCallback</ref> messagesChangeCallback,
37751 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);
37753 long addConversationsChangeListener(<ref>MessageConversationsChangeCallback</ref> conversationsChangeCallback,
37754 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);
37756 long addFoldersChangeListener(<ref>MessageFoldersChangeCallback</ref> foldersChangeCallback,
37757 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);
37759 void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
37763 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.
37767 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.
37774 <ExtendedAttributeList>
37775 <ExtendedAttribute name="NoInterfaceObject">
37776 <webidl>NoInterfaceObject</webidl>
37777 </ExtendedAttribute>
37778 </ExtendedAttributeList>
37779 <Operation name="addDraftMessage" id="::Messaging::MessageStorage::addDraftMessage">
37780 <webidl> void addDraftMessage(<ref>Message</ref> message,
37781 optional <ref>SuccessCallback</ref>? successCallback,
37782 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
37785 Adds a draft message to <em>MessageStorage</em> and these messages are stored in the Drafts folder.
37789 The errorCallback is launched with these error types:
37793 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
37795 UnknownError - If any other error occurs. </li>
37805 http://tizen.org/privilege/messaging.write
37807 <Code> // Define success callback
37808 function successCallback() {
37809 console.log("Draft message added");
37812 // Define error callback
37813 function errorCallback(error) {
37814 console.log("Cannot add draft message " + error.message);
37817 // Define service query success callback.
37818 function serviceListCB(services) {
37819 if (services.length > 0) {
37820 var msg = new tizen.Message("messaging.sms", {plainBody: "Tizen draft SMS message."});
37821 services[0].messageStorage.addDraftMessage(msg,
37826 tizen.messaging.getMessageServices("messaging.sms", serviceListCB);
37829 <Type type="void"/>
37831 <Argument name="message">
37834 The draft message to add to the storage.
37837 <Type name="Message"/>
37839 <Argument optional="optional" name="successCallback">
37842 The method called when draft messages successfully added.
37845 <Type name="SuccessCallback" nullable="nullable"/>
37847 <Argument optional="optional" name="errorCallback">
37850 The method called when an error occurs.
37853 <Type name="ErrorCallback" nullable="nullable"/>
37857 <RaiseException name="WebAPIException">
37860 with error type TypeMismatchError, if any input parameter
37861 is not compatible with the expected type for that parameter or if the method is invoked for an incoming message.
37864 with error type SecurityError, if the application does not have the privilege to call this method.
37867 with error type NotSupportedError, if this feature is not supported.
37873 <Operation name="findMessages" id="::Messaging::MessageStorage::findMessages">
37874 <webidl> void findMessages(<ref>AbstractFilter</ref> filter,
37875 <ref>MessageArraySuccessCallback</ref> successCallback,
37876 optional <ref>ErrorCallback</ref>? errorCallback,
37877 optional <ref>SortMode</ref>? sort,
37878 optional unsigned long? limit,
37879 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);</webidl>
37882 Finds messages from <em>MessageStorage</em>.
37886 The errorCallback is launched with these error types:
37890 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
37892 UnknownError - If any other error occurs. </li>
37902 http://tizen.org/privilege/messaging.read
37904 <Code> var service; // Assume messaging service is initialized
37905 var messageStorage = service.messageStorage;
37906 function messageArrayCB(messages) {
37907 console.log(messages.length + " message(s) fetched!");
37908 for (var i = 0; i < messages.length; i++) {
37909 console.log(i + ". message from " + messages[i].from);
37913 // Define error callback
37914 function errorCallback(error) {
37915 console.log("Cannot query messages" + error.message);
37918 var filter = new tizen.AttributeFilter("from", "CONTAINS", "2593");
37919 messageStorage.findMessages(filter, messageArrayCB, errorCallback);
37922 <Type type="void"/>
37924 <Argument name="filter">
37927 The criteria to be used when filtering.
37930 <Type name="AbstractFilter"/>
37932 <Argument name="successCallback">
37935 The method called when the invocation ends successfully.
37938 <Type name="MessageArraySuccessCallback"/>
37940 <Argument optional="optional" name="errorCallback">
37943 The method called when an error occurs.
37946 <Type name="ErrorCallback" nullable="nullable"/>
37948 <Argument optional="optional" name="sort">
37951 The sorting mode for the query.
37954 <Type name="SortMode" nullable="nullable"/>
37956 <Argument optional="optional" name="limit">
37959 The maximum limit the query result is set to as specified by the parameter (It is the same meaning as SQL LIMIT).
37960 If <var>0</var>, there is no limit set.
37963 <Type type="unsigned long" nullable="nullable"/>
37965 <Argument optional="optional" name="offset">
37968 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.
37971 <Type type="unsigned long" nullable="nullable"/>
37975 <RaiseException name="WebAPIException">
37978 with error type TypeMismatchError, if any input parameter
37979 is not compatible with the expected type for that parameter.
37982 with error type SecurityError, if the application does not have the privilege to call this method.
37985 with error type NotSupportedError, if this feature is not supported.
37991 <Operation name="removeMessages" id="::Messaging::MessageStorage::removeMessages">
37992 <webidl> void removeMessages(<ref>Message</ref>[] messages,
37993 optional <ref>SuccessCallback</ref>? successCallback,
37994 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
37997 Removes messages from <em>MessageStorage</em>.
38001 The errorCallback is launched with these error types:
38005 InvalidValuesError - If any of the input parameters contain an invalid value </li>
38007 UnknownError - If any other error occurs. </li>
38017 http://tizen.org/privilege/messaging.write
38019 <Code> // Define success callback
38020 var service; // Assume messaging service is initialized
38021 var messageStorage = service.messageStorage;
38022 function successCallback() {
38023 console.log("Messages were deleted");
38026 // Define error callback
38027 function errorCallback(error) {
38028 console.log("Cannot delete messages " + error.message);
38031 function messageArrayCB(messages) {
38032 if (messages.length > 0) {
38033 messageStorage.removeMessages(messages, successCallback, errorCallback);
38035 console.log("No messages found");
38039 var filter = new tizen.AttributeFilter("from", "CONTAINS", "2593");
38040 messageStorage.findMessages(filter, messageArrayCB);
38043 <Type type="void"/>
38045 <Argument name="messages">
38048 An array of messages to delete.
38051 <Type type="array">
38052 <Type name="Message"/>
38055 <Argument optional="optional" name="successCallback">
38058 The method called when messages are successfully deleted.
38061 <Type name="SuccessCallback" nullable="nullable"/>
38063 <Argument optional="optional" name="errorCallback">
38066 The method called when an error occurs.
38069 <Type name="ErrorCallback" nullable="nullable"/>
38073 <RaiseException name="WebAPIException">
38076 with error type TypeMismatchError, if any input parameter
38077 is not compatible with the expected type for that parameter.
38080 with error type SecurityError, if the application does not have the privilege to call this method.
38083 with error type NotSupportedError, if this feature is not supported.
38089 <Operation name="updateMessages" id="::Messaging::MessageStorage::updateMessages">
38090 <webidl> void updateMessages(<ref>Message</ref>[] messages,
38091 optional <ref>SuccessCallback</ref>? successCallback,
38092 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
38095 Updates messages in <em>MessageStorage</em>.
38099 The backend must check whether the required updates can be applied and invoke the errorCallback method, if they cannot be checked.
38100 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.
38103 The errorCallback is launched with these error types:
38107 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
38109 UnknownError - If any other error occurs. </li>
38119 http://tizen.org/privilege/messaging.write
38121 <Code> var service; // Assume messaging service is initialized
38122 var messageStorage = service.messageStorage;
38124 // Define success callback
38125 function successCallback() {
38126 console.log("Messages were updated");
38129 // Define error callback
38130 function errorCallback(error) {
38131 console.log("Cannot update messages " + error.message);
38134 function messageArrayCB(messages) {
38135 if (messages.length > 0) {
38136 messages[0].isRead = true;
38137 messageStorage.updateMessages([messages[0]], successCallback, errorCallback);
38139 console.log("No messages found");
38143 var filter = new tizen.AttributeFilter('isRead', 'EXACTLY', false);
38144 messageStorage.findMessages(filter, messageArrayCB);
38148 <Type type="void"/>
38150 <Argument name="messages">
38156 <Type type="array">
38157 <Type name="Message"/>
38160 <Argument optional="optional" name="successCallback">
38163 The method called when messages are successfully updated.
38166 <Type name="SuccessCallback" nullable="nullable"/>
38168 <Argument optional="optional" name="errorCallback">
38171 The method called when an error occurs.
38174 <Type name="ErrorCallback" nullable="nullable"/>
38178 <RaiseException name="WebAPIException">
38181 with error type TypeMismatchError, if any input parameter
38182 is not compatible with the expected type for that parameter.
38185 with error type SecurityError, if the application does not have the privilege to call this method.
38188 with error type NotSupportedError, if this feature is not supported.
38194 <Operation name="findConversations" id="::Messaging::MessageStorage::findConversations">
38195 <webidl> void findConversations(<ref>AbstractFilter</ref> filter,
38196 <ref>MessageConversationArraySuccessCallback</ref> successCallback,
38197 optional <ref>ErrorCallback</ref>? errorCallback,
38198 optional <ref>SortMode</ref>? sort,
38199 optional unsigned long? limit,
38200 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);</webidl>
38203 Finds conversations from <em>MessageStorage</em>.
38207 The errorCallback is launched with these error types:
38211 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
38213 UnknownError - If any other error occurs. </li>
38223 http://tizen.org/privilege/messaging.read
38225 <Code> var service; // Assume messaging service is initialized
38226 var messageStorage = service.messageStorage;
38227 function conversationsArrayCB(conversations) {
38228 console.log(conversations.length + " conversation(s) found!");
38229 for (var i = 0; i < conversations.length; i++) {
38230 console.log(i + ". conversation preview " + conversations[i].preview);
38234 // Define error callback.
38235 function errorCallback(error) {
38236 console.log("Cannot query conversations" + error.message);
38239 var filter = new tizen.AttributeFilter('from', 'CONTAINS', '2593');
38240 messageStorage.findConversations(filter, conversationsArrayCB, errorCallback);
38243 <Type type="void"/>
38245 <Argument name="filter">
38248 The criteria to be used when filtering.
38251 <Type name="AbstractFilter"/>
38253 <Argument name="successCallback">
38256 The method called when the invocation ends successfully.
38259 <Type name="MessageConversationArraySuccessCallback"/>
38261 <Argument optional="optional" name="errorCallback">
38264 The method called when an error occurs.
38267 <Type name="ErrorCallback" nullable="nullable"/>
38269 <Argument optional="optional" name="sort">
38272 The sorting rules for the query.
38275 <Type name="SortMode" nullable="nullable"/>
38277 <Argument optional="optional" name="limit">
38280 The maximum limit the query result is set to as specified by the parameter (It is the same meaning as SQL LIMIT).
38281 If set to <var>0</var>, there is no limit set.
38284 <Type type="unsigned long" nullable="nullable"/>
38286 <Argument optional="optional" name="offset">
38289 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.
38292 <Type type="unsigned long" nullable="nullable"/>
38296 <RaiseException name="WebAPIException">
38299 with error type TypeMismatchError, if any input parameter
38300 is not compatible with the expected type for that parameter.
38303 with error type SecurityError, if the application does not have the privilege to call this method.
38306 with error type NotSupportedError, if this feature is not supported.
38312 <Operation name="removeConversations" id="::Messaging::MessageStorage::removeConversations">
38313 <webidl> void removeConversations(<ref>MessageConversation</ref>[] conversations,
38314 optional <ref>SuccessCallback</ref>? successCallback,
38315 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
38318 Removes conversations from <em>MessageStorage</em>.
38322 The errorCallback is launched with these error types:
38326 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
38328 UnknownError - If any other error occurs. </li>
38338 http://tizen.org/privilege/messaging.write
38340 <Code> var service; // Assume messaging service is initialized
38341 var messageStorage = service.messageStorage;
38342 // Define success callback.
38343 function successCallback() {
38344 console.log("Conversations deleted");
38347 // Define error callback.
38348 function errorCallback(error) {
38349 console.log("Cannot delete conversations " + error.message);
38352 function conversationsArrayCB(conversations) {
38353 if (conversations.length > 0) {
38354 messageStorage.removeConversations(conversations, successCallback,
38357 console.log("No conversations found");
38359 console.log("Deleted " + conversations.length + " conversation(s)");
38362 // Define error callback.
38363 function queryErrorCB(error) {
38364 console.log("Cannot query conversations" + error.message);
38367 var filter = new tizen.AttributeFilter('from', 'CONTAINS', '2593');
38368 messageStorage.findConversations(filter, conversationsArrayCB,
38372 <Type type="void"/>
38374 <Argument name="conversations">
38377 An array of conversations to delete.
38380 <Type type="array">
38381 <Type name="MessageConversation"/>
38384 <Argument optional="optional" name="successCallback">
38387 The method called when conversations are successfully deleted.
38390 <Type name="SuccessCallback" nullable="nullable"/>
38392 <Argument optional="optional" name="errorCallback">
38395 The method called when an error occurs.
38398 <Type name="ErrorCallback" nullable="nullable"/>
38402 <RaiseException name="WebAPIException">
38405 with error type TypeMismatchError, if any input parameter
38406 is not compatible with the expected type for that parameter.
38409 with error type SecurityError, if the application does not have the privilege to call this method.
38412 with error type NotSupportedError, if this feature is not supported.
38418 <Operation name="findFolders" id="::Messaging::MessageStorage::findFolders">
38419 <webidl> void findFolders(<ref>AbstractFilter</ref> filter,
38420 <ref>MessageFolderArraySuccessCallback</ref> successCallback,
38421 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
38424 Queries folders from MessageStorage.
38428 The errorCallback is launched with these error types:
38432 InvalidValuesError: If any of the input parameters contains an invalid value. </li>
38434 UnknownError: In any other error case. </li>
38444 http://tizen.org/privilege/messaging.read
38446 <Code> var service; // Assume messaging service is initialized
38447 var messageStorage = service.messageStorage;
38448 function folderArrayCB(folders) {
38449 console.log(folders.length + " folders(s) found!");
38450 for (var i = 0; i < folders.length; i++) {
38451 console.log(i + ", folder: " + folders[i].name);
38454 var filter = new tizen.AttributeFilter("serviceId", "EXACTLY", service.id);
38455 messageStorage.findFolders(filter, folderArrayCB);
38458 <Type type="void"/>
38460 <Argument name="filter">
38463 The criteria used when filtering.
38466 <Type name="AbstractFilter"/>
38468 <Argument name="successCallback">
38471 The method called when the invocation ends successfully.
38474 <Type name="MessageFolderArraySuccessCallback"/>
38476 <Argument optional="optional" name="errorCallback">
38479 The method called when an error occurs.
38482 <Type name="ErrorCallback" nullable="nullable"/>
38486 <RaiseException name="WebAPIException">
38489 with error type TypeMismatchError, if any input parameter
38490 is not compatible with the expected type for that parameter.
38493 with error type SecurityError, if the application does not have the privilege to call this method.
38496 with error type NotSupportedError, if this feature is not supported.
38502 <Operation name="addMessagesChangeListener" id="::Messaging::MessageStorage::addMessagesChangeListener">
38503 <webidl> long addMessagesChangeListener(<ref>MessagesChangeCallback</ref> messagesChangeCallback,
38504 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);</webidl>
38507 Adds a listener to subscribe to notification for MessageStorage changes.
38511 The errorCallback is launched with these error types:
38515 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
38517 UnknownError - If any other error occurs. </li>
38527 http://tizen.org/privilege/messaging.read
38529 <Code> var service; // Assume messaging service is initialized
38530 var messageStorage = service.messageStorage;
38531 var messageChangeCallback = {
38532 messagesupdated: function(messages) {
38533 console.log(messages.length + " message(s) updated");},
38534 messagesadded: function(messages) {
38535 console.log(messages.length + " message(s) added");},
38536 messagesremoved: function(messages) {
38537 console.log(messages.length + " message(s) removed");}
38540 messageStorage.addMessagesChangeListener(messageChangeCallback);
38546 long The subscription identifier.
38551 <Argument name="messagesChangeCallback">
38554 Callback that is called when the MessageStorage is changed.
38557 <Type name="MessagesChangeCallback"/>
38559 <Argument optional="optional" name="filter">
38562 The criteria to be used when filtering.
38565 <Type name="AbstractFilter" nullable="nullable"/>
38569 <RaiseException name="WebAPIException">
38572 with error type TypeMismatchError, if any input parameter
38573 is not compatible with the expected type for that parameter.
38576 with error type SecurityError, if the application does not have the privilege to call this method.
38579 with error type NotSupportedError, if this feature is not supported.
38585 <Operation name="addConversationsChangeListener" id="::Messaging::MessageStorage::addConversationsChangeListener">
38586 <webidl> long addConversationsChangeListener(<ref>MessageConversationsChangeCallback</ref> conversationsChangeCallback,
38587 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);</webidl>
38590 Adds a listener to subscribe to notifications for MessageConversation changes.
38594 The errorCallback is launched with these error types:
38598 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
38600 UnknownError - If any other error occurs. </li>
38610 http://tizen.org/privilege/messaging.read
38612 <Code> var service; // Assume messaging service is initialized
38613 var messageStorage = service.messageStorage;
38614 var conversationChangeCB = {
38615 conversationsupdated: function(conversations) {
38616 console.log(conversations.length + " conversations(s) updated");},
38617 conversationsadded: function(conversations) {
38618 console.log(conversations.length + " conversations(s) added");},
38619 conversationsremoved: function(conversations) {
38620 console.log(conversations.length + " conversations(s) removed");}
38623 messageStorage.addConversationsChangeListener(conversationChangeCB);
38629 long The subscription identifier.
38634 <Argument name="conversationsChangeCallback">
38637 Callback that is called when the MessageStorage is changed.
38640 <Type name="MessageConversationsChangeCallback"/>
38642 <Argument optional="optional" name="filter">
38645 The criteria to be used when filtering.
38648 <Type name="AbstractFilter" nullable="nullable"/>
38652 <RaiseException name="WebAPIException">
38655 with error type TypeMismatchError, if any input parameter
38656 is not compatible with the expected type for that parameter.
38659 with error type SecurityError, if the application does not have the privilege to call this method.
38662 with error type NotSupportedError, if this feature is not supported.
38668 <Operation name="addFoldersChangeListener" id="::Messaging::MessageStorage::addFoldersChangeListener">
38669 <webidl> long addFoldersChangeListener(<ref>MessageFoldersChangeCallback</ref> foldersChangeCallback,
38670 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);</webidl>
38673 Adds a listener to subscribe to notifications for MessageFolder changes.
38677 The errorCallback is launched with these error types:
38681 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
38683 UnknownError - If any other error occurs. </li>
38693 http://tizen.org/privilege/messaging.read
38695 <Code> var service; // Assume messaging service is initialized
38696 var messageStorage = service.messageStorage;
38697 var folderChangeCB = {
38698 foldersupdated: function(folders) {
38699 console.log(folders.length + " folders(s) updated");},
38700 foldersadded: function(folders) {
38701 console.log(folders.length + " folders(s) added");},
38702 foldersremoved: function(folders) {
38703 console.log(folders.length + " folders(s) removed");}
38706 messageStorage.addFoldersChangeListener(folderChangeCB);
38712 long The subscription identifier.
38717 <Argument name="foldersChangeCallback">
38720 Callback that is called when the MessageStorage is changed.
38723 <Type name="MessageFoldersChangeCallback"/>
38725 <Argument optional="optional" name="filter">
38728 The criteria to be used when filtering.
38731 <Type name="AbstractFilter" nullable="nullable"/>
38735 <RaiseException name="WebAPIException">
38738 with error type TypeMismatchError, if any input parameter
38739 is not compatible with the expected type for that parameter.
38742 with error type SecurityError, if the application does not have the privilege to call this method.
38745 with error type NotSupportedError, if this feature is not supported.
38751 <Operation name="removeChangeListener" id="::Messaging::MessageStorage::removeChangeListener">
38752 <webidl> void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);</webidl>
38755 Removes a listener to unsubscribe from receiving message notifications.
38759 The errorCallback is launched with these error types:
38763 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
38765 UnknownError - If any other error occurs. </li>
38768 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.
38769 If the <em>subscriptionId argument does not correspond to a valid subscription, the method will return without any further action.
38779 http://tizen.org/privilege/messaging.read
38781 <Code> var watchId;
38782 var service; // Assume messaging service is initialized
38783 var messageStorage = service.messageStorage;
38784 var folderChangeCB = {
38785 foldersupdated: function(folders) {
38786 console.log(folders.length + " folders(s) updated. Cancel watching.");
38787 messageStorage.removeChangeListener(watchId); },
38788 foldersadded: function(folders) {
38789 console.log(folders.length + " folders(s) added. Cancel watching.");
38790 messageStorage.removeChangeListener(watchId); },
38791 foldersremoved: function(folders) {
38792 console.log(folders.length + " folders(s) removed. Cancel watching.");
38793 messageStorage.removeChangeListener(watchId);}
38796 watchId = messageStorage.addFoldersChangeListener(folderChangeCB);
38800 <Type type="void"/>
38802 <Argument name="watchId">
38805 An identifier of the subscription returned by addMessagesChangeListener, addConversationsChangeListener or
38806 addFoldersChangeListener methods.
38809 <Type type="long"/>
38813 <RaiseException name="WebAPIException">
38816 with error type TypeMismatchError, if any input parameter
38817 is not compatible with the expected type for that parameter.
38820 with error type SecurityError, if the application does not have the privilege to call this method.
38823 with error type NotSupportedError, if this feature is not supported.
38830 <Interface name="MessageArraySuccessCallback" id="::Messaging::MessageArraySuccessCallback">
38831 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface MessageArraySuccessCallback {
38833 void onsuccess(<ref>Message</ref>[] messages);
38837 findMessages specific success callback.
38841 This callback interface specifies a success callback function,
38842 taking a list of messages that satisfy the filtering criteria as the input argument.
38843 It is used in the findMessages asynchronous operation.
38850 <ExtendedAttributeList>
38851 <ExtendedAttribute name="Callback" value="FunctionOnly">
38852 <webidl>Callback</webidl>
38853 </ExtendedAttribute>
38854 <ExtendedAttribute name="NoInterfaceObject">
38855 <webidl> NoInterfaceObject</webidl>
38856 </ExtendedAttribute>
38857 </ExtendedAttributeList>
38858 <Operation name="onsuccess" id="::Messaging::MessageArraySuccessCallback::onsuccess">
38859 <webidl> void onsuccess(<ref>Message</ref>[] messages);</webidl>
38862 Method invoked when an asynchronous query completes successfully.
38868 <Type type="void"/>
38870 <Argument name="messages">
38873 Array of messages that satisfy the query.
38876 <Type type="array">
38877 <Type name="Message"/>
38883 <Interface name="MessageConversationArraySuccessCallback" id="::Messaging::MessageConversationArraySuccessCallback">
38884 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface MessageConversationArraySuccessCallback {
38886 void onsuccess(<ref>MessageConversation</ref>[] conversations);
38890 findConversations specific success callback.
38894 This callback interface specifies a success callback function,
38895 taking a list of conversations that satisfy the filtering criteria as the input argument.
38896 It is used in the findConversations asynchronous operation.
38903 <ExtendedAttributeList>
38904 <ExtendedAttribute name="Callback" value="FunctionOnly">
38905 <webidl>Callback</webidl>
38906 </ExtendedAttribute>
38907 <ExtendedAttribute name="NoInterfaceObject">
38908 <webidl> NoInterfaceObject</webidl>
38909 </ExtendedAttribute>
38910 </ExtendedAttributeList>
38911 <Operation name="onsuccess" id="::Messaging::MessageConversationArraySuccessCallback::onsuccess">
38912 <webidl> void onsuccess(<ref>MessageConversation</ref>[] conversations);</webidl>
38915 Method invoked when an asynchronous query completes successfully.
38921 <Type type="void"/>
38923 <Argument name="conversations">
38926 Array of conversations that satisfy the query.
38929 <Type type="array">
38930 <Type name="MessageConversation"/>
38936 <Interface name="MessageFolderArraySuccessCallback" id="::Messaging::MessageFolderArraySuccessCallback">
38937 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface MessageFolderArraySuccessCallback {
38939 void onsuccess(<ref>MessageFolder</ref>[] folders);
38943 findFolders specific success callback.
38947 This callback interface specifies a success callback function,
38948 taking a list of folders that satisfy the filtering criteria as the input argument.
38949 It is used in the findFolders asynchronous operation.
38956 <ExtendedAttributeList>
38957 <ExtendedAttribute name="Callback" value="FunctionOnly">
38958 <webidl>Callback</webidl>
38959 </ExtendedAttribute>
38960 <ExtendedAttribute name="NoInterfaceObject">
38961 <webidl> NoInterfaceObject</webidl>
38962 </ExtendedAttribute>
38963 </ExtendedAttributeList>
38964 <Operation name="onsuccess" id="::Messaging::MessageFolderArraySuccessCallback::onsuccess">
38965 <webidl> void onsuccess(<ref>MessageFolder</ref>[] folders);</webidl>
38968 Method invoked when an asynchronous query completes successfully.
38974 <Type type="void"/>
38976 <Argument name="folders">
38979 Array of folders that satisfy the query.
38982 <Type type="array">
38983 <Type name="MessageFolder"/>
38989 <Interface name="MessagesChangeCallback" id="::Messaging::MessagesChangeCallback">
38990 <webidl> [Callback, NoInterfaceObject] interface MessagesChangeCallback {
38992 void messagesadded(<ref>Message</ref>[] addedMessages);
38994 void messagesupdated(<ref>Message</ref>[] updatedMessages);
38996 void messagesremoved(<ref>Message</ref>[] removedMessages);
39000 watchMessagesChanges callback.
39004 This callback interface specifies a callback as a set of functions that will be
39005 invoked when messages from MessageStorage change. Each function takes a list of messages as the input argument.
39012 <ExtendedAttributeList>
39013 <ExtendedAttribute name="Callback">
39014 <webidl>Callback</webidl>
39015 </ExtendedAttribute>
39016 <ExtendedAttribute name="NoInterfaceObject">
39017 <webidl> NoInterfaceObject</webidl>
39018 </ExtendedAttribute>
39019 </ExtendedAttributeList>
39020 <Operation name="messagesadded" id="::Messaging::MessagesChangeCallback::messagesadded">
39021 <webidl> void messagesadded(<ref>Message</ref>[] addedMessages);</webidl>
39024 Method invoked when messages are added to the MessageStorage.
39030 <Type type="void"/>
39032 <Argument name="addedMessages">
39035 Array of added messages.
39038 <Type type="array">
39039 <Type name="Message"/>
39044 <Operation name="messagesupdated" id="::Messaging::MessagesChangeCallback::messagesupdated">
39045 <webidl> void messagesupdated(<ref>Message</ref>[] updatedMessages);</webidl>
39048 Method invoked when messages are updated in MessageStorage.
39054 <Type type="void"/>
39056 <Argument name="updatedMessages">
39059 Array of updated messages.
39062 <Type type="array">
39063 <Type name="Message"/>
39068 <Operation name="messagesremoved" id="::Messaging::MessagesChangeCallback::messagesremoved">
39069 <webidl> void messagesremoved(<ref>Message</ref>[] removedMessages);</webidl>
39072 Method invoked when messages are removed from MessageStorage.
39078 <Type type="void"/>
39080 <Argument name="removedMessages">
39083 Array of removed messages. It contains only MessageId attribute.
39086 <Type type="array">
39087 <Type name="Message"/>
39093 <Interface name="MessageConversationsChangeCallback" id="::Messaging::MessageConversationsChangeCallback">
39094 <webidl> [Callback, NoInterfaceObject] interface MessageConversationsChangeCallback {
39096 void conversationsadded(<ref>MessageConversation</ref>[] addedConversations);
39098 void conversationsupdated(<ref>MessageConversation</ref>[] updatedConversations);
39100 void conversationsremoved(<ref>MessageConversation</ref>[] removedConversations);
39104 watchConversationsChanges callback.
39108 This callback interface specifies a callback as a set of functions that will be
39109 invoked when conversations from MessageStorage change. Each function takes a list of conversations as the input argument.
39116 <ExtendedAttributeList>
39117 <ExtendedAttribute name="Callback">
39118 <webidl>Callback</webidl>
39119 </ExtendedAttribute>
39120 <ExtendedAttribute name="NoInterfaceObject">
39121 <webidl> NoInterfaceObject</webidl>
39122 </ExtendedAttribute>
39123 </ExtendedAttributeList>
39124 <Operation name="conversationsadded" id="::Messaging::MessageConversationsChangeCallback::conversationsadded">
39125 <webidl> void conversationsadded(<ref>MessageConversation</ref>[] addedConversations);</webidl>
39128 Method invoked when conversations are added to MessageStorage.
39134 <Type type="void"/>
39136 <Argument name="addedConversations">
39139 Array of added conversations.
39142 <Type type="array">
39143 <Type name="MessageConversation"/>
39148 <Operation name="conversationsupdated" id="::Messaging::MessageConversationsChangeCallback::conversationsupdated">
39149 <webidl> void conversationsupdated(<ref>MessageConversation</ref>[] updatedConversations);</webidl>
39152 Method invoked when conversations are updated in MessageStorage.
39158 <Type type="void"/>
39160 <Argument name="updatedConversations">
39163 Array of updated conversations.
39166 <Type type="array">
39167 <Type name="MessageConversation"/>
39172 <Operation name="conversationsremoved" id="::Messaging::MessageConversationsChangeCallback::conversationsremoved">
39173 <webidl> void conversationsremoved(<ref>MessageConversation</ref>[] removedConversations);</webidl>
39176 Method invoked when conversations are removed from MessageStorage.
39182 <Type type="void"/>
39184 <Argument name="removedConversations">
39187 Array of removed conversations. It contains only MessageConvId attribute.
39190 <Type type="array">
39191 <Type name="MessageConversation"/>
39197 <Interface name="MessageFoldersChangeCallback" id="::Messaging::MessageFoldersChangeCallback">
39198 <webidl> [Callback, NoInterfaceObject] interface MessageFoldersChangeCallback {
39200 void foldersadded(<ref>MessageFolder</ref>[] addedFolders);
39202 void foldersupdated(<ref>MessageFolder</ref>[] updatedFolders);
39204 void foldersremoved(<ref>MessageFolder</ref>[] removedFolders);
39208 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.
39214 <ExtendedAttributeList>
39215 <ExtendedAttribute name="Callback">
39216 <webidl>Callback</webidl>
39217 </ExtendedAttribute>
39218 <ExtendedAttribute name="NoInterfaceObject">
39219 <webidl> NoInterfaceObject</webidl>
39220 </ExtendedAttribute>
39221 </ExtendedAttributeList>
39222 <Operation name="foldersadded" id="::Messaging::MessageFoldersChangeCallback::foldersadded">
39223 <webidl> void foldersadded(<ref>MessageFolder</ref>[] addedFolders);</webidl>
39226 Called when folders are added to <em>MessageStorage</em>.
39232 <Type type="void"/>
39234 <Argument name="addedFolders">
39237 An array of added folders.
39240 <Type type="array">
39241 <Type name="MessageFolder"/>
39246 <Operation name="foldersupdated" id="::Messaging::MessageFoldersChangeCallback::foldersupdated">
39247 <webidl> void foldersupdated(<ref>MessageFolder</ref>[] updatedFolders);</webidl>
39250 Called when folders are updated in <em>MessageStorage</em>.
39256 <Type type="void"/>
39258 <Argument name="updatedFolders">
39261 An array of updated folders.
39264 <Type type="array">
39265 <Type name="MessageFolder"/>
39270 <Operation name="foldersremoved" id="::Messaging::MessageFoldersChangeCallback::foldersremoved">
39271 <webidl> void foldersremoved(<ref>MessageFolder</ref>[] removedFolders);</webidl>
39274 Called when folders are removed from <em>MessageStorage</em>.
39280 <Type type="void"/>
39282 <Argument name="removedFolders">
39285 Array of removed folders. It contains only MessageFolderId attribute.
39288 <Type type="array">
39289 <Type name="MessageFolder"/>
39295 <Interface name="MessageConversation" id="::Messaging::MessageConversation">
39296 <webidl> [NoInterfaceObject] interface MessageConversation {
39298 readonly attribute <ref>MessageConvId</ref> id;
39300 readonly attribute <ref>MessageServiceTag</ref> type;
39302 readonly attribute Date timestamp;
39304 readonly attribute unsigned long messageCount;
39306 readonly attribute unsigned long unreadMessages;
39308 readonly attribute DOMString preview;
39310 readonly attribute DOMString subject;
39312 readonly attribute boolean isRead;
39314 readonly attribute DOMString from;
39316 readonly attribute DOMString[] to;
39318 readonly attribute DOMString[] cc;
39320 readonly attribute DOMString[] bcc;
39322 readonly attribute <ref>MessageId</ref> lastMessageId;
39326 This interface defines the message conversation (also known as the thread of messages).
39330 This interface allows a web application to get the set of properties linked to a conversation.
39331 This interface provides only read-only attributes.
39338 <ExtendedAttributeList>
39339 <ExtendedAttribute name="NoInterfaceObject">
39340 <webidl>NoInterfaceObject</webidl>
39341 </ExtendedAttribute>
39342 </ExtendedAttributeList>
39343 <Attribute readonly="readonly" name="id" id="::Messaging::MessageConversation::id">
39344 <webidl> readonly attribute <ref>MessageConvId</ref> id;</webidl>
39347 The conversation identifier.
39351 The ID is locally unique and persistent property, assigned by the device or the Web runtime (WRT).
39358 <Type name="MessageConvId"/>
39360 <Attribute readonly="readonly" name="type" id="::Messaging::MessageConversation::type">
39361 <webidl> readonly attribute <ref>MessageServiceTag</ref> type;</webidl>
39364 The type of a given conversation.
39370 <Type name="MessageServiceTag"/>
39372 <Attribute readonly="readonly" name="timestamp" id="::Messaging::MessageConversation::timestamp">
39373 <webidl> readonly attribute Date timestamp;</webidl>
39376 The timestamp of the latest message in a conversation.
39380 This property is set up by the device or the Web runtime environment.
39387 <Type type="Date"/>
39389 <Attribute readonly="readonly" name="messageCount" id="::Messaging::MessageConversation::messageCount">
39390 <webidl> readonly attribute unsigned long messageCount;</webidl>
39393 The count of messages in a conversation.
39399 <Type type="unsigned long"/>
39401 <Attribute readonly="readonly" name="unreadMessages" id="::Messaging::MessageConversation::unreadMessages">
39402 <webidl> readonly attribute unsigned long unreadMessages;</webidl>
39405 The count of unread messages in a conversation.
39411 <Type type="unsigned long"/>
39413 <Attribute readonly="readonly" name="preview" id="::Messaging::MessageConversation::preview">
39414 <webidl> readonly attribute DOMString preview;</webidl>
39417 A preview of the latest message in a conversation.
39423 <Type type="DOMString"/>
39425 <Attribute readonly="readonly" name="subject" id="::Messaging::MessageConversation::subject">
39426 <webidl> readonly attribute DOMString subject;</webidl>
39429 The subject of a conversation (applicable for group chats, MMS, email).
39435 <Type type="DOMString"/>
39437 <Attribute readonly="readonly" name="isRead" id="::Messaging::MessageConversation::isRead">
39438 <webidl> readonly attribute boolean isRead;</webidl>
39441 An attribute to indicate whether the latest message in a conversation has been read or not.
39445 This property is set to <var>true</var> if the message has been read, else it is set to <var>false</var>.
39452 <Type type="boolean"/>
39454 <Attribute readonly="readonly" name="from" id="::Messaging::MessageConversation::from">
39455 <webidl> readonly attribute DOMString from;</webidl>
39458 The source address (or source phone number) of the latest message in the conversation.
39462 This property is set up by the device or the Web runtime environment.
39469 <Type type="DOMString"/>
39471 <Attribute readonly="readonly" name="to" id="::Messaging::MessageConversation::to">
39472 <webidl> readonly attribute DOMString[] to;</webidl>
39475 The destination of the latest message in a conversation.
39481 <Type type="array">
39482 <Type type="DOMString"/>
39485 <Attribute readonly="readonly" name="cc" id="::Messaging::MessageConversation::cc">
39486 <webidl> readonly attribute DOMString[] cc;</webidl>
39489 The carbon copy (cc) address of the latest message in a conversation.
39493 This property is used only for email.
39500 <Type type="array">
39501 <Type type="DOMString"/>
39504 <Attribute readonly="readonly" name="bcc" id="::Messaging::MessageConversation::bcc">
39505 <webidl> readonly attribute DOMString[] bcc;</webidl>
39508 The blind carbon copy (bcc) address of the latest message in a conversation.
39512 This property is used only for email.
39519 <Type type="array">
39520 <Type type="DOMString"/>
39523 <Attribute readonly="readonly" name="lastMessageId" id="::Messaging::MessageConversation::lastMessageId">
39524 <webidl> readonly attribute <ref>MessageId</ref> lastMessageId;</webidl>
39527 The identifier of a latest message in a conversation.
39531 This property is set up by the device or the Web runtime environment.
39538 <Type name="MessageId"/>
39541 <Interface name="MessageFolder" id="::Messaging::MessageFolder">
39542 <webidl> [NoInterfaceObject] interface MessageFolder {
39544 readonly attribute <ref>MessageFolderId</ref> id;
39546 readonly attribute <ref>MessageFolderId</ref> parentId;
39548 readonly attribute DOMString serviceId;
39550 readonly attribute <ref>MessageServiceTag</ref> contentType;
39552 attribute DOMString name setraises(<ref>WebAPIException</ref>);
39554 readonly attribute DOMString path;
39556 readonly attribute DOMString type;
39558 attribute boolean synchronizable setraises(<ref>WebAPIException</ref>);
39562 This interface defines the email folder.
39566 This interface allows a web application to get the set of properties that are linked to an email folder.
39569 The concept of folders is present in several email protocols, such as IMAP, Mail For Exchange.
39572 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.
39579 <ExtendedAttributeList>
39580 <ExtendedAttribute name="NoInterfaceObject">
39581 <webidl>NoInterfaceObject</webidl>
39582 </ExtendedAttribute>
39583 </ExtendedAttributeList>
39584 <Attribute readonly="readonly" name="id" id="::Messaging::MessageFolder::id">
39585 <webidl> readonly attribute <ref>MessageFolderId</ref> id;</webidl>
39588 The folder identifier.
39589 The ID is locally unique and persistent property, assigned by the device or the Web runtime (WRT).
39595 <Type name="MessageFolderId"/>
39597 <Attribute readonly="readonly" name="parentId" id="::Messaging::MessageFolder::parentId">
39598 <webidl> readonly attribute <ref>MessageFolderId</ref> parentId;</webidl>
39601 The identifier for the parent folder of a specified folder.
39605 If this folder is a root folder, the parent folder ID is <var>null</var>.
39612 <Type name="MessageFolderId"/>
39614 <Attribute readonly="readonly" name="serviceId" id="::Messaging::MessageFolder::serviceId">
39615 <webidl> readonly attribute DOMString serviceId;</webidl>
39618 The identifier of the service to which a specified folder belongs.
39624 <Type type="DOMString"/>
39626 <Attribute readonly="readonly" name="contentType" id="::Messaging::MessageFolder::contentType">
39627 <webidl> readonly attribute <ref>MessageServiceTag</ref> contentType;</webidl>
39630 The type of the messages contained within a folder.
39636 <Type name="MessageServiceTag"/>
39638 <Attribute name="name" id="::Messaging::MessageFolder::name">
39639 <webidl> attribute DOMString name setraises(<ref>WebAPIException</ref>);</webidl>
39642 The visible name of a folder.
39646 Can be modified. By default, it contains the folder name from the server.
39649 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.
39656 <Type type="DOMString"/>
39658 <RaiseException name="WebAPIException"/>
39661 <Attribute readonly="readonly" name="path" id="::Messaging::MessageFolder::path">
39662 <webidl> readonly attribute DOMString path;</webidl>
39665 The whole path of a remote folder on the server.
39669 If the current Messaging service does not support remote folders on the server,
39670 this attribute will be empty.
39677 <Type type="DOMString"/>
39679 <Attribute readonly="readonly" name="type" id="::Messaging::MessageFolder::type">
39680 <webidl> readonly attribute DOMString type;</webidl>
39683 The standard type of a folder.
39687 It can be one of the following values:
39700 If this folder is not a standard folder, an empty value must be returned.
39703 This property is unique for each type within one Messaging service.
39710 <Type type="DOMString"/>
39712 <Attribute name="synchronizable" id="::Messaging::MessageFolder::synchronizable">
39713 <webidl> attribute boolean synchronizable setraises(<ref>WebAPIException</ref>);</webidl>
39716 An attribute to show whether this folder should be synchronized or not.
39720 This attribute affects the behavior of the MessageService.sync() method.
39727 <Type type="boolean"/>
39729 <RaiseException name="WebAPIException"/>
39734 <Module name="NetworkBearerSelection" id="::NetworkBearerSelection">
39735 <webidl>module NetworkBearerSelection {
39737 enum NetworkType { "CELLULAR", "UNKNOWN" };
39739 [NoInterfaceObject] interface NetworkBearerSelectionObject {
39740 readonly attribute <ref>NetworkBearerSelection</ref> networkbearerselection;
39742 <ref>Tizen</ref> implements <ref>NetworkBearerSelectionObject</ref>;
39744 [NoInterfaceObject] interface NetworkBearerSelection {
39746 void requestRouteToHost(<ref>NetworkType</ref> networkType,
39747 DOMString domainName,
39748 <ref>NetworkSuccessCallback</ref> successCallback,
39749 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
39751 void releaseRouteToHost(<ref>NetworkType</ref> networkType,
39752 DOMString domainName,
39753 <ref>SuccessCallback</ref> successCallback,
39754 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
39757 [Callback, NoInterfaceObject] interface NetworkSuccessCallback {
39760 void ondisconnected();
39765 This specification defines interfaces and methods providing Web applications to access the devices.
39769 This API provides interfaces and methods for users to set network bearer selection.
39775 <def-api-feature identifier="http://tizen.org/feature/network.telephony">
39780 To guarantee this application running on a device with telephony feature, define below in the config file:
39786 <Enum name="NetworkType" id="::NetworkBearerSelection::NetworkType">
39787 <webidl> enum NetworkType { "CELLULAR", "UNKNOWN" };</webidl>
39790 An enumerator that defines the type of a network.
39796 <EnumValue stringvalue="CELLULAR">
39797 <webidl> "CELLULAR</webidl>
39799 <EnumValue stringvalue="UNKNOWN">
39800 <webidl> "UNKNOWN</webidl>
39803 <Interface name="NetworkBearerSelectionObject" id="::NetworkBearerSelection::NetworkBearerSelectionObject">
39804 <webidl> [NoInterfaceObject] interface NetworkBearerSelectionObject {
39805 readonly attribute <ref>NetworkBearerSelection</ref> networkbearerselection;
39809 Defines what is instantiated the Tizen object from the Tizen Platform.
39813 There is a <em>tizen.networkbearerselection </em>object that allows accessing the functionality of the Networkbearerselection API.
39820 <ExtendedAttributeList>
39821 <ExtendedAttribute name="NoInterfaceObject">
39822 <webidl>NoInterfaceObject</webidl>
39823 </ExtendedAttribute>
39824 </ExtendedAttributeList>
39825 <Attribute readonly="readonly" name="networkbearerselection" id="::NetworkBearerSelection::NetworkBearerSelectionObject::networkbearerselection">
39826 <webidl> readonly attribute <ref>NetworkBearerSelection</ref> networkbearerselection;</webidl>
39827 <Type name="NetworkBearerSelection"/>
39830 <Implements name1="Tizen" name2="NetworkBearerSelectionObject">
39831 <webidl> <ref>Tizen</ref> implements <ref>NetworkBearerSelectionObject</ref>;</webidl>
39833 <Interface name="NetworkBearerSelection" id="::NetworkBearerSelection::NetworkBearerSelection">
39834 <webidl> [NoInterfaceObject] interface NetworkBearerSelection {
39836 void requestRouteToHost(<ref>NetworkType</ref> networkType,
39837 DOMString domainName,
39838 <ref>NetworkSuccessCallback</ref> successCallback,
39839 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
39841 void releaseRouteToHost(<ref>NetworkType</ref> networkType,
39842 DOMString domainName,
39843 <ref>SuccessCallback</ref> successCallback,
39844 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
39848 This entry interface provides methods to query the network bearer selection.
39852 This API offers methods for network bearer selection.
39859 <ExtendedAttributeList>
39860 <ExtendedAttribute name="NoInterfaceObject">
39861 <webidl>NoInterfaceObject</webidl>
39862 </ExtendedAttribute>
39863 </ExtendedAttributeList>
39864 <Operation name="requestRouteToHost" id="::NetworkBearerSelection::NetworkBearerSelection::requestRouteToHost">
39865 <webidl> void requestRouteToHost(<ref>NetworkType</ref> networkType,
39866 DOMString domainName,
39867 <ref>NetworkSuccessCallback</ref> successCallback,
39868 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
39871 Requests a specific network connection.
39875 The function must asynchronously acquire success or fail.
39878 When called, it starts a request process defined with these set of steps:
39882 1. Open "networkType" network connection. </li>
39884 2. Resolve "domainName" to IP. </li>
39886 3. Change the routing path bound to domainName's IP to use the specific network type. </li>
39888 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>
39894 <Code> var statuscb = {
39895 onsuccess: function() { console.log("onsuccess func is called"); },
39896 ondisconnected: function() { console.log("ondisconnected func is called"); }
39898 function ecb(e) { console.log("error callback is called : " + e.message + " : " + e.code); }
39899 tizen.networkbearerselection.requestRouteToHost("CELLULAR", "www.tizen.org", statuscb, ecb);
39906 http://tizen.org/privilege/networkbearerselection
39909 <Type type="void"/>
39911 <Argument name="networkType">
39917 <Type name="NetworkType"/>
39919 <Argument name="domainName">
39925 <Type type="DOMString"/>
39927 <Argument name="successCallback">
39930 To be invoked if data network connection is connected or not.
39933 <Type name="NetworkSuccessCallback"/>
39935 <Argument optional="optional" name="errorCallback">
39938 To be invoked if the request is failed.
39941 <Type name="ErrorCallback" nullable="nullable"/>
39945 <RaiseException name="WebAPIException">
39948 with error type NotSupportedError, if this feature is not supported.
39951 with error type SecurityError, if the application does not have the privilege to call this method.
39954 with error type UnknownError, if any other error occurs.
39960 <Operation name="releaseRouteToHost" id="::NetworkBearerSelection::NetworkBearerSelection::releaseRouteToHost">
39961 <webidl> void releaseRouteToHost(<ref>NetworkType</ref> networkType,
39962 DOMString domainName,
39963 <ref>SuccessCallback</ref> successCallback,
39964 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
39967 Releases a specific network connection.
39971 The function must asynchronously acquire success or fail.
39974 When called, it closes a network connection.
39980 <Code> function scb() { console.log("success callback is called"); }
39981 function ecb(e) { console.log("error callback is called : " + e.message + " : " + e.code); }
39983 onsuccess: function() {
39984 console.log("onsuccess func is called");
39985 tizen.networkbearerselection.releaseRouteToHost("CELLULAR", "www.google.com", scb, ecb);
39987 ondisconnected: function() { console.log("ondisconnected func is called"); }
39989 tizen.networkbearerselection.requestRouteToHost("CELLULAR", "www.google.com", statuscb, ecb);
39996 http://tizen.org/privilege/networkbearerselection
39999 <Type type="void"/>
40001 <Argument name="networkType">
40007 <Type name="NetworkType"/>
40009 <Argument name="domainName">
40015 <Type type="DOMString"/>
40017 <Argument name="successCallback">
40020 To be invoked if data network connection is released.
40023 <Type name="SuccessCallback"/>
40025 <Argument optional="optional" name="errorCallback">
40028 To be invoked if the release is failed.
40031 <Type name="ErrorCallback" nullable="nullable"/>
40035 <RaiseException name="WebAPIException">
40038 with error type NotSupportedError, if this feature is not supported.
40041 with error type SecurityError, if the application does not have the privilege to call this method.
40044 with error type UnknownError, if any other error occurs.
40051 <Interface name="NetworkSuccessCallback" id="::NetworkBearerSelection::NetworkSuccessCallback">
40052 <webidl> [Callback, NoInterfaceObject] interface NetworkSuccessCallback {
40055 void ondisconnected();
40059 This interface provides a success callback specific to NetworkBearerSelection.
40063 It is used in asynchronous operations with requestRouteToHost().
40070 <ExtendedAttributeList>
40071 <ExtendedAttribute name="Callback">
40072 <webidl>Callback</webidl>
40073 </ExtendedAttribute>
40074 <ExtendedAttribute name="NoInterfaceObject">
40075 <webidl> NoInterfaceObject</webidl>
40076 </ExtendedAttribute>
40077 </ExtendedAttributeList>
40078 <Operation name="onsuccess" id="::NetworkBearerSelection::NetworkSuccessCallback::onsuccess">
40079 <webidl> void onsuccess();</webidl>
40082 Called when a network is connected successfully.
40088 <Type type="void"/>
40091 <Operation name="ondisconnected" id="::NetworkBearerSelection::NetworkSuccessCallback::ondisconnected">
40092 <webidl> void ondisconnected();</webidl>
40095 Called when a network is disconnected.
40101 <Type type="void"/>
40106 <Module name="NFC" id="::NFC">
40107 <webidl>module NFC {
40108 enum NDEFRecordTextEncoding { "UTF8", "UTF16" };
40110 enum NFCTagType { "GENERIC_TARGET", "ISO14443_A", "ISO14443_4A", "ISO14443_3A",
40111 "MIFARE_MINI", "MIFARE_1K", "MIFARE_4K", "MIFARE_ULTRA", "MIFARE_DESFIRE",
40112 "ISO14443_B", "ISO14443_4B", "ISO14443_BPRIME", "FELICA", "JEWEL", "ISO15693",
40113 "UNKNOWN_TARGET" };
40115 [NoInterfaceObject] interface NFCManagerObject {
40116 readonly attribute <ref>NFCManager</ref> nfc;
40118 <ref>Tizen</ref> implements <ref>NFCManagerObject</ref>;
40120 [NoInterfaceObject] interface NFCManager {
40121 const short NFC_RECORD_TNF_EMPTY = 0;
40122 const short NFC_RECORD_TNF_WELL_KNOWN = 1;
40123 const short NFC_RECORD_TNF_MIME_MEDIA = 2;
40124 const short NFC_RECORD_TNF_URI = 3;
40125 const short NFC_RECORD_TNF_EXTERNAL_RTD = 4;
40126 const short NFC_RECORD_TNF_UNKNOWN = 5;
40127 const short NFC_RECORD_TNF_UNCHANGED = 6;
40129 <ref>NFCAdapter</ref> getDefaultAdapter() raises(<ref>WebAPIException</ref>);
40131 void setExclusiveMode(boolean mode) raises(<ref>WebAPIException</ref>);
40135 [NoInterfaceObject] interface NFCAdapter {
40136 readonly attribute boolean powered ;
40139 void setPowered(boolean state,
40140 optional <ref>SuccessCallback</ref>? successCallback,
40141 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
40144 void setTagListener(<ref>NFCTagDetectCallback</ref> detectCallback,
40145 optional <ref>NFCTagType</ref>[]? tagFilter) raises(<ref>WebAPIException</ref>);
40147 void setPeerListener(<ref>NFCPeerDetectCallback</ref> detectCallback) raises(<ref>WebAPIException</ref>);
40149 void unsetTagListener() raises(<ref>WebAPIException</ref>);
40151 void unsetPeerListener() raises(<ref>WebAPIException</ref>);
40153 <ref>NDEFMessage</ref>? getCachedMessage() raises(<ref>WebAPIException</ref>);
40158 [NoInterfaceObject] interface NFCTag {
40159 readonly attribute <ref>NFCTagType</ref> type;
40161 readonly attribute boolean isSupportedNDEF;
40163 readonly attribute long ndefSize;
40165 readonly attribute object properties;
40167 readonly attribute boolean isConnected;
40170 void readNDEF(<ref>NDEFMessageReadCallback</ref> readCallback,
40171 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
40173 void writeNDEF(<ref>NDEFMessage</ref> ndefMessage,
40174 optional <ref>SuccessCallback</ref>? successCallback,
40175 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
40177 void transceive(byte[] data,
40178 <ref>ByteArraySuccessCallback</ref> dataCallback,
40179 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
40183 [NoInterfaceObject] interface NFCPeer {
40184 readonly attribute boolean isConnected;
40186 void setReceiveNDEFListener(<ref>NDEFMessageReadCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);
40188 void unsetReceiveNDEFListener() raises(<ref>WebAPIException</ref>);
40190 void sendNDEF(<ref>NDEFMessage</ref> ndefMessage,
40191 optional <ref>SuccessCallback</ref>? successCallback,
40192 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
40197 Constructor(<ref>NDEFRecord</ref>[] ndefRecords),
40198 Constructor(byte[] rawData)]
40199 interface NDEFMessage {
40200 readonly attribute long recordCount;
40202 attribute <ref>NDEFRecord</ref>[] records;
40204 byte[] toByte() raises(<ref>WebAPIException</ref>);
40207 [Constructor(short tnf, byte[] type, byte[] payload, optional byte[]? id),
40208 Constructor(byte[] raw_data)]
40209 interface NDEFRecord {
40210 readonly attribute short tnf;
40212 readonly attribute byte[] type;
40214 readonly attribute byte[] id;
40216 readonly attribute byte[] payload;
40219 [Constructor(DOMString text, DOMString languageCode, optional DOMString? encoding)]
40220 interface NDEFRecordText : <ref>NDEFRecord</ref> {
40221 readonly attribute DOMString text;
40223 readonly attribute DOMString languageCode;
40225 readonly attribute <ref>NDEFRecordTextEncoding</ref> encoding;
40228 [Constructor(DOMString uri)]
40229 interface NDEFRecordURI : <ref>NDEFRecord</ref> {
40230 readonly attribute DOMString uri;
40232 [Constructor(DOMString mimeType, byte[] data)]
40233 interface NDEFRecordMedia : <ref>NDEFRecord</ref> {
40234 readonly attribute DOMString mimeType;
40238 [Callback, NoInterfaceObject] interface NFCTagDetectCallback {
40239 void onattach(<ref>NFCTag</ref> nfcTag);
40243 [Callback, NoInterfaceObject] interface NFCPeerDetectCallback {
40244 void onattach(<ref>NFCPeer</ref> nfcPeer);
40248 [Callback=FunctionOnly, NoInterfaceObject] interface NDEFMessageReadCallback {
40249 void onsuccess(<ref>NDEFMessage</ref> ndefMessage);
40252 [Callback=FunctionOnly, NoInterfaceObject] interface ByteArraySuccessCallback {
40253 void onsuccess(byte[] data);
40259 This interface specifies a protocol for simple wireless interconnection of
40260 closely coupled devices operating at 13.56 MHz using Near Field Communication (NFC),
40261 which is an international standard (ISO/IEC 18092).
40262 To know more, see <a href="http://www.nfc-forum.org/specs/spec_list/">Technical Specifications</a>.
40266 There are three groups of application scenarios for NFC:
40270 Exchanging some digital information or data by holding a device close to a wireless tag. </li>
40272 Exchanging some information or data between two devices by holding them close to each other. </li>
40274 Making payments by holding mobile phones close to point of sales terminals instead of swiping smart cards. </li>
40277 For more information on the NFC features, see <a href="../../org.tizen.web.appprogramming/html/guide/communication_guide/nfc.htm">NFC Guide</a>.
40283 <def-api-feature identifier="http://tizen.org/feature/network.nfc">
40287 To guarantee this application running on a device with NFC feature, define below in the config file:
40293 <Enum name="NDEFRecordTextEncoding" id="::NFC::NDEFRecordTextEncoding">
40294 <webidl> enum NDEFRecordTextEncoding { "UTF8", "UTF16" };</webidl>
40297 An enumerator that defines an encoding format for an NDEF record text.
40303 <EnumValue stringvalue="UTF8">
40304 <webidl> "UTF8</webidl>
40306 <EnumValue stringvalue="UTF16">
40307 <webidl> "UTF16</webidl>
40310 <Enum name="NFCTagType" id="::NFC::NFCTagType">
40311 <webidl> enum NFCTagType { "GENERIC_TARGET", "ISO14443_A", "ISO14443_4A", "ISO14443_3A",
40312 "MIFARE_MINI", "MIFARE_1K", "MIFARE_4K", "MIFARE_ULTRA", "MIFARE_DESFIRE",
40313 "ISO14443_B", "ISO14443_4B", "ISO14443_BPRIME", "FELICA", "JEWEL", "ISO15693",
40314 "UNKNOWN_TARGET" };</webidl>
40317 An enumerator that defines the type of NFC tag.
40321 The following values are supported:
40325 GENERIC_TARGET </li>
40341 MIFARE_DESFIRE </li>
40347 ISO14443_BPRIME </li>
40355 UNKNOWN_TARGET </li>
40362 <EnumValue stringvalue="GENERIC_TARGET">
40363 <webidl> "GENERIC_TARGET</webidl>
40365 <EnumValue stringvalue="ISO14443_A">
40366 <webidl> "ISO14443_A</webidl>
40368 <EnumValue stringvalue="ISO14443_4A">
40369 <webidl> "ISO14443_4A</webidl>
40371 <EnumValue stringvalue="ISO14443_3A">
40372 <webidl> "ISO14443_3A</webidl>
40374 <EnumValue stringvalue="MIFARE_MINI">
40375 <webidl> "MIFARE_MINI</webidl>
40377 <EnumValue stringvalue="MIFARE_1K">
40378 <webidl> "MIFARE_1K</webidl>
40380 <EnumValue stringvalue="MIFARE_4K">
40381 <webidl> "MIFARE_4K</webidl>
40383 <EnumValue stringvalue="MIFARE_ULTRA">
40384 <webidl> "MIFARE_ULTRA</webidl>
40386 <EnumValue stringvalue="MIFARE_DESFIRE">
40387 <webidl> "MIFARE_DESFIRE</webidl>
40389 <EnumValue stringvalue="ISO14443_B">
40390 <webidl> "ISO14443_B</webidl>
40392 <EnumValue stringvalue="ISO14443_4B">
40393 <webidl> "ISO14443_4B</webidl>
40395 <EnumValue stringvalue="ISO14443_BPRIME">
40396 <webidl> "ISO14443_BPRIME</webidl>
40398 <EnumValue stringvalue="FELICA">
40399 <webidl> "FELICA</webidl>
40401 <EnumValue stringvalue="JEWEL">
40402 <webidl> "JEWEL</webidl>
40404 <EnumValue stringvalue="ISO15693">
40405 <webidl> "ISO15693</webidl>
40407 <EnumValue stringvalue="UNKNOWN_TARGET">
40408 <webidl> "UNKNOWN_TARGET</webidl>
40411 <Interface name="NFCManagerObject" id="::NFC::NFCManagerObject">
40412 <webidl> [NoInterfaceObject] interface NFCManagerObject {
40413 readonly attribute <ref>NFCManager</ref> nfc;
40417 This interface defines what is instantiated by the <em>Tizen</em> object from the Tizen Platform.
40418 There will be a <em>tizen.nfc </em>object that allows access to the functionality of the NFC API.
40424 <ExtendedAttributeList>
40425 <ExtendedAttribute name="NoInterfaceObject">
40426 <webidl>NoInterfaceObject</webidl>
40427 </ExtendedAttribute>
40428 </ExtendedAttributeList>
40429 <Attribute readonly="readonly" name="nfc" id="::NFC::NFCManagerObject::nfc">
40430 <webidl> readonly attribute <ref>NFCManager</ref> nfc;</webidl>
40431 <Type name="NFCManager"/>
40434 <Implements name1="Tizen" name2="NFCManagerObject">
40435 <webidl> <ref>Tizen</ref> implements <ref>NFCManagerObject</ref>;</webidl>
40437 <Interface name="NFCManager" id="::NFC::NFCManager">
40438 <webidl> [NoInterfaceObject] interface NFCManager {
40439 const short NFC_RECORD_TNF_EMPTY = 0;
40440 const short NFC_RECORD_TNF_WELL_KNOWN = 1;
40441 const short NFC_RECORD_TNF_MIME_MEDIA = 2;
40442 const short NFC_RECORD_TNF_URI = 3;
40443 const short NFC_RECORD_TNF_EXTERNAL_RTD = 4;
40444 const short NFC_RECORD_TNF_UNKNOWN = 5;
40445 const short NFC_RECORD_TNF_UNCHANGED = 6;
40447 <ref>NFCAdapter</ref> getDefaultAdapter() raises(<ref>WebAPIException</ref>);
40449 void setExclusiveMode(boolean mode) raises(<ref>WebAPIException</ref>);
40453 Accesses to the NFC tag/target.
40457 It provides access to the API functionalities through the tizen.nfc interface.
40464 <ExtendedAttributeList>
40465 <ExtendedAttribute name="NoInterfaceObject">
40466 <webidl>NoInterfaceObject</webidl>
40467 </ExtendedAttribute>
40468 </ExtendedAttributeList>
40469 <Const name="NFC_RECORD_TNF_EMPTY" value="0" id="::NFC::NFCManager::NFC_RECORD_TNF_EMPTY">
40470 <webidl> const short NFC_RECORD_TNF_EMPTY = 0;</webidl>
40473 A constant to indicate empty format of NDEF record's type field.
40479 <Type type="short"/>
40481 <Const name="NFC_RECORD_TNF_WELL_KNOWN" value="1" id="::NFC::NFCManager::NFC_RECORD_TNF_WELL_KNOWN">
40482 <webidl> const short NFC_RECORD_TNF_WELL_KNOWN = 1;</webidl>
40485 A constant to indicate Record Type Definition (RTD) format of NDEF record's type field.
40491 <Type type="short"/>
40493 <Const name="NFC_RECORD_TNF_MIME_MEDIA" value="2" id="::NFC::NFCManager::NFC_RECORD_TNF_MIME_MEDIA">
40494 <webidl> const short NFC_RECORD_TNF_MIME_MEDIA = 2;</webidl>
40497 A constant to indicate MIME media types format in RFC 2046 [RFC 2046] of NDEF record's type field.
40503 <Type type="short"/>
40505 <Const name="NFC_RECORD_TNF_URI" value="3" id="::NFC::NFCManager::NFC_RECORD_TNF_URI">
40506 <webidl> const short NFC_RECORD_TNF_URI = 3;</webidl>
40509 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.
40515 <Type type="short"/>
40517 <Const name="NFC_RECORD_TNF_EXTERNAL_RTD" value="4" id="::NFC::NFCManager::NFC_RECORD_TNF_EXTERNAL_RTD">
40518 <webidl> const short NFC_RECORD_TNF_EXTERNAL_RTD = 4;</webidl>
40521 A constant to indicate NFC forum external type [NFC RTD] format in RFC 2046 [RFC 2046] of NDEF record's type field.
40527 <Type type="short"/>
40529 <Const name="NFC_RECORD_TNF_UNKNOWN" value="5" id="::NFC::NFCManager::NFC_RECORD_TNF_UNKNOWN">
40530 <webidl> const short NFC_RECORD_TNF_UNKNOWN = 5;</webidl>
40533 A constant to indicate unknown type format in RFC 2046 [RFC 2046] of NDEF record's type field.
40539 <Type type="short"/>
40541 <Const name="NFC_RECORD_TNF_UNCHANGED" value="6" id="::NFC::NFCManager::NFC_RECORD_TNF_UNCHANGED">
40542 <webidl> const short NFC_RECORD_TNF_UNCHANGED = 6;</webidl>
40545 A constant to indicate whether the payload is an intermediate or final chunk of a chunked NDEF record.
40551 <Type type="short"/>
40553 <Operation name="getDefaultAdapter" id="::NFC::NFCManager::getDefaultAdapter">
40554 <webidl> <ref>NFCAdapter</ref> getDefaultAdapter() raises(<ref>WebAPIException</ref>);</webidl>
40557 Gets the default NFC adapter of the device.
40563 http://tizen.org/privilege/nfc.common
40569 var adapter = tizen.nfc.getDefaultAdapter() ;
40571 console.log (err.name +": " + err.message);
40575 <Type name="NFCAdapter">
40578 NFCAdapter The default NFCAdapter object.
40584 <RaiseException name="WebAPIException">
40587 with error type SecurityError, if the application does not have the privilege to call this method.
40590 with error type UnknownError in any other error case.
40596 <Operation name="setExclusiveMode" id="::NFC::NFCManager::setExclusiveMode">
40597 <webidl> void setExclusiveMode(boolean mode) raises(<ref>WebAPIException</ref>);</webidl>
40600 Gives priority to the current application for NFC operations over other applications when it is in the foreground.
40604 If the current application has the priority and is on the foreground, the system stops sending
40605 application control requests that are used to pick an application to handle a request about NFC.
40606 Such a request is usually sent, for example, when detecting an NFC tag or receiving an NDEF message
40607 from a connected NFC peer-to-peer target.
40610 When the current application moves to the background, it loses the priority.
40613 The exclusive mode can only be set when NFC is on. If NFC is off, the mode is ignored.
40620 http://tizen.org/privilege/nfc.common
40626 tizen.nfc.setExclusiveMode(true) ;
40628 console.log (err.name + ": " + err.message);
40632 <Type type="void"/>
40634 <Argument name="mode">
40637 The value of exclusive mode.
40640 <Type type="boolean"/>
40644 <RaiseException name="WebAPIException">
40647 with error type SecurityError, if the application does not have the privilege to call this method.
40650 with error type UnknownError in any other error case.
40657 <Interface name="NFCAdapter" id="::NFC::NFCAdapter">
40658 <webidl> [NoInterfaceObject] interface NFCAdapter {
40659 readonly attribute boolean powered ;
40662 void setPowered(boolean state,
40663 optional <ref>SuccessCallback</ref>? successCallback,
40664 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
40667 void setTagListener(<ref>NFCTagDetectCallback</ref> detectCallback,
40668 optional <ref>NFCTagType</ref>[]? tagFilter) raises(<ref>WebAPIException</ref>);
40670 void setPeerListener(<ref>NFCPeerDetectCallback</ref> detectCallback) raises(<ref>WebAPIException</ref>);
40672 void unsetTagListener() raises(<ref>WebAPIException</ref>);
40674 void unsetPeerListener() raises(<ref>WebAPIException</ref>);
40676 <ref>NDEFMessage</ref>? getCachedMessage() raises(<ref>WebAPIException</ref>);
40681 This interface provides access to control the adapter by offering methods to control local NFC behaviors, such as turning on/off an adapter.
40687 <ExtendedAttributeList>
40688 <ExtendedAttribute name="NoInterfaceObject">
40689 <webidl>NoInterfaceObject</webidl>
40690 </ExtendedAttribute>
40691 </ExtendedAttributeList>
40692 <Attribute readonly="readonly" name="powered" id="::NFC::NFCAdapter::powered">
40693 <webidl> readonly attribute boolean powered ;</webidl>
40696 The state of the NFC adapter.
40702 <Type type="boolean"/>
40704 <Operation name="setPowered" id="::NFC::NFCAdapter::setPowered">
40705 <webidl> void setPowered(boolean state,
40706 optional <ref>SuccessCallback</ref>? successCallback,
40707 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
40710 Sets the power of an NFC adapter to either a on state or a off state.
40714 The ErrorCallback is launched with these error types:
40718 ServiceNotAvailableError - If the NFC device is busy. </li>
40720 UnknownError - If any other error occurs. </li>
40727 http://tizen.org/privilege/nfc.admin
40732 <Code> var gNfcAdapter;
40733 var onPowerOn = function(){ // Called when NFC adapter is powered on
40735 console.log("Power on succeed");
40736 // Implement NFC communication routines ...
40737 gNfcAdapter.setPowered(
40738 false, // Disable NFC adapter
40739 function () {console.log("Power off succeed"); }, // Handle success
40740 function () {console.log("Power off failed"); }); // Handle failure
40742 console.log (err.name + ": " + err.message);
40746 gNfcAdapter = tizen.nfc.getDefaultAdapter();
40747 if (!gNfcAdapter.powered) {
40748 gNfcAdapter.setPowered(
40749 true, // Enable NFC adapter
40750 onPowerOn, // Handle succes
40751 function () {console.log("Power on failed")}); // Handle failure
40756 console.log (err.name + ": " + err.message);
40760 <Type type="void"/>
40762 <Argument name="state">
40765 The state of NFC adapter, <var>true</var> means on, <var>false</var> means off
40768 <Type type="boolean"/>
40770 <Argument optional="optional" name="successCallback">
40773 The method to call when NFC adapter is
40774 enabled or disabled successfully.
40777 <Type name="SuccessCallback" nullable="nullable"/>
40779 <Argument optional="optional" name="errorCallback">
40782 The method to call when an error occurs.
40785 <Type name="ErrorCallback" nullable="nullable"/>
40789 <RaiseException name="WebAPIException">
40792 with error type TypeMismatchError, if the input parameter
40793 is not compatible with the expected type for that parameter.
40796 with error type SecurityError, if this functionality is not allowed
40802 <Operation name="setTagListener" id="::NFC::NFCAdapter::setTagListener">
40803 <webidl> void setTagListener(<ref>NFCTagDetectCallback</ref> detectCallback,
40804 optional <ref>NFCTagType</ref>[]? tagFilter) raises(<ref>WebAPIException</ref>);</webidl>
40807 Registers a callback function to invoke when an NFC tag is detected.
40811 If the registration completes successfully, the detectCallback must be
40812 invoked when NFC tag is detected.
40815 If no tagFilter is passed, it shall consider the default tagFilter, that is to set all tag types.
40822 http://tizen.org/privilege/nfc.tag
40827 <Code> var adapter = tizen.nfc.getDefaultAdapter();
40828 var onSuccessCB = {onattach : function(nfcTag) {
40829 console.log("NFC Tag's type is " + nfcTag.type);
40830 }, ondetach : function() {
40831 console.log("NFC Tag is detached");
40833 adapter.setTagListener(onSuccessCB);
40836 <Type type="void"/>
40838 <Argument name="detectCallback">
40841 The method to invoke when a NFC tag is successfully detected.
40844 <Type name="NFCTagDetectCallback"/>
40846 <Argument optional="optional" name="tagFilter">
40849 A filter to be used when specific NFC tag is detected.
40852 <Type type="array" nullable="nullable">
40853 <Type name="NFCTagType"/>
40858 <RaiseException name="WebAPIException">
40861 with error type TypeMismatchError, if the input parameter
40862 is not compatible with the expected type for that parameter.
40865 with error type SecurityError, if the application does not have the privilege to call this method.
40868 with error type ServiceNotAvailableError, if the NFC service is not available.
40871 with error type UnknownError in any other error case.
40877 <Operation name="setPeerListener" id="::NFC::NFCAdapter::setPeerListener">
40878 <webidl> void setPeerListener(<ref>NFCPeerDetectCallback</ref> detectCallback) raises(<ref>WebAPIException</ref>);</webidl>
40881 Registers a callback function to be invoked when NFC peer-to-peer target is detected.
40885 If the registration completes successfully, the detectCallback must be
40886 invoked when NFC peer-to-peer target is detected.
40893 http://tizen.org/privilege/nfc.p2p
40898 <Code> var adapter = tizen.nfc.getDefaultAdapter();
40899 var onSuccessCB = {onattach : function(nfcPeer) {
40900 console.log("NFC Target is detected");
40901 }, ondetach : function() {
40902 console.log("NFC Target is detached");
40904 adapter.setPeerListener(onSuccessCB);
40907 <Type type="void"/>
40909 <Argument name="detectCallback">
40912 The method to invoke when a NFC peer-to-peer target is successfully detected.
40915 <Type name="NFCPeerDetectCallback"/>
40919 <RaiseException name="WebAPIException">
40922 with error type TypeMismatchError, if the input parameter
40923 is not compatible with the expected type for that parameter.
40926 with error type SecurityError, if the application does not have the privilege to call this method.
40929 with error type ServiceNotAvailableError, if the NFC service is not available.
40932 with error type UnknownError in any other error case.
40938 <Operation name="unsetTagListener" id="::NFC::NFCAdapter::unsetTagListener">
40939 <webidl> void unsetTagListener() raises(<ref>WebAPIException</ref>);</webidl>
40942 Unregisters the listener for detecting an NFC tag.
40948 http://tizen.org/privilege/nfc.tag
40953 <Code> var adapter = tizen.nfc.getDefaultAdapter();
40956 var onSuccessCB = {onattach : function(nfcTag) {
40957 console.log("NFC Tag's type is " + nfcTag.type);
40958 }, ondetach : function() {
40959 console.log("NFC Tag is detached");
40962 // Unregister the listener
40963 function unsetListen() {
40964 adapter.unsetTagListener();
40967 // Registers to be notified when NFC tag is detected.
40968 adapter.setTagListener(onSuccessCB)
40971 <Type type="void"/>
40974 <RaiseException name="WebAPIException">
40977 with error type SecurityError, if the application does not have the privilege to call this method.
40980 with error type ServiceNotAvailableError, if the NFC service is not available.
40983 with error type UnknownError in any other error case.
40989 <Operation name="unsetPeerListener" id="::NFC::NFCAdapter::unsetPeerListener">
40990 <webidl> void unsetPeerListener() raises(<ref>WebAPIException</ref>);</webidl>
40993 Unregisters the listener for detecting an NFC peer-to-peer target.
40999 http://tizen.org/privilege/nfc.p2p
41004 <Code> var adapter = tizen.nfc.getDefaultAdapter();
41006 // Receives an NFC peer.
41007 var onSuccessCB = {onattach : function(nfcPeer) {
41008 console.log("NFC Target is detected");
41009 }, ondetach : function() {
41010 console.log("NFC Target is detached");
41013 // Unregisters the listener.
41014 function unsetListen() {
41015 adapter.unsetPeerListener();
41018 // Registers to be notified when NFC peer-to-peer target is detected.
41019 adapter.setPeerListener(onSuccessCB)
41022 <Type type="void"/>
41025 <RaiseException name="WebAPIException">
41028 with error type SecurityError, if the application does not have the privilege to call this method.
41031 with error type ServiceNotAvailableError, if the NFC service is not available.
41034 with error type UnknownError in any other error case.
41040 <Operation name="getCachedMessage" id="::NFC::NFCAdapter::getCachedMessage">
41041 <webidl> <ref>NDEFMessage</ref>? getCachedMessage() raises(<ref>WebAPIException</ref>);</webidl>
41044 Gets the NDEF message cached when the tag is detected.
41048 If the operation completes successfully, the NDEF Message that was last read
41049 should be returned.
41056 http://tizen.org/privilege/nfc.common
41061 <Code> // Gets the cached message
41062 var cachedMessage = tizen.nfc.getDefaultAdapter().getCachedMessage();
41065 <Type name="NDEFMessage" nullable="nullable">
41068 The NDEF Message that was last read.
41074 <RaiseException name="WebAPIException">
41077 with error type SecurityError, if the application does not have the privilege to call this method.
41080 with error type UnknownError in any other error case.
41087 <Interface name="NFCTag" id="::NFC::NFCTag">
41088 <webidl> [NoInterfaceObject] interface NFCTag {
41089 readonly attribute <ref>NFCTagType</ref> type;
41091 readonly attribute boolean isSupportedNDEF;
41093 readonly attribute long ndefSize;
41095 readonly attribute object properties;
41097 readonly attribute boolean isConnected;
41100 void readNDEF(<ref>NDEFMessageReadCallback</ref> readCallback,
41101 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
41103 void writeNDEF(<ref>NDEFMessage</ref> ndefMessage,
41104 optional <ref>SuccessCallback</ref>? successCallback,
41105 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
41107 void transceive(byte[] data,
41108 <ref>ByteArraySuccessCallback</ref> dataCallback,
41109 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
41113 This interface provides accesses to the NFC tag.
41119 <ExtendedAttributeList>
41120 <ExtendedAttribute name="NoInterfaceObject">
41121 <webidl>NoInterfaceObject</webidl>
41122 </ExtendedAttribute>
41123 </ExtendedAttributeList>
41124 <Attribute readonly="readonly" name="type" id="::NFC::NFCTag::type">
41125 <webidl> readonly attribute <ref>NFCTagType</ref> type;</webidl>
41128 The type of the NFC tag.
41134 <Type name="NFCTagType"/>
41136 <Attribute readonly="readonly" name="isSupportedNDEF" id="::NFC::NFCTag::isSupportedNDEF">
41137 <webidl> readonly attribute boolean isSupportedNDEF;</webidl>
41140 An attribute to check if the NFC Tag supports NDEF format.
41146 <Type type="boolean"/>
41148 <Attribute readonly="readonly" name="ndefSize" id="::NFC::NFCTag::ndefSize">
41149 <webidl> readonly attribute long ndefSize;</webidl>
41152 The size of NDEF message stored in the tag.
41158 <Type type="long"/>
41160 <Attribute readonly="readonly" name="properties" id="::NFC::NFCTag::properties">
41161 <webidl> readonly attribute object properties;</webidl>
41164 The value is all tag information.
41168 It is pairs of key and value.
41169 The array's index is the pair's key and value is its value.
41172 <Code> var adapter = tizen.nfc.getDefaultAdapter();
41173 var onSuccessCB = {onattach : function(nfcTag) {
41174 console.log("NFC Tag's type is " + nfcTag.type);
41175 for(var i in nfcTag.properties) {
41176 console.log("key:" + i + " value:" + nfcTag.properties[i]);
41178 }, ondetach : function() {
41179 console.log("NFC Tag is detached");
41181 adapter.setTagListener(onSuccessCB);
41188 <Type type="object"/>
41190 <Attribute readonly="readonly" name="isConnected" id="::NFC::NFCTag::isConnected">
41191 <webidl> readonly attribute boolean isConnected;</webidl>
41194 The value is necessary to check if this tag is connected.
41200 <Type type="boolean"/>
41202 <Operation name="readNDEF" id="::NFC::NFCTag::readNDEF">
41203 <webidl> void readNDEF(<ref>NDEFMessageReadCallback</ref> readCallback,
41204 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
41207 Reads the NDEF data from the NFC tag.
41211 The ErrorCallback is launched with these error types:
41215 ServiceNotAvailableError - If the NFC service is not available. </li>
41217 UnknownError - If any other error occurs. </li>
41224 http://tizen.org/privilege/nfc.tag
41230 <Type type="void"/>
41232 <Argument name="readCallback">
41235 The method invoked in case of successfully reading the NDEF Data.
41238 <Type name="NDEFMessageReadCallback"/>
41240 <Argument optional="optional" name="errorCallback">
41243 The method invoked in case of any error during reading the NDEF Data.
41246 <Type name="ErrorCallback" nullable="nullable"/>
41250 <RaiseException name="WebAPIException">
41253 with error type TypeMismatchError, if the input parameter
41254 is not compatible with the expected type for that parameter.
41257 with error type SecurityError, if the application does not have the privilege to call this method.
41260 with error type NotSupportedError, if current Tag doesn't support NDEF format.
41266 <Operation name="writeNDEF" id="::NFC::NFCTag::writeNDEF">
41267 <webidl> void writeNDEF(<ref>NDEFMessage</ref> ndefMessage,
41268 optional <ref>SuccessCallback</ref>? successCallback,
41269 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
41272 Writes the NDEF data to the NFC tag.
41276 The ErrorCallback is launched with these error types:
41280 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
41282 ServiceNotAvailableError: If the NFC service is not available. </li>
41284 UnknownError: In any other error case. </li>
41291 http://tizen.org/privilege/nfc.tag
41297 <Type type="void"/>
41299 <Argument name="ndefMessage">
41302 The NDEF message to write to NFC tag.
41305 <Type name="NDEFMessage"/>
41307 <Argument optional="optional" name="successCallback">
41310 The method invoked in case of successfully writing the NDEF Data.
41313 <Type name="SuccessCallback" nullable="nullable"/>
41315 <Argument optional="optional" name="errorCallback">
41318 The method invoked in case of any error during writing the NDEF Data.
41321 <Type name="ErrorCallback" nullable="nullable"/>
41325 <RaiseException name="WebAPIException">
41328 with error type TypeMismatchError, if the input parameter
41329 is not compatible with the expected type for that parameter.
41332 with error type SecurityError, if the application does not have the privilege to call this method.
41335 with error type NotSupportedError, if current Tag doesn't support NDEF format.
41341 <Operation name="transceive" id="::NFC::NFCTag::transceive">
41342 <webidl> void transceive(byte[] data,
41343 <ref>ByteArraySuccessCallback</ref> dataCallback,
41344 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
41347 Access the raw format card. The transceive function is the only way to access the raw format card (not formatted).
41348 Each tag type requires its own command to access tags.
41349 This API provides low level access of tag operation. (Note that you must know each tag technology.)
41353 The ErrorCallback is launched with these error types:
41357 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
41359 ServiceNotAvailableError - If the NFC service is not available. </li>
41361 UnknownError - If any other error occurs. </li>
41368 http://tizen.org/privilege/nfc.tag
41374 <Type type="void"/>
41376 <Argument name="data">
41379 The raw data to transceive with the NFC tag.
41382 <Type type="array">
41383 <Type type="byte"/>
41386 <Argument name="dataCallback">
41389 Invoked in case of successfully transceiving the raw data.
41392 <Type name="ByteArraySuccessCallback"/>
41394 <Argument optional="optional" name="errorCallback">
41397 Invoked in case of any error during transceiving the NDEF Data.
41400 <Type name="ErrorCallback" nullable="nullable"/>
41404 <RaiseException name="WebAPIException">
41407 with error type TypeMismatchError, if the input parameter
41408 is not compatible with the expected type for that parameter.
41411 with error type SecurityError, if the application does not have the privilege to call this method.
41418 <Interface name="NFCPeer" id="::NFC::NFCPeer">
41419 <webidl> [NoInterfaceObject] interface NFCPeer {
41420 readonly attribute boolean isConnected;
41422 void setReceiveNDEFListener(<ref>NDEFMessageReadCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);
41424 void unsetReceiveNDEFListener() raises(<ref>WebAPIException</ref>);
41426 void sendNDEF(<ref>NDEFMessage</ref> ndefMessage,
41427 optional <ref>SuccessCallback</ref>? successCallback,
41428 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
41433 An interface that provides access to the NFC peer-to-peer target.
41439 <ExtendedAttributeList>
41440 <ExtendedAttribute name="NoInterfaceObject">
41441 <webidl>NoInterfaceObject</webidl>
41442 </ExtendedAttribute>
41443 </ExtendedAttributeList>
41444 <Attribute readonly="readonly" name="isConnected" id="::NFC::NFCPeer::isConnected">
41445 <webidl> readonly attribute boolean isConnected;</webidl>
41448 The value is necessary to check if this NFC peer-to-peer target is connected.
41454 <Type type="boolean"/>
41456 <Operation name="setReceiveNDEFListener" id="::NFC::NFCPeer::setReceiveNDEFListener">
41457 <webidl> void setReceiveNDEFListener(<ref>NDEFMessageReadCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);</webidl>
41460 Registers a callback function to be invoked when an NDEF message is received from the connected NFC peer-to-peer target.
41466 http://tizen.org/privilege/nfc.p2p
41471 <Code> var adapter = tizen.nfc.getDefaultAdapter();
41473 // Receives NFCPeer
41474 var onSuccessCB = {onattach : function(nfcPeer) {
41475 console.log("NFC Target is detected");
41476 nfcPeer.setReceiveNDEFListener(
41478 console.log("Receive message");
41480 }, ondetach : function() {
41481 console.log("NFC Target is detached");
41484 adapter.setPeerListener(onSuccessCB);
41487 <Type type="void"/>
41489 <Argument name="successCallback">
41492 Invoked in case of successful receiving the message.
41495 <Type name="NDEFMessageReadCallback"/>
41499 <RaiseException name="WebAPIException">
41502 with error type TypeMismatchError, if the input parameter
41503 is not compatible with the expected type for that parameter.
41506 with error type SecurityError, if the application does not have the privilege to call this method.
41509 with error type ServiceNotAvailableError, if the NFC service is not available.
41512 with error type UnknownError in any other error case.
41518 <Operation name="unsetReceiveNDEFListener" id="::NFC::NFCPeer::unsetReceiveNDEFListener">
41519 <webidl> void unsetReceiveNDEFListener() raises(<ref>WebAPIException</ref>);</webidl>
41522 Unregisters the listener for receiving NDEF messages from the NFC peer-to-peer target connected.
41528 http://tizen.org/privilege/nfc.p2p
41533 <Code> var adapter = tizen.nfc.getDefaultAdapter();
41534 var onSuccessCB = {onattach : function(nfcPeer) {
41535 console.log("NFC Target is detected");
41536 nfcPeer.setReceiveNDEFListener(
41538 console.log("Receive message");
41539 nfcPeer.unsetReceiveNDEFListener();
41541 }, ondetach : function() {
41542 console.log("NFC Target is detached");
41546 adapter.setPeerListener(onSuccessCB);
41549 <Type type="void"/>
41552 <RaiseException name="WebAPIException">
41555 with error type SecurityError, if the application does not have the privilege to call this method.
41558 with error type ServiceNotAvailableError, if the NFC service is not available.
41561 with error type UnknownError in any other error case.
41567 <Operation name="sendNDEF" id="::NFC::NFCPeer::sendNDEF">
41568 <webidl> void sendNDEF(<ref>NDEFMessage</ref> ndefMessage,
41569 optional <ref>SuccessCallback</ref>? successCallback,
41570 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
41573 Sends data to the NFC peer-to-peer target.
41577 The ErrorCallback is launched with these error types:
41581 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
41583 ServiceNotAvailableError: If the NFC service is not available. </li>
41585 UnknownError: In any other error case. </li>
41592 http://tizen.org/privilege/nfc.p2p
41598 <Type type="void"/>
41600 <Argument name="ndefMessage">
41603 The NDEF message to send to NFC peer-to-peer target.
41606 <Type name="NDEFMessage"/>
41608 <Argument optional="optional" name="successCallback">
41611 Invoked in case of successfully sending data to NFC peer-to-peer target.
41614 <Type name="SuccessCallback" nullable="nullable"/>
41616 <Argument optional="optional" name="errorCallback">
41619 Invoked in case of any error during sending.
41622 <Type name="ErrorCallback" nullable="nullable"/>
41626 <RaiseException name="WebAPIException">
41629 with error type TypeMismatchError, if the input parameter
41630 is not compatible with the expected type for that parameter.
41633 with error type SecurityError, if the application does not have the privilege to call this method.
41640 <Interface name="NDEFMessage" id="::NFC::NDEFMessage">
41641 <webidl> [Constructor(),
41642 Constructor(<ref>NDEFRecord</ref>[] ndefRecords),
41643 Constructor(byte[] rawData)]
41644 interface NDEFMessage {
41645 readonly attribute long recordCount;
41647 attribute <ref>NDEFRecord</ref>[] records;
41649 byte[] toByte() raises(<ref>WebAPIException</ref>);
41653 The NDEFMessage interface. An NDEFmessage is composed of multiple NDEFRecords.
41654 The NDEFMessage must have at least one NDEFRecord.
41660 <ExtendedAttributeList>
41661 <ExtendedAttribute name="Constructor">
41662 <webidl>Constructor()</webidl>
41664 </ExtendedAttribute>
41665 <ExtendedAttribute name="Constructor">
41666 <webidl> Constructor(<ref>NDEFRecord</ref>[] ndefRecords)</webidl>
41668 <Argument name="ndefRecords">
41669 <Type type="array">
41670 <Type name="NDEFRecord"/>
41674 </ExtendedAttribute>
41675 <ExtendedAttribute name="Constructor">
41676 <webidl> Constructor(byte[] rawData)</webidl>
41678 <Argument name="rawData">
41679 <Type type="array">
41680 <Type type="byte"/>
41684 </ExtendedAttribute>
41685 </ExtendedAttributeList>
41686 <Attribute readonly="readonly" name="recordCount" id="::NFC::NDEFMessage::recordCount">
41687 <webidl> readonly attribute long recordCount;</webidl>
41690 The number of records in the NDEFMessage.
41696 <Type type="long"/>
41698 <Attribute name="records" id="::NFC::NDEFMessage::records">
41699 <webidl> attribute <ref>NDEFRecord</ref>[] records;</webidl>
41702 The array of NDEFRecord objects in the NDEFMessage.
41708 <Type type="array">
41709 <Type name="NDEFRecord"/>
41712 <Operation name="toByte" id="::NFC::NDEFMessage::toByte">
41713 <webidl> byte[] toByte() raises(<ref>WebAPIException</ref>);</webidl>
41716 Gets the serial byte array of the NDEF message.
41720 If the operation completes successfully, it returns the serial byte array of the NDEF message.
41726 <Code> // Gets the cached message.
41727 var cachedMessage = tizen.nfc.getDefaultAdapter().getCachedMessage();
41728 var raw = cachedMessage.toByte();
41731 <Type type="array">
41734 byte[] The raw data in the NDEFMessage.
41737 <Type type="byte"/>
41741 <RaiseException name="WebAPIException">
41744 with error type TypeMismatchError, if the records whose type is not NDEFRecord are included in the NDEFMessage.
41747 with error type UnknownError in any other error case.
41754 <Interface name="NDEFRecord" id="::NFC::NDEFRecord">
41755 <webidl> [Constructor(short tnf, byte[] type, byte[] payload, optional byte[]? id),
41756 Constructor(byte[] raw_data)]
41757 interface NDEFRecord {
41758 readonly attribute short tnf;
41760 readonly attribute byte[] type;
41762 readonly attribute byte[] id;
41764 readonly attribute byte[] payload;
41768 The NDEFRecord interface.
41774 <ExtendedAttributeList>
41775 <ExtendedAttribute name="Constructor">
41776 <webidl>Constructor(short tnf, byte[] type, byte[] payload, optional byte[]? id)</webidl>
41778 <Argument name="tnf">
41779 <Type type="short"/>
41781 <Argument name="type">
41782 <Type type="array">
41783 <Type type="byte"/>
41786 <Argument name="payload">
41787 <Type type="array">
41788 <Type type="byte"/>
41791 <Argument optional="optional" name="id">
41792 <Type type="array" nullable="nullable">
41793 <Type type="byte"/>
41797 </ExtendedAttribute>
41798 <ExtendedAttribute name="Constructor">
41799 <webidl> Constructor(byte[] raw_data)</webidl>
41801 <Argument name="raw_data">
41802 <Type type="array">
41803 <Type type="byte"/>
41807 </ExtendedAttribute>
41808 </ExtendedAttributeList>
41809 <Attribute readonly="readonly" name="tnf" id="::NFC::NDEFRecord::tnf">
41810 <webidl> readonly attribute short tnf;</webidl>
41813 The value of the record type (TNF value).
41817 At least the following values must be supported:
41821 NFC_RECORD_TNF_EMPTY - The record type is empty </li>
41823 NFC_RECORD_TNF_WELL_KNOWN - Record Type Definition (RTD) format [NFC RTD] </li>
41825 NFC_RECORD_TNF_MIME_MEDIA - MIME media types in RFC 2046 [RFC 2046] </li>
41827 NFC_RECORD_TNF_URI - Absolute URI as defined in RFC 3986 [RFC 3986] </li>
41829 NFC_RECORD_TNF_EXTERNAL_RTD - NFC forum external type [NFC RTD] </li>
41831 NFC_RECORD_TNF_UNKNOWN - The payload type is unknown </li>
41833 NFC_RECORD_TNF_UNCHANGED - It means the payload is an intermediate or final chunk of a chunked NDEF record </li>
41840 <Type type="short"/>
41842 <Attribute readonly="readonly" name="type" id="::NFC::NDEFRecord::type">
41843 <webidl> readonly attribute byte[] type;</webidl>
41846 The specified type in byte array.
41850 The byte array contains <var>0</var> to <var>255</var> bytes.
41857 <Type type="array">
41858 <Type type="byte"/>
41861 <Attribute readonly="readonly" name="id" id="::NFC::NDEFRecord::id">
41862 <webidl> readonly attribute byte[] id;</webidl>
41869 The byte array contains <var>0</var> to <var>255</var> bytes.
41872 By default, this attribute is set to an empty array.
41879 <Type type="array">
41880 <Type type="byte"/>
41883 <Attribute readonly="readonly" name="payload" id="::NFC::NDEFRecord::payload">
41884 <webidl> readonly attribute byte[] payload;</webidl>
41887 The record payload.
41891 The byte array contains <var>0</var> to <var>(2 ** 32 - 1)</var> bytes.
41897 <Code> // Creates a new NDEF record.
41898 var newRecord = new tizen.NDEFRecordURI("https://www.tizen.org/");
41899 var payload = newRecord.payload;
41902 <Type type="array">
41903 <Type type="byte"/>
41907 <Interface name="NDEFRecordText" id="::NFC::NDEFRecordText">
41908 <webidl> [Constructor(DOMString text, DOMString languageCode, optional DOMString? encoding)]
41909 interface NDEFRecordText : <ref>NDEFRecord</ref> {
41910 readonly attribute DOMString text;
41912 readonly attribute DOMString languageCode;
41914 readonly attribute <ref>NDEFRecordTextEncoding</ref> encoding;
41918 The NDEFRecord that has the text type payload.
41924 <ExtendedAttributeList>
41925 <ExtendedAttribute name="Constructor">
41926 <webidl>Constructor(DOMString text, DOMString languageCode, optional DOMString? encoding)</webidl>
41928 <Argument name="text">
41929 <Type type="DOMString"/>
41931 <Argument name="languageCode">
41932 <Type type="DOMString"/>
41934 <Argument optional="optional" name="encoding">
41935 <Type type="DOMString" nullable="nullable"/>
41938 </ExtendedAttribute>
41939 </ExtendedAttributeList>
41940 <InterfaceInheritance>
41941 <Name name="NDEFRecord"/>
41942 </InterfaceInheritance>
41943 <Attribute readonly="readonly" name="text" id="::NFC::NDEFRecordText::text">
41944 <webidl> readonly attribute DOMString text;</webidl>
41953 <Type type="DOMString"/>
41955 <Attribute readonly="readonly" name="languageCode" id="::NFC::NDEFRecordText::languageCode">
41956 <webidl> readonly attribute DOMString languageCode;</webidl>
41959 The language code string value, followed by IANA[RFC 3066] (for example, en-US, ko-KR).
41965 <Type type="DOMString"/>
41967 <Attribute readonly="readonly" name="encoding" id="::NFC::NDEFRecordText::encoding">
41968 <webidl> readonly attribute <ref>NDEFRecordTextEncoding</ref> encoding;</webidl>
41971 The encoding type. By default, this attribute is set to UTF8.
41977 <Type name="NDEFRecordTextEncoding"/>
41980 <Interface name="NDEFRecordURI" id="::NFC::NDEFRecordURI">
41981 <webidl> [Constructor(DOMString uri)]
41982 interface NDEFRecordURI : <ref>NDEFRecord</ref> {
41983 readonly attribute DOMString uri;
41987 The NDEFRecord that has URI type payload.
41993 <ExtendedAttributeList>
41994 <ExtendedAttribute name="Constructor">
41995 <webidl>Constructor(DOMString uri)</webidl>
41997 <Argument name="uri">
41998 <Type type="DOMString"/>
42001 </ExtendedAttribute>
42002 </ExtendedAttributeList>
42003 <InterfaceInheritance>
42004 <Name name="NDEFRecord"/>
42005 </InterfaceInheritance>
42006 <Attribute readonly="readonly" name="uri" id="::NFC::NDEFRecordURI::uri">
42007 <webidl> readonly attribute DOMString uri;</webidl>
42010 The URI string that is stored in the payload.
42016 <Type type="DOMString"/>
42019 <Interface name="NDEFRecordMedia" id="::NFC::NDEFRecordMedia">
42020 <webidl> [Constructor(DOMString mimeType, byte[] data)]
42021 interface NDEFRecordMedia : <ref>NDEFRecord</ref> {
42022 readonly attribute DOMString mimeType;
42026 The NDEFRecord that has mime type payload.
42032 <ExtendedAttributeList>
42033 <ExtendedAttribute name="Constructor">
42034 <webidl>Constructor(DOMString mimeType, byte[] data)</webidl>
42039 <b>data</b> : Mime type payload. The byte array contains <var>0</var> to <var>(2 ** 32 - 1)</var> bytes. </li>
42044 <Argument name="mimeType">
42045 <Type type="DOMString"/>
42047 <Argument name="data">
42048 <Type type="array">
42049 <Type type="byte"/>
42053 </ExtendedAttribute>
42054 </ExtendedAttributeList>
42055 <InterfaceInheritance>
42056 <Name name="NDEFRecord"/>
42057 </InterfaceInheritance>
42058 <Attribute readonly="readonly" name="mimeType" id="::NFC::NDEFRecordMedia::mimeType">
42059 <webidl> readonly attribute DOMString mimeType;</webidl>
42062 The mime type [RFC 2046] (for example, text/plain, image/jpeg ).
42068 <Type type="DOMString"/>
42071 <Interface name="NFCTagDetectCallback" id="::NFC::NFCTagDetectCallback">
42072 <webidl> [Callback, NoInterfaceObject] interface NFCTagDetectCallback {
42073 void onattach(<ref>NFCTag</ref> nfcTag);
42078 The success callback to be invoked when an NFC tag is detected or lost.
42082 This callback interface specifies two methods:
42086 onattach: invoked when an NFC tag is detected </li>
42088 ondetach: invoked when the NFC tag is lost </li>
42091 It is used in NFCAdapter.setTagListener().
42098 <ExtendedAttributeList>
42099 <ExtendedAttribute name="Callback">
42100 <webidl>Callback</webidl>
42101 </ExtendedAttribute>
42102 <ExtendedAttribute name="NoInterfaceObject">
42103 <webidl> NoInterfaceObject</webidl>
42104 </ExtendedAttribute>
42105 </ExtendedAttributeList>
42106 <Operation name="onattach" id="::NFC::NFCTagDetectCallback::onattach">
42107 <webidl> void onattach(<ref>NFCTag</ref> nfcTag);</webidl>
42110 The method invoked when a tag is attached.
42116 <Type type="void"/>
42118 <Argument name="nfcTag">
42121 The attached NFC tag.
42124 <Type name="NFCTag"/>
42128 <Operation name="ondetach" id="::NFC::NFCTagDetectCallback::ondetach">
42129 <webidl> void ondetach();</webidl>
42132 The method invoked when the connected tag is detached.
42138 <Type type="void"/>
42142 <Interface name="NFCPeerDetectCallback" id="::NFC::NFCPeerDetectCallback">
42143 <webidl> [Callback, NoInterfaceObject] interface NFCPeerDetectCallback {
42144 void onattach(<ref>NFCPeer</ref> nfcPeer);
42149 The success callback to be invoked when an NFC peer-to-peer target is detected or lost.
42153 This callback interface specifies two methods:
42157 onattach: invoked when an NFC peer-to-peer target is detected </li>
42159 ondetach: invoked when the NFC peer-to-peer target is lost </li>
42162 It is used in NFCAdapter.setPeerListener().
42169 <ExtendedAttributeList>
42170 <ExtendedAttribute name="Callback">
42171 <webidl>Callback</webidl>
42172 </ExtendedAttribute>
42173 <ExtendedAttribute name="NoInterfaceObject">
42174 <webidl> NoInterfaceObject</webidl>
42175 </ExtendedAttribute>
42176 </ExtendedAttributeList>
42177 <Operation name="onattach" id="::NFC::NFCPeerDetectCallback::onattach">
42178 <webidl> void onattach(<ref>NFCPeer</ref> nfcPeer);</webidl>
42181 The method invoked when the NFC peer-to-peer target is attached.
42187 <Type type="void"/>
42189 <Argument name="nfcPeer">
42192 The attached NFC peer-to-peer target.
42195 <Type name="NFCPeer"/>
42199 <Operation name="ondetach" id="::NFC::NFCPeerDetectCallback::ondetach">
42200 <webidl> void ondetach();</webidl>
42203 The method invoked when the NFC peer-to-peer target connected is detached.
42209 <Type type="void"/>
42213 <Interface name="NDEFMessageReadCallback" id="::NFC::NDEFMessageReadCallback">
42214 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface NDEFMessageReadCallback {
42215 void onsuccess(<ref>NDEFMessage</ref> ndefMessage);
42219 The success callback to be invoked when data has been read successfully from the NFC tag or target.
42223 This callback interface specifies a success method with
42224 an NDEF message as an input parameter.
42225 It is used in asynchronous
42226 operations, such as NFCTag.readNDEF() or NFCPeer.setReceiveNDEFListener().
42233 <ExtendedAttributeList>
42234 <ExtendedAttribute name="Callback" value="FunctionOnly">
42235 <webidl>Callback</webidl>
42236 </ExtendedAttribute>
42237 <ExtendedAttribute name="NoInterfaceObject">
42238 <webidl> NoInterfaceObject</webidl>
42239 </ExtendedAttribute>
42240 </ExtendedAttributeList>
42241 <Operation name="onsuccess" id="::NFC::NDEFMessageReadCallback::onsuccess">
42242 <webidl> void onsuccess(<ref>NDEFMessage</ref> ndefMessage);</webidl>
42245 The method invoked when the asynchronous call completes successfully.
42251 <Type type="void"/>
42253 <Argument name="ndefMessage">
42256 NDEF message that is read from the NFC tag or target.
42259 <Type name="NDEFMessage"/>
42264 <Interface name="ByteArraySuccessCallback" id="::NFC::ByteArraySuccessCallback">
42265 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ByteArraySuccessCallback {
42266 void onsuccess(byte[] data);
42270 The success callback to be invoked when NFCTag.transceive() completes successfully.
42274 This callback interface specifies a success method, with
42275 a raw data as an input parameter. It is used in NFCTag.transceive().
42282 <ExtendedAttributeList>
42283 <ExtendedAttribute name="Callback" value="FunctionOnly">
42284 <webidl>Callback</webidl>
42285 </ExtendedAttribute>
42286 <ExtendedAttribute name="NoInterfaceObject">
42287 <webidl> NoInterfaceObject</webidl>
42288 </ExtendedAttribute>
42289 </ExtendedAttributeList>
42290 <Operation name="onsuccess" id="::NFC::ByteArraySuccessCallback::onsuccess">
42291 <webidl> void onsuccess(byte[] data);</webidl>
42294 The method invoked when the asynchronous call completes successfully.
42300 <Type type="void"/>
42302 <Argument name="data">
42305 The raw data that is read from NFC tag or response of transceive operation.
42308 <Type type="array">
42309 <Type type="byte"/>
42316 <Module name="Notification" id="::Notification">
42317 <webidl>module Notification {
42319 typedef DOMString NotificationId;
42321 enum NotificationType { "STATUS" };
42323 enum StatusNotificationType { "SIMPLE", "THUMBNAIL", "ONGOING", "PROGRESS" };
42325 enum NotificationProgressType { "PERCENTAGE", "BYTE" };
42328 [NoInterfaceObject] interface NotificationObject {
42329 readonly attribute <ref>NotificationManager</ref> notification;
42331 <ref>Tizen</ref> implements <ref>NotificationObject</ref>;
42333 [NoInterfaceObject] interface NotificationManager {
42335 void post(<ref>Notification</ref> notification) raises(<ref>WebAPIException</ref>);
42337 void update(<ref>Notification</ref> notification) raises(<ref>WebAPIException</ref>);
42339 void remove(<ref>NotificationId</ref> id) raises(<ref>WebAPIException</ref>);
42341 void removeAll() raises(<ref>WebAPIException</ref>);
42343 <ref>Notification</ref> get(<ref>NotificationId</ref> id) raises(<ref>WebAPIException</ref>);
42345 <ref>Notification</ref>[] getAll() raises(<ref>WebAPIException</ref>);
42350 [NoInterfaceObject] interface Notification {
42353 readonly attribute <ref>NotificationId</ref> id;
42355 readonly attribute <ref>NotificationType</ref> type;
42357 readonly attribute Date postedTime;
42359 attribute DOMString title;
42361 attribute DOMString? content;
42366 dictionary StatusNotificationInit {
42367 DOMString? content;
42368 DOMString? iconPath;
42369 DOMString? soundPath;
42370 boolean? vibration;
42371 <ref>ApplicationControl</ref>? appControl;
42372 <ref>ApplicationId</ref>? appId;
42373 <ref>NotificationProgressType</ref>? progressType;
42374 unsigned long? progressValue;
42376 DOMString? subIconPath;
42377 <ref>NotificationDetailInfo</ref>[]? detailInfo;
42378 DOMString? ledColor;
42379 unsigned long ledOnPeriod;
42380 unsigned long ledOffPeriod;
42381 DOMString? backgroundImagePath;
42382 DOMString[]? thumbnails;
42385 [Constructor(<ref>StatusNotificationType</ref> statusType, DOMString title, optional <ref>StatusNotificationInit</ref>? notificationInitDict)]
42388 interface StatusNotification : <ref>Notification</ref> {
42390 readonly attribute <ref>StatusNotificationType</ref> statusType;
42392 attribute DOMString? iconPath;
42394 attribute DOMString? subIconPath;
42396 attribute long? number;
42398 attribute <ref>NotificationDetailInfo</ref>[]? detailInfo;
42400 attribute DOMString? ledColor;
42402 attribute unsigned long ledOnPeriod;
42404 attribute unsigned long ledOffPeriod;
42406 attribute DOMString? backgroundImagePath;
42408 attribute DOMString[]? thumbnails;
42410 attribute DOMString? soundPath;
42412 attribute boolean vibration;
42414 attribute <ref>ApplicationControl</ref>? appControl;
42416 attribute <ref>ApplicationId</ref>? appId;
42418 attribute <ref>NotificationProgressType</ref> progressType;
42420 attribute unsigned long? progressValue;
42424 [Constructor(DOMString mainText, optional DOMString? subText)]
42425 interface NotificationDetailInfo {
42426 attribute DOMString mainText;
42428 attribute DOMString? subText;
42434 The Notification API provides a way to notify users of events that happen in an application.
42438 For more information on the Notification features, see <a href="../../org.tizen.web.appprogramming/html/guide/ui_guide/notification.htm">Notification Guide</a>.
42445 <Typedef name="NotificationId" id="::Notification::NotificationId">
42446 <webidl> typedef DOMString NotificationId;</webidl>
42455 <Type type="DOMString"/>
42457 <Enum name="NotificationType" id="::Notification::NotificationType">
42458 <webidl> enum NotificationType { "STATUS" };</webidl>
42461 A notification type.
42465 The following notification type is supported:
42469 STATUS - The posted status notification is displayed in status bar and the notification tray.
42470 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>
42477 <EnumValue stringvalue="STATUS">
42478 <webidl> "STATUS</webidl>
42481 <Enum name="StatusNotificationType" id="::Notification::StatusNotificationType">
42482 <webidl> enum StatusNotificationType { "SIMPLE", "THUMBNAIL", "ONGOING", "PROGRESS" };</webidl>
42485 A status notification type.
42489 The following status notification types are supported:
42493 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>
42495 THUMBNAIL - The thumbnail status notification posts a thumbnail-format notification which includes several thumbnail image paths.
42496 The thumbnail status notification is also removed by a user selection.
42499 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>
42501 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>
42508 <EnumValue stringvalue="SIMPLE">
42509 <webidl> "SIMPLE</webidl>
42511 <EnumValue stringvalue="THUMBNAIL">
42512 <webidl> "THUMBNAIL</webidl>
42514 <EnumValue stringvalue="ONGOING">
42515 <webidl> "ONGOING</webidl>
42517 <EnumValue stringvalue="PROGRESS">
42518 <webidl> "PROGRESS</webidl>
42521 <Enum name="NotificationProgressType" id="::Notification::NotificationProgressType">
42522 <webidl> enum NotificationProgressType { "PERCENTAGE", "BYTE" };</webidl>
42525 A notification progress type.
42529 Supporting notification progress types are:
42533 "BYTE" - The progress is indicated in bytes. </li>
42535 "PERCENTAGE" -The progress is indicated in percentage. </li>
42542 <EnumValue stringvalue="PERCENTAGE">
42543 <webidl> "PERCENTAGE</webidl>
42545 <EnumValue stringvalue="BYTE">
42546 <webidl> "BYTE</webidl>
42549 <Interface name="NotificationObject" id="::Notification::NotificationObject">
42550 <webidl> [NoInterfaceObject] interface NotificationObject {
42551 readonly attribute <ref>NotificationManager</ref> notification;
42555 Defines what is instantiated by the <em>Tizen</em> object.
42559 There is a <em>tizen.notification</em> object that allows access to the
42567 <ExtendedAttributeList>
42568 <ExtendedAttribute name="NoInterfaceObject">
42569 <webidl>NoInterfaceObject</webidl>
42570 </ExtendedAttribute>
42571 </ExtendedAttributeList>
42572 <Attribute readonly="readonly" name="notification" id="::Notification::NotificationObject::notification">
42573 <webidl> readonly attribute <ref>NotificationManager</ref> notification;</webidl>
42574 <Type name="NotificationManager"/>
42577 <Implements name1="Tizen" name2="NotificationObject">
42578 <webidl> <ref>Tizen</ref> implements <ref>NotificationObject</ref>;</webidl>
42580 <Interface name="NotificationManager" id="::Notification::NotificationManager">
42581 <webidl> [NoInterfaceObject] interface NotificationManager {
42583 void post(<ref>Notification</ref> notification) raises(<ref>WebAPIException</ref>);
42585 void update(<ref>Notification</ref> notification) raises(<ref>WebAPIException</ref>);
42587 void remove(<ref>NotificationId</ref> id) raises(<ref>WebAPIException</ref>);
42589 void removeAll() raises(<ref>WebAPIException</ref>);
42591 <ref>Notification</ref> get(<ref>NotificationId</ref> id) raises(<ref>WebAPIException</ref>);
42593 <ref>Notification</ref>[] getAll() raises(<ref>WebAPIException</ref>);
42598 Notification manager interface that provides access to the API.
42602 This interface provides access to the notification object.
42609 <ExtendedAttributeList>
42610 <ExtendedAttribute name="NoInterfaceObject">
42611 <webidl>NoInterfaceObject</webidl>
42612 </ExtendedAttribute>
42613 </ExtendedAttributeList>
42614 <Operation name="post" id="::Notification::NotificationManager::post">
42615 <webidl> void post(<ref>Notification</ref> notification) raises(<ref>WebAPIException</ref>);</webidl>
42618 Posts a notification to display.
42627 http://tizen.org/privilege/notification
42630 var appControl = new tizen.ApplicationControl(
42631 "http://tizen.org/appcontrol/operation/create_content",
42633 "image/jpg",
42635 var notificationDict = {
42636 content : "This is a simple notification.",
42637 iconPath : "images/image1.jpg",
42638 soundPath : "music/Over the horizon.mp3",
42640 appControl : appControl};
42642 var notification = new tizen.StatusNotification("SIMPLE",
42643 "Simple notification", notificationDict);
42645 tizen.notification.post(notification);
42647 console.log (err.name + ": " + err.message);
42651 <Type type="void"/>
42653 <Argument name="notification">
42656 A notification to post.
42659 <Type name="Notification"/>
42663 <RaiseException name="WebAPIException">
42666 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
42669 with error type InvalidValuesError, if any of the input
42670 parameters contain an invalid value.
42673 with error type SecurityError, if the application does not have the privilege to call this method.
42676 with error type UnknownError if any other error occurs.
42682 <Operation name="update" id="::Notification::NotificationManager::update">
42683 <webidl> void update(<ref>Notification</ref> notification) raises(<ref>WebAPIException</ref>);</webidl>
42686 Updates a previously posted notification.
42695 http://tizen.org/privilege/notification
42698 // Uses a variable for the previously posted notification.
42699 notification.content = "My notification";
42700 tizen.notification.update(notification);
42702 console.log (err.name + ": " + err.message);
42707 <Type type="void"/>
42709 <Argument name="notification">
42712 A notification to update.
42715 <Type name="Notification"/>
42719 <RaiseException name="WebAPIException">
42722 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
42725 with error type InvalidValuesError, if any of the input
42726 parameters contain an invalid value.
42729 with error type SecurityError, if the application does not have the privilege to call this method.
42732 with error type UnknownError if any other error occurs.
42738 <Operation name="remove" id="::Notification::NotificationManager::remove">
42739 <webidl> void remove(<ref>NotificationId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
42742 Removes a previously posted notification.
42751 http://tizen.org/privilege/notification
42754 // Uses a variable for the previously posted notification.
42755 tizen.notification.remove(notification.id);
42757 console.log (err.name + ": " + err.message);
42762 <Type type="void"/>
42764 <Argument name="id">
42767 A previously posted notification ID to remove.
42770 <Type name="NotificationId"/>
42774 <RaiseException name="WebAPIException">
42777 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
42780 with error type NotFoundError, if NotificationId is not found in the previously posted notifications.
42783 with error type SecurityError, if the application does not have the privilege to call this method.
42786 with error type UnknownError if any other error occurs.
42792 <Operation name="removeAll" id="::Notification::NotificationManager::removeAll">
42793 <webidl> void removeAll() raises(<ref>WebAPIException</ref>);</webidl>
42796 Removes all notifications that have been posted by the current application.
42805 http://tizen.org/privilege/notification
42808 tizen.notification.removeAll();
42810 console.log (err.name + ": " + err.message);
42815 <Type type="void"/>
42818 <RaiseException name="WebAPIException">
42821 with error type SecurityError, if the application does not have the privilege to call this method.
42824 with error type UnknownError if any other error occurs.
42830 <Operation name="get" id="::Notification::NotificationManager::get">
42831 <webidl> <ref>Notification</ref> get(<ref>NotificationId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
42834 Gets a notification that has previously been posted by the current application. Note that the obtaining notification's progressType is <em>PERCENTAGE</em> </brief>
42839 // Uses a variable for the previously posted notification
42840 // Saves notification ID for future use
42841 var myId = notification.id;
42843 var myNotification = tizen.notification.get(myId);
42845 console.log (err.name + ": " + err.message);
42850 <Type name="Notification"/>
42852 <Argument name="id">
42855 A previously posted notification ID.
42858 <Type name="NotificationId"/>
42862 <RaiseException name="WebAPIException">
42865 with error type NotFoundError, if NotificationId is not found in the previously posted notifications.
42868 with error type UnknownError if any other error occurs.
42874 <Operation name="getAll" id="::Notification::NotificationManager::getAll">
42875 <webidl> <ref>Notification</ref>[] getAll() raises(<ref>WebAPIException</ref>);</webidl>
42878 Gets all notifications that have previously been posted by the current application. Note that the obtaining notification's progressType is <em>PERCENTAGE</em> </brief>
42883 var notifications = tizen.notification.getAll();
42886 for ( index = 0; notifications.length > index; index++ )
42888 console.log(notifications[index].id);
42889 console.log(notifications[index].title);
42890 console.log(notifications[index].statusType);
42891 console.log(notifications[index].type);
42892 console.log(notifications[index].content);
42893 console.log(notifications[index].postedTime);
42894 console.log(notifications[index].iconPath);
42895 console.log(notifications[index].soundPath);
42896 console.log(notifications[index].vibration);
42897 console.log(notifications[index].appControl);
42900 console.log (err.name + ": " + err.message);
42904 <Type type="array">
42905 <Type name="Notification"/>
42909 <RaiseException name="WebAPIException">
42912 with error type UnknownError, if any other error occurs.
42919 <Interface name="Notification" id="::Notification::Notification">
42920 <webidl> [NoInterfaceObject] interface Notification {
42923 readonly attribute <ref>NotificationId</ref> id;
42925 readonly attribute <ref>NotificationType</ref> type;
42927 readonly attribute Date postedTime;
42929 attribute DOMString title;
42931 attribute DOMString? content;
42936 This interface offers common attributes to represent <em>Notification</em> object.
42942 <ExtendedAttributeList>
42943 <ExtendedAttribute name="NoInterfaceObject">
42944 <webidl>NoInterfaceObject</webidl>
42945 </ExtendedAttribute>
42946 </ExtendedAttributeList>
42947 <Attribute readonly="readonly" name="id" id="::Notification::Notification::id">
42948 <webidl> readonly attribute <ref>NotificationId</ref> id;</webidl>
42951 The Notification identifier. Before the notification is posted, this value is undefined.
42957 <Type name="NotificationId"/>
42959 <Attribute readonly="readonly" name="type" id="::Notification::Notification::type">
42960 <webidl> readonly attribute <ref>NotificationType</ref> type;</webidl>
42963 The Notification type.
42969 <Type name="NotificationType"/>
42971 <Attribute readonly="readonly" name="postedTime" id="::Notification::Notification::postedTime">
42972 <webidl> readonly attribute Date postedTime;</webidl>
42975 The time that the notification is posted. Before the notification is posted, this value is undefined.
42981 <Type type="Date"/>
42983 <Attribute name="title" id="::Notification::Notification::title">
42984 <webidl> attribute DOMString title;</webidl>
42987 The title to display in a notification.
42993 <Type type="DOMString"/>
42995 <Attribute name="content" id="::Notification::Notification::content">
42996 <webidl> attribute DOMString? content;</webidl>
42999 The content to display in a notification.
43005 <Type type="DOMString" nullable="nullable"/>
43008 <Dictionary name="StatusNotificationInit" id="::Notification::StatusNotificationInit">
43009 <webidl> dictionary StatusNotificationInit {
43010 DOMString? content;
43011 DOMString? iconPath;
43012 DOMString? soundPath;
43013 boolean? vibration;
43014 <ref>ApplicationControl</ref>? appControl;
43015 <ref>ApplicationId</ref>? appId;
43016 <ref>NotificationProgressType</ref>? progressType;
43017 unsigned long? progressValue;
43019 DOMString? subIconPath;
43020 <ref>NotificationDetailInfo</ref>[]? detailInfo;
43021 DOMString? ledColor;
43022 unsigned long ledOnPeriod;
43023 unsigned long ledOffPeriod;
43024 DOMString? backgroundImagePath;
43025 DOMString[]? thumbnails;
43029 The properties of StatusNotification, to pass a constructor.
43035 <DictionaryMember name="content" id="::Notification::StatusNotificationInit::content">
43036 <webidl> DOMString? content;</webidl>
43037 <Type type="DOMString" nullable="nullable"/>
43038 </DictionaryMember>
43039 <DictionaryMember name="iconPath" id="::Notification::StatusNotificationInit::iconPath">
43040 <webidl> DOMString? iconPath;</webidl>
43041 <Type type="DOMString" nullable="nullable"/>
43042 </DictionaryMember>
43043 <DictionaryMember name="soundPath" id="::Notification::StatusNotificationInit::soundPath">
43044 <webidl> DOMString? soundPath;</webidl>
43045 <Type type="DOMString" nullable="nullable"/>
43046 </DictionaryMember>
43047 <DictionaryMember name="vibration" id="::Notification::StatusNotificationInit::vibration">
43048 <webidl> boolean? vibration;</webidl>
43049 <Type type="boolean" nullable="nullable"/>
43050 </DictionaryMember>
43051 <DictionaryMember name="appControl" id="::Notification::StatusNotificationInit::appControl">
43052 <webidl> <ref>ApplicationControl</ref>? appControl;</webidl>
43053 <Type name="ApplicationControl" nullable="nullable"/>
43054 </DictionaryMember>
43055 <DictionaryMember name="appId" id="::Notification::StatusNotificationInit::appId">
43056 <webidl> <ref>ApplicationId</ref>? appId;</webidl>
43057 <Type name="ApplicationId" nullable="nullable"/>
43058 </DictionaryMember>
43059 <DictionaryMember name="progressType" id="::Notification::StatusNotificationInit::progressType">
43060 <webidl> <ref>NotificationProgressType</ref>? progressType;</webidl>
43061 <Type name="NotificationProgressType" nullable="nullable"/>
43062 </DictionaryMember>
43063 <DictionaryMember name="progressValue" id="::Notification::StatusNotificationInit::progressValue">
43064 <webidl> unsigned long? progressValue;</webidl>
43065 <Type type="unsigned long" nullable="nullable"/>
43066 </DictionaryMember>
43067 <DictionaryMember name="number" id="::Notification::StatusNotificationInit::number">
43068 <webidl> long? number;</webidl>
43069 <Type type="long" nullable="nullable"/>
43070 </DictionaryMember>
43071 <DictionaryMember name="subIconPath" id="::Notification::StatusNotificationInit::subIconPath">
43072 <webidl> DOMString? subIconPath;</webidl>
43073 <Type type="DOMString" nullable="nullable"/>
43074 </DictionaryMember>
43075 <DictionaryMember name="detailInfo" id="::Notification::StatusNotificationInit::detailInfo">
43076 <webidl> <ref>NotificationDetailInfo</ref>[]? detailInfo;</webidl>
43077 <Type type="array" nullable="nullable">
43078 <Type name="NotificationDetailInfo"/>
43080 </DictionaryMember>
43081 <DictionaryMember name="ledColor" id="::Notification::StatusNotificationInit::ledColor">
43082 <webidl> DOMString? ledColor;</webidl>
43083 <Type type="DOMString" nullable="nullable"/>
43084 </DictionaryMember>
43085 <DictionaryMember name="ledOnPeriod" id="::Notification::StatusNotificationInit::ledOnPeriod">
43086 <webidl> unsigned long ledOnPeriod;</webidl>
43087 <Type type="unsigned long"/>
43088 </DictionaryMember>
43089 <DictionaryMember name="ledOffPeriod" id="::Notification::StatusNotificationInit::ledOffPeriod">
43090 <webidl> unsigned long ledOffPeriod;</webidl>
43091 <Type type="unsigned long"/>
43092 </DictionaryMember>
43093 <DictionaryMember name="backgroundImagePath" id="::Notification::StatusNotificationInit::backgroundImagePath">
43094 <webidl> DOMString? backgroundImagePath;</webidl>
43095 <Type type="DOMString" nullable="nullable"/>
43096 </DictionaryMember>
43097 <DictionaryMember name="thumbnails" id="::Notification::StatusNotificationInit::thumbnails">
43098 <webidl> DOMString[]? thumbnails;</webidl>
43099 <Type type="array" nullable="nullable">
43100 <Type type="DOMString"/>
43102 </DictionaryMember>
43104 <Interface name="StatusNotification" id="::Notification::StatusNotification">
43105 <webidl> [Constructor(<ref>StatusNotificationType</ref> statusType, DOMString title, optional <ref>StatusNotificationInit</ref>? notificationInitDict)]
43108 interface StatusNotification : <ref>Notification</ref> {
43110 readonly attribute <ref>StatusNotificationType</ref> statusType;
43112 attribute DOMString? iconPath;
43114 attribute DOMString? subIconPath;
43116 attribute long? number;
43118 attribute <ref>NotificationDetailInfo</ref>[]? detailInfo;
43120 attribute DOMString? ledColor;
43122 attribute unsigned long ledOnPeriod;
43124 attribute unsigned long ledOffPeriod;
43126 attribute DOMString? backgroundImagePath;
43128 attribute DOMString[]? thumbnails;
43130 attribute DOMString? soundPath;
43132 attribute boolean vibration;
43134 attribute <ref>ApplicationControl</ref>? appControl;
43136 attribute <ref>ApplicationId</ref>? appId;
43138 attribute <ref>NotificationProgressType</ref> progressType;
43140 attribute unsigned long? progressValue;
43144 This interface represents status notification and offers additional attributes to represent notification displayed in notification tray.
43148 All notification must have a title attribute.
43155 <ExtendedAttributeList>
43156 <ExtendedAttribute name="Constructor">
43157 <webidl>Constructor(<ref>StatusNotificationType</ref> statusType, DOMString title, optional <ref>StatusNotificationInit</ref>? notificationInitDict)</webidl>
43159 <Argument name="statusType">
43160 <Type name="StatusNotificationType"/>
43162 <Argument name="title">
43163 <Type type="DOMString"/>
43165 <Argument optional="optional" name="notificationInitDict">
43166 <Type name="StatusNotificationInit" nullable="nullable"/>
43169 </ExtendedAttribute>
43170 </ExtendedAttributeList>
43171 <InterfaceInheritance>
43172 <Name name="Notification"/>
43173 </InterfaceInheritance>
43174 <Attribute readonly="readonly" name="statusType" id="::Notification::StatusNotification::statusType">
43175 <webidl> readonly attribute <ref>StatusNotificationType</ref> statusType;</webidl>
43178 The status notification type.
43184 <Type name="StatusNotificationType"/>
43186 <Attribute name="iconPath" id="::Notification::StatusNotification::iconPath">
43187 <webidl> attribute DOMString? iconPath;</webidl>
43190 The icon path to display in the notification.
43196 <Type type="DOMString" nullable="nullable"/>
43198 <Attribute name="subIconPath" id="::Notification::StatusNotification::subIconPath">
43199 <webidl> attribute DOMString? subIconPath;</webidl>
43202 The sub icon path to display in the notification.
43208 <Type type="DOMString" nullable="nullable"/>
43210 <Attribute name="number" id="::Notification::StatusNotification::number">
43211 <webidl> attribute long? number;</webidl>
43214 The number of events to display in the notification.
43220 <Type type="long" nullable="nullable"/>
43222 <Attribute name="detailInfo" id="::Notification::StatusNotification::detailInfo">
43223 <webidl> attribute <ref>NotificationDetailInfo</ref>[]? detailInfo;</webidl>
43226 Appends lines of the detail information to the notification.
43227 This attribute is available in simple status notification.
43228 By default, this attribute is initialized with an empty array.
43229 The maximum number of detail information elements in the array is 2.
43235 <Type type="array" nullable="nullable">
43236 <Type name="NotificationDetailInfo"/>
43239 <Attribute name="ledColor" id="::Notification::StatusNotification::ledColor">
43240 <webidl> attribute DOMString? ledColor;</webidl>
43243 Sets the notification LED indicator color property.
43244 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.
43245 The LED indicator color will show its a close approximation.
43246 LED will only light on when screen is off. To turn the LED off, set "#000000" or null to ledColor.
43247 This method has effects when the device has notification LED.
43250 var notificationDict = {
43251 content : "This is a simple notification.",
43252 iconPath : "images/image1.jpg",
43253 soundPath : "music/Over the horizon.mp3",
43255 ledColor : "#FFFF00",
43257 ledOffPeriod : 500 };
43259 var notification = new tizen.StatusNotification("SIMPLE",
43260 "Simple notification", notificationDict);
43262 tizen.notification.post(notification);
43264 console.log (err.name + ": " + err.message);
43271 <Type type="DOMString" nullable="nullable"/>
43273 <Attribute name="ledOnPeriod" id="::Notification::StatusNotification::ledOnPeriod">
43274 <webidl> attribute unsigned long ledOnPeriod;</webidl>
43277 The milliseconds for which the light is on
43278 The light continuously toggles on (ledOnPeriod) and off (ledOffPeriod).
43279 By default, this attribute is set to 0
43285 <Type type="unsigned long"/>
43287 <Attribute name="ledOffPeriod" id="::Notification::StatusNotification::ledOffPeriod">
43288 <webidl> attribute unsigned long ledOffPeriod;</webidl>
43291 The milliseconds for which the light is off
43292 By default, this attribute is set to 0
43298 <Type type="unsigned long"/>
43300 <Attribute name="backgroundImagePath" id="::Notification::StatusNotification::backgroundImagePath">
43301 <webidl> attribute DOMString? backgroundImagePath;</webidl>
43304 The image path to use as the background of the notification.
43305 This attribute is available on simple or thumbnail status notifications.
43311 <Type type="DOMString" nullable="nullable"/>
43313 <Attribute name="thumbnails" id="::Notification::StatusNotification::thumbnails">
43314 <webidl> attribute DOMString[]? thumbnails;</webidl>
43317 The image paths associated with the thumbnail status notification.
43318 By default, this attribute is initialized with an empty array.
43319 The maximum number of thumbnail path elements in the array is 4.
43325 <Type type="array" nullable="nullable">
43326 <Type type="DOMString"/>
43329 <Attribute name="soundPath" id="::Notification::StatusNotification::soundPath">
43330 <webidl> attribute DOMString? soundPath;</webidl>
43333 The path of a sound file to play when the notification is shown.
43339 <Type type="DOMString" nullable="nullable"/>
43341 <Attribute name="vibration" id="::Notification::StatusNotification::vibration">
43342 <webidl> attribute boolean vibration;</webidl>
43345 Holds whether to vibrate when the notification is shown. By default, this attribute is set to false.
43351 <Type type="boolean"/>
43353 <Attribute name="appControl" id="::Notification::StatusNotification::appControl">
43354 <webidl> attribute <ref>ApplicationControl</ref>? appControl;</webidl>
43357 Holds the application control to launch an application when the notification is selected from the notification tray.
43363 <Type name="ApplicationControl" nullable="nullable"/>
43365 <Attribute name="appId" id="::Notification::StatusNotification::appId">
43366 <webidl> attribute <ref>ApplicationId</ref>? appId;</webidl>
43369 Holds the application ID to launch when the notification is selected from the notification tray.
43376 // Gets a current application information with tizen.application.getAppInfo
43377 var myappInfo = tizen.application.getAppInfo();
43379 var notificationDict = {
43380 content : "This is a simple notification.",
43381 iconPath : "images/image1.jpg",
43382 soundPath : "music/Over the horizon.mp3",
43384 appId : myappInfo.id };
43386 var notification = new tizen.StatusNotification("SIMPLE",
43387 "Simple notification", notificationDict);
43389 tizen.notification.post(notification);
43391 console.log (err.name + ": " + err.message);
43395 <Type name="ApplicationId" nullable="nullable"/>
43397 <Attribute name="progressType" id="::Notification::StatusNotification::progressType">
43398 <webidl> attribute <ref>NotificationProgressType</ref> progressType;</webidl>
43401 Defines the type for an ongoing notification's progress.
43402 By default, this attribute is set to PERCENTAGE.
43408 <Type name="NotificationProgressType"/>
43410 <Attribute name="progressValue" id="::Notification::StatusNotification::progressValue">
43411 <webidl> attribute unsigned long? progressValue;</webidl>
43414 Defines the current notification progress value (<em>PERCENTAGE</em> or <em>BYTE</em>), depending on the <em>progressType</em> </brief>
43417 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
43418 If 0, the indeterminate progressbar will be shown.
43419 This attribute is only available for StatusNotifcation of type <em>PROGRESS</em>.
43422 Application should keep the progress value for its job because
43423 the saved value in the notification status tray would be different from
43424 exact progress value.
43427 Range of <em>progressValue</em>: percent (0 to 100).
43431 var appControl = new tizen.ApplicationControl(
43432 "http://tizen.org/appcontrol/operation/create_content",
43434 "image/jpg",
43437 var notificationDict = {
43438 content : "This is a progress notificaiton.",
43439 iconPath : "images/image2.jpg",
43440 soundPath : "music/Over the horizon.mp3",
43442 appControl : appControl,
43443 progressValue : 20};
43444 // Constructs the progress notification
43445 var notification = new tizen.StatusNotification("PROGRESS",
43446 "Progress notification", notificationDict);
43447 // Posts the notification
43448 tizen.notification.post(notification);
43450 // Updates the progress value of the notification
43451 notification.progressValue = 59;
43452 tizen.notification.update(notification);
43456 console.log (err.name + ": " + err.message);
43463 <Type type="unsigned long" nullable="nullable"/>
43466 <Interface name="NotificationDetailInfo" id="::Notification::NotificationDetailInfo">
43467 <webidl>[Constructor(DOMString mainText, optional DOMString? subText)]
43468 interface NotificationDetailInfo {
43469 attribute DOMString mainText;
43471 attribute DOMString? subText;
43475 The NotificationDetailInfo object that contains the detail information to the notification.
43480 <Code> var detailInfo1 = new tizen.NotificationDetailInfo('Missed Call from James', 'Feb 11 2013');
43481 notification.detailInfo = [detailInfo1];
43484 <ExtendedAttributeList>
43485 <ExtendedAttribute name="Constructor">
43486 <webidl>Constructor(DOMString mainText, optional DOMString? subText)</webidl>
43488 <Argument name="mainText">
43489 <Type type="DOMString"/>
43491 <Argument optional="optional" name="subText">
43492 <Type type="DOMString" nullable="nullable"/>
43495 </ExtendedAttribute>
43496 </ExtendedAttributeList>
43497 <Attribute name="mainText" id="::Notification::NotificationDetailInfo::mainText">
43498 <webidl> attribute DOMString mainText;</webidl>
43501 The main content of the detail information.
43502 This attribute is available on simple status notifications.
43508 <Type type="DOMString"/>
43510 <Attribute name="subText" id="::Notification::NotificationDetailInfo::subText">
43511 <webidl> attribute DOMString? subText;</webidl>
43514 The secondary content of the detail information.
43518 By default, this attribute is set to null.
43525 <Type type="DOMString" nullable="nullable"/>
43529 <Module name="Package" id="::Package">
43530 <webidl>module Package {
43533 typedef DOMString PackageId;
43536 [NoInterfaceObject] interface PackageManagerObject {
43537 readonly attribute <ref>PackageManager</ref> package;
43539 <ref>Tizen</ref> implements <ref>PackageManagerObject</ref>;
43542 [NoInterfaceObject] interface PackageManager {
43545 void install(DOMString path,
43546 <ref>PackageProgressCallback</ref> progressCallback,
43547 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
43550 void uninstall(<ref>PackageId</ref> id,
43551 <ref>PackageProgressCallback</ref> progressCallback,
43552 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
43557 void getPackagesInfo(<ref>PackageInformationArraySuccessCallback</ref> successCallback,
43558 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
43561 <ref>PackageInformation</ref> getPackageInfo(optional <ref>PackageId</ref>? id) raises(<ref>WebAPIException</ref>);
43564 void setPackageInfoEventListener(<ref>PackageInformationEventCallback</ref> eventCallback) raises(<ref>WebAPIException</ref>);
43567 void unsetPackageInfoEventListener() raises(<ref>WebAPIException</ref>);
43572 [NoInterfaceObject] interface PackageInformation {
43574 readonly attribute <ref>PackageId</ref> id;
43577 readonly attribute DOMString name;
43580 readonly attribute DOMString iconPath;
43583 readonly attribute DOMString version;
43586 readonly attribute long totalSize;
43589 readonly attribute long dataSize;
43592 readonly attribute Date lastModified;
43595 readonly attribute DOMString author;
43598 readonly attribute DOMString description;
43601 readonly attribute <ref>ApplicationId</ref>[] appIds;
43606 [Callback=FunctionOnly, NoInterfaceObject] interface PackageInformationArraySuccessCallback {
43609 void onsuccess(<ref>PackageInformation</ref>[] informationArray);
43613 [Callback, NoInterfaceObject] interface PackageProgressCallback {
43616 void onprogress(<ref>PackageId</ref> id, short progress);
43619 void oncomplete(<ref>PackageId</ref> id);
43623 [Callback, NoInterfaceObject] interface PackageInformationEventCallback {
43626 void oninstalled(<ref>PackageInformation</ref> info);
43629 void onupdated(<ref>PackageInformation</ref> info);
43632 void onuninstalled(<ref>PackageId</ref> id);
43638 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.
43639 For more information on the Package features, see <a href="../../org.tizen.web.appprogramming/html/guide/app_guide/package.htm">Package Guide</a>.
43645 <Typedef name="PackageId" id="::Package::PackageId">
43646 <webidl> typedef DOMString PackageId;</webidl>
43649 A unique ID for an installed package.
43655 <Type type="DOMString"/>
43657 <Interface name="PackageManagerObject" id="::Package::PackageManagerObject">
43658 <webidl> [NoInterfaceObject] interface PackageManagerObject {
43659 readonly attribute <ref>PackageManager</ref> package;
43663 This interface defines what is instantiated by the <em>Tizen </em>object from the Tizen Platform.
43667 There is a <em>tizen.package </em>object that allows access to Package API functionality.
43674 <ExtendedAttributeList>
43675 <ExtendedAttribute name="NoInterfaceObject">
43676 <webidl>NoInterfaceObject</webidl>
43677 </ExtendedAttribute>
43678 </ExtendedAttributeList>
43679 <Attribute readonly="readonly" name="package" id="::Package::PackageManagerObject::package">
43680 <webidl> readonly attribute <ref>PackageManager</ref> package;</webidl>
43681 <Type name="PackageManager"/>
43684 <Implements name1="Tizen" name2="PackageManagerObject">
43685 <webidl> <ref>Tizen</ref> implements <ref>PackageManagerObject</ref>;</webidl>
43687 <Interface name="PackageManager" id="::Package::PackageManager">
43688 <webidl> [NoInterfaceObject] interface PackageManager {
43691 void install(DOMString path,
43692 <ref>PackageProgressCallback</ref> progressCallback,
43693 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
43696 void uninstall(<ref>PackageId</ref> id,
43697 <ref>PackageProgressCallback</ref> progressCallback,
43698 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
43703 void getPackagesInfo(<ref>PackageInformationArraySuccessCallback</ref> successCallback,
43704 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
43707 <ref>PackageInformation</ref> getPackageInfo(optional <ref>PackageId</ref>? id) raises(<ref>WebAPIException</ref>);
43710 void setPackageInfoEventListener(<ref>PackageInformationEventCallback</ref> eventCallback) raises(<ref>WebAPIException</ref>);
43713 void unsetPackageInfoEventListener() raises(<ref>WebAPIException</ref>);
43718 This interface defines the package manager.
43724 <ExtendedAttributeList>
43725 <ExtendedAttribute name="NoInterfaceObject">
43726 <webidl>NoInterfaceObject</webidl>
43727 </ExtendedAttribute>
43728 </ExtendedAttributeList>
43729 <Operation name="install" id="::Package::PackageManager::install">
43730 <webidl> void install(DOMString path,
43731 <ref>PackageProgressCallback</ref> progressCallback,
43732 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
43735 Installs a package with a specified package path on a device.
43739 This API provides a way to notify the progress and completion of an installation request through PackageProgressCallback.
43742 The <em>ErrorCallback() </em>is launched with these error types:
43746 NotFoundError - If the package is not found in the specified path. </li>
43748 UnknownError - If it is not allowed to install the package by platform or any other platform error occurs. </li>
43758 http://tizen.org/privilege/packagemanager.install
43761 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.
43763 <Code> var onInstallation = {
43764 onprogress: function(packageId, percentage) {
43765 console.log("On installation(" + packageId + ") : progress(" + percentage + ")");
43767 oncomplete: function(packageId) {
43768 console.log("Installation(" + packageId + ") Complete");
43772 var onError = function (err) {
43773 console.log("Error occurred on installation : " + err.name);
43776 // Let's assume that "test.wgt" file is exist in the downloads directory
43777 tizen.filesystem.resolve("downloads/test.wgt",
43779 console.log("file path : " + file.path);
43780 tizen.package.install(file.toURI(), onInstallation, onError);
43783 console.log("Error occurred on resolve : " + err.name);
43789 <Type type="void"/>
43791 <Argument name="path">
43794 The package path to install
43797 <Type type="DOMString"/>
43799 <Argument name="progressCallback">
43802 The method to invoke when the installation is in progress or has been completed
43805 <Type name="PackageProgressCallback"/>
43807 <Argument optional="optional" name="errorCallback">
43810 The method to invoke when an error occurs
43813 <Type name="ErrorCallback" nullable="nullable"/>
43817 <RaiseException name="WebAPIException">
43820 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
43823 with error type SecurityError, if the application does not have the privilege to call this method.
43829 <Operation name="uninstall" id="::Package::PackageManager::uninstall">
43830 <webidl> void uninstall(<ref>PackageId</ref> id,
43831 <ref>PackageProgressCallback</ref> progressCallback,
43832 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
43835 Uninstalls the package with a specified package ID.
43839 This API provides a way to notify about the progress and completion of an uninstallation request through PackageProgressCallback.
43842 The <em>ErrorCallback() </em>is launched with these error types:
43846 NotFoundError - If the package is not found with specified ID. </li>
43848 UnknownError - If it is not allowed to uninstall the package from the platform or any other platform error occurs. </li>
43858 http://tizen.org/privilege/packagemanager.install
43861 Some preloaded packages cannot be uninstalled. In this case, ErrorCallback with UnKnownError type will be launched.
43863 <Code> var onUninstallation = {
43864 onprogress: function(packageId, percentage) {
43865 console.log("On Uninstallation(" + packageId + ") : progress(" + percentage + ")");
43867 oncomplete: function(packageId) {
43868 console.log("Uninstallation(" + packageId + ") Complete");
43872 var onError = function (err) {
43873 console.log("Error occurred on installation : " + err.name);
43876 // Let's assume that the package id to uninstall is "testapp001"
43877 tizen.package.uninstall("testapp001", onUninstallation, onError);
43880 <Type type="void"/>
43882 <Argument name="id">
43885 The package ID to uninstall
43888 <Type name="PackageId"/>
43890 <Argument name="progressCallback">
43893 The method to invoke when uninstallation is in progress or has been completed
43896 <Type name="PackageProgressCallback"/>
43898 <Argument optional="optional" name="errorCallback">
43901 The method to invoke when an error occurs
43904 <Type name="ErrorCallback" nullable="nullable"/>
43908 <RaiseException name="WebAPIException">
43911 with error type TypeMismatchError, if an input parameter is not compatible with the expected type for that parameter.
43914 with error type SecurityError, if the application does not have the privilege to call this method.
43920 <Operation name="getPackagesInfo" id="::Package::PackageManager::getPackagesInfo">
43921 <webidl> void getPackagesInfo(<ref>PackageInformationArraySuccessCallback</ref> successCallback,
43922 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
43925 Gets information of the installed packages.
43929 The result contains the snapshots of the installed packages information.
43932 The <em>errorCallback()</em> is launched with this error type:
43936 UnknownError - If any other platform error occurs. </li>
43946 http://tizen.org/privilege/package.info
43948 <Code> function onListInstalledPackages(packages) {
43949 for (var i = 0; i < packages.length; i++) {
43950 console.log("Package id["+i+"] : " +packages[i].id);
43954 tizen.package.getPackagesInfo(
43955 onListInstalledPackages,
43956 function (err) {console.log("Can't obtain packages list" + err.name);});
43959 <Type type="void"/>
43961 <Argument name="successCallback">
43964 The method to call when an invocation ends successfully
43967 <Type name="PackageInformationArraySuccessCallback"/>
43969 <Argument optional="optional" name="errorCallback">
43972 The method to call when an error occurs
43975 <Type name="ErrorCallback" nullable="nullable"/>
43979 <RaiseException name="WebAPIException">
43982 with error type TypeMismatchError, if an input parameter is not compatible with the expected type for that parameter.
43985 with error type SecurityError, if the application does not have the privilege to call this method.
43991 <Operation name="getPackageInfo" id="::Package::PackageManager::getPackageInfo">
43992 <webidl> <ref>PackageInformation</ref> getPackageInfo(optional <ref>PackageId</ref>? id) raises(<ref>WebAPIException</ref>);</webidl>
43995 Gets information of an installed package.
43999 If the ID is set to <var>null</var> or not set at all, it returns package information of the current application.
44000 The list of installed packages and their package IDs is obtained using <em>getPackagesInfo()</em>.
44010 http://tizen.org/privilege/package.info
44012 <Code> var packageInfo = tizen.package.getPackageInfo(null);
44014 console.log("Current Package ID : " + packageInfo.id);
44017 <Type name="PackageInformation">
44020 PackageInformation The information of a package
44025 <Argument optional="optional" name="id">
44028 A string representing package ID. If the ID is not provided, the package information of the calling application is returned.
44031 <Type name="PackageId" nullable="nullable"/>
44035 <RaiseException name="WebAPIException">
44038 with error type TypeMismatchError, if an input parameter is not compatible with the expected type for that parameter.
44041 with error type SecurityError, if the application does not have the privilege to call this method.
44044 with error type NotFoundError, if the package with the specified ID is not found.
44047 with error type UnknownError, if the package information cannot be retrieved because of a platform error.
44053 <Operation name="setPackageInfoEventListener" id="::Package::PackageManager::setPackageInfoEventListener">
44054 <webidl> void setPackageInfoEventListener(<ref>PackageInformationEventCallback</ref> eventCallback) raises(<ref>WebAPIException</ref>);</webidl>
44057 Sets a listener to receive notifications for any changes made to the list of installed packages.
44061 This method sets a <em>PackageInformationEventCallback</em> type callback that is triggered when a package is installed, removed or updated.
44064 The callback lasts until <em>unsetPackageInfoEventListener()</em> method is called.
44074 http://tizen.org/privilege/package.info
44076 <Code> var packageEventCallback = {
44077 oninstalled: function(packageInfo) {
44078 console.log('The package ' + packageInfo.name + ' is installed');
44080 onupdated: function(packageInfo) {
44081 console.log('The package ' + packageInfo.name + ' is updated');
44083 onuninstalled: function(packageId) {
44084 console.log('The package ' + packageId + ' is uninstalled');
44088 tizen.package.setPackageInfoEventListener(packageEventCallback);
44091 <Type type="void"/>
44093 <Argument name="eventCallback">
44096 The method to be called when any change is made to the list of installed packages.
44099 <Type name="PackageInformationEventCallback"/>
44103 <RaiseException name="WebAPIException">
44106 with error type TypeMismatchError, if an input parameter is not compatible with the expected type for that parameter.
44109 with error type SecurityError, if the application does not have the privilege to call this method.
44112 with error type UnknownError, if the package list change event cannot be generated because of a platform error.
44118 <Operation name="unsetPackageInfoEventListener" id="::Package::PackageManager::unsetPackageInfoEventListener">
44119 <webidl> void unsetPackageInfoEventListener() raises(<ref>WebAPIException</ref>);</webidl>
44122 Unsets the listener to stop receiving package notifications.
44131 http://tizen.org/privilege/package.info
44133 <Code> tizen.package.unsetPackageInfoEventListener();
44136 <Type type="void"/>
44139 <RaiseException name="WebAPIException">
44142 with error type SecurityError, if the application does not have the privilege to call this method.
44145 with error type UnknownError, if the listener removal request fails because of a platform error.
44152 <Interface name="PackageInformation" id="::Package::PackageInformation">
44153 <webidl> [NoInterfaceObject] interface PackageInformation {
44155 readonly attribute <ref>PackageId</ref> id;
44158 readonly attribute DOMString name;
44161 readonly attribute DOMString iconPath;
44164 readonly attribute DOMString version;
44167 readonly attribute long totalSize;
44170 readonly attribute long dataSize;
44173 readonly attribute Date lastModified;
44176 readonly attribute DOMString author;
44179 readonly attribute DOMString description;
44182 readonly attribute <ref>ApplicationId</ref>[] appIds;
44187 This interface defines the general information available to an installed package.
44193 <ExtendedAttributeList>
44194 <ExtendedAttribute name="NoInterfaceObject">
44195 <webidl>NoInterfaceObject</webidl>
44196 </ExtendedAttribute>
44197 </ExtendedAttributeList>
44198 <Attribute readonly="readonly" name="id" id="::Package::PackageInformation::id">
44199 <webidl> readonly attribute <ref>PackageId</ref> id;</webidl>
44202 An attribute to store the identifier of a package.
44208 <Type name="PackageId"/>
44210 <Attribute readonly="readonly" name="name" id="::Package::PackageInformation::name">
44211 <webidl> readonly attribute DOMString name;</webidl>
44214 An attribute to store the package name.
44220 <Type type="DOMString"/>
44222 <Attribute readonly="readonly" name="iconPath" id="::Package::PackageInformation::iconPath">
44223 <webidl> readonly attribute DOMString iconPath;</webidl>
44226 An attribute to store the icon path of a package.
44232 <Type type="DOMString"/>
44234 <Attribute readonly="readonly" name="version" id="::Package::PackageInformation::version">
44235 <webidl> readonly attribute DOMString version;</webidl>
44238 An attribute to store the package version.
44244 <Type type="DOMString"/>
44246 <Attribute readonly="readonly" name="totalSize" id="::Package::PackageInformation::totalSize">
44247 <webidl> readonly attribute long totalSize;</webidl>
44250 An attribute to store the total installed size(package + data) of a package.
44256 <Type type="long"/>
44258 <Attribute readonly="readonly" name="dataSize" id="::Package::PackageInformation::dataSize">
44259 <webidl> readonly attribute long dataSize;</webidl>
44262 An attribute to store the current data size of a package.
44268 <Type type="long"/>
44270 <Attribute readonly="readonly" name="lastModified" id="::Package::PackageInformation::lastModified">
44271 <webidl> readonly attribute Date lastModified;</webidl>
44274 An attribute to store the latest installed or updated time of a package.
44280 <Type type="Date"/>
44282 <Attribute readonly="readonly" name="author" id="::Package::PackageInformation::author">
44283 <webidl> readonly attribute DOMString author;</webidl>
44286 An attribute to store the author of a package.
44292 <Type type="DOMString"/>
44294 <Attribute readonly="readonly" name="description" id="::Package::PackageInformation::description">
44295 <webidl> readonly attribute DOMString description;</webidl>
44298 An attribute to store the package description.
44304 <Type type="DOMString"/>
44306 <Attribute readonly="readonly" name="appIds" id="::Package::PackageInformation::appIds">
44307 <webidl> readonly attribute <ref>ApplicationId</ref>[] appIds;</webidl>
44310 An attribute to store the application ID list of a package.
44316 <Type type="array">
44317 <Type name="ApplicationId"/>
44321 <Interface name="PackageInformationArraySuccessCallback" id="::Package::PackageInformationArraySuccessCallback">
44322 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface PackageInformationArraySuccessCallback {
44325 void onsuccess(<ref>PackageInformation</ref>[] informationArray);
44329 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.
44333 It is used in <em>tizen.package.getPackagesInfo()</em>.
44340 <ExtendedAttributeList>
44341 <ExtendedAttribute name="Callback" value="FunctionOnly">
44342 <webidl>Callback</webidl>
44343 </ExtendedAttribute>
44344 <ExtendedAttribute name="NoInterfaceObject">
44345 <webidl> NoInterfaceObject</webidl>
44346 </ExtendedAttribute>
44347 </ExtendedAttributeList>
44348 <Operation name="onsuccess" id="::Package::PackageInformationArraySuccessCallback::onsuccess">
44349 <webidl> void onsuccess(<ref>PackageInformation</ref>[] informationArray);</webidl>
44352 Called when the asynchronous call completes successfully.
44358 <Type type="void"/>
44360 <Argument name="informationArray">
44363 A list of installed packages information.
44366 <Type type="array">
44367 <Type name="PackageInformation"/>
44373 <Interface name="PackageProgressCallback" id="::Package::PackageProgressCallback">
44374 <webidl> [Callback, NoInterfaceObject] interface PackageProgressCallback {
44377 void onprogress(<ref>PackageId</ref> id, short progress);
44380 void oncomplete(<ref>PackageId</ref> id);
44384 This callback interface specifies subscriptions for any notification on the progress or completion of requests.
44390 <ExtendedAttributeList>
44391 <ExtendedAttribute name="Callback">
44392 <webidl>Callback</webidl>
44393 </ExtendedAttribute>
44394 <ExtendedAttribute name="NoInterfaceObject">
44395 <webidl> NoInterfaceObject</webidl>
44396 </ExtendedAttribute>
44397 </ExtendedAttributeList>
44398 <Operation name="onprogress" id="::Package::PackageProgressCallback::onprogress">
44399 <webidl> void onprogress(<ref>PackageId</ref> id, short progress);</webidl>
44402 Called while the request is in progress.
44408 <Type type="void"/>
44410 <Argument name="id">
44416 <Type name="PackageId"/>
44418 <Argument name="progress">
44421 The progress in percentage.
44424 <Type type="short"/>
44428 <Operation name="oncomplete" id="::Package::PackageProgressCallback::oncomplete">
44429 <webidl> void oncomplete(<ref>PackageId</ref> id);</webidl>
44432 Called while the request is completed.
44438 <Type type="void"/>
44440 <Argument name="id">
44446 <Type name="PackageId"/>
44451 <Interface name="PackageInformationEventCallback" id="::Package::PackageInformationEventCallback">
44452 <webidl> [Callback, NoInterfaceObject] interface PackageInformationEventCallback {
44455 void oninstalled(<ref>PackageInformation</ref> info);
44458 void onupdated(<ref>PackageInformation</ref> info);
44461 void onuninstalled(<ref>PackageId</ref> id);
44465 This callback interface specifies methods that are invoked when a package is installed, updated, or uninstalled.
44471 <ExtendedAttributeList>
44472 <ExtendedAttribute name="Callback">
44473 <webidl>Callback</webidl>
44474 </ExtendedAttribute>
44475 <ExtendedAttribute name="NoInterfaceObject">
44476 <webidl> NoInterfaceObject</webidl>
44477 </ExtendedAttribute>
44478 </ExtendedAttributeList>
44479 <Operation name="oninstalled" id="::Package::PackageInformationEventCallback::oninstalled">
44480 <webidl> void oninstalled(<ref>PackageInformation</ref> info);</webidl>
44483 Called when a package is installed.
44489 <Type type="void"/>
44491 <Argument name="info">
44494 The information of the installed package
44497 <Type name="PackageInformation"/>
44501 <Operation name="onupdated" id="::Package::PackageInformationEventCallback::onupdated">
44502 <webidl> void onupdated(<ref>PackageInformation</ref> info);</webidl>
44505 Called when a package is updated.
44511 <Type type="void"/>
44513 <Argument name="info">
44516 The information of the updated package
44519 <Type name="PackageInformation"/>
44523 <Operation name="onuninstalled" id="::Package::PackageInformationEventCallback::onuninstalled">
44524 <webidl> void onuninstalled(<ref>PackageId</ref> id);</webidl>
44527 Called when a package is uninstalled.
44533 <Type type="void"/>
44535 <Argument name="id">
44538 The ID of the uninstalled package
44541 <Type name="PackageId"/>
44547 <Module name="Power" id="::Power">
44548 <webidl>module Power {
44550 enum PowerResource { "SCREEN", "CPU" };
44552 enum PowerScreenState { "SCREEN_OFF", "SCREEN_DIM", "SCREEN_NORMAL", "SCREEN_BRIGHT" };
44554 enum PowerCpuState { "CPU_AWAKE" };
44556 typedef (<ref>PowerScreenState</ref> or <ref>PowerCpuState</ref>) PowerState;
44558 [NoInterfaceObject] interface PowerManagerObject {
44559 readonly attribute <ref>PowerManager</ref> power;
44561 <ref>Tizen</ref> implements <ref>PowerManagerObject</ref>;
44563 [NoInterfaceObject] interface PowerManager {
44564 void request(<ref>PowerResource</ref> resource, <ref>PowerState</ref> state) raises(<ref>WebAPIException</ref>);
44566 void release(<ref>PowerResource</ref> resource) raises(<ref>WebAPIException</ref>);
44568 void setScreenStateChangeListener(<ref>ScreenStateChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);
44570 void unsetScreenStateChangeListener() raises(<ref>WebAPIException</ref>);
44572 double getScreenBrightness() raises(<ref>WebAPIException</ref>);
44574 void setScreenBrightness(double brightness) raises(<ref>WebAPIException</ref>);
44576 boolean isScreenOn() raises(<ref>WebAPIException</ref>);
44578 void restoreScreenBrightness() raises(<ref>WebAPIException</ref>);
44580 void turnScreenOn() raises(<ref>WebAPIException</ref>);
44582 void turnScreenOff() raises(<ref>WebAPIException</ref>);
44585 [Callback=FunctionOnly, NoInterfaceObject] interface ScreenStateChangeCallback {
44586 void onchanged(<ref>PowerScreenState</ref> previousState, <ref>PowerScreenState</ref> changedState);
44592 This API provides support for requesting power management related resource states.
44596 For more information on the Power features, see <a href="../../org.tizen.web.appprogramming/html/guide/sys_guide/power.htm">Power Guide</a>.
44603 <Enum name="PowerResource" id="::Power::PowerResource">
44604 <webidl> enum PowerResource { "SCREEN", "CPU" };</webidl>
44607 An enumerator that defines power resources with values aligned with <em>SystemInfo </em>property values.
44611 We support screen and cpu resources for now.
44612 Supported power resource states are provided in PowerScreenState and PowerCpuState enums respectively prefixed by the corresponding resource type.
44619 <EnumValue stringvalue="SCREEN">
44620 <webidl> "SCREEN</webidl>
44622 <EnumValue stringvalue="CPU">
44623 <webidl> "CPU</webidl>
44626 <Enum name="PowerScreenState" id="::Power::PowerScreenState">
44627 <webidl> enum PowerScreenState { "SCREEN_OFF", "SCREEN_DIM", "SCREEN_NORMAL", "SCREEN_BRIGHT" };</webidl>
44630 An enumerator that indicates the power state for screen resource.
44634 The supported values are:
44638 SCREEN_OFF - This screen state cannot be requested but can only be used in the state change callback. </li>
44640 SCREEN_DIM - The minimal screen state is set to <em>DIM</em> and device does not change to <em>OFF</em> state automatically. </li>
44642 SCREEN_NORMAL - The minimal screen state is set to <em>NORMAL</em> and device does not change to <em>DIM</em> state automatically. </li>
44644 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>
44647 <em>DIM</em> state refers to the screen that the backlight is turned off
44648 <em>NORMAL</em> state refers to the default screen brightness that a user has configured for the device.
44649 <em>BRIGHT(Deprecated)</em> state refers to the maximum screen brightness that the device provides.
44650 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.
44654 SCREEN_BRIGHT is deprecated.
44660 <EnumValue stringvalue="SCREEN_OFF">
44661 <webidl> "SCREEN_OFF</webidl>
44663 <EnumValue stringvalue="SCREEN_DIM">
44664 <webidl> "SCREEN_DIM</webidl>
44666 <EnumValue stringvalue="SCREEN_NORMAL">
44667 <webidl> "SCREEN_NORMAL</webidl>
44669 <EnumValue stringvalue="SCREEN_BRIGHT">
44670 <webidl> "SCREEN_BRIGHT</webidl>
44673 <Enum name="PowerCpuState" id="::Power::PowerCpuState">
44674 <webidl> enum PowerCpuState { "CPU_AWAKE" };</webidl>
44677 An enumerator that indicates the power state for cpu resource.
44681 The supported values are:
44685 CPU_AWAKE - The cpu state is set to be awaken and it does not go to <em>SLEEP</em> state automatically. </li>
44692 <EnumValue stringvalue="CPU_AWAKE">
44693 <webidl> "CPU_AWAKE</webidl>
44696 <Typedef name="PowerState" id="::Power::PowerState">
44697 <webidl> typedef (<ref>PowerScreenState</ref> or <ref>PowerCpuState</ref>) PowerState;</webidl>
44700 The supported power states in general.
44701 It can be either a PowerScreenState or a PowerCpuState.
44707 <Type type="union">
44708 <Type name="PowerScreenState"/>
44709 <Type name="PowerCpuState"/>
44712 <Interface name="PowerManagerObject" id="::Power::PowerManagerObject">
44713 <webidl> [NoInterfaceObject] interface PowerManagerObject {
44714 readonly attribute <ref>PowerManager</ref> power;
44718 This interface defines what is instantiated by the <em>Tizen</em> object from the Tizen Platform.
44722 There will be a <em>tizen.power </em>object that allows accessing of a functionality of the Power API.
44729 <ExtendedAttributeList>
44730 <ExtendedAttribute name="NoInterfaceObject">
44731 <webidl>NoInterfaceObject</webidl>
44732 </ExtendedAttribute>
44733 </ExtendedAttributeList>
44734 <Attribute readonly="readonly" name="power" id="::Power::PowerManagerObject::power">
44735 <webidl> readonly attribute <ref>PowerManager</ref> power;</webidl>
44736 <Type name="PowerManager"/>
44739 <Implements name1="Tizen" name2="PowerManagerObject">
44740 <webidl> <ref>Tizen</ref> implements <ref>PowerManagerObject</ref>;</webidl>
44742 <Interface name="PowerManager" id="::Power::PowerManager">
44743 <webidl> [NoInterfaceObject] interface PowerManager {
44744 void request(<ref>PowerResource</ref> resource, <ref>PowerState</ref> state) raises(<ref>WebAPIException</ref>);
44746 void release(<ref>PowerResource</ref> resource) raises(<ref>WebAPIException</ref>);
44748 void setScreenStateChangeListener(<ref>ScreenStateChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);
44750 void unsetScreenStateChangeListener() raises(<ref>WebAPIException</ref>);
44752 double getScreenBrightness() raises(<ref>WebAPIException</ref>);
44754 void setScreenBrightness(double brightness) raises(<ref>WebAPIException</ref>);
44756 boolean isScreenOn() raises(<ref>WebAPIException</ref>);
44758 void restoreScreenBrightness() raises(<ref>WebAPIException</ref>);
44760 void turnScreenOn() raises(<ref>WebAPIException</ref>);
44762 void turnScreenOff() raises(<ref>WebAPIException</ref>);
44766 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.
44772 <ExtendedAttributeList>
44773 <ExtendedAttribute name="NoInterfaceObject">
44774 <webidl>NoInterfaceObject</webidl>
44775 </ExtendedAttribute>
44776 </ExtendedAttributeList>
44777 <Operation name="request" id="::Power::PowerManager::request">
44778 <webidl> void request(<ref>PowerResource</ref> resource, <ref>PowerState</ref> state) raises(<ref>WebAPIException</ref>);</webidl>
44781 Requests the minimum-state for a power resource.
44790 http://tizen.org/privilege/power
44792 <Code> tizen.power.request("SCREEN", "SCREEN_NORMAL");
44795 <Type type="void"/>
44797 <Argument name="resource">
44800 The power resource for which the request is made.
44803 <Type name="PowerResource"/>
44805 <Argument name="state">
44808 The minimal power state in which the power resource is desired to be.
44811 <Type name="PowerState"/>
44815 <RaiseException name="WebAPIException">
44818 with error type TypeMismatchError, if the input parameter is not
44819 compatible with the expected type.
44822 with error type NotSupportedError, if this feature is not supported.
44825 with error type InvalidValuesError, if any of the input
44826 parameters contain an invalid value.
44829 with error type SecurityError, if the application does not have the privilege to call this method.
44832 with error type UnknownError in any other error case.
44838 <Operation name="release" id="::Power::PowerManager::release">
44839 <webidl> void release(<ref>PowerResource</ref> resource) raises(<ref>WebAPIException</ref>);</webidl>
44842 Releases the power state request for the given resource.
44847 <Code> // Release SCREEN resource.
44848 tizen.power.release("SCREEN");
44851 <Type type="void"/>
44853 <Argument name="resource">
44856 The resource for which requests are to be removed.
44859 <Type name="PowerResource"/>
44863 <RaiseException name="WebAPIException">
44866 with error type TypeMismatchError, if the input parameter is not
44867 compatible with the expected type.
44870 with error type NotSupportedError, if this feature is not supported.
44873 with error type InvalidValuesError, if any of the input
44874 parameters contain an invalid value.
44877 with error type UnknownError in any other error case.
44883 <Operation name="setScreenStateChangeListener" id="::Power::PowerManager::setScreenStateChangeListener">
44884 <webidl> void setScreenStateChangeListener(<ref>ScreenStateChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);</webidl>
44887 Sets the screen state change callback and monitors its state changes.
44892 <Code> function onScreenStateChanged(previousState, changedState) {
44893 console.log("Screen state changed from " + previousState + " to " + changedState);
44896 // Set the screen state change listener.
44897 tizen.power.setScreenStateChangeListener(onScreenStateChanged);
44900 <Type type="void"/>
44902 <Argument name="listener">
44905 The screen state change callback.
44908 <Type name="ScreenStateChangeCallback"/>
44912 <RaiseException name="WebAPIException">
44915 with error type TypeMismatchError, if the input parameter is not
44916 compatible with the expected type.
44919 with error type NotSupportedError, if this feature is not supported.
44922 with error type InvalidValuesError, if any of the input
44923 parameters contain an invalid value.
44926 with error type UnknownError in any other error case.
44932 <Operation name="unsetScreenStateChangeListener" id="::Power::PowerManager::unsetScreenStateChangeListener">
44933 <webidl> void unsetScreenStateChangeListener() raises(<ref>WebAPIException</ref>);</webidl>
44936 Unsets the screen state change callback and stop monitoring it.
44941 <Code> // Unset the screen state change listener.
44942 tizen.power.unsetScreenStateChangeListener();
44945 <Type type="void"/>
44948 <RaiseException name="WebAPIException">
44951 with error type NotSupportedError, if this feature is not supported.
44954 with error type UnknownError in any other error case.
44960 <Operation name="getScreenBrightness" id="::Power::PowerManager::getScreenBrightness">
44961 <webidl> double getScreenBrightness() raises(<ref>WebAPIException</ref>);</webidl>
44964 Gets the screen brightness level of an application, from 0 to 1.
44969 <Code> // Get the current screen brightness value.
44970 var screenBrightness = tizen.power.getScreenBrightness();
44973 <Type type="double">
44976 double Current screen brightness value.
44982 <RaiseException name="WebAPIException">
44985 with error type NotSupportedError, if this feature is not supported.
44988 with error type UnknownError in any other error case.
44994 <Operation name="setScreenBrightness" id="::Power::PowerManager::setScreenBrightness">
44995 <webidl> void setScreenBrightness(double brightness) raises(<ref>WebAPIException</ref>);</webidl>
44998 Sets the screen brightness level for an application, from 0 to 1.
45002 An approximation is made for best effort when the given value is not exactly applicable by the hardware or system.
45012 http://tizen.org/privilege/power
45014 <Code> // Set the screen brightness value for the application.
45015 tizen.power.setScreenBrightness(1);
45018 <Type type="void"/>
45020 <Argument name="brightness">
45023 The screen brightness value to set.
45026 <Type type="double"/>
45030 <RaiseException name="WebAPIException">
45033 with error type TypeMismatchError, if the input parameter is not
45034 compatible with the expected type.
45037 with error type NotSupportedError, if this feature is not supported.
45040 with error type InvalidValuesError, if any of the input
45041 parameters contain an invalid value.
45044 with error type SecurityError, if the application does not have the privilege to call this method.
45047 with error type UnknownError in any other error case.
45053 <Operation name="isScreenOn" id="::Power::PowerManager::isScreenOn">
45054 <webidl> boolean isScreenOn() raises(<ref>WebAPIException</ref>);</webidl>
45057 Returns <var>true</var> if the screen is on.
45062 <Code> // Check whether the screen is on or off.
45063 var isScreenOn = tizen.power.isScreenOn();
45066 <Type type="boolean">
45069 boolean true if screen is on.
45075 <RaiseException name="WebAPIException">
45078 with error type NotSupportedError, if this feature is not supported.
45081 with error type UnknownError in any other error case.
45087 <Operation name="restoreScreenBrightness" id="::Power::PowerManager::restoreScreenBrightness">
45088 <webidl> void restoreScreenBrightness() raises(<ref>WebAPIException</ref>);</webidl>
45091 Restores the screen brightness to the system default setting value.
45096 <Code> // Restore the screen brightness value to the system default setting value.
45097 tizen.power.restoreScreenBrightness();
45100 <Type type="void"/>
45103 <RaiseException name="WebAPIException">
45106 with error type NotSupportedError, if this feature is not supported.
45109 with error type UnknownError in any other error case.
45115 <Operation name="turnScreenOn" id="::Power::PowerManager::turnScreenOn">
45116 <webidl> void turnScreenOn() raises(<ref>WebAPIException</ref>);</webidl>
45119 Turns on the screen.
45123 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.
45133 http://tizen.org/privilege/power
45135 <Code> // Turn on the screen.
45136 tizen.power.turnScreenOn();
45139 <Type type="void"/>
45142 <RaiseException name="WebAPIException">
45145 with error type NotSupportedError, if this feature is not supported.
45148 with error type SecurityError, if the application does not have the privilege to call this method.
45151 with error type UnknownError in any other error case.
45157 <Operation name="turnScreenOff" id="::Power::PowerManager::turnScreenOff">
45158 <webidl> void turnScreenOff() raises(<ref>WebAPIException</ref>);</webidl>
45161 Turns off the screen.
45165 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
45175 http://tizen.org/privilege/power
45177 <Code> // Turn off the screen.
45178 tizen.power.turnScreenOff();
45181 <Type type="void"/>
45184 <RaiseException name="WebAPIException">
45187 with error type NotSupportedError, if this feature is not supported.
45190 with error type SecurityError, if the application does not have the privilege to call this method.
45193 with error type UnknownError in any other error case.
45200 <Interface name="ScreenStateChangeCallback" id="::Power::ScreenStateChangeCallback">
45201 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ScreenStateChangeCallback {
45202 void onchanged(<ref>PowerScreenState</ref> previousState, <ref>PowerScreenState</ref> changedState);
45206 This callback interface defines notification for the screen state changes.
45212 <ExtendedAttributeList>
45213 <ExtendedAttribute name="Callback" value="FunctionOnly">
45214 <webidl>Callback</webidl>
45215 </ExtendedAttribute>
45216 <ExtendedAttribute name="NoInterfaceObject">
45217 <webidl> NoInterfaceObject</webidl>
45218 </ExtendedAttribute>
45219 </ExtendedAttributeList>
45220 <Operation name="onchanged" id="::Power::ScreenStateChangeCallback::onchanged">
45221 <webidl> void onchanged(<ref>PowerScreenState</ref> previousState, <ref>PowerScreenState</ref> changedState);</webidl>
45224 Called on screen state change.
45230 <Type type="void"/>
45232 <Argument name="previousState">
45235 The previous screen state.
45238 <Type name="PowerScreenState"/>
45240 <Argument name="changedState">
45243 The changed screen state.
45246 <Type name="PowerScreenState"/>
45252 <Module name="Push" id="::Push">
45253 <webidl>module Push {
45255 typedef DOMString PushRegistrationId;
45258 [NoInterfaceObject] interface PushManagerObject {
45259 readonly attribute <ref>PushManager</ref> push;
45261 <ref>Tizen</ref> implements <ref>PushManagerObject</ref>;
45264 [NoInterfaceObject] interface PushManager {
45266 void registerService(<ref>ApplicationControl</ref> appControl, <ref>PushRegisterSuccessCallback</ref> successCallback,
45267 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45270 void unregisterService(optional <ref>SuccessCallback</ref>? successCallback,
45271 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45274 void connectService(<ref>PushNotificationCallback</ref> notificationCallback) raises(<ref>WebAPIException</ref>);
45277 void disconnectService() raises(<ref>WebAPIException</ref>);
45280 <ref>PushRegistrationId</ref> getRegistrationId() raises(<ref>WebAPIException</ref>);
45284 [NoInterfaceObject] interface PushMessage {
45286 readonly attribute DOMString appData;
45289 readonly attribute DOMString alertMessage;
45292 readonly attribute Date date;
45296 [Callback=FunctionOnly, NoInterfaceObject]
45297 interface PushRegisterSuccessCallback {
45299 void onsuccess(<ref>PushRegistrationId</ref> id);
45303 [Callback=FunctionOnly, NoInterfaceObject]
45304 interface PushNotificationCallback {
45306 void onsuccess(<ref>PushMessage</ref> message);
45311 This API provides the functionality for receiving push notifications
45312 from Tizen push server.
45313 The push service is a client daemon that maintains a permanent connection
45314 between your device and Tizen push server in order to process your registration
45315 and deregistration requests, deliver push notifications to applications on a device.
45319 If the application is connected, the push service passes the notification data over
45320 the connection. Otherwise, the push service posts UI notification with the data.
45321 It will be delivered when a user launches the application by selecting the posting.
45324 To receive push notifications, follow the steps below:
45328 Get administrative permission for an application on your device </li>
45330 Register the application </li>
45332 Connect to the push service </li>
45334 Get notification data </li>
45337 For more information on the Push features, see <a href="../../org.tizen.web.appprogramming/html/guide/communication_guide/push.htm">Push Guide</a>.
45343 <def-api-feature identifier="http://tizen.org/feature/network.push">
45347 To guarantee this application running on a device with Push feature, define below in the config file:
45353 <Typedef name="PushRegistrationId" id="::Push::PushRegistrationId">
45354 <webidl> typedef DOMString PushRegistrationId;</webidl>
45357 A push service registration identifier.
45363 <Type type="DOMString"/>
45365 <Interface name="PushManagerObject" id="::Push::PushManagerObject">
45366 <webidl> [NoInterfaceObject] interface PushManagerObject {
45367 readonly attribute <ref>PushManager</ref> push;
45371 This interface defines what is instantiated by the <em>Tizen </em>object from the Tizen Platform.
45375 There will be a <em>tizen.push </em>object that allows access to the functionality of the Push API.
45382 <ExtendedAttributeList>
45383 <ExtendedAttribute name="NoInterfaceObject">
45384 <webidl>NoInterfaceObject</webidl>
45385 </ExtendedAttribute>
45386 </ExtendedAttributeList>
45387 <Attribute readonly="readonly" name="push" id="::Push::PushManagerObject::push">
45388 <webidl> readonly attribute <ref>PushManager</ref> push;</webidl>
45389 <Type name="PushManager"/>
45392 <Implements name1="Tizen" name2="PushManagerObject">
45393 <webidl> <ref>Tizen</ref> implements <ref>PushManagerObject</ref>;</webidl>
45395 <Interface name="PushManager" id="::Push::PushManager">
45396 <webidl> [NoInterfaceObject] interface PushManager {
45398 void registerService(<ref>ApplicationControl</ref> appControl, <ref>PushRegisterSuccessCallback</ref> successCallback,
45399 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45402 void unregisterService(optional <ref>SuccessCallback</ref>? successCallback,
45403 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45406 void connectService(<ref>PushNotificationCallback</ref> notificationCallback) raises(<ref>WebAPIException</ref>);
45409 void disconnectService() raises(<ref>WebAPIException</ref>);
45412 <ref>PushRegistrationId</ref> getRegistrationId() raises(<ref>WebAPIException</ref>);
45416 This interface provides methods to manage push registration and notification.
45422 <ExtendedAttributeList>
45423 <ExtendedAttribute name="NoInterfaceObject">
45424 <webidl>NoInterfaceObject</webidl>
45425 </ExtendedAttribute>
45426 </ExtendedAttributeList>
45427 <Operation name="registerService" id="::Push::PushManager::registerService">
45428 <webidl> void registerService(<ref>ApplicationControl</ref> appControl, <ref>PushRegisterSuccessCallback</ref> successCallback,
45429 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
45432 Registers an application to the Tizen push server.
45435 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>.
45439 The <em>ErrorCallback()</em> is launched with these error types:
45443 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
45445 UnknownError - If any other error occurs. </li>
45455 http://tizen.org/privilege/push
45457 <Code> // Defines the data to be used when this process is launched by notification service.
45458 var service = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/push_test");
45460 // Defines the error callback.
45461 function errorCallback(response) {
45462 console.log( 'The following error occurred: ' + response.name);
45465 // Defines the registration success callback
45466 function registerSuccessCallback(id) {
45467 console.log("Registration succeeded with id: " + id);
45470 // Requests registration.
45471 tizen.push.registerService(service, registerSuccessCallback, errorCallback);
45474 <Type type="void"/>
45476 <Argument name="appControl">
45479 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>.
45482 <Type name="ApplicationControl"/>
45484 <Argument name="successCallback">
45487 The method to be called when the registration request succeeds.
45490 <Type name="PushRegisterSuccessCallback"/>
45492 <Argument optional="optional" name="errorCallback">
45495 The method to be called when the registration request fails.
45498 <Type name="ErrorCallback" nullable="nullable"/>
45502 <RaiseException name="WebAPIException">
45505 with error type TypeMismatchError, if any input parameter
45506 is not compatible with the expected type for that parameter.
45509 with error type InvalidValuesError, if any input parameters
45510 does not contain a valid value.
45513 with error type SecurityError, if the application does not have the privilege to call this method.
45516 with error type NotSupportedError, if this feature is not supported.
45519 with error type UnknownError, if any other error occurs.
45525 <Operation name="unregisterService" id="::Push::PushManager::unregisterService">
45526 <webidl> void unregisterService(optional <ref>SuccessCallback</ref>? successCallback,
45527 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
45530 Unregisters an application from the Tizen push server.
45534 The <em>ErrorCallback()</em> is launched with these error types:
45538 UnknownError - If an unknown error occurs. </li>
45548 http://tizen.org/privilege/push
45550 <Code> // Defines the error callback
45551 function errorCallback(response) {
45552 console.log( 'The following error occurred: ' + response.name);
45555 // Defines the unregistration success callback
45556 function unregisterSuccessCallback() {
45557 console.log("Unregistration succeeded.");
45560 // Requests unregistration
45561 tizen.push.unregisterService(unregisterSuccessCallback, errorCallback);
45564 <Type type="void"/>
45566 <Argument optional="optional" name="successCallback">
45569 The method to be called when the request is successfully unregistered.
45572 <Type name="SuccessCallback" nullable="nullable"/>
45574 <Argument optional="optional" name="errorCallback">
45577 The method to be called when the unregistration request fails.
45580 <Type name="ErrorCallback" nullable="nullable"/>
45584 <RaiseException name="WebAPIException">
45587 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
45590 with error type InvalidValuesError, if any input parameters does not contain a valid value.
45593 with error type SecurityError, if the application does not have the privilege to call this method.
45596 with error type NotSupportedError, if this feature is not supported.
45599 with error type UnknownError, if any other error occurs.
45605 <Operation name="connectService" id="::Push::PushManager::connectService">
45606 <webidl> void connectService(<ref>PushNotificationCallback</ref> notificationCallback) raises(<ref>WebAPIException</ref>);</webidl>
45609 Connects to the push service and receives push notifications.
45618 http://tizen.org/privilege/push
45620 <Code> // Defines the connect success callback
45621 function notificationCallback(noti) {
45622 console.log("Notification received with alert message: " + noti.alertMessage);
45625 // Requests for push service connection
45626 tizen.push.connectService(notificationCallback, errorCallback);
45629 <Type type="void"/>
45631 <Argument name="notificationCallback">
45634 The method to be called when the notification message arrives.
45637 <Type name="PushNotificationCallback"/>
45641 <RaiseException name="WebAPIException">
45644 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
45647 with error type InvalidValuesError, if any input parameters does not contain a valid value.
45650 with error type SecurityError, if the application does not have the privilege to call this method.
45653 with error type NotSupportedError, if this feature is not supported.
45656 with error type UnknownError, if any other error occurs.
45662 <Operation name="disconnectService" id="::Push::PushManager::disconnectService">
45663 <webidl> void disconnectService() raises(<ref>WebAPIException</ref>);</webidl>
45666 Disconnects to the push service and stop receiving push notifications.
45675 http://tizen.org/privilege/push
45677 <Code> // Requests disconnection
45678 tizen.push.disconnectService();
45681 <Type type="void"/>
45684 <RaiseException name="WebAPIException">
45687 with error type SecurityError, if the application does not have the privilege to call this method.
45690 with error type NotSupportedError, if this feature is not supported.
45693 with error type UnknownError, if any other error occurs.
45699 <Operation name="getRegistrationId" id="::Push::PushManager::getRegistrationId">
45700 <webidl> <ref>PushRegistrationId</ref> getRegistrationId() raises(<ref>WebAPIException</ref>);</webidl>
45703 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.
45712 http://tizen.org/privilege/push
45714 <Code> var registrationId = tizen.push.getRegistrationId();
45715 if ( registrationId != NULL ) {
45716 console.log("The registration id: " + registrationId);
45720 <Type name="PushRegistrationId"/>
45723 <RaiseException name="WebAPIException">
45726 with error type SecurityError, if the application does not have the privilege to call this method.
45729 with error type NotSupportedError, if this feature is not supported.
45732 with error type UnknownError, if any other error occurs.
45739 <Interface name="PushMessage" id="::Push::PushMessage">
45740 <webidl> [NoInterfaceObject] interface PushMessage {
45742 readonly attribute DOMString appData;
45745 readonly attribute DOMString alertMessage;
45748 readonly attribute Date date;
45752 This interface specifies the push message that is delivered from the push service.
45758 <ExtendedAttributeList>
45759 <ExtendedAttribute name="NoInterfaceObject">
45760 <webidl>NoInterfaceObject</webidl>
45761 </ExtendedAttribute>
45762 </ExtendedAttributeList>
45763 <Attribute readonly="readonly" name="appData" id="::Push::PushMessage::appData">
45764 <webidl> readonly attribute DOMString appData;</webidl>
45767 An attribute to store the push notification data.
45771 This data is the message that the sender wants to send and its length must be less than 1 KB.
45778 <Type type="DOMString"/>
45780 <Attribute readonly="readonly" name="alertMessage" id="::Push::PushMessage::alertMessage">
45781 <webidl> readonly attribute DOMString alertMessage;</webidl>
45784 An attribute to store the push notification message that is displayed as an alert message to the user.
45790 <Type type="DOMString"/>
45792 <Attribute readonly="readonly" name="date" id="::Push::PushMessage::date">
45793 <webidl> readonly attribute Date date;</webidl>
45796 An attribute to store the date/time when a push notification message is received.
45802 <Type type="Date"/>
45805 <Interface name="PushRegisterSuccessCallback" id="::Push::PushRegisterSuccessCallback">
45806 <webidl> [Callback=FunctionOnly, NoInterfaceObject]
45807 interface PushRegisterSuccessCallback {
45809 void onsuccess(<ref>PushRegistrationId</ref> id);
45813 This interface specifies the success callback for push service registration request.
45817 This success callback is invoked when a push service registration request is successful.
45824 <ExtendedAttributeList>
45825 <ExtendedAttribute name="Callback" value="FunctionOnly">
45826 <webidl>Callback</webidl>
45827 </ExtendedAttribute>
45828 <ExtendedAttribute name="NoInterfaceObject">
45829 <webidl> NoInterfaceObject</webidl>
45830 </ExtendedAttribute>
45831 </ExtendedAttributeList>
45832 <Operation name="onsuccess" id="::Push::PushRegisterSuccessCallback::onsuccess">
45833 <webidl> void onsuccess(<ref>PushRegistrationId</ref> id);</webidl>
45836 Called when a push service registration request is successful.
45842 <Type type="void"/>
45844 <Argument name="id">
45847 The registration ID.
45850 <Type name="PushRegistrationId"/>
45855 <Interface name="PushNotificationCallback" id="::Push::PushNotificationCallback">
45856 <webidl> [Callback=FunctionOnly, NoInterfaceObject]
45857 interface PushNotificationCallback {
45859 void onsuccess(<ref>PushMessage</ref> message);
45863 This interface specifies the notification callback for the received push notification message.
45867 This notification callback is invoked when the push notification message arrives.
45874 <ExtendedAttributeList>
45875 <ExtendedAttribute name="Callback" value="FunctionOnly">
45876 <webidl>Callback</webidl>
45877 </ExtendedAttribute>
45878 <ExtendedAttribute name="NoInterfaceObject">
45879 <webidl> NoInterfaceObject</webidl>
45880 </ExtendedAttribute>
45881 </ExtendedAttributeList>
45882 <Operation name="onsuccess" id="::Push::PushNotificationCallback::onsuccess">
45883 <webidl> void onsuccess(<ref>PushMessage</ref> message);</webidl>
45886 Called when the push notification message arrives.
45892 <Type type="void"/>
45894 <Argument name="message">
45897 The received push notification message.
45900 <Type name="PushMessage"/>
45906 <Module name="SecureElement" id="::SecureElement">
45907 <webidl>module SecureElement {
45909 [NoInterfaceObject] interface SEServiceManagerObject {
45910 readonly attribute <ref>SEService</ref> seService;
45912 <ref>Tizen</ref> implements <ref>SEServiceManagerObject</ref>;
45915 [NoInterfaceObject] interface SEService
45918 void getReaders(<ref>ReaderArraySuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45920 unsigned long registerSEListener(<ref>SEChangeListener</ref> listener) raises(<ref>WebAPIException</ref>);
45922 void unregisterSEListener(unsigned long id) raises(<ref>WebAPIException</ref>);
45925 void shutdown() raises(<ref>WebAPIException</ref>);
45929 [NoInterfaceObject] interface Reader
45932 readonly attribute boolean isPresent;
45934 DOMString getName() raises(<ref>WebAPIException</ref>);
45936 void openSession(<ref>SessionSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45938 void closeSessions() raises(<ref>WebAPIException</ref>);
45941 [NoInterfaceObject] interface Session
45944 readonly attribute boolean isClosed;
45946 void openBasicChannel(byte[] aid, <ref>ChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45948 void openLogicalChannel(byte[] aid, <ref>ChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45950 byte[] getATR() raises(<ref>WebAPIException</ref>);
45952 void close() raises(<ref>WebAPIException</ref>);
45954 void closeChannels() raises(<ref>WebAPIException</ref>);
45958 [NoInterfaceObject] interface Channel {
45960 readonly attribute boolean isBasicChannel;
45962 void close() raises(<ref>WebAPIException</ref>);
45965 void transmit(byte[] command, <ref>TransmitSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45969 [Callback, NoInterfaceObject] interface SEChangeListener {
45971 void onSEReady(<ref>Reader</ref> reader);
45973 void onSENotReady(<ref>Reader</ref> reader);
45977 [Callback=FunctionOnly, NoInterfaceObject] interface ReaderArraySuccessCallback {
45979 void onsuccess(<ref>Reader</ref>[] readers);
45983 [Callback=FunctionOnly, NoInterfaceObject] interface SessionSuccessCallback {
45985 void onsuccess(<ref>Session</ref> session);
45989 [Callback=FunctionOnly, NoInterfaceObject] interface ChannelSuccessCallback {
45991 void onsuccess(<ref>Channel</ref> channel);
45995 [Callback=FunctionOnly, NoInterfaceObject] interface TransmitSuccessCallback {
45997 void onsuccess(byte[] response);
46002 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.
46006 This API provides functionality to communicate with applications in several Secure Elements.
46012 <def-api-feature identifier="http://tizen.org/feature/network.secure_element">
46016 To guarantee this application running on a device with SecureElement feature, define below in the config file:
46022 <Interface name="SEServiceManagerObject" id="::SecureElement::SEServiceManagerObject">
46023 <webidl> [NoInterfaceObject] interface SEServiceManagerObject {
46024 readonly attribute <ref>SEService</ref> seService;
46028 Defines what is instantiated by the Tizen object from the Tizen Platform.
46032 There is a <em>tizen.seService</em> object that allows access to the functionalities of the Secure Element API.
46039 <ExtendedAttributeList>
46040 <ExtendedAttribute name="NoInterfaceObject">
46041 <webidl>NoInterfaceObject</webidl>
46042 </ExtendedAttribute>
46043 </ExtendedAttributeList>
46044 <Attribute readonly="readonly" name="seService" id="::SecureElement::SEServiceManagerObject::seService">
46045 <webidl> readonly attribute <ref>SEService</ref> seService;</webidl>
46046 <Type name="SEService"/>
46049 <Implements name1="Tizen" name2="SEServiceManagerObject">
46050 <webidl> <ref>Tizen</ref> implements <ref>SEServiceManagerObject</ref>;</webidl>
46052 <Interface name="SEService" id="::SecureElement::SEService">
46053 <webidl> [NoInterfaceObject] interface SEService
46056 void getReaders(<ref>ReaderArraySuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
46058 unsigned long registerSEListener(<ref>SEChangeListener</ref> listener) raises(<ref>WebAPIException</ref>);
46060 void unregisterSEListener(unsigned long id) raises(<ref>WebAPIException</ref>);
46063 void shutdown() raises(<ref>WebAPIException</ref>);
46067 This interface provides access to the available Secure Element readers.
46071 It provides access to the API functionalities through the <em>tizen.seService</em> interface.
46078 <ExtendedAttributeList>
46079 <ExtendedAttribute name="NoInterfaceObject">
46080 <webidl>NoInterfaceObject</webidl>
46081 </ExtendedAttribute>
46082 </ExtendedAttributeList>
46083 <Operation name="getReaders" id="::SecureElement::SEService::getReaders">
46084 <webidl> void getReaders(<ref>ReaderArraySuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
46087 Gets all the available Secure Element readers.
46091 The ErrorCallback is launched with these error types:
46095 UnknownError - If any error occurs during retrieval. </li>
46102 http://tizen.org/privilege/secureelement
46108 function success(readers) {
46109 for (var i = 0; i < readers.length; i++) {
46110 if (readers[i].isPresent) {
46111 console.log ("Reader Name : " + readers[i].getName());
46115 function error(err) {
46116 console.log (err.name + ": " + err.message);
46118 tizen.seService.getReaders(success, error);
46120 console.log (err.name + ": " + err.message);
46124 <Type type="void"/>
46126 <Argument name="successCallback">
46129 The method to be invoked when the list of available Secure Element readers has been successfully retrieved
46132 <Type name="ReaderArraySuccessCallback"/>
46134 <Argument optional="optional" name="errorCallback">
46137 The method to call when an error occurs
46140 <Type name="ErrorCallback" nullable="nullable"/>
46144 <RaiseException name="WebAPIException">
46147 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
46150 with error type SecurityError, if the application does not have the privilege to call this method.
46156 <Operation name="registerSEListener" id="::SecureElement::SEService::registerSEListener">
46157 <webidl> unsigned long registerSEListener(<ref>SEChangeListener</ref> listener) raises(<ref>WebAPIException</ref>);</webidl>
46160 Registers a callback function that is invoked when an available Secure Element reader is detected.
46166 http://tizen.org/privilege/secureelement
46172 var seListener = tizen.seService.registerSEListener({
46173 onSEReady:function(reader) {
46174 console.log (reader.getName() + "is ready.");
46175 }, onSENotReady:function(reader) {
46176 console.log (reader.getName() + "is not ready.");
46179 console.log (err.name + ": " + err.message);
46183 <Type type="unsigned long">
46186 unsigned long An identifier used to clear the watch subscription.
46191 <Argument name="listener">
46194 A listener to be invoked for successful detection of available Secure Element readers.
46197 <Type name="SEChangeListener"/>
46201 <RaiseException name="WebAPIException">
46204 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
46207 with error type SecurityError, if the application does not have the privilege to call this method.
46210 with error type UnknownError, if any other error occurs.
46216 <Operation name="unregisterSEListener" id="::SecureElement::SEService::unregisterSEListener">
46217 <webidl> void unregisterSEListener(unsigned long id) raises(<ref>WebAPIException</ref>);</webidl>
46220 Unregisters the listener from notifying any detection of an available Secure Element reader.
46226 http://tizen.org/privilege/secureelement
46231 <Code> var seListener; //seListener obtained from registerSEListener
46233 tizen.seService.unregisterSEListener(seListener);
46235 console.log (err.name + ": " + err.message);
46239 <Type type="void"/>
46241 <Argument name="id">
46244 A subscription identifier that is returned by the <em>registerSEListener()</em> method.
46247 <Type type="unsigned long"/>
46251 <RaiseException name="WebAPIException">
46254 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
46257 with error type InvalidValuesError, if any of the input parameters contains an invalid value.
46260 with error type SecurityError, if the application does not have the privilege to call this method.
46263 with error type UnknownError, if any other error occurs.
46269 <Operation name="shutdown" id="::SecureElement::SEService::shutdown">
46270 <webidl> void shutdown() raises(<ref>WebAPIException</ref>);</webidl>
46273 Shuts down Secure Elements after releasing all resources.
46279 http://tizen.org/privilege/secureelement
46285 tizen.seService.shutdown();
46287 console.log (err.name + ": " + err.message);
46291 <Type type="void"/>
46294 <RaiseException name="WebAPIException">
46297 with error type SecurityError, if the application does not have the privilege to call this method.
46300 with error type UnknownError, if any other error occurs.
46307 <Interface name="Reader" id="::SecureElement::Reader">
46308 <webidl> [NoInterfaceObject] interface Reader
46311 readonly attribute boolean isPresent;
46313 DOMString getName() raises(<ref>WebAPIException</ref>);
46315 void openSession(<ref>SessionSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
46317 void closeSessions() raises(<ref>WebAPIException</ref>);
46321 Reader interface that is connected to this device.
46325 This interface offers methods to control sessions on the reader.
46332 <ExtendedAttributeList>
46333 <ExtendedAttribute name="NoInterfaceObject">
46334 <webidl>NoInterfaceObject</webidl>
46335 </ExtendedAttribute>
46336 </ExtendedAttributeList>
46337 <Attribute readonly="readonly" name="isPresent" id="::SecureElement::Reader::isPresent">
46338 <webidl> readonly attribute boolean isPresent;</webidl>
46341 An attribute to check whether a Secure Element is present on a reader.
46347 <Type type="boolean"/>
46349 <Operation name="getName" id="::SecureElement::Reader::getName">
46350 <webidl> DOMString getName() raises(<ref>WebAPIException</ref>);</webidl>
46353 Gets reader's name.
46359 http://tizen.org/privilege/secureelement
46365 function success(readers) {
46366 for (var i = 0; i < readers.length; i++) {
46367 if (readers[i].isPresent) {
46368 console.log ("Reader Name : " + readers[i].getName());
46372 function error(err) {
46373 console.log (err.name + ": " + err.message);
46375 tizen.seService.getReaders(success, error);
46377 console.log (err.name + ": " + err.message);
46381 <Type type="DOMString">
46384 DOMString The name of the reader.
46390 <RaiseException name="WebAPIException">
46393 with error type SecurityError, if the application does not have the privilege to call this method.
46396 with error type UnknownError, if any other error occurs.
46402 <Operation name="openSession" id="::SecureElement::Reader::openSession">
46403 <webidl> void openSession(<ref>SessionSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
46406 Opens a session on a reader.
46410 The ErrorCallback is launched with these error types:
46414 IOError - An error occurred in communication with the Secure Element in this reader. </li>
46416 InvalidStateError - If a Secure Element is not present on this reader. </li>
46418 UnknownError - If any other error occurs. </li>
46425 http://tizen.org/privilege/secureelement
46431 function success(session) {
46432 console.log ("Open Session Success : " + !session.isClosed);
46434 function error(err) {
46435 console.log (err.name + ": " + err.message);
46437 reader.openSession(success, error);
46439 console.log (err.name + ": " + err.message);
46443 <Type type="void"/>
46445 <Argument name="successCallback">
46448 The method to be invoked when a session has been successfully opened
46451 <Type name="SessionSuccessCallback"/>
46453 <Argument optional="optional" name="errorCallback">
46456 The method to be called when an error occurs
46459 <Type name="ErrorCallback" nullable="nullable"/>
46463 <RaiseException name="WebAPIException">
46466 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
46469 with error type SecurityError, if the application does not have the privilege to call this method.
46475 <Operation name="closeSessions" id="::SecureElement::Reader::closeSessions">
46476 <webidl> void closeSessions() raises(<ref>WebAPIException</ref>);</webidl>
46479 Closes all sessions opened on a reader.
46485 http://tizen.org/privilege/secureelement
46491 reader.closeSessions();
46493 console.log (err.name + ": " + err.message);
46497 <Type type="void"/>
46500 <RaiseException name="WebAPIException">
46503 with error type SecurityError, if the application does not have the privilege to call this method.
46506 with error type UnknownError in any other error case.
46513 <Interface name="Session" id="::SecureElement::Session">
46514 <webidl> [NoInterfaceObject] interface Session
46517 readonly attribute boolean isClosed;
46519 void openBasicChannel(byte[] aid, <ref>ChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
46521 void openLogicalChannel(byte[] aid, <ref>ChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
46523 byte[] getATR() raises(<ref>WebAPIException</ref>);
46525 void close() raises(<ref>WebAPIException</ref>);
46527 void closeChannels() raises(<ref>WebAPIException</ref>);
46531 This interface is connected to one of the readers and offers methods to control channels in a session.
46537 <ExtendedAttributeList>
46538 <ExtendedAttribute name="NoInterfaceObject">
46539 <webidl>NoInterfaceObject</webidl>
46540 </ExtendedAttribute>
46541 </ExtendedAttributeList>
46542 <Attribute readonly="readonly" name="isClosed" id="::SecureElement::Session::isClosed">
46543 <webidl> readonly attribute boolean isClosed;</webidl>
46546 An attribute to check whether a session is closed or not.
46552 <Type type="boolean"/>
46554 <Operation name="openBasicChannel" id="::SecureElement::Session::openBasicChannel">
46555 <webidl> void openBasicChannel(byte[] aid, <ref>ChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
46558 Opens a basic channel in a session.
46559 The basic channel (defined in the ISO7816-4 specification) is opened by default and its channel ID is <var>0</var>.
46560 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.
46561 Some Secure Elements might always deny opening a basic channel.
46565 The ErrorCallback is launched with these error types:
46569 IOError - If an error occurs while communicating with the Secure Element in the reader. </li>
46571 SecurityError - If access to this AID or the default application on this session is not allowed . </li>
46573 InvalidStateError - If this session is closed. </li>
46575 NotFoundError - If the application of the AID does not exist in the Secure Element. </li>
46577 NoChannelError - If basic channel is unavailable. </li>
46579 UnknownError - If any other error occurs. </li>
46586 http://tizen.org/privilege/secureelement
46592 function successChannel(channel) {
46593 if (channel.isBasicChannel) {
46594 console.log ("Basic channel is opened.");
46596 console.log ("Logical channel is opened.");
46599 function errorChannel(err) {
46600 console.log ("openBasicChannel Error :" + err.name +": " + err.message);
46603 function successSession(session) {
46604 console.log ("Open Session Success : " + !session.isClosed);
46605 // This aid is for test. Use aid for your applet in secure element.
46606 session.openBasicChannel([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe], successChannel, errorChannel);
46608 function errorSession(err) {
46609 console.log ("openSession Error : " + err.name + ": " + err.message);
46611 reader.openSession(successSession, errorSession);
46613 console.log (err.name + ": " + err.message);
46617 <Type type="void"/>
46619 <Argument name="aid">
46622 The id of the applet to select on this channel.<br/>If the array is empty, the default applet is selected in this session.
46625 <Type type="array">
46626 <Type type="byte"/>
46629 <Argument name="successCallback">
46632 The method to be invoked when a basic channel has been successfully opened
46635 <Type name="ChannelSuccessCallback"/>
46637 <Argument optional="optional" name="errorCallback">
46640 The method to be called when an error occurs
46643 <Type name="ErrorCallback" nullable="nullable"/>
46647 <RaiseException name="WebAPIException">
46650 with error type TypeMismatchError, if the input parameter
46651 is not compatible with the expected type for that parameter.
46654 with error type InvalidValuesError, if the AID's length is not within the limit: 5 to 16(inclusive).
46657 with error type SecurityError, if the application does not have the privilege to call this method.
46663 <Operation name="openLogicalChannel" id="::SecureElement::Session::openLogicalChannel">
46664 <webidl> void openLogicalChannel(byte[] aid, <ref>ChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
46667 Opens a logical channel in a session by the specified applet id.
46668 The logical channel is defined in the ISO7816-4 specification.
46672 The ErrorCallback is launched with these error types:
46676 IOError - If an error occurs while communicating with the Secure Element in the reader. </li>
46678 SecurityError - If access to this AID or the default application in this session is not allowed. </li>
46680 InvalidStateError - If this session is closed. </li>
46682 NotFoundError - If the application of the AID does not exist in the Secure Element. </li>
46684 NoChannelError - If logical channel is unavailable. </li>
46686 UnknownError - If any other error occurs. </li>
46693 http://tizen.org/privilege/secureelement
46698 <Code> var session; //Session obtained from openSession callback
46700 function successChannel(channel) {
46701 if (channel.isBasicChannel) {
46702 console.log ("Basic channel is opened.");
46704 console.log ("Logical channel is opened.");
46707 function errorChannel(err) {
46708 console.log ("openLogicalChannel Error :" + err.name + ": " + err.message);
46711 // This aid is for test. Use aid for your applet in secure element.
46712 session.openLogicalChannel([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe], successChannel, errorChannel);
46714 console.log (err.name + ": " + err.message);
46718 <Type type="void"/>
46720 <Argument name="aid">
46723 The id of the applet to select on this channel<br/>If the array is empty, the default application is selected in this session.
46726 <Type type="array">
46727 <Type type="byte"/>
46730 <Argument name="successCallback">
46733 The method to be invoked when a logical channel has been successfully opened
46736 <Type name="ChannelSuccessCallback"/>
46738 <Argument optional="optional" name="errorCallback">
46741 The method to be called when an error occurs
46744 <Type name="ErrorCallback" nullable="nullable"/>
46748 <RaiseException name="WebAPIException">
46751 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
46754 with error type InvalidValuesError, if the AID's length is not within the limit: 5 to 16(inclusive).
46757 with error type SecurityError, if the application does not have the privilege to call this method.
46763 <Operation name="getATR" id="::SecureElement::Session::getATR">
46764 <webidl> byte[] getATR() raises(<ref>WebAPIException</ref>);</webidl>
46767 Gets the answer to reset(ATR) of a Secure Element.
46773 http://tizen.org/privilege/secureelement
46778 <Code> var session; //Session obtained from openSession callback
46780 var atr = session.getATR();
46782 console.log (err.name + ": " + err.message);
46786 <Type type="array">
46789 byte[] The ATR of a Secure Element.
46792 <Type type="byte"/>
46796 <RaiseException name="WebAPIException">
46799 with error type SecurityError, if the application does not have the privilege to call this method.
46802 with error type UnknownError, if any other error occurs.
46808 <Operation name="close" id="::SecureElement::Session::close">
46809 <webidl> void close() raises(<ref>WebAPIException</ref>);</webidl>
46818 http://tizen.org/privilege/secureelement
46823 <Code> var session; //Session obtained from openSession callback
46827 console.log (err.name + ": " + err.message);
46831 <Type type="void"/>
46834 <RaiseException name="WebAPIException">
46837 with error type SecurityError, if the application does not have the privilege to call this method.
46840 with error type UnknownError, if any other error occurs.
46846 <Operation name="closeChannels" id="::SecureElement::Session::closeChannels">
46847 <webidl> void closeChannels() raises(<ref>WebAPIException</ref>);</webidl>
46850 Closes all channels on this session.
46856 http://tizen.org/privilege/secureelement
46861 <Code> var session; //Session obtained from openSession callback
46863 session.closeChannels();
46865 console.log (err.name + ": " + err.message);
46869 <Type type="void"/>
46872 <RaiseException name="WebAPIException">
46875 with error type SecurityError, if the application does not have the privilege to call this method.
46878 with error type UnknownError in any other error case.
46885 <Interface name="Channel" id="::SecureElement::Channel">
46886 <webidl> [NoInterfaceObject] interface Channel {
46888 readonly attribute boolean isBasicChannel;
46890 void close() raises(<ref>WebAPIException</ref>);
46893 void transmit(byte[] command, <ref>TransmitSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
46897 This interface is open to a Secure Element and offers methods to send Application Protocol Data Units(APDU) to the Secure Element.
46898 The channel is defined in the ISO7816-4.
46904 <ExtendedAttributeList>
46905 <ExtendedAttribute name="NoInterfaceObject">
46906 <webidl>NoInterfaceObject</webidl>
46907 </ExtendedAttribute>
46908 </ExtendedAttributeList>
46909 <Attribute readonly="readonly" name="isBasicChannel" id="::SecureElement::Channel::isBasicChannel">
46910 <webidl> readonly attribute boolean isBasicChannel;</webidl>
46913 An attribute to check whether it is a basic channel or not.
46919 <Type type="boolean"/>
46921 <Operation name="close" id="::SecureElement::Channel::close">
46922 <webidl> void close() raises(<ref>WebAPIException</ref>);</webidl>
46931 http://tizen.org/privilege/secureelement
46936 <Code> var channel; //Obtained from openLogicalChannel or openBasicChannel
46940 console.log (err.name + ": " + err.message);
46944 <Type type="void"/>
46947 <RaiseException name="WebAPIException">
46950 with error type SecurityError, if the application does not have the privilege to call this method.
46953 with error type UnknownError, if any other error occurs.
46959 <Operation name="transmit" id="::SecureElement::Channel::transmit">
46960 <webidl> void transmit(byte[] command, <ref>TransmitSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
46963 Transmits an APDU command to a Secure Element. The APDU command is defined in ISO7816-4.
46967 Some commands that are not allowed to be sent are:
46971 MANAGE_CHANNEL commands. </li>
46973 SELECT by DF Name (p1=04). </li>
46975 The commands that CLA bytes with channel numbers are de-masked. </li>
46978 The ErrorCallback is launched with these error types:
46982 InvalidValuesError - If the command contain an invalid value. </li>
46984 IOError - An error occurred while communicating with the Secure Element in the reader. </li>
46986 SecurityError - If the command is not allowed. </li>
46988 InvalidStateError - If this channel is closed. </li>
46990 UnknownError - If any other error occurs. </li>
46997 http://tizen.org/privilege/secureelement
47003 <Type type="void"/>
47005 <Argument name="command">
47008 The APDU command to transmit through this channel
47011 <Type type="array">
47012 <Type type="byte"/>
47015 <Argument name="successCallback">
47018 The method to be invoked when a command has been successfully transmitted
47021 <Type name="TransmitSuccessCallback"/>
47023 <Argument optional="optional" name="errorCallback">
47026 The method to be called when an error occurs
47029 <Type name="ErrorCallback" nullable="nullable"/>
47033 <RaiseException name="WebAPIException">
47036 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
47039 with error type SecurityError, if the application does not have the privilege to call this method.
47046 <Interface name="SEChangeListener" id="::SecureElement::SEChangeListener">
47047 <webidl> [Callback, NoInterfaceObject] interface SEChangeListener {
47049 void onSEReady(<ref>Reader</ref> reader);
47051 void onSENotReady(<ref>Reader</ref> reader);
47055 This interface provides the success callback that is invoked when a Secure Element reader is detected or lost.
47059 It is used in <em>SEService.registerSEListener()</em>.
47066 <ExtendedAttributeList>
47067 <ExtendedAttribute name="Callback">
47068 <webidl>Callback</webidl>
47069 </ExtendedAttribute>
47070 <ExtendedAttribute name="NoInterfaceObject">
47071 <webidl> NoInterfaceObject</webidl>
47072 </ExtendedAttribute>
47073 </ExtendedAttributeList>
47074 <Operation name="onSEReady" id="::SecureElement::SEChangeListener::onSEReady">
47075 <webidl> void onSEReady(<ref>Reader</ref> reader);</webidl>
47078 Called when a Secure Element reader is detected.
47084 <Type type="void"/>
47086 <Argument name="reader">
47089 A newly detected Secure Element reader
47092 <Type name="Reader"/>
47096 <Operation name="onSENotReady" id="::SecureElement::SEChangeListener::onSENotReady">
47097 <webidl> void onSENotReady(<ref>Reader</ref> reader);</webidl>
47100 Called when a Secure Element reader is lost.
47106 <Type type="void"/>
47108 <Argument name="reader">
47111 A lost Secure Element reader
47114 <Type name="Reader"/>
47119 <Interface name="ReaderArraySuccessCallback" id="::SecureElement::ReaderArraySuccessCallback">
47120 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ReaderArraySuccessCallback {
47122 void onsuccess(<ref>Reader</ref>[] readers);
47126 This callback interface provides a success callback that is invoked when a list of available Secure Element readers is retrieved.
47130 It specifies a success method with an array of <em>Reader</em> objects as an input parameter.
47131 It is used in asynchronous operations such as <em>SEService.getReaders()</em>.
47138 <ExtendedAttributeList>
47139 <ExtendedAttribute name="Callback" value="FunctionOnly">
47140 <webidl>Callback</webidl>
47141 </ExtendedAttribute>
47142 <ExtendedAttribute name="NoInterfaceObject">
47143 <webidl> NoInterfaceObject</webidl>
47144 </ExtendedAttribute>
47145 </ExtendedAttributeList>
47146 <Operation name="onsuccess" id="::SecureElement::ReaderArraySuccessCallback::onsuccess">
47147 <webidl> void onsuccess(<ref>Reader</ref>[] readers);</webidl>
47150 Called when an asynchronous call completes successfully.
47156 <Type type="void"/>
47158 <Argument name="readers">
47161 A list of available Secure Element readers
47164 <Type type="array">
47165 <Type name="Reader"/>
47171 <Interface name="SessionSuccessCallback" id="::SecureElement::SessionSuccessCallback">
47172 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface SessionSuccessCallback {
47174 void onsuccess(<ref>Session</ref> session);
47178 This interface specifies the success callback that is invoked when a session on a specific reader is open.
47182 This callback interface specifies a success method with a <em>Session</em> object as an input parameter.
47183 It is used in asynchronous operations such as <em>Reader.openSession()</em>.
47190 <ExtendedAttributeList>
47191 <ExtendedAttribute name="Callback" value="FunctionOnly">
47192 <webidl>Callback</webidl>
47193 </ExtendedAttribute>
47194 <ExtendedAttribute name="NoInterfaceObject">
47195 <webidl> NoInterfaceObject</webidl>
47196 </ExtendedAttribute>
47197 </ExtendedAttributeList>
47198 <Operation name="onsuccess" id="::SecureElement::SessionSuccessCallback::onsuccess">
47199 <webidl> void onsuccess(<ref>Session</ref> session);</webidl>
47202 Called when an asynchronous call completes successfully.
47208 <Type type="void"/>
47210 <Argument name="session">
47216 <Type name="Session"/>
47221 <Interface name="ChannelSuccessCallback" id="::SecureElement::ChannelSuccessCallback">
47222 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ChannelSuccessCallback {
47224 void onsuccess(<ref>Channel</ref> channel);
47228 This interface specifies the success callback that is invoked when a channel is open to communicate with a specific applet.
47232 This callback interface specifies a success method with a <em>Channel</em> object as an input parameter.
47233 It is used in asynchronous operations such as <em>Session.openBasicChannel() </em>or <em>Session.openLogicalChannel()</em>.
47240 <ExtendedAttributeList>
47241 <ExtendedAttribute name="Callback" value="FunctionOnly">
47242 <webidl>Callback</webidl>
47243 </ExtendedAttribute>
47244 <ExtendedAttribute name="NoInterfaceObject">
47245 <webidl> NoInterfaceObject</webidl>
47246 </ExtendedAttribute>
47247 </ExtendedAttributeList>
47248 <Operation name="onsuccess" id="::SecureElement::ChannelSuccessCallback::onsuccess">
47249 <webidl> void onsuccess(<ref>Channel</ref> channel);</webidl>
47252 Called when an asynchronous call completes successfully.
47258 <Type type="void"/>
47260 <Argument name="channel">
47266 <Type name="Channel"/>
47271 <Interface name="TransmitSuccessCallback" id="::SecureElement::TransmitSuccessCallback">
47272 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface TransmitSuccessCallback {
47274 void onsuccess(byte[] response);
47278 This interface specifies the success callback that is invoked when <em>Channel.transmit() </em>completes successfully.
47282 This callback interface specifies a success method with an array of bytes as an input parameter. It is used in <em>Channel.transmit()</em>.
47289 <ExtendedAttributeList>
47290 <ExtendedAttribute name="Callback" value="FunctionOnly">
47291 <webidl>Callback</webidl>
47292 </ExtendedAttribute>
47293 <ExtendedAttribute name="NoInterfaceObject">
47294 <webidl> NoInterfaceObject</webidl>
47295 </ExtendedAttribute>
47296 </ExtendedAttributeList>
47297 <Operation name="onsuccess" id="::SecureElement::TransmitSuccessCallback::onsuccess">
47298 <webidl> void onsuccess(byte[] response);</webidl>
47301 Called when an asynchronous call completes successfully.
47307 <Type type="void"/>
47309 <Argument name="response">
47312 An APDU command response that is transmitted on a channel
47315 <Type type="array">
47316 <Type type="byte"/>
47323 <Module name="SystemInfo" id="::SystemInfo">
47324 <webidl>module SystemInfo {
47326 enum SystemInfoPropertyId { "BATTERY" , "CPU", "STORAGE", "DISPLAY", "DEVICE_ORIENTATION", "BUILD", "LOCALE", "NETWORK", "WIFI_NETWORK", "CELLULAR_NETWORK", "SIM", "PERIPHERAL" };
47328 enum SystemInfoNetworkType { "NONE", "2G", "2.5G", "3G", "4G", "WIFI", "ETHERNET", "UNKNOWN" };
47330 enum SystemInfoDeviceOrientationStatus { "PORTRAIT_PRIMARY", "PORTRAIT_SECONDARY", "LANDSCAPE_PRIMARY", "LANDSCAPE_SECONDARY" };
47332 enum SystemInfoSimState { "ABSENT", "INITIALIZING", "READY", "PIN_REQUIRED", "PUK_REQUIRED", "NETWORK_LOCKED", "SIM_LOCKED", "UNKNOWN" };
47334 enum SystemInfoProfile { "MOBILE_FULL", "MOBILE_WEB" };
47336 [NoInterfaceObject] interface SystemInfoObject {
47337 readonly attribute <ref>SystemInfo</ref> systeminfo;
47339 <ref>Tizen</ref> implements <ref>SystemInfoObject</ref>;
47341 [NoInterfaceObject] interface SystemInfo {
47343 <ref>SystemInfoDeviceCapability</ref> getCapabilities() raises(<ref>WebAPIException</ref>);
47345 void getPropertyValue(<ref>SystemInfoPropertyId</ref> property,
47346 <ref>SystemInfoPropertySuccessCallback</ref> successCallback,
47347 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
47349 unsigned long addPropertyValueChangeListener(<ref>SystemInfoPropertyId</ref> property,
47350 <ref>SystemInfoPropertySuccessCallback</ref> successCallback,
47351 optional <ref>SystemInfoOptions</ref>? options) raises(<ref>WebAPIException</ref>);
47353 void removePropertyValueChangeListener(unsigned long listenerId) raises(<ref>WebAPIException</ref>);
47356 [NoInterfaceObject] interface SystemInfoDeviceCapability {
47357 readonly attribute boolean bluetooth;
47359 readonly attribute boolean nfc;
47361 readonly attribute boolean nfcReservedPush ;
47363 readonly attribute unsigned short multiTouchCount;
47365 readonly attribute boolean inputKeyboard;
47367 readonly attribute boolean inputKeyboardLayout;
47369 readonly attribute boolean wifi;
47371 readonly attribute boolean wifiDirect;
47373 readonly attribute boolean opengles;
47375 readonly attribute DOMString openglestextureFormat;
47377 readonly attribute boolean openglesVersion1_1;
47379 readonly attribute boolean openglesVersion2_0;
47381 readonly attribute boolean fmRadio;
47383 readonly attribute DOMString platformVersion raises(<ref>WebAPIException</ref>);
47385 readonly attribute DOMString webApiVersion raises(<ref>WebAPIException</ref>);
47387 readonly attribute DOMString nativeApiVersion raises(<ref>WebAPIException</ref>);
47389 readonly attribute DOMString platformName;
47391 readonly attribute boolean camera;
47393 readonly attribute boolean cameraFront;
47395 readonly attribute boolean cameraFrontFlash;
47397 readonly attribute boolean cameraBack;
47399 readonly attribute boolean cameraBackFlash;
47401 readonly attribute boolean location;
47403 readonly attribute boolean locationGps;
47405 readonly attribute boolean locationWps;
47407 readonly attribute boolean microphone;
47409 readonly attribute boolean usbHost;
47411 readonly attribute boolean usbAccessory;
47413 readonly attribute boolean screenOutputRca;
47415 readonly attribute boolean screenOutputHdmi;
47417 readonly attribute DOMString platformCoreCpuArch;
47419 readonly attribute DOMString platformCoreFpuArch;
47421 readonly attribute boolean sipVoip;
47423 readonly attribute DOMString duid;
47425 readonly attribute boolean speechRecognition;
47427 readonly attribute boolean speechSynthesis;
47429 readonly attribute boolean accelerometer;
47431 readonly attribute boolean accelerometerWakeup;
47433 readonly attribute boolean barometer;
47435 readonly attribute boolean barometerWakeup;
47437 readonly attribute boolean gyroscope;
47439 readonly attribute boolean gyroscopeWakeup;
47441 readonly attribute boolean magnetometer;
47443 readonly attribute boolean magnetometerWakeup;
47445 readonly attribute boolean photometer;
47447 readonly attribute boolean photometerWakeup;
47449 readonly attribute boolean proximity;
47451 readonly attribute boolean proximityWakeup;
47453 readonly attribute boolean tiltmeter;
47455 readonly attribute boolean tiltmeterWakeup;
47457 readonly attribute boolean dataEncryption;
47459 readonly attribute boolean graphicsAcceleration;
47461 readonly attribute boolean push;
47463 readonly attribute boolean telephony;
47465 readonly attribute boolean telephonyMms;
47467 readonly attribute boolean telephonySms;
47469 readonly attribute boolean screenSizeNormal;
47471 readonly attribute boolean screenSize480_800;
47473 readonly attribute boolean screenSize720_1280;
47475 readonly attribute boolean autoRotation;
47477 readonly attribute boolean shellAppWidget;
47479 readonly attribute boolean visionImageRecognition;
47481 readonly attribute boolean visionQrcodeGeneration;
47483 readonly attribute boolean visionQrcodeRecognition;
47485 readonly attribute boolean visionFaceRecognition;
47487 readonly attribute boolean secureElement;
47489 readonly attribute boolean nativeOspCompatible;
47491 readonly attribute <ref>SystemInfoProfile</ref> profile;
47494 dictionary SystemInfoOptions {
47495 unsigned long timeout;
47497 double highThreshold;
47499 double lowThreshold;
47502 [Callback=FunctionOnly, NoInterfaceObject] interface SystemInfoPropertySuccessCallback {
47503 void onsuccess(<ref>SystemInfoProperty</ref> prop);
47506 [NoInterfaceObject] interface SystemInfoProperty {
47509 [NoInterfaceObject] interface SystemInfoBattery : <ref>SystemInfoProperty</ref> {
47510 readonly attribute double level;
47512 readonly attribute boolean isCharging;
47515 [NoInterfaceObject] interface SystemInfoCpu : <ref>SystemInfoProperty</ref> {
47516 readonly attribute double load;
47519 [NoInterfaceObject] interface SystemInfoStorage : <ref>SystemInfoProperty</ref> {
47520 readonly attribute <ref>SystemInfoStorageUnit</ref>[] units;
47523 [NoInterfaceObject] interface SystemInfoStorageUnit : <ref>SystemInfoProperty</ref> {
47524 readonly attribute DOMString type;
47526 readonly attribute unsigned long long capacity;
47528 readonly attribute unsigned long long availableCapacity;
47530 readonly attribute boolean isRemovable;
47532 readonly attribute boolean isRemoveable;
47535 [NoInterfaceObject] interface SystemInfoDisplay : <ref>SystemInfoProperty</ref> {
47536 readonly attribute unsigned long resolutionWidth;
47538 readonly attribute unsigned long resolutionHeight;
47540 readonly attribute unsigned long dotsPerInchWidth;
47542 readonly attribute unsigned long dotsPerInchHeight;
47544 readonly attribute double physicalWidth;
47546 readonly attribute double physicalHeight;
47548 readonly attribute double brightness;
47551 [NoInterfaceObject] interface SystemInfoDeviceOrientation : <ref>SystemInfoProperty</ref> {
47553 readonly attribute <ref>SystemInfoDeviceOrientationStatus</ref> status;
47554 readonly attribute boolean isAutoRotation;
47557 [NoInterfaceObject] interface SystemInfoBuild : <ref>SystemInfoProperty</ref> {
47559 readonly attribute DOMString model;
47560 readonly attribute DOMString manufacturer;
47561 readonly attribute DOMString buildVersion;
47564 [NoInterfaceObject] interface SystemInfoLocale : <ref>SystemInfoProperty</ref> {
47566 readonly attribute DOMString language;
47568 readonly attribute DOMString country;
47571 [NoInterfaceObject] interface SystemInfoNetwork : <ref>SystemInfoProperty</ref> {
47573 readonly attribute <ref>SystemInfoNetworkType</ref> networkType;
47576 [NoInterfaceObject] interface SystemInfoWifiNetwork : <ref>SystemInfoProperty</ref> {
47578 readonly attribute DOMString status;
47579 readonly attribute DOMString ssid;
47580 readonly attribute DOMString ipAddress;
47581 readonly attribute DOMString ipv6Address;
47582 readonly attribute double signalStrength;
47585 [NoInterfaceObject] interface SystemInfoCellularNetwork : <ref>SystemInfoProperty</ref> {
47587 readonly attribute DOMString status;
47588 readonly attribute DOMString apn;
47589 readonly attribute DOMString ipAddress;
47590 readonly attribute DOMString ipv6Address;
47591 readonly attribute unsigned short mcc;
47592 readonly attribute unsigned short mnc;
47593 readonly attribute unsigned short cellId;
47594 readonly attribute unsigned short lac;
47595 readonly attribute boolean isRoaming;
47596 readonly attribute boolean isFlightMode;
47597 readonly attribute DOMString imei raises(<ref>WebAPIException</ref>);
47600 [NoInterfaceObject] interface SystemInfoSIM : <ref>SystemInfoProperty</ref> {
47601 readonly attribute <ref>SystemInfoSimState</ref> state raises(<ref>WebAPIException</ref>);
47602 readonly attribute DOMString operatorName raises(<ref>WebAPIException</ref>);
47603 readonly attribute DOMString msisdn raises(<ref>WebAPIException</ref>);
47604 readonly attribute DOMString iccid raises(<ref>WebAPIException</ref>);
47605 readonly attribute unsigned short mcc raises(<ref>WebAPIException</ref>);
47606 readonly attribute unsigned short mnc raises(<ref>WebAPIException</ref>);
47607 readonly attribute DOMString msin raises(<ref>WebAPIException</ref>);
47608 readonly attribute DOMString spn raises(<ref>WebAPIException</ref>);
47611 [NoInterfaceObject] interface SystemInfoPeripheral : <ref>SystemInfoProperty</ref> {
47613 readonly attribute boolean isVideoOutputOn;
47618 This specification defines interfaces and methods that provide web applications with access to various properties of a system.
47622 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.
47625 The following provides an overview of the tree data structure:
47637 DEVICE_ORIENTATION </li>
47647 CELLULAR_NETWORK </li>
47654 For more information on the SystemInfo features, see <a href="../../org.tizen.web.appprogramming/html/guide/sys_guide/systeminfo.htm">System Information Guide</a>.
47661 <Enum name="SystemInfoPropertyId" id="::SystemInfo::SystemInfoPropertyId">
47662 <webidl> enum SystemInfoPropertyId { "BATTERY" , "CPU", "STORAGE", "DISPLAY", "DEVICE_ORIENTATION", "BUILD", "LOCALE", "NETWORK", "WIFI_NETWORK", "CELLULAR_NETWORK", "SIM", "PERIPHERAL" };</webidl>
47665 The device property identifier.
47671 LOCALE and PERIPHERAL are supported Since 2.1
47674 <EnumValue stringvalue="BATTERY">
47675 <webidl> "BATTERY</webidl>
47677 <EnumValue stringvalue="CPU">
47678 <webidl> "CPU</webidl>
47680 <EnumValue stringvalue="STORAGE">
47681 <webidl> "STORAGE</webidl>
47683 <EnumValue stringvalue="DISPLAY">
47684 <webidl> "DISPLAY</webidl>
47686 <EnumValue stringvalue="DEVICE_ORIENTATION">
47687 <webidl> "DEVICE_ORIENTATION</webidl>
47689 <EnumValue stringvalue="BUILD">
47690 <webidl> "BUILD</webidl>
47692 <EnumValue stringvalue="LOCALE">
47693 <webidl> "LOCALE</webidl>
47695 <EnumValue stringvalue="NETWORK">
47696 <webidl> "NETWORK</webidl>
47698 <EnumValue stringvalue="WIFI_NETWORK">
47699 <webidl> "WIFI_NETWORK</webidl>
47701 <EnumValue stringvalue="CELLULAR_NETWORK">
47702 <webidl> "CELLULAR_NETWORK</webidl>
47704 <EnumValue stringvalue="SIM">
47705 <webidl> "SIM</webidl>
47707 <EnumValue stringvalue="PERIPHERAL">
47708 <webidl> "PERIPHERAL</webidl>
47711 <Enum name="SystemInfoNetworkType" id="::SystemInfo::SystemInfoNetworkType">
47712 <webidl> enum SystemInfoNetworkType { "NONE", "2G", "2.5G", "3G", "4G", "WIFI", "ETHERNET", "UNKNOWN" };</webidl>
47721 <EnumValue stringvalue="NONE">
47722 <webidl> "NONE</webidl>
47724 <EnumValue stringvalue="2G">
47725 <webidl> "2G</webidl>
47727 <EnumValue stringvalue="2.5G">
47728 <webidl> "2.5G</webidl>
47730 <EnumValue stringvalue="3G">
47731 <webidl> "3G</webidl>
47733 <EnumValue stringvalue="4G">
47734 <webidl> "4G</webidl>
47736 <EnumValue stringvalue="WIFI">
47737 <webidl> "WIFI</webidl>
47739 <EnumValue stringvalue="ETHERNET">
47740 <webidl> "ETHERNET</webidl>
47742 <EnumValue stringvalue="UNKNOWN">
47743 <webidl> "UNKNOWN</webidl>
47746 <Enum name="SystemInfoDeviceOrientationStatus" id="::SystemInfo::SystemInfoDeviceOrientationStatus">
47747 <webidl> enum SystemInfoDeviceOrientationStatus { "PORTRAIT_PRIMARY", "PORTRAIT_SECONDARY", "LANDSCAPE_PRIMARY", "LANDSCAPE_SECONDARY" };</webidl>
47750 Device Orientation Status.
47756 <EnumValue stringvalue="PORTRAIT_PRIMARY">
47757 <webidl> "PORTRAIT_PRIMARY</webidl>
47759 <EnumValue stringvalue="PORTRAIT_SECONDARY">
47760 <webidl> "PORTRAIT_SECONDARY</webidl>
47762 <EnumValue stringvalue="LANDSCAPE_PRIMARY">
47763 <webidl> "LANDSCAPE_PRIMARY</webidl>
47765 <EnumValue stringvalue="LANDSCAPE_SECONDARY">
47766 <webidl> "LANDSCAPE_SECONDARY</webidl>
47769 <Enum name="SystemInfoSimState" id="::SystemInfo::SystemInfoSimState">
47770 <webidl> enum SystemInfoSimState { "ABSENT", "INITIALIZING", "READY", "PIN_REQUIRED", "PUK_REQUIRED", "NETWORK_LOCKED", "SIM_LOCKED", "UNKNOWN" };</webidl>
47779 <EnumValue stringvalue="ABSENT">
47780 <webidl> "ABSENT</webidl>
47782 <EnumValue stringvalue="INITIALIZING">
47783 <webidl> "INITIALIZING</webidl>
47785 <EnumValue stringvalue="READY">
47786 <webidl> "READY</webidl>
47788 <EnumValue stringvalue="PIN_REQUIRED">
47789 <webidl> "PIN_REQUIRED</webidl>
47791 <EnumValue stringvalue="PUK_REQUIRED">
47792 <webidl> "PUK_REQUIRED</webidl>
47794 <EnumValue stringvalue="NETWORK_LOCKED">
47795 <webidl> "NETWORK_LOCKED</webidl>
47797 <EnumValue stringvalue="SIM_LOCKED">
47798 <webidl> "SIM_LOCKED</webidl>
47800 <EnumValue stringvalue="UNKNOWN">
47801 <webidl> "UNKNOWN</webidl>
47804 <Enum name="SystemInfoProfile" id="::SystemInfo::SystemInfoProfile">
47805 <webidl> enum SystemInfoProfile { "MOBILE_FULL", "MOBILE_WEB" };</webidl>
47814 <EnumValue stringvalue="MOBILE_FULL">
47815 <webidl> "MOBILE_FULL</webidl>
47817 <EnumValue stringvalue="MOBILE_WEB">
47818 <webidl> "MOBILE_WEB</webidl>
47821 <Interface name="SystemInfoObject" id="::SystemInfo::SystemInfoObject">
47822 <webidl> [NoInterfaceObject] interface SystemInfoObject {
47823 readonly attribute <ref>SystemInfo</ref> systeminfo;
47827 Defines what is instantiated by the <em>Tizen </em>object from the Tizen Platform.
47831 There will be a tizen.systeminfo object that allows accessing the
47832 functionality of the SystemInfo API.
47839 <ExtendedAttributeList>
47840 <ExtendedAttribute name="NoInterfaceObject">
47841 <webidl>NoInterfaceObject</webidl>
47842 </ExtendedAttribute>
47843 </ExtendedAttributeList>
47844 <Attribute readonly="readonly" name="systeminfo" id="::SystemInfo::SystemInfoObject::systeminfo">
47845 <webidl> readonly attribute <ref>SystemInfo</ref> systeminfo;</webidl>
47846 <Type name="SystemInfo"/>
47849 <Implements name1="Tizen" name2="SystemInfoObject">
47850 <webidl> <ref>Tizen</ref> implements <ref>SystemInfoObject</ref>;</webidl>
47852 <Interface name="SystemInfo" id="::SystemInfo::SystemInfo">
47853 <webidl> [NoInterfaceObject] interface SystemInfo {
47855 <ref>SystemInfoDeviceCapability</ref> getCapabilities() raises(<ref>WebAPIException</ref>);
47857 void getPropertyValue(<ref>SystemInfoPropertyId</ref> property,
47858 <ref>SystemInfoPropertySuccessCallback</ref> successCallback,
47859 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
47861 unsigned long addPropertyValueChangeListener(<ref>SystemInfoPropertyId</ref> property,
47862 <ref>SystemInfoPropertySuccessCallback</ref> successCallback,
47863 optional <ref>SystemInfoOptions</ref>? options) raises(<ref>WebAPIException</ref>);
47865 void removePropertyValueChangeListener(unsigned long listenerId) raises(<ref>WebAPIException</ref>);
47869 This entry interface queries the information of a system.
47873 This API offers methods for retrieving system information
47874 and for subscribing notifications of system information changes.
47878 <ExtendedAttributeList>
47879 <ExtendedAttribute name="NoInterfaceObject">
47880 <webidl>NoInterfaceObject</webidl>
47881 </ExtendedAttribute>
47882 </ExtendedAttributeList>
47883 <Operation name="getCapabilities" id="::SystemInfo::SystemInfo::getCapabilities">
47884 <webidl> <ref>SystemInfoDeviceCapability</ref> getCapabilities() raises(<ref>WebAPIException</ref>);</webidl>
47887 Gets the capabilities of the device.
47891 The function must synchronously acquire the capabilities of the device.
47897 <Code> var deviceCapabilities;
47898 deviceCapabilities = tizen.systeminfo.getCapabilities();
47899 if (deviceCapabilities.bluetooth)
47901 console.log("Bluetooth is supported");
47905 <Type name="SystemInfoDeviceCapability"/>
47908 <RaiseException name="WebAPIException">
47911 with error type NotSupportedError, if this feature is not supported.
47914 with error type SecurityError, if this functionality is not allowed.
47917 with error type UnknownError in any other error case.
47923 <Operation name="getPropertyValue" id="::SystemInfo::SystemInfo::getPropertyValue">
47924 <webidl> void getPropertyValue(<ref>SystemInfoPropertyId</ref> property,
47925 <ref>SystemInfoPropertySuccessCallback</ref> successCallback,
47926 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
47929 Gets the current value of a specified system property.
47933 The function must asynchronously acquire the current value of the requested property. If it is successful,
47934 the successCallback must be invoked with an object containing the information provided by the property.
47937 The <em>errorCallback() </em>can be launched with any of these error types:
47941 UnknownError - If any other error occurs. </li>
47947 <Code> function onSuccessCallback(battery) {
47948 console.log("The battery level is " + battery.level);
47951 function onErrorCallback(error) {
47952 console.log("An error occurred " + error.message);
47955 tizen.systeminfo.getPropertyValue("BATTERY", onSuccessCallback, onErrorCallback);
47958 <Type type="void"/>
47960 <Argument name="property">
47963 The name of the property to retrieve.
47966 <Type name="SystemInfoPropertyId"/>
47968 <Argument name="successCallback">
47971 Function called when the properties have been successfully retrieved.
47974 <Type name="SystemInfoPropertySuccessCallback"/>
47976 <Argument optional="optional" name="errorCallback">
47979 Function called when an error occurred while retrieving the properties.
47982 <Type name="ErrorCallback" nullable="nullable"/>
47986 <RaiseException name="WebAPIException">
47989 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
47992 with error type SecurityError, if this functionality is not allowed.
47995 with error type UnknownError in any other error case.
48001 <Operation name="addPropertyValueChangeListener" id="::SystemInfo::SystemInfo::addPropertyValueChangeListener">
48002 <webidl> unsigned long addPropertyValueChangeListener(<ref>SystemInfoPropertyId</ref> property,
48003 <ref>SystemInfoPropertySuccessCallback</ref> successCallback,
48004 optional <ref>SystemInfoOptions</ref>? options) raises(<ref>WebAPIException</ref>);</webidl>
48007 Adds a listener to allow tracking of changes in one or more system properties.
48011 When called, it immediately returns and then asynchronously starts a watch process defined by the following steps:
48014 1. Register the successCallback to receive system events that the status of the requested properties may have changed.
48017 2. When a system event is successfully received invoke the associated successCallback with an object containing the property
48021 3. Repeat step 2 until removePropertyValueChangeListener function is called.
48024 If property value is 'BUILD', listener would not be registered because 'BUILD' property's value is a fixed value.
48030 <Code> function onSuccessCallback(battery) {
48031 console.log("Low battery: " + battery.level);
48035 tizen.systeminfo.addPropertyValueChangeListener("BATTERY", onSuccessCallback, {lowThreshold : 0.2});
48038 <Type type="unsigned long">
48041 unsigned long An identifier used to clear the watch subscription.
48046 <Argument name="property">
48049 The name of the property to retrieve.
48052 <Type name="SystemInfoPropertyId"/>
48054 <Argument name="successCallback">
48057 Function called when the properties have been successfully retrieved.
48060 <Type name="SystemInfoPropertySuccessCallback"/>
48062 <Argument optional="optional" name="options">
48065 An object containing the various options for fetching the properties requested.
48068 <Type name="SystemInfoOptions" nullable="nullable"/>
48072 <RaiseException name="WebAPIException">
48075 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
48078 with error type NotSupportedError, if this feature is not supported.
48081 with error type InvalidValuesError, if any of the input
48082 parameters contain an invalid value.
48085 with error type SecurityError, if this functionality is not allowed.
48088 with error type UnknownError in any other error case.
48094 <Operation name="removePropertyValueChangeListener" id="::SystemInfo::SystemInfo::removePropertyValueChangeListener">
48095 <webidl> void removePropertyValueChangeListener(unsigned long listenerId) raises(<ref>WebAPIException</ref>);</webidl>
48098 Unsubscribes notifications for property changes set up by addPropertyValueChangeListener.
48102 If a valid listenerId argument is passed that corresponds to a subscription
48103 already place, then the watch process MUST immediately terminate and no further
48104 callback is invoked. If the listenerId argument does not correspond to a valid subscription,
48105 the method should return without any further action.
48111 <Code> var id = null;
48112 function onSuccessCallback(battery) {
48113 console.log("New value for Battery level is " + battery.level);
48114 if (id != null) { // After receiving the first notification, we clear it
48115 tizen.systeminfo.removePropertyValueChangeListener(id);
48119 id = tizen.systeminfo.addPropertyValueChangeListener("BATTERY", onSuccessCallback);
48122 <Type type="void"/>
48124 <Argument name="listenerId">
48127 An identifier of the subscription returned by the addPropertyValueChangeListener() method.
48130 <Type type="unsigned long"/>
48134 <RaiseException name="WebAPIException">
48137 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
48140 with error type NotSupportedError, if this feature is not supported.
48143 with error type InvalidValuesError, if any of the input
48144 parameters contain an invalid value.
48147 with error type SecurityError, if this functionality is not allowed.
48150 with error type UnknownError in any other error case.
48157 <Interface name="SystemInfoDeviceCapability" id="::SystemInfo::SystemInfoDeviceCapability">
48158 <webidl> [NoInterfaceObject] interface SystemInfoDeviceCapability {
48159 readonly attribute boolean bluetooth;
48161 readonly attribute boolean nfc;
48163 readonly attribute boolean nfcReservedPush ;
48165 readonly attribute unsigned short multiTouchCount;
48167 readonly attribute boolean inputKeyboard;
48169 readonly attribute boolean inputKeyboardLayout;
48171 readonly attribute boolean wifi;
48173 readonly attribute boolean wifiDirect;
48175 readonly attribute boolean opengles;
48177 readonly attribute DOMString openglestextureFormat;
48179 readonly attribute boolean openglesVersion1_1;
48181 readonly attribute boolean openglesVersion2_0;
48183 readonly attribute boolean fmRadio;
48185 readonly attribute DOMString platformVersion raises(<ref>WebAPIException</ref>);
48187 readonly attribute DOMString webApiVersion raises(<ref>WebAPIException</ref>);
48189 readonly attribute DOMString nativeApiVersion raises(<ref>WebAPIException</ref>);
48191 readonly attribute DOMString platformName;
48193 readonly attribute boolean camera;
48195 readonly attribute boolean cameraFront;
48197 readonly attribute boolean cameraFrontFlash;
48199 readonly attribute boolean cameraBack;
48201 readonly attribute boolean cameraBackFlash;
48203 readonly attribute boolean location;
48205 readonly attribute boolean locationGps;
48207 readonly attribute boolean locationWps;
48209 readonly attribute boolean microphone;
48211 readonly attribute boolean usbHost;
48213 readonly attribute boolean usbAccessory;
48215 readonly attribute boolean screenOutputRca;
48217 readonly attribute boolean screenOutputHdmi;
48219 readonly attribute DOMString platformCoreCpuArch;
48221 readonly attribute DOMString platformCoreFpuArch;
48223 readonly attribute boolean sipVoip;
48225 readonly attribute DOMString duid;
48227 readonly attribute boolean speechRecognition;
48229 readonly attribute boolean speechSynthesis;
48231 readonly attribute boolean accelerometer;
48233 readonly attribute boolean accelerometerWakeup;
48235 readonly attribute boolean barometer;
48237 readonly attribute boolean barometerWakeup;
48239 readonly attribute boolean gyroscope;
48241 readonly attribute boolean gyroscopeWakeup;
48243 readonly attribute boolean magnetometer;
48245 readonly attribute boolean magnetometerWakeup;
48247 readonly attribute boolean photometer;
48249 readonly attribute boolean photometerWakeup;
48251 readonly attribute boolean proximity;
48253 readonly attribute boolean proximityWakeup;
48255 readonly attribute boolean tiltmeter;
48257 readonly attribute boolean tiltmeterWakeup;
48259 readonly attribute boolean dataEncryption;
48261 readonly attribute boolean graphicsAcceleration;
48263 readonly attribute boolean push;
48265 readonly attribute boolean telephony;
48267 readonly attribute boolean telephonyMms;
48269 readonly attribute boolean telephonySms;
48271 readonly attribute boolean screenSizeNormal;
48273 readonly attribute boolean screenSize480_800;
48275 readonly attribute boolean screenSize720_1280;
48277 readonly attribute boolean autoRotation;
48279 readonly attribute boolean shellAppWidget;
48281 readonly attribute boolean visionImageRecognition;
48283 readonly attribute boolean visionQrcodeGeneration;
48285 readonly attribute boolean visionQrcodeRecognition;
48287 readonly attribute boolean visionFaceRecognition;
48289 readonly attribute boolean secureElement;
48291 readonly attribute boolean nativeOspCompatible;
48293 readonly attribute <ref>SystemInfoProfile</ref> profile;
48297 SystemInfoDeviceCapability object.
48303 <ExtendedAttributeList>
48304 <ExtendedAttribute name="NoInterfaceObject">
48305 <webidl>NoInterfaceObject</webidl>
48306 </ExtendedAttribute>
48307 </ExtendedAttributeList>
48308 <Attribute readonly="readonly" name="bluetooth" id="::SystemInfo::SystemInfoDeviceCapability::bluetooth">
48309 <webidl> readonly attribute boolean bluetooth;</webidl>
48312 Indicates whether the device supports Bluetooth.
48318 <Type type="boolean"/>
48320 <Attribute readonly="readonly" name="nfc" id="::SystemInfo::SystemInfoDeviceCapability::nfc">
48321 <webidl> readonly attribute boolean nfc;</webidl>
48324 Indicates whether the device supports NFC.
48330 <Type type="boolean"/>
48332 <Attribute readonly="readonly" name="nfcReservedPush" id="::SystemInfo::SystemInfoDeviceCapability::nfcReservedPush">
48333 <webidl> readonly attribute boolean nfcReservedPush ;</webidl>
48336 Indicates whether the device supports NFC reserved push.
48342 <Type type="boolean"/>
48344 <Attribute readonly="readonly" name="multiTouchCount" id="::SystemInfo::SystemInfoDeviceCapability::multiTouchCount">
48345 <webidl> readonly attribute unsigned short multiTouchCount;</webidl>
48348 The number of point in Multi-point touch.
48354 <Type type="unsigned short"/>
48356 <Attribute readonly="readonly" name="inputKeyboard" id="::SystemInfo::SystemInfoDeviceCapability::inputKeyboard">
48357 <webidl> readonly attribute boolean inputKeyboard;</webidl>
48360 Indicates whether the device supports the built-in Keyboard.
48366 <Type type="boolean"/>
48368 <Attribute readonly="readonly" name="inputKeyboardLayout" id="::SystemInfo::SystemInfoDeviceCapability::inputKeyboardLayout">
48369 <webidl> readonly attribute boolean inputKeyboardLayout;</webidl>
48372 Indicates whether the device supports the built-in keyboard layout.
48378 <Type type="boolean"/>
48380 <Attribute readonly="readonly" name="wifi" id="::SystemInfo::SystemInfoDeviceCapability::wifi">
48381 <webidl> readonly attribute boolean wifi;</webidl>
48384 Indicates whether the device supports Wi-Fi.
48390 <Type type="boolean"/>
48392 <Attribute readonly="readonly" name="wifiDirect" id="::SystemInfo::SystemInfoDeviceCapability::wifiDirect">
48393 <webidl> readonly attribute boolean wifiDirect;</webidl>
48396 Indicates whether the device supports Wi-Fi direct.
48402 <Type type="boolean"/>
48404 <Attribute readonly="readonly" name="opengles" id="::SystemInfo::SystemInfoDeviceCapability::opengles">
48405 <webidl> readonly attribute boolean opengles;</webidl>
48408 Indicates whether the device supports OpenGL-ES.
48414 <Type type="boolean"/>
48416 <Attribute readonly="readonly" name="openglestextureFormat" id="::SystemInfo::SystemInfoDeviceCapability::openglestextureFormat">
48417 <webidl> readonly attribute DOMString openglestextureFormat;</webidl>
48420 The device 3DC texture format for OpenGL-ES.
48421 One example of possible output is as follows: "3dc/atc/etc/ptc/pvrtc/utc"
48427 <Type type="DOMString"/>
48429 <Attribute readonly="readonly" name="openglesVersion1_1" id="::SystemInfo::SystemInfoDeviceCapability::openglesVersion1_1">
48430 <webidl> readonly attribute boolean openglesVersion1_1;</webidl>
48433 Indicates whether the device supports OpenGL-ES version 1.1.
48439 <Type type="boolean"/>
48441 <Attribute readonly="readonly" name="openglesVersion2_0" id="::SystemInfo::SystemInfoDeviceCapability::openglesVersion2_0">
48442 <webidl> readonly attribute boolean openglesVersion2_0;</webidl>
48445 Indicates whether the device supports OpenGL-ES version 2.0.
48451 <Type type="boolean"/>
48453 <Attribute readonly="readonly" name="fmRadio" id="::SystemInfo::SystemInfoDeviceCapability::fmRadio">
48454 <webidl> readonly attribute boolean fmRadio;</webidl>
48457 Indicates whether the device supports FM radio.
48463 <Type type="boolean"/>
48465 <Attribute readonly="readonly" name="platformVersion" id="::SystemInfo::SystemInfoDeviceCapability::platformVersion">
48466 <webidl> readonly attribute DOMString platformVersion raises(<ref>WebAPIException</ref>);</webidl>
48469 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>.
48478 http://tizen.org/privilege/system
48481 <Type type="DOMString"/>
48483 <RaiseException name="WebAPIException">
48486 with error type SecurityError, if this attribute is not allowed.
48492 <Attribute readonly="readonly" name="webApiVersion" id="::SystemInfo::SystemInfoDeviceCapability::webApiVersion">
48493 <webidl> readonly attribute DOMString webApiVersion raises(<ref>WebAPIException</ref>);</webidl>
48496 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>.
48505 http://tizen.org/privilege/system
48508 <Type type="DOMString"/>
48510 <RaiseException name="WebAPIException">
48513 with error type SecurityError, if this attribute is not allowed.
48519 <Attribute readonly="readonly" name="nativeApiVersion" id="::SystemInfo::SystemInfoDeviceCapability::nativeApiVersion">
48520 <webidl> readonly attribute DOMString nativeApiVersion raises(<ref>WebAPIException</ref>);</webidl>
48523 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>.
48532 http://tizen.org/privilege/system
48535 <Type type="DOMString"/>
48537 <RaiseException name="WebAPIException">
48540 with error type SecurityError, if this attribute is not allowed.
48546 <Attribute readonly="readonly" name="platformName" id="::SystemInfo::SystemInfoDeviceCapability::platformName">
48547 <webidl> readonly attribute DOMString platformName;</webidl>
48550 The name of the platform.
48556 <Type type="DOMString"/>
48558 <Attribute readonly="readonly" name="camera" id="::SystemInfo::SystemInfoDeviceCapability::camera">
48559 <webidl> readonly attribute boolean camera;</webidl>
48562 Indicates whether the device supports camera.
48568 <Type type="boolean"/>
48570 <Attribute readonly="readonly" name="cameraFront" id="::SystemInfo::SystemInfoDeviceCapability::cameraFront">
48571 <webidl> readonly attribute boolean cameraFront;</webidl>
48574 Indicates whether the device supports front camera.
48580 <Type type="boolean"/>
48582 <Attribute readonly="readonly" name="cameraFrontFlash" id="::SystemInfo::SystemInfoDeviceCapability::cameraFrontFlash">
48583 <webidl> readonly attribute boolean cameraFrontFlash;</webidl>
48586 Indicates whether the device supports flash on the front camera.
48592 <Type type="boolean"/>
48594 <Attribute readonly="readonly" name="cameraBack" id="::SystemInfo::SystemInfoDeviceCapability::cameraBack">
48595 <webidl> readonly attribute boolean cameraBack;</webidl>
48598 Indicates whether the device supports back-side camera.
48604 <Type type="boolean"/>
48606 <Attribute readonly="readonly" name="cameraBackFlash" id="::SystemInfo::SystemInfoDeviceCapability::cameraBackFlash">
48607 <webidl> readonly attribute boolean cameraBackFlash;</webidl>
48610 Indicates whether the device supports flash on the back-side camera.
48616 <Type type="boolean"/>
48618 <Attribute readonly="readonly" name="location" id="::SystemInfo::SystemInfoDeviceCapability::location">
48619 <webidl> readonly attribute boolean location;</webidl>
48622 Indicates whether the device supports CPS or not.
48628 <Type type="boolean"/>
48630 <Attribute readonly="readonly" name="locationGps" id="::SystemInfo::SystemInfoDeviceCapability::locationGps">
48631 <webidl> readonly attribute boolean locationGps;</webidl>
48634 Indicates whether the device supports GPS based location feature.
48640 <Type type="boolean"/>
48642 <Attribute readonly="readonly" name="locationWps" id="::SystemInfo::SystemInfoDeviceCapability::locationWps">
48643 <webidl> readonly attribute boolean locationWps;</webidl>
48646 Indicates whether the device supports WPS based location feature.
48652 <Type type="boolean"/>
48654 <Attribute readonly="readonly" name="microphone" id="::SystemInfo::SystemInfoDeviceCapability::microphone">
48655 <webidl> readonly attribute boolean microphone;</webidl>
48658 Indicates whether the device supports microphone.
48664 <Type type="boolean"/>
48666 <Attribute readonly="readonly" name="usbHost" id="::SystemInfo::SystemInfoDeviceCapability::usbHost">
48667 <webidl> readonly attribute boolean usbHost;</webidl>
48670 Indicates whether the device supports USB host.
48676 <Type type="boolean"/>
48678 <Attribute readonly="readonly" name="usbAccessory" id="::SystemInfo::SystemInfoDeviceCapability::usbAccessory">
48679 <webidl> readonly attribute boolean usbAccessory;</webidl>
48682 Indicates whether the device supports USB accessory.
48688 <Type type="boolean"/>
48690 <Attribute readonly="readonly" name="screenOutputRca" id="::SystemInfo::SystemInfoDeviceCapability::screenOutputRca">
48691 <webidl> readonly attribute boolean screenOutputRca;</webidl>
48694 Indicates whether the device supports RCA output.
48700 <Type type="boolean"/>
48702 <Attribute readonly="readonly" name="screenOutputHdmi" id="::SystemInfo::SystemInfoDeviceCapability::screenOutputHdmi">
48703 <webidl> readonly attribute boolean screenOutputHdmi;</webidl>
48706 Indicates whether the device supports HDMI output.
48712 <Type type="boolean"/>
48714 <Attribute readonly="readonly" name="platformCoreCpuArch" id="::SystemInfo::SystemInfoDeviceCapability::platformCoreCpuArch">
48715 <webidl> readonly attribute DOMString platformCoreCpuArch;</webidl>
48718 The device CPU architecture.
48719 The possible values for this attribute are: armv6, armv7, x86.
48725 <Type type="DOMString"/>
48727 <Attribute readonly="readonly" name="platformCoreFpuArch" id="::SystemInfo::SystemInfoDeviceCapability::platformCoreFpuArch">
48728 <webidl> readonly attribute DOMString platformCoreFpuArch;</webidl>
48731 The device FPU architecture.
48732 The possible values for this attribute are: vfpv3 / sse2 / sse3 / ssse3.
48738 <Type type="DOMString"/>
48740 <Attribute readonly="readonly" name="sipVoip" id="::SystemInfo::SystemInfoDeviceCapability::sipVoip">
48741 <webidl> readonly attribute boolean sipVoip;</webidl>
48744 Indicates whether the device supports VOIP.
48750 <Type type="boolean"/>
48752 <Attribute readonly="readonly" name="duid" id="::SystemInfo::SystemInfoDeviceCapability::duid">
48753 <webidl> readonly attribute DOMString duid;</webidl>
48756 The device unique ID.
48762 <Type type="DOMString"/>
48764 <Attribute readonly="readonly" name="speechRecognition" id="::SystemInfo::SystemInfoDeviceCapability::speechRecognition">
48765 <webidl> readonly attribute boolean speechRecognition;</webidl>
48768 Indicates whether the device supports speech recognition.
48774 <Type type="boolean"/>
48776 <Attribute readonly="readonly" name="speechSynthesis" id="::SystemInfo::SystemInfoDeviceCapability::speechSynthesis">
48777 <webidl> readonly attribute boolean speechSynthesis;</webidl>
48780 Indicates whether the device supports speech synthesis.
48786 <Type type="boolean"/>
48788 <Attribute readonly="readonly" name="accelerometer" id="::SystemInfo::SystemInfoDeviceCapability::accelerometer">
48789 <webidl> readonly attribute boolean accelerometer;</webidl>
48792 Indicates whether the device supports Accelerometer sensor.
48798 <Type type="boolean"/>
48800 <Attribute readonly="readonly" name="accelerometerWakeup" id="::SystemInfo::SystemInfoDeviceCapability::accelerometerWakeup">
48801 <webidl> readonly attribute boolean accelerometerWakeup;</webidl>
48804 Indicates whether the device supports Accelerometer sensor wake-up feature.
48810 <Type type="boolean"/>
48812 <Attribute readonly="readonly" name="barometer" id="::SystemInfo::SystemInfoDeviceCapability::barometer">
48813 <webidl> readonly attribute boolean barometer;</webidl>
48816 Indicates whether the device supports Barometer sensor.
48822 <Type type="boolean"/>
48824 <Attribute readonly="readonly" name="barometerWakeup" id="::SystemInfo::SystemInfoDeviceCapability::barometerWakeup">
48825 <webidl> readonly attribute boolean barometerWakeup;</webidl>
48828 Indicates whether the device supports Barometer sensor wake-up feature.
48834 <Type type="boolean"/>
48836 <Attribute readonly="readonly" name="gyroscope" id="::SystemInfo::SystemInfoDeviceCapability::gyroscope">
48837 <webidl> readonly attribute boolean gyroscope;</webidl>
48840 Indicates whether the device supports Gyroscope sensor.
48846 <Type type="boolean"/>
48848 <Attribute readonly="readonly" name="gyroscopeWakeup" id="::SystemInfo::SystemInfoDeviceCapability::gyroscopeWakeup">
48849 <webidl> readonly attribute boolean gyroscopeWakeup;</webidl>
48852 Indicates whether the device supports Gyroscope sensor wake-up feature.
48858 <Type type="boolean"/>
48860 <Attribute readonly="readonly" name="magnetometer" id="::SystemInfo::SystemInfoDeviceCapability::magnetometer">
48861 <webidl> readonly attribute boolean magnetometer;</webidl>
48864 Indicates whether the device supports Magnetometer sensor.
48870 <Type type="boolean"/>
48872 <Attribute readonly="readonly" name="magnetometerWakeup" id="::SystemInfo::SystemInfoDeviceCapability::magnetometerWakeup">
48873 <webidl> readonly attribute boolean magnetometerWakeup;</webidl>
48876 Indicates whether the device supports Magnetometer sensor wake-up feature.
48882 <Type type="boolean"/>
48884 <Attribute readonly="readonly" name="photometer" id="::SystemInfo::SystemInfoDeviceCapability::photometer">
48885 <webidl> readonly attribute boolean photometer;</webidl>
48888 Indicates whether the device supports Photometer sensor.
48894 <Type type="boolean"/>
48896 <Attribute readonly="readonly" name="photometerWakeup" id="::SystemInfo::SystemInfoDeviceCapability::photometerWakeup">
48897 <webidl> readonly attribute boolean photometerWakeup;</webidl>
48900 Indicates whether the device supports Photometer sensor wake-up feature.
48906 <Type type="boolean"/>
48908 <Attribute readonly="readonly" name="proximity" id="::SystemInfo::SystemInfoDeviceCapability::proximity">
48909 <webidl> readonly attribute boolean proximity;</webidl>
48912 Indicates whether the device supports Proximity sensor.
48918 <Type type="boolean"/>
48920 <Attribute readonly="readonly" name="proximityWakeup" id="::SystemInfo::SystemInfoDeviceCapability::proximityWakeup">
48921 <webidl> readonly attribute boolean proximityWakeup;</webidl>
48924 Indicates whether the device supports Proximity sensor wake-up feature.
48930 <Type type="boolean"/>
48932 <Attribute readonly="readonly" name="tiltmeter" id="::SystemInfo::SystemInfoDeviceCapability::tiltmeter">
48933 <webidl> readonly attribute boolean tiltmeter;</webidl>
48936 Indicates whether the device supports Tiltmeter sensor.
48942 <Type type="boolean"/>
48944 <Attribute readonly="readonly" name="tiltmeterWakeup" id="::SystemInfo::SystemInfoDeviceCapability::tiltmeterWakeup">
48945 <webidl> readonly attribute boolean tiltmeterWakeup;</webidl>
48948 Indicates whether the device supports Tiltmeter sensor wake-up feature.
48954 <Type type="boolean"/>
48956 <Attribute readonly="readonly" name="dataEncryption" id="::SystemInfo::SystemInfoDeviceCapability::dataEncryption">
48957 <webidl> readonly attribute boolean dataEncryption;</webidl>
48960 Indicates whether the device supports data encryption.
48966 <Type type="boolean"/>
48968 <Attribute readonly="readonly" name="graphicsAcceleration" id="::SystemInfo::SystemInfoDeviceCapability::graphicsAcceleration">
48969 <webidl> readonly attribute boolean graphicsAcceleration;</webidl>
48972 Indicates whether the device supports hardware acceleration for 2D/3D graphics.
48978 <Type type="boolean"/>
48980 <Attribute readonly="readonly" name="push" id="::SystemInfo::SystemInfoDeviceCapability::push">
48981 <webidl> readonly attribute boolean push;</webidl>
48984 Indicates whether the device supports push service.
48990 <Type type="boolean"/>
48992 <Attribute readonly="readonly" name="telephony" id="::SystemInfo::SystemInfoDeviceCapability::telephony">
48993 <webidl> readonly attribute boolean telephony;</webidl>
48996 Indicates whether the device supports the telephony feature.
49002 <Type type="boolean"/>
49004 <Attribute readonly="readonly" name="telephonyMms" id="::SystemInfo::SystemInfoDeviceCapability::telephonyMms">
49005 <webidl> readonly attribute boolean telephonyMms;</webidl>
49008 Indicates whether the device supports the mms feature.
49014 <Type type="boolean"/>
49016 <Attribute readonly="readonly" name="telephonySms" id="::SystemInfo::SystemInfoDeviceCapability::telephonySms">
49017 <webidl> readonly attribute boolean telephonySms;</webidl>
49020 Indicates whether the device supports the sms feature.
49026 <Type type="boolean"/>
49028 <Attribute readonly="readonly" name="screenSizeNormal" id="::SystemInfo::SystemInfoDeviceCapability::screenSizeNormal">
49029 <webidl> readonly attribute boolean screenSizeNormal;</webidl>
49032 Indicates whether the device supports the screen normal size.
49038 <Type type="boolean"/>
49040 <Attribute readonly="readonly" name="screenSize480_800" id="::SystemInfo::SystemInfoDeviceCapability::screenSize480_800">
49041 <webidl> readonly attribute boolean screenSize480_800;</webidl>
49044 Indicates whether the device supports the 480 * 800 screen size.
49050 <Type type="boolean"/>
49052 <Attribute readonly="readonly" name="screenSize720_1280" id="::SystemInfo::SystemInfoDeviceCapability::screenSize720_1280">
49053 <webidl> readonly attribute boolean screenSize720_1280;</webidl>
49056 Indicates whether the device supports the 720 * 1280 screen size.
49062 <Type type="boolean"/>
49064 <Attribute readonly="readonly" name="autoRotation" id="::SystemInfo::SystemInfoDeviceCapability::autoRotation">
49065 <webidl> readonly attribute boolean autoRotation;</webidl>
49068 Indicates whether the device supports auto rotation.
49074 <Type type="boolean"/>
49076 <Attribute readonly="readonly" name="shellAppWidget" id="::SystemInfo::SystemInfoDeviceCapability::shellAppWidget">
49077 <webidl> readonly attribute boolean shellAppWidget;</webidl>
49080 Indicates whether the device supports shell app widget.
49086 <Type type="boolean"/>
49088 <Attribute readonly="readonly" name="visionImageRecognition" id="::SystemInfo::SystemInfoDeviceCapability::visionImageRecognition">
49089 <webidl> readonly attribute boolean visionImageRecognition;</webidl>
49092 Indicates whether the device supports vision image recognition.
49098 <Type type="boolean"/>
49100 <Attribute readonly="readonly" name="visionQrcodeGeneration" id="::SystemInfo::SystemInfoDeviceCapability::visionQrcodeGeneration">
49101 <webidl> readonly attribute boolean visionQrcodeGeneration;</webidl>
49104 Indicates whether the device supports vision qrcode generation.
49110 <Type type="boolean"/>
49112 <Attribute readonly="readonly" name="visionQrcodeRecognition" id="::SystemInfo::SystemInfoDeviceCapability::visionQrcodeRecognition">
49113 <webidl> readonly attribute boolean visionQrcodeRecognition;</webidl>
49116 Indicates whether the device supports vision qrcode recognition.
49122 <Type type="boolean"/>
49124 <Attribute readonly="readonly" name="visionFaceRecognition" id="::SystemInfo::SystemInfoDeviceCapability::visionFaceRecognition">
49125 <webidl> readonly attribute boolean visionFaceRecognition;</webidl>
49128 Indicates whether the device supports vision face recognition.
49134 <Type type="boolean"/>
49136 <Attribute readonly="readonly" name="secureElement" id="::SystemInfo::SystemInfoDeviceCapability::secureElement">
49137 <webidl> readonly attribute boolean secureElement;</webidl>
49140 Indicates whether the device supports secure element.
49146 <Type type="boolean"/>
49148 <Attribute readonly="readonly" name="nativeOspCompatible" id="::SystemInfo::SystemInfoDeviceCapability::nativeOspCompatible">
49149 <webidl> readonly attribute boolean nativeOspCompatible;</webidl>
49152 Indicates whether the device supports native osp API.
49158 <Type type="boolean"/>
49160 <Attribute readonly="readonly" name="profile" id="::SystemInfo::SystemInfoDeviceCapability::profile">
49161 <webidl> readonly attribute <ref>SystemInfoProfile</ref> profile;</webidl>
49164 Represents the profile of the current device.
49170 <Type name="SystemInfoProfile"/>
49173 <Dictionary name="SystemInfoOptions" id="::SystemInfo::SystemInfoOptions">
49174 <webidl> dictionary SystemInfoOptions {
49175 unsigned long timeout;
49177 double highThreshold;
49179 double lowThreshold;
49183 An object containing the various options for fetching the properties requested.
49189 <DictionaryMember name="timeout" id="::SystemInfo::SystemInfoOptions::timeout">
49190 <webidl> unsigned long timeout;</webidl>
49193 The number of milliseconds beyond which the operation must be interrupted.
49199 <Type type="unsigned long"/>
49200 </DictionaryMember>
49201 <DictionaryMember name="highThreshold" id="::SystemInfo::SystemInfoOptions::highThreshold">
49202 <webidl> double highThreshold;</webidl>
49205 An attribute to indicate that the <em>successCallback()</em> method in the watch
49206 operation will be triggered only if the device property is a number and its value is greater than or equal to this number.
49207 This attribute has no effect on the <em>get()</em> method.
49213 <Type type="double"/>
49214 </DictionaryMember>
49215 <DictionaryMember name="lowThreshold" id="::SystemInfo::SystemInfoOptions::lowThreshold">
49216 <webidl> double lowThreshold;</webidl>
49219 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.
49220 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>.
49221 This attribute has no effect on the get method.
49227 <Type type="double"/>
49228 </DictionaryMember>
49230 <Interface name="SystemInfoPropertySuccessCallback" id="::SystemInfo::SystemInfoPropertySuccessCallback">
49231 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface SystemInfoPropertySuccessCallback {
49232 void onsuccess(<ref>SystemInfoProperty</ref> prop);
49236 Systemfinfo specific success callback.
49240 This callback interface specifies a success callback with SystemInfoProperty as input argument.
49241 It is used in asynchronous
49242 operations, such as getPropertyValue() or addPropertyValueChangeListener()
49249 <ExtendedAttributeList>
49250 <ExtendedAttribute name="Callback" value="FunctionOnly">
49251 <webidl>Callback</webidl>
49252 </ExtendedAttribute>
49253 <ExtendedAttribute name="NoInterfaceObject">
49254 <webidl> NoInterfaceObject</webidl>
49255 </ExtendedAttribute>
49256 </ExtendedAttributeList>
49257 <Operation name="onsuccess" id="::SystemInfo::SystemInfoPropertySuccessCallback::onsuccess">
49258 <webidl> void onsuccess(<ref>SystemInfoProperty</ref> prop);</webidl>
49261 Method invoked when the asynchronous call completes successfully.
49267 <Type type="void"/>
49269 <Argument name="prop">
49272 The property returned from a successful asynchronous operation.
49275 <Type name="SystemInfoProperty"/>
49280 <Interface name="SystemInfoProperty" id="::SystemInfo::SystemInfoProperty">
49281 <webidl> [NoInterfaceObject] interface SystemInfoProperty {
49285 This is a common abstract interface used by different types of system information objects.
49291 <ExtendedAttributeList>
49292 <ExtendedAttribute name="NoInterfaceObject">
49293 <webidl>NoInterfaceObject</webidl>
49294 </ExtendedAttribute>
49295 </ExtendedAttributeList>
49297 <Interface name="SystemInfoBattery" id="::SystemInfo::SystemInfoBattery">
49298 <webidl> [NoInterfaceObject] interface SystemInfoBattery : <ref>SystemInfoProperty</ref> {
49299 readonly attribute double level;
49301 readonly attribute boolean isCharging;
49305 This property reflects the general state of the system's battery
49311 <ExtendedAttributeList>
49312 <ExtendedAttribute name="NoInterfaceObject">
49313 <webidl>NoInterfaceObject</webidl>
49314 </ExtendedAttribute>
49315 </ExtendedAttributeList>
49316 <InterfaceInheritance>
49317 <Name name="SystemInfoProperty"/>
49318 </InterfaceInheritance>
49319 <Attribute readonly="readonly" name="level" id="::SystemInfo::SystemInfoBattery::level">
49320 <webidl> readonly attribute double level;</webidl>
49323 An attribute to specify the remaining level of an internal battery, scaled from <var>0 </var>to <var>1</var>:
49328 <var>0 </var>indicates that the battery level is the lowest and the system is about to enter shutdown mode. </li>
49330 <var>1 </var>indicates that the system's charge is maximum. </li>
49333 Any threshold parameter used in a watch operation to monitor this property applies to this attribute.
49340 <Type type="double"/>
49342 <Attribute readonly="readonly" name="isCharging" id="::SystemInfo::SystemInfoBattery::isCharging">
49343 <webidl> readonly attribute boolean isCharging;</webidl>
49346 Indicates whether the battery source is currently charging.
49352 <Type type="boolean"/>
49355 <Interface name="SystemInfoCpu" id="::SystemInfo::SystemInfoCpu">
49356 <webidl> [NoInterfaceObject] interface SystemInfoCpu : <ref>SystemInfoProperty</ref> {
49357 readonly attribute double load;
49361 This property reflects the state of the CPUs available to this system.
49367 <ExtendedAttributeList>
49368 <ExtendedAttribute name="NoInterfaceObject">
49369 <webidl>NoInterfaceObject</webidl>
49370 </ExtendedAttribute>
49371 </ExtendedAttributeList>
49372 <InterfaceInheritance>
49373 <Name name="SystemInfoProperty"/>
49374 </InterfaceInheritance>
49375 <Attribute readonly="readonly" name="load" id="::SystemInfo::SystemInfoCpu::load">
49376 <webidl> readonly attribute double load;</webidl>
49379 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.
49380 Any threshold parameter used in a watch function to monitor this property applies to this attribute.
49386 <Type type="double"/>
49389 <Interface name="SystemInfoStorage" id="::SystemInfo::SystemInfoStorage">
49390 <webidl> [NoInterfaceObject] interface SystemInfoStorage : <ref>SystemInfoProperty</ref> {
49391 readonly attribute <ref>SystemInfoStorageUnit</ref>[] units;
49395 This property exposes the data storage devices connected to this system.
49401 <ExtendedAttributeList>
49402 <ExtendedAttribute name="NoInterfaceObject">
49403 <webidl>NoInterfaceObject</webidl>
49404 </ExtendedAttribute>
49405 </ExtendedAttributeList>
49406 <InterfaceInheritance>
49407 <Name name="SystemInfoProperty"/>
49408 </InterfaceInheritance>
49409 <Attribute readonly="readonly" name="units" id="::SystemInfo::SystemInfoStorage::units">
49410 <webidl> readonly attribute <ref>SystemInfoStorageUnit</ref>[] units;</webidl>
49413 The array of storage units connected to this device.
49419 <Type type="array">
49420 <Type name="SystemInfoStorageUnit"/>
49424 <Interface name="SystemInfoStorageUnit" id="::SystemInfo::SystemInfoStorageUnit">
49425 <webidl> [NoInterfaceObject] interface SystemInfoStorageUnit : <ref>SystemInfoProperty</ref> {
49426 readonly attribute DOMString type;
49428 readonly attribute unsigned long long capacity;
49430 readonly attribute unsigned long long availableCapacity;
49432 readonly attribute boolean isRemovable;
49434 readonly attribute boolean isRemoveable;
49438 This property exposes a single storage device connected to this system.
49441 <ExtendedAttributeList>
49442 <ExtendedAttribute name="NoInterfaceObject">
49443 <webidl>NoInterfaceObject</webidl>
49444 </ExtendedAttribute>
49445 </ExtendedAttributeList>
49446 <InterfaceInheritance>
49447 <Name name="SystemInfoProperty"/>
49448 </InterfaceInheritance>
49449 <Attribute readonly="readonly" name="type" id="::SystemInfo::SystemInfoStorageUnit::type">
49450 <webidl> readonly attribute DOMString type;</webidl>
49453 The type of a storage device. The value is one of the constants defined for this type.
49457 The supported storage unit types are:
49476 <Type type="DOMString"/>
49478 <Attribute readonly="readonly" name="capacity" id="::SystemInfo::SystemInfoStorageUnit::capacity">
49479 <webidl> readonly attribute unsigned long long capacity;</webidl>
49482 The amount of data that this device can hold, in bytes.
49488 <Type type="unsigned long long"/>
49490 <Attribute readonly="readonly" name="availableCapacity" id="::SystemInfo::SystemInfoStorageUnit::availableCapacity">
49491 <webidl> readonly attribute unsigned long long availableCapacity;</webidl>
49494 The amount of available data that this device can hold, in bytes.
49500 <Type type="unsigned long long"/>
49502 <Attribute readonly="readonly" name="isRemovable" id="::SystemInfo::SystemInfoStorageUnit::isRemovable">
49503 <webidl> readonly attribute boolean isRemovable;</webidl>
49506 An attribute to indicate whether a device can be removed or not.
49510 The following values are supported:
49514 <var>true </var> - If this storage unit can be removed from the system (such as an sdcard unplugged) </li>
49516 <var>false</var> - If this storage unit cannot be removed from the system </li>
49523 <Type type="boolean"/>
49525 <Attribute readonly="readonly" name="isRemoveable" id="::SystemInfo::SystemInfoStorageUnit::isRemoveable">
49526 <webidl> readonly attribute boolean isRemoveable;</webidl>
49529 true if this unit can be removed from the system (such as an sdcard unplugged), false otherwise.
49535 A typographic error.
49538 <Type type="boolean"/>
49541 <Interface name="SystemInfoDisplay" id="::SystemInfo::SystemInfoDisplay">
49542 <webidl> [NoInterfaceObject] interface SystemInfoDisplay : <ref>SystemInfoProperty</ref> {
49543 readonly attribute unsigned long resolutionWidth;
49545 readonly attribute unsigned long resolutionHeight;
49547 readonly attribute unsigned long dotsPerInchWidth;
49549 readonly attribute unsigned long dotsPerInchHeight;
49551 readonly attribute double physicalWidth;
49553 readonly attribute double physicalHeight;
49555 readonly attribute double brightness;
49559 This property reflects the information of the Display.
49565 <ExtendedAttributeList>
49566 <ExtendedAttribute name="NoInterfaceObject">
49567 <webidl>NoInterfaceObject</webidl>
49568 </ExtendedAttribute>
49569 </ExtendedAttributeList>
49570 <InterfaceInheritance>
49571 <Name name="SystemInfoProperty"/>
49572 </InterfaceInheritance>
49573 <Attribute readonly="readonly" name="resolutionWidth" id="::SystemInfo::SystemInfoDisplay::resolutionWidth">
49574 <webidl> readonly attribute unsigned long resolutionWidth;</webidl>
49577 The total number of addressable pixels in the horizontal direction of a rectangular entity
49578 (such as Camera, Display, Image, Video, ...) when held in its default orientation.
49584 <Type type="unsigned long"/>
49586 <Attribute readonly="readonly" name="resolutionHeight" id="::SystemInfo::SystemInfoDisplay::resolutionHeight">
49587 <webidl> readonly attribute unsigned long resolutionHeight;</webidl>
49590 The total number of addressable pixels in the vertical direction of a rectangular element
49591 (such as Camera, Display, Image, Video, ...) when held in its default orientation.
49597 <Type type="unsigned long"/>
49599 <Attribute readonly="readonly" name="dotsPerInchWidth" id="::SystemInfo::SystemInfoDisplay::dotsPerInchWidth">
49600 <webidl> readonly attribute unsigned long dotsPerInchWidth;</webidl>
49603 Resolution of this device, along its width, in dots per inch.
49609 <Type type="unsigned long"/>
49611 <Attribute readonly="readonly" name="dotsPerInchHeight" id="::SystemInfo::SystemInfoDisplay::dotsPerInchHeight">
49612 <webidl> readonly attribute unsigned long dotsPerInchHeight;</webidl>
49615 Resolution of this device, along its height, in dots per inch.
49621 <Type type="unsigned long"/>
49623 <Attribute readonly="readonly" name="physicalWidth" id="::SystemInfo::SystemInfoDisplay::physicalWidth">
49624 <webidl> readonly attribute double physicalWidth;</webidl>
49627 The display's physical width in millimeters.
49633 <Type type="double"/>
49635 <Attribute readonly="readonly" name="physicalHeight" id="::SystemInfo::SystemInfoDisplay::physicalHeight">
49636 <webidl> readonly attribute double physicalHeight;</webidl>
49639 The display's physical height in millimeters.
49645 <Type type="double"/>
49647 <Attribute readonly="readonly" name="brightness" id="::SystemInfo::SystemInfoDisplay::brightness">
49648 <webidl> readonly attribute double brightness;</webidl>
49651 The current brightness of a display ranging between <var>0 </var>to <var>1</var>.
49657 <Type type="double"/>
49660 <Interface name="SystemInfoDeviceOrientation" id="::SystemInfo::SystemInfoDeviceOrientation">
49661 <webidl> [NoInterfaceObject] interface SystemInfoDeviceOrientation : <ref>SystemInfoProperty</ref> {
49663 readonly attribute <ref>SystemInfoDeviceOrientationStatus</ref> status;
49664 readonly attribute boolean isAutoRotation;
49668 This property reflects the information of the device orientation in this system.
49674 <ExtendedAttributeList>
49675 <ExtendedAttribute name="NoInterfaceObject">
49676 <webidl>NoInterfaceObject</webidl>
49677 </ExtendedAttribute>
49678 </ExtendedAttributeList>
49679 <InterfaceInheritance>
49680 <Name name="SystemInfoProperty"/>
49681 </InterfaceInheritance>
49682 <Attribute readonly="readonly" name="status" id="::SystemInfo::SystemInfoDeviceOrientation::status">
49683 <webidl> readonly attribute <ref>SystemInfoDeviceOrientationStatus</ref> status;</webidl>
49686 Represents the status of the current device orientation.
49692 <Type name="SystemInfoDeviceOrientationStatus"/>
49694 <Attribute readonly="readonly" name="isAutoRotation" id="::SystemInfo::SystemInfoDeviceOrientation::isAutoRotation">
49695 <webidl> readonly attribute boolean isAutoRotation;</webidl>
49698 whether the device is in autorotation.
49704 <Type type="boolean"/>
49707 <Interface name="SystemInfoBuild" id="::SystemInfo::SystemInfoBuild">
49708 <webidl> [NoInterfaceObject] interface SystemInfoBuild : <ref>SystemInfoProperty</ref> {
49710 readonly attribute DOMString model;
49711 readonly attribute DOMString manufacturer;
49712 readonly attribute DOMString buildVersion;
49716 This property reflects the information of the current device.
49722 <ExtendedAttributeList>
49723 <ExtendedAttribute name="NoInterfaceObject">
49724 <webidl>NoInterfaceObject</webidl>
49725 </ExtendedAttribute>
49726 </ExtendedAttributeList>
49727 <InterfaceInheritance>
49728 <Name name="SystemInfoProperty"/>
49729 </InterfaceInheritance>
49730 <Attribute readonly="readonly" name="model" id="::SystemInfo::SystemInfoBuild::model">
49731 <webidl> readonly attribute DOMString model;</webidl>
49734 Represents the model name of the current device.
49740 <Type type="DOMString"/>
49742 <Attribute readonly="readonly" name="manufacturer" id="::SystemInfo::SystemInfoBuild::manufacturer">
49743 <webidl> readonly attribute DOMString manufacturer;</webidl>
49746 Represents the manufacturer of the device.
49752 <Type type="DOMString"/>
49754 <Attribute readonly="readonly" name="buildVersion" id="::SystemInfo::SystemInfoBuild::buildVersion">
49755 <webidl> readonly attribute DOMString buildVersion;</webidl>
49758 Represents the build version information of the device.
49764 <Type type="DOMString"/>
49767 <Interface name="SystemInfoLocale" id="::SystemInfo::SystemInfoLocale">
49768 <webidl> [NoInterfaceObject] interface SystemInfoLocale : <ref>SystemInfoProperty</ref> {
49770 readonly attribute DOMString language;
49772 readonly attribute DOMString country;
49776 This property reflects the locale information of the current device.
49782 <ExtendedAttributeList>
49783 <ExtendedAttribute name="NoInterfaceObject">
49784 <webidl>NoInterfaceObject</webidl>
49785 </ExtendedAttribute>
49786 </ExtendedAttributeList>
49787 <InterfaceInheritance>
49788 <Name name="SystemInfoProperty"/>
49789 </InterfaceInheritance>
49790 <Attribute readonly="readonly" name="language" id="::SystemInfo::SystemInfoLocale::language">
49791 <webidl> readonly attribute DOMString language;</webidl>
49794 Indicates the current language setting in the (LANGUAGE)_(REGION) syntax.
49795 The language setting is in the ISO 630-2 format and the region setting is in the ISO 3166-1 format.
49796 The language setting is case-sensitive.
49802 <Type type="DOMString"/>
49804 <Attribute readonly="readonly" name="country" id="::SystemInfo::SystemInfoLocale::country">
49805 <webidl> readonly attribute DOMString country;</webidl>
49808 Indicates the current country setting in the (LANGUAGE)_(REGION) syntax.
49809 The language setting is in the ISO 630-2 format and the region setting is in the ISO 3166-1 format.
49810 The country setting is case-sensitive.
49816 <Type type="DOMString"/>
49819 <Interface name="SystemInfoNetwork" id="::SystemInfo::SystemInfoNetwork">
49820 <webidl> [NoInterfaceObject] interface SystemInfoNetwork : <ref>SystemInfoProperty</ref> {
49822 readonly attribute <ref>SystemInfoNetworkType</ref> networkType;
49826 This property reflects the information of the data network in this system.
49832 <ExtendedAttributeList>
49833 <ExtendedAttribute name="NoInterfaceObject">
49834 <webidl>NoInterfaceObject</webidl>
49835 </ExtendedAttribute>
49836 </ExtendedAttributeList>
49837 <InterfaceInheritance>
49838 <Name name="SystemInfoProperty"/>
49839 </InterfaceInheritance>
49840 <Attribute readonly="readonly" name="networkType" id="::SystemInfo::SystemInfoNetwork::networkType">
49841 <webidl> readonly attribute <ref>SystemInfoNetworkType</ref> networkType;</webidl>
49844 Represents the network type of the current data network.
49850 <Type name="SystemInfoNetworkType"/>
49853 <Interface name="SystemInfoWifiNetwork" id="::SystemInfo::SystemInfoWifiNetwork">
49854 <webidl> [NoInterfaceObject] interface SystemInfoWifiNetwork : <ref>SystemInfoProperty</ref> {
49856 readonly attribute DOMString status;
49857 readonly attribute DOMString ssid;
49858 readonly attribute DOMString ipAddress;
49859 readonly attribute DOMString ipv6Address;
49860 readonly attribute double signalStrength;
49864 This property reflects the information of the Wi-Fi network in this system.
49870 <ExtendedAttributeList>
49871 <ExtendedAttribute name="NoInterfaceObject">
49872 <webidl>NoInterfaceObject</webidl>
49873 </ExtendedAttribute>
49874 </ExtendedAttributeList>
49875 <InterfaceInheritance>
49876 <Name name="SystemInfoProperty"/>
49877 </InterfaceInheritance>
49878 <Attribute readonly="readonly" name="status" id="::SystemInfo::SystemInfoWifiNetwork::status">
49879 <webidl> readonly attribute DOMString status;</webidl>
49882 Represents the status (ON or OFF) of the Wi-Fi interface.
49888 <Type type="DOMString"/>
49890 <Attribute readonly="readonly" name="ssid" id="::SystemInfo::SystemInfoWifiNetwork::ssid">
49891 <webidl> readonly attribute DOMString ssid;</webidl>
49894 Represents the SSID of a Wi-Fi network.
49900 <Type type="DOMString"/>
49902 <Attribute readonly="readonly" name="ipAddress" id="::SystemInfo::SystemInfoWifiNetwork::ipAddress">
49903 <webidl> readonly attribute DOMString ipAddress;</webidl>
49906 Represents the IPv4 address of Wi-Fi network.
49912 <Type type="DOMString"/>
49914 <Attribute readonly="readonly" name="ipv6Address" id="::SystemInfo::SystemInfoWifiNetwork::ipv6Address">
49915 <webidl> readonly attribute DOMString ipv6Address;</webidl>
49918 Represents the IPv6 address of Wi-Fi network.
49924 <Type type="DOMString"/>
49926 <Attribute readonly="readonly" name="signalStrength" id="::SystemInfo::SystemInfoWifiNetwork::signalStrength">
49927 <webidl> readonly attribute double signalStrength;</webidl>
49930 This connection's signal strength, as a normalized value between 0 (no signal detected) and 1 (the level is at its maximum value).
49936 <Type type="double"/>
49939 <Interface name="SystemInfoCellularNetwork" id="::SystemInfo::SystemInfoCellularNetwork">
49940 <webidl> [NoInterfaceObject] interface SystemInfoCellularNetwork : <ref>SystemInfoProperty</ref> {
49942 readonly attribute DOMString status;
49943 readonly attribute DOMString apn;
49944 readonly attribute DOMString ipAddress;
49945 readonly attribute DOMString ipv6Address;
49946 readonly attribute unsigned short mcc;
49947 readonly attribute unsigned short mnc;
49948 readonly attribute unsigned short cellId;
49949 readonly attribute unsigned short lac;
49950 readonly attribute boolean isRoaming;
49951 readonly attribute boolean isFlightMode;
49952 readonly attribute DOMString imei raises(<ref>WebAPIException</ref>);
49956 This property reflects the information of the Cellular network in this system.
49962 <ExtendedAttributeList>
49963 <ExtendedAttribute name="NoInterfaceObject">
49964 <webidl>NoInterfaceObject</webidl>
49965 </ExtendedAttribute>
49966 </ExtendedAttributeList>
49967 <InterfaceInheritance>
49968 <Name name="SystemInfoProperty"/>
49969 </InterfaceInheritance>
49970 <Attribute readonly="readonly" name="status" id="::SystemInfo::SystemInfoCellularNetwork::status">
49971 <webidl> readonly attribute DOMString status;</webidl>
49974 Represents the status (ON or OFF) of the cellular network.
49980 <Type type="DOMString"/>
49982 <Attribute readonly="readonly" name="apn" id="::SystemInfo::SystemInfoCellularNetwork::apn">
49983 <webidl> readonly attribute DOMString apn;</webidl>
49986 Represents an Access Point Name of the cellular network.
49992 <Type type="DOMString"/>
49994 <Attribute readonly="readonly" name="ipAddress" id="::SystemInfo::SystemInfoCellularNetwork::ipAddress">
49995 <webidl> readonly attribute DOMString ipAddress;</webidl>
49998 Represents the IPv4 address of the cellular network.
50004 <Type type="DOMString"/>
50006 <Attribute readonly="readonly" name="ipv6Address" id="::SystemInfo::SystemInfoCellularNetwork::ipv6Address">
50007 <webidl> readonly attribute DOMString ipv6Address;</webidl>
50010 Represents the IPv6 address of the cellular network.
50016 <Type type="DOMString"/>
50018 <Attribute readonly="readonly" name="mcc" id="::SystemInfo::SystemInfoCellularNetwork::mcc">
50019 <webidl> readonly attribute unsigned short mcc;</webidl>
50022 Represents Mobile Country Code (MCC) of the cellular network.
50028 <Type type="unsigned short"/>
50030 <Attribute readonly="readonly" name="mnc" id="::SystemInfo::SystemInfoCellularNetwork::mnc">
50031 <webidl> readonly attribute unsigned short mnc;</webidl>
50034 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
50035 identify a mobile phone operator/carrier using the GSM, CDMA, iDEN, TETRA and UMTS public land mobile networks and some satellite mobile networks.
50041 <Type type="unsigned short"/>
50043 <Attribute readonly="readonly" name="cellId" id="::SystemInfo::SystemInfoCellularNetwork::cellId">
50044 <webidl> readonly attribute unsigned short cellId;</webidl>
50047 Represents Cell Id.
50053 <Type type="unsigned short"/>
50055 <Attribute readonly="readonly" name="lac" id="::SystemInfo::SystemInfoCellularNetwork::lac">
50056 <webidl> readonly attribute unsigned short lac;</webidl>
50059 Represents Location Area Code.
50065 <Type type="unsigned short"/>
50067 <Attribute readonly="readonly" name="isRoaming" id="::SystemInfo::SystemInfoCellularNetwork::isRoaming">
50068 <webidl> readonly attribute boolean isRoaming;</webidl>
50071 Whether the connection is set up while the device is roaming.
50077 <Type type="boolean"/>
50079 <Attribute readonly="readonly" name="isFlightMode" id="::SystemInfo::SystemInfoCellularNetwork::isFlightMode">
50080 <webidl> readonly attribute boolean isFlightMode;</webidl>
50083 Indicates whether the device is in flight mode.
50089 <Type type="boolean"/>
50091 <Attribute readonly="readonly" name="imei" id="::SystemInfo::SystemInfoCellularNetwork::imei">
50092 <webidl> readonly attribute DOMString imei raises(<ref>WebAPIException</ref>);</webidl>
50095 Represents the International Mobile Equipment Identity (IMEI).
50104 http://tizen.org/privilege/systemmanager
50107 <Type type="DOMString"/>
50109 <RaiseException name="WebAPIException">
50112 with error type SecurityError, if this attribute is not allowed.
50119 <Interface name="SystemInfoSIM" id="::SystemInfo::SystemInfoSIM">
50120 <webidl> [NoInterfaceObject] interface SystemInfoSIM : <ref>SystemInfoProperty</ref> {
50121 readonly attribute <ref>SystemInfoSimState</ref> state raises(<ref>WebAPIException</ref>);
50122 readonly attribute DOMString operatorName raises(<ref>WebAPIException</ref>);
50123 readonly attribute DOMString msisdn raises(<ref>WebAPIException</ref>);
50124 readonly attribute DOMString iccid raises(<ref>WebAPIException</ref>);
50125 readonly attribute unsigned short mcc raises(<ref>WebAPIException</ref>);
50126 readonly attribute unsigned short mnc raises(<ref>WebAPIException</ref>);
50127 readonly attribute DOMString msin raises(<ref>WebAPIException</ref>);
50128 readonly attribute DOMString spn raises(<ref>WebAPIException</ref>);
50132 This property reflects the information of the SIM card information.
50138 <ExtendedAttributeList>
50139 <ExtendedAttribute name="NoInterfaceObject">
50140 <webidl>NoInterfaceObject</webidl>
50141 </ExtendedAttribute>
50142 </ExtendedAttributeList>
50143 <InterfaceInheritance>
50144 <Name name="SystemInfoProperty"/>
50145 </InterfaceInheritance>
50146 <Attribute readonly="readonly" name="state" id="::SystemInfo::SystemInfoSIM::state">
50147 <webidl> readonly attribute <ref>SystemInfoSimState</ref> state raises(<ref>WebAPIException</ref>);</webidl>
50150 Represents the SIM card state.
50159 http://tizen.org/privilege/system
50162 <Type name="SystemInfoSimState"/>
50164 <RaiseException name="WebAPIException">
50167 with error type SecurityError, if this attribute is not allowed.
50173 <Attribute readonly="readonly" name="operatorName" id="::SystemInfo::SystemInfoSIM::operatorName">
50174 <webidl> readonly attribute DOMString operatorName raises(<ref>WebAPIException</ref>);</webidl>
50177 Represents the Operator Name String (ONS) of Common PCN Handset Specification (CPHS) in SIM card.
50186 http://tizen.org/privilege/system
50189 <Type type="DOMString"/>
50191 <RaiseException name="WebAPIException">
50194 with error type SecurityError, if this attribute is not allowed.
50200 <Attribute readonly="readonly" name="msisdn" id="::SystemInfo::SystemInfoSIM::msisdn">
50201 <webidl> readonly attribute DOMString msisdn raises(<ref>WebAPIException</ref>);</webidl>
50204 Represents the SIM card subscriber number.
50213 http://tizen.org/privilege/systemmanager
50216 <Type type="DOMString"/>
50218 <RaiseException name="WebAPIException">
50221 with error type SecurityError, if this attribute is not allowed.
50227 <Attribute readonly="readonly" name="iccid" id="::SystemInfo::SystemInfoSIM::iccid">
50228 <webidl> readonly attribute DOMString iccid raises(<ref>WebAPIException</ref>);</webidl>
50231 Represents the Integrated Circuit Card ID.
50240 http://tizen.org/privilege/system
50243 <Type type="DOMString"/>
50245 <RaiseException name="WebAPIException">
50248 with error type SecurityError, if this attribute is not allowed.
50254 <Attribute readonly="readonly" name="mcc" id="::SystemInfo::SystemInfoSIM::mcc">
50255 <webidl> readonly attribute unsigned short mcc raises(<ref>WebAPIException</ref>);</webidl>
50258 Represents the Mobile Country Code (MCC) of SIM provider.
50267 http://tizen.org/privilege/system
50270 <Type type="unsigned short"/>
50272 <RaiseException name="WebAPIException">
50275 with error type SecurityError, if this attribute is not allowed.
50281 <Attribute readonly="readonly" name="mnc" id="::SystemInfo::SystemInfoSIM::mnc">
50282 <webidl> readonly attribute unsigned short mnc raises(<ref>WebAPIException</ref>);</webidl>
50285 Represents the Mobile Network Code (MNC) of SIM provider.
50294 http://tizen.org/privilege/system
50297 <Type type="unsigned short"/>
50299 <RaiseException name="WebAPIException">
50302 with error type SecurityError, if this attribute is not allowed.
50308 <Attribute readonly="readonly" name="msin" id="::SystemInfo::SystemInfoSIM::msin">
50309 <webidl> readonly attribute DOMString msin raises(<ref>WebAPIException</ref>);</webidl>
50312 Represents the Mobile Subscription Identification Number (MSIN) of SIM provider.
50321 http://tizen.org/privilege/systemmanager
50324 <Type type="DOMString"/>
50326 <RaiseException name="WebAPIException">
50329 with error type SecurityError, if this attribute is not allowed.
50335 <Attribute readonly="readonly" name="spn" id="::SystemInfo::SystemInfoSIM::spn">
50336 <webidl> readonly attribute DOMString spn raises(<ref>WebAPIException</ref>);</webidl>
50339 Represents the Service Provider Name (SPN) of SIM card.
50348 http://tizen.org/privilege/system
50351 <Type type="DOMString"/>
50353 <RaiseException name="WebAPIException">
50356 with error type SecurityError, if this attribute is not allowed.
50363 <Interface name="SystemInfoPeripheral" id="::SystemInfo::SystemInfoPeripheral">
50364 <webidl> [NoInterfaceObject] interface SystemInfoPeripheral : <ref>SystemInfoProperty</ref> {
50366 readonly attribute boolean isVideoOutputOn;
50370 This property reflects the peripheral information of the current device.
50376 <ExtendedAttributeList>
50377 <ExtendedAttribute name="NoInterfaceObject">
50378 <webidl>NoInterfaceObject</webidl>
50379 </ExtendedAttribute>
50380 </ExtendedAttributeList>
50381 <InterfaceInheritance>
50382 <Name name="SystemInfoProperty"/>
50383 </InterfaceInheritance>
50384 <Attribute readonly="readonly" name="isVideoOutputOn" id="::SystemInfo::SystemInfoPeripheral::isVideoOutputOn">
50385 <webidl> readonly attribute boolean isVideoOutputOn;</webidl>
50388 Represents the video out status.
50394 <Type type="boolean"/>
50398 <Module name="SystemSetting" id="::SystemSetting">
50399 <webidl>module SystemSetting {
50401 [NoInterfaceObject] interface SystemSettingObject {
50402 readonly attribute <ref>SystemSettingManager</ref> systemsetting;
50404 <ref>Tizen</ref> implements <ref>SystemSettingObject</ref>;
50406 enum SystemSettingType {"HOME_SCREEN", "LOCK_SCREEN", "INCOMING_CALL", "NOTIFICATION_EMAIL"};
50408 [NoInterfaceObject] interface SystemSettingManager {
50410 void setProperty(<ref>SystemSettingType</ref> type,
50412 <ref>SuccessCallback</ref> successCallback,
50413 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);
50415 void getProperty(<ref>SystemSettingType</ref> type,
50416 <ref>SystemSettingSuccessCallback</ref> successCallback,
50417 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);
50421 [Callback=FunctionOnly, NoInterfaceObject] interface SystemSettingSuccessCallback {
50422 void onsuccess(DOMString value);
50428 This API provides interfaces and methods providing Web applications with access to various values of the system.
50432 This API provides an interface and method through features such as:
50440 INCOMING_CALL </li>
50442 NOTIFICATION_EMAIL </li>
50445 For more information on the SystemSetting features, see <a href="../../org.tizen.web.appprogramming/html/guide/sys_guide/systemsetting.htm">System Setting Guide</a>.
50452 <Interface name="SystemSettingObject" id="::SystemSetting::SystemSettingObject">
50453 <webidl> [NoInterfaceObject] interface SystemSettingObject {
50454 readonly attribute <ref>SystemSettingManager</ref> systemsetting;
50458 This interface defines what is instantiated by the <em>Tizen </em>object from the Tizen Platform.
50462 There will be a <em>tizen.systemsetting </em>object that allows accessing the functionality of the SystemSetting API.
50469 <ExtendedAttributeList>
50470 <ExtendedAttribute name="NoInterfaceObject">
50471 <webidl>NoInterfaceObject</webidl>
50472 </ExtendedAttribute>
50473 </ExtendedAttributeList>
50474 <Attribute readonly="readonly" name="systemsetting" id="::SystemSetting::SystemSettingObject::systemsetting">
50475 <webidl> readonly attribute <ref>SystemSettingManager</ref> systemsetting;</webidl>
50476 <Type name="SystemSettingManager"/>
50479 <Implements name1="Tizen" name2="SystemSettingObject">
50480 <webidl> <ref>Tizen</ref> implements <ref>SystemSettingObject</ref>;</webidl>
50482 <Enum name="SystemSettingType" id="::SystemSetting::SystemSettingType">
50483 <webidl> enum SystemSettingType {"HOME_SCREEN", "LOCK_SCREEN", "INCOMING_CALL", "NOTIFICATION_EMAIL"};</webidl>
50486 This enumerator indicates the type of supported system setting.
50487 The following values are supported in this release:
50492 HOME_SCREEN - For homescreen background image. </li>
50494 LOCK_SCREEN - For lockscreen background image. </li>
50496 INCOMING_CALL - For incoming call ringtone. </li>
50498 NOTIFICATION_EMAIL - For email notification alert tone. </li>
50501 Defines supporting setting types.
50502 The HOME_SCREEN and LOCK_SCREEN are supported for images files.
50503 The INCOMING_CALL and NOTIFICATION_EMAIL are support for sound files.
50510 <EnumValue stringvalue="HOME_SCREEN">
50511 <webidl>"HOME_SCREEN</webidl>
50513 <EnumValue stringvalue="LOCK_SCREEN">
50514 <webidl> "LOCK_SCREEN</webidl>
50516 <EnumValue stringvalue="INCOMING_CALL">
50517 <webidl> "INCOMING_CALL</webidl>
50519 <EnumValue stringvalue="NOTIFICATION_EMAIL">
50520 <webidl> "NOTIFICATION_EMAIL</webidl>
50523 <Interface name="SystemSettingManager" id="::SystemSetting::SystemSettingManager">
50524 <webidl> [NoInterfaceObject] interface SystemSettingManager {
50526 void setProperty(<ref>SystemSettingType</ref> type,
50528 <ref>SuccessCallback</ref> successCallback,
50529 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);
50531 void getProperty(<ref>SystemSettingType</ref> type,
50532 <ref>SystemSettingSuccessCallback</ref> successCallback,
50533 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);
50538 This is the top-level interface for the SystemSetting API that provides
50539 access to the module functionalities.
50542 <ExtendedAttributeList>
50543 <ExtendedAttribute name="NoInterfaceObject">
50544 <webidl>NoInterfaceObject</webidl>
50545 </ExtendedAttribute>
50546 </ExtendedAttributeList>
50547 <Operation name="setProperty" id="::SystemSetting::SystemSettingManager::setProperty">
50548 <webidl> void setProperty(<ref>SystemSettingType</ref> type,
50550 <ref>SuccessCallback</ref> successCallback,
50551 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);</webidl>
50554 Sets the property of a device.
50558 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.
50566 The ErrorCallback is launched with these error types:
50570 TypeMismatchError - If any input parameter is not compatible with the expected type for that parameter. </li>
50572 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
50574 UnknownError - If any other error occurs. </li>
50581 http://tizen.org/privilege/setting
50583 <Code> // Define the success callback
50584 function successCallback() {
50585 console.log("Success to setProperty");
50588 // Define the error callback.
50589 function errorCallback(error) {
50590 console.log("Fail to setProperty" + error.message);
50593 tizen.systemsetting.setProperty("HOME_SCREEN", "/opt/usr/media/Images/image1.jpg", successCallback, errorCallback);
50597 <Type type="void"/>
50599 <Argument name="type">
50602 The setting type to set.
50605 <Type name="SystemSettingType"/>
50607 <Argument name="value">
50610 The location path of a wallpaper or ringtone file.
50613 <Type type="DOMString"/>
50615 <Argument name="successCallback">
50618 To be invoked if the setting value is successfully set.
50621 <Type name="SuccessCallback"/>
50623 <Argument optional="optional" name="errorCallback">
50626 To be invoked if the setting value cannot be set.
50629 <Type name="ErrorCallback" nullable="nullable"/>
50633 <RaiseException name="WebAPIException">
50636 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
50639 with error type NotSupportedError, if this feature is not supported.
50642 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
50645 with error type SecurityError, if this functionality is not allowed.
50648 with error type UnknownError in any other error case.
50654 <Operation name="getProperty" id="::SystemSetting::SystemSettingManager::getProperty">
50655 <webidl> void getProperty(<ref>SystemSettingType</ref> type,
50656 <ref>SystemSettingSuccessCallback</ref> successCallback,
50657 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);</webidl>
50660 Gets the value of the property of a device.
50664 This method allows the user to get the value of the specified system property as wallpaper or ringtone of a device.
50672 The ErrorCallback is launched with these error types:
50676 TypeMismatchError - If any input parameter is not compatible with the expected type for that parameter. </li>
50678 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
50680 UnknownError - If any other error occurs. </li>
50683 <Code> // Define the success callback
50684 function getPropertySuccessCallback(value) {
50685 console.log("Success to getProperty : " + value);
50688 // Define the error callback.
50689 function errorCallback(error) {
50690 console.log("Fail to getProperty" + error.message);
50693 tizen.systemsetting.getProperty("HOME_SCREEN", getPropertySuccessCallback, errorCallback);
50697 <Type type="void"/>
50699 <Argument name="type">
50702 The type of the property to get.
50705 <Type name="SystemSettingType"/>
50707 <Argument name="successCallback">
50710 To be invoked if the setting value is successfully retrieved.
50713 <Type name="SystemSettingSuccessCallback"/>
50715 <Argument optional="optional" name="errorCallback">
50718 To be invoked if the setting value cannot be retrieved.
50721 <Type name="ErrorCallback" nullable="nullable"/>
50725 <RaiseException name="WebAPIException">
50728 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
50731 with error type NotSupportedError, if this feature is not supported.
50734 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
50737 with error type UnknownError in any other error case.
50744 <Interface name="SystemSettingSuccessCallback" id="::SystemSetting::SystemSettingSuccessCallback">
50745 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface SystemSettingSuccessCallback {
50746 void onsuccess(DOMString value);
50750 The success callback for getProperty().
50756 <ExtendedAttributeList>
50757 <ExtendedAttribute name="Callback" value="FunctionOnly">
50758 <webidl>Callback</webidl>
50759 </ExtendedAttribute>
50760 <ExtendedAttribute name="NoInterfaceObject">
50761 <webidl> NoInterfaceObject</webidl>
50762 </ExtendedAttribute>
50763 </ExtendedAttributeList>
50764 <Operation name="onsuccess" id="::SystemSetting::SystemSettingSuccessCallback::onsuccess">
50765 <webidl> void onsuccess(DOMString value);</webidl>
50766 <Type type="void"/>
50768 <Argument name="value">
50769 <Type type="DOMString"/>
50775 <Module name="Time" id="::Time">
50776 <webidl>module Time {
50778 enum TimeDurationUnit { "MSECS", "SECS", "MINS", "HOURS", "DAYS" };
50780 [NoInterfaceObject] interface TimeManagerObject {
50781 readonly attribute <ref>TimeUtil</ref> time;
50783 <ref>Tizen</ref> implements <ref>TimeManagerObject</ref>;
50785 [NoInterfaceObject] interface TimeUtil {
50786 <ref>TZDate</ref> getCurrentDateTime() raises(<ref>WebAPIException</ref>);
50788 DOMString getLocalTimezone() raises(<ref>WebAPIException</ref>);
50790 DOMString[] getAvailableTimezones() raises(<ref>WebAPIException</ref>);
50792 DOMString getDateFormat(optional boolean? shortformat) raises(<ref>WebAPIException</ref>);
50794 DOMString getTimeFormat() raises(<ref>WebAPIException</ref>);
50796 boolean isLeapYear(long year) raises(<ref>WebAPIException</ref>);
50800 [Constructor(optional Date? datetime, optional DOMString? timezone),
50801 Constructor(long year, long month, long day, optional long? hours, optional long? minutes, optional long? seconds, optional long? milliseconds, optional DOMString? timezone)]
50806 void setDate(long date);
50810 long getFullYear();
50812 void setFullYear(long year);
50816 void setHours(long hours);
50818 long getMilliseconds();
50820 void setMilliseconds(long ms);
50824 void setMinutes(long minutes);
50828 void setMonth(long month);
50832 void setSeconds(long seconds);
50836 void setUTCDate(long date);
50840 long getUTCFullYear();
50842 void setUTCFullYear(long year);
50844 long getUTCHours();
50846 void setUTCHours(long hours);
50848 long getUTCMilliseconds();
50850 void setUTCMilliseconds(long ms);
50852 long getUTCMinutes();
50854 void setUTCMinutes(long minutes);
50856 long getUTCMonth();
50858 void setUTCMonth(long month);
50860 long getUTCSeconds();
50862 void setUTCSeconds(long seconds);
50864 DOMString getTimezone();
50866 <ref>TZDate</ref> toTimezone(DOMString tzid) raises(<ref>WebAPIException</ref>);
50868 <ref>TZDate</ref> toLocalTimezone() raises(<ref>WebAPIException</ref>);
50870 <ref>TZDate</ref> toUTC() raises(<ref>WebAPIException</ref>);
50872 <ref>TimeDuration</ref> difference(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);
50874 boolean equalsTo(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);
50876 boolean earlierThan(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);
50878 boolean laterThan(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);
50880 <ref>TZDate</ref> addDuration(<ref>TimeDuration</ref> duration) raises(<ref>WebAPIException</ref>);
50882 DOMString toLocaleDateString();
50884 DOMString toLocaleTimeString();
50886 DOMString toLocaleString();
50888 DOMString toDateString();
50890 DOMString toTimeString();
50892 DOMString toString();
50894 DOMString getTimezoneAbbreviation() raises(<ref>WebAPIException</ref>);
50896 long secondsFromUTC() raises(<ref>WebAPIException</ref>);
50898 boolean isDST() raises(<ref>WebAPIException</ref>);
50900 <ref>TZDate</ref>? getPreviousDSTTransition() raises(<ref>WebAPIException</ref>);
50902 <ref>TZDate</ref>? getNextDSTTransition() raises(<ref>WebAPIException</ref>);
50905 [Constructor(long long length, optional <ref>TimeDurationUnit</ref>? unit)]
50906 interface TimeDuration
50908 attribute long long length;
50910 attribute <ref>TimeDurationUnit</ref> unit;
50912 <ref>TimeDuration</ref> difference(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);
50914 boolean equalsTo(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);
50916 boolean lessThan(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);
50918 boolean greaterThan(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);
50923 The Time API provides information regarding date / time and time zones.
50930 The JavaScript Date object does not have full timezone support.
50931 Date objects allow only simple representations to denote a particular location's
50932 offset from Universal Coordinated Time (UTC). This is typically provided as a +/-
50933 offset from UTC-0 (also known as Greenwich Mean Time, or GMT) for example, +05:30 denotes
50934 that a location is 5 hours and 30 minutes ahead of UTC +00:00.
50935 The issue with this method is not getting the correct
50936 local time for a given date. The existing methods are sufficient for this purpose.
50937 The issue is correctly converting to and from local time and UTC for all points in
50938 time - in any of the past, present, and future - based on an initial time provided.
50939 This is important for defining relative dates, where a time in a given location may
50940 observe different UTC offsets, according to any Daylight Savings Rules (DST) in effect
50941 or any other changes that may occur to a location's time zone over time.
50942 Without the communication of the explicit time zone rules governing a given date and
50943 time, the ability to effectively calculate the offset of the local time to UTC or to
50944 any other time zone at any point in the past or future is lost.
50947 This API can be used to get TZDate objects with full time zone support, convert them
50948 between timezones, retrieve available timezones.
50951 For more information on the Time features, see <a href="../../org.tizen.web.appprogramming/html/guide/sys_guide/time.htm">Time Guide</a>.
50955 <Enum name="TimeDurationUnit" id="::Time::TimeDurationUnit">
50956 <webidl> enum TimeDurationUnit { "MSECS", "SECS", "MINS", "HOURS", "DAYS" };</webidl>
50959 TimeDuration unit (milliseconds, seconds, minutes, hours or days).
50963 At least the following values must be supported:
50967 MSECS - Indicates a duration in milliseconds </li>
50969 SECS - Indicates a duration in seconds </li>
50971 MINS - Indicates a duration in minutes </li>
50973 HOURS - Indicates a duration in hours </li>
50975 DAYS - Indicates a duration in days </li>
50982 <EnumValue stringvalue="MSECS">
50983 <webidl> "MSECS</webidl>
50985 <EnumValue stringvalue="SECS">
50986 <webidl> "SECS</webidl>
50988 <EnumValue stringvalue="MINS">
50989 <webidl> "MINS</webidl>
50991 <EnumValue stringvalue="HOURS">
50992 <webidl> "HOURS</webidl>
50994 <EnumValue stringvalue="DAYS">
50995 <webidl> "DAYS</webidl>
50998 <Interface name="TimeManagerObject" id="::Time::TimeManagerObject">
50999 <webidl> [NoInterfaceObject] interface TimeManagerObject {
51000 readonly attribute <ref>TimeUtil</ref> time;
51004 Defines what is instantiated in the tizen object by the Tizen Platform.
51008 There will be a tizen.time object that allows accessing the
51009 functionality of the Time API.
51016 <ExtendedAttributeList>
51017 <ExtendedAttribute name="NoInterfaceObject">
51018 <webidl>NoInterfaceObject</webidl>
51019 </ExtendedAttribute>
51020 </ExtendedAttributeList>
51021 <Attribute readonly="readonly" name="time" id="::Time::TimeManagerObject::time">
51022 <webidl> readonly attribute <ref>TimeUtil</ref> time;</webidl>
51023 <Type name="TimeUtil"/>
51026 <Implements name1="Tizen" name2="TimeManagerObject">
51027 <webidl> <ref>Tizen</ref> implements <ref>TimeManagerObject</ref>;</webidl>
51029 <Interface name="TimeUtil" id="::Time::TimeUtil">
51030 <webidl> [NoInterfaceObject] interface TimeUtil {
51031 <ref>TZDate</ref> getCurrentDateTime() raises(<ref>WebAPIException</ref>);
51033 DOMString getLocalTimezone() raises(<ref>WebAPIException</ref>);
51035 DOMString[] getAvailableTimezones() raises(<ref>WebAPIException</ref>);
51037 DOMString getDateFormat(optional boolean? shortformat) raises(<ref>WebAPIException</ref>);
51039 DOMString getTimeFormat() raises(<ref>WebAPIException</ref>);
51041 boolean isLeapYear(long year) raises(<ref>WebAPIException</ref>);
51045 The TimeUtil class that provides access to the time API.
51049 This interface offers methods to manage date / time as well as timezones such as:
51053 Get the current date / time using getCurrentDateTime(). </li>
51055 Get timezones using getLocalTimezone() and getAvailableTimezones(). </li>
51062 <ExtendedAttributeList>
51063 <ExtendedAttribute name="NoInterfaceObject">
51064 <webidl>NoInterfaceObject</webidl>
51065 </ExtendedAttribute>
51066 </ExtendedAttributeList>
51067 <Operation name="getCurrentDateTime" id="::Time::TimeUtil::getCurrentDateTime">
51068 <webidl> <ref>TZDate</ref> getCurrentDateTime() raises(<ref>WebAPIException</ref>);</webidl>
51071 Returns the current date / time.
51076 <Code> var current_dt = tizen.time.getCurrentDateTime();
51077 console.log("current date / time is " + current_dt.toLocaleString());
51080 <Type name="TZDate">
51083 TZDate Current TZDate object.
51089 <RaiseException name="WebAPIException">
51092 with error type UnknownError, if the call failed due to an unknown error.
51098 <Operation name="getLocalTimezone" id="::Time::TimeUtil::getLocalTimezone">
51099 <webidl> DOMString getLocalTimezone() raises(<ref>WebAPIException</ref>);</webidl>
51102 Returns identifier of the local system timezone.
51107 <Code> console.log("The local time zone is " + tizen.time.getLocalTimezone());
51110 <Type type="DOMString">
51113 Timezone Local timezone.
51119 <RaiseException name="WebAPIException">
51122 with error type UnknownError, if the call failed due to an unknown error.
51128 <Operation name="getAvailableTimezones" id="::Time::TimeUtil::getAvailableTimezones">
51129 <webidl> DOMString[] getAvailableTimezones() raises(<ref>WebAPIException</ref>);</webidl>
51132 Returns synchronously the identifiers of the timezones supported by the device.
51136 Zero or more slashes separate different components of a timezone identifier,
51137 with the most general descriptor first and the most specific one last. For example,
51138 'Europe/Berlin', 'America/Argentina/Buenos_Aires'.
51144 <Code> var tzids = tizen.time.getAvailableTimezones();
51145 console.log("The device supports " + tzids.length + " time zones.");
51148 <Type type="array">
51151 Array of time zone identifiers.
51154 <Type type="DOMString"/>
51158 <RaiseException name="WebAPIException">
51161 with error type UnknownError, if the call failed due to an unknown error.
51167 <Operation name="getDateFormat" id="::Time::TimeUtil::getDateFormat">
51168 <webidl> DOMString getDateFormat(optional boolean? shortformat) raises(<ref>WebAPIException</ref>);</webidl>
51172 Returns the date format according to the system's locale settings.
51175 These expressions may be used in the returned string:
51179 "d" = day number (1 to 31) </li>
51181 "D" = day name </li>
51183 "m" = month number (1 to 12) </li>
51185 "M" = month name </li>
51187 "y" = year </li>
51190 Examples of string formats include: "d/m/y", "y-d-m", "D, M d y".
51197 <Type type="DOMString">
51200 DOMString The date format according to the system's locale settings.
51205 <Argument optional="optional" name="shortformat">
51208 Flag indicating if the user is interested in the short
51209 date format (23/10/2011) instead of a long date format ("Monday, October 23 2011").
51210 By default, this attribute is set to false.
51213 <Type type="boolean" nullable="nullable"/>
51217 <RaiseException name="WebAPIException">
51220 with error type UnknownError, if the call failed due to an unknown error.
51226 <Operation name="getTimeFormat" id="::Time::TimeUtil::getTimeFormat">
51227 <webidl> DOMString getTimeFormat() raises(<ref>WebAPIException</ref>);</webidl>
51231 Returns the time format according to the system's locale settings.
51234 These expressions may be used in the returned string:
51238 "h" = hours (0 to 23 or 1 to 12 if AM/PM display) </li>
51240 "m" = minutes (0 to 59) </li>
51242 "s" = seconds (0 to 59) </li>
51244 "ap" = AM/PM display </li>
51247 Examples of string formats include: "h:m:s ap", "h:m:s".
51254 <Type type="DOMString">
51257 DOMString The time format according to the system's locale settings.
51263 <RaiseException name="WebAPIException">
51266 with error type UnknownError, if the call failed due to an unknown error.
51272 <Operation name="isLeapYear" id="::Time::TimeUtil::isLeapYear">
51273 <webidl> boolean isLeapYear(long year) raises(<ref>WebAPIException</ref>);</webidl>
51276 Returns <em>true</em> if the given year is a leap year.
51281 <Code> var current_dt = tizen.time.getCurrentDateTime();
51282 var is_leap = tizen.time.isLeapYear(current_dt.getFullYear());
51284 console.log("This year is a leap year.");
51287 <Type type="boolean">
51290 boolean <em>true</em>, if the year is a leap year.
51295 <Argument name="year">
51301 <Type type="long"/>
51305 <RaiseException name="WebAPIException">
51308 with error type TypeMismatchError, if the input parameter
51309 is not compatible with the expected type for that parameter.
51312 with error type InvalidValuesError, if any of the input
51313 parameters contain an invalid value.
51316 with error type UnknownError, if the call failed due to an unknown error.
51323 <Interface name="TZDate" id="::Time::TZDate">
51324 <webidl> [Constructor(optional Date? datetime, optional DOMString? timezone),
51325 Constructor(long year, long month, long day, optional long? hours, optional long? minutes, optional long? seconds, optional long? milliseconds, optional DOMString? timezone)]
51330 void setDate(long date);
51334 long getFullYear();
51336 void setFullYear(long year);
51340 void setHours(long hours);
51342 long getMilliseconds();
51344 void setMilliseconds(long ms);
51348 void setMinutes(long minutes);
51352 void setMonth(long month);
51356 void setSeconds(long seconds);
51360 void setUTCDate(long date);
51364 long getUTCFullYear();
51366 void setUTCFullYear(long year);
51368 long getUTCHours();
51370 void setUTCHours(long hours);
51372 long getUTCMilliseconds();
51374 void setUTCMilliseconds(long ms);
51376 long getUTCMinutes();
51378 void setUTCMinutes(long minutes);
51380 long getUTCMonth();
51382 void setUTCMonth(long month);
51384 long getUTCSeconds();
51386 void setUTCSeconds(long seconds);
51388 DOMString getTimezone();
51390 <ref>TZDate</ref> toTimezone(DOMString tzid) raises(<ref>WebAPIException</ref>);
51392 <ref>TZDate</ref> toLocalTimezone() raises(<ref>WebAPIException</ref>);
51394 <ref>TZDate</ref> toUTC() raises(<ref>WebAPIException</ref>);
51396 <ref>TimeDuration</ref> difference(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);
51398 boolean equalsTo(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);
51400 boolean earlierThan(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);
51402 boolean laterThan(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);
51404 <ref>TZDate</ref> addDuration(<ref>TimeDuration</ref> duration) raises(<ref>WebAPIException</ref>);
51406 DOMString toLocaleDateString();
51408 DOMString toLocaleTimeString();
51410 DOMString toLocaleString();
51412 DOMString toDateString();
51414 DOMString toTimeString();
51416 DOMString toString();
51418 DOMString getTimezoneAbbreviation() raises(<ref>WebAPIException</ref>);
51420 long secondsFromUTC() raises(<ref>WebAPIException</ref>);
51422 boolean isDST() raises(<ref>WebAPIException</ref>);
51424 <ref>TZDate</ref>? getPreviousDSTTransition() raises(<ref>WebAPIException</ref>);
51426 <ref>TZDate</ref>? getNextDSTTransition() raises(<ref>WebAPIException</ref>);
51430 The TZDate object represents information regarding a given
51431 date / time in a predefined timezone.
51432 If its date / time is exceed the platform limit, TZDate will be invalid.
51438 <ExtendedAttributeList>
51439 <ExtendedAttribute name="Constructor">
51440 <webidl>Constructor(optional Date? datetime, optional DOMString? timezone)</webidl>
51442 <Argument optional="optional" name="datetime">
51443 <Type type="Date" nullable="nullable"/>
51445 <Argument optional="optional" name="timezone">
51446 <Type type="DOMString" nullable="nullable"/>
51449 </ExtendedAttribute>
51450 <ExtendedAttribute name="Constructor">
51451 <webidl> Constructor(long year, long month, long day, optional long? hours, optional long? minutes, optional long? seconds, optional long? milliseconds, optional DOMString? timezone)</webidl>
51456 <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>
51461 <Argument name="year">
51462 <Type type="long"/>
51464 <Argument name="month">
51465 <Type type="long"/>
51467 <Argument name="day">
51468 <Type type="long"/>
51470 <Argument optional="optional" name="hours">
51471 <Type type="long" nullable="nullable"/>
51473 <Argument optional="optional" name="minutes">
51474 <Type type="long" nullable="nullable"/>
51476 <Argument optional="optional" name="seconds">
51477 <Type type="long" nullable="nullable"/>
51479 <Argument optional="optional" name="milliseconds">
51480 <Type type="long" nullable="nullable"/>
51482 <Argument optional="optional" name="timezone">
51483 <Type type="DOMString" nullable="nullable"/>
51486 </ExtendedAttribute>
51487 </ExtendedAttributeList>
51488 <Operation name="getDate" id="::Time::TZDate::getDate">
51489 <webidl> long getDate();</webidl>
51492 Returns the day of the month (from 1-31).
51501 long The day of the month.
51507 <Operation name="setDate" id="::Time::TZDate::setDate">
51508 <webidl> void setDate(long date);</webidl>
51511 Sets the day of the month (from 1-31).
51515 If it tries to set the day bigger than the last day of the month or smaller than 1, it will be calculated automatically.
51516 For example, if TZDate's month is May and parameter is 32, it will be June 1.
51523 <Type type="void"/>
51525 <Argument name="date">
51531 <Type type="long"/>
51535 <Operation name="getDay" id="::Time::TZDate::getDay">
51536 <webidl> long getDay();</webidl>
51539 Returns the day of the week (from 0-6).
51548 long The day of the week.
51554 <Operation name="getFullYear" id="::Time::TZDate::getFullYear">
51555 <webidl> long getFullYear();</webidl>
51562 Positive values indicate AD(Anno Domini) years. 0 and negative values indicate BC(Before Christ) years.
51563 For example, 1 = AD 1, 0 = BC 1, -1 = BC 2.
51579 <Operation name="setFullYear" id="::Time::TZDate::setFullYear">
51580 <webidl> void setFullYear(long year);</webidl>
51589 <Type type="void"/>
51591 <Argument name="year">
51597 <Type type="long"/>
51601 <Operation name="getHours" id="::Time::TZDate::getHours">
51602 <webidl> long getHours();</webidl>
51605 Returns the hour (0-23).
51620 <Operation name="setHours" id="::Time::TZDate::setHours">
51621 <webidl> void setHours(long hours);</webidl>
51624 Sets the hour (0-23).
51628 If it tries to set the hour bigger than 23 or smaller than 0, it will be calculated automatically.
51629 For example, if hours is 24, it will set 0 and add to a date.
51636 <Type type="void"/>
51638 <Argument name="hours">
51644 <Type type="long"/>
51648 <Operation name="getMilliseconds" id="::Time::TZDate::getMilliseconds">
51649 <webidl> long getMilliseconds();</webidl>
51652 Returns the milliseconds (from 0-999).
51661 long The milliseconds.
51667 <Operation name="setMilliseconds" id="::Time::TZDate::setMilliseconds">
51668 <webidl> void setMilliseconds(long ms);</webidl>
51671 Sets the milliseconds (from 0-999).
51675 If it tries to set the millisecond bigger than 999 or smaller than 0, it will be calculated automatically.
51676 For example, if ms is 1000, it will set 0 and add to a second.
51683 <Type type="void"/>
51685 <Argument name="ms">
51688 Milliseconds to set.
51691 <Type type="long"/>
51695 <Operation name="getMinutes" id="::Time::TZDate::getMinutes">
51696 <webidl> long getMinutes();</webidl>
51699 Returns the minutes (from 0-59).
51714 <Operation name="setMinutes" id="::Time::TZDate::setMinutes">
51715 <webidl> void setMinutes(long minutes);</webidl>
51722 If it tries to set the minute bigger than 59 or smaller than 0, it will be calculated automatically.
51723 For example, if minutes is 60, it will set 0 and add to an hour.
51730 <Type type="void"/>
51732 <Argument name="minutes">
51738 <Type type="long"/>
51742 <Operation name="getMonth" id="::Time::TZDate::getMonth">
51743 <webidl> long getMonth();</webidl>
51746 Returns the month (from 0-11).
51761 <Operation name="setMonth" id="::Time::TZDate::setMonth">
51762 <webidl> void setMonth(long month);</webidl>
51765 Sets the month (from 0-11).
51769 If it tries to set the month bigger than 11 or smaller than 0, it will be calculated automatically.
51770 For example, if month is 12, it will set 0 and add to a year.
51777 <Type type="void"/>
51779 <Argument name="month">
51785 <Type type="long"/>
51789 <Operation name="getSeconds" id="::Time::TZDate::getSeconds">
51790 <webidl> long getSeconds();</webidl>
51793 Returns the seconds (from 0-59).
51808 <Operation name="setSeconds" id="::Time::TZDate::setSeconds">
51809 <webidl> void setSeconds(long seconds);</webidl>
51812 Sets the seconds (from 0-59).
51816 If it tries to set the second bigger than 59 or smaller than 0, it will be calculated automatically.
51817 For example, if seconds is 60, it will set 0 and add to a minute.
51824 <Type type="void"/>
51826 <Argument name="seconds">
51832 <Type type="long"/>
51836 <Operation name="getUTCDate" id="::Time::TZDate::getUTCDate">
51837 <webidl> long getUTCDate();</webidl>
51840 Returns the day of the month, according to universal time (from 1-31).
51849 long The day of the month, according to universal time.
51855 <Operation name="setUTCDate" id="::Time::TZDate::setUTCDate">
51856 <webidl> void setUTCDate(long date);</webidl>
51859 Sets the day of the month, according to universal time (from 1-31).
51863 If it tries to set the day bigger than the last day of the month or smaller than 1, it will be calculated automatically.
51864 For example, if TZDate's month is May and date is 32, it will be June 1.
51871 <Type type="void"/>
51873 <Argument name="date">
51879 <Type type="long"/>
51883 <Operation name="getUTCDay" id="::Time::TZDate::getUTCDay">
51884 <webidl> long getUTCDay();</webidl>
51887 Returns the day of the week, according to universal time (from 0-6).
51896 long The day of the week, according to universal time.
51902 <Operation name="getUTCFullYear" id="::Time::TZDate::getUTCFullYear">
51903 <webidl> long getUTCFullYear();</webidl>
51906 Returns the year, according to universal time.
51910 Positive values indicate AD(Anno Domini) years. 0 and negative values indicate BC(Before Christ) years.
51911 For example, 1 = AD 1, 0 = BC 1, -1 = BC 2.
51921 long The year, according to universal time.
51927 <Operation name="setUTCFullYear" id="::Time::TZDate::setUTCFullYear">
51928 <webidl> void setUTCFullYear(long year);</webidl>
51931 Sets the year, according to universal time.
51937 <Type type="void"/>
51939 <Argument name="year">
51945 <Type type="long"/>
51949 <Operation name="getUTCHours" id="::Time::TZDate::getUTCHours">
51950 <webidl> long getUTCHours();</webidl>
51953 Returns the hour, according to universal time (0-23).
51962 long The hour, according to universal time.
51968 <Operation name="setUTCHours" id="::Time::TZDate::setUTCHours">
51969 <webidl> void setUTCHours(long hours);</webidl>
51972 Sets the hour, according to universal time (0-23).
51976 If it tries to set the hour bigger than 23 or smaller than 0, it will be calculated automatically.
51977 For example, if hours is 24, it will set 0 and add to a date.
51984 <Type type="void"/>
51986 <Argument name="hours">
51992 <Type type="long"/>
51996 <Operation name="getUTCMilliseconds" id="::Time::TZDate::getUTCMilliseconds">
51997 <webidl> long getUTCMilliseconds();</webidl>
52000 Returns the milliseconds, according to universal time (from 0-999).
52009 long The milliseconds, according to universal time.
52015 <Operation name="setUTCMilliseconds" id="::Time::TZDate::setUTCMilliseconds">
52016 <webidl> void setUTCMilliseconds(long ms);</webidl>
52019 Sets the milliseconds, according to universal time (from 0-999).
52023 If it tries to set the millisecond bigger than 999 or smaller than 0, it will be calculated automatically.
52024 For example, if ms is 1000, it will set 0 and add to a second.
52031 <Type type="void"/>
52033 <Argument name="ms">
52036 Milliseconds to set.
52039 <Type type="long"/>
52043 <Operation name="getUTCMinutes" id="::Time::TZDate::getUTCMinutes">
52044 <webidl> long getUTCMinutes();</webidl>
52047 Returns the minutes, according to universal time (from 0-59).
52056 long The minutes, according to universal time.
52062 <Operation name="setUTCMinutes" id="::Time::TZDate::setUTCMinutes">
52063 <webidl> void setUTCMinutes(long minutes);</webidl>
52066 Sets the minutes, according to universal time (from 0-59).
52070 If it tries to set the minute bigger than 59 or smaller than 0, it will be calculated automatically.
52071 For example, if minutes is 60, it will set 0 and add to an hour.
52078 <Type type="void"/>
52080 <Argument name="minutes">
52086 <Type type="long"/>
52090 <Operation name="getUTCMonth" id="::Time::TZDate::getUTCMonth">
52091 <webidl> long getUTCMonth();</webidl>
52094 Returns the month, according to universal time (from 0-11).
52103 long The month, according to universal time.
52109 <Operation name="setUTCMonth" id="::Time::TZDate::setUTCMonth">
52110 <webidl> void setUTCMonth(long month);</webidl>
52113 Sets the month, according to universal time (from 0-11).
52117 If it tries to set the month bigger than 11 or smaller than 0, it will be calculated automatically.
52118 For example, if month is 12, it will set 0 and add to a year.
52125 <Type type="void"/>
52127 <Argument name="month">
52133 <Type type="long"/>
52137 <Operation name="getUTCSeconds" id="::Time::TZDate::getUTCSeconds">
52138 <webidl> long getUTCSeconds();</webidl>
52141 Returns the seconds, according to universal time (from 0-59).
52150 long The seconds, according to universal time.
52156 <Operation name="setUTCSeconds" id="::Time::TZDate::setUTCSeconds">
52157 <webidl> void setUTCSeconds(long seconds);</webidl>
52160 Sets the seconds, according to universal time (from 0-59).
52164 If it tries to set the second bigger than 59 or smaller than 0, it will be calculated automatically.
52165 For example, if seconds is 60, it will set 0 and add to a minute.
52172 <Type type="void"/>
52174 <Argument name="seconds">
52180 <Type type="long"/>
52184 <Operation name="getTimezone" id="::Time::TZDate::getTimezone">
52185 <webidl> DOMString getTimezone();</webidl>
52188 Returns timezone identifier.
52192 Zero or more slashes separate different components, with the most general
52193 descriptor first and the most specific one last. For example,
52194 'Europe/Berlin', 'America/Argentina/Buenos_Aires'.
52197 This attribute uniquely identifies the timezone.
52204 <Type type="DOMString">
52207 DOMString String timezone identifier. If TZDate is invalid, it will return 'Invalid Date'.
52213 <Operation name="toTimezone" id="::Time::TZDate::toTimezone">
52214 <webidl> <ref>TZDate</ref> toTimezone(DOMString tzid) raises(<ref>WebAPIException</ref>);</webidl>
52217 Returns a copy of the TZDate converted to a given time zone.
52223 <Type name="TZDate">
52226 TZDate New TZDate in given Timezone.
52231 <Argument name="tzid">
52234 Timezone identifier to set.
52237 <Type type="DOMString"/>
52241 <RaiseException name="WebAPIException">
52244 with error type TypeMismatchError, if the input parameter
52245 is not compatible with the expected type for that parameter.
52248 with error type InvalidValuesError, if the provided TZID
52249 is not recognized as a valid timezone identifier.
52252 with error type UnknownError, if the call failed due to an unknown error.
52258 <Operation name="toLocalTimezone" id="::Time::TZDate::toLocalTimezone">
52259 <webidl> <ref>TZDate</ref> toLocalTimezone() raises(<ref>WebAPIException</ref>);</webidl>
52262 Returns a copy of the TZDate converted to the local time zone.
52268 <Type name="TZDate">
52271 TZDate The new TZDate in local Timezone.
52277 <RaiseException name="WebAPIException">
52280 with error type UnknownError, if the call failed due to an unknown error.
52286 <Operation name="toUTC" id="::Time::TZDate::toUTC">
52287 <webidl> <ref>TZDate</ref> toUTC() raises(<ref>WebAPIException</ref>);</webidl>
52290 Returns a copy of the TZDate converted to Coordinated Universal Time (UTC).
52296 <Type name="TZDate">
52299 TZDate Date/Time in UTC.
52305 <RaiseException name="WebAPIException">
52308 with error type UnknownError, if the call failed due to an unknown error.
52314 <Operation name="difference" id="::Time::TZDate::difference">
52315 <webidl> <ref>TimeDuration</ref> difference(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);</webidl>
52318 Calculates the difference with another TZDate object.
52322 Calculates the difference in time between <em>this</em> and other.
52323 This comparison method takes timezones into consideration for the comparison.
52326 The TimeDuration that is returned is effectively <em>this</em> - other.
52327 The return value is a duration in milliseconds both TZDate objects have a time component, in days, otherwise.
52328 The result value will be:
52332 Negative, if other is in the future </li>
52334 0 if the two date / times are equal </li>
52336 Positive, if other is in the past </li>
52343 <Type name="TimeDuration">
52346 TimeDuration Duration in milliseconds between the two date / time objects
52347 (or in days for comparison between dates with no time component).
52352 <Argument name="other">
52355 Other Date/Time to compare to.
52358 <Type name="TZDate"/>
52362 <RaiseException name="WebAPIException">
52365 with error type TypeMismatchError, if the input parameter
52366 is not compatible with the expected type for that parameter.
52369 with error type UnknownError, if the call failed due to an unknown error.
52375 <Operation name="equalsTo" id="::Time::TZDate::equalsTo">
52376 <webidl> boolean equalsTo(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);</webidl>
52379 Checks if the TZDate is equal to another.
52383 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.
52390 <Type type="boolean">
52393 boolean <em>true</em> if the 2 date/times are the same.
52398 <Argument name="other">
52401 Other Date/Time to compare to.
52404 <Type name="TZDate"/>
52408 <RaiseException name="WebAPIException">
52411 with error type TypeMismatchError, if the input parameter
52412 is not compatible with the expected type for that parameter.
52415 with error type UnknownError, if the call failed due to an unknown error.
52421 <Operation name="earlierThan" id="::Time::TZDate::earlierThan">
52422 <webidl> boolean earlierThan(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);</webidl>
52425 Checks if the TZDate is earlier than another.
52429 This method takes the timezones into consideration.
52436 <Type type="boolean">
52439 boolean <em>true</em>, if the Date/Time is earlier than the one passed in argument.
52444 <Argument name="other">
52447 Other Date/Time to compare to.
52450 <Type name="TZDate"/>
52454 <RaiseException name="WebAPIException">
52457 with error type TypeMismatchError, if the input parameter
52458 is not compatible with the expected type for that parameter.
52461 with error type UnknownError, if the call failed due to an unknown error.
52467 <Operation name="laterThan" id="::Time::TZDate::laterThan">
52468 <webidl> boolean laterThan(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);</webidl>
52471 Checks if the TZDate is later than another.
52475 This method takes the timezones into consideration.
52482 <Type type="boolean">
52485 boolean <em>true</em>, if the Date/Time is later than the one passed in argument.
52490 <Argument name="other">
52493 Other Date/Time to compare to.
52496 <Type name="TZDate"/>
52500 <RaiseException name="WebAPIException">
52503 with error type TypeMismatchError, if the input parameter
52504 is not compatible with the expected type for that parameter.
52507 with error type UnknownError, if the call failed due to an unknown error.
52513 <Operation name="addDuration" id="::Time::TZDate::addDuration">
52514 <webidl> <ref>TZDate</ref> addDuration(<ref>TimeDuration</ref> duration) raises(<ref>WebAPIException</ref>);</webidl>
52517 Returns a new date by adding a duration to the current TZDate object.
52521 If the length of duration is negative, the new date / time will be
52522 earlier than it used to.
52525 Note that calling this method does not alter the current object.
52531 <Code> var now = tizen.time.getCurrentDateTime();
52532 var in_one_week = now.addDuration(new tizen.TimeDuration(7, "DAYS"));
52535 <Type name="TZDate">
52538 TZDate The new TZDate by adding a duration.
52543 <Argument name="duration">
52546 TimeDuration to add.
52549 <Type name="TimeDuration"/>
52553 <RaiseException name="WebAPIException">
52556 with error type TypeMismatchError, if the input parameter
52557 is not compatible with the expected type for that parameter.
52560 with error type UnknownError, if the call failed due to an unknown error.
52566 <Operation name="toLocaleDateString" id="::Time::TZDate::toLocaleDateString">
52567 <webidl> DOMString toLocaleDateString();</webidl>
52570 Returns the date portion of a TZDate object as a string, using locale conventions.
52576 <Type type="DOMString">
52579 DOMString Date portion of the TZDate object as a string, using locale conventions. If TZDate is invalid, it will return 'Invalid Date'.
52585 <Operation name="toLocaleTimeString" id="::Time::TZDate::toLocaleTimeString">
52586 <webidl> DOMString toLocaleTimeString();</webidl>
52589 Returns the time portion of a TZDate object as a string, using locale conventions.
52595 <Type type="DOMString">
52598 DOMString Time portion of the TZDate object as a string, using locale conventions. If TZDate is invalid, it will return 'Invalid Date'.
52604 <Operation name="toLocaleString" id="::Time::TZDate::toLocaleString">
52605 <webidl> DOMString toLocaleString();</webidl>
52608 Converts a TZDate object to a string, using locale conventions.
52614 <Type type="DOMString">
52617 DOMString String representation of the TZDate object, using locale conventions. If TZDate is invalid, it will return 'Invalid Date'.
52623 <Operation name="toDateString" id="::Time::TZDate::toDateString">
52624 <webidl> DOMString toDateString();</webidl>
52627 Returns the date portion of a TZDate object as a string.
52633 <Type type="DOMString">
52636 DOMString Date portion of the TZDate object as a string. If TZDate is invalid, it will return 'Invalid Date'.
52642 <Operation name="toTimeString" id="::Time::TZDate::toTimeString">
52643 <webidl> DOMString toTimeString();</webidl>
52646 Returns the time portion of a TZDate object as a string.
52652 <Type type="DOMString">
52655 DOMString Time portion of the TZDate object as a string. If TZDate is invalid, it will return 'Invalid Date'.
52661 <Operation name="toString" id="::Time::TZDate::toString">
52662 <webidl> DOMString toString();</webidl>
52665 Converts a TZDate object to a string.
52671 <Type type="DOMString">
52674 DOMString String representation of the TZDate object. If TZDate is invalid, it will return 'Invalid Date'.
52680 <Operation name="getTimezoneAbbreviation" id="::Time::TZDate::getTimezoneAbbreviation">
52681 <webidl> DOMString getTimezoneAbbreviation() raises(<ref>WebAPIException</ref>);</webidl>
52684 Determines the time zone abbreviation to be used at a particular date in the time zone.
52688 For example, in Toronto this is currently "EST" during the winter months and "EDT" during the
52689 summer months when daylight savings time is in effect.
52696 Some timezones return "GMT[+-]hh:mm". It is inconsistent.
52699 <Type type="DOMString">
52702 DOMString Abbreviation of the time zone (such as "EST"). If TZDate is invalid, it will return 'Invalid Date'.
52708 <RaiseException name="WebAPIException">
52711 with error type UnknownError, if the call failed due to an unknown error.
52717 <Operation name="secondsFromUTC" id="::Time::TZDate::secondsFromUTC">
52718 <webidl> long secondsFromUTC() raises(<ref>WebAPIException</ref>);</webidl>
52721 Gets the number of seconds from Coordinated Universal Time (UTC) offset for the timezone.
52725 Returns the offset (in seconds) from UTC of the timezone, accounting for daylight
52726 savings if in effect in the timezone. For example, if time zone is GMT+8, it will return -32,400.
52732 <Code> var offset = tizen.time.getCurrentDateTime().secondsFromUTC();
52733 var myDate = new Date();
52734 var exp_offset = myDate.getTimezoneOffset()*60;
52735 //offset is equals to exp_offset.
52741 long Offset from UTC in seconds.
52747 <RaiseException name="WebAPIException">
52750 with error type UnknownError, if the call failed due to an unknown error.
52756 <Operation name="isDST" id="::Time::TZDate::isDST">
52757 <webidl> boolean isDST() raises(<ref>WebAPIException</ref>);</webidl>
52760 Indicates if Daylight Saving Time(DST) is active for this TZDate.
52764 Indicates if daylight savings are in effect for the time zone and instant
52765 identified by the TZDate object.
52772 <Type type="boolean">
52775 boolean Flag indicating if daylight saving are in effect.
52781 <RaiseException name="WebAPIException">
52784 with error type UnknownError, if the call failed due to an unknown error.
52790 <Operation name="getPreviousDSTTransition" id="::Time::TZDate::getPreviousDSTTransition">
52791 <webidl> <ref>TZDate</ref>? getPreviousDSTTransition() raises(<ref>WebAPIException</ref>);</webidl>
52794 Returns the date of the previous daylight saving time transition for the timezone.
52800 <Type name="TZDate" nullable="nullable">
52803 TZDate The date of the previous daylight saving transition (before the instant identified by the TZDate).
52809 <RaiseException name="WebAPIException">
52812 with error type UnknownError, if the call failed due to an unknown error.
52818 <Operation name="getNextDSTTransition" id="::Time::TZDate::getNextDSTTransition">
52819 <webidl> <ref>TZDate</ref>? getNextDSTTransition() raises(<ref>WebAPIException</ref>);</webidl>
52822 Returns the date of the next daylight saving time transition for the timezone.
52828 <Type name="TZDate" nullable="nullable">
52831 TZDate The date of the next daylight saving transition (after the instant identified by the TZDate).
52837 <RaiseException name="WebAPIException">
52840 with error type UnknownError, if the call failed due to an unknown error.
52847 <Interface name="TimeDuration" id="::Time::TimeDuration">
52848 <webidl> [Constructor(long long length, optional <ref>TimeDurationUnit</ref>? unit)]
52849 interface TimeDuration
52851 attribute long long length;
52853 attribute <ref>TimeDurationUnit</ref> unit;
52855 <ref>TimeDuration</ref> difference(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);
52857 boolean equalsTo(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);
52859 boolean lessThan(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);
52861 boolean greaterThan(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);
52865 The TimeDuration object that contains the length and its associated
52871 <Code> var now = tizen.time.getCurrentDateTime();
52872 var tomorrow = now.addDuration(new tizen.TimeDuration(1, "DAYS")); // Becomes tomorrow, same time.
52875 <ExtendedAttributeList>
52876 <ExtendedAttribute name="Constructor">
52877 <webidl>Constructor(long long length, optional <ref>TimeDurationUnit</ref>? unit)</webidl>
52879 <Argument name="length">
52880 <Type type="long long"/>
52882 <Argument optional="optional" name="unit">
52883 <Type name="TimeDurationUnit" nullable="nullable"/>
52886 </ExtendedAttribute>
52887 </ExtendedAttributeList>
52888 <Attribute name="length" id="::Time::TimeDuration::length">
52889 <webidl> attribute long long length;</webidl>
52896 The unit of the duration length (milliseconds, seconds, minutes, hours, or days)
52897 is determined by the duration unit attribute.
52904 <Type type="long long"/>
52906 <Attribute name="unit" id="::Time::TimeDuration::unit">
52907 <webidl> attribute <ref>TimeDurationUnit</ref> unit;</webidl>
52910 Duration unit (milliseconds, seconds, minutes, hours, or days).
52914 The default value is "MSECS" (milliseconds unit).
52921 <Type name="TimeDurationUnit"/>
52923 <Operation name="difference" id="::Time::TimeDuration::difference">
52924 <webidl> <ref>TimeDuration</ref> difference(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);</webidl>
52927 Calculates the difference between two TimeDuration objects.
52931 Calculates the difference in time between <em>this</em> and <em>other</em>.
52932 The TimeDuration that is returned is effectively <em>first</em> - <em>other</em> (that is: positive if the first parameter is larger).
52935 The returned TimeDuration is the biggest possible unit without losing the precision.
52941 <Code> // Compute event1.duration - event2.duration
52942 var diff = event1.duration.difference(event2.duration);
52943 if (diff.length > 0)
52944 console.log("event 1's duration is longer than event 2's");
52945 else if (diff.length == 0)
52946 console.log("event 1's duration is as long as event 2's");
52948 console.log("event 1's duration is shorter than event 2's");
52951 <Type name="TimeDuration">
52954 New TimeDuration object corresponding to the result of <em>this</em> - <em>other</em>.
52959 <Argument name="other">
52962 Other TimeDuration object to compare to.
52965 <Type name="TimeDuration"/>
52969 <RaiseException name="WebAPIException">
52972 with error type TypeMismatchError, if the input parameter
52973 is not compatible with the expected type for that parameter.
52976 with error type UnknownError, if the call failed due to an unknown error.
52982 <Operation name="equalsTo" id="::Time::TimeDuration::equalsTo">
52983 <webidl> boolean equalsTo(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);</webidl>
52986 Checks if the TimeDuration is equal to another.
52990 This method takes the units into consideration and will return true
52991 if the two TimeDuration objects represent the same duration in different units.
52997 <Code> var d1 = new tizen.TimeDuration(60, "MINS"); // 60 minutes
52998 var d2 = new tizen.TimeDuration(1, "HOURS"); // 1 hour
52999 var ret = d1.equalsTo(d2); // Returns true
53002 <Type type="boolean">
53005 boolean <em>true</em> if the two TimeDuration object represent the same duration.
53010 <Argument name="other">
53013 Other TimeDuration object to compare to.
53016 <Type name="TimeDuration"/>
53020 <RaiseException name="WebAPIException">
53023 with error type TypeMismatchError, if the input parameter
53024 is not compatible with the expected type for that parameter.
53027 with error type UnknownError, if the call failed due to an unknown error.
53033 <Operation name="lessThan" id="::Time::TimeDuration::lessThan">
53034 <webidl> boolean lessThan(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);</webidl>
53037 Checks if the TimeDuration is lower than another.
53041 This method takes the units into consideration when doing the comparison.
53047 <Code> var d1 = new tizen.TimeDuration(1, "HOURS"); // 1 hour
53048 var d2 = new tizen.TimeDuration(120, "MINS"); // 120 minutes
53049 var ret = d1.lessThan(d2); // Returns true
53052 <Type type="boolean">
53055 boolean <em>true</em> if the TimeDuration is less than <em>other</em>.
53060 <Argument name="other">
53063 Other TimeDuration object to compare to.
53066 <Type name="TimeDuration"/>
53070 <RaiseException name="WebAPIException">
53073 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
53076 with error type UnknownError, if the call failed due to an unknown error.
53082 <Operation name="greaterThan" id="::Time::TimeDuration::greaterThan">
53083 <webidl> boolean greaterThan(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);</webidl>
53086 Checks if the TimeDuration is greater than another.
53090 This method takes the units into consideration when doing the comparison.
53096 <Code> var d1 = new tizen.TimeDuration(120, "MINS"); // 120 minutes
53097 var d2 = new tizen.TimeDuration(1, "HOURS"); // 1 hour
53098 var ret = d1.greaterThan(d2); // Returns true
53101 <Type type="boolean">
53104 boolean <em>true</em> if the TimeDuration is greater than <em>other</em>.
53109 <Argument name="other">
53112 Other TimeDuration object to compare to.
53115 <Type name="TimeDuration"/>
53119 <RaiseException name="WebAPIException">
53122 with error type TypeMismatchError, if the input parameter
53123 is not compatible with the expected type for that parameter.
53126 with error type UnknownError, if the call failed due to an unknown error.
53134 <Module name="Tizen" id="::Tizen">
53135 <webidl>module Tizen {
53136 enum FilterMatchFlag { "EXACTLY", "FULLSTRING", "CONTAINS", "STARTSWITH", "ENDSWITH", "EXISTS" };
53138 enum SortModeOrder { "ASC", "DESC" };
53140 enum CompositeFilterType { "UNION", "INTERSECTION" };
53142 [NoInterfaceObject] interface TizenObject {
53143 readonly attribute <ref>Tizen</ref> tizen;
53145 <ref>Window</ref> implements <ref>TizenObject</ref>;
53147 [NoInterfaceObject] interface Tizen {
53150 [NoInterfaceObject] interface AbstractFilter {
53153 [Constructor(DOMString attributeName, optional <ref>FilterMatchFlag</ref>? matchFlag, optional any matchValue)]
53154 interface AttributeFilter : <ref>AbstractFilter</ref> {
53155 attribute DOMString attributeName;
53157 attribute <ref>FilterMatchFlag</ref> matchFlag setraises(<ref>WebAPIException</ref>);
53159 attribute any matchValue;
53162 [Constructor(DOMString attributeName, optional any initialValue, optional any endValue)]
53163 interface AttributeRangeFilter : <ref>AbstractFilter</ref> {
53164 attribute DOMString attributeName;
53166 attribute any initialValue;
53168 attribute any endValue;
53171 [Constructor(<ref>CompositeFilterType</ref> type, optional <ref>AbstractFilter</ref>[]? filters)]
53172 interface CompositeFilter : <ref>AbstractFilter</ref> {
53174 attribute <ref>CompositeFilterType</ref> type;
53176 attribute <ref>AbstractFilter</ref>[] filters;
53179 [Constructor(DOMString attributeName, optional <ref>SortModeOrder</ref>? order)]
53180 interface SortMode {
53181 attribute DOMString attributeName;
53183 attribute <ref>SortModeOrder</ref> order setraises(<ref>WebAPIException</ref>);
53186 [Constructor(double latitude, double longitude)]
53187 interface SimpleCoordinates {
53188 attribute double latitude setraises(<ref>WebAPIException</ref>);
53190 attribute double longitude setraises(<ref>WebAPIException</ref>);
53193 [NoInterfaceObject]
53194 interface WebAPIException {
53195 readonly attribute unsigned short code;
53197 readonly attribute DOMString name;
53199 readonly attribute DOMString message;
53201 const unsigned short INDEX_SIZE_ERR = 1;
53202 const unsigned short DOMSTRING_SIZE_ERR = 2;
53203 const unsigned short HIERARCHY_REQUEST_ERR = 3;
53204 const unsigned short WRONG_DOCUMENT_ERR = 4;
53205 const unsigned short INVALID_CHARACTER_ERR = 5;
53206 const unsigned short NO_DATA_ALLOWED_ERR = 6;
53207 const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7;
53208 const unsigned short NOT_FOUND_ERR = 8;
53209 const unsigned short NOT_SUPPORTED_ERR = 9;
53210 const unsigned short INUSE_ATTRIBUTE_ERR = 10;
53211 const unsigned short INVALID_STATE_ERR = 11;
53212 const unsigned short SYNTAX_ERR = 12;
53213 const unsigned short INVALID_MODIFICATION_ERR = 13;
53214 const unsigned short NAMESPACE_ERR = 14;
53215 const unsigned short INVALID_ACCESS_ERR = 15;
53216 const unsigned short VALIDATION_ERR = 16;
53217 const unsigned short TYPE_MISMATCH_ERR = 17;
53218 const unsigned short SECURITY_ERR = 18;
53219 const unsigned short NETWORK_ERR = 19;
53220 const unsigned short ABORT_ERR = 20;
53221 const unsigned short URL_MISMATCH_ERR = 21;
53222 const unsigned short QUOTA_EXCEEDED_ERR = 22;
53223 const unsigned short TIMEOUT_ERR = 23;
53224 const unsigned short INVALID_NODE_TYPE_ERR = 24;
53225 const unsigned short DATA_CLONE_ERR = 25;
53228 [NoInterfaceObject]
53229 interface WebAPIError {
53230 readonly attribute unsigned short code;
53232 readonly attribute DOMString name;
53234 readonly attribute DOMString message;
53237 [Callback=FunctionOnly, NoInterfaceObject]
53238 interface SuccessCallback {
53242 [Callback=FunctionOnly, NoInterfaceObject]
53243 interface ErrorCallback {
53245 void onerror (<ref>WebAPIError</ref> error);
53250 This API provides common Tizen functionality.
53254 The API provides the basic definitions that are used in the Tizen Web Device API.
53255 These include generic callbacks that are invoked when the operations succeed or fail,
53256 WebAPIError and WebAPIException that gives information of the platform's error and
53257 filters interfaces that are used to make query for searching.
53260 Additionally, this API specifies the location in the ECMAScript hierarchy in which
53261 the Tizen Web Device API is instantiated (<em>window.tizen</em>).
53264 For more information on the Tizen features, see <a href="../../org.tizen.web.appprogramming/html/guide/tizen_guide/tizen.htm">Tizen Guide</a>.
53271 <Enum name="FilterMatchFlag" id="::Tizen::FilterMatchFlag">
53272 <webidl> enum FilterMatchFlag { "EXACTLY", "FULLSTRING", "CONTAINS", "STARTSWITH", "ENDSWITH", "EXISTS" };</webidl>
53279 These values are supported:
53283 EXACTLY - Indicates that an attribute value should match exactly with the specified default value.
53284 For strings, this type of comparison is case-sensitive. </li>
53286 FULLSTRING - Indicates String-based comparison and that the attribute value should match the whole string (case insensitive). </li>
53288 CONTAINS - Indicates that an attribute value should contain the specified string. This type of comparison works only on strings and is case insensitive. </li>
53290 STARTSWITH - Indicates that an attribute value should start with the specified string.
53291 This type of comparison works only on strings and is case insensitive. </li>
53293 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>
53295 EXISTS - Indicates that a filter comparison should match if the specified attribute exists. </li>
53302 <EnumValue stringvalue="EXACTLY">
53303 <webidl> "EXACTLY</webidl>
53305 <EnumValue stringvalue="FULLSTRING">
53306 <webidl> "FULLSTRING</webidl>
53308 <EnumValue stringvalue="CONTAINS">
53309 <webidl> "CONTAINS</webidl>
53311 <EnumValue stringvalue="STARTSWITH">
53312 <webidl> "STARTSWITH</webidl>
53314 <EnumValue stringvalue="ENDSWITH">
53315 <webidl> "ENDSWITH</webidl>
53317 <EnumValue stringvalue="EXISTS">
53318 <webidl> "EXISTS</webidl>
53321 <Enum name="SortModeOrder" id="::Tizen::SortModeOrder">
53322 <webidl> enum SortModeOrder { "ASC", "DESC" };</webidl>
53325 An enumerator that indicates the sorting order.
53329 The following values are supported:
53333 ASC - Indicates the sorting order is ascending </li>
53335 DESC - Indicates the sorting order is descending </li>
53342 <EnumValue stringvalue="ASC">
53343 <webidl> "ASC</webidl>
53345 <EnumValue stringvalue="DESC">
53346 <webidl> "DESC</webidl>
53349 <Enum name="CompositeFilterType" id="::Tizen::CompositeFilterType">
53350 <webidl> enum CompositeFilterType { "UNION", "INTERSECTION" };</webidl>
53353 An enumerator that indicates the type of composite filter.
53357 The following values are supported:
53361 UNION - Indicates that the composite is a union of filters ("OR" operator) </li>
53363 INTERSECTION - Indicates that the composite is an intersection of filters ("AND" operator) </li>
53370 <EnumValue stringvalue="UNION">
53371 <webidl> "UNION</webidl>
53373 <EnumValue stringvalue="INTERSECTION">
53374 <webidl> "INTERSECTION</webidl>
53377 <Interface name="TizenObject" id="::Tizen::TizenObject">
53378 <webidl> [NoInterfaceObject] interface TizenObject {
53379 readonly attribute <ref>Tizen</ref> tizen;
53383 Defines the tizen interface as a part of the window global object.
53387 The <em>Tizen</em> interface is always available within the <em>Window </em>object in the ECMAScript hierarchy.
53394 <ExtendedAttributeList>
53395 <ExtendedAttribute name="NoInterfaceObject">
53396 <webidl>NoInterfaceObject</webidl>
53397 </ExtendedAttribute>
53398 </ExtendedAttributeList>
53399 <Attribute readonly="readonly" name="tizen" id="::Tizen::TizenObject::tizen">
53400 <webidl> readonly attribute <ref>Tizen</ref> tizen;</webidl>
53401 <Type name="Tizen"/>
53404 <Implements name1="Window" name2="TizenObject">
53405 <webidl> <ref>Window</ref> implements <ref>TizenObject</ref>;</webidl>
53407 <Interface name="Tizen" id="::Tizen::Tizen">
53408 <webidl> [NoInterfaceObject] interface Tizen {
53412 The root of Tizen Web Device API.
53416 This is the Tizen root interface.
53417 It is a property of the ECMAScript global object, as specified by the <em>TizenObject</em> interface.
53424 <ExtendedAttributeList>
53425 <ExtendedAttribute name="NoInterfaceObject">
53426 <webidl>NoInterfaceObject</webidl>
53427 </ExtendedAttribute>
53428 </ExtendedAttributeList>
53430 <Interface name="AbstractFilter" id="::Tizen::AbstractFilter">
53431 <webidl> [NoInterfaceObject] interface AbstractFilter {
53435 This is a common interface used by different types of
53440 Never use this base interface directly, instead use <em>AbstractFilter</em> subtypes,
53441 such as <em>AttributeFilter</em>, <em>AttributeRangeFilter</em>, and <em>CompositeFilter</em>.
53448 <ExtendedAttributeList>
53449 <ExtendedAttribute name="NoInterfaceObject">
53450 <webidl>NoInterfaceObject</webidl>
53451 </ExtendedAttribute>
53452 </ExtendedAttributeList>
53454 <Interface name="AttributeFilter" id="::Tizen::AttributeFilter">
53455 <webidl> [Constructor(DOMString attributeName, optional <ref>FilterMatchFlag</ref>? matchFlag, optional any matchValue)]
53456 interface AttributeFilter : <ref>AbstractFilter</ref> {
53457 attribute DOMString attributeName;
53459 attribute <ref>FilterMatchFlag</ref> matchFlag setraises(<ref>WebAPIException</ref>);
53461 attribute any matchValue;
53465 This interface represents a set of filter.
53469 It represents the query statement for the specified value of the <em>matchValue</em> by the rule of <em>matchFlag</em>.
53472 If no <em>matchValue</em> is defined, the filter will match all objects that have the attribute
53473 defined (same as the "EXISTS" filter works), otherwise, it will only match objects which have an attribute that matches
53474 the specified value.
53480 <Code> // Define success callback
53481 function successCallback(contacts) {
53482 console.log(contacts.length + " contacts found.");
53485 // Define error callback
53486 function errorCallback(error) {
53487 console.log("An error occurred: " + error.message);
53490 // Create an attribute filter based on first name: "First name should contain 'Chris' (case insensitive)"
53491 var filter = new tizen.AttributeFilter("name.firstName", "CONTAINS", "Chris");
53492 // Send request on contact address book.
53493 tizen.contact.getDefaultAddressBook().find(successCallback, errorCallback, filter);
53496 <ExtendedAttributeList>
53497 <ExtendedAttribute name="Constructor">
53498 <webidl>Constructor(DOMString attributeName, optional <ref>FilterMatchFlag</ref>? matchFlag, optional any matchValue)</webidl>
53500 <Argument name="attributeName">
53501 <Type type="DOMString"/>
53503 <Argument optional="optional" name="matchFlag">
53504 <Type name="FilterMatchFlag" nullable="nullable"/>
53506 <Argument optional="optional" name="matchValue">
53510 </ExtendedAttribute>
53511 </ExtendedAttributeList>
53512 <InterfaceInheritance>
53513 <Name name="AbstractFilter"/>
53514 </InterfaceInheritance>
53515 <Attribute name="attributeName" id="::Tizen::AttributeFilter::attributeName">
53516 <webidl> attribute DOMString attributeName;</webidl>
53519 The name of the object attribute used for filtering.
53523 This is the name of the object attribute exactly as it is defined in
53524 the object's interface. For attributes of complex type, use fully-qualified names
53525 (such as 'organizations.role' to filter on a contact's role in an organization).
53528 For attributes of an array type, the filter will match if any value in the array
53536 <Type type="DOMString"/>
53538 <Attribute name="matchFlag" id="::Tizen::AttributeFilter::matchFlag">
53539 <webidl> attribute <ref>FilterMatchFlag</ref> matchFlag setraises(<ref>WebAPIException</ref>);</webidl>
53542 The match flag used for attribute-based filtering.
53546 By default, this attribute is set to "EXACTLY".
53553 <Type name="FilterMatchFlag"/>
53555 <RaiseException name="WebAPIException"/>
53558 <Attribute name="matchValue" id="::Tizen::AttributeFilter::matchValue">
53559 <webidl> attribute any matchValue;</webidl>
53562 The value used for matching.
53566 The filter will match if the attribute value matches the given matchValue.
53569 This value is not used if the <em>matchFlag</em> is set to "EXISTS".
53570 By default, this attribute is set to null.
53580 <Interface name="AttributeRangeFilter" id="::Tizen::AttributeRangeFilter">
53581 <webidl> [Constructor(DOMString attributeName, optional any initialValue, optional any endValue)]
53582 interface AttributeRangeFilter : <ref>AbstractFilter</ref> {
53583 attribute DOMString attributeName;
53585 attribute any initialValue;
53587 attribute any endValue;
53591 <em>AttributeRangeFilter</em> represents a filter based on an object attribute
53592 which has values that are within a particular range.
53596 Range filters, where only one boundary is set, are available.
53602 <Code> // Define success callback
53603 function successCallback(events) {
53604 console.log(events.length + " events today.");
53607 // Define error callback
53608 function errorCallback(error) {
53609 console.log("An error occurred: " + error.message);
53612 // Create an attribute range filter based on event start date: "All events occurring today".
53613 var now_dt = tizen.time.getCurrentDateTime();
53614 var today_begin = new tizen.TZDate(now_dt.getFullYear(), now_dt.getMonth(), now_dt.getDate());
53615 var today_end = today_begin.addDuration(new tizen.TimeDuration(1, "DAYS"));
53616 var filter = new tizen.AttributeRangeFilter("startDate", today_begin, today_end);
53618 // Send a search request to default event calendar.
53619 tizen.calendar.getDefaultCalendar("EVENT").find(successCallback, errorCallback, filter);
53622 <ExtendedAttributeList>
53623 <ExtendedAttribute name="Constructor">
53624 <webidl>Constructor(DOMString attributeName, optional any initialValue, optional any endValue)</webidl>
53626 <Argument name="attributeName">
53627 <Type type="DOMString"/>
53629 <Argument optional="optional" name="initialValue">
53632 <Argument optional="optional" name="endValue">
53636 </ExtendedAttribute>
53637 </ExtendedAttributeList>
53638 <InterfaceInheritance>
53639 <Name name="AbstractFilter"/>
53640 </InterfaceInheritance>
53641 <Attribute name="attributeName" id="::Tizen::AttributeRangeFilter::attributeName">
53642 <webidl> attribute DOMString attributeName;</webidl>
53645 The name of the object attribute used for filtering.
53649 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
53650 (such as 'organizations.role' to filter on a contact's role in an organization).
53653 For attributes of array type, the filter will match if any value in the array
53661 <Type type="DOMString"/>
53663 <Attribute name="initialValue" id="::Tizen::AttributeRangeFilter::initialValue">
53664 <webidl> attribute any initialValue;</webidl>
53667 Objects with an attribute that is greater than or equal to <em>initialValue</em> will match.
53671 By default, this attribute is set to <var>null</var>.
53680 <Attribute name="endValue" id="::Tizen::AttributeRangeFilter::endValue">
53681 <webidl> attribute any endValue;</webidl>
53684 Objects with an attribute that is strictly lower than to <em>endValue</em> will match.
53688 By default, this attribute is set to <var>null</var>.
53698 <Interface name="CompositeFilter" id="::Tizen::CompositeFilter">
53699 <webidl> [Constructor(<ref>CompositeFilterType</ref> type, optional <ref>AbstractFilter</ref>[]? filters)]
53700 interface CompositeFilter : <ref>AbstractFilter</ref> {
53702 attribute <ref>CompositeFilterType</ref> type;
53704 attribute <ref>AbstractFilter</ref>[] filters;
53708 <em>CompositeFilter</em> represents a set of filters.
53712 The composite filters can be one of the 2 types:
53716 The union - used to filter objects that match any of the filters it includes. </li>
53718 The intersection - used to filter objects that match all filters it includes. </li>
53724 <Code> // Define success callback
53725 function successCallback(contacts) {
53726 console.log(contacts.length + " contacts found.");
53729 // Define error callback
53730 function errorCallback(error) {
53731 console.log("An error occurred: " + error.message);
53734 // Create an attribute filter based on first name: "First name should contain 'Chris' (case insensitive)
53735 var firstNameFilter = new tizen.AttributeFilter("name.firstName", "CONTAINS", "Chris");
53737 // Create an attribute filter based on last name: "Last name should be exactly 'Smith' (case insensitive)
53738 var lastNameFilter = new tizen.AttributeFilter("name.lastName", "EXACTLY", "Smith"};
53740 // Create a filter based on the intersection of these two filter:
53741 // "First name should contain 'Chris' AND last name should be 'Smith'".
53742 var filter = new tizen.CompositeFilter("INTERSECTION", [firstNameFilter, lastNameFilter]);
53744 // Send request on contact address book.
53745 tizen.contact.getDefaultAddressBook().find(successCallback, errorCallback, filter);
53748 <ExtendedAttributeList>
53749 <ExtendedAttribute name="Constructor">
53750 <webidl>Constructor(<ref>CompositeFilterType</ref> type, optional <ref>AbstractFilter</ref>[]? filters)</webidl>
53752 <Argument name="type">
53753 <Type name="CompositeFilterType"/>
53755 <Argument optional="optional" name="filters">
53756 <Type type="array" nullable="nullable">
53757 <Type name="AbstractFilter"/>
53761 </ExtendedAttribute>
53762 </ExtendedAttributeList>
53763 <InterfaceInheritance>
53764 <Name name="AbstractFilter"/>
53765 </InterfaceInheritance>
53766 <Attribute name="type" id="::Tizen::CompositeFilter::type">
53767 <webidl> attribute <ref>CompositeFilterType</ref> type;</webidl>
53770 The composite filter type.
53776 <Type name="CompositeFilterType"/>
53778 <Attribute name="filters" id="::Tizen::CompositeFilter::filters">
53779 <webidl> attribute <ref>AbstractFilter</ref>[] filters;</webidl>
53782 The list of filters in the composite filter.
53788 <Type type="array">
53789 <Type name="AbstractFilter"/>
53793 <Interface name="SortMode" id="::Tizen::SortMode">
53794 <webidl> [Constructor(DOMString attributeName, optional <ref>SortModeOrder</ref>? order)]
53795 interface SortMode {
53796 attribute DOMString attributeName;
53798 attribute <ref>SortModeOrder</ref> order setraises(<ref>WebAPIException</ref>);
53802 <em>SortMode</em> is a common interface used for sorting of queried data.
53806 Note that the sorting result of list type attributes is not determined.
53812 <Code> // Define a success callback
53813 function successCallback(contacts) {
53814 // The returned contacts are sorted by first name (ascending)
53815 console.log(contacts.length + " contacts found.");
53818 // Define an error callback
53819 function errorCallback(error) {
53820 console.log("An error occurred: " + error.message);
53823 // Create an attribute filter based on first name: "First name should contain 'Chris' (case insensitive)"
53824 var filter = new tizen.AttributeFilter("name.firstName", "CONTAINS", "Chris");
53825 // Sort by first name, ascending
53826 var sortMode = new tizen.SortMode("name.firstName", "ASC");
53827 // Send request on contact address book.
53828 tizen.contact.getDefaultAddressBook().find(successCallback, errorCallback, filter, sortMode);
53831 <ExtendedAttributeList>
53832 <ExtendedAttribute name="Constructor">
53833 <webidl>Constructor(DOMString attributeName, optional <ref>SortModeOrder</ref>? order)</webidl>
53835 <Argument name="attributeName">
53836 <Type type="DOMString"/>
53838 <Argument optional="optional" name="order">
53839 <Type name="SortModeOrder" nullable="nullable"/>
53842 </ExtendedAttribute>
53843 </ExtendedAttributeList>
53844 <Attribute name="attributeName" id="::Tizen::SortMode::attributeName">
53845 <webidl> attribute DOMString attributeName;</webidl>
53848 The name of the object attribute used for sorting.
53854 <Type type="DOMString"/>
53856 <Attribute name="order" id="::Tizen::SortMode::order">
53857 <webidl> attribute <ref>SortModeOrder</ref> order setraises(<ref>WebAPIException</ref>);</webidl>
53860 The type of the sorting.
53864 By default, this attribute is set to <var>ASC</var>.
53871 <Type name="SortModeOrder"/>
53873 <RaiseException name="WebAPIException"/>
53877 <Interface name="SimpleCoordinates" id="::Tizen::SimpleCoordinates">
53878 <webidl> [Constructor(double latitude, double longitude)]
53879 interface SimpleCoordinates {
53880 attribute double latitude setraises(<ref>WebAPIException</ref>);
53882 attribute double longitude setraises(<ref>WebAPIException</ref>);
53886 <em>SimpleCoordinates</em> represents a point (latitude and longitude) in map coordinate system.
53890 Latitude and longitude are of the WGS84 datum.
53897 <ExtendedAttributeList>
53898 <ExtendedAttribute name="Constructor">
53899 <webidl>Constructor(double latitude, double longitude)</webidl>
53901 <Argument name="latitude">
53902 <Type type="double"/>
53904 <Argument name="longitude">
53905 <Type type="double"/>
53908 </ExtendedAttribute>
53909 </ExtendedAttributeList>
53910 <Attribute name="latitude" id="::Tizen::SimpleCoordinates::latitude">
53911 <webidl> attribute double latitude setraises(<ref>WebAPIException</ref>);</webidl>
53920 <Type type="double"/>
53922 <RaiseException name="WebAPIException"/>
53925 <Attribute name="longitude" id="::Tizen::SimpleCoordinates::longitude">
53926 <webidl> attribute double longitude setraises(<ref>WebAPIException</ref>);</webidl>
53935 <Type type="double"/>
53937 <RaiseException name="WebAPIException"/>
53941 <Interface name="WebAPIException" id="::Tizen::WebAPIException">
53942 <webidl> [NoInterfaceObject]
53943 interface WebAPIException {
53944 readonly attribute unsigned short code;
53946 readonly attribute DOMString name;
53948 readonly attribute DOMString message;
53950 const unsigned short INDEX_SIZE_ERR = 1;
53951 const unsigned short DOMSTRING_SIZE_ERR = 2;
53952 const unsigned short HIERARCHY_REQUEST_ERR = 3;
53953 const unsigned short WRONG_DOCUMENT_ERR = 4;
53954 const unsigned short INVALID_CHARACTER_ERR = 5;
53955 const unsigned short NO_DATA_ALLOWED_ERR = 6;
53956 const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7;
53957 const unsigned short NOT_FOUND_ERR = 8;
53958 const unsigned short NOT_SUPPORTED_ERR = 9;
53959 const unsigned short INUSE_ATTRIBUTE_ERR = 10;
53960 const unsigned short INVALID_STATE_ERR = 11;
53961 const unsigned short SYNTAX_ERR = 12;
53962 const unsigned short INVALID_MODIFICATION_ERR = 13;
53963 const unsigned short NAMESPACE_ERR = 14;
53964 const unsigned short INVALID_ACCESS_ERR = 15;
53965 const unsigned short VALIDATION_ERR = 16;
53966 const unsigned short TYPE_MISMATCH_ERR = 17;
53967 const unsigned short SECURITY_ERR = 18;
53968 const unsigned short NETWORK_ERR = 19;
53969 const unsigned short ABORT_ERR = 20;
53970 const unsigned short URL_MISMATCH_ERR = 21;
53971 const unsigned short QUOTA_EXCEEDED_ERR = 22;
53972 const unsigned short TIMEOUT_ERR = 23;
53973 const unsigned short INVALID_NODE_TYPE_ERR = 24;
53974 const unsigned short DATA_CLONE_ERR = 25;
53978 Generic exception interface.
53982 This interface will be used by the APIs to throw errors synchronously.
53985 The attempt to set an attribute value may or may not raise WebAPIException synchronously with error type TypeMismatchError or InvalidValuesError.
53992 <ExtendedAttributeList>
53993 <ExtendedAttribute name="NoInterfaceObject">
53994 <webidl>NoInterfaceObject</webidl>
53995 </ExtendedAttribute>
53996 </ExtendedAttributeList>
53997 <Attribute readonly="readonly" name="code" id="::Tizen::WebAPIException::code">
53998 <webidl> readonly attribute unsigned short code;</webidl>
54002 For the possible values for this attribute, see <a href="http://www.w3.org/TR/dom/#domexception">DOMException</a>.
54008 <Type type="unsigned short"/>
54010 <Attribute readonly="readonly" name="name" id="::Tizen::WebAPIException::name">
54011 <webidl> readonly attribute DOMString name;</webidl>
54014 An error type. The name attribute must return the value it was initialized with.
54015 This attribute can have one of the following values:
54020 UnknownError - An unknown error has occurred. </li>
54022 InvalidValuesError - The content of an object does not contain valid values. </li>
54024 IOError - An error occurred in communication with the underlying implementation and so the requested method cannot be completed. </li>
54026 ServiceNotAvailableError - The requested service is not available. </li>
54029 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>
54036 <Type type="DOMString"/>
54038 <Attribute readonly="readonly" name="message" id="::Tizen::WebAPIException::message">
54039 <webidl> readonly attribute DOMString message;</webidl>
54042 An error message that describes the details of an encountered error.
54043 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.
54049 <Type type="DOMString"/>
54051 <Const name="INDEX_SIZE_ERR" value="1" id="::Tizen::WebAPIException::INDEX_SIZE_ERR">
54052 <webidl> const unsigned short INDEX_SIZE_ERR = 1;</webidl>
54055 The index is not in the allowed range.
54061 <Type type="unsigned short"/>
54063 <Const name="DOMSTRING_SIZE_ERR" value="2" id="::Tizen::WebAPIException::DOMSTRING_SIZE_ERR">
54064 <webidl> const unsigned short DOMSTRING_SIZE_ERR = 2;</webidl>
54067 The specified range of text is too large.
54073 <Type type="unsigned short"/>
54075 <Const name="HIERARCHY_REQUEST_ERR" value="3" id="::Tizen::WebAPIException::HIERARCHY_REQUEST_ERR">
54076 <webidl> const unsigned short HIERARCHY_REQUEST_ERR = 3;</webidl>
54079 The operation would yield an incorrect node tree.
54085 <Type type="unsigned short"/>
54087 <Const name="WRONG_DOCUMENT_ERR" value="4" id="::Tizen::WebAPIException::WRONG_DOCUMENT_ERR">
54088 <webidl> const unsigned short WRONG_DOCUMENT_ERR = 4;</webidl>
54091 The object is in the wrong document.
54097 <Type type="unsigned short"/>
54099 <Const name="INVALID_CHARACTER_ERR" value="5" id="::Tizen::WebAPIException::INVALID_CHARACTER_ERR">
54100 <webidl> const unsigned short INVALID_CHARACTER_ERR = 5;</webidl>
54103 The string contains invalid characters.
54109 <Type type="unsigned short"/>
54111 <Const name="NO_DATA_ALLOWED_ERR" value="6" id="::Tizen::WebAPIException::NO_DATA_ALLOWED_ERR">
54112 <webidl> const unsigned short NO_DATA_ALLOWED_ERR = 6;</webidl>
54115 Data is specified for a node that does not support data.
54121 <Type type="unsigned short"/>
54123 <Const name="NO_MODIFICATION_ALLOWED_ERR" value="7" id="::Tizen::WebAPIException::NO_MODIFICATION_ALLOWED_ERR">
54124 <webidl> const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7;</webidl>
54127 The object cannot be modified.
54133 <Type type="unsigned short"/>
54135 <Const name="NOT_FOUND_ERR" value="8" id="::Tizen::WebAPIException::NOT_FOUND_ERR">
54136 <webidl> const unsigned short NOT_FOUND_ERR = 8;</webidl>
54139 The object cannot be found here.
54145 <Type type="unsigned short"/>
54147 <Const name="NOT_SUPPORTED_ERR" value="9" id="::Tizen::WebAPIException::NOT_SUPPORTED_ERR">
54148 <webidl> const unsigned short NOT_SUPPORTED_ERR = 9;</webidl>
54151 The operation is not supported.
54157 <Type type="unsigned short"/>
54159 <Const name="INUSE_ATTRIBUTE_ERR" value="10" id="::Tizen::WebAPIException::INUSE_ATTRIBUTE_ERR">
54160 <webidl> const unsigned short INUSE_ATTRIBUTE_ERR = 10;</webidl>
54163 The specified attribute is already in use elsewhere.
54169 <Type type="unsigned short"/>
54171 <Const name="INVALID_STATE_ERR" value="11" id="::Tizen::WebAPIException::INVALID_STATE_ERR">
54172 <webidl> const unsigned short INVALID_STATE_ERR = 11;</webidl>
54175 The object is in an invalid state.
54181 <Type type="unsigned short"/>
54183 <Const name="SYNTAX_ERR" value="12" id="::Tizen::WebAPIException::SYNTAX_ERR">
54184 <webidl> const unsigned short SYNTAX_ERR = 12;</webidl>
54187 The string did not match the expected pattern.
54193 <Type type="unsigned short"/>
54195 <Const name="INVALID_MODIFICATION_ERR" value="13" id="::Tizen::WebAPIException::INVALID_MODIFICATION_ERR">
54196 <webidl> const unsigned short INVALID_MODIFICATION_ERR = 13;</webidl>
54199 The object cannot be modified in this way.
54205 <Type type="unsigned short"/>
54207 <Const name="NAMESPACE_ERR" value="14" id="::Tizen::WebAPIException::NAMESPACE_ERR">
54208 <webidl> const unsigned short NAMESPACE_ERR = 14;</webidl>
54211 The operation is not allowed by Namespaces in XML.
54217 <Type type="unsigned short"/>
54219 <Const name="INVALID_ACCESS_ERR" value="15" id="::Tizen::WebAPIException::INVALID_ACCESS_ERR">
54220 <webidl> const unsigned short INVALID_ACCESS_ERR = 15;</webidl>
54223 The object does not support the operation or argument.
54229 <Type type="unsigned short"/>
54231 <Const name="VALIDATION_ERR" value="16" id="::Tizen::WebAPIException::VALIDATION_ERR">
54232 <webidl> const unsigned short VALIDATION_ERR = 16;</webidl>
54235 The operation would cause the node to fail validation.
54241 <Type type="unsigned short"/>
54243 <Const name="TYPE_MISMATCH_ERR" value="17" id="::Tizen::WebAPIException::TYPE_MISMATCH_ERR">
54244 <webidl> const unsigned short TYPE_MISMATCH_ERR = 17;</webidl>
54247 The type of the object does not match the expected type.
54253 <Type type="unsigned short"/>
54255 <Const name="SECURITY_ERR" value="18" id="::Tizen::WebAPIException::SECURITY_ERR">
54256 <webidl> const unsigned short SECURITY_ERR = 18;</webidl>
54259 The operation is insecure.
54265 <Type type="unsigned short"/>
54267 <Const name="NETWORK_ERR" value="19" id="::Tizen::WebAPIException::NETWORK_ERR">
54268 <webidl> const unsigned short NETWORK_ERR = 19;</webidl>
54271 A network error occurred.
54277 <Type type="unsigned short"/>
54279 <Const name="ABORT_ERR" value="20" id="::Tizen::WebAPIException::ABORT_ERR">
54280 <webidl> const unsigned short ABORT_ERR = 20;</webidl>
54283 The operation was aborted.
54289 <Type type="unsigned short"/>
54291 <Const name="URL_MISMATCH_ERR" value="21" id="::Tizen::WebAPIException::URL_MISMATCH_ERR">
54292 <webidl> const unsigned short URL_MISMATCH_ERR = 21;</webidl>
54295 The given URL does not match another URL.
54301 <Type type="unsigned short"/>
54303 <Const name="QUOTA_EXCEEDED_ERR" value="22" id="::Tizen::WebAPIException::QUOTA_EXCEEDED_ERR">
54304 <webidl> const unsigned short QUOTA_EXCEEDED_ERR = 22;</webidl>
54307 The quota has been exceeded.
54313 <Type type="unsigned short"/>
54315 <Const name="TIMEOUT_ERR" value="23" id="::Tizen::WebAPIException::TIMEOUT_ERR">
54316 <webidl> const unsigned short TIMEOUT_ERR = 23;</webidl>
54319 The operation timed out.
54325 <Type type="unsigned short"/>
54327 <Const name="INVALID_NODE_TYPE_ERR" value="24" id="::Tizen::WebAPIException::INVALID_NODE_TYPE_ERR">
54328 <webidl> const unsigned short INVALID_NODE_TYPE_ERR = 24;</webidl>
54331 The supplied node is incorrect or has an incorrect ancestor for this operation.
54337 <Type type="unsigned short"/>
54339 <Const name="DATA_CLONE_ERR" value="25" id="::Tizen::WebAPIException::DATA_CLONE_ERR">
54340 <webidl> const unsigned short DATA_CLONE_ERR = 25;</webidl>
54343 The object cannot be cloned.
54349 <Type type="unsigned short"/>
54352 <Interface name="WebAPIError" id="::Tizen::WebAPIError">
54353 <webidl> [NoInterfaceObject]
54354 interface WebAPIError {
54355 readonly attribute unsigned short code;
54357 readonly attribute DOMString name;
54359 readonly attribute DOMString message;
54363 Generic error interface.
54367 This interface will be used by the APIs in order to return them in the error callback of asynchronous methods.
54374 <ExtendedAttributeList>
54375 <ExtendedAttribute name="NoInterfaceObject">
54376 <webidl>NoInterfaceObject</webidl>
54377 </ExtendedAttribute>
54378 </ExtendedAttributeList>
54379 <Attribute readonly="readonly" name="code" id="::Tizen::WebAPIError::code">
54380 <webidl> readonly attribute unsigned short code;</webidl>
54384 Possible values are defined in <a href="http://www.w3.org/TR/dom/#domexception">DOMException</a>.
54390 <Type type="unsigned short"/>
54392 <Attribute readonly="readonly" name="name" id="::Tizen::WebAPIError::name">
54393 <webidl> readonly attribute DOMString name;</webidl>
54396 An error type. The name attribute must return the value it was initialized with.
54397 This attribute can have one of the following values:
54402 UnknownError - An unknown error has occurred. </li>
54404 InvalidValuesError - The content of an object does not contain valid values. </li>
54406 IOError - An error occurred in communication with the underlying implementation and so the requested method cannot be completed. </li>
54408 ServiceNotAvailableError - The requested service is not available. </li>
54411 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>
54418 <Type type="DOMString"/>
54420 <Attribute readonly="readonly" name="message" id="::Tizen::WebAPIError::message">
54421 <webidl> readonly attribute DOMString message;</webidl>
54424 An error message that describes the details of the error encountered. This attribute is not intended
54425 to be used directly in the user interfaces as it is mainly intended to be useful for developers rather than end users.
54431 <Type type="DOMString"/>
54434 <Interface name="SuccessCallback" id="::Tizen::SuccessCallback">
54435 <webidl> [Callback=FunctionOnly, NoInterfaceObject]
54436 interface SuccessCallback {
54441 This interface is used in methods that do not require any return value in the success callback.
54442 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.
54447 <Code> function onSuccess() {
54448 console.log("Application launched successfully");
54450 tizen.application.launch('0pnxz8hbsr.MyFiles', onSuccess);
54453 <ExtendedAttributeList>
54454 <ExtendedAttribute name="Callback" value="FunctionOnly">
54455 <webidl>Callback</webidl>
54456 </ExtendedAttribute>
54457 <ExtendedAttribute name="NoInterfaceObject">
54458 <webidl> NoInterfaceObject</webidl>
54459 </ExtendedAttribute>
54460 </ExtendedAttributeList>
54461 <Operation name="onsuccess" id="::Tizen::SuccessCallback::onsuccess">
54462 <webidl> void onsuccess ();</webidl>
54465 Method invoked when the asynchronous call completes successfully.
54471 <Type type="void"/>
54475 <Interface name="ErrorCallback" id="::Tizen::ErrorCallback">
54476 <webidl> [Callback=FunctionOnly, NoInterfaceObject]
54477 interface ErrorCallback {
54479 void onerror (<ref>WebAPIError</ref> error);
54483 This interface is used in methods that require only an error as input parameter in the error callback.
54484 If an invalid function (such as null) is passed to the API that accepts ErrorCallback,
54485 it silently fails and there is no further action.
54490 <Code> // Define the error callback.
54491 function onError(error) {
54492 console.log(error.message);
54495 // Define the success callback.
54496 function onSuccess(services) {
54497 //send a message using the found service
54499 tizen.messaging.getMessageServices("messaging.sms", onSuccess, onError);
54502 <ExtendedAttributeList>
54503 <ExtendedAttribute name="Callback" value="FunctionOnly">
54504 <webidl>Callback</webidl>
54505 </ExtendedAttribute>
54506 <ExtendedAttribute name="NoInterfaceObject">
54507 <webidl> NoInterfaceObject</webidl>
54508 </ExtendedAttribute>
54509 </ExtendedAttributeList>
54510 <Operation name="onerror" id="::Tizen::ErrorCallback::onerror">
54511 <webidl> void onerror (<ref>WebAPIError</ref> error);</webidl>
54514 Method that is invoked when the error occurs.
54520 <Type type="void"/>
54522 <Argument name="error">
54528 <Type name="WebAPIError"/>
54534 <Module name="WebSetting" id="::WebSetting">
54535 <webidl>module WebSetting {
54537 [NoInterfaceObject] interface WebSettingObject {
54538 readonly attribute <ref>WebSettingManager</ref> websetting;
54540 <ref>Tizen</ref> implements <ref>WebSettingObject</ref>;
54542 [NoInterfaceObject] interface WebSettingManager {
54544 void setUserAgentString(DOMString userAgent,
54545 optional <ref>SuccessCallback</ref>? successCallback,
54546 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);
54548 void removeAllCookies(optional <ref>SuccessCallback</ref>? successCallback,
54549 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);
54555 This Web setting API defines a set of APIs that manages the setting states of the Web view in your Web application.
54559 A Tizen Web application includes a web view and the properties below of the web view can be managed via the Web setting API:
54563 Delete all the cookies saved for the web view in the Web application. </li>
54565 Set a custom user agent string of the web view in the Web application. </li>
54568 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.
54575 <Interface name="WebSettingObject" id="::WebSetting::WebSettingObject">
54576 <webidl> [NoInterfaceObject] interface WebSettingObject {
54577 readonly attribute <ref>WebSettingManager</ref> websetting;
54581 This interface defines what is instantiated for the Web setting API by the <em>Tizen</em> object from the Tizen Platform.
54585 <em>tizen.websetting</em> object is available to manage the settings of the Web view in your Web application.
54592 <ExtendedAttributeList>
54593 <ExtendedAttribute name="NoInterfaceObject">
54594 <webidl>NoInterfaceObject</webidl>
54595 </ExtendedAttribute>
54596 </ExtendedAttributeList>
54597 <Attribute readonly="readonly" name="websetting" id="::WebSetting::WebSettingObject::websetting">
54598 <webidl> readonly attribute <ref>WebSettingManager</ref> websetting;</webidl>
54599 <Type name="WebSettingManager"/>
54602 <Implements name1="Tizen" name2="WebSettingObject">
54603 <webidl> <ref>Tizen</ref> implements <ref>WebSettingObject</ref>;</webidl>
54605 <Interface name="WebSettingManager" id="::WebSetting::WebSettingManager">
54606 <webidl> [NoInterfaceObject] interface WebSettingManager {
54608 void setUserAgentString(DOMString userAgent,
54609 optional <ref>SuccessCallback</ref>? successCallback,
54610 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);
54612 void removeAllCookies(optional <ref>SuccessCallback</ref>? successCallback,
54613 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);
54618 This is the top-level interface for the WebSetting API that managed the settings of the Web view in your Web application.
54621 <ExtendedAttributeList>
54622 <ExtendedAttribute name="NoInterfaceObject">
54623 <webidl>NoInterfaceObject</webidl>
54624 </ExtendedAttribute>
54625 </ExtendedAttributeList>
54626 <Operation name="setUserAgentString" id="::WebSetting::WebSettingManager::setUserAgentString">
54627 <webidl> void setUserAgentString(DOMString userAgent,
54628 optional <ref>SuccessCallback</ref>? successCallback,
54629 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);</webidl>
54632 Sets the custom user agent string for your Web application.
54636 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
54637 has the same user agent string as the Tizen browser on the device.
54640 The <em>ErrorCallback</em> is launched with these error types:
54644 UnknownError - If any error occurs while setting the user agent string. </li>
54646 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
54652 <Code> function successCallback() {
54653 console.log("The requested user agent string has just been set successfully.");
54656 tizen.websetting.setUserAgentString("the new user agent string to set", successCallback);
54660 <Type type="void"/>
54662 <Argument name="userAgent">
54665 User agent to set for the Web view in your Web application.
54668 <Type type="DOMString"/>
54670 <Argument optional="optional" name="successCallback">
54673 To be invoked if the requested setting operation succeeds.
54676 <Type name="SuccessCallback" nullable="nullable"/>
54678 <Argument optional="optional" name="errorCallback">
54681 To be invoked if the requested setting operation fails.
54684 <Type name="ErrorCallback" nullable="nullable"/>
54688 <RaiseException name="WebAPIException">
54691 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
54697 <Operation name="removeAllCookies" id="::WebSetting::WebSettingManager::removeAllCookies">
54698 <webidl> void removeAllCookies(optional <ref>SuccessCallback</ref>? successCallback,
54699 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);</webidl>
54702 Removes all the cookies saved for the Web view in your Web application.
54706 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.
54709 The <em>ErrorCallback</em> is launched with these error types:
54713 UnknownError - If any error occurs while deleting the cookies. </li>
54723 http://tizen.org/privilege/websetting
54725 <Code> function successCallback() {
54726 console.log("The cookies saved for your application have just been removed.");
54729 tizen.websetting.removeAllCookies(successCallback);
54733 <Type type="void"/>
54735 <Argument optional="optional" name="successCallback">
54738 To be invoked if the requested delete operation succeeds.
54741 <Type name="SuccessCallback" nullable="nullable"/>
54743 <Argument optional="optional" name="errorCallback">
54746 To be invoked if the requested delete operation fails.
54749 <Type name="ErrorCallback" nullable="nullable"/>
54753 <RaiseException name="WebAPIException">
54756 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
54759 with error type SecurityError, if the application does not have the privilege to call this method.